project QadFinancials > class BConCheckProcessor > method ConCheckProcessFinish

Description

This method will create instance to call BConCheck.ModifyConCheck method to update table ConCheck, ConCheckLine and ConCheckLineDet based on GL Consistency Execution result.


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BConCheckProcessor.ConCheckExecute


program code (program7/bconcheckprocessor.p)

/* ================================================================================== */
/* This method will create instance to call BConCheck.ModifyConCheck method to update */
/* table ConCheck, ConCheckLine and ConCheckLineDet.                                  */
/* ================================================================================== */
assign oiReturnStatus = -98.

/* create and open instance of BConCheck */
if viBDocumentLinkID = 0 or
   viBDocumentLinkID = ?
then do:
    <I-4 {bFcStartAndOpenInstance
         &ADD-TO-TRANSACTION   = "false"
         &CLASS                = "BDocumentLink"}>
end.
else do:
    <I-61 {bFcOpenInstance
         &CLASS           = "BDocumentLink"}>
end.

for each tConCheckRef:

    /* Convert to DOS format using unix2dos */
    if opsys = 'UNIX' and search (vcFile) <> ?
    then do:
        assign vcUnixCmd = 'unix2dos -q ' + vcFile + ' 2>/dev/null'.
        unix silent value (vcUnixCmd).
    end.
    if opsys = 'UNIX' and search (vcSumFile) <> ?
    then do:
        assign vcUnixCmd = 'unix2dos -q ' + vcSumFile + ' 2>/dev/null'.
        unix silent value (vcUnixCmd).
    end. /* UNIX */

    /* store detail file */
    <M-51 run SerializeAndStoreDocument
       (input  'BPeriod':U (icBusinessComponent), 
        input  tConCheckRef.Period_ID (iiObjectId), 
        input  vcFileName (icFileName), 
        input  vcFile (icFullPath), 
        output viDocumentLinkID (oiDocumentLinkID), 
        output viFcReturnSuper (oiReturnStatus)) in BDocumentLink>

     /* store sumary file */   
     <M-29 run SerializeAndStoreDocument
        (input  'BPeriod':U (icBusinessComponent), 
         input  tConCheckRef.Period_ID (iiObjectId), 
         input  vcSumFileName (icFileName), 
         input  vcSumFile (icFullPath), 
         output viDocumentLinkID (oiDocumentLinkID), 
         output viFcReturnSuper (oiReturnStatus)) in BDocumentLink>   
    /* os-delete value(vcFile). */
end.

/* close instance of BConCheck */
<I-19 {bFcCloseAndStopInstance
     &CLASS           = "BDocumentLink"}>

if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and oiReturnStatus >= 0)
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0 then return.

if oiReturnStatus = -98
then assign oiReturnStatus = 0.