project QadFinancials > class BCInvoice > method GetExRateByEntityInvoiceFlag


Parameters


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


Internal usage


QadFinancials
method BCInvoice.AdditionalUpdatesAllAssignments
method BCInvoice.AdditionalUpdatesAllCreateCAWHT
method BCInvoice.ApiStdMaintainTTCalcAmounts
method BCInvoice.CreateCInvoicesValidate
method BCInvoice.CreateCIPosting
method BCInvoice.CreateMFPosting
method BCInvoice.DefaultValuesCurrency
method BCInvoice.DefaultValuesGeneralInfo
method BCInvoice.DefaultValuesTax
method BCInvoice.DefaultValuesWHTFees
method BCInvoice.GetWHTDescriptionAndCCExch
method BCInvoice.UpdateCInvoiceFromAPM
method BCInvoice.ValidateComponentPre
method BCInvoice.ValidateComponentPreVat
method BCInvoice.ValidateComponentPreWHT


program code (program1/bcinvoice.p)

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

<M-3 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 odCInvoiceExchangeRate (odExchangeRate), 
    output odCInvoiceRateScale (odExchangeScaleFactor), 
    output viFcReturnSuper (oiReturnStatus)) in BCInvoice>

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