|
@@ -49,11 +49,15 @@ class accountBook_cld extends DooModel {
|
|
|
);
|
|
|
|
|
|
public function GetExpensesType($data=array()){
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
$startYear=$data['year']."-01-01:00.00.00";
|
|
|
$endYear=$data['year']."-12-31:23.59.59";
|
|
|
if(!empty($data['month'])){
|
|
|
+ $days = cal_days_in_month(CAL_GREGORIAN, $data['month'], $data['year']);
|
|
|
$startYear=$data['year']."-".$data['month']."-01:00.00.00";
|
|
|
- $endYear=$data['year']."-".$data['month']."-31:23.59.59";
|
|
|
+ $endYear=$data['year']."-".$data['month']."-".$days.":23.59.59";
|
|
|
}
|
|
|
|
|
|
$sql=" ((expenditureDate>=? and expenditureDate<= ?) or (receivedDate>=? and receivedDate<= ?)) ";
|
|
@@ -78,11 +82,14 @@ class accountBook_cld extends DooModel {
|
|
|
//费用分页
|
|
|
public function GetPage($data=array()){
|
|
|
|
|
|
+
|
|
|
+
|
|
|
$startYear=$data['year']."-01-01:00.00.00";
|
|
|
$endYear=$data['year']."-12-31:23.59.59";
|
|
|
if(!empty($data['month'])){
|
|
|
+ $days = cal_days_in_month(CAL_GREGORIAN, $data['month'], $data['year']);
|
|
|
$startYear=$data['year']."-".$data['month']."-01:00.00.00";
|
|
|
- $endYear=$data['year']."-".$data['month']."-31:23.59.59";
|
|
|
+ $endYear=$data['year']."-".$data['month']."-".$days.":23.59.59";
|
|
|
}
|
|
|
//(inputDate>=? and inputDate<= ?) or $startYear,$endYear,
|
|
|
$sql=" ((expenditureDate>=? and expenditureDate<= ?) or (receivedDate>=? and receivedDate<= ?)) ";
|