project QadFinancials > class BDInvoice > method DefaultValuesVatCurrency


Parameters


icVatCurrencyCodeinputcharacter
icCurrencyCodeinputcharacter
idDInvoiceExchangeRateinputdecimal
idDInvoiceRateScaleinputdecimal
itDInvoiceTaxPointDateinputdate
odDInvoiceVatExchangeRateoutputdecimal
odDInvoiceVatRateScaleoutputdecimal
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BDInvoice.DefaultValuesCurrency


program code (program1/bdinvoice.p)

if icVatCurrencyCode = ?
then assign icVatCurrencyCode = "":U.

if icVatCurrencyCode = "":U
then return.

<M-1 run GetVatExchangeRate
   (input  icVatCurrencyCode (icOwnVatCurrencyCode), 
    input  ? (iiOwnVatCurrencyId), 
    input  icCurrencyCode (icDInvoiceCurrencyCode), 
    input  ? (iiDInvoiceCurrencyId), 
    input  idDInvoiceExchangeRate (idDInvoiceExchangeRate), 
    input  idDInvoiceRateScale (idDInvoiceRateScale), 
    input  itDInvoiceTaxPointDate (itTaxPointDate), 
    output odDInvoiceVatExchangeRate (odVatExchangeRate), 
    output odDInvoiceVatRateScale (odVatRateScale), 
    output viFcReturnSuper (oiReturnStatus)) in BDInvoice>
if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and oiReturnStatus = 0)
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.