Receipt Amount (Solved)

Discussion in 'Tally Developer' started by lumos, May 2, 2019.

    
  1. lumos

    lumos Member


    tempsnip.png I can't get the receipt amount total right I have used the following code but cant fetch the collection totals just like the sales totals.
    Experts please tell me what I am doing wrong here. The sales amount total worked but receipt does not.

    Code:
    [Field:RprtReceipt]
        Use            : Amount Field
        Set as   :    $$CollAmtTotal:RcptSumcoll:$Amount  ;$$FilterAmtTotal:RcptSumcoll:ReceiptAmountfilter:$Amount ;
        Format      : "DrCr,NoZero," + ##ShowForex
        Space Right    : 2 mms
    
    [Collection: RcptSumcoll]
        Source Collection    : Rcptcoll
        Walk                : Inventory entries
        By                    : PartyLedgerName    :  $PartyLedgerName
        By                  : vouchernumber     : $vouchernumber
        Aggr Compute        : Amount    : sum  :  $Amount
    ;    Aggr Compute        : RecAmtTotal    : Add    : $Amount
        Search Key            : $PartyLedgerName + $vouchernumber
    
    [Collection: Rcptcoll]
        Type : Vouchers
        Child Of: $$VchTypeReceipt
        Fetch: PartyLedgerName ,vouchernumber, Amount
    
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Try using $$collectionfield
     


  3. lumos

    lumos Member


    Tried this as well but unique amount totals from collection not picking.
    I tried this

    Code:
    Set as        :$$CollectionField:$Amount:1:RcptSumcoll
    Then this

    Code:
    Set as        :$$CollAmtTotal:RcptSumcoll:($$CollectionField:$Amount:1:RcptSumcoll)
    but the result is not as expected.
     

    Attached Files:

    Last edited: May 3, 2019


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What is the main Collection that you are using in REPEAT at BODY part level ????

    The compute is not done in the main collection..........

    U should try this.........
    [System : Formula]
    myRcptSum : $$CollAmtTotal:RcptSumcoll:$Amount

    Then in your main Collection.........
    Compute : myRcptSum : $myRcptSum
     


  5. lumos

    lumos Member


    Tried the same at part level collection the result is same as the first post.

    Code:
    [Collection:AgentNameListColl] 
        Type     : AgentDB  : Company
        Childof : ##SVCurrentCompany
        Fetch : AgentDB,AgentTypeList,AgentNameList
        Filter : NamelistFormula
        Compute: rcptsumamt : $myRcptSum
    [System:Formula]
    myRcptSum : $$CollAmtTotal:RcptSumcoll:$Amount
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member



  7. lumos

    lumos Member


    Hello Amit Sir , thank you very much for helping me . I solved it by computing the exploding receipt values in the collection Agntreprt Voucher instead of directly accessing them with $$collectionfieldbykey.
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    well done .......... congrats.
     


  9. lumos

    lumos Member


    Sir I solved this but now another problem arose. The credit Note column theorotically should not display any amounts as no credit note has been issued, But it is displaying amounts which are same as receipt amounts. The collections are and search key both are different, what might have caused this?
     

    Attached Files:



  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [Collection: CredSumcoll]
    Aggr Compute : Amount : Sum : If @@CreditAmountFilter Then $Amount Else 0

    Put similar in RECEIPTS too.....
     


  11. lumos

    lumos Member


    Sir the amounts are not displaying after doing this. tried different variations of filtering values like this. Still not working.
     


  12. rajiv jain

    rajiv jain Member



    Can you share you full code
     


  13. rajiv jain

    rajiv jain Member


    share your full code
     


  14. lumos

    lumos Member


    I solved this problem, thank you very much for helping. can you guide me on why the credit note totals are duplicated ?
     


  15. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [Collection: CredSumcoll]
    Aggr Compute : CrNtAmount : Sum : If @@CreditAmountFilter Then $Amount Else 0
     


  16. lumos

    lumos Member


    Tried changing the definition name. the result is same, the values are not displayed.
     


  17. Yash@82872

    Yash@82872 New Member


    PLS share this tdl
     


  18. kosi

    kosi Member


    You
    You are struggling because you are not willing to share full code.
    Two heads are better than one.
    Share full code so other members can help you
     


Share This Page