BOHA
8b5f216960
fix: received invoices — amount field is VAT-inclusive, extract VAT from it
...
Previously: amount was treated as base, VAT added on top (amount * rate / 100)
Now: amount includes VAT, VAT is extracted (amount - amount / (1 + rate/100))
Example: 9798.58 at 21% → VAT = 9798.58 - 8098.00 = 1700.58
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 13:24:54 +01:00
BOHA
9a0acb8983
fix: allow any authenticated user to list vehicles
...
Vehicle list (GET) now requires only authentication, not trips.vehicles
permission. Users with trips.view can see available cars in the trip
modal. Create/update/delete still require trips.vehicles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 13:12:22 +01:00
BOHA
8a453deaac
feat: add email notification for new leave requests
...
- mailer.ts: nodemailer transport via local sendmail
- leave-notification.ts: HTML email matching PHP template
- Sends notification to LEAVE_NOTIFY_EMAIL on new leave request
- Non-blocking: errors logged but don't fail the request
- Added LEAVE_NOTIFY_EMAIL and APP_URL env vars
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 11:54:29 +01:00
BOHA
1a175e805b
fix: use vehicle initial_km as start_km for first trip record
...
When no trips exist for a vehicle, the last-km endpoint now returns
the vehicle's initial_km instead of 0, matching the PHP behavior:
COALESCE(MAX(end_km), vehicle.initial_km, 0)
Also fixed ordering from id DESC to end_km DESC for correctness.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 10:49:42 +01:00
BOHA
7ef25a077b
feat: add SPAYD QR payment code to invoice PDF
...
Generates QR code in SVG format using the SPAYD payment standard,
matching the PHP implementation. Contains: IBAN, amount, currency,
variable symbol, constant symbol, and invoice reference.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 10:37:43 +01:00
BOHA
b87081dd2c
feat: integrate NAS file operations with project CRUD
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 10:19:15 +01:00
BOHA
49e668ee2a
feat: add project files REST endpoints with auth and audit logging
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 10:19:11 +01:00
BOHA
ab71de78ce
fix: rewrite invoices PDF to match PHP POHODA-style design
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:22:55 +01:00
BOHA
c0b8a94210
fix: resolve TypeScript compilation errors from service extraction
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:11:04 +01:00
BOHA
28eb58946f
refactor: extract attendance business logic into attendance.service.ts
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:06:40 +01:00
BOHA
0e9d30f5a8
refactor: extract orders business logic into orders.service.ts
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:04:03 +01:00
BOHA
ba0e9617ad
refactor: extract invoices business logic into invoices.service.ts
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:04:02 +01:00
BOHA
89fa3128cf
refactor: extract projects business logic into projects.service.ts
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:03:32 +01:00
BOHA
dbf8749b37
refactor: extract users business logic into users.service.ts
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:03:31 +01:00
BOHA
d26bbd8e7c
refactor: extract offers business logic into offers.service.ts
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:01:56 +01:00
BOHA
2146696bc6
refactor: extract numbering logic into numbering.service.ts
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 09:00:07 +01:00
BOHA
d2b22e9399
feat: add Zod validation schemas for all domain routes
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 08:57:38 +01:00
BOHA
a4303b0188
feat: add Zod validation for auth endpoints
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 08:49:54 +01:00
BOHA
333d1f7697
security: add request body size limits (1MB global, 10KB auth)
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 08:47:59 +01:00
BOHA
9b2da944b1
security: add stricter rate limit on login endpoint (20/min)
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 08:47:03 +01:00
BOHA
4608494a3f
initial commit
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-23 08:46:51 +01:00