This commit is contained in:
Nathnael
2026-07-02 09:38:14 +00:00
parent 63937db32b
commit 5aafa436c1
6 changed files with 261 additions and 122 deletions

View File

@@ -48,7 +48,7 @@ export class FirstMileInvoiceService {
}
// Fetch the booking to get the companyId and companyProfileId
const fm = record.booking ? record : (await this.firstMileRepo.findById(record.bookingId, { relations: { booking: true } }));
const fm = record.booking ? record : (await this.firstMileRepo.findById(record.id, { relations: { booking: true } }));
if (!fm) return null;
if (!fm.booking?.companyId) {
this.logger.warn(