Description
This method is really to do process consistency check.
Parameters
iiSelCompanyID | input | integer | |
iiConCheckPeriodYear | input | integer | |
iiConCheckPeriodPeriod | input | integer | |
icConCheckLineType | input | character | |
icConCheckLineDetType | input | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program7/bconcheckprocessor.p)
/* ======================================================== ========================= */
/* This method follows the consistency check list to execute reports and scripts in */
/* two different ways. */
/* Reports: Call Process<Name>Report methods in BConCheckProcess. */
/* Scripts: Call ProcessScript method which will then execute scripts sequentially */
/* */
/* After all validation item being executed, update tConCheckRef, tConCheckLineRef */
/* and tConCheckLineDetRef on execution result, startdate/starttime, duration. */
/* ================================================================================= */
assign oiReturnStatus = -98
viLocalReturn = 0.
if vcNumericFormat = ? or vcNumericFormat = ""
then do:
<I-92 {bFcOpenInstance
&CLASS = "Session"}>
<M-49 run GetCharacterValue
(input 'vcNumericFormat':U (icName),
output vcNumericFormat (ocValue),
output viFcReturnSuper (oiReturnStatus)) in Session>
<I-9 {bFcOpenInstance
&CLASS = "Session"}>
if vcNumericFormat = ",":U or vcNumericFormat = "european":U then assign vcNumericFormat = "EUROPEAN":U.
else assign vcNumericFormat = "AMERICAN":U.
end.
case icConCheckLineDetType :
/* =============================================== */
/* All Types which call TConCheck */
/* =============================================== */
when {&CONCHECKLINEDETTYPE-BANKENTRY} or
when {&CONCHECKLINEDETTYPE-UTSYSCNP} or
when {&CONCHECKLINEDETTYPE-CROSSCOMPANY} or
when {&CONCHECKLINEDETTYPE-APSUBGL} or
when {&CONCHECKLINEDETTYPE-ARSUBGL} or
when {&CONCHECKLINEDETTYPE-OPENITEMGL} or
when {&CONCHECKLINEDETTYPE-POSTINGBALANCE} or
when {&CONCHECKLINEDETTYPE-UNPOSTTRANS} or
when {&CONCHECKLINEDETTYPE-REVALUATION} or
when {&CONCHECKLINEDETTYPE-DAEMONQUEUE} or
when {&CONCHECKLINEDETTYPE-UNMATCHEDINVOICE} OR
when {&CONCHECKLINEDETTYPE-APGL} or
when {&CONCHECKLINEDETTYPE-ARGL}
then do:
assign vhFcComponent = ?.
<M-75 run MainEntry
(input vcFile (icFile),
output tConCheckLineDetRef.ConCheckLineDetResult (ocConCheckLineDetResult),
output tConCheckLineDetRef.ConCheckLineDetStartDate (otConCheckLineDetStartDate),
output tConCheckLineDetRef.ConCheckLineDetStartTime (oiConCheckLineDetStartTime),
output tConCheckLineDetRef.ConCheckLineDetDuration (oiConCheckLineDetDuration),
input iiSelCompanyID (iiCompanyID),
input tConCheckRef.Period_ID (iiPeriodID),
input viSessionID (iiSessionID),
input icConCheckLineDetType (icCheckType),
output tConCheckLineDetRef.ConCheckLineDetErrCount (oiErrorNumbers),
output tConCheckLineDetRef.ConCheckLineDetVersion (ocConCheckLineDetVersion),
input vcAppVersion (icAppVersion),
input vcSumFile (icSumFile),
input {&TARGETPROCEDURE} (ihTranslationHandle),
input vcNumericFormat (icNumericFormat),
output viFcReturnSuper (oiReturnStatus)) in TConCheck>
run gipr_DeleteProcedure in vhFcComponent.
delete procedure vhFcComponent.
if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and viLocalReturn >= 0)
then assign viLocalReturn = viFcReturnSuper.
end.
when {&CONCHECKLINEDETTYPE-RECURENTRY}
then do:
if viBClosingPostingsReportID = 0 or
viBClosingPostingsReportID = ?
then do:
<I-22 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BClosingPostingsReport"}>
end.
else do:
<I-4 {bFcOpenInstance
&CLASS = "BClosingPostingsReport"}>
end.
<M-25 run ProcessRecurringEntries
(input iiConCheckPeriodYear (iiPeriodYear),
input iiConCheckPeriodPeriod (iiPeriodPeriod),
input vcFile (icFile),
output tConCheckLineDetRef.ConCheckLineDetResult (ocConCheckLineDetResult),
output tConCheckLineDetRef.ConCheckLineDetStartDate (otConCheckLineDetStartDate),
output tConCheckLineDetRef.ConCheckLineDetStartTime (oiConCheckLineDetStartTime),
output tConCheckLineDetRef.ConCheckLineDetDuration (oiConCheckLineDetDuration),
output tConCheckLineDetRef.ConCheckLineDetErrCount (oiErrorNumbers),
input iiSelCompanyID (iiCompanyID),
output tConCheckLineDetRef.ConCheckLineDetVersion (ocConCheckLineDetVersion),
input vcAppVersion (icAppVersion),
input vcSumFile (icSumFile),
output viFcReturnSuper (oiReturnStatus)) in BClosingPostingsReport>
if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and viLocalReturn >= 0)
then assign viLocalReturn = viFcReturnSuper.
<I-43 {bFcCloseInstance
&CLASS = "BClosingPostingsReport"}>
end.
when {&CONCHECKLINEDETTYPE-ALLOCATION}
then do:
if viBClosingPostingsReportID = 0 or
viBClosingPostingsReportID = ?
then do:
<I-57 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BClosingPostingsReport"}>
end.
else do:
<I-53 {bFcOpenInstance
&CLASS = "BClosingPostingsReport"}>
end.
<M-23 run ProcessAllocationCheck
(input iiConCheckPeriodYear (iiPeriodYear),
input iiConCheckPeriodPeriod (iiPeriodPeriod),
input vcFile (icFile),
output tConCheckLineDetRef.ConCheckLineDetResult (ocConCheckLineDetResult),
output tConCheckLineDetRef.ConCheckLineDetStartDate (otConCheckLineDetStartDate),
output tConCheckLineDetRef.ConCheckLineDetStartTime (oiConCheckLineDetStartTime),
output tConCheckLineDetRef.ConCheckLineDetDuration (oiConCheckLineDetDuration),
output tConCheckLineDetRef.ConCheckLineDetErrCount (oiErrorNumbers),
input iiSelCompanyID (iiCompanyID),
output tConCheckLineDetRef.ConCheckLineDetVersion (ocConCheckLineDetVersion),
input vcAppVersion (icAppVersion),
input vcSumFile (icSumFile),
output viFcReturnSuper (oiReturnStatus)) in BClosingPostingsReport>
if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and viLocalReturn >= 0)
then assign viLocalReturn = viFcReturnSuper.
<I-90 {tFcCloseInstance
&CLASS = "BClosingPostingsReport"}>
end.
when {&CONCHECKLINEDETTYPE-NUMBERING}
then do:
if viBClosingPostingsReportID = 0 or
viBClosingPostingsReportID = ?
then do:
<I-89 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BClosingPostingsReport"}>
end.
else do:
<I-83 {bFcOpenInstance
&CLASS = "BClosingPostingsReport"}>
end.
<M-58 run ProcessVoucherCompleteness
(input iiConCheckPeriodPeriod (iiPeriodPeriod),
input vcFile (icFile),
input iiConCheckPeriodYear (iiPeriodYear),
output tConCheckLineDetRef.ConCheckLineDetResult (ocConCheckLineDetResult),
output tConCheckLineDetRef.ConCheckLineDetStartTime (oiConCheckLineDetStartTime),
output tConCheckLineDetRef.ConCheckLineDetDuration (oiConCheckLineDetDuration),
output tConCheckLineDetRef.ConCheckLineDetStartDate (otConCheckLineDetStartDate),
output tConCheckLineDetRef.ConCheckLineDetErrCount (oiErrorNumbers),
input iiSelCompanyID (iiCompanyID),
output tConCheckLineDetRef.ConCheckLineDetVersion (ocConCheckLineDetVersion),
input vcAppVersion (icAppVersion),
input vcSumFile (icSumFile),
output viFcReturnSuper (oiReturnStatus)) in BClosingPostingsReport>
if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and viLocalReturn >= 0)
then assign viLocalReturn = viFcReturnSuper.
<I-55 {bFcCloseInstance
&CLASS = "BClosingPostingsReport"}>
end.
when {&CONCHECKLINEDETTYPE-GLAUTOBAL}
then do:
if viBClosingPostingsReportID = 0 or
viBClosingPostingsReportID = ?
then do:
<I-80 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BClosingPostingsReport"}>
end.
else do:
<I-84 {bFcOpenInstance
&CLASS = "BClosingPostingsReport"}>
end.
<M-64 run ProcessIsGLAutoBalClear
(input vcFile (icFile),
input iiConCheckPeriodPeriod (iiPeriodPeriod),
input iiConCheckPeriodYear (iiPeriodYear),
output tConCheckLineDetRef.ConCheckLineDetResult (ocConCheckLineDetResult),
output tConCheckLineDetRef.ConCheckLineDetDuration (oiConCheckLineDetDuration),
output tConCheckLineDetRef.ConCheckLineDetStartTime (oiConCheckLineDetStartTime),
output tConCheckLineDetRef.ConCheckLineDetStartDate (otConCheckLineDetStartDate),
output tConCheckLineDetRef.ConCheckLineDetErrCount (oiErrorNumbers),
input iiSelCompanyID (iiCompanyID),
output tConCheckLineDetRef.ConCheckLineDetVersion (ocConCheckLineDetVersion),
input vcAppVersion (icAppVersion),
input vcSumFile (icSumFile),
input vcNumericFormat (icNumericFormat),
output viFcReturnSuper (oiReturnStatus)) in BClosingPostingsReport>
if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and viLocalReturn >= 0)
then assign viLocalReturn = viFcReturnSuper.
<I-20 {bFcCloseInstance
&CLASS = "BClosingPostingsReport"}>
end.
end. /* case icConCheckLineDetType : */
assign oiReturnStatus = viLocalReturn.