Bug check fee sql

This commit is contained in:
2026-05-15 11:26:39 +02:00
parent 60f26ddc9d
commit b20c3d54a4
5 changed files with 36 additions and 9 deletions

View File

@@ -71,6 +71,11 @@ For every other fee, it recomputes the expected quantity from the effective
- `lot.qt.hist.quantity` for net fees and `lot.qt.hist.gross_quantity` for gross
fees.
The diagnostic is grouped by `fee_id`. Purchase and sale columns are displayed
only to help identify related contracts; they do not split the expected
quantity. This matters for purchase fees whose linked lots may also be matched
to several sale lines.
Run it on a restored test database:
```sql