Dear All Please help IN batch allocation, you have added a filed to enter the only number for qty field and one field to select alternative units then in another field you would like to convert into primary units and show the value. If i select DZ, Box, Pcs Then this code not calculated , if i selected Box 10 Dzn Compound unit then Calculated . Also Given a Tally Data .. the code is below. ;-- Batch Allocation Page Customization 2nd Qty Field... ;;;Batch allocation Title Lines [#Line: VCHBATCH ColumnOne] Add : Option : V EI ColumnOneme :$VoucherTypeName ="Sales" or $VoucherTypeName ="Sales-SW" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Purchase" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Credit Note" [!Line : V EI ColumnOneme] Add : Right Fields : Before :VCH QtyTitle: AQ Primarytitel,RajUnitsTitle [Field : AQ Primarytitel] Width : If @@IsJobOrdersOn Then @@VCHQtyWidth Else if ($DiffActualQty AND NOT $$IsPhysStock:##SVVoucherType AND NOT $$IsStockJrnl:##SVVoucherType AND NOT @@IsExciseSupplementaryInv ) then (@@VCHQtyWidth + @@VCHQtyWidth + 1) else @@VCHQtyWidth Set as : $$LocaleString:"QTY New" Sub Title : Yes ;Set as : $BaseUnits:Stockitem:$StockitemName Set Always : Yes Skip : Yes Style : Small Bold Align : Center Background : Blue [Field : RajUnitsTitle] Width : If @@IsJobOrdersOn Then @@VCHQtyWidth Else if ($DiffActualQty AND NOT $$IsPhysStock:##SVVoucherType AND NOT $$IsStockJrnl:##SVVoucherType AND NOT @@IsExciseSupplementaryInv ) then (@@VCHQtyWidth + @@VCHQtyWidth + 1) else @@VCHQtyWidth Set as : $$LocaleString:"Units New" Sub Title : Yes ;Set as : $BaseUnits:Stockitem:$StockitemName Set Always : Yes Skip : Yes Style : Small Bold Align : Center ;--Details Batch Lines------------------------------------------------------------- [#Line: STKVCH Batch2] Add : Option : VEI InvInfome : $VoucherTypeName ="Sales" or $VoucherTypeName ="Sales-SW" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Purchase" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Credit Note" [!Line : VEI InvInfome] Add : Right Fields: Before : VCHBATCH BilledQty : AQ Primary,RajatUnitsValue [Field : AQ Primary] Use : Number Field ;Use : Rate Price Field Width : @@VCHQtyWidth Storage : NewQtyField Set Always : Yes Align : Center [System: UDF] NewQtyField : Number : 4214 NewUNit : String : 4215 [Field : RajatUnitsValue] Use : Name Field ;Use : Rate Units Field Width : @@VCHQtyWidth Style : Normal Bold ;Storage : NewQtyField Storage : NewUNit Set Always : Yes Align : Center Table : Unit Show Table : Always ;;--------------------------------------------------------------------------------------- ;[#Field: VCHBATCH BilledQty] ; Set as : "11" [#Field: VCHBATCH NrmlBQty] Add : Option : MyBilledQty : $VoucherTypeName ="Sales" ;or $VoucherTypeName ="Sales-SW" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Purchase" or $VoucherTypeName ="Order-SW" or $VoucherTypeName ="Credit Note" [!Field : MyBilledQty] Delete : Set Always Delete : Option Delete : Sub Form Delete : Inactive Delete : Format Delete : Validate Delete : Switch Delete : Set as Add : Set as $$Number:#AQPrimary)* ($$Number:$$CollectionField:$dn:1:t14) *($$Number:$$CollectionField:$conv:1:t12) Add : Background : Green Add : Set Always : Yes ;;---Collection Field [Collection:t11] Type:unit;stock item [Collection:t12] Source Collection:t11 Fetch:name,FormalName,BASEUNITS,ADDITIONALUNITS,DENOMINATOR Compute:un:$name Compute:conv:$CONVERSION Compute:dz1:$ADDITIONALUNITS Compute:BU1:$BASEUNITS Filter:testf ;select $un,$dz1,$conv from t12 [Collection:t13] Type:stock item Fetch:name,BASEUNITS,ADDITIONALUNITS,DENOMINATOR,Conversion,NewUNit ;select $name,$BASEUNITS,$ADDITIONALUNITS,$DENOMINATOR,$Conversion,$NewUNit from t13 [Collection:t14] Source Collection:t13 Compute:nm:$name Compute:bu:$BASEUNITS Compute:al:$ADDITIONALUNITS Compute:dn:$DENOMINATOR Compute:CN:$Conversion Filter:tfil [System:Formulae] tfil:$nm=#vchstockitem and $Al=#RajatUnitsValue;"Box of 10 DZ";; Table Seclected Filter ;select $nm,$bu,$al,$dn from t14 [System:Formulae] testf:$un=#RajatUnitsValue;"Box of 10 DZ";#RajatUnitsValue ;fil1:$$CollectionField:$dn:1:t14 ;fil2:$$CollectionField:$conv:1:t12 ;fil3:$$Numberfil1;*$$Numberfil2 ;$$collectionfield:$dn:1:t14
It is calculating because that is a COMPOUND unit defined by you and the rest of the unit is SIMPLE unit And since there is no DENOMINATOR to carry out the CONVERSION, it will not calculate.