Hello everyone, I have made a report which shows the sales and receipt entries side by side in 2 separate parts. Now I want the receipt part to show only those entries of parties to whom I have made any sale entry, and it will not show the entry of the parties to whom I have not made any sales. For example, according to the given pic. it is showing an entry of Ajay but I have not sold any product to him, I don't want this entry. Please Help. My code is given below : Code: [#Menu:gateway of tally] Add:Item: Debtors report: Display: SaleRec [Report:SaleRec] Form:SaleRec [Form:SaleRec] Part: Entries Height:100% page Width: 100% page Button: change date, change period [Part:entries] Part:SEntries, REntries [Line:titles] Field: Date, Party Right Field:VCHName, VCH no, Amount Local:Field:date:Info:"Date" Local:Field:Party:Info:"Party" Local:Field:VCHName:Info:"Voucher name" Local:Field:VCH no:Info:"Voucher no" Local:Field:Amount:Info:"Amount" Space Bottom:0.1 Space Top:0.1 Border:thinbox ;;================================================================ [Part:SEntries] Line:head, titles, entries Bottom Line:total Repeat:Entries:SalesColl Scroll:Vertical Width: 50% Page Border:thinbox ; Background:@@SV_SALESVOUCHER Total:amount ;;====================================== [Part:REntries] Use:SEntries Repeat:Entries:RecColl Local:Field:head:Info:"List of all Receipt entries" ;;================================================================ [Line:head] Field:head Space Bottom:0.2 Space Top:0.2 Border:thin box [Field:head] Use:name field Set as:"List Of all Sales entries" Align:Center Width:50% screen ;;================================================================ [Line:total] right Field:total title,total Border:thin box [Field:total title] Use:Short prompt Info:"Total Sales : " [Field:total] Use : number field Set as:$$Total:amount Width:20 Align:Right Format : "Symbol, No Zero," ;;================================================================ [Line:entries] Field: Date, Party Right Field:VCHName, VCH no, Amount [Field:date] Use:Short Date Field Set as:$date Style:normal [Field:party] Use:name field Set as:if not $partyledgername = "" then $partyledgername else " "+$$LocaleString:"((cancelled))" [Field:Vchname] Use:short name field Set as:$vouchertypename Style:normal [Field : Vch no] Use:short name field Set as : $vouchernumber Style:normal [Field:amount] use:amount field Set as:$amount format : "Symbol, No Zero" Style:normal ;;================================================================ [Collection:SalesColl] Type:vouchers:vouchertype Child Of:$$VchTypeSales Belongs To:Yes Fetch:date, partyledgername, vouchertype, vouchernumber, amount [Collection:RecColl] Type:vouchers:vouchertype Child Of:$$VchTypeReceipt Belongs To:Yes Fetch:date, partyledgername, vouchertype, vouchernumber, amount Filter: RecFilter ;;================================================================ [System:Formula] RecFilter: not $Partyledgername = $$CollectionField:$partyledgername:1:SalesColl
Sir, in my case both the ledgers are under Sundry Debtors only. In the pic above Ajay is also under Sundry Debtors, but he paid his previous balance amount, and I want the list of current sales and receipts only.
RecFilter: $$FIletr:$Partyledgername; =$$CollectionField:$partyledgername:1:SalesColl [Function:FIletr] Parameter:abc:String Variable:inc:Number:0 Variable:xyz:Number:0 Return:Logical fetch objectartyledgername 01:Log :##inc 02:Walk Collection:SalesColl 03:Increment:inc 04:Log :$partyledgername 10:if : $partyledgername=##abc ;$$CollectionField:$partyledgername:##inc:SalesColl =abc then yes 15:Increment :xyz 20:End If 25:End Walk ;26:log 30:If:##xyz=0 35:Return:False 40:Else 45:Return:True 50:End If try this