mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 15:58:18 +00:00
add lashing surcharge for cargo types with hasLashing flag
add lashing surcharge for cargo types with hasLashing flag
This commit is contained in:
@@ -25,6 +25,22 @@ export class RatesRepository implements IRatesRepository {
|
||||
.getMany();
|
||||
}
|
||||
|
||||
findLiveRatesDetailed(): Promise<Rate[]> {
|
||||
return this.repo
|
||||
.createQueryBuilder('rate')
|
||||
.leftJoinAndSelect('rate.originYard', 'originYard')
|
||||
.leftJoinAndSelect('rate.destinationYard', 'destinationYard')
|
||||
.leftJoinAndSelect('rate.containerType', 'containerType')
|
||||
.leftJoinAndSelect('rate.cargoType', 'cargoType')
|
||||
.where('rate.status = :status', { status: 'LIVE' })
|
||||
.orderBy('rate.appliesTo', 'ASC')
|
||||
.addOrderBy('rate.tradeDirection', 'ASC')
|
||||
.addOrderBy('originYard.label', 'ASC')
|
||||
.addOrderBy('destinationYard.label', 'ASC')
|
||||
.addOrderBy('rate.rateValue', 'ASC')
|
||||
.getMany();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a non-superseded rate matching an identity pattern — the same tuple the
|
||||
* `UQ_rates_pattern` unique index enforces. Used to reject duplicates before
|
||||
|
||||
Reference in New Issue
Block a user