Skip to content

Commit

Permalink
fix: select the county referent in replyTo
Browse files Browse the repository at this point in the history
  • Loading branch information
jonat75 committed Jan 29, 2025
1 parent eeb9a12 commit a6a8170
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class SendOpmcReceipt implements UseCase<Input, void> {
throw new SendOpmcReceiptNotFoundError(`No declaration found with siren ${siren} and year ${year}`);
}

const referent = await this.referentRepo.getOneByRegion(declarationOpmc.declaration?.company?.region);
const referent = await this.referentRepo.getOneByCounty(declarationOpmc.declaration?.company?.county);
const buffer = await this.jsxPdfService.buffer(DeclarationReceipt(declarationOpmc));

await this.globalMailerService.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class SendRepresentationEquilibreeReceipt implements UseCase<Input, void>
);
}

const referent = await this.referentRepo.getOneByRegion(representationEquilibree.company?.region);
const referent = await this.referentRepo.getOneByCounty(representationEquilibree.company?.county);
const buffer = await this.jsxPdfService.buffer(
RepresentationEquilibreeReceipt({ repEq: representationEquilibree }),
);
Expand Down

0 comments on commit a6a8170

Please sign in to comment.