...
VAR
// Delete the following lines.
FullyDeducted@1360007 : Boolean;
DocNoForVATCorr@1360006 : Code[20];
BEGIN
WITH SalesHeader DO BEGIN
FullyDeducted := FullyDeductedCustPrepmt(SalesLine);
IF FullyDeducted THEN
// End of the lines.
InvoicedAmount :=
...
...
VAR
// Add the following lines.
IsFinalInvoice@1360007 : Boolean;
DocNoForVATCorr@1360006 : Code[20];
BEGIN
WITH SalesHeader DO BEGIN
IsFinalInvoice := IsFinalCustInvoice(SalesLine);
IF IsFinalInvoice THEN
// End of the lines.
InvoicedAmount :=
...
...
SalesLine,SalesInvHeader,LinkedAdvanceEntry,DocNoForVATCorr,
// Delete the following line.
FullyDeducted,TempJnlLineDim,InvoicedAmount,Post);
UNTIL SalesLine.NEXT = 0;
...
...
SalesLine,SalesInvHeader,LinkedAdvanceEntry,DocNoForVATCorr,
// Add the following line.
IsFinalInvoice,TempJnlLineDim,InvoicedAmount,Post);
UNTIL SalesLine.NEXT = 0;
...