Closing Balance of Ledger on specific Month end

Discussion in 'Free Source Codes' started by A Sam, Dec 27, 2019.

    
  1. A Sam

    A Sam Member


    Hi,

    How to get closing balance of Ledger monthly basis?

    Say if I want two Three Column with Jan, Feb and March

    I have seen $Closingbalance will give it as per TB last balance, but how to get the amount at end of specific month?

    Thanks
     



  2. Modified This According to your Requirement..

    ;;Test
    [#Menu: Gate Way Of Tally]

    Add : Item : Test : Display : Test
    [Report: Test]

    Use : DSP Template
    ; Set : SV From Date : ##SVFromDate ;;$$MonthStart:##SVCurrentDate
    ; Set : SV To Date : ##SVToDate ;;$$MonthEnd:##SVCurrentDate

    [Form: Test]

    Use : DSP Template
    Part : Test
    Width : 100% Page
    Height : 100% Page

    [Part: Test]

    Line : Test,bd
    Repeat:bd:ledgerout
    Scroll : Both
    [Line : Test]

    Fields : partynem,Month Field
    Repeat:Month Field: Monthcoll


    [Field:partynem]
    Use:name field
    Set as:"Party Name"

    [Line:bd]
    Add:Field:bd,amtd
    Repeat : amtd : Monthcoll
    [Field:bd]
    Use:name field
    Set as:$na

    [Field:amtd]
    Use:amount field
    Set as:$$amtfn:#bd:mad:DFrom:mad:DTo
    DFrom : $$PeriodDateFrom
    DTo : $$PeriodDateTo

    [Function:amtfn]
    Parameter : PartyName :String
    Parameter : PerFrom :Date
    Parameter : PerTo :Date
    Variable : SVFromDate : Date
    Variable : SVToDate : Date
    Variable : RetAmt : Amount
    Return : Amount

    05: Log: ##PerFrom
    06: Log: ##PerTo
    08: Set : RetAmt : ($$AsAmount:0)
    09: Log: ##RetAmt
    01:Set:SVFromDate : ##SVFromDate
    02:Set:SVToDate : ##PerTo

    03:Set:RetAmt: ($$FilterAmtTotal:SaleVchsSum:SelLedName:$Amount) - ($$FilterAmtTotal:RecptVchsSum:SelLedName:$Amount)
    07: Log: ##RetAmt
    04: Return : ##RetAmt
    [Collection: TestLedCol]

    Type : Ledger
    Fetch: Name, ClosingBalance
    Filter: SelLedName

    [Collection: SaleVchs]

    Type : Vouchers : VoucherType
    Child Of : $$VchTypeSales

    [Collection: SaleVchsSum]

    Source Collection : SaleVchs
    Walk : Ledger Entries

    By : LedgerName : $LedgerName
    By : Date : $..Date

    Aggr Compute : Amount : Sum : $Amount
    [Collection: RecptVchs]

    Type : Vouchers : VoucherType
    Child Of : $$VchTypeReceipt

    [Collection: RecptVchsSum]

    Source Collection : RecptVchs
    Walk : Ledger Entries

    By : LedgerName : $LedgerName
    By : Date : $..Date

    Aggr Compute : Amount : Sum : $Amount

    [System: Formulae]

    SelLedName : $LedgerName = ##PartyName

    [Field:Month Field]

    Use: Name Field
    Set as : $MonthName
    [Collection: Monthcoll]
    Type : Period
    Repeat : Month
    ClientOnly : Yes
    Compute : MonthName: $$FullMonthName:$$PeriodDateFrom
    [Collection:ledgerout]
    Type:ledger
    Child Of:$$GroupSundryDebtors
    Compute:na:$name
    Compute:bal:$closingbalance
    ;; select $na,$bal from ledgerout
     


  3. A Sam

    A Sam Member


    Thank You

    Smart Coding

    Found the amount seems to be wrong. every month the same amount repeated. for debtors which started in Sep still shows balance from Apr and same repeated every month

    what about if I need a trial balance in this format?

    also it runs slow, compared to any other report

    Thank you for the great support
     


  4. NainaSiraj

    NainaSiraj Member


    showing some error

    [line:test]
    could not find the repeated field

    Guide me plz
     


Share This Page