Sales Workspace

В foundation уже добавлен первый production-oriented checkout vertical: idempotent sale commit, multi-line cart, split payment, shift requirement, discount limit validation, shortage override for eligible roles, inventory ledger posting, cash ledger posting и audit trail.

Guardrails

  • manager: скидка до 5%
  • admin: скидка до 25%
  • owner: unlimited + price override
  • negative stock sale только с comment и правом override
  • manager/admin require active shift

What is next

  • search and scan UX
  • draft cart persistence
  • receipt state and reprint/export
  • seller KPI wiring
  • catalog search + barcode scan UX

API example

POST /v1/sales
Headers:
  x-telegram-id: 100000003
  x-location-id: <location-id>
Body:
{
  "locationId": "<location-id>",
  "currencyCode": "RUB",
  "idempotencyKey": "sale-20260324-0001",
  "lines": [
    { "skuId": "sku_demo_tshirt_m_black", "quantity": 1, "unitPriceMinor": 199900, "discountPercent": 5 }
  ],
  "payments": [
    { "method": "cash", "amountMinor": 189905 }
  ]
}