Browse Source

订单分账

master
weigang 5 years ago
parent
commit
97f83a5992
  1. 13
      app/Service/v3/Implementations/SeparateAccountsService.php

13
app/Service/v3/Implementations/SeparateAccountsService.php

@ -210,12 +210,13 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface
$this->financialRecordService->mpAwardByNewStore($mpInfo->admin_user_id, $globalOrderId, $MmMpAwardConfig['mp_new_store'], '市场经理「'.$mmInfo->name.'」发展新商户【'.$store->name.'】'); // 服务商新商户奖励
}
}
// 线上订单服务商分账
if ($orderMain->type == OrderType::ONLINE) {
$money = bcmul($orderMain->money, bcdiv($MmMpAwardConfig['separate_rate'], 100, 6), 2);
$this->financialRecordService->mpSeparateAccountByOLOrderComp($mpInfo->admin_user_id, $globalOrderId, $money);
// 线上订单服务商分账
if ($orderMain->type == OrderType::ONLINE) {
$rate = bcdiv($order['money'], $orderMain->total_money, 6);
$preMoney = bcmul($orderMain->money, $rate, 6);
$money = bcmul($preMoney, bcdiv($MmMpAwardConfig['separate_rate'], 100, 6), 2);
$this->financialRecordService->mpSeparateAccountByOLOrderComp($mpInfo->admin_user_id, $globalOrderId, $money);
}
}
// =======服务商、市场经理奖励分账 / End=======

Loading…
Cancel
Save