mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
add new document list ReceiveOwner, list docs with revision in AppRevOwner
This commit is contained in:
parent
e562ad14cd
commit
ba4a6558b4
|
@ -1016,7 +1016,7 @@ class SeedDMS_Core_DMS {
|
|||
$queryStr = '';
|
||||
}
|
||||
break; // }}}
|
||||
case 'AppRevOwner': // Documents waiting for review/approval I'm owning {{{
|
||||
case 'AppRevOwner': // Documents waiting for review/approval/revision I'm owning {{{
|
||||
$user = $param1;
|
||||
$orderby = $param3;
|
||||
if($param4 == 'desc')
|
||||
|
@ -1024,7 +1024,7 @@ class SeedDMS_Core_DMS {
|
|||
else
|
||||
$orderdir = 'ASC';
|
||||
$queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ".
|
||||
"AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ";
|
||||
"AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_IN_REVISION.") ";
|
||||
if ($orderby=='e') $queryStr .= "ORDER BY `expires`";
|
||||
else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`";
|
||||
else if ($orderby=='s') $queryStr .= "ORDER BY `status`";
|
||||
|
@ -1034,6 +1034,36 @@ class SeedDMS_Core_DMS {
|
|||
// "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ".
|
||||
// "ORDER BY `statusDate` DESC";
|
||||
break; // }}}
|
||||
case 'ReceiveOwner': // Documents waiting for reception I'm owning {{{
|
||||
$user = $param1;
|
||||
$orderby = $param3;
|
||||
if($param4 == 'desc')
|
||||
$orderdir = 'DESC';
|
||||
else
|
||||
$orderdir = 'ASC';
|
||||
|
||||
$qs = 'SELECT DISTINCT documentID FROM `tblDocumentRecipients` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentRecipients`.`version` AND `ttcontentid`.`document` = `tblDocumentRecipients`.`documentID`';
|
||||
$ra = $this->db->getResultArray($qs);
|
||||
if (is_bool($ra) && !$ra) {
|
||||
return false;
|
||||
}
|
||||
$docs = array();
|
||||
foreach($ra as $d) {
|
||||
$docs[] = $d['documentID'];
|
||||
}
|
||||
|
||||
if ($docs) {
|
||||
$queryStr .= "AND `tblDocuments`.`id` IN (" . implode(',', $docs) . ") ";
|
||||
$queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."'";
|
||||
if ($orderby=='e') $queryStr .= "ORDER BY `expires`";
|
||||
else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`";
|
||||
else if ($orderby=='s') $queryStr .= "ORDER BY `status`";
|
||||
else $queryStr .= "ORDER BY `name`";
|
||||
$queryStr .= " ".$orderdir;
|
||||
} else {
|
||||
$queryStr = '';
|
||||
}
|
||||
break; // }}}
|
||||
case 'RejectOwner': // Documents that has been rejected and I'm owning {{{
|
||||
$user = $param1;
|
||||
$orderby = $param3;
|
||||
|
|
Loading…
Reference in New Issue
Block a user