Table of Contents

KVSADVClCrMemoEntryCreateSales

Events

OnBeforeCreateClCMEntryFromDocumentLine(Record Cust. Ledger Entry, Record Sales Line, Decimal, Boolean) :

[IntegrationEvent(false, false)]
local procedure OnBeforeCreateClCMEntryFromDocumentLine(AdvInvCVLedgEntry: Record "Cust. Ledger Entry"; DocumentLine: Record "Sales Line"; DocHeaderCurrFactor: Decimal; var IsHandled: Boolean): 

OnAfterCreateClCMEntryFromDocumentLine(Record Cust. Ledger Entry, Record Sales Line, Decimal, Record KVSADVAdvClosingCredMemoEntry) :

[IntegrationEvent(false, false)]
local procedure OnAfterCreateClCMEntryFromDocumentLine(AdvInvCVLedgEntry: Record "Cust. Ledger Entry"; DocumentLine: Record "Sales Line"; DocHeaderCurrFactor: Decimal; var AdvClCredMemoEntry: Record "KVSADVAdvClosingCredMemoEntry"): 

OnBeforeUpdateClCMEntryFromDocumentLine(Record Cust. Ledger Entry, Record Sales Line, Record Sales Header) :

[IntegrationEvent(false, false)]
local procedure OnBeforeUpdateClCMEntryFromDocumentLine(var AdvInvCVLedgEntry: Record "Cust. Ledger Entry"; var DocumentLine: Record "Sales Line"; var DocumentHeader: Record "Sales Header"): 

OnAfterUpdateClosCrMemoEntriesWhilePostDocument(Record Sales Line, Record KVSADVAdvClosingCredMemoEntry) :

[IntegrationEvent(false, false)]
local procedure OnAfterUpdateClosCrMemoEntriesWhilePostDocument(ClCMDocumentLine: Record "Sales Line"; var ExistingAdvClCredMemoEntry: Record "KVSADVAdvClosingCredMemoEntry"): 

OnBeforeInsertClosingCMEntriesForDocumentPosting(Record Sales Header, Record Sales Line, Boolean) :

[IntegrationEvent(false, false)]
local procedure OnBeforeInsertClosingCMEntriesForDocumentPosting(DocumentHeader: Record "Sales Header"; DocumentLine: Record "Sales Line"; var IsHandled: Boolean): 

OnAfterCreatePostedClosingCMEntryFromDocumentPosting(Record Sales Header, Record Sales Line, Record KVSADVPostedAdvClosCrMemoEntry) :

[IntegrationEvent(false, false)]
local procedure OnAfterCreatePostedClosingCMEntryFromDocumentPosting(DocumentHeader: Record "Sales Header"; DocumentLine: Record "Sales Line"; var PostedClosingCMEntry: Record "KVSADVPostedAdvClosCrMemoEntry"): 

OnUpdateClCMEntryFromDocumentLineOnBeforeCheckAmounts(Record Sales Line, Record Sales Line, Decimal, Decimal, Record Cust. Ledger Entry, Boolean) :

Summary: When creating a closing credit memo, there is a check that the amount of the credit memo is not higher than the amount of the advance invoice. If you have invoice discount, this will not work - because the amount of the lines will be higher, if the invoice discount is not respected if you set SkipCheck, the error will not occur. Best would be to change the actual amount (deduct the invoice amount)

[IntegrationEvent(false, false)]
local procedure OnUpdateClCMEntryFromDocumentLineOnBeforeCheckAmounts(var ActualDocumentLine: Record "Sales Line"; var FilteredDocumentLine: Record "Sales Line"; var ActualAmount: Decimal; CompareAmount: Decimal; var AdvInvCVLedgEntry: Record "Cust. Ledger Entry"; var SkipCheck: Boolean): 

Parameters:

  • ActualDocumentLine: The actual document line
  • FilteredDocumentLine: Other document lines for the same advance invoice
  • ActualAmount: The actual amount of all lines
  • CompareAmount: The maximum amount from the advance invoice
  • AdvInvCVLedgEntry: The entry with the (open) calculated amount
  • SkipCheck: Set to true to skip the amount check