修改采购商品入库

This commit is contained in:
lewis 2025-01-23 17:12:32 +08:00
parent 17cc47ffc9
commit c44b51e33f

View File

@ -413,9 +413,7 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
if (!$offerResult) {
throw new BusinessException('入库失败,采购信息更新出错');
}
$putInCount = PurchaseProductOffer::where('order_id', $purchaseProductOffer['order_id'])->where('is_storage', 1)->count();
$offerCount = PurchaseProductOffer::where('order_id', $purchaseProductOffer['order_id'])->count();
if ($putInCount == $offerCount) {
if ($beforehandOrder['is_warehousing'] == 0) {
$attrs = ['warehousing_id' => $warehouseOrder['id'], 'is_warehousing' => 1];
if ($beforehandOrder['order_type'] == 7) {
$attrs['is_buying'] = 1;