/* please help me resolve function im try to do auto bulk sales voucher using groups(5% Customers or Above 5% Customers) created under sundry debtors. codes and snap short uploaded are bellow i want all ledgers under 5% Customers or Above 5% Customers debited in sales voucher im able to do for Ledgers but with groups its giving execution fail error Please give me ideas to do it or sample codes. */ [#Menu:Gateway of Tally] Add : Item : "Auto Bulk Sales" : Alter : AutoSalesRep [Report : AutoSalesRep] Form : AutoSalesRepForm Object : Company [form:AutoSalesRepForm] Height:100% Screen Width:100% Screen Button:Refresh TDL Part:AutoSalesRepPart On : Form Accept : yes : Form Accept On : Form Accept : yes : Call : AutoEntryFunct;MultipleSalesEntryFun [Part:AutoSalesRepPart] Line:AutoSalesRepLin,AutoSalesRepDataLin Repeat:AutoSalesRepDataLin:CurrentOpenCompConnectionCollection Scroll:Vertical [Line:AutoSalesRepLin] Field:AutoSalesRepTitleF,AutoSalesRepDrTitleFl,AutoSalesRepCrTitleFl,AutoSalesRepAmtTitleFl Local:Field:AutoSalesRepTitleF:Info:"Date" Local:Field:AutoSalesRepDrTitleFl:Info:"Dr Ledger" Local:Field:AutoSalesRepCrTitleFl:Info:"CrLedger" Local:Field:AutoSalesRepAmtTitleFl:Info:"Amount" [Field:AutoSalesRepTitleF] Space Right:8 [Field:AutoSalesRepDrTitleFl] Space Right:8 [Field:AutoSalesRepCrTitleFl] Space Right:8 [Field:AutoSalesRepAmtTitleFl] [Line:AutoSalesRepDataLin] ;Border:thick box Field:datFld,DrLedgFl,CrLedgFl,AmtFl [Field:datFld] Typeate Use:Short Date Field StorageateStorage [FieldrLedgFl] Type:String Use:Short Name Field StoragerLedgFlStoragr TablerLedgCollection Set Always:Yes [Field:CrLedgFl] Type:String Use:Short Name Field Storage:CrLedgFlStoragr Table:CRLedgCollection Set Always:Yes [Field:AmtFl] Type:Amount Use:Amount Field Storage:AmtFlStorage ;; Function defined and creating variable [Function:AutoEntryFunct] VariableatVarate VariablerLedgFlVar:String Variable:CrLedgFlVar:String Variable:AmtFlVar:Amount Variable : Counter : Number: 2 ; 001 : Start Batch Post :10 002 : START PROGRESS : ($$NumItems:CurrentOpenCompConnectionCollection) : "Creating Vouchers" : @@CmpMailName : "Creating Sales Vouchers ..." 003 : WALK COLLECTION : CurrentOpenCompConnectionCollection 004 : SET : DatVar :$DateStorage 005 : SET: DrLedgFlVar :$DrLedgFlStoragr 006 : Set: CrLedgFlVar :$CrLedgFlStoragr 007 : Set: AmtFlVar :$AmtFlStorage 008 :NEW OBJECT : Voucher 009 :SET VALUE : VoucherTypeName: $$VchTypeSales 010 :SET VALUE : Date : ##DatVar ;;; credit and debit entries ;;Dr entry 11 : INSERT COLLECTION OBJECT : AllLedgerEntries 012 :Set Value: Ledger Name:##DrLedgFlVar 013 : SET VALUE : IsDeemedPositive: "Yes" 014 : SET VALUE : Amount :##AmtFlVar * (-1) ;Credit Entry 015 : INSERT COLLECTION OBJECT :AllLedgerEntries 016 :Set Value:Ledger Name:##CrLedgFlVar 018 : SET VALUE : IsDeemedPositive:"No" 017 : SET VALUE : Amount :##AmtFlVar 020:LOG:$$String:##DatVar 021:Log:$$String:##DrLedgFlVar 022:Log:$$String:##CrLedgFlVar 023 :Log:$$String:##AmtFlVar 024:CREATE TARGET 025:End Walk 026 : END PROGRESS [Collection: CurrentOpenCompConnectionCollection] Title : "Bulk Sales Entry" Type : CurrentOpenCompConnectionCollection : Company Child Of : ##SVCurrentCompany ;;collection to fetch sundry debtors ledgers [CollectionrLedgCollection] Title:"Groups Under Sundry Debtors" ;Type:Ledger Use : Extract Alias Collection Source Collection:GroupsUnderSundryDebtorsColl Align:Center ;;collections for Groups under Sundry debtors [Collection:GroupsUnderSundryDebtorsColl] Type:Group Belongs To:No Child Of:"Sundry Debtors" ;;collection to fetch sales ledgers [Collection:CRLedgCollection] Type:Ledger Belongs To:Yes Child Of:$$GroupSales [System:UDF] CurrentOpenCompConnectionCollection : Aggregate : 41071 DateStorageate:41072 DrLedgFlStoragr:String:41073 CrLedgFlStoragr:String:41074 AmtFlStorage:Amount:41075 [Variable:counter]