parity(docs): D16 — stop PRICE-01 as storefront, reorder Phase 1, verify SEC-02
Owner ruling: computing and displaying price / price_with_discount is retail storefront work, so it falls under D13 and is marked out of scope. The B2B app works in making charge only. variant-price.ts and its 11 hand-checked tests are kept and still run, just unused. Nothing needed reverting: computeVariantPrice was never called from outside its own file and spec, verified by grep over apps/api/src and apps/admin-panel/src, so no price had been wired into any screen. PRICE-01 is re-marked in ISSUES.md rather than deleted so the evidence survives if the storefront is ever taken up. Making-charge work stays fully in scope: percentage_pay, makingChargeOffsetPercent, and wage display on variants and order lines. New Phase 1 order: Persons -> products/categories/variants/order detail -> financial documents -> users and permissions -> admin SMS -> promotions, notifications, cities, branches, workshops -> reports -> gate. Per section: implement the gaps, then field-by-field test that section, and show a gap summary before fixing. SEC-02 re-verified live rather than quoted: 9/9 assertions, plus 32/32 in auth-smoke.sh. POST /orders is 401 without a token; a body customerId of "customer-2" sent with a customer-dev-test token still lands the order on customer-dev-test and is warn-logged; a foreign order id returns 404 rather than 403 so ids stay unenumerable; the admin read rejects a customer token. Client-supplied wagePercent/discountPercent/flatRialCharge remain as MON-08, already scheduled as Phase 2 item #1. Also records why the dev OTP log briefly looked broken: a stale API process still held port 3077, so the new instance died with EADDRINUSE and the tailed log belonged to the old process. Not a regression. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
64e76a8616
commit
e3af31948e
@@ -169,9 +169,21 @@ To be filled, in the fix order given in the Phase 1 summary:
|
||||
|
||||
---
|
||||
|
||||
## §3 — Price formula and product pricing — **the top critical gap**
|
||||
## §3 — Price formula and product pricing — ⏸️ STOPPED BY D16
|
||||
|
||||
### PRICE-01 — the target computes no product price at all ❌ CRITICAL
|
||||
> **Owner ruling, 2026-09-22.** Computing and showing `price` /
|
||||
> `price_with_discount` is a **retail-storefront** concern; the B2B app works in
|
||||
> **making charge (اجرت)** only. PRICE-01 is therefore ⏸️ under D13 and is NOT
|
||||
> worked on. `variant-price.ts` and its 11 tests are **kept but unused**;
|
||||
> nothing needed reverting because the function was never wired in.
|
||||
>
|
||||
> **Making charge stays fully in scope** — `percentage_pay`,
|
||||
> `makingChargeOffsetPercent`, and wage display on variants and order lines.
|
||||
>
|
||||
> The findings below are retained as evidence for whenever the storefront is
|
||||
> taken up.
|
||||
|
||||
### PRICE-01 — the target computes no product price at all — ⏸️ out of scope
|
||||
|
||||
| Dimension | Reference | Target | Status |
|
||||
|---|---|---|---|
|
||||
@@ -183,15 +195,15 @@ To be filled, in the fix order given in the Phase 1 summary:
|
||||
| Displayed in the product list | `henza_admin/src/views/apps/product/ProductList.vue:283,287,301` — `{{ item.price }}` in three places | no price column | ❌ missing |
|
||||
| Extra percent source | `ConfigStatic['product_price_extra_percent']`, default 7 (`ProductVariant.php:50`) | the ported function defaults to 7 but nothing reads the config row | ❌ missing |
|
||||
|
||||
**Impact.** Every admin screen that shows a product price shows nothing. This is
|
||||
the single largest behavioural gap in the admin panel and it is money-facing, so
|
||||
it is **fix #1**.
|
||||
**Impact (historical).** Every admin screen that would show a product price shows
|
||||
nothing. Under D16 this is storefront behaviour, so it is not a Phase 1 gap.
|
||||
|
||||
**What is already done:** the formula itself is ported and proven — the live
|
||||
version at `:183-190`, not the three superseded variants above it that apply the
|
||||
9% to the whole price (a test asserts the difference: 39,986,000 vs 42,686,000).
|
||||
|
||||
**What remains:** read `product_price_extra_percent` from settings, fetch the
|
||||
**What remains (only if the storefront is ever taken up):** read
|
||||
`product_price_extra_percent` from settings, fetch the
|
||||
current gold price, call `computeVariantPrice`, and surface `price` /
|
||||
`price_with_discount` in `variantRow()` and the product list column.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user