Codeunit 18122465 EOS Compensation Mgt.

Codeunit 18122465 EOS Compensation Mgt.

Methods

GetNextJnlLineNo

procedure GetNextJnlLineNo(GenJnlBatch: Record "Gen. Journal Batch"): Integer

Parameters / Return Value

  • GenJnlBatch Record "Gen. Journal Batch"

  • Returns Integer


CollectEntries

procedure CollectEntries(FilterType: Option Customer,Vendor,Contact,"VAT Registration No."; FilterCode: Code[20]; FilterOpen: Option " ",Yes,No; FilterDate: Text; FilterPaymentMethod: Text; FilterCurrency: Text; var TmpEntries: Record "EOS Compensation Buffer")

Parameters / Return Value

  • FilterType Option

    Customer (0) , Vendor (1) , Contact (2) , "VAT Registration No." (3)

  • FilterCode Code[20]

  • FilterOpen Option

    " " (0) , Yes (1) , No (2)

  • FilterDate Text

  • FilterPaymentMethod Text

  • FilterCurrency Text

  • TmpEntries Record "EOS Compensation Buffer"


AutoCompensate

procedure AutoCompensate(var EntryToComp: Record "EOS Compensation Buffer"; var Entry: Record "EOS Compensation Buffer"; Method: Option Amount,AmountDesc,DueDate,DueDateDesc)

Parameters / Return Value

  • EntryToComp Record "EOS Compensation Buffer"

  • Entry Record "EOS Compensation Buffer"

  • Method Option

    Amount (0) , AmountDesc (1) , DueDate (2) , DueDateDesc (3)


CreateJnlLines

procedure CreateJnlLines(var EntryBuffer: Record "EOS Compensation Buffer"; JnlTemplateName: Code[10]; JnlBatchName: Code[10]; DocumentNo: Code[20]; PostingDate: Date)

Parameters / Return Value

  • EntryBuffer Record "EOS Compensation Buffer"

  • JnlTemplateName Code[10]

  • JnlBatchName Code[10]

  • DocumentNo Code[20]

  • PostingDate Date


CompensateCustomerVendorAmounts

procedure CompensateCustomerVendorAmounts(var TmpEntries: Record "EOS Compensation Buffer")

Parameters / Return Value

  • TmpEntries Record "EOS Compensation Buffer"

GetVendorBalance

procedure GetVendorBalance(var Customer: Record Customer; CalcNetChange: Boolean) Result: Decimal

Parameters / Return Value

  • Customer Record "Customer"

  • CalcNetChange Boolean

  • Returns Decimal


GetCustomerBalance

procedure GetCustomerBalance(var Vendor: Record Vendor; CalcNetChange: Boolean) Result: Decimal

Parameters / Return Value

  • Vendor Record "Vendor"

  • CalcNetChange Boolean

  • Returns Decimal


ShowJournal

procedure ShowJournal(JnlTemplateName: Code[10]; JnlBatchName: Code[10]; Ask: Boolean)

Parameters / Return Value

  • JnlTemplateName Code[10]

  • JnlBatchName Code[10]

  • Ask Boolean


Events

OnParseVendorLedgerEntryDocTypeToEnum

local procedure OnParseVendorLedgerEntryDocTypeToEnum(VendorLedgerEntry: Record "Vendor Ledger Entry"; var EnumDocumentType: Enum "EOS Comp. Document Type"; var Handled: Boolean)

This event is raise when compensation module needs to convert a document type option to document type extendible enums

Parameters / Return Value

  • VendorLedgerEntry Record "Vendor Ledger Entry"

    Source “Vendor Ledger Entry”

  • EnumDocumentType Enum "EOS Comp. Document Type"

    Document Type Enum

  • Handled Boolean

    Return true after correctly handling your customized document type


OnParseCustomerLedgerEntryDocTypeToEnum

local procedure OnParseCustomerLedgerEntryDocTypeToEnum(CustomerLedgerEntry: Record "Cust. Ledger Entry"; var EnumDocumentType: Enum "EOS Comp. Document Type"; var Handled: Boolean)

This event is raise when compensation module needs to convert a document type option to document type extendible enums

Parameters / Return Value

  • CustomerLedgerEntry Record "Cust. Ledger Entry"

    Source “Customer Ledger Entry”

  • EnumDocumentType Enum "EOS Comp. Document Type"

    Document Type Enum

  • Handled Boolean

    Return true after correctly handling your customized document type


OnParseApplytoDocTypeEnumToGenJournalLine

local procedure OnParseApplytoDocTypeEnumToGenJournalLine(EnumDocumentType: Enum "EOS Comp. Document Type"; var GenJournalLine: Record "Gen. Journal Line"; var Handled: Boolean)

This event is raised when compensation module needs to convert from internal document type enums to Apply to journal line option

