Merge pull request '修改出入库补单' (#550) from dev into main

Reviewed-on: #550
This commit is contained in:
mkm 2025-03-17 17:34:41 +08:00
commit 2d615a43e6

View File

@ -119,7 +119,7 @@ class ProductSourceLinkLogic extends BaseLogic
*/
public static function outbound(array $info)
{
$query = ProductSourceLinkInfo::where('product_id', $info['product']['product_id'])->where('current_nums', '>', 0);
$query = ProductSourceLinkInfo::where('product_id', $info['product']['product_id'])->where('warehouse_id', 1)->where('current_nums', '>', 0);
if (!empty($info['is_store_order']) && $info['store_id']) {
$query->where('store_id', $info['store_id'])->whereIn('types', [ProductSourceLinkInfo::TypeStoreIn, ProductSourceLinkInfo::TypeS2S]);
} else {