project QadFinancials > class BCInvoiceJournalEntry > method GetExRateByEntityInvoiceFlag


Parameters


iiCompanyIDinputintegerCompany ID
itCInvoiceDateinputdate
itCInvoicePostingDateinputdate
iiFromCurrencyIdinputinteger
icFromCurrencyCodeinputcharacter
iiToCurrencyIdinputinteger
icToCurrencyCodeinputcharacter
iiExchangeRateTypeIdinputinteger
icExchangeRateTypeCodeinputcharacter
odCInvoiceExchangeRateoutputdecimal
odCInvoiceRateScaleoutputdecimal
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCInvoiceJournalEntry.ApiStdMaintainTTValidateExchangeRate


program code (program1/bcinvoicejournalentry.p)

if vlCompPropIsAPUseInvDate = true
then assign vtExchangeRateDate = itCInvoiceDate.
else assign vtExchangeRateDate = itCInvoicePostingDate.    

<M-8 run GetExchangeRate
   (input  iiCompanyID (iiCompanyID), 
    input  iiFromCurrencyId (iiFromCurrencyID), 
    input  icFromCurrencyCode (icFromCurrencyCode), 
    input  iiToCurrencyId (iiToCurrencyID), 
    input  icToCurrencyCode (icToCurrencyCode), 
    input  iiExchangeRateTypeId (iiExchangeRateTypeID), 
    input  icExchangeRateTypeCode (icExchangeRateTypeCode), 
    input  vtExchangeRateDate (itValidityDate), 
    output odCInvoiceExchangeRate (odExchangeRate), 
    output odCInvoiceRateScale (odExchangeScaleFactor), 
    output viFcReturnSuper (oiReturnStatus)) in BCInvoiceJournalEntry>

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