below are few line of the code I want to set BilledQty with the following formula. and it should get updated if any of the width/heaight/sqft changes. qty field automatically calculated. [System: Formula] SCSCalcQty : $$Number:$GlobalVCHHeight*$$Number:$GlobalVCHWidth*$$Number:$GlobalVCHsqft [#Field: VCH BilledQty] set as : $$String@SCSCalcQty Set always : Yes [!Line: Global EI InvInfo] Add : Right Fields : At Beginning : Global VCH Width, Global VCH Height, Global VCH sqft Local : Field : Global VCH Width : Storage : SCSInvWidth Local : Field : Global VCH Height : Storage : SCSInvHeight Local : Field : Global VCH sqft : Storage : SCSInvsqft [Field: Global VCH Width] Use : Short Name Field Width : 8 Align : Right Border : Thin Left Right Skip on: $$IsEnd:$StockItemName [Field: Global VCH Height] Use : Short Name Field Width : 8 Align : Right Border : Thin Left Right Skip on: $$IsEnd:$StockItemName [Field: Global VCH sqft] Use : Short Name Field Width : 8 Align : Right Border : Thin Left Right Skip on: $$IsEnd:$StockItemName
Dear Mr. Mahadev, Please find the below code for "Qty Field" It will not work if you are activated the godown, batch allocations or tracking or po In your code i didn't find the UDF's, some of the fields, please send the proper code to get the fast reply. sorry if the comment is wrong Note: If you need the batch allocation subform then add the fields batch allocation line. Code also attached ;; Code Start [#Field: VCH BilledQty] GlobalResetVal: $$AsQty@SCSCalcQty [#Field: VCH NrmlBilledQty] Set as : If @HasInvAlloc Then $$CollQtyTotal:BatchAllocations:$BilledQty Else @GlobalResetVal [#Line: EI InvInfo] Option: Global EI InvInfo : @@IsSales [!Line: Global EI InvInfo] Add : Right Fields : Before: VCH BilledQty : Global VCH Width, Global VCH Height, Global VCH sqft [Field: Global VCH Width] Use: Number Field Storage: SCSInvWidth Border: Thin Left Right Inactive: $$IsEnd:$StockItemName [Field: Global VCH Height] Use: Number Field Storage: SCSInvHeights Border: Thin Left Right Inactive: $$IsEnd:$StockItemName [Field: Global VCH sqft] Use: Number Field Storage: SCSInvsqft Border: Thin Left Right Inactive: $$IsEnd:$StockItemName [System: UDF] SCSInvWidth: Number: 100 SCSInvHeights: Number: 101 SCSInvsqft: Number: 102 [System: Formula] SCSCalcQty : ($SCSInvWidth*$SCSInvHeights*$SCSInvsqft) ;;; End of File Thanks
Thank you very much for you reply. Since code contains other info, I have posted only part of the code. I tried your code but it is not calculating (WidthXHeightXSqFt). I tried with GlobalResetVal and ResetVal also.
I think U had to add the swith for vch billed qty. [#Field : VchBilledQty] Add : Switch : At End : Vch MyBillQty : Not $$IsStockJournal:##SvVoucherType And Not @@IsPosInvoice And (Not $$IsemptyGlobalResetValue [!Field : VchMyBillQty] set By Condition : Not $$IsEmptyGlobalresetValue : @GlobalresetValue
Dear Experts this code is working but qty field in purchase is disappearing please correct the code i have checked in release 4.93