|
@@ -2510,6 +2510,10 @@ class ReceiptController extends DooController {
|
|
|
$cid = $this->get_args ( 'cid' ) ? $this->get_args ( 'cid' ) : 0;
|
|
|
$sid = $this->get_args ( 'sid' ) ? $this->get_args ( 'sid' ) : 0;
|
|
|
|
|
|
+ $rdate = $this->get_args ( 'date' ) ? $this->get_args ( 'date' ) : "";
|
|
|
+
|
|
|
+ //echo $rdate;
|
|
|
+
|
|
|
if (empty ( $status ))
|
|
|
$status = $this->get_args ( 'status' ) && is_numeric ( $this->get_args ( 'status' ) ) ? $this->get_args ( 'status' ) : 0;
|
|
|
|
|
@@ -2544,16 +2548,21 @@ class ReceiptController extends DooController {
|
|
|
// $dateCondition="";
|
|
|
// else
|
|
|
$dateCondition = " and Year(date) =" . $year;
|
|
|
-
|
|
|
+/*
|
|
|
if (! empty ( $month ))
|
|
|
$dateCondition = " and Year(date) =" . $year . " and Month(date) = " . $month;
|
|
|
|
|
|
- if($status == 'done'){
|
|
|
- $dateCondition = " and Year(pastDate) =" . $year;
|
|
|
- if (! empty ( $month ))
|
|
|
+ if($status == 'done'){
|
|
|
+ $dateCondition = " and Year(pastDate) =" . $year;
|
|
|
+ if (! empty ( $month ))
|
|
|
$dateCondition = " and Year(pastDate) =" . $year . " and Month(pastDate) = " . $month;
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+ */
|
|
|
+//date ( 'Y-m' )
|
|
|
+ if(!empty($rdate)&&$status == 'done')
|
|
|
+ $dateCondition=" and date_format(pastDate,'%Y-%m')='".$rdate."' ";
|
|
|
+ elseif (!empty($rdate))
|
|
|
+ $dateCondition=" and date_format(date,'%Y-%m')='".$rdate."' ";
|
|
|
$categoryList = $Lcategory->find ( array (
|
|
|
'asArray' => true
|
|
|
) );
|
|
@@ -2645,9 +2654,14 @@ class ReceiptController extends DooController {
|
|
|
// echo '1 '.$dateCondition.$cateCondition.$staffCondition.' and verify in ('.$vid.')';
|
|
|
// print_r($pageinfo);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
$Locate = 0;
|
|
|
|
|
|
+
|
|
|
+ $reportList=array();
|
|
|
foreach ( $receiptList as $key => $value ) {
|
|
|
+
|
|
|
$receiptList [$key] ['Locate'] = $Locate;
|
|
|
$Locate ++;
|
|
|
$receiptList [$key] ['reviseDetail'] = array ();
|
|
@@ -2704,9 +2718,28 @@ class ReceiptController extends DooController {
|
|
|
'where' => 'sid=' . $value ['staff'],
|
|
|
'asArray' => true
|
|
|
) );
|
|
|
+
|
|
|
+ array_push($reportList, $receiptList [$key] ['staffDetail']['sid'].'-'.$receiptList [$key] ['staffDetail']['username']);
|
|
|
+
|
|
|
$receiptList [$key] ['button'] = $button;
|
|
|
$receiptList [$key] ['nowStaffArray'] = explode ( ',', $value ['nowStaff'] );
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ $reportList=array_unique($reportList);
|
|
|
+ $reportHtml='';
|
|
|
+ foreach ($reportList as $key=>$value){
|
|
|
+ $v=explode("-", $value);
|
|
|
+ $reportHtml.='<option value="'.$v[1].'">'.$v[1].'</option>';
|
|
|
+ }
|
|
|
+
|
|
|
+ //print_r($reportList);
|
|
|
+
|
|
|
+ $data['reportHtml']=$reportHtml;
|
|
|
+
|
|
|
+ //$reportHtml.='<option value="ALL">'.$value[''].'</option>';
|
|
|
+
|
|
|
+
|
|
|
// print_r($receiptList);die;
|
|
|
// $data['verifyDetail']=$verifyDetail;
|
|
|
|