How to get Bank Allocations in a separate Report

Discussion in 'Free Source Codes' started by Ch Suresh, Oct 25, 2023.

    
  1. Ch Suresh

    Ch Suresh Member


    Dear Experts, Greetings of the Day...!

    Please guide me to fetch the Bank allocation fields like
    1. Transaction Type
    2. Instrument Number
    3. Neft/RTGS Date
    4. Bank Name, in a separate report. Here i am attaching my code please go through and guide me


    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    [#Menu:Gateway of Tally]
    Add:Item : Before:mad:@locquit:BLANK
    Add:Key Item:Before:mad:@locquit:Excel Report:E:Display:ExcelReport

    [Report:ExcelReport]
    Title:"AADITRI HOUSING EXCEL REPORT"
    Set:Report Title : "EXCEL REPORT"
    PrintSet: Report Title :"EXCEL REPORT"
    Variable:SVFromDate,SvToDate
    Set:SvFromDate:##SvcurrentDate
    Set:SvToDate:##SvcurrentDate

    Form:ExcelReport
    [Form:ExcelReport]
    Use:Dsp Template
    Width:99% page
    Height:99% Page
    Part:ExcelReport

    [Part:ExcelReport]
    Top Line:ExcelReportTitle,ExcelReportBody
    Repeat:ExcelReportBody:ExcelReportCollection
    Bottom Line:ExcelReportBottom

    Common Border:Yes
    Scroll:Both
    Float:No

    [Line:ExcelReportTitle]
    Border:Thin Top Bottom
    Space Bottom:1 mms
    Space Top:1 mms
    Field:ChsDate,ChsVchno,ChsVchtype,ChsCostCentre,ChsLedGroup,ChsLedName,ChsLedNameAlias,
    Right Field:ChsTaxblevalue,ChsCgst,ChsSgst,ChsIgst,ChsTds,ChsDebitAmount,ChsDebitLedger,ChsTransaction,+
    ChsNeftNo,ChsBankName,ChsNeftDate,ChsNarration

    Local:Field:Default:Style:Normal Bold
    Local:Field:Default:Align:Center
    Local:Field:Default:Background:Light Yellow
    Local:Field:Default:Lines:0

    Local:Field:ChsDate :Set as:$$LocaleString:"Date"
    Local:Field:ChsVchno :Set as:$$LocaleString:"Vch No"
    Local:Field:ChsVchtype :Set as:$$LocaleString:"Vch Type"
    Local:Field:ChsCostCentre :Set as:$$LocaleString:"Cost Centre"
    Local:Field:ChsLedGroup :Set as:$$LocaleString:"Ledger Group"
    Local:Field:ChsLedName :Set as:$$LocaleString:"Ledger Name"
    Local:Field:ChsLedNameAlias :Set as:$$LocaleString:"Ledger Alias"
    Local:Field:ChsTaxblevalue :Set as:$$LocaleString:"Taxble Value"
    Local:Field:ChsCgst :Set as:$$LocaleString:"CGST Amount"
    Local:Field:ChsSgst :Set as:$$LocaleString:"SGST Amount"
    Local:Field:ChsIgst :Set as:$$LocaleString:"IGST Amount"
    Local:Field:ChsTds :Set as:$$LocaleString:"TDS Amount"
    Local:Field:ChsDebitAmount :Set as:$$LocaleString:"Net Amount"
    Local:Field:ChsDebitLedger :Set as:$$LocaleString:"Bank Name / Debit Name"
    Local:Field:ChsTransaction :Set as:$$LocaleString:"Transaction Type"
    Local:Field:ChsNeftNo :Set as:$$LocaleString:"NEFT/RTGS/CHEQUE No"
    Local:Field:ChsBankName :Set as:$$LocaleString:"Bank Name"
    Local:Field:ChsNeftDate :Set as:$$LocaleString:"NEFT/RTGS/CHEQUE Date"
    Local:Field:ChsNarration :Set as:$$LocaleString:"Narration"


    [Line:ExcelReportBody]
    Field:ChsDate,ChsVchno,ChsVchtype,ChsCostCentre,ChsLedGroup,ChsLedName,ChsLedNameAlias,
    Right Field:ChsTaxblevalue,ChsCgst,ChsSgst,ChsIgst,ChsTds,ChsDebitAmount,ChsDebitLedger,ChsTransaction,+
    ChsNeftNo,ChsBankName,ChsNeftDate,ChsNarration

    [Field:ChsDate]
    Use:Name Field
    Set as:$Date
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsVchno]
    Use:Name Field
    Set as:$VoucherNumber
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsVchtype]
    Use:Name Field
    Set as:$Name:VoucherType:$VoucherTypeName;$ChsVchType
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsCostCentre]
    Use:Name Field
    Set as:$ChsCost
    Align:Left
    Width:30 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsLedGroup]
    Use:Name Field
    Set as:$ChsLedGrp
    Align:Left
    Width:30 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsLedName]
    Use:Name Field
    Set as:$ChsLedname
    Align:Left
    Full Width:Yes
    Border:Thin Left
    Style:Normal
    Lines:0
    [Field:ChsLedNameAlias]
    Use:Name Field
    Set as:$ChsLedalias
    Align:Left
    Full Width:Yes
    Border:Thin Left
    Style:Normal
    Lines:0
    [Field:ChsTaxblevalue]
    Use:Name Field
    Set as:$Amount
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsCgst]
    Use:Name Field
    Set as:$ChsCAmt
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal

    [Field:ChsSgst]
    Use:Name Field
    Set as:$ChsSAmt
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal

    [Field:ChsIgst]
    Use:Name Field
    Set as:$ChsIAmt
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal

    [Field:ChsTds]
    Use:Name Field
    Set as:$ChsTDSAmt
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal

    [Field:ChsDebitAmount]
    Use:Name Field
    Set as:$$Number:#ChsTaxblevalue+$$Number:#ChsCgst+$$Number:#ChsSgst+$$Number:#ChsIgst+$$Number:#ChsTds
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    Set Always:Yes
    [Field:ChsDebitLedger]
    Use:Name Field
    Set as:$ChsDebitLedgername
    Align:Left
    Full Width:Yes
    Lines:0
    Border:Thin Left
    Style:Normal
    [Field:ChsTransaction]
    Use:Name Field
    Set as:$TransactionType
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsNeftNo]
    Use:Name Field
    Set as:$InstrumentNumber
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsBankName]
    Use:Name Field
    Set as:$BankName
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsNeftDate]
    Use:Name Field
    Set as:$InstrumentDate
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal
    [Field:ChsNarration]
    Use:Name Field
    Set as:$ChsNarration
    Align:Left
    Full Width:Yes
    Border:Thin Left
    Style:Normal



    [Line:ExcelReportBottom]
    Border:Thin Top Bottom
    Space Bottom:1 mms
    Space Top:1 mms
    Field:ChsDate,ChsVchno,ChsVchtype,ChsCostCentre,ChsLedGroup,ChsLedName,ChsLedNameAlias,
    Right Field:ChsTaxblevalue,ChsCgst,ChsSgst,ChsIgst,ChsTds,ChsDebitAmount,ChsDebitLedger,ChsTransaction,+
    ChsNeftNo,ChsBankName,ChsNeftDate,ChsNarration

    Local:Field:ChsDate :Set as:$$LocaleString:""
    Local:Field:ChsVchno :Set as:$$LocaleString:""
    Local:Field:ChsVchtype :Set as:$$LocaleString:""
    Local:Field:ChsCostCentre :Set as:$$LocaleString:""
    Local:Field:ChsLedGroup :Set as:$$LocaleString:""
    Local:Field:ChsLedName :Set as:$$LocaleString:""
    Local:Field:ChsLedNameAlias :Set as:$$LocaleString:""
    Local:Field:ChsTaxblevalue :Set as:$$LocaleString:""
    Local:Field:ChsCgst :Set as:$$LocaleString:""
    Local:Field:ChsSgst :Set as:$$LocaleString:""
    Local:Field:ChsIgst :Set as:$$LocaleString:""
    Local:Field:ChsTds :Set as:$$LocaleString:""
    Local:Field:ChsDebitAmount :Set as:$$LocaleString:""
    Local:Field:ChsDebitLedger :Set as:$$LocaleString:""
    Local:Field:ChsTransaction :Set as:$$LocaleString:""
    Local:Field:ChsNeftNo :Set as:$$LocaleString:""
    Local:Field:ChsBankName :Set as:$$LocaleString:""
    Local:Field:ChsNeftDate :Set as:$$LocaleString:""
    Local:Field:ChsNarration :Set as:$$LocaleString:""


    [Collection:ExcelReportCollection]
    Type:Vouchers
    Compute:ChsCost:$CostCentreName
    Compute:ChsLedGrp:$Parent:Ledger:$Ledgername
    Compute:ChsLedname:$Ledgername
    Compute:ChsLedalias:$LedgerAlias;$Ledgername+"("+$LedgerAlias+")"
    Compute:ChsCAmt:$$FilterAmtTotal:LedgerEntries:cGST1:$Amount
    Compute:ChsSAmt:$$FilterAmtTotal:LedgerEntries:SGST1:$Amount
    Compute:ChsIAmt:$$FilterAmtTotal:LedgerEntries:IGST1:$Amount
    Compute:ChsTDSAmt:$$FilterAmtTotal:LedgerEntries:TDSGST1:$Amount
    Compute:ChsDebitLedgername:$PArtyledgername
    Compute:ChsNarration:$Narration
    Fetch:Transactiontype, InstrumentNumber,InstrumentDate,BankName
    Fetch:*.*
    Belongs To:Yes
    [System:Formula]
    cGST1 :$Name:Ledger:$LedgerName Contains $$LocaleString:"CGST"
    SGST1 :$Name:Ledger:$LedgerName Contains $$LocaleString:"SGST"
    IGST1 :$Name:Ledger:$LedgerName Contains $$LocaleString:"IGST"
    TDSGST1 :$Name:Ledger:$LedgerName Contains $$LocaleString:"TDS"
     


  2. Ch Suresh

    Ch Suresh Member


    Can anyone please help me out
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $AllLedgerEntries[2].BankAllocations[1].InstrumentNumber -- and so on for the required fields.
     


  4. Ch Suresh

    Ch Suresh Member


    Thankyou sir,
     


  5. Ch Suresh

    Ch Suresh Member


    Dear Amit Sir, in the above code Credit ledger name and debit ledger name are showing the same, please correct me sir

    upload_2023-10-27_12-15-16.png
     
    Last edited: Oct 27, 2023


  6. Bipin Damania

    Bipin Damania Active Member


    $BankName ?
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [Field:ChsBankName]
    Use:Name Field
    Set as: $AllLedgerEntries[2].BankAllocations[1].BankName
    Align:Left
    Width:20 mms
    Border:Thin Left
    Style:Normal

    Above code PICKS up the Value from the BankAllocation subform and not the DEBIT of Voucher.
    In case this is not a Payment/Receipt Voucher then make a conditional "Set As"-- If Empty bank Name then $LedgerEntries.LedgerName
     


  8. Ch Suresh

    Ch Suresh Member


    Dear Sir, CGST, SGST and IGST are not getting for Journal voucher, please guide me

    [Collection:ExcelReportCollection]
    Type:Vouchers
    Compute:ChsCost:$CostCentreName
    Compute:ChsLedGrp:$Parent:Ledger:$Ledgername
    Compute:ChsLedname:$Ledgername
    Compute:ChsLedalias:$LedgerAlias;$Ledgername+"("+$LedgerAlias+")"
    Compute:ChsCAmt:$$FilterAmtTotal:LedgerEntries:cGST1:$Amount
    Compute:ChsSAmt:$$FilterAmtTotal:LedgerEntries:SGST1:$Amount
    Compute:ChsIAmt:$$FilterAmtTotal:LedgerEntries:IGST1:$Amount
    Compute:ChsTDSAmt:$$FilterAmtTotal:LedgerEntries:TDSGST1:$Amount
    Compute:ChsDebitLedgername:$PArtyledgername
    Compute:ChsNarration:$Narration
    Fetch:Transactiontype, InstrumentNumber,InstrumentDate,BankName
    Fetch:*.*
    Belongs To:Yes
    [System:Formula]
    cGST1 :$Name:Ledger:$LedgerName Contains $$LocaleString:"CGST"
    SGST1 :$Name:Ledger:$LedgerName Contains $$LocaleString:"SGST"
    IGST1 :$Name:Ledger:$LedgerName Contains $$LocaleString:"IGST"
    TDSGST1 :$Name:Ledger:$LedgerName Contains $$LocaleString:"TDS"


    upload_2023-10-31_16-43-59.png
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    In your above SAMPLE -- DR is equal to CR --- then it will generate ZERO only?
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member



  11. Ch Suresh

    Ch Suresh Member


    Yes sir, but the customer entered journals like that only, is there any chance to get the credit gst values?
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Compute:ChsCAmt: If NOT $$IsDr:$Amount Then $$FilterAmtTotal:LedgerEntries:cGST1:$Amount Else 0
     


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    And your customer needs to do proper Accounting treatment ----
    Dr Rama and Cr to Advance would have sufficed for this entry.
     


Share This Page