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

Codeunit 66 "Purch - Calc Disc. By Type"

Base Application · Microsoft.Purchases.Document

Across versions

  1. BC23-30present

Neighbourhood 27 connected objects and pages

Table 39 "Purchase Line" (relates to)Purchase LineCodeunit 5497 "Graph Mgt - Purch Order Buffer" (event subscribers)Graph Mgt - Purch Order BufferCodeunit 5511 "Graph Mgt - Purch. Cr. Memo" (event subscribers)Graph Mgt - Purch. Cr. MemoCodeunit 5529 "Purch. Inv. Aggregator" (event subscribers)Purch. Inv. AggregatorCodeunit 57 "Document Totals" (calls, 3 links)Document TotalsCodeunit 1218 "Map Incoming Doc to Purch Doc" (calls, 2 links)Map Incoming Doc to Purch DocCodeunit 70 "Purch.-Calc.Discount" (calls, 2 links)Purch.-Calc.DiscountCodeunit 96 "Purch.-Quote to Order" (calls, 2 links)Purch.-Quote to OrderCodeunit 97 "Blanket Purch. Order to Order" (calls, 2 links)Blanket Purch. Order to OrderCodeunit 5497 "Graph Mgt - Purch Order Buffer" (calls)Codeunit 5511 "Graph Mgt - Purch. Cr. Memo" (calls)Graph Mgt - Purch. Cr. MemoCodeunit 5529 "Purch. Inv. Aggregator" (calls)Purch. Inv. AggregatorCodeunit 65 "Discount Notification Mgt." (calls)Discount Notification Mgt.Codeunit 9179 "Application Area Mgmt. Facade" (calls)Application Area Mgmt. FacadeCodeunit 99000813 "Carry Out Action" (calls)Carry Out ActionPage 161 "Purchase Statistics" (calls)Page 20042 "APIV1 - Purchase Invoices" (calls)Page 30042 "APIV2 - Purchase Invoices" (calls)Page 30066 "APIV2 - Purchase Orders" (calls)Page 30083 "APIV2 - Purchase Credit Memos" (calls)Page 403 "Purchase Order Statistics" (calls)Page 510 "Blanket Purchase Order Subform" (calls)Page 54 "Purchase Order Subform" (calls)Page 55 "Purch. Invoice Subform" (calls)Page 6641 "Purchase Return Order Subform" (calls)Page 97 "Purchase Quote Subform" (calls)Page 98 "Purch. Cr. Memo Subform" (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.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)
  • 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"): Decimal
  • ShouldRedistributeInvoiceDiscountAmount(PurchHeader: Record "Purchase Header"): Boolean
  • ResetRecalculateInvoiceDisc(PurchHeader: Record "Purchase Header")
  • InvoiceDiscIsAllowed(InvDiscCode: Code[20]): Boolean

Plus 3 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

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.

Evidence 1 sources