Codeunit 18125982 EOS049 Sales Document Mgt.

Codeunit 18125982 EOS049 Sales Document Mgt.

Methods

CalculateSalesDocumentDiscounts

procedure CalculateSalesDocumentDiscounts(var SalesHeader: Record "Sales Header")

Parameters / Return Value

  • SalesHeader Record "Sales Header"

FindSalesHeaderDisc

procedure FindSalesHeaderDisc(var ToSalesHdrDisc: Record "EOS049 Sales Hdr. Disc. Line";SalesHeader: Record "Sales Header";var SaledHdrNotSatisfied: Record "EOS049 Sales Hdr. Disc. Line";SalesLine: Record "Sales Line";SPPDiscountType: Enum "EOS049 Discount Type";ShowAll: Boolean)

Parameters / Return Value

  • ToSalesHdrDisc Record "EOS049 Sales Hdr. Disc. Line"

  • SalesHeader Record "Sales Header"

  • SaledHdrNotSatisfied Record "EOS049 Sales Hdr. Disc. Line"

  • SalesLine Record "Sales Line"

  • SPPDiscountType Enum "EOS049 Discount Type"

  • ShowAll Boolean


FindSalesHeaderDiscExclusive

procedure FindSalesHeaderDiscExclusive(var ToSalesHdrDisc: Record "EOS049 Sales Hdr. Disc. Line";SalesHeader: Record "Sales Header";SalesLine: Record "Sales Line";var SaledHdrNotSatisfied: Record "EOS049 Sales Hdr. Disc. Line";DiscountType: Enum "EOS049 Discount Type";ShowAll: Boolean)

Parameters / Return Value

  • ToSalesHdrDisc Record "EOS049 Sales Hdr. Disc. Line"

  • SalesHeader Record "Sales Header"

  • SalesLine Record "Sales Line"

  • SaledHdrNotSatisfied Record "EOS049 Sales Hdr. Disc. Line"

  • DiscountType Enum "EOS049 Discount Type"

  • ShowAll Boolean


FindSalesHdrDiscForItemLineType

procedure FindSalesHdrDiscForItemLineType(TypeItem: Enum "EOS049 Discount Item Type";LevelItem: Integer;var ToSalesHdrDisc: Record "EOS049 Sales Hdr. Disc. Line";SalesHeader: Record "Sales Header";SalesLine: Record "Sales Line";StartingDate: Date;DiscountType: Enum "EOS049 Discount Type";ShowAll: Boolean;FilterSellOutDates: Boolean)

Parameters / Return Value

  • TypeItem Enum "EOS049 Discount Item Type"

  • LevelItem Integer

  • ToSalesHdrDisc Record "EOS049 Sales Hdr. Disc. Line"

  • SalesHeader Record "Sales Header"

  • SalesLine Record "Sales Line"

  • StartingDate Date

  • DiscountType Enum "EOS049 Discount Type"

  • ShowAll Boolean

  • FilterSellOutDates Boolean


CalculateDiscounts

procedure CalculateDiscounts(var SalesLine: Record "Sales Line";var TempSalesDiscLine: Record "EOS049 Sales Hdr. Disc. Line" temporary; CheckSFACode: Boolean)

Parameters / Return Value

  • SalesLine Record "Sales Line"

  • TempSalesDiscLine Record "EOS049 Sales Hdr. Disc. Line"

  • CheckSFACode Boolean


RemoveAndCalculateDiscounts

procedure RemoveAndCalculateDiscounts(var SalesLine: Record "Sales Line";var TempSalesDiscLineToRemove: Record "EOS049 Sales Hdr. Disc. Line" temporary; CheckSFACode: Boolean)

Parameters / Return Value

  • SalesLine Record "Sales Line"

  • TempSalesDiscLineToRemove Record "EOS049 Sales Hdr. Disc. Line"

  • CheckSFACode Boolean


FindSalesHdrDiscForItemLineTypeExclusive

procedure FindSalesHdrDiscForItemLineTypeExclusive(TypeItem: Enum "EOS049 Discount Item Type";LevelItem: Integer;var ToSalesHdrDisc: Record "EOS049 Sales Hdr. Disc. Line";SalesHeader: Record "Sales Header";SalesLine: Record "Sales Line";StartingDate: Date;ShowAll: Boolean;FilterSellOutDates: Boolean)

Parameters / Return Value

  • TypeItem Enum "EOS049 Discount Item Type"

  • LevelItem Integer

  • ToSalesHdrDisc Record "EOS049 Sales Hdr. Disc. Line"

  • SalesHeader Record "Sales Header"

  • SalesLine Record "Sales Line"

  • StartingDate Date

  • ShowAll Boolean

  • FilterSellOutDates Boolean


Events

OnBeforeValidateSalesLineDiscountSetId

local procedure OnBeforeValidateSalesLineDiscountSetId(var SalesLine: Record "Sales Line"; var TempDiscountSetEntry: Record "EOS037 Discount Set Entry"; var IsHandled: Boolean)

raised before validate salesline discount on document discount calulation

Parameters / Return Value

  • SalesLine Record "Sales Line"

  • TempDiscountSetEntry Record "EOS037 Discount Set Entry"

  • IsHandled Boolean



EOS Labs -