I want to enter quantity as Alternate units and for that I am using “Type: Quantity: Secondary units” but it is getting converted as per conversion rate and then getting saved.
For e.g.
Base Units: nos
Alternate units: box such that 1 box = 10 nos
Now if we enter 100 in quantity field then Tally would consider it as 100 nos and convert it to 10 box, however, we require the same to be saved as 100 box.
To achieve the required functionality, we need to explicitly set the value of Billed Qty field. Following snippet can be referred:
[#Line: EI InvInfo]
Add: Right Fields: At Beginning : BAltQty
[Field: BAltQty]
Use: Name Field
Validate: $$SetAltQty:$$EditData:@AltUnit
AltUnit: $AdditionalUnits:StockItem:$StockItemName
Inactive: $$IsEnd:$StockItemName
[Function: SetAltQty]
Parameter: pEditData: Number
Parameter: pAltUnit: String
Variable: AltUnits : String
00: SET: AltUnits: $$String:##pEditData + " " + ##pAltUnit
10: SET OBJECT VALUES: BilledQty: $$AsQty:##AltUnits
20: RETURN: True