How to get Closing Balance of a Cost Centre ?

Discussion in 'Tally Developer' started by bytelogik, Sep 9, 2023.

    
  1. bytelogik

    bytelogik New Member


    What is wrong with the code / how to use the $CCClosing function?
    thanks in advance..

    [#Menu:Gateway OF Tally]
    Key Item: "Test FX" : F : Call : FxTest4

    [Function:FxTest4]
    Variable : CostCen : String : "BRANCH A"
    Variable: CCCTotal : Amount : $$AsPositive:$CCClosing:##CostCen
    01:Msg Box : "MSG": "Closing : " + ($$String:##CCCTotal)
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If it is a Function then it is denoted by double $

    $$AsPositive:$$CCClosing:##CostCen
     


  3. bytelogik

    bytelogik New Member


    thanks for the reply. that was a silly mistake. but the value is still blank.
    do i need to fetch or compute something in the function FxTest4 ?
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If in Ledger master, cost centre feature is disabled (at later stages) --- in cost centre breakup report it will not appear.
    So kernel function CCClosing, CCOpening, CCDebits, CCCredits has been made for those ledgers (which has CC disabled at later stages) and try to evaluate Cost centre value even though feature has been disabled in Ledger Master.

    CCCosing is equivalent to $TBalClosing:CostCentre:##CostCentreName

    And of course, in your Function u need to walk through a Collection -- it is coming blank because it does not know where to pick the value from.
     


  5. bytelogik

    bytelogik New Member


    cost centres are enabled and i can see the values in cost centre summary.
    right, i need the collection to walk in the function. will try and post here on success..
    actually i am trying to get the cost centre wise profit and loss statement tdl to work, which was for tally erp9. but it does not work in prime. i guess some definitions might have changed since then for prime version.
    thank you..
     


Share This Page