|
@@ -356,14 +356,15 @@ class Taxi extends ApiController
|
|
|
|
|
|
|
|
// 如果平台已指派司机,则扣除部分金额
|
|
// 如果平台已指派司机,则扣除部分金额
|
|
|
$cost_price = 0;
|
|
$cost_price = 0;
|
|
|
|
|
+ $total = $total_price;
|
|
|
$taxiUid = isset($row['taxi_uid'])? $row['taxi_uid'] : 0;
|
|
$taxiUid = isset($row['taxi_uid'])? $row['taxi_uid'] : 0;
|
|
|
$createTime = isset($row['created_at'])? $row['created_at'] : 0;
|
|
$createTime = isset($row['created_at'])? $row['created_at'] : 0;
|
|
|
$cancelTime = isset($config['store']['store_cancel_time'])? $config['store']['store_cancel_time'] : 0;
|
|
$cancelTime = isset($config['store']['store_cancel_time'])? $config['store']['store_cancel_time'] : 0;
|
|
|
if ($row['status'] == 3 ) {
|
|
if ($row['status'] == 3 ) {
|
|
|
// 免费取消时间内不扣除
|
|
// 免费取消时间内不扣除
|
|
|
if($cancelTime<=0 || time() < ($createTime - $cancelTime)){
|
|
if($cancelTime<=0 || time() < ($createTime - $cancelTime)){
|
|
|
- $cost_price = $total_price * $config['store']['store_cancel_order']/100;
|
|
|
|
|
- $total_price = $total_price * (1 - $config['store']['store_cancel_order']/100);
|
|
|
|
|
|
|
+ $total_price = round($total_price * (1 - $config['store']['store_cancel_order']/100), 2);
|
|
|
|
|
+ $cost_price = $total-$total_price;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if ($row->paylog['pay_type'] == 'balance') {
|
|
if ($row->paylog['pay_type'] == 'balance') {
|