Trial Balance (Please Correct Code)

Discussion in 'Tally Developer' started by pradeep kumar dewangan, Apr 2, 2020.

    

  1. ;; Shri Ganeshay Namah ;;

    [#Menu: Gateway of Tally]

    Key Item : Blank
    Key Item : Trial Balance : T : Display : BcTrial BalanceRpt

    [Report: BcTrial BalanceRpt]

    Form : BcTrial BalanceFrm
    Title : $$LocaleString:"Trial Balance"
    Print Set : Report Title : $$LocaleString:"Trial Balance"

    Variable : SVFRomDate,SVToDate, BcGroupName
    Set : SVFRomDate : $$FinYearBeg:##SVCurrentDate:$StartingFrom:Company:##SVCurrentCompany
    Set : SVToDate : $$FinYearEnd:##SVCurrentDate:$StartingFrom:Company:##SVCurrentCompany

    [Form: BcTrial BalanceFrm]

    Button : ExplodeFlag, F2ChangePeriod
    Keys : ChangePeriod
    Part : BcTB TtlePeriodPrt, BcTB MainPrt
    Height : 100% Screen
    Width : 100% Screen

    [Part : BcTB TtlePeriodPrt]

    Line : BcTB TtlePeriodLne
    Space Bottom : 0.50

    [Line : BcTB TtlePeriodLne]

    Field : Name Field
    Right Field : Simple Field

    Local : Field : Name Field : Set as: $$LocaleString:"Trial Balance"

    Local : Field : Simple Field : Set as: $$String:##SVFromDate + " to " + $$String:##SVToDate
    Local : Field : Simple Field : Style : Normal Bold


    [Part : BcTB MainPrt]

    Left Part : BcTB LtDebitPrt
    Right Part : BcTB RtCreditPrt


    [Part : BcTB LtDebitPrt]

    Line : BcTB LtDrTtleLne, BcTB LtDrDetlsLne
    BottomLine : BcTB LtDrTotalLne
    Repeat : BcTB LtDrDetlsLne : BcTB GroupsLedgersColl
    Total : BcTB LtDrAmountFld
    Scroll : Vertical
    Common Border : Yes

    [Line : BcTB LtDrTtleLne]

    Use : BcTB LtDrDetlsLne

    Local : Field : Default : Type : String
    Local : Field : Default : Style : Normal Bold
    Local : Field : Default : Align : Center


    Local : Field : BcTB LtDrParticularFld : Set as: $$LocaleString:"Debit Particulars"

    Local : Field : BcTB LtDrAmountFld : Set as: $$LocaleString:"Debit Amount"

    Border : Thin TopBottom
    ;Delete : Remove if

    [Line : BcTB LtDrDetlsLne]

    Field : BcTB LtDrParticularFld
    Right Field : BcTB LtDrAmountFld

    ;Remove if : Not $$IsDr:$ClosingBalance


    Explode : BcTB Group Explosion : ##ExplodeFlag OR $$KeyExplode


    [Field : BcTB LtDrParticularFld]

    Use : Name Field
    Set as : $$Name
    Full Width : Yes
    Quick Search: Yes

    Option : BcTB NameField Grp : $$IsGroup
    Option : BcTB NameField Led : $$IsLedger

    [!Field: BcTB NameField Grp]

    Variable : BcGroupName
    Display : BcTrial BalanceRpt
    Alter : Group


    [!Field: BcTB NameField Led]

    Variable : LedgerName
    Display : Ledger Monthly Summary
    Style : Normal
    Alter : Ledger


    [Field : BcTB LtDrAmountFld]

    Use : Amount Field
    Set as : if $$IsDr:$ClosingBalance then $ClosingBalance else 0
    Style : if $$IsGroup then "Normal Bold" else "Normal"
    Border : Thin Left
    Format : "DrCr"


    ;;-------------------------------------------------------------------------------
    ;; Explode Part

    [Part : BcTB Group Explosion]

    Lines : BcTB Details Explosion
    Repeat : BcTB Details Explosion : BcTB GroupsLedgersColl
    Scroll : Vertical

    [Line: BcTB Details Explosion]

    Fields : BcTB LtDrParticularFld
    Right Fields: BcTB LtDrAmountFld

    Explode : BcTB Group Explosion : $$IsGroup and ($$KeyExplode OR ##ExplodeFlag)

    Indent : 2 * $$ExplodeLevel

    Local : Field : Default : Delete: Border

    ;Delete : Remove if

    ;; Explode Part Ends here
    ;;-------------------------------------------------------------------------------



    [Collection : BcTB GroupsLedgersColl]

    Collection : BcTB GroupsColl, BcTB LedgersColl

    [Collection: BcTB GroupsColl]

    Type : Group
    Child Of : #BcGroupName
    Filter : BcTBZero Filter
    Fetch : Name, ClosingBalance

    [Collection: BcTB LedgersColl]

    Type : Ledger
    Child Of : #BcGroupName
    Filter : BcTBZero Filter
    Fetch : Name, ClosingBalance

    [Variable: BcGroupName]

    Type : String
    Default : ""

    [System: Formula]

    BcTBZero Filter : $ClosingBalance > 0 ;AND NOT $$IsLedgerProfit


    [Line : BcTB LtDrTotalLne]

    Use : BcTB LtDrDetlsLne

    Local : Field : Default : Style : Normal Bold
    Local : Field : Default : Align : Center


    Local : Field : BcTB LtDrParticularFld : Set as: $$LocaleString:"Total"

    Local : Field : BcTB LtDrAmountFld : Set as: $$Total:BcTBLtDrAmountFld

    Border : Thin TopBottom
    ;Delete : Remove if


    ;;-------------------------------------------------------------------------------
    ;; Right Part

    [Part : BcTB RtCreditPrt]

    Use : BcTB LtDebitPrt

    Local : Line : BcTB LtDrTtleLne : Local : Field : BcTB LtDrParticularFld : Set as : $$LocaleString:"Credit Particulars"
    Local : Line : BcTB LtDrTtleLne : Local : Field : BcTB LtDrParticularFld : Border : Thin Left

    Local : Line : BcTB LtDrTtleLne : Local : Field : BcTB LtDrAmountFld : Set as : $$LocaleString:"Credit Amount"
    Local : Line : BcTB LtDrDetlsLne : Local : Field : BcTB LtDrAmountFld : Set as : if not $$IsDr:$ClosingBalance then $ClosingBalance else 0

    ;; Local : Line : BcTB LtDrDetlsLne : Remove on : $$IsDr:$ClosingBalance












    2- TB Prob.png 1- TB Prob.png
     

    Attached Files:



  2. hprahul

    hprahul Member


    Rewrite code below:
    ;Remove if : Not $$IsDr:$ClosingBalance

    As:
    Remove if : Not $$IsDr:$ClosingBalance

    i.e. remove the comment from these lines starting from "Remove if " this should solve the problem.
     
    NainaSiraj likes this.


  3. NainaSiraj

    NainaSiraj Member



  4. Khyrul

    Khyrul New Member


    Please Inactive Explosion for Profit & Loss Ledger Untitled.jpg
     


  5. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member



  6. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member



  7. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member



  8. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member



  9. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member



  10. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member




  11. Dear Amit sir and all developers

    Please correct my code
    Kindly do the the needful at earliest for Balance sheet preparation.
     



  12. ;; Shri Ganeshay Namah ;;

    [#Menu: Gateway of Tally]

    Key Item : Blank
    Key Item : Trial Balance : T : Display : BcTrial BalanceRpt

    [Report: BcTrial BalanceRpt]

    Form : BcTrial BalanceFrm
    Title : $$LocaleString:"Trial Balance"
    Print Set : Report Title : $$LocaleString:"Trial Balance"

    Variable : SVFRomDate,SVToDate, BcGroupName
    Set : SVFRomDate : $$FinYearBeg:##SVCurrentDate:$StartingFrom:Company:##SVCurrentCompany
    Set : SVToDate : $$FinYearEnd:##SVCurrentDate:$StartingFrom:Company:##SVCurrentCompany

    [Form: BcTrial BalanceFrm]

    Button : ExplodeFlag, F2ChangePeriod
    Keys : ChangePeriod
    Part : BcTB TtlePeriodPrt, BcTB MainPrt
    Height : 100% Screen
    Width : 100% Screen

    [Part : BcTB TtlePeriodPrt]

    Line : BcTB TtlePeriodLne
    Space Bottom : 0.50

    [Line : BcTB TtlePeriodLne]

    Field : Name Field
    Right Field : Simple Field

    Local : Field : Name Field : Set as: $$LocaleString:"Trial Balance"

    Local : Field : Simple Field : Set as: $$String:##SVFromDate + " to " + $$String:##SVToDate
    Local : Field : Simple Field : Style : Normal Bold


    [Part : BcTB MainPrt]

    Left Part : BcTB LtDebitPrt
    Right Part : BcTB RtCreditPrt


    [Part : BcTB LtDebitPrt]

    Line : BcTB LtDrTtleLne, BcTB LtDrDetlsLne
    BottomLine : BcTB LtDrTotalLne
    Repeat : BcTB LtDrDetlsLne : BcTB GroupsLedgersColl
    Total : BcTB LtDrAmountFld
    Scroll : Vertical
    Common Border : Yes

    [Line : BcTB LtDrTtleLne]

    Use : BcTB LtDrDetlsLne

    Local : Field : Default : Type : String
    Local : Field : Default : Style : Normal Bold
    Local : Field : Default : Align : Center


    Local : Field : BcTB LtDrParticularFld : Set as: $$LocaleString:"Debit Particulars"

    Local : Field : BcTB LtDrAmountFld : Set as: $$LocaleString:"Debit Amount"

    Border : Thin TopBottom
    ;Delete : Remove if

    [Line : BcTB LtDrDetlsLne]

    Field : BcTB LtDrParticularFld
    Right Field : BcTB LtDrAmountFld

    ;Remove if : Not $$IsDr:$ClosingBalance


    Explode : BcTB Group Explosion : ##ExplodeFlag OR $$KeyExplode


    [Field : BcTB LtDrParticularFld]

    Use : Name Field
    Set as : $$Name
    Full Width : Yes
    Quick Search: Yes

    Option : BcTB NameField Grp : $$IsGroup
    Option : BcTB NameField Led : $$IsLedger

    [!Field: BcTB NameField Grp]

    Variable : BcGroupName
    Display : BcTrial BalanceRpt
    Alter : Group


    [!Field: BcTB NameField Led]

    Variable : LedgerName
    Display : Ledger Monthly Summary
    Style : Normal
    Alter : Ledger


    [Field : BcTB LtDrAmountFld]

    Use : Amount Field
    Set as : if $$IsDr:$ClosingBalance then $ClosingBalance else 0
    Style : if $$IsGroup then "Normal Bold" else "Normal"
    Border : Thin Left
    Format : "DrCr"


    ;;-------------------------------------------------------------------------------
    ;; Explode Part

    [Part : BcTB Group Explosion]

    Lines : BcTB Details Explosion
    Repeat : BcTB Details Explosion : BcTB GroupsLedgersColl
    Scroll : Vertical

    [Line: BcTB Details Explosion]

    Fields : BcTB LtDrParticularFld
    Right Fields: BcTB LtDrAmountFld

    Explode : BcTB Group Explosion : $$IsGroup and ($$KeyExplode OR ##ExplodeFlag)

    Indent : 2 * $$ExplodeLevel

    Local : Field : Default : Delete: Border

    ;Delete : Remove if

    ;; Explode Part Ends here
    ;;-------------------------------------------------------------------------------



    [Collection : BcTB GroupsLedgersColl]

    Collection : BcTB GroupsColl, BcTB LedgersColl

    [Collection: BcTB GroupsColl]

    Type : Group
    Child Of : #BcGroupName
    Filter : BcTBZero Filter
    Fetch : Name, ClosingBalance

    [Collection: BcTB LedgersColl]

    Type : Ledger
    Child Of : #BcGroupName
    Filter : BcTBZero Filter
    Fetch : Name, ClosingBalance

    [Variable: BcGroupName]

    Type : String
    Default : ""

    [System: Formula]

    BcTBZero Filter : $ClosingBalance > 0 ;AND NOT $$IsLedgerProfit


    [Line : BcTB LtDrTotalLne]

    Use : BcTB LtDrDetlsLne

    Local : Field : Default : Style : Normal Bold
    Local : Field : Default : Align : Center


    Local : Field : BcTB LtDrParticularFld : Set as: $$LocaleString:"Total"

    Local : Field : BcTB LtDrAmountFld : Set as: $$Total:BcTBLtDrAmountFld

    Border : Thin TopBottom
    ;Delete : Remove if


    ;;-------------------------------------------------------------------------------
    ;; Right Part

    [Part : BcTB RtCreditPrt]

    Use : BcTB LtDebitPrt

    Local : Line : BcTB LtDrTtleLne : Local : Field : BcTB LtDrParticularFld : Set as : $$LocaleString:"Credit Particulars"
    Local : Line : BcTB LtDrTtleLne : Local : Field : BcTB LtDrParticularFld : Border : Thin Left

    Local : Line : BcTB LtDrTtleLne : Local : Field : BcTB LtDrAmountFld : Set as : $$LocaleString:"Credit Amount"
    Local : Line : BcTB LtDrDetlsLne : Local : Field : BcTB LtDrAmountFld : Set as : if not $$IsDr:$ClosingBalance then $ClosingBalance else 0

    ;; Local : Line : BcTB LtDrDetlsLne : Remove on : $$IsDr:$ClosingBalance
     




Share This Page