Code: ;;===== STOCK item [*Collection: Vch Stock Item Extract] Use : ExtractAlias Collection Source Collection : Stock Item Src Collection : StockItem PartNo With Closing Title : $$LocaleString:"List of Items Stock Qty LastSale Price " Fetch : Name, VchStkItmBalance,LastSalePrice,ClosingBalance Set as : $FirstName Keep Source : (). Client Only : Yes Format : $VchStkItmBalance : "Base" Format : $LastSalePrice: "Base" ;Format : $RateofMRP: "Base" Filter : Zero Filter21 [System: Formula] Zero Filter21 : NOT $$IsEmpty:$ClosingBalance I am getting the empty closing balance but if i want to purchase any new stock, stock item is not allowing in purchase voucher.
Then Write the Formula Like This ZeroFilter: $$IsPurchase:##SVVoucherType AND Not $$IsEmpty:$ClosingBalance
Do it this manner............. [#Collection: Vch Stock Item Extract] Use : ExtractAlias Collection Source Collection : Stock Item Src Collection : StockItem PartNo With Closing Title : $$LocaleString:"List of Items Stock Qty LastSale Price " Fetch : Name, VchStkItmBalance,LastSalePrice,ClosingBalance Set as : $FirstName Keep Source : (). Client Only : Yes Format : $VchStkItmBalance : "Base" Format : $LastSalePrice: "Base" ;Format : $RateofMRP: "Base" Filter : Zero Filter21 Option : RemoveFilteronPur : $$InCreateMode [!Collection : RemoveFilteronPur] Delete : Filter : Zero Filter21 [System: Formula] Zero Filter21 : NOT $$IsEmpty:$ClosingBalance
I have just made a general condition........ $$InCreateMode.......... you can alter that for selective Vouchers also.
Thank you amit sir for ur help got it by changing Option : RemoveFilteronPur : $$IsPurchase:$VoucherTypeName