Cash Balance in Day book....

Discussion in 'Tally Developer' started by Ganesh01, May 20, 2019.

    
  1. Ganesh01

    Ganesh01 New Member


    Dear Experts,
    I Make an Report Like Day book with Cash balance. But, cash balance not coming correctly. Because, It adding the amount instead of subtracting the amount in payment & Receipt voucher type. please correct my formula. I attached the cash running balance formula & screenshots.

    [Field: ClAmount]

    Use : Amount Field
    Set as : If ($$Line = 1) Then If (##DSPWithOpening) Then @NettOpBal Else +
    @NettDrCrTotal Else $$NettAmount:mad:NettDrCrTotal:mad:PrevTot
    PrevTot : $$PrevLineField
    NettOpBal : $$NettAmount:mad:OpgBalance:mad:NettDrCrTotal
    OpgBalance : @LedOpening
    LedOpening : If $$IsEmpty:mad:@LedOpening1 Then $$AsAmount:0 Else @@LedOpening1
    NettDrCrTotal : If ($$IsEmpty:#MyVchAmount5 AND NOT $$IsEmpty:#MyVchAmount4) Then #MyVchAmount4 Else +
    If (NOT $$IsEmpty:#MyVchAmount5 AND $$IsEmpty:#MyVchAmount4) Then #MyVchAmount5 Else +
    $$AmountSubtract:#MyVchAmount4:#MyVchAmount5
    Style : If $$InPrintMode then "Normal" Else "Normal Bold"
    ; Format : "DrCr,NoZero," + ##ShowForex
    Width : @@AmountWidth
    ;Border : Thin Left
     

    Attached Files:

    bharat shah likes this.


  2. ONKAR

    ONKAR Active Member


    @Ganesh01 see this code



    [#Form : Normal Day Book]

    Add : Bottom Part : TFGTDetails

    [Part : TFGTDetails]

    Line : TFGTDetailsTL,TFGTDetails
    Repeat : TFGTDetails : MyBANKCASHColl
    Scroll : Vertical
    Height : 25 % Page

    [Line : TFGTDetailsTL]

    Field : Simple Field
    Local : Field : Simple Field : Set As : "Cash and Bank Details and on " + $$String:##SVCurrentDate
    Border : Thin Bottom

    [Line : TFGTDetails]

    Field : TFGTDetails
    Right Field : TFGTAMTDR,TFGTAMTCR

    [Field : TFGTDetails]

    Use : Name Field
    Set As : $Name

    [Field : TFGTAMTDR]

    Use : Amount Field
    Set As : IF $$IsDr:$ClosingBalance then $ClosingBalance Else ""

    [Field : TFGTAMTCR]

    Use : Amount Field
    Set As : If Not $$IsDr:$ClosingBalance then $ClosingBalance Else ""


    [Collection : MyBANKCASHColl]

    Collection : MYBankLedColl
    Collection : MyCashLedColl

    [Collection : MYBankLedColl]

    Type : Ledger
    Child of : $$GroupBank
    Belongsto : yes
    Fetch : Name ,ClosingBalance

    [Collection : MyCashLedColl]

    Type : Ledger
    Child of : $$GroupCash
    Belongsto : yes
    Fetch : Name ,ClosingBalance
     


  3. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Post Screenshot Please.
     


  4. ONKAR

    ONKAR Active Member


    @Jay sir please load this code in your tally and then open your daybook and see bottom side will show daybook with cash and bank balance also.

    SEE THIS SCREENSHOT ​

    Daybook with cash and bank balance.JPG
     


  5. Jay kumar tailor

    Jay kumar tailor Well-Known Member



  6. ONKAR

    ONKAR Active Member


    Be happy and keep others happy too. :):)
     


  7. Ganesh01

    Ganesh01 New Member


    Sir,
    See my uploaded screenshot....It's not a closing balance....It is a Cash running balance...
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Send the file to nehalsofttech@gmail.com..... will check it out.......
     


  9. bharat shah

    bharat shah Member


    did u got the solution.if yes please share
     


  10. Mukesh1001

    Mukesh1001 New Member


    [#Form : Normal Day Book]

    Add : Bottom Part : TFGTDetails

    [Part : TFGTDetails]
    Line : TFGTDetailsTL,TFGTDetails1,TFGTDetails
    Repeat : TFGTDetails : MyBANKCASHColl
    Scroll : Vertical
    Height : 10 ;;25 % Page

    [Line : TFGTDetailsTL]
    Field : Simple Field
    Local : Field : Simple Field : Set as : "Cash, Bank and Loans Details and on " + $$String:##SVCurrentDate + " " + " (" + $$String:##SVFromDate + " " + "Cash Opening Balance : " + " " ;;+ if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance
    Border : Thin Bottom


    [Line:TFGTDetails1]
    Use : TFGTDetails
    Border : Column Titles
    Local : Field : Default : Type : String
    Local : Field : Default : Align : Center
    Local : Field : Default : Border : Thin Box ;;Thin Left
    Local : Field : Default : Style : Large
    Local : Field : TFGTHeadSno : Set as : "S.No."
    ;;Local : Field : TFGTHeadSno : Border : Thin Left Right
    Local : Field : TFGTDetails : Set as : "Name of the Income"
    Local : Field : TFGTHeadOpeningBalance : Align : Center
    Local : Field : TFGTAMTOP : Set as : "OpeningBalance"
    Local : Field : TFGTAMTDR : Set as : "Closing Balance Dr"
    Local : Field : TFGTAMTCR : Set as : "Closing Balance Cr"

    [Line : TFGTDetails]

    Field : TFGTHeadSno,TFGTDetails,TFGTAMTOP,TFGTAMTDR,TFGTAMTCR
    ;;Right Field : TFGTAMTDR,TFGTAMTCR

    [Field : TFGTHeadSno]
    Use : Number Field
    Set As : $$Line
    Align : Centre
    width : 15 MM
    Border : Thin Box

    [Field : TFGTDetails]
    Use : Name Field
    Set As :$Name
    Border : Thin Box
    Format : "DrCr, No Zero"


    [Field : TFGTAMTOP]
    Use:Amount Field
    set as : if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance
    ;;Format : "Dr,Cr"
    Border : Thin Box
    Format : "DrCr, No Zero"


    [Field : TFGTAMTDR]

    Use : Amount Field
    Set As : IF $$IsDr:$ClosingBalance then $ClosingBalance Else ""
    Border : Thin Box
    Format : "Dr,Cr"


    [Field : TFGTAMTCR]

    Use : Amount Field
    set as : $$IsCashLedger:$LedgerName AND $$IsDr:$Amount
    Set As : If Not $$IsDr:$ClosingBalance then $ClosingBalance Else ""
    Border : Thin Box
    Format : "Dr,Cr"


    [Collection : MyBANKCASHColl]

    Collection : MYBankLedColl
    Collection : MyCashLedColl

    [Collection : MYBankLedColl]

    Type : Ledger
    Child of : $$GroupBank
    Belongsto : yes
    ;;Fetch : ClosingBalance, Name ,
    Sort : Default : $ClosingBalance, $Name

    [Collection : MyCashLedColl]

    Type : Ledger
    Child of : $$GroupCash
    BelongstoGroupCash : yes
    Filter : ClosingStatusFilter, NonEmptyClosingBalance
    Sort : Default : $ClosingBalance, $Name
    ;[System : Formula]
    ; only_OpBal : $OpeningBalance:Ledger:$Name
     


Share This Page