Skip to content

KVSPSAJobDeferralMgt#

Procedures#

IsJobDeferralActivated() : Boolean#

Summary: Shows, if job ledger entries will be built for deferral postings.

procedure IsJobDeferralActivated(): Boolean

Returns: true, if activated

UpdateJobToLedgerEntryNoInGLRegister(Record Gen. Journal Line, Record G/L Register) :#

Summary: Updates the job ledger entry number in the G/L Register record. This is used to ensure that the job ledger entry number is correctly set when posting deferrals in the general journal.

procedure UpdateJobToLedgerEntryNoInGLRegister(GenJournalLine: Record "Gen. Journal Line"; var GLRegister: Record "G/L Register"): 

Parameters:

  • GenJournalLine: passed general journal line
  • GLRegister: passed G/L Register record

Events#

KVSPSAOnAfterCalcAmountForDeferralPosting(Record Gen. Journal Line, Record Deferral Posting Buffer, Decimal) :#

Summary: Event fired after calculating the amount for deferral posting. Allows extensions to modify the calculated deferral amount or perform additional calculations. This event enables customization of deferral amount calculations based on general journal line and deferral posting buffer information.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterCalcAmountForDeferralPosting(var TempGenJournalLine: Record "Gen. Journal Line"; DeferralPostingBuffer: Record "Deferral Posting Buffer"; var AmountToDef: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnAfterCalcAmountForDeferralPosting', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterCalcAmountForDeferralPosting(var TempGenJournalLine: Record "Gen. Journal Line"; DeferralPostingBuffer: Record "Deferral Posting Buffer"; var AmountToDef: Decimal)
begin
end;

Parameters:

  • TempGenJournalLine: The temporary general journal line associated with the deferral posting (passed by reference for modification).
  • DeferralPostingBuffer: The deferral posting buffer containing the deferral information.
  • AmountToDef: The calculated amount to be deferred (passed by reference for modification).

KVSPSAOnAfterGetReplacedSourceCodeBySetupDeferralCode(Code[10], Code[10]) :#

Summary: Event fired after getting a replaced source code by setup deferral code. Allows extensions to modify the new source code based on the old source code. This event enables customization of source code replacement logic during deferral setup processing, allowing custom mapping of source codes.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterGetReplacedSourceCodeBySetupDeferralCode(OldSourceCode: Code[10]; var NewSourceCode: Code[10]): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnAfterGetReplacedSourceCodeBySetupDeferralCode', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterGetReplacedSourceCodeBySetupDeferralCode(OldSourceCode: Code[10]; var NewSourceCode: Code[10])
begin
end;

Parameters:

  • OldSourceCode: The original source code that is being replaced.
  • NewSourceCode: The new source code that replaces the old one (passed by reference for modification).

KVSPSAOnAfterPostJob(Record Gen. Journal Line, Record G/L Entry) :#

Summary: Event fired after posting a job-related deferral entry. Allows extensions to perform additional actions after the job deferral posting has completed. This event enables custom processing after job-related general journal lines have been posted, providing access to both the source journal line and created G/L entry.

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterPostJob(GenJournalLine: Record "Gen. Journal Line"; GLEntry: Record "G/L Entry"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnAfterPostJob', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterPostJob(GenJournalLine: Record "Gen. Journal Line"; GLEntry: Record "G/L Entry")
begin
end;

Parameters:

  • GenJournalLine: The general journal line that was posted for the job deferral.
  • GLEntry: The G/L entry created from posting the general journal line.

KVSPSAOnAfterPrepareGenJournalLineForJobDeferralPosting(Record Gen. Journal Line, Record Gen. Journal Line) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnAfterPrepareGenJournalLineForJobDeferralPosting(var NewGenJournalLine: Record "Gen. Journal Line"; GenJournalLine: Record "Gen. Journal Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnAfterPrepareGenJournalLineForJobDeferralPosting', '', false, false)]
local procedure DoSomethingKVSPSAOnAfterPrepareGenJournalLineForJobDeferralPosting(var NewGenJournalLine: Record "Gen. Journal Line"; GenJournalLine: Record "Gen. Journal Line")
begin
end;

KVSPSAOnBeforeAddNonDeductVATCalcAmountForDeferralPosting(Record Gen. Journal Line, Record Gen. Journal Line, Record Deferral Posting Buffer, Decimal, Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeAddNonDeductVATCalcAmountForDeferralPosting(var TempGenJournalLine: Record "Gen. Journal Line"; GenJournalLine: Record "Gen. Journal Line"; DeferralPostingBuffer: Record "Deferral Posting Buffer"; var AmountToDef: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnBeforeAddNonDeductVATCalcAmountForDeferralPosting', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeAddNonDeductVATCalcAmountForDeferralPosting(var TempGenJournalLine: Record "Gen. Journal Line"; GenJournalLine: Record "Gen. Journal Line"; DeferralPostingBuffer: Record "Deferral Posting Buffer"; var AmountToDef: Decimal; var IsHandled: Boolean)
begin
end;

KVSPSAOnBeforeCheckingDuplicateDeferralCodesInPurchaseHeader(Record Purchase Header, Record Purchase Line, Boolean) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: Allows you to integrate your own check for double deferral templates and maybe find a different rule set.

[Obsolete('Check is not necessary anymore.', '24.1')]
[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeCheckingDuplicateDeferralCodesInPurchaseHeader(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnBeforeCheckingDuplicateDeferralCodesInPurchaseHeader', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeCheckingDuplicateDeferralCodesInPurchaseHeader(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • SalesHeader:
  • SalesLine:
  • IsHandled:

KVSPSAOnBeforeGetReplacedSourceCodeBySetupDeferralCode(Code[10], Code[10], Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforeGetReplacedSourceCodeBySetupDeferralCode(OldSourceCode: Code[10]; var NewSourceCode: Code[10]; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnBeforeGetReplacedSourceCodeBySetupDeferralCode', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforeGetReplacedSourceCodeBySetupDeferralCode(OldSourceCode: Code[10]; var NewSourceCode: Code[10]; var IsHandled: Boolean)
begin
end;

KVSPSAOnBeforePostJobPreparedGenJournalFromGenJournal(Record Gen. Journal Line, Record Gen. Journal Line, Record G/L Entry, Record Deferral Line, Boolean, Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforePostJobPreparedGenJournalFromGenJournal(var PreparedGenJournalLine: Record "Gen. Journal Line"; SourceGenJournalLine: Record "Gen. Journal Line"; SourceGLEntry: Record "G/L Entry"; DeferralLine: Record "Deferral Line"; IsDefLine: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnBeforePostJobPreparedGenJournalFromGenJournal', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforePostJobPreparedGenJournalFromGenJournal(var PreparedGenJournalLine: Record "Gen. Journal Line"; SourceGenJournalLine: Record "Gen. Journal Line"; SourceGLEntry: Record "G/L Entry"; DeferralLine: Record "Deferral Line"; IsDefLine: Boolean; var IsHandled: Boolean)
begin
end;

KVSPSAOnBeforePostJobPreparedGenJournalFromSalesPurchDoc(Record Gen. Journal Line, Record Gen. Journal Line, Record G/L Entry, Record Deferral Posting Buffer, Boolean) :#

[IntegrationEvent(false, false)]
local procedure KVSPSAOnBeforePostJobPreparedGenJournalFromSalesPurchDoc(var PreparedGenJournalLine: Record "Gen. Journal Line"; SourceGenJournalLine: Record "Gen. Journal Line"; GLEntry: Record "G/L Entry"; DeferralPostingBuffer: Record "Deferral Posting Buffer"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAJobDeferralMgt", 'KVSPSAOnBeforePostJobPreparedGenJournalFromSalesPurchDoc', '', false, false)]
local procedure DoSomethingKVSPSAOnBeforePostJobPreparedGenJournalFromSalesPurchDoc(var PreparedGenJournalLine: Record "Gen. Journal Line"; SourceGenJournalLine: Record "Gen. Journal Line"; GLEntry: Record "G/L Entry"; DeferralPostingBuffer: Record "Deferral Posting Buffer"; var IsHandled: Boolean)
begin
end;