plz correct my tdl for working

Discussion in 'Tally Developer' started by R. VIJAY, Mar 29, 2014.

    
  1. R. VIJAY

    R. VIJAY Member


    Hello Developers, First of all thank you to forum Developers for giving idea to get tdl, But I have a Problem with tdl, plz developers give me an idea to solve problem.

    I am using the tdl,
    1. If i enter payment voucher like 10 voucher and change to Receipt voucher and enter voucher in receipt voucher i am not getting details in narration i exit voucher create screen and again open create receipt voucher and enter voucher display details narration,
    2. if i enter some voucher in payment, receipt and contra some vouchers give details in narration and some vouchers not give narration
    3. And also not getting alter cheque number in narration when i alter payment, receipt and contra vouchers
    4. If i am not giving any details in bank allocation then i want blank narration

    once again thanks to Maulik Patel Sir, HVPatel Sir and Taufeeq Shaikh Sir for giving idea to create tdl

    The tdl:
    [#Field: VCH Narration]
    Option : VCH Narration Alter : $$InAlterMode
    Use : Voucher Narration Field
    Lines : 4
    Width : 65% Page
    Storage : Narration
    Set as: If $$IsReceipt:$VoucherTypeName then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate + ", " + "Drawn on " + $LedgerEntries[1].BankAllocations.BankName + ", " + $LedgerEntries[1].BankAllocations.BranchName else +
    If $$IsPayment:$VoucherTypeName Or $$IsContra:$VoucherTypeName Then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + " " + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate else " "
    Set Always : Yes

    [!Field : VCH Narration Alter]
    Use : Voucher Narration Field
    Lines : 4
    Width : 65% Page
    Storage : Narration
    Set as: If $$IsReceipt:$VoucherTypeName then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate + ", " + "Drawn on " + $LedgerEntries[1].BankAllocations.BankName + ", " + $LedgerEntries[1].BankAllocations.BranchName else +
    If $$IsPayment:$VoucherTypeName Or $$IsContra:$VoucherTypeName Then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + " " + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate else " "
    Set Always : Yes

    [#Object : Ledger Entry]
    MyBankAllocations : $$FullList:BankAllocations:$InstrumentNumber


    Give me idea to correct tdl for working tdl of my requirement, Sorry for my bad english
     


  2. Maulik Patel

    Maulik Patel Active Member


    Dear R Vijay,

    We are very glad to see that now you are not asking for code...!!!
    It is a good sign for you as you are trying by your self instead of asking code.

    Just try ##SVVoucherType instead of $VoucherTypeName in your formula and try it so that your major queries will be solved.
     


  3. R. VIJAY

    R. VIJAY Member


    I update above tdl like this

    [#Field: VCH Narration]
    Use : Voucher Narration Field
    Lines : 4
    Width : 65% Page
    Storage : Narration
    Option : VCH Narration Create : $$InCreateMode
    Option : VCH Narration Alter : $$InAlterMode

    [!Field : VCH Narration Create]
    Set as : If Not $$IsEmpty:($$FullList:LedgerEntries:$MyBankAllocations) then (If $$IsContra:##SVVoucherType Or $$IsPayment:##SVVoucherType then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate else (If $$IsReceipt:##SVVoucherType Then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + " " + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate + ", " + "Drawn on " + $LedgerEntries[1].BankAllocations.BankName + ", " + $LedgerEntries[1].BankAllocations.BranchName else " ")) else " "
    Set Always : Yes

    [!Field : VCH Narration Alter]
    Set as : If Not $$IsEmpty:($$FullList:LedgerEntries:$MyBankAllocations) then (If $$IsContra:##SVVoucherType Or $$IsPayment:##SVVoucherType then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate else (If $$IsReceipt:##SVVoucherType Then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + " " + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate + ", " + "Drawn on " + $LedgerEntries[1].BankAllocations.BankName + ", " + $LedgerEntries[1].BankAllocations.BranchName else " ")) else " "
    Set Always : Yes

    [#Object : Ledger Entry]
    MyBankAllocations : $$FullList:BankAllocations:$InstrumentNumber

    But i get errors using tdl
    1. If i enter transaction of self drawing in contra without cheque number the narration display blank after that transaction i enter any transaction of self drawing with cheque number narration display blank narration.
    2. If i enter some transactions in payment and press F6 to change receipt enter 1st transaction it display blank narration then enter next transaction it displays cheque numbers in narration and then change to payment again 1st transation displays blank narration and contra is also like that
    3. I am not get alter cheque number in voucher altermode in payment and receipt. only in contra i get alter cheque number in altermode

    plz give me suggations for where i change the formula in above tdl
    Thanks in advance
     


  4. JObimon Arackal JOhn

    JObimon Arackal JOhn Active Member




    Glad to know that you are trying to create TDL and giving effort


    you have given only two conditions. give condtion if $$Iscontra......... what you want tdl to do.like If $$IsReceipt:
     


  5. R. VIJAY

    R. VIJAY Member


    I change tdl like below and again same problems i post in 2nd replay comes sir

    [#Field: VCH Narration]
    Use : Voucher Narration Field
    Lines : 4
    Width : 65% Page
    Storage : Narration
    Option : VCH Narration Create : $$InCreateMode
    Option : VCH Narration Alter : $$InAlterMode

    [!Field : VCH Narration Create]
    Set as : If Not $$IsEmpty:($$FullList:LedgerEntries:$MyBankAllocations) And $$IsReceipt:##SVVoucherType then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate + ", " + "Drawn on " + $LedgerEntries[1].BankAllocations.BankName + ", " + $LedgerEntries[1].BankAllocations.BranchName else +
    If Not $$IsEmpty:($$FullList:LedgerEntries:$MyBankAllocations) And $$IsPayment:##SVVoucherType Then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + " " + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate else +
    If Not $$IsEmpty:($$FullList:LedgerEntries:$MyBankAllocations) And $$IsContra:##SVVoucherType Then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + " " + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate else " "
    Set Always : Yes

    [!Field : VCH Narration Alter]
    Set as : If Not $$IsEmpty:($$FullList:LedgerEntries:$MyBankAllocations) And $$IsReceipt:##SVVoucherType then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate + ", " + "Drawn on " + $LedgerEntries[1].BankAllocations.BankName + ", " + $LedgerEntries[1].BankAllocations.BranchName else +
    If Not $$IsEmpty:($$FullList:LedgerEntries:$MyBankAllocations) And $$IsPayment:##SVVoucherType Then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + " " + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate else +
    If Not $$IsEmpty:($$FullList:LedgerEntries:$MyBankAllocations) And $$IsContra:##SVVoucherType Then "Chq No. - " + $$FullList:LedgerEntries:$MyBankAllocations + " " + "dt. " + $$String:$LedgerEntries[1].BankAllocations.InstrumentDate else " "
    Set Always : Yes
    [#Object : Ledger Entry]
    MyBankAllocations : $$FullList:BankAllocations:$InstrumentNumber

    [System : Formula]
    IsBankLedger: ($$IsLedofGrp:$LedgerName:$$GroupBank Or $$IsLedofGrp:$LedgerName:$$GroupBankOD)
     


  6. R. VIJAY

    R. VIJAY Member


    hello developers can any one provide solution for my problem
     


Share This Page