codeunitSales & Receivablesofficial - Microsoftderived - from the source, no model text

Codeunit 442 "Sales-Post Prepayments"

Base Application · Microsoft.Sales.Posting

Across versions

  1. BC23present
  2. BC243 events added, 1 procedures changed
  3. BC25unchanged
  4. BC265 events added, 3 procedures added
  5. BC273 procedures added, 1 events added
  6. BC283 events added, 2 procedures added
  7. BC29-30unchanged

Neighbourhood 20 connected objects and pages

Table 36 "Sales Header" (relates to)Sales HeaderCodeunit 5579 "Digital Voucher Impl." (event subscribers, 2 links)Digital Voucher Impl.Codeunit 28 "Error Message Management" (calls, 11 links)Error Message ManagementCodeunit 443 "Sales-Post Prepayment (Yes/No)" (calls, 6 links)Sales-Post Prepayment (Yes/No)Page 402 "Sales Order Statistics" (calls, 5 links)Sales Order StatisticsCodeunit 12 "Gen. Jnl.-Post Line" (calls, 3 links)Gen. Jnl.-Post LineCodeunit 408 "DimensionManagement" (calls, 2 links)DimensionManagementCodeunit 441 "Prepayment Mgt." (calls, 2 links)Prepayment Mgt.Codeunit 815 "Sales Post Invoice" (calls, 2 links)Sales Post InvoiceCodeunit 8703 "Feature Telemetry" (calls, 2 links)Feature TelemetryPage 456 "No. Series" (calls, 2 links)No. SeriesCodeunit 11 "Gen. Jnl.-Check Line" (calls)Gen. Jnl.-Check LineCodeunit 1431 "Forward Link Mgt." (calls)Codeunit 19 "Gen. Jnl.-Post Preview" (calls)Gen. Jnl.-Post PreviewCodeunit 378 "Transfer Extended Text" (calls)Transfer Extended TextCodeunit 481 "Check Dimensions" (calls)Codeunit 57 "Document Totals" (calls)Codeunit 9070 "Document Errors Mgt." (calls)Codeunit 9500 "Sequence No. Mgt." (calls)Table 37 "Sales Line" (calls)

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

Base Application · Microsoft.Sales.Posting · BC23-30 · source at ea08af5e · facts from BC29

Properties

Property Value
TableNo Sales Header
Permissions TableData “Sales Line” = rimd, TableData “Sales Invoice Header” = rimd, TableData “Sales Invoice Line” = rimd, TableData “Sales Cr.Memo Header” = rimd, TableData “Sales Cr.Memo Line” = rimd, TableData “General Posting Setup” = rimd

