project QadFinancials > class BCInvoice > method DefaultValuesCurrency
Parameters
| iiCompanyID | input | integer | |
| icCurrencyCode | input | character | |
| iiCurrencyId | input | integer | |
| itCInvoicePostingDate | input | date | |
| icOwnVatCurrencyCode | input | character | |
| itCInvoiceTaxPointDate | input | date | |
| itCInvoiceDate | input | date | |
| odCInvoiceExchangeRate | output | decimal | |
| odCInvoiceRateScale | output | decimal | |
| odCInvoiceVatExchangeRate | output | decimal | |
| odCInvoiceVatRateScale | output | decimal | |
| odCInvoiceCCExchangeRate | output | decimal | |
| odCInvoiceCCRateScale | output | decimal | |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program3/bcinvoice.p)
if icCurrencyCode = ?
then assign icCurrencyCode = "":U.
if icCurrencyCode = "":U
then return.
if icCurrencyCode = vcCompanyLC
then assign odCInvoiceExchangeRate = 1
odCInvoiceRateScale = 1.
else do:
<M-6 run GetExRateByEntityInvoiceFlag
(input itCInvoiceDate (itCInvoiceDate),
input itCInvoicePostingDate (itCInvoicePostingDate),
input iiCurrencyId (iiFromCurrencyId),
input icCurrencyCode (icFromCurrencyCode),
input viCompanyLCId (iiToCurrencyId),
input ? (icToCurrencyCode),
input ? (iiExchangeRateTypeId),
input {&EXCHANGERATETYPE-ACCOUNTING} (icExchangeRateTypeCode),
output odCInvoiceExchangeRate (odCInvoiceExchangeRate),
output odCInvoiceRateScale (odCInvoiceRateScale),
output viFcReturnSuper (oiReturnStatus)) in BCInvoice>
end.
if icCurrencyCode = vcCompanyCC
then assign odCInvoiceCCExchangeRate = 1
odCInvoiceCCRateScale = 1.
else do:
<M-35 run GetExRateByEntityInvoiceFlag
(input itCInvoiceDate (itCInvoiceDate),
input itCInvoicePostingDate (itCInvoicePostingDate),
input iiCurrencyId (iiFromCurrencyId),
input icCurrencyCode (icFromCurrencyCode),
input viCompanyCCId (iiToCurrencyId),
input ? (icToCurrencyCode),
input ? (iiExchangeRateTypeId),
input {&EXCHANGERATETYPE-STATUTORY} (icExchangeRateTypeCode),
output odCInvoiceCCExchangeRate (odCInvoiceExchangeRate),
output odCInvoiceCCRateScale (odCInvoiceRateScale),
output viFcReturnSuper (oiReturnStatus)) in BCInvoice>
end.
<M-3 run DefaultValuesVatCurrency
(input iiCompanyID (iiCompanyID),
input icOwnVatCurrencyCode (icVatCurrencyCode),
input icCurrencyCode (icCurrencyCode),
input odCInvoiceExchangeRate (idCInvoiceExchangeRate),
input odCInvoiceRateScale (idCInvoiceRateScale),
input itCInvoiceTaxPointDate (itCInvoiceTaxPointDate),
output odCInvoiceVatExchangeRate (odCInvoiceVatExchangeRate),
output odCInvoiceVatRateScale (odCInvoiceVatRateScale),
output viFcReturnSuper (oiReturnStatus)) in BCInvoice>