条码+仓库统一为商品编码+仓库简称(镜像并入行同步修正),并重算7/8月

This commit is contained in:
chenxi 2026-09-30 14:48:49 +08:00
parent aafbfb20c7
commit 64a82cf135

View File

@ -95,7 +95,8 @@ class ImportProductMonthlyWeightedAverageBase extends Command
$payload[$rowKey] = [
'report_month' => $month->toDateString(),
'row_key' => $rowKey,
'barcode_warehouse' => $item['warehouse_short_name'] . $item['product_code'],
// 条码+仓库 = 商品编码 + 仓库简称
'barcode_warehouse' => $item['product_code'] . $item['warehouse_short_name'],
'warehouse_short_name' => $item['warehouse_short_name'],
'product_code' => $item['product_code'],
'opening_unit_price' => null,
@ -116,7 +117,7 @@ class ImportProductMonthlyWeightedAverageBase extends Command
$payload[$rowKey] = [
'report_month' => $month->toDateString(),
'row_key' => $rowKey,
'barcode_warehouse' => '南昌樵舍仓' . $code,
'barcode_warehouse' => $code . '南昌樵舍仓',
'warehouse_short_name' => '南昌樵舍仓',
'product_code' => $code,
'opening_unit_price' => null,
@ -252,7 +253,8 @@ class ImportProductMonthlyWeightedAverageBase extends Command
$previousStatus = trim((string) ($cells[15] ?? ''));
yield [
'barcode_warehouse' => trim((string) ($cells[1] ?? '')) ?: $shortName . $productCode,
// 条码+仓库统一为「仓库简称 + 商品编码」,不再沿用表1 里的单元格写法。
'barcode_warehouse' => $shortName . $productCode,
'warehouse_short_name' => $shortName,
'product_code' => mb_strtoupper($productCode),
'opening_unit_price' => $price === '' ? null : round((float) str_replace(',', '', $price), 2),