mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
库存支持数据0导入
This commit is contained in:
parent
2c965ed7b2
commit
1bbb0c4c63
@ -32,7 +32,7 @@ class InventoryImport implements ToArray, SkipsEmptyRows
|
|||||||
$goodsSkus = GoodsSku::query()->with("combinationGoods")->whereIn('external_sku_id', $externalSkuIds)
|
$goodsSkus = GoodsSku::query()->with("combinationGoods")->whereIn('external_sku_id', $externalSkuIds)
|
||||||
->get()->toArray();
|
->get()->toArray();
|
||||||
$goodsSkus = collect($goodsSkus)->map(function ($v) use ($inventoryKeyByExternalSkuIdMap) {
|
$goodsSkus = collect($goodsSkus)->map(function ($v) use ($inventoryKeyByExternalSkuIdMap) {
|
||||||
if (!empty($inventoryKeyByExternalSkuIdMap[$v['external_sku_id']])) {
|
if (isset($inventoryKeyByExternalSkuIdMap[$v['external_sku_id']])) {
|
||||||
$v['inventory'] = $inventoryKeyByExternalSkuIdMap[$v['external_sku_id']];
|
$v['inventory'] = $inventoryKeyByExternalSkuIdMap[$v['external_sku_id']];
|
||||||
return $v;
|
return $v;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user