From 21b191979f45f9293c25349b0663685bd56cff8d Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Sat, 27 Jan 2024 13:47:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/statistics/StatisticsController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/adminapi/controller/statistics/StatisticsController.php b/app/adminapi/controller/statistics/StatisticsController.php index c6d4533cb..382bd22b2 100644 --- a/app/adminapi/controller/statistics/StatisticsController.php +++ b/app/adminapi/controller/statistics/StatisticsController.php @@ -180,6 +180,9 @@ $year_refund_plan_amount = FinanceReturnedMoney::whereYear('return_date',$year)->sum('amount'); //年度回款金额 $year_refund_amount = FinanceReturnedRecord::whereYear('return_date',$year)->sum('amount'); + + $outstanding_payment= bcsub($year_refund_plan_amount,$year_refund_amount); + $invoice_series = [ 'name' => '开票金额', 'data' => [] @@ -210,6 +213,7 @@ 'refund_plan_series' => $refund_plan_series, 'refund_series' => $refund_series, 'column' => $column, + 'outstanding_payment' => $outstanding_payment, ]; return $this->success('success',$result); } @@ -324,6 +328,8 @@ $year_payment_plan_amount = FinancePaymentPlan::whereYear('pay_date',$year)->sum('amount'); //年度付款金额 $year_payment_amount = FinancePaymentApply::whereYear('pay_date',$year)->sum('amount'); + //未回款金额 + $year_outstanding_amount = FinancePaymentApply::whereYear('pay_date',$year)->sum('amount'); $invoice_series = [ 'name' => '收票金额', 'data' => [] @@ -336,6 +342,10 @@ 'name' => '付款金额', 'data' => [] ]; + $outstanding_payment= [ + 'name' => '未回款金额', + 'data' => [] + ]; foreach($column as &$v){ $month = $v; if($month < 10){