Viewing file: processReceiveDoc.php (19.79 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once("../../class/clsConnection.php");
include_once("../../class/clsDB.php");
include_once "../global.php";
include_once "../class/clsDepartment.php";
include_once "../class/clsPerson.php";
include_once "../link/function.php";
include_once "../link/functionshow.php";
include_once "../class/clsDocLinePosition.php";
include_once "../class/clsDocLineConfig.php";
include_once "../class/clsReceiveSendType.php";
include_once "../class/clsDocType.php";
include_once "../class/clsDocSpeedLevel.php";
include_once "../class/clsDocSecreLevel.php";
include_once "../class/clsDocattatchesTmp.php";
include_once "../class/clsDocuments.php";
include_once "../class/clsDocattatches.php";
include_once "../class/clsDocReceiveSend.php";
include_once "../class/clsRunningDoc.php";
include_once "funct.php";
$oC = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDP = new Department($oC);
$oDP2 = new Department($oC);
$oDP3 = new Department($oC);
$oDP4 = new Department($oC);
$oDP5 = new Department($oC);
$oPS = new person($oC);
$oPS2 = new person($oC);
$oPS3 = new person($oC);
$oDlc = new DocLineConfig($oC);
$oDlc2 = new DocLineConfig($oC);
$oDlc3 = new DocLineConfig($oC);
$oDlp = new docLinePosition($oC);
$oDlp1 = new docLinePosition($oC);
$oRSt = new receiveSendType($oC);
$oDt = new doctype($oC);
$oDsl = new DocSpeedLevel($oC);
$oDcl = new DocSecretLevel($oC);
$oDtmp = new DocattatchesTmp($oC);
$oDoc = new Documents($oC);
$oDoc2 = new Documents($oC);
$oDatt = new Docattatches($oC);
$oRs = new DocReceiveSend($oC);
$oRs1 = new DocReceiveSend($oC);
$oRs2 = new DocReceiveSend($oC);
$oRs3 = new DocReceiveSend($oC);
$oRs4 = new DocReceiveSend($oC);
$oRd = new runningdoc($oC);
$MaxDocGroup=$oDP->SearchMaxDocGroup();
if($method=="addReceiveDoc"){
$flagCommit = true;
$oC->BeginTrans();
$timesend=getNowDateTh()." ".date('H:i:s');
//-----check runningNo
$checkerror=0;
$DocTypeNo=ShowRunningDoc(3,3,$deptId);
//echo "==".$DocTypeNo;
$oDP->SearchByKey($deptId); $oDP->GetRecord(); //echo $oDP->deptName;
if($DocTypeNo=="N"){
$checkerror++;
?>
<script>alert("หน่วยงาน<? echo $oDP->deptName; ?>\nยังไม่มีการตั้งค่าการใช้งานเลขทะเบียนหนังสือภายใน \nกรุณาติดต่อผู้รับผิดชอบระบบ");</script>
<?
echo "<meta http-equiv='refresh' content='0; URL=showReceiveDoc.php?DtID=$DtID&RsID=$RsID&DocID=$DocID&DrsID=$DrsID'>";
}
if($DocTypeNo=="NoConfirm"){
$checkerror++;
?>
<script>alert("หน่วยงาน<? echo $oDP->deptName; ?>\nยังไม่ยืนยันการใช้งานเลขทะเบียนหนังสือภายใน \nกรุณาติดต่อผู้รับผิดชอบระบบ");</script>
<?
echo "<meta http-equiv='refresh' content='0; URL=showReceiveDoc.php?DtID=$DtID&RsID=$RsID&DocID=$DocID&DrsID=$DrsID'>";
}
//----set running Doc
$oRd->SearchRunningBydocGroupDtIDDept($DocGroup,3,$deptId);
$oRd->GetRecord();
$oRd->Edit();
$oRd->rID=$oRd->rID;
//echo "rID=".$oRd->rID."<br>";
$oRd->DtID=$oRd->DtID;
$oRd->deptId=$oRd->deptId;
$oRd->receiveNoStart=$oRd->receiveNoStart;
$oRd->receiveNo=$DocTypeNo;
//echo "DocTypeNo=".$oRd->receiveNo."<br>";
$oRd->sendNoStart=$oRd->sendNoStart;
$oRd->sendNo=$oRd->sendNo;
$oRd->regisNoStart=$oRd->regisNoStart;
$oRd->regisNo=$oRd->regisNo;
$oRd->docGroup=$oRd->docGroup;
$oRd->confirm=$oRd->confirm;
$flagCommit = $oRd->Save();
//----edit set Document
$oDoc2->SearchByKey($DocID);
$oDoc2->GetRecord();
$oDoc2->Edit();
$oDoc2->DocID=$oDoc2->DocID;
//echo "DocID=".$oDoc2->DocID."<br>";
$oDoc2->DocPID=$oDoc2->DocPID;
$oDoc2->DlcID=$oDoc2->DlcID;
$oDoc2->PtID=$oDoc2->PtID;
$oDoc2->DtID=$oDoc2->DtID; //doc inner
$oDoc2->DslID=$oDoc2->DslID;
$oDoc2->DclID=$oDoc2->DclID;
$oDoc2->DsID="1";
$oDoc2->RsID=$oDoc2->RsID; //sendin
$oDoc2->DocDateCreate=$timesend;
$oDoc2->DocUserCreate=$oDoc2->DocUserCreate;
$oDoc2->DocTypeNo=$oRd->receiveNo;
//echo "DocTypeNo=".$oDoc2->DocTypeNo."<br>";
$oDoc2->DocDate=$oDoc2->DocDate;
$oDoc2->DocNo=$oDoc2->DocNo;
$oDoc2->DocSubject=$oDoc2->DocSubject;
$oDoc2->DocFrom=$oDoc2->DocFrom;
$oDoc2->DocTo=$oDoc2->DocTo;
$oDoc2->DocShortDesc=$oDoc2->DocShortDesc;
$oDoc2->DocSpeedLevelDueDate=$oDoc2->DocSpeedLevelDueDate;
$oDoc2->DocStart=$oDoc2->DocStart;
$oDoc2->DocFinish=$oDoc2->DocFinish;
$oDoc2->DocGroup=$oDoc2->DocGroup;
$oDoc2->DocRef=$oDoc2->DocRef;
$oDoc2->DocCircular=$oDoc2->DocCircular;
$oDoc2->DocfCir=$oDoc2->DocfCir;
$oDoc2->DocOther=$oDoc2->DocOther;
$oDoc2->CertificatePs=$oDoc2->CertificatePs;
$oDoc2->fDelete=$oDoc2->fDelete;
$oDoc2->endDoc=$oDoc2->endDoc;
$oDoc2->sendToPs=$oDoc2->sendToPs;
$oDoc2->AnID=$oDoc2->AnID;
$oDoc2->DocRefAns=$oDoc2->DocRefAns;
$oDoc2->DocRefAnsID=$oDoc2->DocRefAnsID;
$oDoc2->DocstartDatePost=$oDoc2->DocstartDatePost;
$oDoc2->DocendDatePost=$oDoc2->DocendDatePost;
$oDoc2->DocMainPost=$oDoc2->DocMainPost;
$oDoc2->DocGetPost=$oDoc2->DocGetPost;
$oDoc2->DocShowInOut=$oDoc2->DocShowInOut;
$oDoc2->DocDateGetPost=$oDoc2->DocDateGetPost;
$oDoc2->useMainDocNo=$oDoc2->useMainDocNo;
$oDoc2->DocforSign=$oDoc2->DocforSign;
$flagCommit = $oDoc2->Save();
//-----edit set RsDoc
$oRs->SearchByKey($DrsID);
//echo "DrsID_edit=".$DrsID."<br>";
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsID=$oRs->DrsID;
$oRs->DocID=$oRs->DocID;
$oRs->DlcID=$oRs->DlcID;
$oRs->DsID=$oRs->DsID;
$oRs->personId=$oRs->personId;
$oRs->PtID=$oRs->PtID;
$oRs->DrsDocTypeNo=$oRs->DrsDocTypeNo;
$oRs->DrsReceiveDate=$oRs->DrsReceiveDate;
$oRs->DrsReceivePersonId=$oRs->DrsReceivePersonId;
$oRs->DrsSendDate=$timesend;
$oRs->DrsSendPersonId=$personId;
$oRs->DrsSendDlcID=$DlcID;
$oRs->DrsDocDueDate=$oRs->DrsDocDueDate;
$oRs->DrsDlcIDCreate=$oRs->DrsDlcIDCreate;
$oRs->DrsPsIDCreate=$oRs->DrsPsIDCreate;
$oRs->DrsPropose=$oRs->DrsPropose;
$oRs->DrsSign=$oRs->DrsSign;
$oRs->DrsFromDrsID=$oRs->DrsFromDrsID;
$oRs->DocGroup=$oRs->DocGroup;
$oRs->DrsflagRead=$oRs->DrsflagRead;
$oRs->DrsByPass=$oRs->DrsByPass;
$oRs->DrsSend=$oRs->DrsSend;
$oRs->DrsSendToPs=$oRs->DrsSendToPs;
$oRs->DrsDelete=$oRs->DrsDelete;
$oRs->DrsMainPs=$oRs->DrsMainPs;
$oRs->AnID=$oRs->AnID;
$oRs->DrsDocReceiveDate=$oRs->DrsDocReceiveDate;
$oRs->DocRefAnsDate=$oRs->DocRefAnsDate;
$oRs->DrsSendDocNew=$oRs->DrsSendDocNew;
$oRs->DrsInboxID=$oRs->DrsInboxID;
$oRs->DrsstartDatePost=$oRs->DrsstartDatePost;
$oRs->DrsendDatePost=$oRs->DrsendDatePost;
$oRs->DrsSendBack=$oRs->DrsSendBack;
$oRs->DrsSendBackDlcID=$oRs->DrsSendBackDlcID;
$oRs->DrsfSendBack=$oRs->DrsfSendBack;
$flagCommit = $oRs->Save();
$oRs2->AddNew();
$oRs2->DrsID=$oRs2->GetNextCode();
//echo "DrsID=".$oRs2->DrsID."<br>";
$oRs2->DocID=$oRs->DocID;
$oRs2->DlcID=$DlcID;
$oRs2->DsID="1";
$oRs2->personId=$oRs->personId;
$oRs2->PtID=$oRs->PtID;
$oRs2->DrsDocTypeNo=$DocTypeNo;
$oRs2->DrsReceiveDate=$timesend;
$oDlc->SearchByKey($oDoc->DlcID); $oDlc->GetRecord();
$oRs2->DrsReceivePersonId=$personId;
$oRs2->DrsSendDate=$oRs2->DrsSendDate;
$oRs2->DrsSendPersonId=$oRs2->DrsSendPersonId;
$oRs2->DrsSendDlcID=$oRs2->DrsSendDlcID;
$oRs2->DrsDocDueDate=$oRs->DrsDocDueDate;
$oRs2->DrsDlcIDCreate=$DlcID ;
$oRs2->DrsPsIDCreate=$personId;
$oRs2->DrsPropose=$DrsSend;
$oRs2->DrsSign=$oRs2->DrsSign;
$oRs2->DrsFromDrsID=$oRs->DrsID;
$oRs2->DocGroup=$oRs->DocGroup;
$oRs2->DrsflagRead=$oRs2->DrsflagRead;
$oRs2->DrsByPass=$oRs2->DrsByPass;
$oRs2->DrsSend=$oRs2->DrsSend;
$oRs2->DrsSendToPs=$oRs2->DrsSendToPs;
$oRs2->DrsDelete=$oRs2->DrsDelete;
$oRs2->DrsMainPs=$oRs2->DrsMainPs;
//echo $oRs->AnID;
$oRs2->AnID=$oRs->AnID;
$oRs2->DrsDocReceiveDate=$oRs2->DrsDocReceiveDate;
$oRs2->DocRefAnsDate=$oRs2->DocRefAnsDate;
$oRs2->DrsSendDocNew=$oRs2->DrsSendDocNew;
$oRs2->DrsInboxID=$oRs2->DrsInboxID;
$oRs2->DrsstartDatePost=$oRs->DrsstartDatePost;
$oRs2->DrsendDatePost=$oRs->DrsendDatePost;
$oRs2->DrsSendBack=$oRs2->DrsSendBack;
$oRs2->DrsSendBackDlcID=$oRs2->DrsSendBackDlcID;
$oRs2->DrsfSendBack=$oRs2->DrsfSendBack;
$flagCommit = $oRs2->Save();
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "<meta http-equiv='refresh' content='0; URL=regisDoc.php?DtID=$DtID&RsID=$RsID'>";
}else if($method=="Noaccept"){
$flagCommit = true;
$oC->BeginTrans();
//----edit set Document
$timesend=getNowDateTh()." ".date('H:i:s');
$oDoc2->SearchByKey($DocID);
$oDoc2->GetRecord();
$oDoc2->Edit();
$oDoc2->DocID=$oDoc2->DocID;
//echo "DocID=".$oDoc2->DocID."<br>";
$oDoc2->DocPID=$oDoc2->DocPID;
$oDoc2->DlcID=$oDoc2->DlcID;
$oDoc2->PtID=$oDoc2->PtID;
$oDoc2->DtID=$oDoc2->DtID; //doc inner
$oDoc2->DslID=$oDoc2->DslID;
$oDoc2->DclID=$oDoc2->DclID;
$oDoc2->DsID="6";
$oDoc2->RsID=$oDoc2->RsID; //sendin
$oDoc2->DocDateCreate=$oDoc2->DocDateCreate;
$oDoc2->DocUserCreate=$oDoc2->DocUserCreate;
$oDoc2->DocTypeNo=$oDoc2->DocTypeNo;
//echo "DocTypeNo=".$oDoc2->DocTypeNo."<br>";
$oDoc2->DocDate=$oDoc2->DocDate;
$oDoc2->DocNo=$oDoc2->DocNo;
$oDoc2->DocSubject=$oDoc2->DocSubject;
$oDoc2->DocFrom=$oDoc2->DocFrom;
$oDoc2->DocTo=$oDoc2->DocTo;
$oDoc2->DocShortDesc=$oDoc2->DocShortDesc;
$oDoc2->DocSpeedLevelDueDate=$oDoc2->DocSpeedLevelDueDate;
$oDoc2->DocStart=$oDoc2->DocStart;
$oDoc2->DocFinish=$oDoc2->DocFinish;
$oDoc2->DocGroup=$oDoc2->DocGroup;
$oDoc2->DocRef=$oDoc2->DocRef;
$oDoc2->DocCircular=$oDoc2->DocCircular;
$oDoc2->DocfCir=$oDoc2->DocfCir;
$oDoc2->DocOther=$oDoc2->DocOther;
$oDoc2->CertificatePs=$oDoc2->CertificatePs;
$oDoc2->fDelete=$oDoc2->fDelete;
$oDoc2->endDoc=$oDoc2->endDoc;
$oDoc2->sendToPs=$oDoc2->sendToPs;
$oDoc2->AnID=$oDoc2->AnID;
$oDoc2->DocRefAns=$oDoc2->DocRefAns;
$oDoc2->DocRefAnsID=$oDoc2->DocRefAnsID;
$oDoc2->DocstartDatePost=$oDoc2->DocstartDatePost;
$oDoc2->DocendDatePost=$oDoc2->DocendDatePost;
$oDoc2->DocMainPost=$oDoc2->DocMainPost;
$oDoc2->DocGetPost=$oDoc2->DocGetPost;
$oDoc2->DocShowInOut=$oDoc2->DocShowInOut;
$oDoc2->DocDateGetPost=$oDoc2->DocDateGetPost;
$oDoc2->useMainDocNo=$oDoc2->useMainDocNo;
$oDoc2->DocforSign=$oDoc2->DocforSign;
$flagCommit = $oDoc2->Save();
//-----edit set RsDoc
$oRs->SearchByKey($DrsID);
//echo "DrsID_edit=".$DrsID."<br>";
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsID=$oRs->DrsID;
$oRs->DocID=$oRs->DocID;
$oRs->DlcID=$oRs->DlcID;
$oRs->DsID=$oRs->DsID;
$oRs->personId=$oRs->personId;
$oRs->PtID=$oRs->PtID;
$oRs->DrsDocTypeNo=$oRs->DrsDocTypeNo;
$oRs->DrsReceiveDate=$oRs->DrsReceiveDate;
$oRs->DrsReceivePersonId=$oRs->DrsReceivePersonId;
$oRs->DrsSendDate=$timesend;
$oRs->DrsSendPersonId=$personId;
$oRs->DrsSendDlcID=$DlcID;
$oRs->DrsDocDueDate=$oRs->DrsDocDueDate;
$oRs->DrsDlcIDCreate=$oRs->DrsDlcIDCreate;
$oRs->DrsPsIDCreate=$oRs->DrsPsIDCreate;
$oRs->DrsPropose=$oRs->DrsPropose;
$oRs->DrsSign=$oRs->DrsSign;
$oRs->DrsFromDrsID=$oRs->DrsFromDrsID;
$oRs->DocGroup=$oRs->DocGroup;
$oRs->DrsflagRead=$oRs->DrsflagRead;
$oRs->DrsByPass=$oRs->DrsByPass;
$oRs->DrsSend=$oRs->DrsSend;
$oRs->DrsSendToPs=$oRs->DrsSendToPs;
$oRs->DrsDelete=$oRs->DrsDelete;
$oRs->DrsMainPs=$oRs->DrsMainPs;
$oRs->AnID=$oRs->AnID;
$oRs->DrsDocReceiveDate=$oRs->DrsDocReceiveDate;
$oRs->DocRefAnsDate=$oRs->DocRefAnsDate;
$oRs->DrsSendDocNew=$oRs->DrsSendDocNew;
$oRs->DrsInboxID=$oRs->DrsInboxID;
$oRs->DrsstartDatePost=$oRs->DrsstartDatePost;
$oRs->DrsendDatePost=$oRs->DrsendDatePost;
$oRs->DrsSendBack=$oRs->DrsSendBack;
$oRs->DrsSendBackDlcID=$oRs->DrsSendBackDlcID;
$oRs->DrsfSendBack=$oRs->DrsfSendBack;
$flagCommit = $oRs->Save();
$oRs2->AddNew();
$oRs2->DrsID=$oRs2->GetNextCode();
//echo "DrsID=".$oRs2->DrsID."<br>";
$oRs2->DocID=$oRs->DocID;
$oRs2->DlcID=$DlcID;
$oRs2->DsID="6";
$oRs2->personId=$oRs->personId;
$oRs2->PtID=$oRs->PtID;
$oRs2->DrsDocTypeNo=$oRs->DrsDocTypeNo;
$oRs2->DrsReceiveDate=$timesend;
$oDlc->SearchByKey($oDoc->DlcID); $oDlc->GetRecord();
$oRs2->DrsReceivePersonId=$personId;
$oRs2->DrsSendDate=$oRs2->DrsSendDate;
$oRs2->DrsSendPersonId=$oRs2->DrsSendPersonId;
$oRs2->DrsSendDlcID=$oRs2->DrsSendDlcID;
$oRs2->DrsDocDueDate=$oRs->DrsDocDueDate;
$oRs2->DrsDlcIDCreate=$DlcID;
$oRs2->DrsPsIDCreate=$personId;
$oRs2->DrsPropose=$DrsSend;
$oRs2->DrsSign=$oRs2->DrsSign;
$oRs2->DrsFromDrsID=$oRs->DrsID;
$oRs2->DocGroup=$oRs->DocGroup;
$oRs2->DrsflagRead=$oRs2->DrsflagRead;
$oRs2->DrsByPass=$oRs2->DrsByPass;
$oRs2->DrsSend=$oRs2->DrsSend;
$oRs2->DrsSendToPs=$oRs2->DrsSendToPs;
$oRs2->DrsDelete=$oRs2->DrsDelete;
$oRs2->DrsMainPs=$oRs2->DrsMainPs;
//echo $oRs->AnID;
$oRs2->AnID=$oRs->AnID;
$oRs2->DrsDocReceiveDate=$oRs2->DrsDocReceiveDate;
$oRs2->DocRefAnsDate=$oRs2->DocRefAnsDate;
$oRs2->DrsSendDocNew=$oRs2->DrsSendDocNew;
$oRs2->DrsInboxID=$oRs2->DrsInboxID;
$oRs2->DrsstartDatePost=$oRs->DrsstartDatePost;
$oRs2->DrsendDatePost=$oRs->DrsendDatePost;
$oRs2->DrsSendBack=$oRs2->DrsSendBack;
$oRs2->DrsSendBackDlcID=$oRs2->DrsSendBackDlcID;
$oRs2->DrsfSendBack=$oRs2->DrsfSendBack;
$flagCommit = $oRs2->Save();
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "<meta http-equiv='refresh' content='0; URL=receiveDoc.php'>";
}else if($method=="SendBack"){
$flagCommit = true;
$oC->BeginTrans();
//----edit set Document
$timesend=getNowDateTh()." ".date('H:i:s');
$oDoc2->SearchByKey($DocID);
$oDoc2->GetRecord();
$oDoc2->Edit();
$oDoc2->DocID=$oDoc2->DocID;
//echo "DocID=".$oDoc2->DocID."<br>";
$oDoc2->DocPID=$oDoc2->DocPID;
$oDoc2->DlcID=$oDoc2->DlcID;
$oDoc2->PtID=$oDoc2->PtID;
$oDoc2->DtID=$oDoc2->DtID; //doc inner
$oDoc2->DslID=$oDoc2->DslID;
$oDoc2->DclID=$oDoc2->DclID;
$oDoc2->DsID="7";
$oDoc2->RsID=$oDoc2->RsID; //sendin
$oDoc2->DocDateCreate=$oDoc2->DocDateCreate;
$oDoc2->DocUserCreate=$oDoc2->DocUserCreate;
$oDoc2->DocTypeNo=$oDoc2->DocTypeNo;
//echo "DocTypeNo=".$oDoc2->DocTypeNo."<br>";
$oDoc2->DocDate=$oDoc2->DocDate;
$oDoc2->DocNo=$oDoc2->DocNo;
$oDoc2->DocSubject=$oDoc2->DocSubject;
$oDoc2->DocFrom=$oDoc2->DocFrom;
$oDoc2->DocTo=$oDoc2->DocTo;
$oDoc2->DocShortDesc=$oDoc2->DocShortDesc;
$oDoc2->DocSpeedLevelDueDate=$oDoc2->DocSpeedLevelDueDate;
$oDoc2->DocStart=$oDoc2->DocStart;
$oDoc2->DocFinish=$oDoc2->DocFinish;
$oDoc2->DocGroup=$oDoc2->DocGroup;
$oDoc2->DocRef=$oDoc2->DocRef;
$oDoc2->DocCircular=$oDoc2->DocCircular;
$oDoc2->DocfCir=$oDoc2->DocfCir;
$oDoc2->DocOther=$oDoc2->DocOther;
$oDoc2->CertificatePs=$oDoc2->CertificatePs;
$oDoc2->fDelete=$oDoc2->fDelete;
$oDoc2->endDoc=$oDoc2->endDoc;
$oDoc2->sendToPs=$oDoc2->sendToPs;
$oDoc2->AnID=$oDoc2->AnID;
$oDoc2->DocRefAns=$oDoc2->DocRefAns;
$oDoc2->DocRefAnsID=$oDoc2->DocRefAnsID;
$oDoc2->DocstartDatePost=$oDoc2->DocstartDatePost;
$oDoc2->DocendDatePost=$oDoc2->DocendDatePost;
$oDoc2->DocMainPost=$oDoc2->DocMainPost;
$oDoc2->DocGetPost=$oDoc2->DocGetPost;
$oDoc2->DocShowInOut=$oDoc2->DocShowInOut;
$oDoc2->DocDateGetPost=$oDoc2->DocDateGetPost;
$oDoc2->useMainDocNo=$oDoc2->useMainDocNo;
$oDoc2->DocforSign=$oDoc2->DocforSign;
$flagCommit = $oDoc2->Save();
//-----edit set RsDoc
$oRs->SearchByKey($DrsID);
//echo "DrsID_edit=".$DrsID."<br>";
$oRs->GetRecord();
$oRs->Edit();
$oRs->DrsID=$oRs->DrsID;
$oRs->DocID=$oRs->DocID;
$oRs->DlcID=$oRs->DlcID;
$oRs->DsID=$oRs->DsID;
$oRs->personId=$oRs->personId;
$oRs->PtID=$oRs->PtID;
$oRs->DrsDocTypeNo=$oRs->DrsDocTypeNo;
$oRs->DrsReceiveDate=$oRs->DrsReceiveDate;
$oRs->DrsReceivePersonId=$oRs->DrsReceivePersonId;
$oRs->DrsSendDate=$timesend;
$oRs->DrsSendPersonId=$personId;
$oRs->DrsSendDlcID=$DlcID;
$oRs->DrsDocDueDate=$oRs->DrsDocDueDate;
$oRs->DrsDlcIDCreate=$oRs->DrsDlcIDCreate;
$oRs->DrsPsIDCreate=$oRs->DrsPsIDCreate;
$oRs->DrsPropose=$oRs->DrsPropose;
$oRs->DrsSign=$oRs->DrsSign;
$oRs->DrsFromDrsID=$oRs->DrsFromDrsID;
$oRs->DocGroup=$oRs->DocGroup;
$oRs->DrsflagRead=$oRs->DrsflagRead;
$oRs->DrsByPass=$oRs->DrsByPass;
$oRs->DrsSend=$oRs->DrsSend;
$oRs->DrsSendToPs=$oRs->DrsSendToPs;
$oRs->DrsDelete=$oRs->DrsDelete;
$oRs->DrsMainPs=$oRs->DrsMainPs;
$oRs->AnID=$oRs->AnID;
$oRs->DrsDocReceiveDate=$oRs->DrsDocReceiveDate;
$oRs->DocRefAnsDate=$oRs->DocRefAnsDate;
$oRs->DrsSendDocNew=$oRs->DrsSendDocNew;
$oRs->DrsInboxID=$oRs->DrsInboxID;
$oRs->DrsstartDatePost=$oRs->DrsstartDatePost;
$oRs->DrsendDatePost=$oRs->DrsendDatePost;
$oRs->DrsSendBack=$oRs->DrsSendBack;
$oRs->DrsSendBackDlcID=$oRs->DrsSendBackDlcID;
$oRs->DrsfSendBack=$oRs->DrsfSendBack;
$flagCommit = $oRs->Save();
$oRs3->SearchByDocIDDsID3Docgroup($oDoc2->DocPID,$MaxDocGroup);
$oRs3->GetRecord();
$oRs2->AddNew();
$oRs2->DrsID=$oRs2->GetNextCode();
//echo "DrsID=".$oRs2->DrsID."<br>";
$oRs2->DocID=$oRs->DocID;
$oRs2->DlcID=$DlcID;
$oRs2->DsID="7";
$oRs2->personId=$oRs->personId;
$oRs2->PtID=$oRs->PtID;
$oRs2->DrsDocTypeNo=$oRs->DrsDocTypeNo;
$oRs2->DrsReceiveDate=$timesend;
$oDlc->SearchByKey($oDoc->DlcID); $oDlc->GetRecord();
$oRs2->DrsReceivePersonId=$personId;
$oRs2->DrsSendDate=$oRs2->DrsSendDate;
$oRs2->DrsSendPersonId=$oRs2->DrsSendPersonId;
$oRs2->DrsSendDlcID=$oRs2->DrsSendDlcID;
$oRs2->DrsDocDueDate=$oRs->DrsDocDueDate;
$oRs2->DrsDlcIDCreate=$DlcID;
$oRs2->DrsPsIDCreate=$personId;
$oRs2->DrsPropose=$DrsSend;
$oRs2->DrsSign=$oRs2->DrsSign;
$oRs2->DrsFromDrsID=$oRs->DrsID;
$oRs2->DocGroup=$oRs->DocGroup;
$oRs2->DrsflagRead=$oRs2->DrsflagRead;
$oRs2->DrsByPass=$oRs2->DrsByPass;
$oRs2->DrsSend=$oRs2->DrsSend;
$oRs2->DrsSendToPs=$oRs2->DrsSendToPs;
$oRs2->DrsDelete=$oRs2->DrsDelete;
$oRs2->DrsMainPs=$oRs2->DrsMainPs;
//echo $oRs->AnID;
$oRs2->AnID=$oRs->AnID;
$oRs2->DrsDocReceiveDate=$oRs2->DrsDocReceiveDate;
$oRs2->DocRefAnsDate=$oRs2->DocRefAnsDate;
$oRs2->DrsSendDocNew=$oRs2->DrsSendDocNew;
$oRs2->DrsInboxID=$oRs2->DrsInboxID;
$oRs2->DrsstartDatePost=$oRs->DrsstartDatePost;
$oRs2->DrsendDatePost=$oRs->DrsendDatePost;
$oRs2->DrsSendBack=$DrsSendBack;
$oRs2->DrsSendBackDlcID=$oRs3->DlcID;
$oRs2->DrsfSendBack=$oRs2->DrsfSendBack;
$flagCommit = $oRs2->Save();
if($flagCommit)
$oC->CommitTrans();
else
$oC->RollbackTrans();
echo "<meta http-equiv='refresh' content='0; URL=receiveDoc.php'>";
}
?>
|