fix(delivery): use frozen relabel destination in SKU details

This commit is contained in:
2026-10-15 21:48:18 +08:00
parent b8739eebf0
commit a3a5862f89
2 changed files with 10 additions and 2 deletions
@@ -1483,7 +1483,8 @@ public class DeliveryTransferService {
// Match receipt cargo semantics: stable first SKU carries the physical box once, never per piece.
for (var line : returnCartonItems.listCarton(carton.getId())) {
cargo.add(new DeliveryResponses.DeliverySku(item.getInboundCode(), delivery.getCustomerName(),
carton.getDestinationWarehouseCode(), delivery.getDeliveryAddress(), null, null,
relabelCarton ? item.getDestinationWarehouseCode() : carton.getDestinationWarehouseCode(),
delivery.getDeliveryAddress(), null, null,
line.getSkuCode(), line.getProductNameZh(), !relabelCarton || firstSku ? 1 : 0,
relabelCarton && firstSku ? item.getGrossWeightKg() : null,
relabelCarton && firstSku ? item.getVolumeCbm() : null, line.getQuantity()));