Description
Sets the default values for the Payment Selection when the Confirm/Register activity is being called through the api
Parameters
biPostingYear | input-output | integer | |
biPostingPeriod | input-output | integer | |
btPostingDate | input-output | date | |
bcPostingJournal | input-output | character | |
btExecutionDate | input-output | date | Execution Date of Payment Selection confirm. Defaults to 'today' if blank. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program3/bpaymentselection.p)
/* EffectiveDate */
if btExecutionDate = ?
then assign btExecutionDate = today.
/* PostingDate */
if btPostingDate = ?
then assign btPostingDate = today.
/* Year & Period */
if (biPostingYear = 0 or biPostingYear = 0 or
biPostingPeriod = ? or biPostingPeriod = 0)
then do:
<I-25 {bFcOpenInstance
&CLASS = "BPeriod"}>
<M-73 run ApiGetDefaultPeriodDate
(input ? (iiYearIn),
input ? (iiPeriodIn),
input btPostingDate (itDateIn),
input ? (ilOpenForPurchase),
input ? (ilOpenForSales),
input ? (ilOpenForInventory),
output biPostingYear (oiYear),
output biPostingPeriod (oiPeriod),
output btPostingDate (otPostingDate),
output viFcReturnSuper (oiReturnStatus)) in BPeriod>
<I-89 {bFcCloseInstance
&CLASS = "BPeriod"}>
if viFcReturnSuper < 0
then do :
assign vcMessage = trim(substitute(#T-28'Posting integration: an error (&1) occurred while retrieving Year and Period from Posting Date.':255(327990789)T-28#,string(viFcReturnSuper), tPaySel.PaySelCode, string(btPostingDate))).
if (viFcReturnSuper = 0)
then assign oiReturnStatus = viFcReturnSuper.
end. /* if viExternalReturnStatus < 0 */
end. /* if (btPostingYear = 0 */