fix(api): 修正更新订单总金额逻辑
- 将 BeforehandOrder::where('id', $params['id']) 修改为 BeforehandOrder::where('id', $outbound_id') - 此修改确保了更新订单总金额时使用正确的订单 ID
This commit is contained in:
parent
82c1eb1ce6
commit
7469bd3fe5
@ -154,7 +154,7 @@ class DemoLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$total_price=WarehouseProduct::where('oid', $outbound_id)->sum('total_price');
|
$total_price=WarehouseProduct::where('oid', $outbound_id)->sum('total_price');
|
||||||
BeforehandOrder::where('id', $params['id'])->update(['total_price' => $total_price]);
|
BeforehandOrder::where('id', $outbound_id)->update(['total_price' => $total_price]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user