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:
Hagernesh
2026-07-10 06:50:35 +00:00
parent fc2366f9e0
commit a7b429544b
2 changed files with 17 additions and 46 deletions

View File

@@ -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) => {