How to fetch bank balance (Reconcile balance)?

Discussion in 'Free Source Codes' started by Jenny, Sep 5, 2023.

    
  1. Jenny

    Jenny Active Member


    Code:
    [#Line: DSP VchClAmt]
    Add:Right Fields  : Before:Info Field:DSPReconcileTitClAmt,DSPReconcileClDrAmt,DSPReconcileClCrAmt
    
    [Field:DSPReconcileTitClAmt]
        Use        : Name Field
        Set as    : "Bank Balance:"
        Color    :"Red"
    
    [Field:DSPReconcileClDrAmt]
        Use     : Amount Field
        Set as  :  "" ;;;i need amount in this field
        Style   : Normal Bold
        Color    : "Red"
        Set Always:Yes
       
    [Field:DSPReconcileClCrAmt]
        Use     : Amount Field
        Set as  : "" ;;;i need amount in this field
        Style   : Normal Bold
        Color    : "Blue"
        Set Always:Yes
     


  2. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    He he... Quite lengthy process ..

    Create Source Collection of Bank Ledger
    Create another collection based on source Collection and Walk bank allocations filter it where $BankersDate is Empty or not within ##SVFromDate and ##SVToDate
    Create a function to walk through second collection
    in function get Total debit and Total credit of $TranscationAmount in collection

    Plus/Minus this amount from ledger balance
     
    Jenny likes this.


  3. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    You have to modify the code according to your requirements and also the name of the Bank Ledger in First collection

    Try

    Code:
    
    [#Menu   : Gateway of Tally]
    
        Add     : Key Item  :   At End:   "Tax UnReconciled Totals"    : U: Call: TaxoShowUnReconciled
        Add     : Indent    :   At End: ""
      
      
    [Function    : TaxoShowUnReconciled]
      
        100    :        Modify Variables    : Change Period
        200    :        Display    : Jenny Report
      
    
    [Report    : Jenny Report]
        Form    : Jenny Report
      
        Variable    : SvFromDate, SvToDate
      
        [Form    : Jenny Report]
            Part    : Jenny Report
          
            Use        : DSP Template
            Height    : 10 % Screen
            Width    : 30 % Screen
            Set    : SvFromDate : ##SvFromDate
            Set    : SvToDate    : ##SvToDate
          
            [Part    : Jenny Report]
                Line: Jenny Report
                Repeat    : Jenny Report : TaxoRecoSummary
              
    [Line: Jenny Report]
    
    Right Fields  : DSPReconcileTitClAmt,DSPReconcileClDrAmt,DSPReconcileClCrAmt
    
    [Field:DSPReconcileTitClAmt]
        Use        : Name Field
        Set as    : "Bank Balance:"
        Color     :"Red"
    
    [Field:DSPReconcileClDrAmt]
        Use     : Amount Field
        Set as  : $RecoDebit    ;"" ;;;i need amount in this field
        Style   : Normal Bold
        Color    : "Red"
        Set Always:Yes
     
    [Field:DSPReconcileClCrAmt]
        Use     : Amount Field
        Set as  : $RecoCredit ;;;i need amount in this field
        Style   : Normal Bold
        Color    : "Blue"
        Set Always:Yes
              
          
      
    [Collection: TaxoBankRecoCollection]
          
            Type  : Vouchers: Ledger
            Child of : "SBI Current A/c -33366639989"    ;##svTaxoBankLedger   ;:"450-63-02-O.B.C"
            Fetch    : Date
            Fetch    : LedgerEntries.*, LedgerEntries.BankAllocations.*
    
    
    
    [Collection: TaxoBankAllocationColl] 
          
                Source Collection: TaxoBankRecoCollection
              
    
                Fetch    : MasterId  
                Walk     : Ledger Entries, Bank Allocations
              
                Compute    : TransactionType            : $$Owner:$IsDeemedPositive
                Compute    : Date                        : $$Owner:$$Owner:$Date
                Compute    : LedgerName                : $$Owner:$LedgerName
              
            ;    Compute    : InstrumentAmount            : $Amount
            ;    Compute    : InstrumentNumber            : $InstrumentNumber
            ;    Compute    : InstrumentDate            : $InstrumentDate
            ;    Compute    : VoucherDate                : $$Owner:$$Owner:$Date
            ;    Compute : MasterId                     : $$Owner:$$Owner:$MasterID
                Compute : VoucherTypeName            : $$Owner:$$Owner:$VoucherTypeName
                Compute    : BankersDate                : $BankersDate
            ;    Compute    : BankPartyName                : $BankPartyName
                Compute    : RecoDebit                    : If $$Owner:$IsDeemedPositive Then $Amount Else 0
                Compute    : RecoCredit                : If NOT $$Owner:$IsDeemedPositive Then $Amount Else 0
              
                Client Only            : Yes
                  
                Filter    : Txo_BankRecoFilter, Txo_WithinDateFilter
        ;        Filter    : TaxoIsBankLedgerName         ; BANK LEDGER FILTER
        ;        Filter    : TaxoBankersNotContra        ; CONTRA VOUCHER TYPE REMOVAL
                Is ODBC Table    : Yes
              
    [Collection    : TaxoRecoSummary]
      
        Source Collection    : TaxoBankAllocationColl
      
            By                :  TransactionType :     $LedgerName
            Aggr Compute    : RecoDebit        : Sum: $RecoDebit  
            Aggr Compute    : RecoCredit    : Sum:  $RecoCredit
            Is ODBC Table    : Yes
          
              
    [System    : Formula]
            Txo_WithinDateFilter    : ($Date >= @@DSPFromDate) AND ($Date <= @@DSPToDate)
            Txo_BankRecoFilter        : $$IsEmpty:$BankersDate Or ($BankersDate < @@DSPFromDate AND $BankersDate > @@DSPToDate)
            TaxoIsBankLedgerName    : $$IsLedofGrp:$LedgerName:$$GroupBank OR $$IsLedofGrp:$LedgerName:$$GroupBankOD
            TaxoBankersNotContra    : NOT ($VoucherTypeName = $$VchTypeContra)  ;($$IsEmpty:$BankersDate)
     
    Last edited: Sep 6, 2023
    Jenny likes this.


  4. Jenny

    Jenny Active Member


    output screen blank.... as per you suggest i change in first collection bank name ....
    Untitled.jpg
     


  5. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Issue me due to date.. go to daybook and fromdate and toDate and then try again
     
    Jenny likes this.


  6. Jenny

    Jenny Active Member


    in day book amount showing but last month reconcile amount fetch , if month change its not update..
     


  7. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    There are filters in the collections, flirt with them, try different combinations.. . I have filtered to show un-reconciled amount only

    you may use

    Txo_BankRecoFilter : $$IsEmpty:$BankersDate Or $BankersDate > @@DSPToDate
     
    Jenny likes this.


  8. Jenny

    Jenny Active Member


    I tried for that but last unreconciled amount does not change as per month
    only last month result showing...
     


  9. Jenny

    Jenny Active Member


    one thing in collection Child of hard coding working why formula not working like $$IsGroupBank or $$IsGroupBankOD
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $$IsGroupBank or $$IsGroupBankOD is logical --- not a value e.g. $$GroupSundryDebtors
     
    Devendra_Rawat likes this.


  11. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Use a logical variable to set it as yes if dates are changed and set it to No at form level and use option in collection to refresh it if the value of variable is changed to yes or No
     


  12. Jenny

    Jenny Active Member


    all working as per selected period and bank balance is showing but one issue found if unreconciled "Dr" or "Cr" amount empty then zero value not calculate
    means i create a filed to take opp. balance and calculate to unreconcile amount and after that get bank balance...but if unreconcile amount is empty then its not calculate
    any solution for that ?
     


  13. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    if you can share your code and data over email, then I will try
     
    Jenny likes this.


  14. Jenny

    Jenny Active Member


    Ok sir i send u my data and code thru email.
     


  15. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Changes in code
    Code:
    ;    Repeat : JennyclsgBal : TaxoRecoSummary
    
    
    Local        : Field    : DSPReconcileClDrAmt                    : Set as    :$$CollectionField:$RecoDebit:1:TaxoRecoSummary
    
    Local        : Field    : DSPReconcileClCrAmt                    : Set as    :$$CollectionField:$RecoCredit:1:TaxoRecoSummary
    
    
    Jenny_BankRecoFilter       : $$IsEmpty:$BankersDate Or ($BankersDate > @@DSPToDate Or $BankersDate < @@DSPFromDate)
    
     
    Jenny likes this.


  16. Jenny

    Jenny Active Member


    Thanx a lot...
     
    Santosh likes this.


Share This Page