Codeunit 66 "Purch - Calc Disc. By Type"
Base Application · Microsoft.Purchases.Document
Across versions
- BC23-30present
Neighbourhood 27 connected objects and pages
Base Application · Microsoft.Purchases.Document · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| TableNo | Purchase Line |
Events published
OnAfterInvoiceDiscIsAllowed(InvDiscCode: Code[20]; var Result: Boolean)(integration)OnAfterResetRecalculateInvoiceDisc(var PurchaseHeader: Record "Purchase Header")(integration)- subscribers: Codeunit 5497 “Graph Mgt - Purch Order Buffer” OnAfterResetRecalculateInvoiceDisc, Codeunit 5511 “Graph Mgt - Purch. Cr. Memo” OnAfterResetRecalculateCreditMemoDisc, Codeunit 5529 “Purch. Inv. Aggregator” OnAfterResetRecalculateInvoiceDisc
OnBeforeApplyDefaultInvoiceDiscount(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean; InvoiceDiscountAmount: Decimal)(integration)OnBeforeShouldRedistributeInvoiceDiscountAmount(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)(integration)OnResetRecalculateInvoiceDiscOnAfterSetLoadFields(var PurchaseLine: Record "Purchase Line")(integration)
Procedures
ApplyDefaultInvoiceDiscount(InvoiceDiscountAmount: Decimal; var PurchHeader: Record "Purchase Header")ApplyInvDiscBasedOnAmt(InvoiceDiscountAmount: Decimal; var PurchHeader: Record "Purchase Header")GetVendInvoiceDiscountPct(PurchLine: Record "Purchase Line"): DecimalShouldRedistributeInvoiceDiscountAmount(PurchHeader: Record "Purchase Header"): BooleanResetRecalculateInvoiceDisc(PurchHeader: Record "Purchase Header")InvoiceDiscIsAllowed(InvDiscCode: Code[20]): Boolean
Plus 3 local procedures.
Triggers
OnRun
Relations
- runs on Table 39 “Purchase Line”
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.
- Codeunit 65 “Discount Notification Mgt.” (1 call:
ApplyInvDiscBasedOnAmt → NotifyAboutMissingSetup) - Codeunit 70 “Purch.-Calc.Discount” (1 call:
ApplyInvDiscBasedOnPct → (object)) - Codeunit 9179 “Application Area Mgmt. Facade” (1 call:
ShouldRedistributeInvoiceDiscountAmount → IsFoundationEnabled)
Called by
- Codeunit 57 “Document Totals” (3 calls:
PurchaseRedistributeInvoiceDiscountAmounts → (object),PurchaseUpdateTotalsControlsForceable → InvoiceDiscIsAllowed,PurchaseUpdateTotalsControlsForceable → ShouldRedistributeInvoiceDiscountAmount) - Codeunit 1218 “Map Incoming Doc to Purch Doc” (2 calls:
ApplyInvoiceDiscounts → ApplyInvDiscBasedOnAmt,ApplyInvoiceDiscounts → InvoiceDiscIsAllowed) - Codeunit 96 “Purch.-Quote to Order” (2 calls:
OnRun → ResetRecalculateInvoiceDisc,OnRun → ShouldRedistributeInvoiceDiscountAmount) - Codeunit 97 “Blanket Purch. Order to Order” (2 calls:
OnRun → ResetRecalculateInvoiceDisc,OnRun → ShouldRedistributeInvoiceDiscountAmount) - Codeunit 5497 “Graph Mgt - Purch Order Buffer” (1 call:
RedistributeInvoiceDiscounts → (object)) - Codeunit 5511 “Graph Mgt - Purch. Cr. Memo” (1 call:
RedistributeCreditMemoDiscounts → (object)) - Codeunit 5529 “Purch. Inv. Aggregator” (1 call:
RedistributeInvoiceDiscounts → (object)) - Codeunit 70 “Purch.-Calc.Discount” (1 call:
CalculateInvoiceDiscount → ResetRecalculateInvoiceDisc) - Codeunit 99000813 “Carry Out Action” (1 call:
PrintMultiplePurchaseOrders → ApplyDefaultInvoiceDiscount) - Page 161 “Purchase Statistics” (1 call:
OnClosePage → ResetRecalculateInvoiceDisc) - Page 20042 “APIV1 - Purchase Invoices” (1 call:
UpdateDiscount → ApplyInvDiscBasedOnAmt) - Page 30042 “APIV2 - Purchase Invoices” (1 call:
UpdateDiscount → ApplyInvDiscBasedOnAmt) - Page 30066 “APIV2 - Purchase Orders” (1 call:
UpdateDiscount → ApplyInvDiscBasedOnAmt) - Page 30083 “APIV2 - Purchase Credit Memos” (1 call:
UpdateDiscount → ApplyInvDiscBasedOnAmt) - Page 403 “Purchase Order Statistics” (1 call:
OnClosePage → ResetRecalculateInvoiceDisc) - Page 510 “Blanket Purchase Order Subform” (1 call:
ValidateInvoiceDiscountAmount → ApplyInvDiscBasedOnAmt) - Page 54 “Purchase Order Subform” (1 call:
ValidateInvoiceDiscountAmount → ApplyInvDiscBasedOnAmt) - Page 55 “Purch. Invoice Subform” (1 call:
ValidateInvoiceDiscountAmount → ApplyInvDiscBasedOnAmt) - Page 6641 “Purchase Return Order Subform” (1 call:
ValidateInvoiceDiscountAmount → ApplyInvDiscBasedOnAmt) - Page 97 “Purchase Quote Subform” (1 call:
ValidateInvoiceDiscountAmount → ApplyInvDiscBasedOnAmt) - Page 98 “Purch. Cr. Memo Subform” (1 call:
ValidateInvoiceDiscountAmount → ApplyInvDiscBasedOnAmt)
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: "Purch - Calc Disc. By Type"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.