Files
lux_fiscal/frontend/src/api/cashRegisters.ts
T
lauadminandClaude Opus 5.5 518a99197f 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>
2026-09-23 23:39:00 +03:00

23 lines
788 B
TypeScript

import { apiFetch } from '@/api/client'
import type {
CashRegister,
CashRegisterCreate,
CashRegisterUpdate,
} from '@/features/cashRegisters/types'
export function getCashRegisters(): Promise<CashRegister[]> {
return apiFetch<CashRegister[]>('/cash-registers')
}
export function createCashRegister(payload: CashRegisterCreate): Promise<CashRegister> {
return apiFetch<CashRegister>('/cash-registers', { method: 'POST', body: payload })
}
export function updateCashRegister(id: string, payload: CashRegisterUpdate): Promise<CashRegister> {
return apiFetch<CashRegister>(`/cash-registers/${id}`, { method: 'PATCH', body: payload })
}
export function checkCashRegister(id: string): Promise<void> {
return apiFetch<void>(`/cash-registers/${id}/check`, { method: 'POST' })
}