Events published

  • OnAfterApplyFilter(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; DocumentType: Option) (integration): Raised after applying filters on sales lines for prepayment processing.
  • OnAfterBuildInvLineBuffer(var PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer") (integration): Raised after building the prepayment invoice line buffer.
  • OnAfterCalcVATAmountLines(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; DocumentType: Option Invoice,"Credit Memo",Statistic; Currency: Record Currency) (integration): Raised after calculating VAT amount lines for prepayments.
  • OnAfterCheckPrepmtDoc(SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo"; CommitIsSuppressed: Boolean; var ErrorMessageMgt: Codeunit "Error Message Management") (integration): Raised after checking the prepayment document for posting readiness.
  • OnAfterCreateDimensions(var SalesLine: Record "Sales Line"; DefaultDimSource: List of [Dictionary of [Integer, Code[20]]]) (integration): Raised after creating dimensions for prepayment lines.
  • OnAfterCreateLinesOnBeforeGLPosting(var SalesHeader: Record "Sales Header"; SalesInvHeader: Record "Sales Invoice Header"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary; DocumentType: Option; var LastLineNo: Integer) (integration): Raised after creating prepayment lines and before posting to the general ledger.
  • OnAfterFillInvLineBuffer(var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; SalesLine: Record "Sales Line"; CommitIsSuppressed: Boolean; SalesHeader: Record "Sales Header") (integration): Raised after filling the prepayment invoice line buffer from a sales line.
  • OnAfterInsertInvoiceRounding(SalesHeader: Record "Sales Header"; var PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; var PrevLineNo: Integer) (integration): Raised after inserting the invoice rounding line for prepayments.
  • OnAfterPostPrepayments(var SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo"; CommitIsSuppressed: Boolean; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var CustLedgerEntry: Record "Cust. Ledger Entry") (integration): Raised after posting prepayments.
  • OnAfterPostPrepaymentsOnBeforeThrowPreviewModeError(var SalesHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; PreviewMode: Boolean) (integration): Raised after posting prepayments before throwing a preview mode error.
  • OnAfterPostBalancingEntry(var GenJnlLine: Record "Gen. Journal Line"; CustLedgEntry: Record "Cust. Ledger Entry"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean; SalesHeader: Record "Sales Header") (integration): Raised after posting the balancing entry for prepayments.
  • OnAfterPostCustomerEntry(var GenJnlLine: Record "Gen. Journal Line"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean) (integration): Raised after posting the customer entry for prepayments.
  • OnAfterPostPrepmtInvLineBuffer(var GenJnlLine: Record "Gen. Journal Line"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line") (integration): Raised after posting a prepayment invoice line buffer entry.
  • OnAfterRoundAmounts(SalesHeader: Record "Sales Header"; var PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBufLCY: Record "Prepayment Inv. Line Buffer") (integration): Raised after rounding prepayment amounts.
  • OnAfterSalesInvHeaderInsert(var SalesInvoiceHeader: Record "Sales Invoice Header"; SalesHeader: Record "Sales Header"; CommitIsSuppressed: Boolean) (integration): Raised after inserting a prepayment sales invoice header.
  • OnAfterSalesInvLineInsert(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean) (integration): Raised after inserting a prepayment sales invoice line.
  • OnAfterSalesCrMemoHeaderInsert(var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; CommitIsSuppressed: Boolean) (integration): Raised after inserting a prepayment sales credit memo header.
  • OnAfterSalesCrMemoLineInsert(var SalesCrMemoLine: Record "Sales Cr.Memo Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean) (integration): Raised after inserting a prepayment sales credit memo line.
  • OnAfterUpdatePostedSalesDocument(DocumentType: Option Invoice,"Credit Memo"; DocumentNo: Code[20]; CommitIsSuppressed: Boolean) (integration): Raised after updating the posted sales document with prepayment information.
  • OnAfterUpdateVATOnLines(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; DocumentType: Option Invoice,"Credit Memo",Statistic) (integration): Raised after updating VAT on lines for prepayments.
  • OnBeforeCheckPrepmtDoc(SalesHeader: Record "Sales Header"; DocumentType: Option; CommitIsSuppressed: Boolean) (integration): Raised before checking the prepayment document for posting readiness.
  • OnBeforeCheckOpenPrepaymentLines(SalesHeader: Record "Sales Header"; DocumentType: Option; var Found: Boolean; var IsHandled: Boolean) (integration): Raised before checking for open prepayment lines.
  • OnBeforeCreateLinesFromBuffer(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempGlobalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer" temporary; var LineCount: Integer; var SalesInvHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var PostedDocTabNo: Integer; DocumentType: Option; var LastLineNo: Integer; GenJnlLineDocNo: Code[20]; var IsHandled: Boolean) (integration): Raised before creating lines from the prepayment buffer.
  • OnBeforeInvoice(var SalesHeader: Record "Sales Header"; var Handled: Boolean) (integration): Raised before posting a prepayment invoice.
  • OnBeforeCreditMemo(var SalesHeader: Record "Sales Header"; var Handled: Boolean) (integration): Raised before posting a prepayment credit memo.
  • OnBeforeFillInvLineBuffer(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line") (integration): Raised before filling the prepayment invoice line buffer.
  • OnBeforeInsertExtendedText(TabNo: Integer; DocNo: Code[20]; GLAccNo: Code[20]; DocDate: Date; LanguageCode: Code[10]; var PrevLineNo: Integer) (integration): Raised before inserting extended text for prepayment lines.
  • OnBeforePostPrepayments(var SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo"; CommitIsSuppressed: Boolean; PreviewMode: Boolean) (integration): Raised before posting prepayments.
  • OnBeforeSalesInvHeaderInsert(var SalesInvHeader: Record "Sales Invoice Header"; SalesHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; GenJnlDocNo: Code[20]) (integration): Raised before inserting the prepayment sales invoice header.
  • OnBeforeSalesAssertPrepmtAmountNotMoreThanDocAmount(var CustLedgEntry: Record "Cust. Ledger Entry"; SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var IsHandled: Boolean) (integration): Raised before asserting that the prepayment amount is not more than the document amount.
  • OnBeforeSalesInvLineInsert(var SalesInvLine: Record "Sales Invoice Line"; SalesInvHeader: Record "Sales Invoice Header"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean) (integration): Raised before inserting a prepayment sales invoice line.
  • OnBeforeSalesCrMemoHeaderInsert(var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; SalesHeader: Record "Sales Header"; CommitIsSuppressed: Boolean) (integration): Raised before inserting the prepayment sales credit memo header.
  • OnBeforeSalesCrMemoLineInsert(var SalesCrMemoLine: Record "Sales Cr.Memo Line"; SalesCrMemoHeader: Record "Sales Cr.Memo Header"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean) (integration): Raised before inserting a prepayment sales credit memo line.
  • OnBeforePostCustomerEntry(var GenJnlLine: Record "Gen. Journal Line"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean; SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo") (integration): Raised before posting the customer entry for the prepayment.
  • OnBeforeRunGenJnlPostLine(var GenJnlLine: Record "Gen. Journal Line") (integration): Raised before running the general journal post line codeunit.
  • OnBeforeUpdateSalesDocument(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; DocumentType: Option; GenJnlLineDocNo: Code[20]) (integration): Raised before updating the sales document after prepayment posting.
  • OnBeforeUpdateDocNos(var SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo"; var DocNo: Code[20]; var NoSeriesCode: Code[20]; var ModifyHeader: Boolean; IsPreviewMode: Boolean; var IsHandled: Boolean) (integration): Raised before updating document numbers for prepayment posting.
  • OnBeforeUpdatePostedSalesDocument(var CustLedgerEntry: Record "Cust. Ledger Entry"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; DocumentType: Option Invoice,"Credit Memo"; var IsHandled: Boolean; DocumentNo: Code[20]) (integration): Raised before updating the posted sales document with the customer ledger entry number.
  • OnBeforePostPrepmtInvLineBuffer(var GenJnlLine: Record "Gen. Journal Line"; PrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean) (integration): Raised before posting the prepayment invoice line buffer to the general journal.
  • OnCalcVATAmountLinesOnBeforeUpdateLines(var NewAmount: Decimal; Currency: Record Currency; SalesHeader: Record "Sales Header"; var IsHandled: Boolean) (integration): Raised during VAT amount lines calculation before updating lines.
  • OnCodeOnAfterBuildInvLineBuffer(var TempVATAmountLine: Record "VAT Amount Line" temporary; var TempPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary) (integration): Raised after building the prepayment invoice line buffer in the Code procedure.
  • OnCodeOnBeforeCalcAndUpdateVATAmountLines(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary; DocumentType: Option; var IsHandled: Boolean) (integration): Raised before calculating and updating VAT amount lines in the Code procedure.
  • OnCodeOnBeforePostCustomerEntry(var SalesHeader: Record "Sales Header"; var TempPrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary) (integration): Raised before posting the customer entry in the Code procedure.
  • OnCodeOnBeforePostBalancingEntry(var SalesHeader: Record "Sales Header"; var TempPrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary) (integration): Raised before posting the balancing entry in the Code procedure.
  • OnCodeOnBeforeWindowOpen(var SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo") (integration): Raised before opening the progress window in the Code procedure.
  • OnCodeOnAfterCalcShouldSetPendingPrepaymentStatus(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; DocumentType: Option Invoice,"Credit Memo"; PreviewMode: Boolean; var ShouldSetPendingPrepaymentStatus: Boolean) (integration): Raised after calculating whether to set pending prepayment status in the Code procedure.
  • OnInsertExtendedTextOnBeforeSalesInvLineInsert(var SalesInvoiceLine: Record "Sales Invoice Line"; TabNo: Integer; DocNo: Code[20]; NextLineNo: Integer; var TempExtendedTextLine: Record "Extended Text Line" temporary; SalesHeader: Record "Sales Header") (integration): Raised before inserting a sales invoice line during extended text insertion.
  • OnInsertExtendedTextOnBeforeSalesCrMemoLineInsert(var SalesCrMemoLine: Record "Sales Cr.Memo Line"; TabNo: Integer; DocNo: Code[20]; NextLineNo: Integer; var TempExtendedTextLine: Record "Extended Text Line" temporary; SalesHeader: Record "Sales Header") (integration): Raised before inserting a sales credit memo line during extended text insertion.
  • OnPostBalancingEntryOnBeforeGenJnlPostLineRunWithCheck(var GenJnlLine: Record "Gen. Journal Line"; CustLedgEntry: Record "Cust. Ledger Entry"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer"; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; CommitIsSuppressed: Boolean; SalesHeader: Record "Sales Header"; DocType: enum "Gen. Journal Document Type") (integration): Raised before running the general journal post line with check during balancing entry posting.
  • OnRoundAmountsOnBeforeIncrAmounts(SalesHeader: Record "Sales Header"; var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; var TotalPrepmtInvLineBufLCY: Record "Prepayment Inv. Line Buffer") (integration): Raised before incrementing amounts during the rounding process.
  • OnUpdateSalesDocumentOnBeforeFindSetCreditMemoSalesLine(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") + BC28 (integration): Raised before finding the credit memo sales lines during prepayment document update.
  • OnUpdateSalesDocumentOnBeforeModifyCreditMemoSalesLine(var SalesLine: Record "Sales Line") (integration): Raised before modifying the sales line during credit memo prepayment document update.
  • OnUpdateSalesDocumentOnBeforeModifyInvoiceSalesLine(var SalesLine: Record "Sales Line") (integration): Raised before modifying the sales line during invoice prepayment document update.
  • OnUpdateVATOnLinesOnAfterGetRemainder(var VATAmountLineRemainder: Record "VAT Amount Line"; var RemainderExists: Boolean) (integration): Raised after getting the remainder during VAT update on lines.
  • OnUpdateVATOnLinesOnAfterVATAmountLineGet(var VATAmountLine: Record "VAT Amount Line") (integration): Raised after getting the VAT amount line during VAT update on lines.
  • OnUpdateVATOnLinesOnBeforeSalesLineModify(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line"; NewAmount: Decimal; NewAmountIncludingVAT: Decimal; NewVATBaseAmount: Decimal) (integration): Raised before modifying the sales line during VAT update on lines.
  • OnBeforeThrowPreviewError(SalesHeader: Record "Sales Header") (integration): Raised before throwing a preview error.
  • OnBeforeCheckSalesLineIsNegative(SalesLine: Record "Sales Line"; var IsHandled: Boolean) (integration): Raised before checking if the sales line is negative.
  • OnBeforeGetSalesLines(SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo",Statistic; var ToSalesLine: Record "Sales Line"; var IsHandled: Boolean) (integration): Raised before getting sales lines for prepayment processing.
  • OnBeforeUpdatePrepmtAmountOnSaleslines(SalesHeader: Record "Sales Header"; NewTotalPrepmtAmount: Decimal; var IsHandled: Boolean) (integration): Raised before updating prepayment amounts on sales lines.
  • OnUpdatePrepmtAmountOnSaleslinesOnAfterSetFilters(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var NewTotalPrepmtAmount: Decimal) + BC28 (integration): Raised after setting filters on sales lines when updating prepayment amounts.
  • OnUpdatePrepmtAmountOnSaleslinesOnBeforeModify(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var NewTotalPrepmtAmount: Decimal; var TotalPrepmtAmount: Decimal) + BC28 (integration): Raised before modifying a sales line with its updated prepayment amount.
  • OnGetSalesLinesOnBeforeInsertToSalesLine(var ToSalesLine: Record "Sales Line") (integration): Raised before inserting to the sales line in the GetSalesLines procedure.
  • OnCodeOnBeforeInsertPostedHeaders(var SalesHeader: Record "Sales Header") (integration): Raised before inserting posted headers in the Code procedure.
  • OnAfterUpdateDocNos(var SalesHeader: Record "Sales Header") (integration): Raised after updating document numbers for prepayment posting.
  • OnBuildInvLineBufferOnBeforeFillInvLineBuffer(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line") (integration): Raised before filling the invoice line buffer in the BuildInvLineBuffer procedure.
  • OnCodeOnAfterPostingDescriptionSet(var SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo"; var PostingDescription: Text[100]) + BC24 − BC24 (integration): Raised after setting the posting description in the Code procedure.
  • OnBeforePostCustomerEntryProcedure(var SalesHeader: Record "Sales Header"; TotalPrepmtInvLineBuffer: Record "Prepayment Inv. Line Buffer" temporary; TotalPrepmtInvLineBufferLCY: Record "Prepayment Inv. Line Buffer"; DocumentType: Option Invoice,"Credit Memo"; PostingDescription: Text[100]; DocType: Enum "Gen. Journal Document Type"; DocNo: Code[20]; ExtDocNo: Text[35]; SrcCode: Code[10]; PostingNoSeriesCode: Code[20]; CalcPmtDisc: Boolean; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; var IsHandled: Boolean) + BC24 (integration): Raised before the PostCustomerEntry procedure.
  • OnBeforePrepmtAmount(var SalesLine: Record "Sales Line"; DocumentType: Option Invoice,"Credit Memo",Statistic; var Result: Decimal; var IsHandled: Boolean) + BC24 (integration): Raised before calculating the prepayment amount.
  • OnInsertVATAmountOnBeforeInsert(var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line") + BC26 (integration): Raised before inserting a VAT amount line in the InsertVATAmount procedure.
  • OnFindVATAmountLineOnAfterSetFilters(var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line") + BC26 (integration): Raised after setting filters in the FindVATAmountLine procedure.
  • OnCodeOnBeforeCheckPrepmtDoc(var SalesHeader: Record "Sales Header"; var DocumentType: Option Invoice,"Credit Memo") + BC26 (integration): Raised before checking the prepayment document in the Code procedure.
  • OnAfterGetPrepmtAccNo(GenPostingSetup: Record "General Posting Setup"; var PrepmtAccNo: Code[20]) + BC26 (integration): Raised after getting the prepayment account number from the general posting setup.
  • OnAfterGetCorrBalAccNo(SalesHeader: Record "Sales Header"; PositiveAmount: Boolean; var BalAccNo: Code[20]) + BC26 (integration): Raised after getting the correction balancing account number.
  • OnCodeOnAfterSetSourceCode(var SalesHeader: Record "Sales Header"; SourceCodeSetup: Record "Source Code Setup"; var SrcCode: Code[10]) + BC27 (integration): Raised after setting the source code in the Code procedure.

Procedures

  • SetDocumentType(DocumentType: Option ,,Invoice,"Credit Memo"): Sets the prepayment document type to be posted.
  • Invoice(var SalesHeader: Record "Sales Header"): Posts a prepayment invoice for the sales order.
  • CreditMemo(var SalesHeader: Record "Sales Header"): Posts a prepayment credit memo for the sales order.
  • CheckPrepmtDoc(SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo"): Validates the sales order and prepayment settings before posting a prepayment document.
  • CheckOpenPrepaymentLines(SalesHeader: Record "Sales Header"; DocumentType: Option): Boolean: Checks if there are open prepayment lines available for posting.
  • BuildInvLineBuffer(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; DocumentType: Option Invoice,"Credit Memo",Statistic; var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"): Builds the prepayment invoice line buffer from the sales lines for posting.
  • GetCorrBalAccNo(SalesHeader: Record "Sales Header"; PositiveAmount: Boolean): Code[20]: Gets the correction balancing account number for prepayment adjustments.
  • GetInvRoundingAccNo(CustomerPostingGroup: Code[20]): Code[20]: Gets the invoice rounding account number from the customer posting group.
  • FillInvLineBuffer(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"): Fills the prepayment invoice line buffer with data from a sales line.
  • InitInvoiceRoundingLine(SalesHeader: Record "Sales Header"; TotalAmount: Decimal; var SalesLine: Record "Sales Line"): Boolean: Initializes an invoice rounding line for the prepayment if rounding is required.
  • UpdateVATOnLines(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; DocumentType: Option Invoice,"Credit Memo",Statistic): Updates the VAT amounts on sales lines based on the VAT amount lines for prepayment documents.
  • CalcVATAmountLines(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; DocumentType: Option Invoice,"Credit Memo",Statistic): Calculates the VAT amount lines for prepayment documents.
  • SumPrepmt(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var VATAmountLine: Record "VAT Amount Line"; var TotalAmount: Decimal; var TotalVATAmount: Decimal; var VATAmountText: Text[30]): Calculates the total prepayment amount and VAT amount for statistics.
  • GetSalesLines(SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo",Statistic; var ToSalesLine: Record "Sales Line"): Gets the sales lines with prepayment amounts for the specified document type.
  • ApplyFilter(SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo",Statistic; var SalesLine: Record "Sales Line"): Applies filters to the sales lines for prepayment processing based on document type.
  • PrepmtAmount(SalesLine: Record "Sales Line"; DocumentType: Option Invoice,"Credit Memo",Statistic): Decimal: Calculates the prepayment amount for the sales line based on the document type.
  • UpdatePrepmtAmountOnSaleslines(SalesHeader: Record "Sales Header"; NewTotalPrepmtAmount: Decimal): Distributes the new total prepayment amount across the sales lines proportionally.
  • PrepmtDocTypeToDocType(DocumentType: Option Invoice,"Credit Memo"): Integer Δ BC24: Converts the prepayment document type to the corresponding sales document type integer value.
  • GetSalesLinesToDeduct(SalesHeader: Record "Sales Header"; var SalesLines: Record "Sales Line"): Gets the sales lines that have prepayment amounts to deduct during final invoicing.
  • GetPreviewMode(): Boolean: Gets whether the prepayment posting is running in preview mode.
  • GetSuppressCommit(): Boolean: Gets whether database commits are being suppressed during prepayment posting.
  • SetSuppressCommit(NewSuppressCommit: Boolean): Sets whether database commits should be suppressed during prepayment posting.
  • SetPreviewMode(NewPreviewMode: Boolean): Sets whether the prepayment posting is running in preview mode.

Plus 44 local procedures.

Triggers

OnRun

Relations

Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.

Called by

Recent changes

Countries that replace it

AU, CA, FI, IT, MX, NZ, US

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Sales-Post Prepayments"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources