[Collection : LearnwellSalesColl] Title : "Voucher" Type : Vouchers:VoucherType Fetch:VoucherNumber,VoucherDate,Reference,ReferenceDate,PartyName,BasicBuyerName,BasicBuyerAddress,PartyAddress,StateName,CountryofResidence,PartyGSTIn,PlaceofSupply Fetch:ConsigneeStateName,ConsigneeGSTIn,Narration Fetch:InventoryEntries.StockItemName Child Of:$$VchTypeSales I am using the above code to generate a GST report for pivot table provided by Learnswell. We have 3 Voucher types under sales 1. Sales, 2. Domestic Sales, 3. Export Sales. This collection is working for Voucher Type Sales only and not working for Other two types, even we change this "Child Of:$$VchTypeSales" to Sales Domestic. I dont know much about TDL.
When you use ..... $$VchTypeSales ... it covers all types defined under the parent VoucherGroup SALES ...... If you want only Export then --- $VoucherTypeName CONTAINS "Export" (Whatever name your ExportSales is defined as).......... and use this as a filter in the collection.
You need to use Code: Belongsto:True If belongsto is true, then it will fetch sales vouchers and vouchers defined under sales voucher types like domestic or export sales (Refer this https://help.tallysolutions.com/article/DeveloperReference/tdlreference/objects_and_collections.htm - Search for BelongsTo) Code: [Collection : LearnwellSalesColl] Title : "Voucher" Type : Vouchers:VoucherType Fetch:VoucherNumber,VoucherDate,Reference,ReferenceDate,PartyName,BasicBuyerName,BasicBuyerAddress,PartyAddress,StateName,CountryofResidence,PartyGSTIn,PlaceofSupply Fetch:ConsigneeStateName,ConsigneeGSTIn,Narration Fetch:InventoryEntries.StockItemName Child Of:$$VchTypeSales Belongsto:True or else use @@IsSalesVch($$IsSales:$VoucherTypeName ), $$IsSales function returns true if voucher type is sales or child of sales voucher type whereas $$VchTypeSales function only return sales Code: [Collection : LearnwellSalesColl] Title : "Voucher" Type : Vouchers Fetch:VoucherNumber,VoucherDate,Reference,ReferenceDate,PartyName,BasicBuyerName,BasicBuyerAddress,PartyAddress,StateName,CountryofResidence,PartyGSTIn,PlaceofSupply Fetch:ConsigneeStateName,ConsigneeGSTIn,Narration Fetch:InventoryEntries.StockItemName Filter:IsSalesVch