From 423fc1d013aee143491109d9c89c47068e47773f Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Sun, 4 Feb 2024 10:20:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=95=86=E6=88=B7=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E8=B4=A2=E5=8A=A1=E8=B4=A6=E5=8D=95=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/merchant/FinancialRecordRepository.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/system/merchant/FinancialRecordRepository.php b/app/common/repositories/system/merchant/FinancialRecordRepository.php index 84829e17..01010850 100755 --- a/app/common/repositories/system/merchant/FinancialRecordRepository.php +++ b/app/common/repositories/system/merchant/FinancialRecordRepository.php @@ -499,6 +499,7 @@ class FinancialRecordRepository extends BaseRepository 'data' => [ ['订单支付', $income['number_order'] . '元', $income['count_order'] . '笔'], ['平台佣金', $income['number_commission'] . '元', $income['count_commission'] . '笔'], + ['保证金退还', $income['number_margin_refund'] . '元', $income['count_margin_refund'] . '笔'], ['优惠券补贴', $income['number_coupon'] . '元', $income['count_coupon'] . '笔'], ['会员优惠券补贴', $income['number_svipcoupon'] . '元', $income['count_svipcoupon'] . '笔'], ] @@ -561,7 +562,7 @@ class FinancialRecordRepository extends BaseRepository public function countIncome($type, $where, $date, $merchant = []) { if ($where['is_mer'] > 0) { - $financialType = ['commission_to_store', 'commission_to_promoter', 'supply_chain', 'auto_margin_refund']; + $financialType = ['supply_chain']; } else { $financialType = ['order', 'commission_to_store_refund', 'commission_to_promoter_refund', 'commission_to_courier_refund', 'supply_chain_refund', 'auto_margin', 'platform_consumption_refund']; @@ -611,9 +612,12 @@ class FinancialRecordRepository extends BaseRepository } [$data['count_svipcoupon'], $data['number_svipcoupon']] = $this->dao->getDataByType($type, $where, $date, $financialType); [$data['count_commission'], $data['number_commission']] = $this->dao->getDataByType($type, $where, $date, ['commission_to_store', 'commission_to_promoter']); + [$data['count_margin_refund'], $data['number_margin_refund']] = $this->dao->getDataByType($type, $where, $date, ['auto_margin_refund']); - $data['count'] = $data['count_order']; + $data['count'] = $data['count_order'] + $data['count_commission'] + $data['count_margin_refund']; $data['number'] = bcadd($data['number_coupon'], $data['number_order'], 2); + $data['number'] = bcadd($data['number'], $data['number_commission'], 2); + $data['number'] = bcadd($data['number'], $data['number_margin_refund'], 2); return $data; }