PENDING AMOUNT IN LEDGER

Discussion in 'Free Source Codes' started by DEEPAK B, Feb 20, 2023.

    
  1. DEEPAK B

    DEEPAK B Member


    Hello Sir

    Sir, I have added Pending Amount in a ledger so that in the ledger itself I will be able to track which bill is pending but things are not coming in the proper way (see Image 1)
    1. If you see the image Rs.10000/- is received against bill no.RT/015/22-23 and pending Amount should be 4784/- against the said bill
    2 In the bill no.RT/018/22-23 full amount is pending so the Pending Amount should come as Rs.14404/-
     
    Last edited: Feb 25, 2023


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    It will not work like that........ you are using ClosingBalance that will give you closing of the ledger as per date........same as running balance.

    You need to make a collection of Receipt vouchers........... walk through the data..... find the Bill reference and extract the amount........... this amount will be reduced from the Sales Amount and you will get your O/s.

    Other than the above, you can simply use the Ledger Bill-wise O/s in default Tally.
     


  3. DEEPAK B

    DEEPAK B Member


    Thank you, Sir I will go with the first option of your comment (Working out in collection) will take time but will try to complete

    Sir, I can use defalt O/s, but if customer demand ledger I have to send 2 reports 1st Ledger and 2nd O/s Bill Ledger

    So I decided to do this
     


  4. DEEPAK B

    DEEPAK B Member


    Sir Done
    upload_2023-8-2_14-10-38.png
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Very Good ...congrats on your efforts. :)
     


  6. dammani.shri

    dammani.shri New Member


    Deepak Sir, can you share code ..
     


  7. Mac

    Mac Member


    kindly suggest how to do this , i had make field but not work properly . below is code.

    [#Line: DSP VchAccTitles]
    Add : Fields : AFter : DSP VchAcctTitle :BS
    [Field: BS]
    Use: Short Name Field
    Set as: "Pending Amount"
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20

    [#Line: DSP VchDetail]
    Add : Right Fields : Before : DSP VchType : BSBody
    [Field: BSBody]

    Use : Amount Field
    Align : Right
    Width : 15% Screen
    Style : large bold
    Set as: $PendingAmount

    Set always : Yes
    Skip : Yes
    Background:Grey


    [#Collection: SRC Ledger Vouchers Coll]

    Type : Vouchers : Ledger
    Child of : #LedgerName

    ;; Parm var used for Remote Columnar report.
    ParmVar : LedRepName : String : #LedgerName
    Option : Voucher Filter Methods : @@FetchVoucherMethods

    [#Collection: Vouchers of Ledger]

    Source Collection : SRC Ledger Vouchers Coll

    Use : Ledger Vouchers Coll
    Fetch : IsPostDated

    ;; The Below 3 computes are added to ensure that, appropriate Method Names and its Default values are available in the Collection definition before its been locally modified in Report definition
    Compute : TNetSAAuditStatus : ""
    Compute : TNetSAAuditNote : ""
    Compute : ManualSampling : ""
    Compute : PendingAmount:$$ReportObject:$$CollectionFieldByKey:$ClosingBalance:$VoucherNumber:Ledger

    Option : Vouchers of Ledger Browser : $$InMobileBrowserExport

    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

    Filter : PaymentLinkFilter
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Kindly read the suggestion in Post # 2 --- the Pending Amount you are trying to compute will not work as the CONSTRUCT is wrong.
     


Share This Page