Table of Contents

KVSKBAPurchaseLine

Extends #437dbf0e84ff417a965ded2bb9650972#Purchase Line

Summary: Extends Purchase Line with Order Confirmation Exists, Direct Unit Cost Price Unit, and Price Unit to support Purchase Line.

Fields

Name Type Note
KVSKBAOrderConfirmationExists Boolean FlowField
KVSKBADirectUnitCostPriceUnit Decimal
KVSKBAPriceUnit Decimal
KVSKBAOutstandingOrderQty Decimal
KVSKBAOutstandingOrderQtyBase Decimal FlowField
KVSKBAServiceLineNo Integer
KVSKBAItemPriceGroup Code[10]
KVSKBASpecialOrderServiceNo Code[20]
KVSKBASpecOrdServItemLineNo Integer
KVSKBASpecialOrderServLineNo Integer
KVSKBAServiceOrderNo Code[20]
KVSKBAServiceOrderItemLineNo Integer
KVSKBADocumentProcessID Code[20]
KVSKBAPreviousText Boolean FlowField
KVSKBAAfterText Boolean FlowField
KVSKBAIndentation Integer
KVSKBASubtotal Decimal FlowField
KVSKBAPositionNo Code[20]
KVSKBATotaling Text[30]
KVSKBAPrintLine Boolean
KVSKBAPrintPrice Boolean
KVSKBAPrintPageBreak Boolean
KVSKBAFontStyle Enum (KVSKBAFontStyle)
KVSKBAPriceCalcExist Boolean FlowField
KVSKBADiscountCalcExist Boolean FlowField
KVSKBAPriceOrigin Enum (KVSKBAPurchasePriceOrigin)
KVSKBALineDiscountOrigin Enum (KVSKBAPurchLineDiscountOrigin)
KVSKBATempChangeQtySuspended Boolean
KVSKBAShippingAgentCode Code[10]
KVSKBAShippingAgentServiceCode Code[10]

Procedures

KVSKBASuspendUpdPurchPriceDisc(Boolean) :

Summary: Sets the flag to suspend the price and discount calculation in purchase line validation.

procedure KVSKBASuspendUpdPurchPriceDisc(UpdPurchPriceDiscSupended: Boolean): 

Parameters:

  • UpdPurchPriceDiscSupended: Boolean flag to suspend or resume the calculation.

Remarks: The flag is used to avoid recursive calls of the price and discount calculation when the fields "Direct Unit Cost" and "Line Discount %" are updated by an external call.

KVSKBACheckPriceCalculationMethod() : Boolean

Summary: Checks if the price calculation method is using KBA changes.

procedure KVSKBACheckPriceCalculationMethod(): Boolean

Returns: True if the price calculation method is using KBA changes; otherwise, false.

Remarks: The function is used to determine if the price calculation method is using KBA changes, which affects the price calculation logic in purchase line validation.

KVSKBASearchItemByAttributes() :

Summary: Used for item attribute search to find items with similar attributes and update the purchase line with the selected item on the page.

procedure KVSKBASearchItemByAttributes(): 

Remarks: The function is called from a action on the purchase line to open the item attribute search page.

KVSKBASetPriceOrigin(Enum KVSKBAPurchasePriceOrigin) :

Summary: Sets the price origin to manual when the price is updated by an external call.

procedure KVSKBASetPriceOrigin(KVSKBANewPriceOrigin: Enum "KVSKBAPurchasePriceOrigin"): 

Parameters:

  • KVSKBANewPriceOrigin: The new price origin to be set.

Remarks: The function is called from an external call to update the price of the purchase line, for example, from the item card.

KVSKBASetLineDiscountOrigin(Enum KVSKBAPurchLineDiscountOrigin) :

Summary: Sets the line discount origin to manual when the line discount is updated by an external call

procedure KVSKBASetLineDiscountOrigin(KVSKBANewLineDiscountOrigin: Enum "KVSKBAPurchLineDiscountOrigin"): 

