Dear Expert, Please let me know where i have gone wrong? can any one correct my code to get the last sale date of a particular item sold to particular party ? please ? [#Line: EI COLUMNONE] Add:Right Fields:Before:VCH QtyTitle:LTSDT Use: ClnsalesInfo [Field:LTSDT] UseATE FIELD Set as:"LAST SALE DATE" Width: 12 Color: BLUE Style: NORMAL BOLD Align : Right Skip : YES Set Always: Yes [#Line:ei invinfo] Add:Right Fields:Before:VCH BilledQty:LTSDT1 [#Line:ci invinfo] Add:Right Field:before: VCH BilledQty:LTSDT1 [Field:LTSDT1] Use : Uni Date Field Set As : $Lastsaledate Align : Left Width:8 Format : "DATE" Type: Date [Collection: SALESLastDate] Type : Vouchers : VoucherType Child Of : $$VchTypeSales Belongs To : Yes Fetch : Date Filter : MydateFltr Sort : @@Default : -$Date [System : Formula] MydateFltr : $PartyLedgerName = #EIConsignee AND $StockItemName = #VCHStockItem Lastsaledate: $$CollectionField:$Date:1:SALESLastDate thanks in advance
Dear Amit sir, thank you for the help, it is showing the last sale date for a party having only one transaction during a period but it is not showing when there are 2 or more transaction for a particular item eg: when apple is sold to Mr.A. on 1.4.2022 then it is showing but when apple is sold to Mr.A. again on 15.04.2022 then it is not showing please help me in this regard sir
Cannot understand clearly your problems ..... but from what i gather and assume...... you need dates for each and every stockitem existing in the voucher....... then you need to....... in the collection --- walk the Inventory entries --- by Ledname, by Stockname and by date ......... then give filter formula..... ledname = vchrledname and stockname = vchstockname ........ and use $$FilterValue to get the desired results.
Dear Amit sir please check the following code sir and i attached the screen shot also for your guidance to me [Field:LTSDT1] Use : Uni Date Field Set As : @@Lastsaledate Align : Left Set Always:Yes Skip : Yes Width:8 Format : "DATE" Type: Date [Collection: SALESLastDate] Type : Vouchers : VoucherType Child Of : $$VchTypeSales Belongs To : Yes Walk: InventoryEntries By : LedNAme : $LedNAme By : StockItemName : $StockItemName By : VchDate : $VchDate Fetch : Date Filter : MydateFltr Sort : @@Default : -$Date [System : Formula] MydateFltr : $$IsLedger = #vchrledname AND $$IsStockItem = #VCHStockItem ;and $date = #vchdate Lastsaledate: $$CollectionField:$Date:1:SALESLastDate
Code: [Collection: SALESLastDateVchr] Type : Vouchers : VoucherType Child Of : $$VchTypeSales Sort : Default : -$Date [Collection: SALESLastDate] source collection : SALESLastDateVchr Walk : Inventory Entries by : LedgerName : $PartyLedgerName by : StockItemName : $StockItemName by : Date : $Date Compute : reqdt : $Date [System : Formula] MydateFltr : $LedgerName = #EIConsignee AND $StockItemName = #VCHStockItem Lastsaledate: $$FilterValue:$reqdt:SALESLastDate:last:MydateFltr
Dear Amit Sir, thanks for your coding and with this incident i understood that i need to learn a lot,
You ill learn more, better and faster, if you learn from SAMPLE codes that downloads with the Developer and also study similar type of working codes of default tally.