This commit is contained in:
weiz 2024-01-29 09:28:33 +08:00
parent e4aa11133b
commit 54040e31f5
2 changed files with 14 additions and 11 deletions

View File

@ -181,7 +181,7 @@
//年度回款金额
$year_refund_amount = FinanceReturnedRecord::whereYear('return_date',$year)->sum('amount');
$outstanding_payment= bcsub($year_refund_plan_amount,$year_refund_amount);
$year_not_refund_amount= bcsub($year_refund_plan_amount,$year_refund_amount);
$invoice_series = [
'name' => '开票金额',
@ -195,25 +195,33 @@
'name' => '回款金额',
'data' => []
];
$not_refund_series = [
'name' => '未回款金额',
'data' => []
];
foreach($column as &$v){
$month = $v;
if($month < 10){
$month = '0'.$month;
}
$invoice_series['data'][] = FinanceInvoiceApply::whereMonth('invoicing_date',$year.'-'.$month)->sum('invoicing_amount');
$refund_plan_series['data'][] = FinanceReturnedMoney::whereMonth('return_date',$year.'-'.$month)->sum('amount');
$refund_series['data'][] = FinanceReturnedRecord::whereMonth('return_date',$year.'-'.$month)->sum('amount');
$refund_plan = FinanceReturnedMoney::whereMonth('return_date',$year.'-'.$month)->sum('amount');
$refund = FinanceReturnedRecord::whereMonth('return_date',$year.'-'.$month)->sum('amount');
$refund_plan_series['data'][] = $refund_plan;
$refund_series['data'][] = $refund;
$not_refund_series['data'][] = $refund_plan - $refund;
$v = $v.'月';
}
$result = [
'year_invoicing_amount' => $year_invoicing_amount,
'year_refund_plan_amount' => $year_refund_plan_amount,
'year_refund_amount' => $year_refund_amount,
'year_not_refund_amount' => $year_not_refund_amount,
'invoice_series' => $invoice_series,
'refund_plan_series' => $refund_plan_series,
'refund_series' => $refund_series,
'not_refund_series' => $not_refund_series,
'column' => $column,
'outstanding_payment' => $outstanding_payment,
];
return $this->success('success',$result);
}
@ -328,8 +336,6 @@
$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' => []
@ -342,10 +348,6 @@
'name' => '付款金额',
'data' => []
];
$outstanding_payment= [
'name' => '未回款金额',
'data' => []
];
foreach($column as &$v){
$month = $v;
if($month < 10){

View File

@ -33,7 +33,8 @@
"alibabacloud/client": "^1.5",
"rmccue/requests": "^2.0",
"w7corp/easywechat": "^6.8",
"tencentcloud/sms": "^3.0"
"tencentcloud/sms": "^3.0",
"ext-bcmath": "*"
},
"require-dev": {
"symfony/var-dumper": "^4.2",