更新
This commit is contained in:
parent
23dcd2787d
commit
da986024b7
@ -482,30 +482,8 @@ class FinancialRecordTransferRepository extends BaseRepository
|
||||
$financialType = ['refund_charge'];
|
||||
[$data['count_charge'], $data['number_charge']] = $this->dao->getDataByType($type, $where, $date, $financialType);
|
||||
|
||||
if ($merchant){
|
||||
switch ($merchant['type_id']) {
|
||||
case 16:
|
||||
$financialType1 = ['commission_to_town_refund'];
|
||||
break;
|
||||
case 15:
|
||||
$financialType1 = ['commission_to_village_refund'];
|
||||
break;
|
||||
case 14:
|
||||
$financialType1 = ['commission_to_service_team_refund'];
|
||||
break;
|
||||
case 11:
|
||||
$financialType1 = ['commission_to_cloud_warehouse_refund'];
|
||||
break;
|
||||
case 10:
|
||||
$financialType1 = ['commission_to_entry_merchant_refund'];
|
||||
break;
|
||||
default:
|
||||
$financialType1 = [];
|
||||
}
|
||||
}else{
|
||||
//退款的
|
||||
$refund=['commission_to_town_refund','commission_to_village_refund','commission_to_service_team_refund','commission_to_cloud_warehouse_refund','commission_to_entry_merchant_refund'];
|
||||
//分成的
|
||||
if (!$merchant){
|
||||
//分成的
|
||||
$commission=['commission_to_town','commission_to_village','commission_to_service_team','commission_to_cloud_warehouse','commission_to_entry_merchant'];
|
||||
}
|
||||
if ($where['is_mer']) { //商户的
|
||||
@ -537,8 +515,8 @@ class FinancialRecordTransferRepository extends BaseRepository
|
||||
$number_1 = bcsub($data['number_order_charge'], $data['number_charge'], 2);
|
||||
|
||||
//退回收入 refund_order + 退回佣金
|
||||
$number_2 = bcadd(bcadd($data['number_refund'], $data['number_coupon'], 2), $data['number_svipcoupon'], 2);
|
||||
$data['count'] = $data['count_brokerage'] + $data['count_refund'] + $data['count_order_charge'] + $data['count_refund_brokerage'] + $data['count_svipcoupon'] + $data['count_auto_margin']-$data['count_charge'];
|
||||
$number_2 = $data['number_refund'];
|
||||
$data['count'] = $data['count_brokerage'] + $data['count_refund'] + $data['count_order_charge'] + $data['count_refund_brokerage']+ $data['count_auto_margin']-$data['count_charge'];
|
||||
$data['number'] = bcadd(bcadd($number3,bcadd($number_2, $number, 2),2), $number_1, 2);
|
||||
|
||||
} else { //平台的
|
||||
@ -555,7 +533,7 @@ class FinancialRecordTransferRepository extends BaseRepository
|
||||
|
||||
|
||||
//付给服务团队和其他的佣金
|
||||
[$data['count_refund'], $data['number_refund']] = $this->dao->getDataByType($type, $where, $date, $refund);
|
||||
[$data['count_refund'], $data['number_refund']] = $this->dao->getDataByType($type, $where, $date);
|
||||
[$data['count_commission'], $data['number_commission']] = $this->dao->getDataByType($type, $where, $date, $commission);
|
||||
|
||||
$data['count_brokerage']+=$data['count_commission']-$data['count_refund'];
|
||||
|
@ -32,6 +32,8 @@ class FinancialRecordTransfer extends BaseController
|
||||
|
||||
public function lst()
|
||||
{
|
||||
halt(1);
|
||||
|
||||
[$page, $limit] = $this->getPage();
|
||||
$where = $this->request->params(['keyword', 'date', 'mer_id']);
|
||||
$merId = $this->request->merId();
|
||||
|
Loading…
x
Reference in New Issue
Block a user