更新
This commit is contained in:
parent
f1a67ff8d7
commit
3a7e8e71b7
@ -331,28 +331,40 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
//市级供应链
|
//市级供应链
|
||||||
$product_mer_id = Db::name('store_order_product')->where('order_id', $order->order_id)->value('product_mer_id');
|
$product_mer_id = Db::name('store_order_product')->where('order_id', $order->order_id)->value('product_mer_id');
|
||||||
if ($product_mer_id) {
|
if ($product_mer_id) {
|
||||||
//市级供应链押金计算
|
|
||||||
if ($_payPrice > 0) {
|
|
||||||
/** @var MerchantRepository $merchantRepo */
|
|
||||||
$merchantRepo = app()->make(MerchantRepository::class);
|
|
||||||
$merchantRepo->merId = $product_mer_id;
|
|
||||||
$merchantRepo->forceMargin = false;
|
|
||||||
[$_payPrice, $a, $increase] = $merchantRepo->autoMargin($_payPrice, $order, $finance, $financeSn, $i++);
|
|
||||||
}
|
|
||||||
$finance[] = [
|
$finance[] = [
|
||||||
'order_id' => $order->order_id,
|
'order_id' => $order->order_id,
|
||||||
'order_sn' => $order->order_sn,
|
'order_sn' => $order->order_sn,
|
||||||
'user_info' => $groupOrder->user->nickname,
|
'user_info' => $groupOrder->user->nickname,
|
||||||
'user_id' => $uid,
|
'user_id' => $uid,
|
||||||
'financial_type' => 'supply_chain',
|
'financial_type' => 'order',
|
||||||
'financial_pm' => 0,
|
'financial_pm' => 0,
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
'number' => $_payPrice,
|
'number' => $_payPrice,
|
||||||
'mer_id' => $product_mer_id,
|
'mer_id' => $product_mer_id,
|
||||||
'financial_record_sn' => $financeSn . (($i++)+1)
|
'financial_record_sn' => $financeSn . (($i++)+1)
|
||||||
|
];
|
||||||
|
//市级供应链押金计算
|
||||||
|
if ($_payPrice > 0) {
|
||||||
|
/** @var MerchantRepository $merchantRepo */
|
||||||
|
$merchantRepo = app()->make(MerchantRepository::class);
|
||||||
|
$merchantRepo->merId = $product_mer_id;
|
||||||
|
$merchantRepo->forceMargin = false;
|
||||||
|
[$_payCityPrice, $finance, $increase] = $merchantRepo->autoMargin($_payPrice, $order, $finance, $financeSn, $i++);
|
||||||
|
}
|
||||||
|
$finance[] = [
|
||||||
|
'order_id' => $order->order_id,
|
||||||
|
'order_sn' => $order->order_sn,
|
||||||
|
'user_info' => $groupOrder->user->nickname,
|
||||||
|
'user_id' => $uid,
|
||||||
|
'financial_type' => 'order_true',
|
||||||
|
'financial_pm' => 0,
|
||||||
|
'type' => 1,
|
||||||
|
'number' => $_payCityPrice,
|
||||||
|
'mer_id' => $product_mer_id,
|
||||||
|
'financial_record_sn' => $financeSn . (($i++)+2)
|
||||||
];
|
];
|
||||||
if (!$is_combine) {
|
if (!$is_combine) {
|
||||||
app()->make(MerchantRepository::class)->addLockMoney($product_mer_id, 'order', $order->order_id, $_payPrice);
|
app()->make(MerchantRepository::class)->addLockMoney($product_mer_id, 'order', $order->order_id, $_payCityPrice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ class ExcelService
|
|||||||
'first_order_commission' => '首单拉新',
|
'first_order_commission' => '首单拉新',
|
||||||
];
|
];
|
||||||
$sys_pm_1 = ['first_order_commission','supply_chain','order', 'presell', 'order_charge', 'order_presell', 'presell_charge', 'refund_brokerage_one', 'refund_brokerage_two', 'commission_to_platform'];
|
$sys_pm_1 = ['first_order_commission','supply_chain','order', 'presell', 'order_charge', 'order_presell', 'presell_charge', 'refund_brokerage_one', 'refund_brokerage_two', 'commission_to_platform'];
|
||||||
$mer_pm_1 = ['order', 'presell', 'refund_brokerage_one', 'refund_brokerage_two', 'mer_presell',
|
$mer_pm_1 = ['order_true','order', 'presell', 'refund_brokerage_one', 'refund_brokerage_two', 'mer_presell',
|
||||||
'order_platform_coupon', 'commission_to_cloud_warehouse', 'commission_to_entry_merchant', 'commission_to_town', 'commission_to_village', 'commission_to_service_team'];
|
'order_platform_coupon', 'commission_to_cloud_warehouse', 'commission_to_entry_merchant', 'commission_to_town', 'commission_to_village', 'commission_to_service_team'];
|
||||||
$date_ = $where['date'];
|
$date_ = $where['date'];
|
||||||
unset($where['date']);
|
unset($where['date']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user