Codeunit "Service-Calc. Discount"

ID 5950
Namespace: Microsoft.Service.Document

Properties

Name Value
TableNo Table Microsoft.Service.Document."Service Line"

Methods

CalculateWithServHeader

procedure CalculateWithServHeader(var TempServHeader: Record "Service Header", var ServiceLine: Record "Service Line", var TempServiceLine: Record "Service Line")

Parameters

Name Type Description
TempServHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"
TempServiceLine Table Microsoft.Service.Document."Service Line"

CalculateIncDiscForHeader

procedure CalculateIncDiscForHeader(var TempServiceHeader: Record "Service Header")

Parameters

Name Type Description
TempServiceHeader Table Microsoft.Service.Document."Service Header"

Events

OnAfterCalcServDiscount

[IntegrationEvent(False,False)]
local procedure OnAfterCalcServDiscount(var ServiceHeader: Record "Service Header", var TempVATAmountLine: Record "VAT Amount Line" temporary, var ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
TempVATAmountLine Table Microsoft.Finance.VAT.Calculation."VAT Amount Line"
ServiceLine Table Microsoft.Service.Document."Service Line"

OnBeforeCalcServDiscount

[IntegrationEvent(False,False)]
local procedure OnBeforeCalcServDiscount(var ServiceHeader: Record "Service Header", var ServiceLine: Record "Service Line", var ServiceLine2: Record "Service Line", TemporaryHeader: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceLine2 Table Microsoft.Service.Document."Service Line"
TemporaryHeader Boolean
IsHandled Boolean

OnCalculateInvoiceDiscountOnBeforeServiceLine2Delete

[IntegrationEvent(False,False)]
local procedure OnCalculateInvoiceDiscountOnBeforeServiceLine2Delete(var ServiceLine: Record "Service Line", TemporaryHeader: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
TemporaryHeader Boolean
IsHandled Boolean

OnCalculateInvoiceDiscountOnAfterServiceLine2ValidateQuantity

[IntegrationEvent(False,False)]
local procedure OnCalculateInvoiceDiscountOnAfterServiceLine2ValidateQuantity(var ServiceHeader: Record "Service Header", var ServiceLine2: Record "Service Line", var CustInvDisc: Record "Cust. Invoice Disc.")

Parameters

Name Type Description
ServiceHeader Table Microsoft.Service.Document."Service Header"
ServiceLine2 Table Microsoft.Service.Document."Service Line"
CustInvDisc Table Microsoft.Sales.Pricing."Cust. Invoice Disc."

OnCalculateInvoiceDiscountOnBeforeServiceLineInsert

[IntegrationEvent(False,False)]
local procedure OnCalculateInvoiceDiscountOnBeforeServiceLineInsert(var ServiceLine: Record "Service Line", ServiceHeader: Record "Service Header")

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
ServiceHeader Table Microsoft.Service.Document."Service Header"

OnCalculateInvoiceDiscountOnBeforeApplyServiceCharge

[IntegrationEvent(False,False)]
local procedure OnCalculateInvoiceDiscountOnBeforeApplyServiceCharge(var CustInvoiceDisc: Record "Cust. Invoice Disc.", var ServiceHeader: Record "Service Header", CurrencyDate: Date, ChargeBase: Decimal, var ApplyServiceCharge: Boolean)

Parameters

Name Type Description
CustInvoiceDisc Table Microsoft.Sales.Pricing."Cust. Invoice Disc."
ServiceHeader Table Microsoft.Service.Document."Service Header"
CurrencyDate Date
ChargeBase Decimal
ApplyServiceCharge Boolean

OnCalculateInvoiceDiscountOnBeforeIsServiceChargeUpdated

[IntegrationEvent(False,False)]
local procedure OnCalculateInvoiceDiscountOnBeforeIsServiceChargeUpdated(var ServiceLine: Record "Service Line", CustomerPostingGroup: Record "Customer Posting Group", var IsHandled: Boolean)

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"
CustomerPostingGroup Table Microsoft.Sales.Customer."Customer Posting Group"
IsHandled Boolean

OnCalculateInvoiceDiscountOnAfterSetServiceLineFilters

[IntegrationEvent(False,False)]
local procedure OnCalculateInvoiceDiscountOnAfterSetServiceLineFilters(var ServiceLine: Record "Service Line")

Parameters

Name Type Description
ServiceLine Table Microsoft.Service.Document."Service Line"

See also