Hi Friends, This code helps you to set price level of all the ledgers under a group (Sundry debtors,Sundry Creditors) at a glance instead of set price level one by one of all the ledgers under debtors or creditors. ;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara [#Menu: Gateway of Tally] Key Item : Ledger alteration : G: eXECUTE : Led Method Alteration [Report: Led Method Alteration] Form : Led Method Alteration Local : Collection: Ledger: Fetch : Ledpricelevel, Parent Fetch Collection : Ledger [Form: Led Method Alteration] Parts : Form Subtitle, Led Method Alteration Local : Field : Form SubTitle : Info : "Ledger Methods Alteration within a Group" Width : 40% Page On : Form Accept : Yes : Call : AlterLedMethod:#SATGroup:#SATpricelevelapply [Part: Led Method Alteration] Lines : SAT Group, SAT price level apply [Line: SAT Group] Fields : Medium Prompt, SAT Group Local : Field : Medium Prompt : Info : "Under Group :" [Field: SAT Group] Use : Name Field Table : Group [Line: SAT price level apply] Fields : Medium Prompt, SAT price level apply Local : Field : Medium Prompt : Info : "Price Level Applicable ?" Indent : 2 [Field: SAT price level apply] Use : Name Field Set As : $$FilterValue:$Pricelevel:Ledger:1:TSPLSmpParentFilter Set Always : Yes Inactive : $$IsEmpty:#SATGroup [System: Formula] TSPL Smp ParentFilter : $Parent = #SATGroup [Collection: LedUnderLGroup] Type : Ledger Child Of : ##InputLGroup Fetch : Name, Parent [Function: AlterLedMethod] Variable : Counter : Number ;; Definition Block Parameter : InputLGroup : String Parameter : InputPricelevel : String ;; Procedural Block 00 : SET : Counter : 0 01 : START PROGRESS : ($$NumItems:LedUnderLGroup) : "Ledger Altering " : @@CmpMailName : "Ledger Altering ..." 02 : WALK COLLECTION: LedUnderLGroup 03 : SET TARGET : (Ledger, $Name). 04 : SET VALUE : Pricelevel : ##InputPricelevel 05 : aLTER TARGET 06 : INCREMENT : Counter 07 : SHOW PROGRESS : ##Counter 08 : END WALK 09 : END PROGRESS 10: MSGBOX : "Success !!" : "Ledger altered successfully" 20 : RETURN ;; End-of-File
Dear Sattamji BEST WISHES OF THE DAY !!!!!! SIR, will u please help me out regarding errors in my tdl. if yes then i will post u my tdl regarding xml file. thanks an regards
Hello Sir, This is wonderful works. I am weak in tdl fuctions and trying to learn from several postings. If I want to set check ,like if price level already existed with ledgers should skip. I mean function will only alter those ledgers which Price level not yet set. Thank you
Dear Sattam Sir, Thats great. Thank you for your informative and soonest reply. After studying your updates codes, I am trying to do something else. Thank you for youe reply.
Dear Sattam Sir, Based on your codes I am trying to alter Ledger Group name with condition of ClosingBalance. While I am trying without condition Its getting changes. Will you please clarify me why i am not getting success while giving condition like If: $$IsDr:$Closingbalance Changes of your codes are as follows. Thank you Code: [#Menu: Gateway of Tally] Key Item : Ledger alteration : G: eXECUTE : Led Method Alteration [Report: Led Method Alteration] Form : Led Method Alteration Local : Collection: Ledger: Fetch : Parent, Closingbalance Fetch Collection : Ledger [Form: Led Method Alteration] Parts : Form Subtitle, Led Method Alteration Local : Field : Form SubTitle : Info : "Ledger Methods Alteration within a Group" Width : 40% Page On : Form Accept : Yes : Call : AlterLedMethod:#SATGroup:#SATGroupNameapply [Part: Led Method Alteration] Lines : SAT Group, SAT Group Name apply [Line: SAT Group] Fields : Medium Prompt, SAT Group Local : Field : Medium Prompt : Info : "Under Group :" [Field: SAT Group] Use : Name Field Table : Group [Line: SAT Group Name apply] Fields : Medium Prompt, SAT Group Name apply Local : Field : Medium Prompt : Info : "Price Level Applicable ?" Indent : 2 [Field: SAT Group Name apply] Use : Name Field ;Set as : $$FilterValue:$Group:Ledger:1:TSPLSmpParentFilter ;$$FilterValue:$Pricelevel:Ledger:1:TSPLSmpParentFilter Table: Group Set Always : Yes Inactive : $$IsEmpty:#SATGroup [System: Formula] TSPL Smp ParentFilter : $Parent = #SATGroup [Collection: LedUnderLGroup] Type : Ledger Child Of : ##InputLGroup Fetch : Name, Parent, ClosingBalance [Function: AlterLedMethod] Variable : Counter : Number ;; Definition Block Parameter : InputLGroup : String Parameter : InputGroupName : String ;; Procedural Block 00 : SET : Counter : 0 01 : START PROGRESS : ($$NumItems:LedUnderLGroup) : "Ledger Altering " : @@CmpMailName : "Ledger Altering ..." 02 : WALK COLLECTION: LedUnderLGroup 03 : SET TARGET : (Ledger, $Name). ;05 : IF : $$IsDr:$ClosingBalance;$$IsEmpty:$Pricelevel ;05a: End Walk ;05b: Else 04 : Set Value : Parent : ##InputGroupName 05 : aLTER TARGET 06 : INCREMENT : Counter 07 : SHOW PROGRESS : ##Counter 08 : END WALK 09 : END PROGRESS 10: MSGBOX : "Success !!" : "Ledger altered successfully" 20 : RETURN ;; End-of-File
Try This [Function: AlterLedMethod] Variable : Counter : Number ;; Definition Block Parameter : InputLGroup : String Parameter : InputGroupName : String ;; Procedural Block 00 : SET : Counter : 0 01 : START PROGRESS : ($$NumItems:LedUnderLGroup) : "Ledger Altering " : @@CmpMailName : "Ledger Altering ..." 02 : WALK COLLECTION: LedUnderLGroup 03 : SET TARGET : (Ledger, $Name). 04 : Set Value : Parent : If $$IsDr:$ClosingBalance Then $Parent else ##InputGroupName 05 : aLTER TARGET 06 : INCREMENT : Counter 07 : SHOW PROGRESS : ##Counter 08 : END WALK 09 : END PROGRESS 10: MSGBOX : "Success !!" : "Ledger altered successfully" 20 : RETURN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Dear Sattam Sir, Thank you for your earliest reply. I had send you a mail. if possible plz reply on that. Another mail will be send by June Mid. Hope you will like that. Thanks much for your presious time.