diff --git a/webht/third_party/pay/controllers/PaymentService.php b/webht/third_party/pay/controllers/PaymentService.php index d377f861..6ddc7030 100644 --- a/webht/third_party/pay/controllers/PaymentService.php +++ b/webht/third_party/pay/controllers/PaymentService.php @@ -765,21 +765,21 @@ class PaymentService extends CI_Controller { // $data['from_date'] = date("Y-m-d", strtotime("-8 days")); // $data['to_date'] = date("Y-m-d", strtotime("-1 days")); $data['from_date'] = date("Y-m-01", strtotime("-1 month")); - $data['to_date'] = date("Y-m-01"); + $data['to_date'] = date("Y-m-01 23:59:59"); } else { $data['from_date'] = $date_range_arr[0][0]; $data['to_date'] =$date_range_arr[0][1] . " 23:59:59"; if ($data['to_date'] == null) { - $data['to_date'] = date("Y-m-d H:i:s", strtotime("+1 month", strtotime($data['from_date']))-1); + $data['to_date'] = date("Y-m-d 23:59:59", strtotime("+1 month", strtotime($data['from_date']))-1); } } $data['at_year'] = date('Y-01-01', strtotime($data['to_date'])); - $data['day_cnt'] = calc_day_cnt($data['from_date'], $data['to_date']); + $data['day_cnt'] = calc_day_cnt($data['from_date'], $data['to_date'])+1; $data['from_date_quarter'] = date('Y-m-d', strtotime("-" . $data['day_cnt'] . " days ", strtotime($data['from_date']))); - $data['to_date_quarter'] = date('Y-m-d', strtotime("-" . $data['day_cnt'] . " days ", strtotime($data['to_date']))); + $data['to_date_quarter'] = date('Y-m-d 23:59:59', strtotime("-" . $data['day_cnt'] . " days ", strtotime($data['to_date']))); $data['from_date_year'] = date('Y-m-d', strtotime("-1 year ", strtotime($data['from_date']))); - $data['to_date_year'] = date('Y-m-d', strtotime("-1 year ", strtotime($data['to_date']))); + $data['to_date_year'] = date('Y-m-d 23:59:59', strtotime("-1 year ", strtotime($data['to_date']))); $data['data']['pay'] = $this->note_model->total_by_method('pay', $data['from_date'], $data['to_date'],