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)";