fix(lastleg): allow edits with historical procurement warehouse
This commit is contained in:
+3
@@ -417,6 +417,9 @@ public class OverseasProcurementService implements WalletResultHandler {
|
||||
} catch (NumberFormatException exception) {
|
||||
throw badRequest("purchaseWarehouseId must be a numeric overseas partner warehouse ID");
|
||||
}
|
||||
// Keep the warehouse snapshot already frozen on a historical order. A later master-data
|
||||
// deactivation must not block unrelated edits such as recording outbound details.
|
||||
if (Long.toString(numericId).equals(order.getPurchaseWarehouseId())) return;
|
||||
var option = warehouseDirectory.required(numericId);
|
||||
order.setPurchaseWarehouseId(option.warehouseId());
|
||||
order.setPurchaseWarehouseName(option.warehouseName());
|
||||
|
||||
Reference in New Issue
Block a user