diff --git a/apps/backend/src/infrastructure/persistence/typeorm/mappers/csv-booking.mapper.ts b/apps/backend/src/infrastructure/persistence/typeorm/mappers/csv-booking.mapper.ts index 2605cc4..3b7f7b4 100644 --- a/apps/backend/src/infrastructure/persistence/typeorm/mappers/csv-booking.mapper.ts +++ b/apps/backend/src/infrastructure/persistence/typeorm/mappers/csv-booking.mapper.ts @@ -95,6 +95,24 @@ export class CsvBookingMapper { */ static toOrmUpdate(domain: CsvBooking): Partial { return { + // Carrier + route + cargo + price are editable before payment + // (editDetails / editFromRate), so they must be persisted on update. + carrierName: domain.carrierName, + carrierEmail: domain.carrierEmail, + origin: domain.origin.getValue(), + destination: domain.destination.getValue(), + containerType: domain.containerType, + transitDays: domain.transitDays, + volumeCBM: domain.volumeCBM, + weightKG: domain.weightKG, + palletCount: domain.palletCount, + priceUSD: domain.priceUSD, + priceEUR: domain.priceEUR, + primaryCurrency: domain.primaryCurrency, + freightTotal: domain.freightTotal ?? null, + freightCurrency: domain.freightCurrency ?? null, + fobTotal: domain.fobTotal ?? null, + fobCurrency: domain.fobCurrency ?? null, status: domain.status as CsvBookingOrmEntity['status'], respondedAt: domain.respondedAt, notes: domain.notes,