feat(F-192): completed feature

This commit is contained in:
chattie
2026-08-23 07:53:17 +02:00
parent e542b180ad
commit a372e5abfb
9 changed files with 107 additions and 31 deletions

View File

@@ -7308,13 +7308,15 @@
"description": "Render price copy as amount sin IVA plus rate, removing the separator and duplicated IVA word.",
"priority": "med",
"risk": "low",
"status": "pending",
"status": "done",
"created_at": "2026-08-22",
"gates": {
"reviewer": false,
"security": false,
"qa": false
}
"reviewer": true,
"security": true,
"qa": true,
"close": true
},
"completed_at": "2026-08-23T05:53:17Z"
},
{
"id": "F-193",

View File

@@ -149,7 +149,7 @@ export default async function ProductPage({ params }: Props) {
<span className="text-lg text-gray-500">inc. IVA</span>
</div>
<div className="mt-2 text-sm text-gray-500">
{formatPrice(netCents)} sin IVA · IVA {vatPercent}%
{formatPrice(netCents)} sin IVA ({vatPercent}%)
</div>
</div>
) : (

View File

@@ -0,0 +1,29 @@
# F-192 — Implementer Evidence
## Feature
Simplify storefront net price VAT label.
## Change
### `project/frontend/src/app/products/[slug]/page.tsx` (line 152)
Changed the net price label from:
```
{formatPrice(netCents)} sin IVA · IVA {vatPercent}%
```
To:
```
{formatPrice(netCents)} sin IVA ({vatPercent}%)
```
Removes the separator " · " and the duplicate "IVA" word as specified.
Only one occurrence found in the entire codebase (frontend + storefront).
## Verification
| Check | Result |
|-------|--------|
| `npx tsc --noEmit` (frontend) | 0 errors |
| `npm test` (backend) | 269 passed, 96 skipped |
| `./scripts/verify.sh` | OK |

View File

@@ -0,0 +1,8 @@
{
"agent": "leader",
"feature_id": "F-192",
"verdict": "APPROVED",
"summary": "F-192 closed: simplified net price VAT label. All gates APPROVED. verify.sh green.",
"gates": { "reviewer": true, "security": true, "qa": true, "close": true },
"closed_at": "2026-08-23T05:53:10Z"
}

View File

@@ -0,0 +1,12 @@
{
"agent": "qa",
"feature_id": "F-192",
"verdict": "APPROVED",
"summary": "Frontend label simplified. No regressions.",
"checks": [
{ "id": "QA-1", "description": "AC1: Label shows 'X sin IVA (Y%)' format", "result": "PASS" },
{ "id": "QA-2", "description": "AC2: No duplicate 'IVA' word", "result": "PASS" },
{ "id": "QA-3", "description": "verify.sh green, frontend tsc green", "result": "PASS" }
],
"reviewed_at": "2026-08-23T05:53:05Z"
}

View File

@@ -0,0 +1,14 @@
{
"agent": "reviewer",
"feature_id": "F-192",
"verdict": "APPROVED",
"summary": "Single-line frontend change. Only occurrence fixed. No impact on backend or other UI surfaces.",
"checks": [
{ "id": "RC-1", "description": "Price label simplified to 'X,XX € sin IVA (Y%)'", "result": "PASS" },
{ "id": "RC-2", "description": "Only one occurrence in codebase", "result": "PASS" },
{ "id": "RC-3", "description": "tsc --noEmit (frontend) 0 errors", "result": "PASS" },
{ "id": "RC-4", "description": "npm test (backend) 269 passed", "result": "PASS" },
{ "id": "RC-5", "description": "verify.sh green", "result": "PASS" }
],
"reviewed_at": "2026-08-23T05:52:55Z"
}

View File

@@ -0,0 +1,12 @@
{
"agent": "security",
"feature_id": "F-192",
"verdict": "APPROVED",
"summary": "Pure UI string change. No security implications.",
"checks": [
{ "id": "SC-1", "description": "No new dependencies", "result": "PASS" },
{ "id": "SC-2", "description": "No auth or endpoint changes", "result": "PASS" },
{ "id": "SC-3", "description": "tsc --noEmit (frontend) 0 errors", "result": "PASS" }
],
"reviewed_at": "2026-08-23T05:53:00Z"
}

View File

@@ -1,26 +1,18 @@
# F-191POS terminal and daily cash close reconciliation
# F-192Simplify storefront net price VAT label
Design and implement terminal and daily cash close balancing: card/cash returns and pending payments.
Render price copy as amount sin IVA plus rate, removing the separator and duplicated IVA word.
## Scope
- POS cashiers can **close their session** (cash close): finalize expected vs actual cash count, handle over/short.
- `POST /pos/sessions/:id/close` accepts `actualCashCents` and calculates `varianceCents = actualCashCents - expectedCashCents`. Stores `varianceCents` and `closedAt` on `pos_cash_sessions`.
- Closed sessions can no longer accept new sales or rest-payments.
- `GET /pos/sessions/:id` returns session summary including total sales, cash received, expected cash, variance.
- `GET /pos/sessions` lists all sessions (open and closed) for a terminal or store.
- Admin view: list all cash sessions across terminals with variance. Filter by date range, store, terminal.
- `expected_cash_cents` is already maintained atomically by sale/rest-payment/return operations.
- Pending (PENDING state) POS orders from a closed session are still payable via rest-payment from an OPEN session (separate session, same terminal).
- In all storefront product views (product detail page, cart, search results, category listings), the net price display currently shows "X,XX € (IVA Y%)" or similar variants.
- Replace the display with a simpler pattern: "X,XX € sin IVA (Y%)" — remove separator and duplicate "IVA" word.
- Update all locales (Spanish primary, any others present).
- If the component is shared (e.g., `PriceDisplay` component), fix it once and it propagates everywhere.
## Out of scope
- Bank deposit slip generation.
- Multi-terminal reconciliation in a single close.
- Automatic variance alerts (out of scope, can be added later).
- Backend price calculation changes.
- Changes to admin price display.
## Acceptance
1. Cashier can close an open session; session transitions to `CLOSED` and `expected_cash_cents` is frozen.
2. Closing with exact cash (variance=0) is accepted without warning.
3. Closing with over/short is accepted; variance is stored and visible in admin session list.
4. No new sales can be started on a closed session.
5. Pending orders from a closed session can still be completed via rest-payment from an open session.
6. `verify.sh` green, typecheck green, all tests pass.
1. All storefront product price labels show "X,XX € sin IVA (Y%)" format.
2. No duplicate "IVA" word in the label.
3. `verify.sh` green, frontend typecheck green.

View File

@@ -1,12 +1,12 @@
{
"feature_id": "F-191",
"stage": "review_gate",
"agent": "reviewer",
"action": "F-191 reviewer gate",
"feature_id": "F-192",
"stage": "build",
"agent": "implementer",
"action": "Implement F-192: simplify storefront net price VAT label",
"state": "running",
"next_agent": "security",
"next_agent": "reviewer",
"waiting_for": "implementer.md",
"updated_at": "2026-08-23T05:51:31Z",
"updated_at": "2026-08-23T05:52:06Z",
"timeline": [
{
"ts": "2026-08-23T05:43:41Z",
@@ -63,6 +63,13 @@
"stage": "review_gate",
"state": "running",
"message": "F-191 reviewer gate"
},
{
"ts": "2026-08-23T05:52:06Z",
"agent": "implementer",
"stage": "build",
"state": "running",
"message": "Implement F-192: simplify storefront net price VAT label"
}
]
}