Reports & Exports

Канонический reporting layer теперь покрывает owner/admin dashboards, operational control reports, shift cash reporting и очередь XLSX exports. On-screen numbers и export идут из одного query service.

Owner dashboard

  • Выручка / прибыль / маржа / средний чек
  • Тренд по дням за период
  • Топ продавцы и срез по локациям
  • Low stock, negative stock, suspicious discounts
  • Очередь и статус XLSX exports

Admin operations dashboard

  • Активные смены и оперативный cash context
  • Продажи и возвраты по продавцам
  • Low stock и pending transfers
  • Stocktake review backlog
  • Inventory control + discount anomalies

Shift & cash reports

  • Current shift status
  • X-report для активной смены
  • Z-report для закрытой смены
  • Incasso report и discrepancy totals

Export flow

  1. Create export request with idempotency key
  2. Job enters queued/running/ready state machine
  3. Worker builds XLSX from the same canonical report payload
  4. Mini App polls status and shows download when artifact is ready
Следующий шаг после этого vertical: sales plans / plan achievement, notification rules UI, backoffice CRUD и полноценное live API wiring Mini App screens к backend.