From 49a0d08bee7acc3ad1e4f871ee53a75ed80c1b71 Mon Sep 17 00:00:00 2001 From: lyt Date: Tue, 24 Mar 2020 10:41:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A9=E6=95=B0=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=92=8C=E6=97=A5=E6=9C=9F=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/pay/controllers/PaymentService.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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'],