Skip to content

KVSADVDepositMgtSales#

Summary: This Codeunit handles all sales-specific logic to create and handle Security Deposits

Procedures#

UpsertDocumentLineForDeposit(Record Sales Header, Integer, Integer, Code[20], Decimal, Record Sales Line, Integer, Boolean) :#

procedure UpsertDocumentLineForDeposit(DocumentHeader: Record "Sales Header"; AdvanceChainNo: Integer; AdvancePlanEntryNo: Integer; DepositCode: Code[20]; DepositAmount: Decimal; var CreatedDocumentLine: Record "Sales Line"; ForceStartFromLineNo: Integer; AddAmountToExistingLine: Boolean): 

UpsertDocumentLineForDeposit(Record Sales Header, Integer, Integer, Code[20], Decimal, Record Sales Line, Integer, Boolean, Boolean, Decimal) :#

procedure UpsertDocumentLineForDeposit(DocumentHeader: Record "Sales Header"; AdvanceChainNo: Integer; AdvancePlanEntryNo: Integer; DepositCode: Code[20]; DepositAmount: Decimal; var CreatedDocumentLine: Record "Sales Line"; ForceStartFromLineNo: Integer; AddAmountToExistingLine: Boolean; FixedAmount: Boolean; DepositPercentofAmount: Decimal): 

Events#

OnAfterSaveDepositsDocumentHeader(Record KVSADVAdvancePlanDeposit, Record Sales Header) :#

