KVSADIAdditionalItem#
Fields#
Name | Type | Note |
---|---|---|
Item No. | Code[20] | |
Item Variant Code | Code[10] | |
Type | Enum (KVSADIAdditionItemType) | |
No. | Code[20] | |
Line No. | Integer | |
Description | Text[100] | |
Description 2 | Text[50] | |
Sales | Boolean | |
Purchase | Boolean | |
Mandatory | Boolean | |
Quantity | Decimal | |
Old Quantity | Decimal | |
Selected | Boolean | |
Sales/Purchase Line No. | Integer | |
Quantity Calculation | Enum (KVSADIQuantityCalculation) | |
Quantity / Factor | Decimal | |
Quantity Rounding | Boolean | |
Quantity Rounding Precision | Decimal | |
Quantity Rounding Type | Enum (KVSADIQuantityRoundingType) | |
Variant Code | Code[10] | |
Sales Unit of Measure | Code[10] | |
Purch. Unit of Measure | Code[10] | |
Price/Cost Rounding | Boolean | |
Price/Cost Rounding Precision | Decimal | |
Mandatory (Purchase) | Boolean | |
Automatically created | Boolean | |
Creation Date | Date | |
Creation User ID | Code[50] | |
Last Date Modified | Date | |
Last User ID Modified | Code[50] | |
Sequence No. (Used) | Integer | |
Sales Sequence No. | Integer | |
Purchase Sequence No. | Integer | |
Location Code | Code[10] | |
Source Sales Line Id | Guid |
Procedures#
SetEntryNo() :#
Summary: Sets the Line No. for the additional item entry by finding the last entry with the same key fields and incrementing by 10000. If no existing entry is found, sets the Line No. to 10000.
procedure SetEntryNo():
CheckNo(Code[20], Code[10], Text[100], Text[50], Text[250]) : Boolean#
Summary: Validates the specified number and variant code based on the current Type and retrieves description information.
procedure CheckNo(noPar: Code[20]; variantCodePar: Code[10]; var descriptionVar: Text[100]; var description2Var: Text[50]; var errorMessageVar: Text[250]): Boolean
Parameters:
noPar
: The number to validate (G/L Account, Item, Resource, Fixed Asset, or Item Charge number)variantCodePar
: The variant code to validate (only applicable for Items)descriptionVar
: Returns the description of the validated recorddescription2Var
: Returns the second description field of the validated record (if available)errorMessageVar
: Returns an error message if validation fails
Returns: True if validation is successful, false otherwise
GetDirectionString() : Text[1]#
Summary: Returns the direction character based on the Quantity Rounding Type setting.
procedure GetDirectionString(): Text[1]
Returns: Returns '<' for Down, '>' for Up, or '=' for Nearest rounding
CalcItemInventory() : Decimal#
Summary: Calculates and returns the inventory quantity for the current item. Only applies to Type::Item, returns 0 for other types or if No. is empty.
procedure CalcItemInventory(): Decimal
Returns: The calculated inventory quantity filtered by Location Code and Variant Code
PurchaseLineTypeResPossible() : Boolean#
Summary: Checks if Resource type is available as an option in Purchase Line Type field. Uses reflection to determine if Resource is included in the Purchase Line Type option members.
procedure PurchaseLineTypeResPossible(): Boolean
Returns: True if Resource type is supported in Purchase Lines, false otherwise