Codeunit 18004266 EOS037 Purch. Handler
Codeunit 18004266 EOS037 Purch. Handler
Events
OnAfterGetBaseAmount
local procedure OnAfterGetBaseAmount(PurchLine: Record "Purchase Line"; QtyToHandle: Decimal; var BaseAmount: Decimal; var Handled: Boolean)
Parameters / Return Value
PurchLine
Record "Purchase Line"
QtyToHandle
Decimal
BaseAmount
Decimal
Handled
Boolean
OnBeforeCalcTotalDiscountPercentage
local procedure OnBeforeCalcTotalDiscountPercentage(var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
Fired before calculating Line Discount Amount and Line Discount %.
Parameters / Return Value
PurchaseLine
Record "Purchase Line"
Current record.
xPurchaseLine
Record "Purchase Line"
Previous version of the current record.
IsHandled
Boolean
Set to true to skip the business logic.
OnAfterCalcTotalDiscountPercentage
local procedure OnAfterCalcTotalDiscountPercentage(var PurchaseLine: Record "Purchase Line"; xPurchaseLine: Record "Purchase Line")
Fired after calculating Line Discount Amount and Line Discount %.
Parameters / Return Value
PurchaseLine
Record "Purchase Line"
Current record.
xPurchaseLine
Record "Purchase Line"
Previous version of the current record.
OnBeforeDeleteDiscountsConfirmDialog
local procedure OnBeforeDeleteDiscountsConfirmDialog(var SkipConfirm: Boolean)
Raised before the Header Discounts deletion confirmation dialog is shown, allowing to skip it
Parameters / Return Value
SkipConfirm
Boolean
Boolean field that if set to “true” skips the confirmation dialog
OnAfterGetPaymentTermsAsDiscountSource
local procedure OnAfterGetPaymentTermsAsDiscountSource(PurchHeader: Record "Purchase Header"; var PaymentTerms: Record "Payment Terms"; var CanApply: Enum "EOS066 TriState Boolean")
Raised after the payment terms have been retrieved for updating the header discount set of the document. If this event returns “False”, any already existing discounts for this source will NOT be removed. If you want to delete the discount for this source, return “True” and set the source discount ID to an empty GUID.
Parameters / Return Value
PurchHeader
Record "Purchase Header"
The purchase header.
PaymentTerms
Record "Payment Terms"
The payment terms record.
CanApply
Enum "EOS066 TriState Boolean"
Gets or sets if the discount can be applied. Set this to “False” to avoid application.
OnAfterGetShipmentMethodAsDiscountSource
local procedure OnAfterGetShipmentMethodAsDiscountSource(PurchHeader: Record "Purchase Header"; var ShipmentMethod: Record "Shipment Method"; var CanApply: Enum "EOS066 TriState Boolean")
Raised after the shipment method has been retrieved for updating the header discount set of the document. If this event returns “False”, any already existing discounts for this source will NOT be removed. If you want to delete the discount for this source, return “True” and set the source discount ID to an empty GUID.
Parameters / Return Value
PurchHeader
Record "Purchase Header"
The purchase header.
ShipmentMethod
Record "Shipment Method"
The shipment method record.
CanApply
Enum "EOS066 TriState Boolean"
Gets or sets if the discount can be applied. Set this to “False” to avoid application.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.