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>
11 lines
480 B
TypeScript
11 lines
480 B
TypeScript
import { apiFetch } from '@/api/client'
|
|
import type { Receipt, ReceiptCreateResponse, ReceiptRequestItem } from '@/features/receipts/types'
|
|
|
|
export function createReceipts(items: ReceiptRequestItem[]): Promise<ReceiptCreateResponse> {
|
|
return apiFetch<ReceiptCreateResponse>('/receipts', { method: 'POST', body: { items } })
|
|
}
|
|
|
|
export function cancelReceipt(receiptId: string): Promise<Receipt> {
|
|
return apiFetch<Receipt>(`/receipts/${receiptId}/cancel`, { method: 'POST' })
|
|
}
|