修改账单统计的错误
This commit is contained in:
parent
c0d82f8fe5
commit
96255e2b0e
@ -719,7 +719,7 @@ class FinancialRecordRepository extends BaseRepository
|
||||
$financialType = ['commission_to_entry_merchant'];
|
||||
[$data['count_merchant'], $data['number_merchant']] = $this->dao->getDataByType($type, $where, $date, $financialType);
|
||||
$data['count_order']=bcsub($data['count_order'],$data['count_merchant']);
|
||||
$data['number_order']=bcsub($data['number_order'],$data['number_merchant']);
|
||||
$data['number_order']=bcsub($data['number_order'],$data['number_merchant'], 2);
|
||||
|
||||
//付给商户的优惠券抵扣金额
|
||||
$financialType = ['order_platform_coupon'];
|
||||
|
@ -21,13 +21,13 @@ class AfterRefund
|
||||
|
||||
public function handle($event)
|
||||
{
|
||||
Log::info('refundCommissionStart');
|
||||
Log::info('refundCommissionStart', $event);
|
||||
$this->refundOrder = $event['res'];
|
||||
if ($this->refundOrder['refund_price'] != $this->refundOrder->order['total_price']) {
|
||||
Log::info('refundCommissionEnd, not full refund');
|
||||
return true;
|
||||
}
|
||||
$financialRecords = FinancialRecord::getInstance()->where('order_id', $this->refundOrder['order_id'])->select();
|
||||
$financialRecords = FinancialRecord::getInstance()->where('order_sn', $this->refundOrder['order']['order_sn'])->select();
|
||||
Log::info('refundCommissionCount:' . count($financialRecords));
|
||||
foreach ($financialRecords as $financialRecord) {
|
||||
if (in_array($financialRecord['financial_type'], ['commission_to_cloud_warehouse', 'commission_to_entry_merchant', 'commission_to_service_team', 'commission_to_village', 'commission_to_town', ])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user