add more document lists

This commit is contained in:
Uwe Steinmann 2015-05-12 19:07:26 +02:00
parent 4c74bda247
commit a5d77d7cbb

View File

@ -691,7 +691,7 @@ class SeedDMS_Core_DMS {
$queryStr = ''; $queryStr = '';
} }
break; break;
case 'ReiptByMe': // Documents I have to receipt case 'ReceiptByMe': // Documents I have to receipt
$user = $param1; $user = $param1;
// Get document list for the current user. // Get document list for the current user.
$receiptStatus = $user->getReceiptStatus(); $receiptStatus = $user->getReceiptStatus();
@ -714,6 +714,36 @@ class SeedDMS_Core_DMS {
$docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'";
} }
if (strlen($docCSV)>0) {
$queryStr .= "AND `tblDocuments`.`id` IN (" . $docCSV . ") ".
"ORDER BY `statusDate` DESC";
} else {
$queryStr = '';
}
break;
case 'ReviseByMe': // Documents I have to receipt
$user = $param1;
// Get document list for the current user.
$revisionStatus = $user->getRevisionStatus();
// Create a comma separated list of all the documentIDs whose information is
// required.
$dList = array();
foreach ($revisionStatus["indstatus"] as $st) {
if (!in_array($st["documentID"], $dList)) {
$dList[] = $st["documentID"];
}
}
foreach ($revisionStatus["grpstatus"] as $st) {
if (!in_array($st["documentID"], $dList)) {
$dList[] = $st["documentID"];
}
}
$docCSV = "";
foreach ($dList as $d) {
$docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'";
}
if (strlen($docCSV)>0) { if (strlen($docCSV)>0) {
$queryStr .= "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". $queryStr .= "AND `tblDocuments`.`id` IN (" . $docCSV . ") ".
"ORDER BY `statusDate` DESC"; "ORDER BY `statusDate` DESC";