not able to fetch rate and opening balance

Discussion in 'Free Source Codes' started by ankur daga, Jul 9, 2021.

    
  1. ankur daga

    ankur daga Member


    Please help. I am not able to fetch "rate and openingbalance". Please help.


    Code:
    [Report: Mill interest Register]
        Use         : DSP Template 
        Variable: SVFromDate, SVToDate
            Title    : $$LocaleString:"Mill interest Register"
      
    [Form : Mill interest Register]
        Part: OPenPageBrk,Mill interest Register Main
        Page Break    : DSP ClPageBreak, OPenPageBrk
    
    [Part:OPenPageBrk]
        Part: DB Title
        Local: Part:  DB Title :  Local : Line  : DB Title :  Local  : Field : Name Field : Set as:  "Mill interest Register"
        Vertical: Yes
       
    
        [Part: Mill interest Register Title]
            Line: Mill interest Register Title
           
        [Part: Mill interest Register Main]
            Line: Mill interest Register Title,Mill interest Register Main
            Repeat: Mill interest Register Main : Mill Sales Register
            Border:thin box
    
    [Line: Mill interest Register Title]
        Use: Mill Sales Register Main
        Local : Field: MSReg Partyname            : Set as : "Party Name"   
        Local : Field: MSReg Loanamt            : Set as : "Loan Amt"
        Local : Field: MSReg Intrate            : Set as : "Int Rate"
    
    
        Border: column Titles
       
    [Line: Mill interest Register Main]   
        Field: MSReg Partyname
        Right Field: MSReg Loanamt
        Right Field: MSReg Intrate
    
        Explode: Mill interest Register Invent
    
    [Field: MSReg Partyname]
        Set as    : $name
    
    [Field: MSReg Loanamt]
        Set as    : ""
    
    [Field: MSReg Intrate]
        Set as    : ""
    
    [Part: Mill interest Register Invent]
        Line: Mill interest Register Invent
        Repeat: Mill interest Register Invent :Ledger Interest Basis2
    
    [Line: Mill interest Register Invent]
        Use: Mill interest Register main
        Local : Field: MSReg Partyname            : Set as :  ""
        Local : Field: MSReg Loanamt            : Set as :$openingbalance   ;;; this value is not fetching showing blank
        Local : Field: MSReg Intrate            : Set as : $rate  ;;; this value is not fetching showing blank
    
    [Collection: Mill Sales Register]
        Type: ledger
        Child Of : "Sundry Debtors"
        Belongs To: yes
        Fetch: *.*
    
    [Collection: Ledger Interest Basis2]
            Type            : Interest Basis
            Child of        : ##pvsParentName
        Belongs To    :Yes
        Fetch        : Rate,Openingbalance
        ParmVAR        : pvsParentName        : String    :  #MSRegPartyname
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $OpeningBalance:Ledger:$LedgerName
     


  3. ankur daga

    ankur daga Member


    Yes Amit sir. But I need the opening balance and interest rates of loan amount. With "ledger interest basis" collection, opening balance and interest rates r not fetching. If I fetch like $interestrate:Ledger:$LedgerName then it's only taking the first interest rate of ledger but I need the interest rates of "ledger interest basis" collection.
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    I do not understand your requirements....

    But on basis of what you said.... you need to SORT the collection and call for it..using $$Collectionfield
     


  5. ankur daga

    ankur daga Member


    Amit Sir,

    i am fetching values from the following collection
    [Collection: Ledger Interest Basis2]
    Type : Interest Basis
    Child of : ##pvsParentName
    Belongs To :Yes
    Fetch : Rate,Openingbalance ;closingbalance,amount
    ParmVAR : pvsParentName : String : #MSRegPartyname

    I am using this collection to get the loan amount which is entered in the payment voucher.
    with the help of this above collection, i am able to get the interest amount($amount), closing balance ($closingbalance). But interest rate ($rate) and opening balance($openingbalance) is not getting fetched.

    and when i use $interestrate:Ledger:$LedgerName, then i only able to get the first interest rate from the list.

    upload_2021-7-12_13-16-36.png

    i want to fetch the above details in my report.
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Do not understand you query........ if it works then it is good.......... so what is your object???

    Sometimes -- structure and Collection basic also plays a role.... in your case....... it is working , so what is the issue??

    Other than above, cannot comment without looking at full code or your needs.
     


  7. ankur daga

    ankur daga Member


    Amit sir i will email you the code. pls check and revert. Thank you
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Dear Ankur,

    kindly do not send emails unless and until directed or asked for.

    Also the report you are referring to .... is more than adequate, so why are you trying to make your own report?? And anyway your collection structure is all wrong, as you might be able to fetch other values by way of compute, but NOT the RATE as it is tied to the BILLS and your collection is about Ledgers. so there is a mismatch.

    If you want as per above screenshot then you must use the same logic/structure for your collection to fetch the values.
     


  9. ankur daga

    ankur daga Member


    Ok sir,
    I will try to change the collection.

    Thank you
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Study...collection --- Group ledgerbills
    nd make your report accordingly. You will be able to get all the values as you require.
     


  11. ankur daga

    ankur daga Member


    Thank you sir.
     


  12. ankur daga

    ankur daga Member


    Thank you Amit sir, with your help i m able to make the report.
     


Share This Page