project QadFinancials > class BVATPeriod > method SetPeriodMarkIDSequence1
Description
PeriodMarkIDSequence1
Parameters
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program2/bvatperiod.p)
/* ========================================================================= */
/* In case field viPeriodMarkIDSequence1 is not yet assigned then do it here */
/* ========================================================================= */
if viPeriodMarkID = 0 or
viPeriodMarkID = ?
then do :
<Q-1 run PeriodMarkByCompSeqCodeAct (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input ?, (PeriodMarkId)
input ?, (PeriodMarkCode)
input 1, (PeriodMarkSequence)
input ?, (PeriodMarkIsActive)
output dataset tqPeriodMarkByCompSeqCodeAct) in BPeriodMark >
find first tqPeriodMarkByCompSeqCodeAct where
tqPeriodMarkByCompSeqCodeAct.tiCompany_ID = viCompanyId and
tqPeriodMarkByCompSeqCodeAct.tiPeriodMarkSequence = 1
no-lock no-error.
if available tqPeriodMarkByCompSeqCodeAct
then assign viPeriodMarkID = tqPeriodMarkByCompSeqCodeAct.tiPeriodMark_ID
vcPeriodMarkCode = tqPeriodMarkByCompSeqCodeAct.tcPeriodMarkCode.
end. /* if viPeriodMarkIDSequence1 = 0 */