...
"Debit Amount","Credit Amount","Debit Amount (LCY)","Credit Amount (LCY)");
IF (("Document Situation" <> 0) AND (ApplicationManagement.AccessToCartera)) THEN
CASE "Document Situation" OF
"Document Situation"::Cartera:
IF Doc.GET(Doc.Type::Payable,"Entry No.") THEN BEGIN
// Delete the following lines.
Doc."Remaining Amt. (LCY)" := "Remaining Amt. (LCY)";
Doc."Adjusted Amount" := AdjAmount;
// End of the lines.
Doc.Adjusted := TRUE;
Doc.MODIFY;
END;
"Document Situation"::"Posted BG/PO":
IF PostedDoc.GET(PostedDoc.Type::Payable,"Entry No.") THEN BEGIN
...
...
"Debit Amount","Credit Amount","Debit Amount (LCY)","Credit Amount (LCY)");
IF (("Document Situation" <> 0) AND (ApplicationManagement.AccessToCartera)) THEN
CASE "Document Situation" OF
"Document Situation"::Cartera:
IF Doc.GET(Doc.Type::Payable,"Entry No.") THEN BEGIN
// Add the following lines.
Doc."Remaining Amt. (LCY)" := ABS("Remaining Amt. (LCY)" + AdjAmount);
Doc."Original Amount (LCY)" := ABS("Original Amt. (LCY)" + AdjAmount);
Doc."Adjusted Amount" := - AdjAmount;
// End of the lines.
Doc.Adjusted := TRUE;
Doc.MODIFY;
END;
"Document Situation"::"Posted BG/PO":
IF PostedDoc.GET(PostedDoc.Type::Payable,"Entry No.") THEN BEGIN
...