...
CustLedgEntry.SETCURRENTKEY("Customer No.",Open,Positive);
CustLedgEntry.SETRANGE("Customer No.",AccNo);
CustLedgEntry.SETRANGE(Open,TRUE);
IF "Cash Order Type" <> "Cash Order Type"::" " THEN
CustLedgEntry.SETRANGE("Currency Code","Currency Code");
IF "Applies-to ID" = '' THEN
...
...
CustLedgEntry.SETCURRENTKEY("Customer No.",Open,Positive);
CustLedgEntry.SETRANGE("Customer No.",AccNo);
CustLedgEntry.SETRANGE(Open,TRUE);
// Add the following lines.
IF GenJnlLine."Prepayment Type" = GenJnlLine."Prepayment Type"::Advance THEN
CustLedgEntry.SETRANGE("Prepayment Type",GenJnlLine."Prepayment Type"::Advance)
ELSE
CustLedgEntry.SETFILTER("Prepayment Type",'<>%1',GenJnlLine."Prepayment Type"::Advance);
//End of the lines.
IF "Cash Order Type" <> "Cash Order Type"::" " THEN
CustLedgEntry.SETRANGE("Currency Code","Currency Code");
IF "Applies-to ID" = '' THEN
...
...
VendLedgEntry.SETCURRENTKEY("Vendor No.",Open,Positive);
VendLedgEntry.SETRANGE("Vendor No.",AccNo);
VendLedgEntry.SETRANGE(Open,TRUE);
IF "Cash Order Type" <> "Cash Order Type"::" " THEN
VendLedgEntry.SETRANGE("Currency Code","Currency Code");
IF "Applies-to ID" = '' THEN
...
...
VendLedgEntry.SETCURRENTKEY("Vendor No.",Open,Positive);
VendLedgEntry.SETRANGE("Vendor No.",AccNo);
VendLedgEntry.SETRANGE(Open,TRUE);
// Add the following lines.
IF GenJnlLine."Prepayment Type" = GenJnlLine."Prepayment Type"::Advance THEN
VendLedgEntry.SETRANGE("Prepayment Type",GenJnlLine."Prepayment Type"::Advance)
ELSE
VendLedgEntry.SETFILTER("Prepayment Type",'<>%1',GenJnlLine."Prepayment Type"::Advance);
//End of the lines.
IF "Cash Order Type" <> "Cash Order Type"::" " THEN
VendLedgEntry.SETRANGE("Currency Code","Currency Code");
IF "Applies-to ID" = '' THEN
...