feat(export): Bestandsbuch für Tierarzneimittel nach Art. 108 VO (EU) 2019/6
- Treatment records supplier, purchase proof and prescribing vet, and keeps the apiary the colony stood at on the treatment day. - Holder name and address in site settings (never in public output; regression test in public.service.spec). - treatment-log.pdf: one sheet per apiary, identical treatments grouped, missing mandatory fields printed as FEHLT, uncertain locations marked. - Shared PDF table helpers extracted from the record card. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
f263ec79f2
commit
0d23963f07
24 files changed
+941
-113
No files matched your search
@@ -184,6 +184,19 @@ describe('Export (e2e)', () => {
|
||||
.expect(404);
|
||||
});
|
||||
|
||||
it('renders the Bestandsbuch for a year, also when nothing was treated', async () => {
|
||||
for (const query of ['year=2026', 'year=1999']) {
|
||||
const response = await request(app.getHttpServer())
|
||||
.get(`/api/v1/export/treatment-log.pdf?${query}`)
|
||||
.set('Authorization', `Bearer ${beekeeperToken}`)
|
||||
.expect(200);
|
||||
expect(response.headers['content-type']).toContain('application/pdf');
|
||||
expect(
|
||||
(response.body as Buffer).subarray(0, 4).toString('latin1'),
|
||||
).toBe('%PDF');
|
||||
}
|
||||
});
|
||||
|
||||
it('rejects the apiary annual report without an apiaryId', () => {
|
||||
return request(app.getHttpServer())
|
||||
.get('/api/v1/export/apiary-annual-report.pdf')
|
||||
|
||||
Reference in new issue
Block a user