...
VATEntry.RESET;
VATEntry.SETCURRENTKEY(Type,"Posting Date","Document Type","Document No.","Bill-to/Pay-to No.");
VATEntry.SETRANGE(Type,VATEntry.Type::Sale);
VATEntry.SETRANGE("Document No.","Document No.");
// Delete the following line.
VATEntry.SETRANGE("Document Date","Document Date");
VATEntry.SETRANGE("Document Type","Document Type");
VATEntry.SETRANGE("Country/Region Code",CountryCode);
IF NOT VATEntry.FINDFIRST THEN BEGIN
CASE "Document Type" OF
...
...
VATEntry.RESET;
VATEntry.SETCURRENTKEY(Type,"Posting Date","Document Type","Document No.","Bill-to/Pay-to No.");
VATEntry.SETRANGE(Type,VATEntry.Type::Sale);
VATEntry.SETRANGE("Document No.","Document No.");
// Add the following lines.
VATEntry.SETRANGE("Document Date","Document Date");
VATEntry.SETRANGE("Posting Date","Posting Date");
// End of the lines.
VATEntry.SETRANGE("Document Type","Document Type");
VATEntry.SETRANGE("Country/Region Code",CountryCode);
IF NOT VATEntry.FINDFIRST THEN BEGIN
CASE "Document Type" OF
...
...
END;
IF (VATEntry."VAT Registration No." <> '') OR NoTaxVATFound OR FromJournal THEN BEGIN
CALCFIELDS("Amount (LCY)");
SalesAmt := SalesAmt + "Amount (LCY)";
// Delete the following line.
UpdateQuarterAmount(AmountType::Sales,"Amount (LCY)","Document Date");
END ELSE
EmptyVATRegNo := TRUE;
END;
OnPostDataItem=VAR
...
...
END;
IF (VATEntry."VAT Registration No." <> '') OR NoTaxVATFound OR FromJournal THEN BEGIN
CALCFIELDS("Amount (LCY)");
SalesAmt := SalesAmt + "Amount (LCY)";
// Add the following lines.
UpdateQuarterAmount(AmountType::Sales,"Amount (LCY)","Document Date");
UpdateQuarterAmount(AmountType::Sales,"Amount (LCY)","Posting Date");
// End of the lines.
END ELSE
EmptyVATRegNo := TRUE;
END;
OnPostDataItem=VAR
...
...
END;
END;
CalcFields=Amount;
DataItemLink=Customer No.=FIELD(No.),
// Delete the following line.
Document Date=FIELD(Date Filter);
}
SECTIONS
{
}
}
...
...
END;
END;
CalcFields=Amount;
DataItemLink=Customer No.=FIELD(No.),
// Add the following line.
Posting Date=FIELD(Date Filter);
}
SECTIONS
{
}
}
...