...
TaxDetail.SETRANGE("Tax Type",TaxDetail."Tax Type"::"Excise Tax");
IF TaxDetail.FIND('+') THEN BEGIN
TaxDetailFound := TRUE;
"Tax Type" := "Tax Type"::"Excise Tax";
INSERT;
"Tax Type" := "Tax Type"::"Sales and Use Tax";
END;
// Delete the following line.
IF NOT TaxDetailFound THEN
ERROR(
Text1020002,
TaxDetail.TABLECAPTION,
FIELDCAPTION("Tax Jurisdiction Code"),"Tax Jurisdiction Code",
FIELDCAPTION("Tax Group Code"),"Tax Group Code",
TaxDetail.FIELDCAPTION("Effective Date"),TaxDetail.GETFILTER("Effective Date"));
UNTIL NEXT = 0;
RESET;
...
...
TaxDetail.SETRANGE("Tax Type",TaxDetail."Tax Type"::"Excise Tax");
IF TaxDetail.FIND('+') THEN BEGIN
TaxDetailFound := TRUE;
"Tax Type" := "Tax Type"::"Excise Tax";
INSERT;
"Tax Type" := "Tax Type"::"Sales and Use Tax"; // NA0012
END;
// Add the following line.
IF NOT TaxDetailFound AND NOT Posted THEN
ERROR(
Text1020002,
TaxDetail.TABLECAPTION,
FIELDCAPTION("Tax Jurisdiction Code"),"Tax Jurisdiction Code",
FIELDCAPTION("Tax Group Code"),"Tax Group Code",
TaxDetail.FIELDCAPTION("Effective Date"),TaxDetail.GETFILTER("Effective Date"));
UNTIL NEXT = 0;
RESET;
...