Add Checkbox ETTN receipts for Nova Poshta COD waybills

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>
This commit is contained in:
2026-09-23 23:39:00 +03:00
co-authored by Claude Opus 5.5
parent d13e7ce2b3
commit 518a99197f
44 changed files with 2931 additions and 20 deletions
+6
View File
@@ -14,8 +14,10 @@ from app.core.config import settings
from app.core.security import TokenError, decode_access_token
from app.db.models.user import User, UserRole
from app.db.session import get_session
from app.services.checkbox.client import CheckboxClient, get_checkbox_client
from app.services.crm.client import CrmClient
from app.services.crm.exo_client import ExoCrmClient
from app.services.task_queue import TaskQueue, get_task_queue
bearer_scheme = HTTPBearer(auto_error=False)
@@ -95,3 +97,7 @@ def get_crm_client() -> CrmClient:
CrmClientDep = Annotated[CrmClient, Depends(get_crm_client)]
CheckboxClientDep = Annotated[CheckboxClient, Depends(get_checkbox_client)]
TaskQueueDep = Annotated[TaskQueue, Depends(get_task_queue)]