feat: 修改CommissionLogic类以优化财务逻辑

This commit is contained in:
mkm 2024-07-08 17:55:27 +08:00
parent f6c8b7865e
commit 01915bbaaa

View File

@ -199,9 +199,9 @@ class CommissionLogic extends BaseLogic
}
$fees = bcmul($pay_price, $userRate, 2);
if ($fees > 0) {
SystemStore::where('id', $order['store_id'])->inc('attrition', $fees)->update();
$financeLogic->in($transaction_id, $fees, $enum, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
$financeLogic->out($transaction_id, $fees, $enum, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
$financeLogic->save();
}
return $fees;
}