From 5cf46d0de5976a84f55271e75d07db96fef38838 Mon Sep 17 00:00:00 2001 From: lccsw <1127794702@qq.com> Date: Thu, 25 Aug 2022 16:01:24 +0800 Subject: [PATCH] edit-api-order_price --- api/controllers/wxapp/licheb/CusorderV2.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/controllers/wxapp/licheb/CusorderV2.php b/api/controllers/wxapp/licheb/CusorderV2.php index becdfb7b..6d7486b8 100644 --- a/api/controllers/wxapp/licheb/CusorderV2.php +++ b/api/controllers/wxapp/licheb/CusorderV2.php @@ -798,9 +798,11 @@ class CusorderV2 extends Wxapp $other_data['车款金额'] = ['type' => 'text', 'value' => "{$ht_price}(已支付)", 'bg_color' => '']; $need_last_pay -= $ht_pay['total_price']; } - $last_is_pay_text = $is_pay_price >= $need_pay ? '已支付' : '未支付'; - $last_text = number_format($need_last_pay,2) . "($last_is_pay_text)"; - $other_data['尾款金额'] = ['type' => 'text', 'value' => $last_text, 'bg_color' => '']; + if($need_last_pay){ + $last_is_pay_text = $is_pay_price >= $need_pay ? '已支付' : '未支付'; + $last_text = number_format($need_last_pay,2) . "($last_is_pay_text)"; + $other_data['尾款金额'] = ['type' => 'text', 'value' => $last_text, 'bg_color' => '']; + } if ($srv_is_pay) { $last_is_pay_text = $srv_is_pay['status'] ? '已支付' : '未支付'; $srv_text = number_format($srv_is_pay['total_price'],2) . "($last_is_pay_text)";