|
|
@@ -248,6 +248,16 @@ class OrderService extends BaseService
|
|
|
$data['goodsPrice'] = $goodsPrice;
|
|
|
$data['prePrice'] = $totalPrice;
|
|
|
$data['orderPrice'] = $modifyPrice;
|
|
|
+ //如果有订金
|
|
|
+ if (isset($data['dj']) && $data['dj'] > 0) {
|
|
|
+ if ($data['dj'] >= $modifyPrice) {
|
|
|
+ util::fail('订金要小于总金额');
|
|
|
+ }
|
|
|
+ $currentDebt = bcsub($modifyPrice, $data['dj'], 2);
|
|
|
+ $data['debtPrice'] = $currentDebt;
|
|
|
+ $data['remainDebtPrice'] = $currentDebt;
|
|
|
+ $data['debt'] = 1;
|
|
|
+ }
|
|
|
$data['actPrice'] = $modifyPrice;
|
|
|
$data['realPrice'] = $modifyPrice;
|
|
|
$data['customId'] = $customId;
|