...
SupplUnits := "Intrastat Jnl. Line".Quantity;
// Delete the following lines.
{"Intra - form Buffer".RESET;
IF "Intra - form Buffer".GET("Intrastat Jnl. Line"."VAT Registration No.",
"Intrastat Jnl. Line"."Transaction Type", "Intrastat Jnl. Line"."Tariff No.",
"Intrastat Jnl. Line"."Group Code", "Intrastat Jnl. Line"."Transport Method",
"Intrastat Jnl. Line"."Transaction Specification", CountryOriginCode,
"Intrastat Jnl. Line".Area,"Intrastat Jnl. Line"."Corrective entry")
THEN BEGIN
//"Intra - form Buffer".Amount := "Intra - form Buffer".Amount + "Intrastat Jnl. Line".Amount;//old line
"Intra - form Buffer".Amount := "Intra - form Buffer".Amount + ROUND("Intrastat Jnl. Line".Amount,1);//new line
"Intra - form Buffer"."Source Currency Amount" := "Intra - form Buffer"."Source Currency Amount" +
"Intrastat Jnl. Line"."Source Currency Amount";
"Intra - form Buffer"."Total Weight" := "Intra - form Buffer"."Total Weight" + "Intrastat Jnl. Line"."Total Weight";
"Intra - form Buffer"."Statistical Value" := "Intra - form Buffer"."Statistical Value" +
//"Intrastat Jnl. Line"."Statistical Value"; //old line
ROUND("Intrastat Jnl. Line"."Statistical Value",1); //new line
"Intra - form Buffer".Quantity := "Intra - form Buffer".Quantity + SupplUnits;
"Intra - form Buffer".MODIFY;
//TotalAmount += ABS(ROUND(Amount,1));//old line
TotalAmount += ROUND(Amount,1); //new line
END ELSE BEGIN
"Intra - form Buffer".TRANSFERFIELDS("Intrastat Jnl. Line");
"Intra - form Buffer".Amount := ROUND("Intra - form Buffer".Amount,1);//new line
"Intra - form Buffer"."Statistical Value" := ROUND("Intra - form Buffer"."Statistical Value",1); //new line
"Intra - form Buffer"."Country of Origin Code" := CountryOriginCode;
"Intra - form Buffer".Quantity := SupplUnits;
"Intra - form Buffer"."User ID" := USERID;
"Intra - form Buffer"."No." := 0;
"Intra - form Buffer".INSERT;
//TotalAmount += ABS(ROUND(Amount,1));//old line
TotalAmount += ROUND(Amount,1); //new line
TotalRecords += 1;
END;}
// End of the deleted lines.
END ELSE BEGIN //Corrective E ntry
IF STRLEN("Reference Period") <> 4 THEN
...
...
SupplUnits := "Intrastat Jnl. Line".Quantity;
END ELSE BEGIN //Corrective Entry
IF STRLEN("Reference Period") <> 4 THEN
...
...
CheckCorrectiveStatPeriod;
// Delete the following lines.
"Intra - form Buffer".TRANSFERFIELDS("Intrastat Jnl. Line");
"Intra - form Buffer".Amount := ROUND("Intra - form Buffer".Amount,1);//new line
"Intra - form Buffer"."Statistical Value" := ROUND("Intra - form Buffer"."Statistical Value",1);
"Intra - form Buffer"."User ID" := USERID;
"Intra - form Buffer".INSERT;
TotalAmount += ROUND(Amount,1);
TotalRecords += 1;
OldReferencePeriod := "Reference Period";
//END
// End of the deleted lines.
END;
...
...
CheckCorrectiveStatPeriod;
// Add the following lines.
END;
GroupIntraJnlLineIntoBuffer;
// End of the added lines.
END;
...