Description
Set the statutory currency flag and statutory currency code in domainproperty.
Parameters
icDomainCode | input | character | |
icNewSCCode | input | character | New Statutory Currency Code |
ilDomainIsStatutoryCurrency | input | logical | |
ocErrorMessage | output | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/tsetstatutorycurrency.p)
assign oiReturnStatus = -98
viLocalReturnStatus = 0.
DOMAINBLOCK:
do:
/* Get DomainProperty */
find Domains where
Domains.DomainCode = icDomainCode
no-lock no-error.
if not available Domains
then do:
assign viLocalReturnStatus = -900
ocErrorMessage = substitute("Unable to get the Domain with code &1", icDomainCode).
leave DOMAINBLOCK.
end. /* if not available Domains */
find DomainProperty where
DomainProperty.Domain_ID = Domains.Domain_ID
exclusive-lock no-error.
if not available DomainProperty
then do :
assign viLocalReturnStatus = -901
ocErrorMessage = substitute("Unable to get the DomainProperty for code &1", icDomainCode).
leave DOMAINBLOCK.
end. /* if not available DomainProperty */
/* set Statutory Currency flag and field */
assign DomainProperty.StatutoryCurrency_ID = viNewSCID
DomainProperty.DomainPropertyIsStatutory = ilDomainIsStatutoryCurrency.
end. /* DOMAINBLOCK */
assign oiReturnStatus = viLocalReturnStatus.