修改订单财务流水的错误

This commit is contained in:
luofei 2024-03-02 16:49:50 +08:00
parent 52c6e4ca5d
commit fbc0a5f841

View File

@ -794,7 +794,7 @@ class StoreOrderRepository extends BaseRepository
if ($order->uid != $order->merchant->uid) { if ($order->uid != $order->merchant->uid) {
$refundPrice = StoreRefundOrder::where('order_id', $order['order_id'])->where('status', '<>', -1)->sum('refund_price'); $refundPrice = StoreRefundOrder::where('order_id', $order['order_id'])->where('status', '<>', -1)->sum('refund_price');
$money = bcsub($order->total_price, $order->consumption_money, 2); $money = bcsub($order->total_price, bcadd($order['extension_one'], $order['extension_two'], 3), 2);
$money = bcsub($money, $refundPrice, 2); $money = bcsub($money, $refundPrice, 2);
//订单确认收货,增加商户销售金额 //订单确认收货,增加商户销售金额
Merchant::where('mer_id', $order->mer_id)->update(['sale_amount' => Db::raw('sale_amount+' . $money)]); Merchant::where('mer_id', $order->mer_id)->update(['sale_amount' => Db::raw('sale_amount+' . $money)]);