hi all, I am trying to create a sales order voucher using this tdl. report is accepted but nothing happens. Tally shows the following message LABEL :9997:ORDERDATE and voucher is not created. TDL file is given below. [#Menu: Gateway of Tally] Add : Key Item : Before : @@locQuit : ADVANCE BOOKING : K : cREATE:advance booking [REPORT:ADVANCE BOOKING] FORM:ADVANCE BOOKING variable:temp Variable:abtotal Variable:abdateate On:Load:Yes:Call:setallzero [FORM:ADVANCE BOOKING] ;;Control : DateBelowBooksFrom : $Date < $$BooksFrom:Company:##SVCurrentCompany ;;Control : DateBelowFromDate : $Date < $$SystemPeriodFrom ;;Control : DateBeyondToDate : $Date > $$SystemPeriodTo on :form accept:yes:call:advancebooking:##temp-1:##abdate:#abname:#totalamount:#advance:#balance:#nar ;; in case of reject both of the below lines are compulsary ;;On:Reject:Yes:Call:setallzero ;;On : Reject : Yes : Form Reject Height : 80% Page Width : 80% Page PARTART1,PART2,PART3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PART 1 STARTS FROM HERE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [part : part1] line : line11,line12,line13 [line:line11] Fields : Medium Prompt, ABvchno Local : Field : Medium Prompt : Set as : $$LocaleString:"Voucher No.:" Space Bottom:0.5 [field : ABvchno] Use: NUMBER FIELD Skip:Yes [line:line12] Fields : Medium Prompt, ABDATE Local : Field : Medium Prompt : Set as : $$LocaleString:"Date" Space Bottom:0.5 [field : ABDATE] use:uni date field set as:##SVcurrentdate modifies:abdate:yes Set Always:yes [line:line13] Fields : Medium Prompt, ABname Local : Field : Medium Prompt : Set as : $$LocaleString:"Party Name:" Space Bottom:0.5 [field : ABName] use:name field table:collxn ledger Show Table : Always Key: Create Ledge Set Always:Yes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PART 2 STARTS FROM HERE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [PARTART2] LINE : abtitle,linedetail,abtotal Repeat : linedetail : List of Stock Items Break On : $$IsEndofList:#abitem scroll : vertical Total:abamount,abqty [line:abtitle] fields: a,b,c,d,e,f Space Bottom:0.5 Border: Column Titles [field:a] use:name field Set as : $$LocaleString:"Sr. No." align:centre width:5 [field:b] use:name field Set as : $$LocaleString:"Item Name" align:centre Width@amountwidth [field:c] use:name field Set as : $$LocaleString:"Quantity" Width : @@amountwidth align:centre [field:d] use:name field Set as : $$LocaleString:"Rate/1000" Width : @@amountwidth align:centre [field:e] Set as : $$LocaleString:"Amount" use:name field Width : @@amountwidth align:centre [field:f] Set as : $$LocaleString:"Godown" use:name field align:centre Width@amountwidth [LINE:linedetail] Fields:absrno,abitem,abqty,abrate,abamount,abgodown [FIELD:absrno] USE:number FIELD Width : 5 set as:$$line skip:yes modifies:temp:yes [FIELD:abitem] USE:NAME FIELD Table : List of Stock Items, end of list Show Table : Always align:centre modifies:listabitem[$$line]:yes Width : @@amountwidth [FIELD:abqty] USE:amount FIELD ;;type:amount Width : @@amountwidth Inactive : $$Issysname:#abitem Validate : NOT $$IsEmpty:#abqty modifies:listabqty[$$line]:yes [FIELD:abrate] USE:amount FIELD Width : @@amountwidth set as:#abamount*1000/#abqty set always:yes Inactive : $$Issysname:#abitem modifies:listabrate[$$line]:yes [FIELD:abamount] USE:amount FIELD Width : @@amountwidth Set as:#abqty*#abrate/1000 set always:yes Inactive:$$Issysname:#abitem Validate:NOT $$IsEmpty:#abamount modifies:listabamount[$$line]:yes [FIELD:abgodown] USE:NAME FIELD align:centre Table : List of godowns,any Show Table : Always Width : @@amountwidth Inactive : $$Issysname:#abitem set always:yes modifies:listabgodown[$$line]:yes [line:abtotal] field:short prompt,abtotalqty,abtotalamount local:field:short prompt:set as:$$localestring:"TOTAL" Space Top:1 Indent:8 [field:abtotalqty] Border:totals use:amount field width@amountwidth skip:yes Set as:$$Total:abqty set always:yes [field:abtotalamount] Border:totals use:amount field width@amountwidth skip:yes Set as:$$Total:abamount set always:yes Space Left:14 Modifies:abtotal:Yes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PART 3 STARTS FROM HERE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [partart3] line:line31,line32,line33,line34 [line:line31] field:medium prompt, total amount Local : Field : Medium Prompt : Set as : $$LocaleString:"Total Amount:" Space Bottom:0.5 [FIELD:totalamount] USE:amount FIELD Width : @@AmountWidth SET ALWAYS:YES set as:##abtotal skip:yes [line:line32] field:medium prompt, advance Local : Field : Medium Prompt : Set as : $$LocaleString:"Advance Deposit:" Space Bottom:0.5 [FIELD:advance] use:amount field Width : @@AmountWidth [line:line33] field:medium prompt, balance Local : Field : Medium Prompt : Set as : $$LocaleString:"Balance Amount:" Space Bottom:0.5 [FIELD:balance] USE:amount FIELD Width : @@AmountWidth set as : IF #advance>#totalamount then 0 else #totalamount-#advance SET ALWAYS:YES skip:yes [line:line34] field:medium prompt, nar Local : Field : Medium Prompt : Set as : $$LocaleString:"Narration:" Space Bottom:0.5 [FIELD:nar] Use : name Field Width : 30 ;;Set as: ##listabitem[1]+"--"+$$string:##listabamount[1]+"--"+##listabgodown[1]+"::"+##listabitem[2]+"--"+$$string:##listabamount[2]+"--"+##listabgodown[2]+":::" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [System:Variables] list variable:listabitem:STRING:10 list variable:listabqty:amount:10 list variable:listabrate:amount:10 list variable:listabamount:amount:10 list variable:listabgodown:STRING:10 [variable:temp] type:number [variable:abtotal] type:Amount [COLLECTION: COLLXN LEDGER] TYPE:LEDGER USE:ALIAS COLLECTION FETCH:NAME ;;Format : $LedgerName, 25 ;;CHILDOF:SUNDRYCREDITORS [COLLECTION: COLLXN ITEM] TYPE:STOCK ITEM USE:ALIAS COLLECTION [COLLECTION: COLLXN GODOWN] TYPE:GODOWN USE:ALIAS COLLECTION [Key: Create Ledge] Key : Alt+C Action : Create :Ledger [function:ADVANCEBOOKING] Parameter:Temp:Number Parameter:abdateate Parameter:abname:String Parameter:totalAmount:Amount Parameter:advance:Amount Parameter:balance:Amount Parameter:nar:String Variable:counter:Number Returns:String Variable:mynar:String ;;Variable:a:String 10:Set:counter:1 ;;2:Set:a:"" 20:While:##counter<=##temp 30:set:mynar:##mynar+$$String:##listabqty[##counter]+"("+$$String:##listabitem[##counter]+")@"+$$String:##listabrate[##counter]+"="+$$String:##listabamount[##counter]+" from "+$$String:##listabgodown[##counter] 40:If:##counter<##temp 50:Set:mynar:##mynar+" & " 60:End If 70:Increment:counter 80:End While 90:Set:mynar:"Booked: "+##mynar+" Total Amount:"+$$String:##totalamount+" "+##nar 100:Set:counter:1 ;;110:Msg Box:nar:##mynar ;; returns:string ;; variable:mynarr:string 800 : Set : SVViewName :$$SysName:InvVchView 900 : SET : SV VoucherType : $$VchTypeSalesOrder 1000 : NEW OBJECT : Voucher 1200 : SET VALUE : Date : "01-05-2015";;##abdate 1300 : SET VALUE : VoucherTypeName : $$String:$$VchTypeSalesOrder 1400 : SET VALUE : NARRATION : ##mynar 1500 : Set Value : REFERENCE : ##ABDATE 1600 : Set Value : PARTYLEDGERNAME : ##ABNAME 1700 : INSERT COLLECTION OBJECT : LedgerEntries 1800 : SET VALUE : LedgerName : ##ABNAME 1900 : SET VALUE : IsDeemedPositive: Yes 2000 : SET VALUE : ISPARTYLEDGER :Yes 2100 : Set Value : AMOUNT :$$Negative:##totalamount 2200 : SET TARGET : .. ;;2300 : Set:counter:1 ;;2400 : While:##counter<=##temp 2500 : INSERT COLLECTION OBJECT : ALLINVENTORYENTRIES ;;2600 : SET TARGET : allinventoryentries 2700 : SET VALUE : Stock Item Name : ##listabitem[##counter] 2800 : SET VALUE : IsDeemedPositive: No ;;2900 : SET VALUE : rate : $$String:##listabrate[##counter] 3000 : SET VALUE : amount : ##listabamount[##counter] 3100 : Set Value : actualqty : ##listabitem[##counter] 3200 : Set Value : billedqty : ##listabitem[##counter] ;; 3300 : SET TARGET : .. 3500 : INSERT COLLECTION OBJECT : BATCHALLOCATIONS ;;3600 : SET TARGET : batchallocations 3700 : SET VALUE : godownname : ##listabgodown[##counter] 3800 : SET VALUE : batchname : "Primary batch" 3900 : SET VALUE : destinationgodownname : ##listabgodown[##counter] 4000 : SET VALUE : amount : ##listabamount[##counter] 4100 : Set Value : actualqty : ##listabitem[##counter] 4200 : Set Value : billedqty : ##listabitem[##counter] 4300 : Set Value : ORDER DATE :"01-05-2015" ;;4400 : SET TARGET : ALLINVENTORYENTRIES 4400 : Set Target:.. 4500 : INSERT COLLECTION OBJECT : ACCOUNTINGALLOCATIONS ;;4600 : SET TARGET : accountingallocations 4700 : SET VALUE : ledgername : "sales a/c" 4800 : SET VALUE : IsDeemedPositive: No 4900 : SET VALUE : ispartyledger:No 5000 : SET VALUE : amount : ##listabamount[##counter] ;;5400 : SET TARGET : ACCOUNTINGALLOCATIONS ;;5500 : Set Target: ALLINVENTORYENTRIES 5400:Set Target:.. 5500:Set Target:.. 9996 : Set Value : PersistedView : ##SVViewName 9997 : CREATE TARGET 9998 : Call:setallzero 9999 : RETURN [Function:setallzero] Variable:counter:Number ;;Returns:String 10000:Set:counter:1 ;;10100:Msg Box:Function:"This is set all zero function" 11000:While:##counter<=$$ListCount:listabitem or ##counter<=10 12000:Set:listabitem[##counter]:"" 12001:Set:listabqty[##counter]:"" 12002:Set:listabrate[##counter]:"" 12003:Set:listabamount[##counter]:"" 12004:Set:listabgodown[##counter]:"" 12100:Increment:counter 13000:End While 13500:Action:Refresh Data ;;14000:Return