project QadFinancials > class BDebtor > method ValCreditLimit
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bdebtor.p)
if t_sDebtor.DebtorIsFixedCredLim = true and
(t_sDebtor.DebtorFixedCredLimTC < 0 or
t_sDebtor.DebtorFixedCredLimTC = ?)
then do:
assign vcMessage = trim(substitute(#T-1'The value for &1 must be zero or positive.':250(69486)T-1#,trim(#T-9'Fixed Credit Amount':50(69485)T-9#)))
oiReturnStatus = -1.
<M-2 run SetMessage (input trim(vcMessage) (icMessage),
input '':U (icArguments),
input 'tDebtor.DebtorFixedCredLimTC':U (icFieldName),
input string(t_sDebtor.DebtorFixedCredLimTC) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input t_sDebtor.tc_Rowid (icRowid),
input 'QADFIN-3045':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BDebtor>
end.
if t_sDebtor.DebtorIsTurnOverCredLim = true and
(t_sDebtor.DebtorPercTurnOverCredLim < 0 or
t_sDebtor.DebtorPercTurnOverCredLim = ?)
then do:
assign vcMessage = trim(substitute(#T-10'The value for &1 must be zero or positive.':250(69486)T-10#,trim(#T-11'Percentage Of Turnover':50(69487)T-11#)))
oiReturnStatus = -1.
<M-3 run SetMessage (input trim(vcMessage) (icMessage),
input '':U (icArguments),
input 'tDebtor.DebtorPercTurnOverCredLim':U (icFieldName),
input string(t_sDebtor.DebtorPercTurnOverCredLim) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input t_sDebtor.tc_Rowid (icRowid),
input 'QADFIN-3046':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BDebtor>
end.
if t_sDebtor.DebtorIsMaxDaysDueCredLim = true and
(t_sDebtor.DebtorMaxNumDaysCredLim < 0 or
t_sDebtor.DebtorMaxNumDaysCredLim = ?)
then do:
assign vcMessage = trim(substitute(#T-12'The value for &1 must be zero or positive.':250(69486)T-12#,trim(#T-13'Maximum Number Of Days':50(69488)T-13#)))
oiReturnStatus = -1.
<M-5 run SetMessage (input trim(vcMessage) (icMessage),
input '':U (icArguments),
input 'tDebtor.DebtorMaxNumDaysCredLim':U (icFieldName),
input string(t_sDebtor.DebtorMaxNumDaysCredLim) (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input t_sDebtor.tc_Rowid (icRowid),
input 'QADFIN-3047':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BDebtor>
end.
if (t_sDebtor.DebtorIsFixedCredLim = true or
t_sDebtor.DebtorIsTurnOverCredLim = true) and
t_sDebtor.DebtorIsInclSOCredLim <> true and
t_sDebtor.DebtorIsInclOpenItmCredLim <> true
then do:
assign vcMessage = #T-8'When you select Apply Fixed Ceiling or Apply % of Turnover, you must also select one of the Include options.':250(13726)t-8#
oiReturnStatus = -1.
<M-7 run SetMessage (input trim(vcMessage) (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input t_sDebtor.tc_Rowid (icRowid),
input 'QADFIN-3048':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BDebtor>
end.
/* A warning message should be returned when the user has checked Credit Hold */
/* without checking any of the Calculate Before ... nor Calculate After ... checkboxes */
if t_sDebtor.DebtorIsLockedCredLim = true and
t_sDebtor.DebtorIsCheckBefDICredLim <> true and
t_sDebtor.DebtorIsCheckAftDICredLim <> true and
t_sDebtor.DebtorIsCheckBefSOCredLim <> true and
t_sDebtor.DebtorIsCheckAftSOCredLim <> true
then do:
assign vcMessage = #T-15'If you set Credit Hold on a customer record, the setting will only be effective when you create new sales orders or invoices, and if you also select one of the following ?ons: Calculate before, after Order Entry, Invoice Entry.':250(69733)T-15#
oiReturnStatus = 1.
<M-14 run SetMessage
(input trim(vcMessage) (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'W':U (icType),
input 3 (iiSeverity),
input t_sDebtor.tc_Rowid (icRowid),
input 'QadFin-8267':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BDebtor>
end.