|
|
@@ -2270,7 +2270,7 @@ class StoreOrder extends BaseModel
|
|
|
$order = StoreOrder::get($order_id);
|
|
|
if (!$order) return self::setErrorInfo('找不到订单');
|
|
|
if (!$order['transaction_id']) return true;
|
|
|
- $store = SystemStorePoint::get($order['store_id']);
|
|
|
+ $store = SystemStore::get($order['store_id']);
|
|
|
if (!$store) return true;
|
|
|
$store_leader = SystemAdmin::where('roles', sys_config('default_store_admin', 7))
|
|
|
->where('store_id', $store['id'])->where('is_del', 0)->where('status', 1)
|
|
|
@@ -2286,11 +2286,9 @@ class StoreOrder extends BaseModel
|
|
|
// 计算发起人和参与者的分账金额
|
|
|
$price = $order['pay_price'] - $order['pay_postage_sh'] - $order['pay_postage'];
|
|
|
$p_amount = bcmul($price, bcdiv($store['sharing'], 100, 4), 2); //bcmul:2个任意精度数字乘法计算
|
|
|
- var_dump($store['sharing']);
|
|
|
- var_dump($p_amount);
|
|
|
+
|
|
|
$p_separate_account_amount = floor($p_amount * 100); // 发起人分账金额,以分为单位
|
|
|
- var_dump($p_separate_account_amount);
|
|
|
- exit;
|
|
|
+
|
|
|
if ($p_separate_account_amount <= 0) return true;
|
|
|
|
|
|
$receivers[] = array(
|
|
|
@@ -2299,7 +2297,6 @@ class StoreOrder extends BaseModel
|
|
|
'amount' => $p_separate_account_amount,
|
|
|
'description' => '门店订单'
|
|
|
);
|
|
|
- var_dump($receivers);
|
|
|
|
|
|
// 记录发起人分账开始的信息
|
|
|
$p_separate_account_record = new StoreSeparateAccountRecord();
|