I have written a small program in TDL which Prints Cash or Debit in the field Mode/Terms of Payment depending on the Party's Name. Here is my code: [#Line: EXPINV DueDate] Local : Field : NameField : Set as : if $$IsGroupCash:$Parent:Ledger:$InvPartyName then "Cash" else if $BasicDueDateOfPymt = "" then "Debit" else "Debit - " + $BasicDueDateOfPymt Local : Field : NameField : Set Always : Yes At first sight it looks like it works fine. But when I perform the actions shown below, I get a different behaviour of TDL. Create a Sales Voucher in tally (voucher-1) Enter the party name from cash or any ledger directly or indirectly under cash-in-hand enter the details of voucher and then save it print the voucher and you will see Cash printed in Mode/Terms of Payment field. Create a Sales Voucher in tally (voucher-2) Enter the party name as you like but other than cash or any ledger directly or indirectly under cash-in-hand enter the details of voucher and then save it print the voucher and you will see Debit printed in Mode/Terms of Payment field. So, my code is working well. That's exactly what I want. Problem: Open the voucher-2 in Alter mode. Change the party name to Cash or any ledger directly or indirectly under cash-in-hand save the voucher print the voucher and you will still see Debit printed in Mode/Terms of Payment Field instead of Cash. Does anybody knows why Mode/Terms of Payment field is not refreshing????
Vishal Try This You Want to Print DueDate of Pymt Based on PartyLedger Name, after editing the voucher also??? [#Line: EXPINV DueDate] Local : Field : NameField : Set as : if $$IsLedOfGrp:$LedgerName:$$Groupcash then "Cash" else "Debit - " + $BasicDueDateOfPymt Local : Field : NameField : Set Always : Yes
Thank you sir. That works well. But I am still not able to understand the difference between your code and my code. Can you please explain??
Our Purpose is to Print Duedateofpymt Field Based on Value stored in Partyname In order to achieve this we need to find the group of partyledgername using the function $$IsLedOfGrp:$LedgerName:$$Groupcash Based on the result it will Print Cash or Debit in yr condition u are checking for space, thats why it is not worked after editing
Dear Sir If i want to use a particular ledger i.e sales cash then print cash or else debit what will be the code
thank you sir for your guidance i have used the following code Set as : If $$Name:Ledger:#EIAccAllocName = "SALES-CREDIT" then "Credit" else "Cash Terms" but its not refreshing the terms in the edit mode , i.e once you change the sales-credit to sales cash it doesn't change in the print regards