mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 15:18:11 +00:00
refactor contract handling to support single route per contract and improve reference generation logic
This commit is contained in:
@@ -192,8 +192,7 @@ export class BookingRequestService {
|
||||
}
|
||||
|
||||
private async generateReference(): Promise<string> {
|
||||
const count = await this.repo.count();
|
||||
const seq = String(count + 1).padStart(6, '0');
|
||||
return `SR-${seq}`;
|
||||
const seq = await this.repo.maxReferenceSequence();
|
||||
return `SR-${String(seq + 1).padStart(6, '0')}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user