KVSKBAPurchaseLine#
Extends #437dbf0e84ff417a965ded2bb9650972#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.
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeIsDirectUnitCostUpdateOfOtherItemLinesRequired', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeIsDirectUnitCostUpdateOfOtherItemLinesRequired(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeUpdateOtherItemLinesDirectUnitCost', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeUpdateOtherItemLinesDirectUnitCost(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeDeleteTempPurchPriceDiscCalcLines', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeDeleteTempPurchPriceDiscCalcLines(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeUpdPurchasePriceDiscCalcLine', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeUpdPurchasePriceDiscCalcLine(PurchaseLine: Record "Purchase Line"; var TempKVSKBAPurchPriceDiscCalcLine: Record "KVSKBAPurchPriceDiscCalcLine" temporary)
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeCheckAllowFindNewPurchaseLinePrice', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeCheckAllowFindNewPurchaseLinePrice(PurchaseLine: Record "Purchase Line"; var SkipItemPurchasePriceCalc: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeCheckAllowFindNewPurchaseLineDisc', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeCheckAllowFindNewPurchaseLineDisc(PurchaseLine: Record "Purchase Line"; var SkipItemPurchaseDiscCalc: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeAddVendorNoAtKBATypes', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeAddVendorNoAtKBATypes(var IsHandled: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeValidateBlanketOrderLineNo', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeValidateBlanketOrderLineNo(var PurchaseLine: Record "Purchase Line"; KVSKBAUpdPriceDiscountFromBlankOrder: Enum "KVSKBABlankYesNo"; var IsHandled: Boolean)
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeValidateFieldBlanketOrderLineNo', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeValidateFieldBlanketOrderLineNo(var PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
end;
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"):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnAfterValidateBlanketOrderLineNo', '', false, false)]
local procedure DoSomethingKVSKBAOnAfterValidateBlanketOrderLineNo(var PurchaseLine: Record "Purchase Line"; BlanketOrderPurchaseLine: Record "Purchase Line"; KVSKBAUpdPriceDiscountFromBlankOrder: Enum "KVSKBABlankYesNo")
begin
end;
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"):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnAfterValidateFieldBlanketOrderLineNo', '', false, false)]
local procedure DoSomethingKVSKBAOnAfterValidateFieldBlanketOrderLineNo(var PurchaseLine: Record "Purchase Line"; BlanketOrderPurchaseLine: Record "Purchase Line")
begin
end;
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):
[EventSubscriber(ObjectType::TableExtension, TableExtension::"KVSKBAPurchaseLine", 'KVSKBAOnBeforeCheckNotAllowedTypeAllocationAccount', '', false, false)]
local procedure DoSomethingKVSKBAOnBeforeCheckNotAllowedTypeAllocationAccount(PurchaseLine: Record "Purchase Line"; var IsHandled: Boolean)
begin
end;
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.