|
|
@@ -98,9 +98,25 @@ class PurchaseOrderClass extends BaseClass
|
|
|
$orderPrice = bcadd($orderPrice, $longCharge, 2);
|
|
|
$orderPrice = bcadd($orderPrice, $pickCharge, 2);
|
|
|
$orderPrice = bcadd($orderPrice, $localCharge, 2);
|
|
|
+
|
|
|
$data['orderPrice'] = $orderPrice;
|
|
|
$data['prePrice'] = $orderPrice;
|
|
|
+
|
|
|
+ if (isset($data['modifyPrice'])) {
|
|
|
+ //商家打折,修改金额
|
|
|
+ $modifyPrice = $data['modifyPrice'] ?? 0;
|
|
|
+ if ($modifyPrice > $orderPrice) {
|
|
|
+ util::fail('实收金额大于订单总金额');
|
|
|
+ }
|
|
|
+ if ($modifyPrice < $orderPrice) {
|
|
|
+ $data['discountAmount'] = bcsub($orderPrice, $modifyPrice, 2);
|
|
|
+ $data['discountType'] = dict::getDict('discountType', 'discount');
|
|
|
+ $orderPrice = $modifyPrice;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //实付款
|
|
|
$data['actPrice'] = $orderPrice;
|
|
|
+ //实付款,扣除平台补贴
|
|
|
$data['realPrice'] = $orderPrice;
|
|
|
|
|
|
//总运费
|