Fetch Exchange Rate from Currency Master

Discussion in 'Tally Developer' started by Arun Prasath, Apr 25, 2022.

    
  1. Arun Prasath

    Arun Prasath Member


    Dear Experts,

    I am trying to fetch the “Rs” exchange rate in the ledger report.

    All exchange rates entered in the currency master

    Rs – Standard Rates

    I need to fetch the exchange rate as of date order in the ledger report (If the exchange rate is not available on that particular date, should fetch the nearest rate). But I am getting the first date’s rate only.

    Herewith I attached the tried code. Kindly see and advise me on how could I get the correct rates.

    [#Line: DSP VchAccTitles]

    Add: Right Field: After: DSP VchLedBalTitle : DSP VchLedRupeeTitle
    [Field:DSP VchLedRupeeTitle]

    Use : Amount Title Field
    Set as : $$LocaleString:"Exchange Rate"
    Width: 30 mms
    [#Line: DSP VchOpBal]
    Add: Right Field: After:DSP VchLedBalance : DSP VchLedRupeeValue
    [#Line: DSP VchAccDetail]

    Add: Right Field: After:DSP VchLedBalance : DSP VchLedRupeeValue
    [Field:DSP VchLedRupeeValue]

    Use : Number Field
    Set as: @MasterExRate
    MasterExRate:$$FilterValue:$SRate:NGSTStandardCurrencyColl:1:CurrencyFiletr
    Width: 30 mms
    [System:Formula]

    CurrencyFiletr: $OriginalSymbol = "Rs" and @@DtFilter
    DtFilter : $Date <= $$ReqObject:$Date
    ;;-------------------------------------------
    [Collection : NGSTCurrency]

    Type : Currency
    [Collection : NGSTStandard Currency Coll]

    Source Collection :NGSTCurrency
    Walk : Daily Std Rates
    Compute : SRate : $SpecifiedRate
    Compute: EDate : $Date
    Fetch :Date ,Specified Rate ,Transacted Rate ,Original Symbol
    ;-------------------------------------------------
     


Share This Page