codeunitPurchasing & Payablesofficial - Microsoftderived - from the source, no model text

Codeunit 1313 "Correct Posted Purch. Invoice"

Base Application · Microsoft.Purchases.History

Across versions

  1. BC23present
  2. BC244 events added, 2 procedures added
  3. BC25declaration changed
  4. BC267 procedures added
  5. BC271 events added
  6. BC283 procedures added, 1 events removed
  7. BC29-30unchanged

Neighbourhood 19 connected objects and pages

Table 122 "Purch. Inv. Header" (relates to)Purch. Inv. HeaderCodeunit 20535 "Subc. Purch. Post Ext" (event subscribers)Subc. Purch. Post ExtCodeunit 5579 "Digital Voucher Impl." (event subscribers)Digital Voucher Impl.Codeunit 8074 "Document Change Management" (event subscribers)Document Change ManagementCodeunit 408 "DimensionManagement" (calls, 5 links)DimensionManagementCodeunit 1324 "Correct PstdPurchInv (Yes/No)" (calls, 4 links)Correct PstdPurchInv (Yes/No)Codeunit 6620 "Copy Document Mgt." (calls, 3 links)Copy Document Mgt.Codeunit 1325 "Cancel PstdPurchInv (Yes/No)" (calls, 2 links)Codeunit 22 "Item Jnl.-Post Line" (calls, 2 links)Item Jnl.-Post LineCodeunit 5817 "Undo Posting Management" (calls, 2 links)Undo Posting ManagementPage 456 "No. Series" (calls, 2 links)No. SeriesPage 52 "Purchase Credit Memo" (calls, 2 links)Purchase Credit MemoCodeunit 11 "Gen. Jnl.-Check Line" (calls)Codeunit 1511 "Notification Lifecycle Mgt." (calls)Notification Lifecycle Mgt.Codeunit 5805 "Item Charge Assgnt. (Purch.)" (calls)Item Charge Assgnt. (Purch.)Codeunit 90 "Purch.-Post" (calls)Purch.-PostPage 140 "Posted Purchase Credit Memo" (calls)Page 62 "Applied Vendor Entries" (calls)Table 38 "Purchase Header" (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.Purchases.History · BC23-30 · source at ea08af5e · facts from BC29

Properties

Property Value
TableNo Purch. Inv. Header
Permissions TableData “Purch. Inv. Header” = rm, TableData “Purch. Cr. Memo Hdr.” = rm

Events published

  • OnAfterCreateCorrectivePurchCrMemo(PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; var CancellingOnly: Boolean; var SuppressCommit: Boolean) + BC24 − BC24 (integration)
  • OnAfterTestCorrectInvoiceIsAllowed(var PurchInvHeader: Record "Purch. Inv. Header"; Cancelling: Boolean) (integration)
  • OnBeforeCreateCopyDocument(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"; DocumentType: Enum "Purchase Document Type"; SkipCopyFromDescription: Boolean) (integration)
  • OnBeforeTestIfInvoiceIsPaid(var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) (integration)
  • OnBeforeTestIfAnyFreeNumberSeries(var PurchInvHeader: Record "Purch. Inv. Header"; CancellingOnly: Boolean; var IsHandled: Boolean) (integration)
  • OnBeforePurchaseHeaderInsert(var PurchaseHeader: Record "Purchase Header"; PurchInvHeader: Record "Purch. Inv. Header") (integration)
  • OnBeforeUnAppyCostApplication(InvNo: Code[20]; var IsHandled: Boolean) (integration)
  • OnBeforeUpdatePurchaseOrderLineInvoicedQuantity(var PurchaseLine: Record "Purchase Line"; CancelledQuantity: Decimal; CancelledQtyBase: Decimal; var IsHandled: Boolean) (integration)
  • OnBeforeTestInventoryPostingSetup(PurchInvLine: Record "Purch. Inv. Line"; var IsHandled: Boolean) (integration)
  • OnHasLineDiscountSetup(PurchasesPayablesSetup: Record "Purchases & Payables Setup"; var Result: Boolean) (integration)
  • OnRunOnAfterUpdatePurchaseOrderLinesFromCancelledInvoice(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header") (integration)
  • OnRunOnBeforeCreateCopyDocument(var PurchInvHeader: Record "Purch. Inv. Header") (integration)
  • OnTestPurchaseLinesOnAfterCalcThrowItemReturnedError(PurchInvHeader: Record "Purch. Inv. Header"; PurchInvLine: Record "Purch. Inv. Line"; var ThrowItemReturnedError: Boolean) (integration)
  • OnAfterIsCheckDirectCostAppliedAccount(PurchInvLine: Record "Purch. Inv. Line"; var Result: Boolean) (integration)
  • OnAfterCreateCopyDocument(var PurchaseHeader: Record "Purchase Header"; SkipCopyFromDescription: Boolean; PurchInvHeader: Record "Purch. Inv. Header") (integration)
  • OnBeforeShowPostedPurchCreditMemo(var PurchCrMemoHdr: Record "Purch. Cr. Memo Hdr."; var IsHandled: Boolean) (integration)
  • OnBeforeShowPurchaseCreditMemo(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) (integration)
  • OnCreateCreditMemoOnBeforeConfirmPostingCreditMemoFailedOpen(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean) (integration)
  • OnCancelPostedInvoiceStartNewInvoiceOnAfterCreateCorrPurchaseInvoice(var PurchaseHeader: Record "Purchase Header"; var PurchInvHeader: Record "Purch. Inv. Header") + BC24 (integration)
  • OnAfterIsCommentLine(PurchInvLine: Record "Purch. Inv. Line"; var Result: Boolean) + BC24 (integration)
  • OnBeforeSetTrackInfoForCancellation(var PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean) + BC24 (integration)
  • OnBeforeTestVATPostingSetup(PurchInvLine: Record "Purch. Inv. Line"; var IsHandled: Boolean) + BC27 (integration)

Procedures

  • CancelPostedInvoice(var PurchInvHeader: Record "Purch. Inv. Header"): Boolean
  • CreateCreditMemoCopyDocument(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header"): Boolean
  • CreateCorrectiveCreditMemo(var InvoiceNotification: Notification)
  • ShowAppliedEntries(var InvoiceNotification: Notification)
  • SkipCorrectiveCreditMemo(var InvoiceNotification: Notification)
  • CancelPostedInvoiceStartNewInvoice(var PurchInvHeader: Record "Purch. Inv. Header"; var PurchaseHeader: Record "Purchase Header")
  • TestCorrectInvoiceIsAllowed(var PurchInvHeader: Record "Purch. Inv. Header"; Cancelling: Boolean)
  • FindItemLedgEntries(var ItemLedgEntry: Record "Item Ledger Entry"; InvNo: Code[20])
  • ErrorHelperHeader(HeaderErrorType: Enum "Correct Purch. Inv. Error Type"; PurchInvHeader: Record "Purch. Inv. Header")
  • UpdatePurchaseOrderLineIfExist(PurchaseCreditMemoNo: Code[20]) + BC26 (internal)

Plus 43 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, IT, NZ

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: "Correct Posted Purch. Invoice"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources