11. Mai 2007 12:46
11. Mai 2007 15:11
11. Mai 2007 17:52
11. Mai 2007 19:36
12. Mai 2007 14:01
18. Juli 2013 16:21
18. Juli 2013 16:36
ApplyCustEntryformEntry(VAR ApplyingCustLedgEntry : Record "Cust. Ledger Entry")
IF NOT ApplyingCustLedgEntry.Open THEN
ERROR(Text018)
ELSE BEGIN
CustEntryApplID := USERID;
IF CustEntryApplID = '' THEN
CustEntryApplID := '***';
ApplyingCustLedgEntry."Applying Entry" := TRUE;
ApplyingCustLedgEntry."Applies-to ID" := CustEntryApplID;
//OS003s os.jgl
ApplyingCustLedgEntry.CALCFIELDS("Remaining Amount");
//OS003e os.jgl
ApplyingCustLedgEntry."Amount to Apply" := ApplyingCustLedgEntry."Remaining Amount";
CODEUNIT.RUN(CODEUNIT::"Cust. Entry-Edit",ApplyingCustLedgEntry);
COMMIT;
CustledgEntry.SETCURRENTKEY("Customer No.",Open,Positive);
CustledgEntry.SETRANGE("Customer No.",ApplyingCustLedgEntry."Customer No.");
CustledgEntry.SETRANGE(Open,TRUE);
IF CustledgEntry.FINDSET THEN BEGIN
ApplyCustEntries.SetCustLedgEntry(ApplyingCustLedgEntry);
ApplyCustEntries.SETRECORD(CustledgEntry);
ApplyCustEntries.SETTABLEVIEW(CustledgEntry);
OK := ApplyCustEntries.RUNMODAL = ACTION::LookupOK;
CLEAR(ApplyCustEntries);
IF NOT OK THEN
EXIT;
END;
END;