Description
Assign the Statutory Currency amounts based on the amounts in TC and the exchange rate between TC and the newly entered SC.
Parameters
ocErrorMessage | output | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/tsetstatutorycurrency.p)
assign oiReturnStatus = -98
viLocalReturnStatus = 0.
STATCURRBLOCK:
do on error undo, return:
for each PostingLine of Posting where
PostingLine.PostingLineDebitTC = 0 and PostingLine.PostingLineCreditTC = 0 and
PostingLine.PostingLineDebitLC = 0 and PostingLine.PostingLineCreditLC = 0 and
(PostingLine.PostingLineDebitCC <> 0 or PostingLine.PostingLineCreditCC <> 0)
exclusive-lock:
/* If the posting was created by the SC utitlity, then we can remove it */
if PostingLine.PostingLineText = "Balanced by Statutory Currency Utility":U
then delete PostingLine.
else assign PostingLine.PostingLineDebitCC = 0
PostingLine.PostingLineCreditCC = 0
PostingLine.LastModifiedDate = today.
end. /* for each company where */
end. /* STATCURRBLOCK */
assign oiReturnStatus = viLocalReturnStatus.