Need Help in Adjusting rceipts against Invoices in FIFO basis

Discussion in 'Free Source Codes' started by Sai Vineeth, Jun 19, 2021.

    
  1. Sai Vineeth

    Sai Vineeth Active Member


    I am very much beginner in TDL

    I want in below format
    upload_2021-6-19_16-51-56.png

    I tried creating Different collection for receipts and sales but unable to repeat in single report
    So used main collection which includes all vouchers output is
    upload_2021-6-19_16-55-12.png
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If you want FIFO method.... in above structure it will not be possible..........

    You will have to make your own collection of Bills..........and adjust the Amount against bills in a linear manner.
     



  3. Basically you need to first make the Collection for all Debit entries and then knock it off with credit entries on FIFO basis
    we had done the same for those customers who had not done bill wise

    do not advertise. You can conduct your business elsewhere after sharing your contact details. But no direct.......thanks. -- ADMIN
     



  4. Sorry there was no intention for advertisement.. no any intention to sell anything on this forum...
    it was that this module can be done...
    As there was not option to attached tcp so i had to give the Google drive option
    anyway you can check there is no business done here.
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    that is okay buddy...we give a little leeway for developers...but not so open.....you can sell and display your modules, but in a limited manner.

    we encourage little steps, so it encourages developers too.
     



  6. 100% right amit... and even if he wants i will not sell but wanted to give him the idea with the above logic i mentioned .. it can be done and the readiness to check the output
    its ok i understand and appreciate all developer efforts...and yes no hard feelings. Its all in to learn
     
    panam and Amit Kamdar like this.


  7. Sai Vineeth

    Sai Vineeth Active Member


    I am not adjusting against bills (Bill allocations)
    I am adjusting receipts with sales invoices irrespective of BillAlloc
    I tried
    2 separate Collections for Receipts and sales
    and tried repeating over parts but First part is overriding the second one

    Code:
    [Collection : ISPL_VChcollection]   
        Type        : Vouchers     : Ledger
        Child of    : ##LedgerName
        Fetch        : Date, VoucherNumber, VoucherTypeName, Narration
       
        Compute        : LedgerName    :    $LedgerName
       
       
    [Collection : ISPL_SalesVChcollection]
        Use        : ISPL_VChcollection
        Add: Filter    : ISPL_Sales_filter
       
    [Collection : ISPL_ReceiptVChcollection]
        Use        : ISPL_VChcollection
        Add: Filter    : ISPL_Receipt_filter
        ;Compute        : Amount        :    $$FilterAmtTotal:AllLedgerEntries:MIFiltIntLedger:$Amount
    
    [System    : Formulae]
        ISPL_Sales_filter :    $VoucherTypeName ="Sales"
        ISPL_Receipt_filter :    $VoucherTypeName ="Receipt Bank"
     


  8. Sai Vineeth

    Sai Vineeth Active Member


    Yeah I want in the same way
    any pointing's how to achieve this?
     



  9. (A) 1.Create the Ledger collection with the filter as Ledger having the Bill wise enable
    Use the default collection “Ledger Outstandings”

    (B) 1. Create the function and make walk collection with the above said collection
    2. Create the collection as Ledger vouchers using the parameter from the above said collection (1) and make the walk collection . Like below

    For Example :

    [Collection: Vouchers of Ledger]

    Type : Vouchers : Ledger

    Child Of : ##pLedgerName


    (C) 1. Inside the walk collection (3) make as New Object : Voucher : MasterId
    2. Then need to use Walk Collection : Ledger Entries
    3. Compare the Ledger Name in the Ledger Entries is equal to the selected Ledger in the collection (1).
    If : $LedgerName = ##pLedgerName

    (D) 1. If the above condition is satisfied then if $$NumItems:BillAllocations > 0 then need to delete the existing billallocations and need to make the “Insert Collection Object : Bill Allocations”


    (E) 1. Then make the voucher Type condition as $$IsPayment:##VoucherTypeName then update the bill allocations using the Set Value . The above said approach can do through User Defined Function.
     



  10. ok just to give an idea how you can achieve it
    as mentioned in my earlier post
    A) first Create the list of All debit entries
    B) then create the list of credit entries
    C) Select 1st debit entry lets say amount is 10000.00 make a function and knock it off till the amount is zero with credit amount then take second amont and so on till the credit amount is not cleared the balance of debit is pending amount

    if you dont understand the above logic got o EXCEL and do the same exercise you should get the answer



    D)
     


  11. shaikh kd

    shaikh kd New Member



Share This Page