project QadFinancials > class BDInvoice > method GetExRateByEntityInvoiceFlag


Parameters


itDInvoicePostingDateinputdate
itDInvoiceTaxPointDateinputdate
iiFromCurrencyIdinputinteger
icFromCurrencyCodeinputcharacter
iiToCurrencyIdinputinteger
icToCurrencyCodeinputcharacter
iiExchangeRateTypeIdinputinteger
icExchangeRateTypeCodeinputcharacter
odDInvoiceExchangeRateoutputdecimal
odDInvoiceRateScaleoutputdecimal
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BDInvoice.DefaultValuesCurrency
method BDInvoice.DefaultValuesGeneralInfo
method BDInvoice.StdMaintainTTCalcAmounts
method BDInvoice.ValidateComponentPre


program code (program1/bdinvoice.p)

if vlCompanyPropertyIsARUseTaxDate = true
then assign vtExchangeRateDate = itDInvoiceTaxPointDate.
else assign vtExchangeRateDate = itDInvoicePostingDate.    

<M-41 run GetExchangeRate
   (input  viCompanyId (iiCompanyID), 
    input  iiFromCurrencyId (iiFromCurrencyID), 
    input  icFromCurrencyCode (icFromCurrencyCode), 
    input  iiToCurrencyId (iiToCurrencyID), 
    input  icToCurrencyCode (icToCurrencyCode), 
    input  iiExchangeRateTypeId (iiExchangeRateTypeID), 
    input  icExchangeRateTypeCode (icExchangeRateTypeCode), 
    input  vtExchangeRateDate (itValidityDate), 
    output odDInvoiceExchangeRate (odExchangeRate), 
    output odDInvoiceRateScale (odExchangeScaleFactor), 
    output viFcReturnSuper (oiReturnStatus)) in BDInvoice>

if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and oiReturnStatus = 0)        
then assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0
then return.