修改预订单高级会员导出
This commit is contained in:
parent
2439429e4c
commit
8aa2740b50
@ -968,16 +968,13 @@ class BeforehandOrderLogic extends BaseLogic
|
||||
$v['store_name'] = $find['store_name'];
|
||||
$v['mark'] = $find['after_sales'];
|
||||
if (isset($params['type']) && $params['type'] == 2) {
|
||||
$v['price'] = $v['cost']; //出库单价
|
||||
$v['total_price'] = bcmul($v['price'], $v['nums'], 2); //出库总价
|
||||
$v['price'] = $v['vip_price']; //出库单价
|
||||
$v['purchase'] = $v['cost']; //高级会员单,供货价=商户价
|
||||
} else {
|
||||
if ($v['vip_price'] > 0) {
|
||||
$v['total_price'] = bcmul($v['vip_price'], $v['nums'], 2);
|
||||
} else {
|
||||
$v['total_price'] = bcmul($v['price'], $v['nums'], 2);
|
||||
}
|
||||
$v['purchase'] = $v['vip_price'] > 0 ? $v['vip_price'] : $v['price']; //会员单,供货价=会员价
|
||||
}
|
||||
|
||||
$v['total_price'] = bcmul($v['price'], $v['nums'], 2); //出库总价
|
||||
$v['pay_price'] = bcmul($v['purchase'], $v['nums'], 2); //供货总价
|
||||
$v['profit'] = bcsub($v['total_price'], $v['pay_price'], 2);
|
||||
$total_profit = bcadd($total_profit, $v['profit'], 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user