Parameters / Return Value

  • EnumDocumentType Enum "EOS Comp. Document Type"

    Surce Enum “EOS Comp. Document Type”

  • GenJournalLine Record "Gen. Journal Line"

    Destination “Gen. Journal Line”

  • Handled Boolean

    Return true after correctly handling your customized document type


OnParseBufferDocTypeEnumToGenJournalLine

local procedure OnParseBufferDocTypeEnumToGenJournalLine(Buffer: Record "EOS Compensation Buffer"; var GenJournalLine: Record "Gen. Journal Line"; var Handled: Boolean)

Subscribe to this event to force a document type value different to “payment” (default)

Parameters / Return Value

  • Buffer Record "EOS Compensation Buffer"

    Source compensation buffer

  • GenJournalLine Record "Gen. Journal Line"

    Destination “Gen. Journal Line”

  • Handled Boolean

    Return true to override standard payment document type


OnBeforeCreateJnlLines

local procedure OnBeforeCreateJnlLines(var TempEntryBuffer: Record "EOS Compensation Buffer";var JnlTemplateName: Code[10];var JnlBatchName: Code[10];DocumentNo: Code[20];PostingDate: Date;var Handled: Boolean)

Raised before journal lines are created from the entry buffer to the journal batch.

Parameters / Return Value

  • TempEntryBuffer Record "EOS Compensation Buffer"

    The entries to be created.

  • JnlTemplateName Code[10]

    The gen. journal template where the lines will be created. You can modify this.

  • JnlBatchName Code[10]

    The gen. journal batch where the lines will be created. You can modify this.

  • DocumentNo Code[20]

    The document no. to use.

  • PostingDate Date

    The posting date to use.

  • Handled Boolean

    Gets or sets if this event has been completely handled.


OnCreateJnlLinesAfterInitGlobals

local procedure OnCreateJnlLinesAfterInitGlobals(var TempEntryBuffer: Record "EOS Compensation Buffer"; var DocumentNo: Code[20]; var PostingDate: Date)

Raised before the linse are created, after the global parameters have been initialized.

Parameters / Return Value

  • TempEntryBuffer Record "EOS Compensation Buffer"

  • DocumentNo Code[20]

    The document no. You can modify this.

  • PostingDate Date

    The posting date. You can modify this.


OnAfterInsertGenJnlLine

local procedure OnAfterInsertGenJnlLine(TempEntryBuffer: Record "EOS Compensation Buffer"; var GenJnlLine: Record "Gen. Journal Line"; var TempGenJnlLine: Record "Gen. Journal Line"; Balancing: Boolean)

Raised after a gen. journal line has finished creating from a source entry.

Parameters / Return Value

  • TempEntryBuffer Record "EOS Compensation Buffer"

  • GenJnlLine Record "Gen. Journal Line"

    The journal line that has been created.

  • TempGenJnlLine Record "Gen. Journal Line"

    A temporary buffer that contains all journal lines that were created from this iteration. If you create additional journal lines, remember to add them here.

  • Balancing Boolean

    Indicates if the journal line is a balancing journal line.


OnAfterCreateGenJnlLinesBeforeBalancing

local procedure OnAfterCreateGenJnlLinesBeforeBalancing(var TempEntryBuffer: Record "EOS Compensation Buffer"; GenJnlBatch: Record "Gen. Journal Batch"; var TempGenJnlLine: Record "Gen. Journal Line")

Raised after gen. journal lines have been created, but before any balancing journal lines are created.

Parameters / Return Value

  • TempEntryBuffer Record "EOS Compensation Buffer"

    The entries to be created.

  • GenJnlBatch Record "Gen. Journal Batch"

    The gen. journal batch where lines have been created.

  • TempGenJnlLine Record "Gen. Journal Line"

    A temporary buffer that contains all journal lines that were created from this iteration. If you create additional journal lines, remember to add them here.


OnAfterCreateGenJnlLines

local procedure OnAfterCreateGenJnlLines(var TempEntryBuffer: Record "EOS Compensation Buffer"; GenJnlBatch: Record "Gen. Journal Batch"; var TempGenJnlLine: Record "Gen. Journal Line")

Raised after all gen. journal lines have been created.

Parameters / Return Value

  • TempEntryBuffer Record "EOS Compensation Buffer"

    The entries to be created.

  • GenJnlBatch Record "Gen. Journal Batch"

    The gen. journal batch where lines have been created.

  • TempGenJnlLine Record "Gen. Journal Line"

    A temporary buffer that contains all journal lines that were created from this iteration. If you create additional journal lines, remember to add them here.


OnBeforeCustomer_GetVendors

local procedure OnBeforeCustomer_GetVendors(Customer: Record Customer; var VendorList: List of [Code[20]]; var Handled: Boolean)

Raised before vendors for any given customer are retrieved.

Parameters / Return Value

  • Customer Record "Customer"

    The customer

  • VendorList List[Code]

    The list of vendors that are linked to the customer.

  • Handled Boolean

    Gets or sets if this event has been completely handled.