[IntegrationEvent(false, false)]
local procedure OnAfterSaveDepositsDocumentHeader(var TempAdvanceDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; DocumentHeader: Record "Sales Header"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVDepositMgtSales", 'OnAfterSaveDepositsDocumentHeader', '', false, false)]
local procedure DoSomethingOnAfterSaveDepositsDocumentHeader(var TempAdvanceDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; DocumentHeader: Record "Sales Header")
begin
end;

OnAddDocumentLineForDepositBeforeModify(Record Sales Header, Record KVSADVSecurityDeposit, Record Sales Line) :#

[IntegrationEvent(false, false)]
local procedure OnAddDocumentLineForDepositBeforeModify(DocumentHeader: Record "Sales Header"; SecurityDeposit: Record "KVSADVSecurityDeposit"; var DocumentLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVDepositMgtSales", 'OnAddDocumentLineForDepositBeforeModify', '', false, false)]
local procedure DoSomethingOnAddDocumentLineForDepositBeforeModify(DocumentHeader: Record "Sales Header"; SecurityDeposit: Record "KVSADVSecurityDeposit"; var DocumentLine: Record "Sales Line")
begin
end;

OnAfterInsertDepositHeaderBeforeModify(Record Sales Header, Record Sales Invoice Header, Record Sales Invoice Line) :#

[IntegrationEvent(false, false)]
local procedure OnAfterInsertDepositHeaderBeforeModify(var DepositInvHeader: Record "Sales Header"; PostedInvHeader: Record "Sales Invoice Header"; PostedInvLine: Record "Sales Invoice Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVDepositMgtSales", 'OnAfterInsertDepositHeaderBeforeModify', '', false, false)]
local procedure DoSomethingOnAfterInsertDepositHeaderBeforeModify(var DepositInvHeader: Record "Sales Header"; PostedInvHeader: Record "Sales Invoice Header"; PostedInvLine: Record "Sales Invoice Line")
begin
end;

OnAfterCreateDepositInvoiceLineBeforeInsert(Record Sales Invoice Header, Record Sales Invoice Line, Record Sales Header, Record Sales Line) :#

Obsolete

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

[Obsolete('This event is no longer supported, please use procedure OnCreateDepositInvoiceLineForInvoiceLineOnBeforeDepositInvLineModify', '26.3')]
[IntegrationEvent(false, false)]
local procedure OnAfterCreateDepositInvoiceLineBeforeInsert(PostedInvHeader: Record "Sales Invoice Header"; PostedInvLine: Record "Sales Invoice Line"; var DepositInvHeader: Record "Sales Header"; DepositInvLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVDepositMgtSales", 'OnAfterCreateDepositInvoiceLineBeforeInsert', '', false, false)]
local procedure DoSomethingOnAfterCreateDepositInvoiceLineBeforeInsert(PostedInvHeader: Record "Sales Invoice Header"; PostedInvLine: Record "Sales Invoice Line"; var DepositInvHeader: Record "Sales Header"; DepositInvLine: Record "Sales Line")
begin
end;

OnCreateDepositInvoiceLineForInvoiceLineOnBeforeDepositInvLineModify(Record Sales Invoice Header, Record Sales Invoice Line, Record Sales Header, Record Sales Line) :#

Summary: This event is called before the Deposit Invoice Line is modified.

[IntegrationEvent(false, false)]
local procedure OnCreateDepositInvoiceLineForInvoiceLineOnBeforeDepositInvLineModify(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesInvoiceLine: Record "Sales Invoice Line"; var DepositSalesHeader: Record "Sales Header"; var DepositSalesLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVDepositMgtSales", 'OnCreateDepositInvoiceLineForInvoiceLineOnBeforeDepositInvLineModify', '', false, false)]
local procedure DoSomethingOnCreateDepositInvoiceLineForInvoiceLineOnBeforeDepositInvLineModify(SalesInvoiceHeader: Record "Sales Invoice Header"; SalesInvoiceLine: Record "Sales Invoice Line"; var DepositSalesHeader: Record "Sales Header"; var DepositSalesLine: Record "Sales Line")
begin
end;

Parameters:

  • SalesInvoiceHeader: The sales invoice header.
  • SalesInvoiceLine: The sales invoice line.
  • DepositSalesHeader: The deposit sales header.
  • DepositSalesLine: The deposit sales line.

Remarks: This event allows you to modify the deposit invoice line before it is saved.

OnAfterSetFilterForPrevExistingDepositLinesOnSaveDepositsDocumentHeader(Record Sales Header, Record KVSADVAdvancePlanDeposit, Record Sales Line) :#

[IntegrationEvent(false, false)]
local procedure OnAfterSetFilterForPrevExistingDepositLinesOnSaveDepositsDocumentHeader(DocumentHeader: Record "Sales Header"; var TempAdvanceDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; var DocumentLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVDepositMgtSales", 'OnAfterSetFilterForPrevExistingDepositLinesOnSaveDepositsDocumentHeader', '', false, false)]
local procedure DoSomethingOnAfterSetFilterForPrevExistingDepositLinesOnSaveDepositsDocumentHeader(DocumentHeader: Record "Sales Header"; var TempAdvanceDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; var DocumentLine: Record "Sales Line")
begin
end;

OnAfterSetFilterForPrevExistingDepositLineOnUpsertDocumentLineForDeposit(Record Sales Header, Integer, Integer, Code[20], Decimal, Integer, Boolean, Record Sales Line) :#

[IntegrationEvent(false, false)]
local procedure OnAfterSetFilterForPrevExistingDepositLineOnUpsertDocumentLineForDeposit(DocumentHeader: Record "Sales Header"; AdvanceChainNo: Integer; AdvancePlanEntryNo: Integer; DepositCode: Code[20]; DepositAmount: Decimal; ForceStartFromLineNo: Integer; AddAmountToExistingLine: Boolean; var DocumentLine: Record "Sales Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVDepositMgtSales", 'OnAfterSetFilterForPrevExistingDepositLineOnUpsertDocumentLineForDeposit', '', false, false)]
local procedure DoSomethingOnAfterSetFilterForPrevExistingDepositLineOnUpsertDocumentLineForDeposit(DocumentHeader: Record "Sales Header"; AdvanceChainNo: Integer; AdvancePlanEntryNo: Integer; DepositCode: Code[20]; DepositAmount: Decimal; ForceStartFromLineNo: Integer; AddAmountToExistingLine: Boolean; var DocumentLine: Record "Sales Line")
begin
end;

OnBeforeInsertDepositInvoiceHeader(Record Sales Invoice Header, Record Sales Invoice Line, Record KVSADVSecurityDeposit, Record Sales Header) :#

[IntegrationEvent(false, false)]
local procedure OnBeforeInsertDepositInvoiceHeader(PostedInvHeader: Record "Sales Invoice Header"; PostedInvLine: Record "Sales Invoice Line"; Deposit: Record "KVSADVSecurityDeposit"; var DepositInvHeader: Record "Sales Header"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSADVDepositMgtSales", 'OnBeforeInsertDepositInvoiceHeader', '', false, false)]
local procedure DoSomethingOnBeforeInsertDepositInvoiceHeader(PostedInvHeader: Record "Sales Invoice Header"; PostedInvLine: Record "Sales Invoice Line"; Deposit: Record "KVSADVSecurityDeposit"; var DepositInvHeader: Record "Sales Header")
begin
end;