Parameters:

  • KVSKBANewLineDiscountOrigin: The new line discount origin to be set.

Remarks: The function is called from an external call to update the line discount of the purchase line, for example, from the item card.

Events

KVSKBAOnBeforeIsDirectUnitCostUpdateOfOtherItemLinesRequired(Record Purchase Line, Boolean) :

Summary: Integration event that is raised before checking if a direct unit cost update for other item lines is required.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeIsDirectUnitCostUpdateOfOtherItemLinesRequired(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • IsHandled: A flag indicating whether the event has been handled by a subscriber.

Remarks: Subscribers can use this event to customize the logic for determining whether a direct unit cost update is needed for other related item lines.

KVSKBAOnBeforeUpdateOtherItemLinesDirectUnitCost(Record Purchase Line, Boolean) :

Summary: Integration event that is raised before updating the direct unit cost of other item lines.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeUpdateOtherItemLinesDirectUnitCost(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • IsHandled: A flag indicating whether the event has been handled by a subscriber.

Remarks: Subscribers can use this event to execute custom logic before the direct unit cost is propagated to other related item lines in the purchase document.

KVSKBAOnBeforeDeleteTempPurchPriceDiscCalcLines(Record Purchase Line, Boolean) :

Summary: Integration event that is raised before deleting temporary purchase price and discount calculation lines.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeDeleteTempPurchPriceDiscCalcLines(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • IsHandled: A flag indicating whether the event has been handled by a subscriber.

Remarks: Subscribers can use this event to perform cleanup operations or additional logic before temporary price and discount calculation records are removed.

KVSKBAOnBeforeUpdPurchasePriceDiscCalcLine(Record Purchase Line, Record KVSKBAPurchPriceDiscCalcLine) :

Summary: Integration event that is raised before updating purchase price and discount calculation lines.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeUpdPurchasePriceDiscCalcLine(PurchaseLine: Record "Purchase Line"; var TempKVSKBAPurchPriceDiscCalcLine: Record "KVSKBAPurchPriceDiscCalcLine" temporary): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • TempKVSKBAPurchPriceDiscCalcLine: A temporary record containing the purchase price and discount calculation lines.

Remarks: Subscribers can use this event to modify price and discount calculation records before they are processed and applied to the purchase line.

KVSKBAOnBeforeCheckAllowFindNewPurchaseLinePrice(Record Purchase Line, Boolean) :

Summary: Integration event that is raised before checking if a new purchase line price lookup is allowed.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeCheckAllowFindNewPurchaseLinePrice(PurchaseLine: Record "Purchase Line"; var SkipItemPurchasePriceCalc: Boolean): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • SkipItemPurchasePriceCalc: A flag to indicate if the item purchase price calculation should be skipped.

Remarks: Subscribers can use this event to control whether price calculations should be performed based on custom criteria or business rules.

KVSKBAOnBeforeCheckAllowFindNewPurchaseLineDisc(Record Purchase Line, Boolean) :

Summary: Integration event that is raised before checking if a new purchase line discount lookup is allowed.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeCheckAllowFindNewPurchaseLineDisc(PurchaseLine: Record "Purchase Line"; var SkipItemPurchaseDiscCalc: Boolean): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • SkipItemPurchaseDiscCalc: A flag to indicate if the item purchase discount calculation should be skipped.

Remarks: Subscribers can use this event to control whether discount calculations should be performed based on custom criteria or business rules.

KVSKBAOnBeforeAddVendorNoAtKBATypes(Boolean) :

Summary: Integration event that is raised before adding vendor numbers to KBA-specific line types.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeAddVendorNoAtKBATypes(var IsHandled: Boolean): 

Parameters:

  • IsHandled: A flag indicating whether the event has been handled by a subscriber.

Remarks: Subscribers can use this event to implement custom logic for assigning vendor numbers to special line types such as headings, subtotals, and bundles.

KVSKBAOnBeforeValidateBlanketOrderLineNo(Record Purchase Line, Enum KVSKBABlankYesNo, Boolean) :

OBSOLETE

This Element will be removed or changed with a future Version of the App.

Summary: Integration event that is raised before validating the blanket order line number (Obsolete).

[Obsolete('This Event is no longer used, because the variable KVSKBAUpdPriceDiscountFromBlankOrderBlankYesNo is no longer used, please use the new event KVSKBAOnBeforeValidateFieldBlanketOrderLineNo instead', '28.2')]
[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeValidateBlanketOrderLineNo(var PurchaseLine: Record "Purchase Line"; KVSKBAUpdPriceDiscountFromBlankOrder: Enum "KVSKBABlankYesNo"; var IsHandled: Boolean): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • KVSKBAUpdPriceDiscountFromBlankOrder: An enumeration value indicating whether to update price and discount from blanket order.
  • IsHandled: A flag indicating whether the event has been handled by a subscriber.

Remarks: This event is obsolete as of version 28.2. Use KVSKBAOnBeforeValidateFieldBlanketOrderLineNo instead.

KVSKBAOnBeforeValidateFieldBlanketOrderLineNo(Record Purchase Line, Boolean) :

Summary: Integration event that is raised before validating the blanket order line number field.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeValidateFieldBlanketOrderLineNo(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • IsHandled: A flag indicating whether the event has been handled by a subscriber.

Remarks: Subscribers can use this event to implement custom validation logic for blanket order line numbers before the standard validation is performed.

KVSKBAOnAfterValidateBlanketOrderLineNo(Record Purchase Line, Record Purchase Line, Enum KVSKBABlankYesNo) :

OBSOLETE

This Element will be removed or changed with a future Version of the App.

Summary: Integration event that is raised after validating the blanket order line number (Obsolete).

[Obsolete('This Event is no longer used, because the variable KVSKBAUpdPriceDiscountFromBlankOrderBlankYesNo is no longer used, please use the new event KVSKBAOnAfterValidateFieldBlanketOrderLineNo instead', '28.2')]
[IntegrationEvent(false, false)]
local procedure KVSKBAOnAfterValidateBlanketOrderLineNo(var PurchaseLine: Record "Purchase Line"; BlanketOrderPurchaseLine: Record "Purchase Line"; KVSKBAUpdPriceDiscountFromBlankOrder: Enum "KVSKBABlankYesNo"): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • BlanketOrderPurchaseLine: The purchase line record from the blanket order.
  • KVSKBAUpdPriceDiscountFromBlankOrder: An enumeration value indicating whether to update price and discount from blanket order.

Remarks: This event is obsolete as of version 28.2. Use KVSKBAOnAfterValidateFieldBlanketOrderLineNo instead.

KVSKBAOnAfterValidateFieldBlanketOrderLineNo(Record Purchase Line, Record Purchase Line) :

Summary: Integration event that is raised after validating the blanket order line number field.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnAfterValidateFieldBlanketOrderLineNo(var PurchaseLine: Record "Purchase Line"; BlanketOrderPurchaseLine: Record "Purchase Line"): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • BlanketOrderPurchaseLine: The purchase line record from the blanket order.

Remarks: Subscribers can use this event to perform post-validation processing, such as updating related fields or triggering additional business logic after the blanket order line number has been validated.

KVSKBAOnBeforeCheckNotAllowedTypeAllocationAccount(Record Purchase Line, Boolean) :

Summary: Integration event that is raised before checking for not-allowed allocation account types.

[IntegrationEvent(false, false)]
local procedure KVSKBAOnBeforeCheckNotAllowedTypeAllocationAccount(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean): 

Parameters:

  • PurchaseLine: The current purchase line record.
  • IsHandled: A flag indicating whether the event has been handled by a subscriber.

Remarks: Subscribers can use this event to implement custom validation logic for allocation account types or to suppress the default validation behavior.