OnBeforeVendor_GetCustomers

local procedure OnBeforeVendor_GetCustomers(Vendor: Record Vendor; var CustomerList: List of [Code[20]]; var Handled: Boolean)

Raised before customers for any given vendor are retrieved.

Parameters / Return Value

  • Vendor Record "Vendor"

    The vendor

  • CustomerList List[Code]

    The list of customers that are linked to the vendor.

  • Handled Boolean

    Gets or sets if this event has been completely handled.


OnAfterCustomer_GetVendors

local procedure OnAfterCustomer_GetVendors(Customer: Record Customer; var VendorList: List of [Code[20]])

Raised after all vendors that are linked to a given customer have been retrieved.

Parameters / Return Value

  • Customer Record "Customer"

    The customer.

  • VendorList List[Code]

    The list of vendors that are linked to the customer.


OnAfterVendor_GetCustomers

local procedure OnAfterVendor_GetCustomers(Vendor: Record Vendor; var CustomerList: List of [Code[20]])

Raised after all customers that are linked to a given vendor have been retrieved.

Parameters / Return Value

  • Vendor Record "Vendor"

    The vendor.

  • CustomerList List[Code]

    The list of customers that are linked to the vendor.


OnBeforeApplyFiltersToCustomerLedgerEntry

procedure OnBeforeApplyFiltersToCustomerLedgerEntry(var Buffer: Record "EOS Compensation Buffer"; var CustomerLedgerEntry: Record "Cust. Ledger Entry")

This event is raised before reading Customer Ledger Entries. You can apply custom filters to skip some records

Parameters / Return Value

  • Buffer Record "EOS Compensation Buffer"

    Record “EOS Compensation Buffer”

  • CustomerLedgerEntry Record "Cust. Ledger Entry"

    Record “Cust. Ledger Entry”


OnAfterPopulateBufferFromCustomerLedgerEntry

procedure OnAfterPopulateBufferFromCustomerLedgerEntry(CustomerLedgerEntry: Record "Cust. Ledger Entry"; var Buffer: Record "EOS Compensation Buffer"; var SkipRecord: Boolean)

Thie event is raised after standard parsing and before adding the record to internal compensation buffer.

Parameters / Return Value

  • CustomerLedgerEntry Record "Cust. Ledger Entry"

    Source “Cust. Ledger Entry”

  • Buffer Record "EOS Compensation Buffer"

    Destination “EOS Compensation Buffer”

  • SkipRecord Boolean

    Return true if you want to avoid inserting the record into the buffer


OnBeforeApplyFiltersToVendorLedgerEntry

procedure OnBeforeApplyFiltersToVendorLedgerEntry(var Buffer: Record "EOS Compensation Buffer"; var VendorLedgerEntry: Record "Vendor Ledger Entry")

This event is raised before reading Vendor Ledger Entries. You can apply custom filters to skip some records

Parameters / Return Value

  • Buffer Record "EOS Compensation Buffer"

    Record “EOS Compensation Buffer”

  • VendorLedgerEntry Record "Vendor Ledger Entry"

    Record “Vendor Ledger Entry”


OnAfterPopulateBufferFromVendorLedgerEntry

procedure OnAfterPopulateBufferFromVendorLedgerEntry(VendorLedgerEntry: Record "Vendor Ledger Entry"; var Buffer: Record "EOS Compensation Buffer"; var SkipRecord: Boolean)

Thie event is raised after standard parsing and before adding the record to internal compensation buffer.

Parameters / Return Value

  • VendorLedgerEntry Record "Vendor Ledger Entry"

    Source “Vendor Ledger Entry”

  • Buffer Record "EOS Compensation Buffer"

    Destination “EOS Compensation Buffer”

  • SkipRecord Boolean

    Return true if you want to avoid inserting the record into the buffer


OnBeforeCreateJournalLineFromBuffer

procedure OnBeforeCreateJournalLineFromBuffer(Buffer: Record "EOS Compensation Buffer"; var GenJournalLine: Record "Gen. Journal Line"; var SkipRecord: Boolean)

This event is raised before inserting a initialized journal line.

Parameters / Return Value

  • Buffer Record "EOS Compensation Buffer"

    Source “EOS Compensation Buffer”

  • GenJournalLine Record "Gen. Journal Line"

    Destination “Gen. Journal Line”

  • SkipRecord Boolean

    Return true to skip Journal Line insertion


OnAfterPopulateJournalLineFromBuffer

procedure OnAfterPopulateJournalLineFromBuffer(Buffer: Record "EOS Compensation Buffer"; var GenJournalLine: Record "Gen. Journal Line")

This event is raised after all standard journal line parsing. Journal line is already on database as an initialized record but before updating the db.

Parameters / Return Value

  • Buffer Record "EOS Compensation Buffer"

    Source “EOS Compensation Buffer”

  • GenJournalLine Record "Gen. Journal Line"

    Destination “Gen. Journal Line”



EOS Labs -