mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 13:42:04 +00:00
expired documents can be skipped from counting in countTasks()
This commit is contained in:
parent
3ac58509cc
commit
9186cf66c3
|
@ -927,7 +927,7 @@ class SeedDMS_Core_DMS {
|
||||||
* @param object $user user
|
* @param object $user user
|
||||||
* @return array list of documents records
|
* @return array list of documents records
|
||||||
*/
|
*/
|
||||||
function countTasks($listtype, $user=null) { /* {{{ */
|
function countTasks($listtype, $user=null, $param5=true) { /* {{{ */
|
||||||
if (!$this->db->createTemporaryTable("ttstatid") || !$this->db->createTemporaryTable("ttcontentid")) {
|
if (!$this->db->createTemporaryTable("ttstatid") || !$this->db->createTemporaryTable("ttcontentid")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -958,7 +958,10 @@ class SeedDMS_Core_DMS {
|
||||||
$queryStr .= "OR `tblDocumentReviewers`.`type` = 1 AND `tblDocumentReviewers`.`required` IN (".implode(',', $groups).") ";
|
$queryStr .= "OR `tblDocumentReviewers`.`type` = 1 AND `tblDocumentReviewers`.`required` IN (".implode(',', $groups).") ";
|
||||||
$queryStr .= ") ";
|
$queryStr .= ") ";
|
||||||
$queryStr .= "AND `tblDocumentReviewLog`.`status` = 0 ";
|
$queryStr .= "AND `tblDocumentReviewLog`.`status` = 0 ";
|
||||||
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_EXPIRED.") ";
|
$docstatarr = array(S_DRAFT_REV);
|
||||||
|
if($param5)
|
||||||
|
$docstatarr[] = S_EXPIRED;
|
||||||
|
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".implode(',', $docstatarr).") ";
|
||||||
break; /* }}} */
|
break; /* }}} */
|
||||||
case 'ApproveByMe': // Documents I have to approve {{{
|
case 'ApproveByMe': // Documents I have to approve {{{
|
||||||
if (!$this->db->createTemporaryTable("ttapproveid")) {
|
if (!$this->db->createTemporaryTable("ttapproveid")) {
|
||||||
|
@ -976,7 +979,10 @@ class SeedDMS_Core_DMS {
|
||||||
$queryStr .= ") ";
|
$queryStr .= ") ";
|
||||||
}
|
}
|
||||||
$queryStr .= "AND `tblDocumentApproveLog`.`status` = 0 ";
|
$queryStr .= "AND `tblDocumentApproveLog`.`status` = 0 ";
|
||||||
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_APP.", ".S_EXPIRED.") ";
|
$docstatarr = array(S_DRAFT_APP);
|
||||||
|
if($param5)
|
||||||
|
$docstatarr[] = S_EXPIRED;
|
||||||
|
$queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".implode(',', $docstatarr).") ";
|
||||||
break; /* }}} */
|
break; /* }}} */
|
||||||
case 'ReceiptByMe': // Documents I have to receipt {{{
|
case 'ReceiptByMe': // Documents I have to receipt {{{
|
||||||
if (!$this->db->createTemporaryTable("ttreceiptid")) {
|
if (!$this->db->createTemporaryTable("ttreceiptid")) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user