调整商户后台财务账单查询
This commit is contained in:
parent
ca106f9b3f
commit
423fc1d013
@ -499,6 +499,7 @@ class FinancialRecordRepository extends BaseRepository
|
|||||||
'data' => [
|
'data' => [
|
||||||
['订单支付', $income['number_order'] . '元', $income['count_order'] . '笔'],
|
['订单支付', $income['number_order'] . '元', $income['count_order'] . '笔'],
|
||||||
['平台佣金', $income['number_commission'] . '元', $income['count_commission'] . '笔'],
|
['平台佣金', $income['number_commission'] . '元', $income['count_commission'] . '笔'],
|
||||||
|
['保证金退还', $income['number_margin_refund'] . '元', $income['count_margin_refund'] . '笔'],
|
||||||
['优惠券补贴', $income['number_coupon'] . '元', $income['count_coupon'] . '笔'],
|
['优惠券补贴', $income['number_coupon'] . '元', $income['count_coupon'] . '笔'],
|
||||||
['会员优惠券补贴', $income['number_svipcoupon'] . '元', $income['count_svipcoupon'] . '笔'],
|
['会员优惠券补贴', $income['number_svipcoupon'] . '元', $income['count_svipcoupon'] . '笔'],
|
||||||
]
|
]
|
||||||
@ -561,7 +562,7 @@ class FinancialRecordRepository extends BaseRepository
|
|||||||
public function countIncome($type, $where, $date, $merchant = [])
|
public function countIncome($type, $where, $date, $merchant = [])
|
||||||
{
|
{
|
||||||
if ($where['is_mer'] > 0) {
|
if ($where['is_mer'] > 0) {
|
||||||
$financialType = ['commission_to_store', 'commission_to_promoter', 'supply_chain', 'auto_margin_refund'];
|
$financialType = ['supply_chain'];
|
||||||
} else {
|
} else {
|
||||||
$financialType = ['order', 'commission_to_store_refund', 'commission_to_promoter_refund',
|
$financialType = ['order', 'commission_to_store_refund', 'commission_to_promoter_refund',
|
||||||
'commission_to_courier_refund', 'supply_chain_refund', 'auto_margin', 'platform_consumption_refund'];
|
'commission_to_courier_refund', 'supply_chain_refund', 'auto_margin', 'platform_consumption_refund'];
|
||||||
@ -611,9 +612,12 @@ class FinancialRecordRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
[$data['count_svipcoupon'], $data['number_svipcoupon']] = $this->dao->getDataByType($type, $where, $date, $financialType);
|
[$data['count_svipcoupon'], $data['number_svipcoupon']] = $this->dao->getDataByType($type, $where, $date, $financialType);
|
||||||
[$data['count_commission'], $data['number_commission']] = $this->dao->getDataByType($type, $where, $date, ['commission_to_store', 'commission_to_promoter']);
|
[$data['count_commission'], $data['number_commission']] = $this->dao->getDataByType($type, $where, $date, ['commission_to_store', 'commission_to_promoter']);
|
||||||
|
[$data['count_margin_refund'], $data['number_margin_refund']] = $this->dao->getDataByType($type, $where, $date, ['auto_margin_refund']);
|
||||||
|
|
||||||
$data['count'] = $data['count_order'];
|
$data['count'] = $data['count_order'] + $data['count_commission'] + $data['count_margin_refund'];
|
||||||
$data['number'] = bcadd($data['number_coupon'], $data['number_order'], 2);
|
$data['number'] = bcadd($data['number_coupon'], $data['number_order'], 2);
|
||||||
|
$data['number'] = bcadd($data['number'], $data['number_commission'], 2);
|
||||||
|
$data['number'] = bcadd($data['number'], $data['number_margin_refund'], 2);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user