Member Hello Learned Programmers I need help. i want the function to create sales entry by debiting all ledgers under ' SUNDRY DEBTORS' and crediting 'SALES LEDGER ACCOUNTS' but its giving error in the calculator panel. the sales ledger is credited correctly but ledgers under sundry debtors is my problem. the codes are below. pictures are attached please help me [#Menu: Gateway of Tally] Add : Item : "Multiple Sales Entry" : Alter : MultiSaleRep [Report : MultiSaleRep] Form : MultiSaleRep Object : Company ;Fetch Collection: Sales Support Ledgers Extract, Party Ledgers Extract [form:MultiSaleRep] Height:100% Screen Width:100% Screen Button:Refresh TDL Part:MultiSaleRepCrPart,MultiSaleRep On : Form Accept : yes : Form Accept On : Form Accept : yes : Call : CphSale BulkAutoEntry;MultipleSalesEntryFun ;;first part [Part:MultiSaleRepCrPart] Background:red Line:MultiSaleRepLinPartoneDate,MultiSaleRepLinPartone [Line:MultiSaleRepLinPartoneDate] Right FieldatF,DatF1 Local:FieldatF:Info:"" [FieldatF] [FieldatF1] ;Type : Date Use : Short Date Field ;Storage : Date ;Width@ShortWidth Skip:Yes [Line:MultiSaleRepLinPartone] Field:CrF,CrF1,CrF2 Local:Field:CrF:Info:"Date" Local:Field:CrF1:Info:"Dr Ledger" Local:Field:CrF2:Info:"Cr Ledger" [field:CrF] Skip:Yes Space Left:5 [field:CrF1] Space Left:3 [Field:CrF2] [Collection:SalesLedgersColl] Title:List Of Sales Ledgers Type:ledger Child Of:$$GroupSales [Part:MultiSaleRep] Line:AmtLin,DebitLin RepeatebitLin:CphSalesCollection Scroll:Vertical Break On: $$IsEndOfList:$DebitLin1Storage;$PartyLedgerName [Collection: CphSalesCollection] Title : "Bulk Sales Entry" Type : CphSales BulkEntry : Company Child Of : ##SVCurrentCompany [line:AmtLin] Right Field:AmtLin Local:Field:AmtLin:Info:"Amount" [Field:AmtLin] Use:Short Name Field Align:Right [LineebitLin] Border:THICK BOX FieldebitLin,Datefld,DebitLin1,CrLedFld Right Field:AmtField Local:FieldebitLin:Info:"Dr" [FieldebitLin] [Fieldatefld] Type : Date Use : Short Date Field Storage : Date [FieldebitLin1] Type:String Width@ShortWidth Table:SundDebtLedgres,EndOfList Show Table:Always StorageebitLin1Storage ;;afsdfsgvsdgssssssssssssssssssssssssssssssssssssssssssssssssssssssss [Field:CrLedFld] Type:String Use:Name Field Table:SalesLedgersColl;,Endoflist Show Table:Always Storage:CrLedFldStorage Inactive : $$IsEndOfList:$DebitLin1Storage [Field:AmtField] Type:Amount Use:Amount Field Storage:Amount Inactive : $$IsEndOfList:$DebitLin1Storage [System:UDF] CphSales BulkEntry : Aggregate : 41071 Dateate:41072 CrLedgerNameFldStorage:String:41073 DebitLin1Storage:String:41074 CrLedFldStorage:String:41075 Amount:Amount:41076 [Collection:SundDebtLedgres] Title:"List Of Sundry Debtors" Type:Group;Ledger ;Child Of:$$GroupSundryDebtors ;Belongs to : yes ;Format : $Name,30 Align:Center ;[Function:MultipleSalesEntryFun] [Function: CphSale BulkAutoEntry] ;; Procedural Block Variable : CphDate : Date Variable : CphCrLedgerName : String Variable : CphDrLedgerName : String Variable : CphAmount : Amount Variable : Counter : Number: 1 001 : Start Batch Post : 10 005 : START PROGRESS : ($$NumItems:CphSalesCollection) : "Creating Vouchers" : @@CmpMailName : "Creating Sales Vouchers ..." 007 : WALK COLLECTION : CphSalesCollection ;;Sales Info ;010 : SET : CphDate : $$Date:$Date 010 : SET : CphDate :$Date 020 : SET : CphCrLedgerName : $CrLedFldStorage 030 : SET : CphDrLedgerName : $DebitLin1Storage 040 : SET : CphAmount :$Amount 060:NEW OBJECT : Voucher 070: SET VALUE : Date : ##CphDate 080:SET VALUE : VoucherTypeName : $$VchTypeSales 080a:LOG : $$String:##CphDate 120 : SET VALUE : Ledger Name : ##CphDrLedgerName 140 : SET VALUE : IsDeemedPositive : "Yes" 141 : SET VALUE : Amount : ##CphAmount * (-1) ;##CphAmount ;150 : SET TARGET : .. 150a : LOG : $$String:##CphDrLedgerName ;---------------------------------------------------------------------------- ;;Credit Entry 160 : INSERT COLLECTION OBJECT : AllLedgerEntries ;160a: SET TARGET : LedgerEntries 170 : SET VALUE : Ledger Name : ##CphCrLedgerName 180 : SET VALUE : Amount : ##CphAmount ;##CphAmount 190 : SET VALUE : IsDeemedPositive : "No" ;200 : SET TARGET : .. 200a : LOG : $$String:##CphCrLedgerName 220 : CREATE TARGET 240 : END WALK 260 : END PROGRESS
Bro write a collection for sundry debtors filtering the ledgers [FieldebitLin1] Type:String Width@ShortWidth Table:CustomerTable, EndOfList Show Table:Always StorageebitLin1Storage [Collection:CustomerTable] Type:Ledger Child Of:"Sundry Debtors" Belongs To:Yes have a nice day
My brother, still not working. Your collection type is ledger. I need to select 'sundry debtors' (Group) at the field I'm pulling customer table( Table:CustomerTable) and u are using ledger collection there. I actually want to select sundry debtors at collection field and if say 10 ledgers are under sundry debtors, I want all the 10 ledgers debited automatically at once. in just one sales voucher captured. PROGRAMMERS, ANY IDEA ON HOW TO SOLVE THIS PROBLEM.
you need to create function for that, then call the functions in above entry. Your form design will also be change, instead selecting ledger you have to select the group.
Thanks so much my brother. Yes the problem is an idea of that function. My form design is selecting group and not ledger. U can see it bellow. [Collection:SundDebtLedgres] Title:"List Of Sundry Debtors" Type:Group;Ledger ;Child Of:$$GroupSundryDebtors ;Belongs to : yes ;Format : $Name,30 Align:Center The problem is that special function creation. If u have sample function codes, it will help me a lot. The purpose is more like making a batch invoice codes. LEARNED PROGRAMMERS, ANY ONE WITH AN IDEA OF MAKING BATCH INVOICE CODES.