bober-bbq-bot/bober_bbq
byrsapty a3c29095c8 Edit supplier deliveries after the fact; downloadable Excel/PDF statements
Two gaps: an unpaid delivery had no way to later be marked paid (or
corrected at all) short of delete-and-recreate, losing history; and
there was no way to hand a supplier or an accountant a statement of
account.

- New GET+POST /suppliers/<id>/deliveries/<id>/edit
  (supplier_delivery_edit.html) — edits every field including
  paid_amount/payment_date. Deliberately a pure ledger correction: like
  the existing delete button already warns, this never touches
  current_stock/StockMovement even if quantity or the ingredient link
  changes — stock only moves through the ingredient's own actions.
- New bober_bbq/utils/supplier_reports.py generates both a per-supplier
  detailed statement and an all-suppliers summary, each in Excel
  (openpyxl, already a dependency) and PDF (new: fpdf2), optionally
  scoped to a delivery-date range. Download buttons added to the
  supplier detail page and the suppliers list.
- PDF needs a real Cyrillic TTF; added fpdf2 to requirements.txt and
  documented (and will install) fonts-dejavu-core on the server rather
  than bundling a font in the repo — DejaVu is freely embeddable,
  Windows fonts are not. A missing font produces a clear flash message,
  not a 500.

Verified with a 33-check smoke test across both features (edit
correctness + stock isolation, date-range filtering on both statement
shapes, real route responses reopened/parsed, and the missing-font
fallback path) plus a full regression rerun of every supplier/inventory
smoke suite from this session.
2026-08-26 20:17:48 +03:00
..
admin Edit supplier deliveries after the fact; downloadable Excel/PDF statements 2026-08-26 20:17:48 +03:00
api Run Checkbox fiscalization in the background, start order numbers at 1 2026-08-13 18:06:41 +03:00
payments Make brand identity reusable for redeploying to other clients 2026-08-25 17:54:29 +03:00
static Add EU-14 allergen labeling to products 2026-08-25 15:52:21 +03:00
templates/admin Edit supplier deliveries after the fact; downloadable Excel/PDF statements 2026-08-26 20:17:48 +03:00
utils Edit supplier deliveries after the fact; downloadable Excel/PDF statements 2026-08-26 20:17:48 +03:00
__init__.py Initial commit: Bober BBQ Telegram bot + backend + admin + Mini App 2026-08-08 15:50:50 +03:00
app.py Add owner-alerting on unhandled errors, backup integrity checks, and a client-provisioning script 2026-08-25 18:11:15 +03:00
config.py Enable TEMPLATES_AUTO_RELOAD so template edits don't need a restart 2026-08-09 16:46:10 +03:00
extensions.py Login page: real logo/name, Ukrainian auth message, fix remaining tight spacing 2026-08-09 16:42:38 +03:00
migrate.py Link suppliers to inventory ingredients (main supplier per ingredient) 2026-08-26 18:56:47 +03:00
models.py Link suppliers to inventory ingredients (main supplier per ingredient) 2026-08-26 18:56:47 +03:00
seed.py Add dine-in orders and manual order creation for staff 2026-08-09 23:53:14 +03:00