From 4011cbed8d7b82cdb8155d71bd30f76aaaedca8b Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Fri, 3 Nov 2023 16:32:52 +0800 Subject: [PATCH] 2 --- app/Services/DoctorAccountService.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Services/DoctorAccountService.php b/app/Services/DoctorAccountService.php index ffa68d8..7bcf49e 100644 --- a/app/Services/DoctorAccountService.php +++ b/app/Services/DoctorAccountService.php @@ -399,7 +399,11 @@ class DoctorAccountService extends BaseService // 实际提现金额 $withdrawal_amount = $amount_total - $income_tax; - if ($withdrawal_amount_total != floor($withdrawal_amount * 100) / 100){ + if ($withdrawal_amount > 0){ + $withdrawal_amount = floor($withdrawal_amount * 100) / 100; + } + + if ($withdrawal_amount_total != $withdrawal_amount){ return fail(HttpEnumCode::SERVER_ERROR,"金额不符合"); } @@ -430,9 +434,7 @@ class DoctorAccountService extends BaseService if ($amount_total > 0){ $data['applied_withdrawal_amount'] = floor($amount_total * 100) / 100; // 提现金额 } - if ($withdrawal_amount > 0){ - $data['actual_withdrawal_amount'] = floor($withdrawal_amount * 100) / 100; // 实际提现金额 - } + $data['actual_withdrawal_amount'] = $withdrawal_amount; // 实际提现金额 if ($income_tax > 0){ $data['income_tax'] = floor($income_tax * 100) / 100; // 提现所得税金额 }