project QadFinancials > class BOpenItemAdjustment > method GetExchangeRateDateToUse


Parameters


ilisCustomerinputlogical
itPostingDateinputdate
itInvoiceDateinputdate
icInvoiceTypeinputcharacter
otExchangeRateDateoutputdate
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BOpenItemAdjustment.GetExchangeRateAndScale
method BOpenItemAdjustment.OIAdjCommitSubCInvoiceDiscount
method BOpenItemAdjustment.OIAdjCommitSubDInvoiceDiscount


program code (program1/bopenitemadjustment.p)

assign oiReturnStatus = 0.

if ilisCustomer then do:
    assign otExchangeRateDate = itPostingDate.           
end. 
else do: /* Supplier */
    
    if icInvoiceType = {&INVOICETYPE-PREPAYMENT} then do:
        assign otExchangeRateDate = itPostingDate.
    end.    
    else if vlCompanyPropertyIsAPUseInvDt then do:
        assign otExchangeRateDate = itInvoiceDate.
    end.        
    else do:
        assign otExchangeRateDate = itPostingDate.            
    end.    
end.