[Collection: Salesvou] Type : Vouchers : VoucherType Child Of : $$VchTypeSales Belongs To : Yes Fetch : Date, VoucherTypeName, LedgerName, Voucher Number, Amount,DISCOUNT, MasterID, LedgerEntries.BillAllocations.* [Collection: PartyItemRate] Source Collection : Salesvou Walk : InventoryEntries By : MasterID : $..MasterID Compute : LedgerName : $..PartyLedgerName Compute : VoucherNumber : $..VoucherNumber Compute : Amount : $Amount Compute : Rate : $Rate Compute : DISCOUNT :$DISCOUNT Compute : ItemName : $StockItemName Sort : @@Default : -$VoucherNumber Search Key : $LedgerName+$ItemName ;Select $VoucherNumber, $Rate,$DISCOUNT,$ItemName,$LedgerName from PartyItemRate [#Field: VCH batch Rate] Delete: Set By Condition Delete: Set as Delete: Inactive add:Set As $$AsRate:$$CollectionFieldByKey:$RateStkPartyRtartyItemRate) StkPartyRt$LedgerEntries[1].LedgerName+$StockItemName) Set Always : yes [#Field: VCH batch discount] Delete: Set By Condition Delete: Set as Delete: Inactive add:Set As $$AsRate:$$CollectionFieldByKey:$DISCOUNTStkPartyRtartyItemRate) StkPartyRt$LedgerEntries[1].LedgerName+$StockItemName) Set Always : yes
Your SET AS is wrong.......... please refer to any CollectionFieldByKey formula and learn how it is to be used.
not fetch last rate only fetch first rate party wise rate not last rate and discount please correct this tdl