ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Report 7000086 Batch Settl. Posted Bill Grs. - OnBeforeInsertGenJournalLine

Open TxusMoyano opened this issue 7 years ago • 1 comments

We need a new event in report 7000086 "Batch Settl. Posted Bill Grs.":

LOCAL [IntegrationEvent] OnBeforeInsertGenJournalLine(VAR PostedDoc : Record "Posted Cartera Doc.";VAR GenJnlLine : Record "Gen. Journal Line";VAR VATPostingSetup : Record "VAT Posting Setup";VAR CustLedgEntry : Record "Cust. Ledger Entry";VAR CustLedgEntry2 : Record "Cust. Ledger Entry";VAR PostedBillGr : Record "Posted Bill Group")

It is called on every INSERT of GenJnlLine (there are 7 calls in the report).

PostedDoc - OnAfterGetRecord PostedDoc - OnPostDataItem (2 calls)
DiscFactLiabs FactBankAccounting (2 calls) InsertGenJournalLine

In all functions the insertion is in:

WITH GenJnlLine DO BEGIN CLEAR(GenJnlLine); INIT; "Line No." := GenJnlLineNextNo; ..... .....

//Init insert ------------------------------------------------------------------------- OnBeforeInsertGenJournalLine(PostedDoc,GenJnlLine,VATPostingSetup,CustLedgEntry,CustLedgEntry2 ** ,PostedPmtOrd); //End Insert -------------------------------------------------------------------------- INSERT; ....... .......

** As you can see, there is two parameters CustLedgEntry and CustLedgEntry2, but not in all inserts CustLedgerEntry2 exists as variable. In this case, pass CustLedgerEntry as CustLedgerEntry2

PostedDoc - OnAfterGetRecord() : OnBeforeInsertGenJournalLine(PostedDoc,GenJnlLine,VATPostingSetup,CustLedgEntry,CustLedgEntry,PostedPmtOrd); PostedDoc - OnPostDataItem(): OnBeforeInsertGenJournalLine(PostedDoc,GenJnlLine,VATPostingSetup,CustLedgEntry,CustLedgEntry2,PostedPmtOrd); DiscFactLiabs: OnBeforeInsertGenJournalLine(PostedDoc,GenJnlLine,VATPostingSetup,CustLedgEntry,CustLedgEntry,PostedPmtOrd); FactBankAccounting: OnBeforeInsertGenJournalLine(PostedDoc,GenJnlLine,VATPostingSetup,CustLedgEntry,CustLedgEntry2,PostedPmtOrd); InsertGenJournalLine: OnBeforeInsertGenJournalLine(PostedDoc,GenJnlLine,VATPostingSetup,CustLedgEntry,CustLedgEntry,PostedPmtOrd);

TxusMoyano avatar Jul 11 '19 11:07 TxusMoyano

Sorry. The variable named PostedPmtOrd is really PostedBillGr

TxusMoyano avatar Jul 11 '19 12:07 TxusMoyano