feat: one price per product; the grade is shown but no longer prices
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m58s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m11s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m58s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m11s
Dropstar asked on 2026-10-23 to drop the five-band ladder by grade: textile R$ 19,90 a ready sheet and R$ 21,90 loose art, UV R$ 79,90 and R$ 89,90. - the server charges PRICES (app/core/pricing.py) whatever the grade; the grade is still validated and kept with the item, and discount_cents is gone - a file opened by hand pays the product's price plus MANUAL_FILE_EXTRA_CENTS - the Site's PRECO replaces FAIXAS, TABELA and MONTAGEM; the top chip, the home example, the product cards, the selector and the price table read it (data-preco), so no page still says "a partir de R$ 14,90" - no "Desconto pela nota", ladder, "cai até" or "sai mais barato" anywhere; the buy box shows "Nota da arte" on its own line, the 96 DPI refusal and the resolution warning stay - the review reason "Nota informada sem análise da arte" is removed: it only stopped a discount. The server still checks the grade against the files, so the grade shown on the Kanban and in Tiny stays honest - the Tiny probe's test order uses the single price - docs/CONTEXT.md: Commercial rules and Still to do Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -143,14 +143,32 @@ taxes, and payment-provider fees before presenting a commercial quote.
|
||||
|
||||
## Commercial rules
|
||||
|
||||
The existing rules in `web/index.html` are approved as the current source of
|
||||
truth. Do **not** redesign, simplify, or change prices, discounts, minimums,
|
||||
rounding, or product modes without explicit approval.
|
||||
The rules in `web/index.html` and `app/core/pricing.py` are approved as the
|
||||
current source of truth. Do **not** redesign, simplify, or change prices,
|
||||
minimums, rounding, or product modes without explicit approval.
|
||||
|
||||
The current site contains four product modes, quality-based price tiers (to be
|
||||
replaced by a single price per product, see "Still to do" below),
|
||||
artwork-ready discounts, separate assembly charges for loose artwork, a
|
||||
one-metre minimum, and ten-centimetre billing rounding.
|
||||
The Site has four product modes, each with one price per metre (Dropstar,
|
||||
2026-10-23, live in the code since 2026-10-26). It replaced the five-band
|
||||
ladder by grade, its "a partir de R$ 14,90" and the separate assembly charge
|
||||
for loose artwork:
|
||||
|
||||
| Product | Ready sheet | Loose artwork |
|
||||
|---|---:|---:|
|
||||
| DTF textile, 57 cm | R$ 19,90 | R$ 21,90 |
|
||||
| UV sticker, 28,5 cm | R$ 79,90 | R$ 89,90 |
|
||||
|
||||
The grade (nota) is still computed and shown, to the customer, on the Kanban
|
||||
and in Tiny's item note: it explains the file and no longer changes the price.
|
||||
Artwork below 96 DPI is still refused, and a resolution warning must still be
|
||||
acknowledged. The server still recomputes the grade from the files at checkout
|
||||
(`app/grade_check.py`) and holds for review a cart whose grade the files do not
|
||||
support, so the grade shown stays honest; the review reason "Nota informada sem
|
||||
análise da arte" existed only to stop a discount and was removed. One-metre
|
||||
minimum and ten-centimetre billing rounding. The prices are `PRECO` in
|
||||
`web/site-config.js` and `PRICES` in `app/core/pricing.py`, and
|
||||
`tests/test_pricing.py` checks they agree; every price on the Site's pages (top
|
||||
chip, home example, product cards, product selector, price table) is filled
|
||||
from `PRECO` through `data-preco`.
|
||||
|
||||
Customers buy with a CPF (a person) or a CNPJ (a company), check digits
|
||||
validated on both sides. The value keeps the `cnpj` key in orders, quotes and
|
||||
@@ -158,7 +176,7 @@ accounts; Tiny gets a CPF contact as `tipoPessoa` F, Mercado Pago the matching
|
||||
identification type, and only CNPJs are looked up in the company registry.
|
||||
|
||||
The browser may display the calculation, but production payment creation must
|
||||
recalculate and validate all price, quantity, freight, and discount values on
|
||||
recalculate and validate all price, quantity, and freight values on
|
||||
the server. Client-provided totals are never authoritative.
|
||||
|
||||
Normal JPG/PNG uploads are individual artwork by default, including when uploaded
|
||||
@@ -166,14 +184,17 @@ from the by-metre panel. They use the existing loose-artwork editor, printed
|
||||
width, quantity, and live packing canvas; packed height determines metres.
|
||||
Customers uploading an already assembled film-width image must explicitly select
|
||||
the ready-sheet option before uploading. PDF and manual-format ready sheets keep
|
||||
their existing workflow. These models retain their separate approved price tiers;
|
||||
their existing workflow. These models keep their separate prices;
|
||||
image dimensions alone must never classify a normal artwork as a finished sheet.
|
||||
|
||||
A finished sheet someone must open by hand (CDR, AI, PSD, TIFF, or a length the
|
||||
customer typed) pays the top of the ladder plus `MANUAL_FILE_EXTRA_CENTS` per
|
||||
customer typed) pays the product's price plus `MANUAL_FILE_EXTRA_CENTS` per
|
||||
metre (2026-10-13, asked at the 7 October meeting to steer customers to PNG).
|
||||
It defaults to 0; the amount is the client's to set. The Site reads it from
|
||||
`/api/session` and shows it before checkout; `app/core/pricing.py` charges it.
|
||||
The production stack sets it to 200, R$ 2,00 a metre (Dropstar, 2026-10-23);
|
||||
a value set in Portainer overrides it, and it is 0 locally and in CI. The
|
||||
amount is the client's to set. The Site reads it from `/api/session` and shows
|
||||
it before checkout (product page, help text, price table);
|
||||
`app/core/pricing.py` charges it.
|
||||
|
||||
## Freight
|
||||
|
||||
@@ -373,11 +394,10 @@ mirror stays, the designer does not move to the print queue, and Aguardando
|
||||
contato has no deadline of its own. There is no videocall: open points are
|
||||
settled in writing.
|
||||
|
||||
Done on 2026-10-26: the single price per product Dropstar asked for on
|
||||
2026-10-23 (see Commercial rules), on the Site and the server.
|
||||
|
||||
Still to do (2026-10-26):
|
||||
- Single price per product, asked by Dropstar on 2026-10-23 (not started):
|
||||
ready sheet R$ 19,90 and loose art R$ 21,90 (textile), R$ 79,90 and R$ 89,90
|
||||
(UV). The grade stays on screen but no longer sets the price. Every "a
|
||||
partir de R$ 14,90", the price table and the home example change with it.
|
||||
- The DTF number in Tiny's `numeroPedidoEcommerce` (today it is the purchase
|
||||
order, `numeroOrdemCompra`); confirm at the supervised Tiny test order.
|
||||
- Waiting on Dropstar: the DTF SITE category's numeric id (CATEGORY in
|
||||
|
||||
@@ -847,6 +847,8 @@ print-file evidence still need correction before this item can close.
|
||||
where a server-side packer (3.2) has to agree, which was the point of splitting.
|
||||
- `[ ]` 5.7 — Commercial rules duplicated between `FAIXAS` (JS) and `TIERS` (Python)
|
||||
`(F26)`. `test_pricing` guards parity; generate one from the other instead.
|
||||
2026-10-26: one price per product now, `PRECO` (JS) and `PRICES` (Python);
|
||||
`test_pricing` still guards parity.
|
||||
- `[ ]` 5.11 — Nothing tests the schema against an empty database. The 4.1 indexes
|
||||
were added next to the existing one, which sits before the tables they name, so
|
||||
`CREATE INDEX ... ON dtf_local.order_files` ran before that table existed. Every
|
||||
|
||||
Reference in New Issue
Block a user