From a0453d32511097d0b613da735934930688bea5a2 Mon Sep 17 00:00:00 2001 From: weiz Date: Fri, 12 Jan 2024 10:43:01 +0800 Subject: [PATCH] update --- app/adminapi/lists/finance/FinanceReturnedMoneyLists.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/adminapi/lists/finance/FinanceReturnedMoneyLists.php b/app/adminapi/lists/finance/FinanceReturnedMoneyLists.php index 02acc28fc..2eb3d3ca2 100644 --- a/app/adminapi/lists/finance/FinanceReturnedMoneyLists.php +++ b/app/adminapi/lists/finance/FinanceReturnedMoneyLists.php @@ -19,6 +19,7 @@ use app\adminapi\lists\BaseAdminDataLists; use app\common\model\auth\Admin; use app\common\model\contract\Contract; use app\common\model\finance\FinanceReturnedMoney; +use app\common\model\finance\FinanceReturnedRecord; use app\common\model\project\Project; use app\common\model\custom\Custom; use app\common\lists\ListsSearchInterface; @@ -83,7 +84,7 @@ class FinanceReturnedMoneyLists extends BaseAdminDataLists implements ListsSearc $data['period'] = $data->period_text; $data['return_status'] = $data->return_status_text; $data['return_duty'] = $return_duty['name']; - $data['has_return_amount'] = 0; + $data['has_return_amount'] = FinanceReturnedRecord::where('finance_returned_money_id',$data['id'])->sum('amount'); $data['not_return_amount'] = $data['amount'] - $data['has_return_amount']; return $data; })