سامانه صدور فاکتور و حسابداری

docs(phase0): archive exact-SHA F0-04 release and open real-print gate

davoodmehraban89 committed Oct 12, 2026 at 10:00 UTC 4049f1cbea551ae417e03dbc5b16413618d00718
1 file changed +9
PROJECT_STATE.md
+9
@@ -293,3 +293,12 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
293 - **Accountable:** implementation/print with independent QA. **Narrow authorized scope:** remove display watermark only; add browser regression asserting clean formal draft and a pro-forma/non-formal printed page still contains all invoice content, amounts, and unchanged financial draft status. Preserve `invoiceDocumentStatus` / posting gate, electronic taxpayer safeguards, numeric formatting, pagination, dimensions, signature areas, invoice saving/editing and report status. Change `index.html` print asset cache key to force deployment refresh. Add regression to existing Quality suite, PR gates and gated deployment verification.
294 - **Forbidden:** changing stored draft/posted status, auto-posting, RLS/Auth/schema/roles, financial data, Supabase, legal/tax declarations, closing Phase 0 by inference. Recheck with owner's real printed invoice remains separate F0-04 authenticated acceptance gate. Revert the targeted PR for rollback if necessary.
295 - **State:** REPRODUCED IN SOURCE / IMPLEMENTATION STARTING. Phase 0 acceptance stays OPEN.
296 +
297 +
298 +### 2026-10-12 F0-04 draft-watermark removal — RELEASED / PHASE 0 ACCEPTANCE STILL OPEN
299 +- **Owner real hardcopy evidence:** Printed sale invoice visibly showed faint diagonal `پیش‌نویس — غیرقطعی` overlay, requested complete clean invoice print without the overlay for ordinary invoice kinds while Phase 0 acceptance continues. Isolated root cause `js/print.js` `renderAndPrintDirect()` prepended `draftMark` when source document status was draft. **No accounting-status change or implied finalization was authorized.**
300 +- **Implemented narrowly:** `js/print.js` stages the unchanged complete invoice HTML directly without the conditional draft overlay; `index.html` cache key now `js/print.js?v=20261012-clean-invoice-print-v1`. Separate purchase print route never had this overlay. Taxpayer electronic-document print still refuses unfinalized formal documents; `invoiceDocumentStatus`, posting authorization, journal and ledger remain unchanged.
301 +- Browser regressions strengthened: `scripts/accounting-document-workflow.spec.js` checks formal draft print preview and isolated iframe have invoice number/amount and **no watermark**, while source remains draft with zero vouchers; `scripts/phase0-invoice-persistence.spec.js` checks pre-invoice printable iframe and preview have no overlay. Existing `scripts/posting-idempotency-check.mjs` adapted from outdated positive watermark assertion to **negative overlay contract** while preserving draft/posted and explicit financial posting invariants. One initial PR-head static-quality run failed solely because of the old watermark expectation; corrected assertion then retested cleanly rather than weakening accounting safety.
302 +- **PR #90 merged** to protected `main` SHA **`8a0023c53f0c14b0063ab771fdb3669a05997387`**. Final PR head `72a69b372ef59ffbb7dddebf81d64304b3559b04`: Quality `38212287209` SUCCESS (83/83 Chromium; all three isolated database jobs PASS), Security `38212287223` SUCCESS. Exact-SHA protected-main Quality **`38212519911` SUCCESS** (static job `114689669548`, **83/83 browser tests in 53.2s**, Golden accounting and draft/posted contract PASS; three isolated DB jobs PASS), Security **`38212519908` SUCCESS**, Release **`38212644579` SUCCESS**, gated Pages **`38212680498` SUCCESS**. Duplicate Release `38212635242` canceled and Pages `38212667827` skipped; these are NOT successful evidence.
303 +- **Independent published-asset check:** authorized remote PC `DESKTOP-71SJ63M` GET `https://factoreasy.ir/?phase0print=20261012b` included new cache key (**True**); GET `https://factoreasy.ir/js/print.js?v=20261012-clean-invoice-print-v1` did **not** contain old `draftMark` (**True**) and contained clean `stageInvoicePrint(containerHtml,spec)` call (**True**). This establishes deployed asset parity and code, **not** physical print output on owner's device.
304 +- **F0-04 status:** **DEFECT FIXED / RELEASED / CONTROLLED QA PASSED**, **OWNER-AUTHENTICATED REAL REPRINT NOT VERIFIED**. The user should refresh/hard-reload, reprint an existing saved invoice without altering/posting any source, and confirm visually the overlay is gone. Other F0-01/02/03/07 acceptance gates remain unverified, F0-05 synthetic 1200+ selector gate passed but owner context open, F0-06/08 partially audited. **PHASE 0 OPEN / NOT OWNER-ACCEPTED**. No Supabase/schema/Auth/RLS/roles/ledger/payment changes. Rollback: revert PR #90 and redeploy previous gated asset; acceptance docs-only update is independently revertible.