Ledger (with Cash Sales)

Discussion in 'Requests' started by hprahul, Feb 9, 2019.

         
  1. hprahul

    hprahul Member


    I have tweaked a code to display the ledger to include Cash sales/purchase transactions

    Code:
    [#Menu: Account Books]
        Key Item: Ledger (Including Cash Transactions)    : L : Display Collection    : Monthly Ledger Extract With Cash: NOT $$IsEmpty:$$SelectedCmps
    
    [Collection: Monthly Ledger Extract With Cash]
        Use    : Extract Alias Collection
        Source Collection    : List of Ledgers
        Title        : $$LocaleString:"List of Ledgers"
        Fetch        : Name
        Variable    : Ledger Name
        Report        : Ledger Vouchers With Cash
        Trigger        : Ledger Name
        Fetch        : Name
    
    [Report: Ledger Vouchers With Cash]
        Use    : Ledger Vouchers
        Local    : Collection : Vouchers of Ledger : Collection: Cash Vouchers of Ledger
        Local    : Field    : DSP VchDrClAmt: Set as : if $$isDr:$BSClosing:Ledger:##LedgerName then $BSClosing:Ledger:##LedgerName else ""
        Local    : Field    : DSP VchCrClAmt: Set as : if not $$isDr:$BSClosing:Ledger:##LedgerName then $BSClosing:Ledger:##LedgerName else ""
    
    [Collection: SRC Ledger Vouchers Coll With Cash]
        Type    : Vouchers    : Ledger
        Child of: "Cash"
        Filter    : CashVchrsofLed
        ParmVar : LedRepName : "Cash"
    
    [System: Formula]
        CashVchrsofLed : $PartyName=#LedgerName
    
    [Collection: Cash Vouchers of Ledger]
        Source Collection: SRC Ledger Vouchers Coll With Cash
        Use:    Cash Ledger Vouchers Coll
        Fetch    : IsPostDated
    
        Compute    : TNetSAAuditStatus    : ""
        Compute    : TNetSAAuditNote    : ""
        Compute    : ManualSampling    : ""
    
        Sort    : @@Default        : -$TBSort,$IsForexLine, $Date
        Sort    : @@SortAlphaIncr    : -$TBSort,$FirstContraAccount, $IsForexLine, $Date
        Sort    : @@SortAlphaDecr    : -$TBSort,-$FirstContraAccount, $IsForexLine, $Date
        Sort    : @@AmountWiseIncr    : -$TBSort,$$Abs:$TotalLedVchAmt, $IsForexLine, $Date
        Sort    : @@AmountWiseDecr    : -$TBSort,-$$Abs:$TotalLedVchAmt, $IsForexLine, $Date
        Sort    : @@CurrencyIncr    : -$TBSort,$$Currency:$TotalLedVchAmt, $IsForexLine, $Date
        Sort    : @@CurrencyDecr    : -$TBSort,-$$Currency:$TotalLedVchAmt, $IsForexLine, $Date
    
    [Collection: Cash Ledger Vouchers Coll]
        Use : Ledger Vouchers Coll
        Compute    : TotalLedDrVchAmt            : $$OrigVchLedDrTotal:"Cash":($$SysName:AcctgVchView)
        Compute    : TotalLedCrVchAmt            : $$OrigVchLedCrTotal:"Cash":($$SysName:AcctgVchView)
    Everything seems fine to me except the printing, where I am also getting Cash included in Closing balance.

    Please guide a fix.
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    simply deduct $ClosingBalance of Cash...............
     


Share This Page