Parameters
| iiExpNoteLine_ID | input | integer | |
| ilGLIsDivisionAccount | input | logical | |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bexpensenote.p)
find first t_sExpNoteLine where t_sExpNoteLine.ExpNoteLine_ID = iiExpNoteLine_ID no-error.
if not available t_sExpNoteLine then return.
if ilGLIsDivisionAccount = false and
t_sExpNoteLine.tcDivisionCode <> "":U and
t_sExpNoteLine.tcDivisionCode <> ? and
t_sExpNoteLine.tcDivisionCode <> "?":U
then do:
assign vcMessage = substitute(#T-3'Sub-account code (&1) is not applicable for GL account (&2).':255(1904)T-3#,
t_sExpNoteLine.tcDivisionCode,
t_sExpNoteLine.tcGLCode).
<M-1 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input 'tExpNoteLine.tcDivisionCode':U (icFieldName),
input t_sExpNoteLine.tcDivisionCode (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input t_sExpNoteLine.tc_Rowid (icRowid),
input 'QADFIN-3027':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BExpenseNote>
assign oiReturnStatus = -1.
end.
if (t_sExpNoteLine.tcSafStructureCode = "":U or
t_sExpNoteLine.tcSafStructureCode = ? or
t_sExpNoteLine.tcSafStructureCode = "?":U) and
((t_sExpNoteLine.tcSAFConcept1 <> "":U and
t_sExpNoteLine.tcSAFConcept1 <> ? and
t_sExpNoteLine.tcSAFConcept1 <> "?":U) or
(t_sExpNoteLine.tcSAFConcept2 <> "":U and
t_sExpNoteLine.tcSAFConcept2 <> ? and
t_sExpNoteLine.tcSAFConcept2 <> "?":U) or
(t_sExpNoteLine.tcSAFConcept3 <> "":U and
t_sExpNoteLine.tcSAFConcept3 <> ? and
t_sExpNoteLine.tcSAFConcept3 <> "?":U) or
(t_sExpNoteLine.tcSAFConcept4 <> "":U and
t_sExpNoteLine.tcSAFConcept4 <> ? and
t_sExpNoteLine.tcSAFConcept4 <> "?":U) or
(t_sExpNoteLine.tcSAFConcept5 <> "":U and
t_sExpNoteLine.tcSAFConcept5 <> ? and
t_sExpNoteLine.tcSAFConcept5 <> "?":U) or
(t_sExpNoteLine.tcSAFCode1 <> "":U and
t_sExpNoteLine.tcSAFCode1 <> ? and
t_sExpNoteLine.tcSAFCode1 <> "?":U) or
(t_sExpNoteLine.tcSAFCode2 <> "":U and
t_sExpNoteLine.tcSAFCode2 <> ? and
t_sExpNoteLine.tcSAFCode2 <> "?":U) or
(t_sExpNoteLine.tcSAFCode3 <> "":U and
t_sExpNoteLine.tcSAFCode3 <> ? and
t_sExpNoteLine.tcSAFCode3 <> "?":U) or
(t_sExpNoteLine.tcSAFCode4 <> "":U and
t_sExpNoteLine.tcSAFCode4 <> ? and
t_sExpNoteLine.tcSAFCode4 <> "?":U) or
(t_sExpNoteLine.tcSAFCode5 <> "":U and
t_sExpNoteLine.tcSAFCode5 <> ? and
t_sExpNoteLine.tcSAFCode5 <> "?":U))
then do:
assign vcMessage = substitute(#T-4'SAF concepts and SAF codes (&1, &2) must be blank if no SAF structure was specified.':255(1905)t-4#,
t_sExpNoteLine.ExpNoteLineDate,
?).
<M-2 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input 'tExpNoteLine.tcSafStructureCode':U (icFieldName),
input t_sExpNoteLine.tcSafStructureCode (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input t_sExpNoteLine.tc_Rowid (icRowid),
input 'QADFIN-3028':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BExpenseNote>
assign oiReturnStatus = -1.
end.