- GET /orders/summary: count and sum of cash-on-delivery for parcels not
yet picked up (excludes received, refused, deleted/unknown TTNs, paid COD);
shown as a card above the tabs.
- New «Полученные» tab: orders with NP received codes (9, 10, 11, 106) move
there automatically, regardless of receipt; 106 is now a final status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Orders whose Nova Poshta status is a refusal (102/103/105/108) now show
only under «Отказы», whether or not they have a receipt. GET /orders takes
tab=no_receipt|has_receipt|refused instead of has_receipt. NP statuses are
also polled for orders that already have a receipt, until NP reports a
final status.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cashiers can edit recipient, TTN, notes, goods and total in the order
modal and save via PATCH /orders/{id}. Edited orders get edited_at and
are no longer overwritten by CRM sync. Editing is blocked once a receipt
exists; changing the TTN resets Nova Poshta tracking fields.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cashier creates an ETTN receipt in Checkbox bound to the TTN with payment
control; Checkbox fiscalizes it itself when the parcel is paid for.
- cash_registers (Fernet-encrypted license key / PIN) and receipts tables
- Checkbox HTTP client + stub (ETTN does not work on test registers)
- two-phase create via ARQ job, timeout reconciliation, cron status polling
- /receipts and /cash-registers API, audit records
- dashboard: per-order and bulk create, prepayment, cancel; cash registers page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wires the CRM (exoCRM GetOrders) into the dashboard as a locally
persisted order queue instead of the previous static mockup:
- CrmClient Protocol + ExoCrmClient/StubCrmClient for the CRM's
signed JSON-RPC API
- Order model + migration, synced from CRM on each queue view;
soft-deleted orders stay hidden across re-syncs
- GET/DELETE /api/v1/orders with "no receipt"/"receipt issued" tabs
(the latter is empty until Checkbox fiscalization lands)
- Dashboard: real order list, item-detail modal, tab switcher,
one-click delete
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>