mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix(warehouses): trim receive form to fields with a real source
- remove Incoterms, HS codes, and Item code from the truck-entrance form: nothing in the booking captures them, so they were always hand-typed noise - remove the hand-typed "Warehouse code and location" input: the backend now stamps it from the warehouse/yard/zone the operator actually selected (WH / YARD / ZONE codes), so the GRN and notes always match reality - Declaration number and Item description widen to full rows Backend DTO keeps the optional fields for compatibility. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -891,11 +891,18 @@ export class WarehouseInventoryService {
|
||||
}> = [];
|
||||
|
||||
await this.dataSource.transaction(async (manager) => {
|
||||
await this.validateLocation(manager, {
|
||||
const { warehouse, yard, zone } = await this.validateLocation(manager, {
|
||||
warehouseId: dto.warehouseId,
|
||||
yardId: dto.yardId,
|
||||
zoneId: dto.zoneId,
|
||||
});
|
||||
// The receive location is whatever the operator selected above — never a
|
||||
// hand-typed string. Stamp it on the truck entrance for the GRN/notes.
|
||||
if (dto.truckEntrance && !dto.truckEntrance.warehouseCodeLocation) {
|
||||
dto.truckEntrance.warehouseCodeLocation = [warehouse.code, yard.code, zone.code]
|
||||
.filter(Boolean)
|
||||
.join(' / ');
|
||||
}
|
||||
|
||||
for (const bookingId of dto.bookingIds) {
|
||||
const skip = (reason: string) => {
|
||||
|
||||
Reference in New Issue
Block a user