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

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:
Cauê Faleiros
2026-10-26 11:07:00 -03:00
parent 629628a522
commit 88819c3a5f
23 changed files with 211 additions and 210 deletions

View File

@@ -502,7 +502,7 @@ function pintaFolha(){
(x.pdfGrande? '<span class="chipSo">Conferência manual · sem conferência no site</span>'+
'<p class="repTxt">Este PDF tem mais de 150 MB, e o site não confere arquivo desse tamanho: '+
'resíduo de recorte, fundo e resolução ficam para a equipe, que abre antes de imprimir, e o '+
'pedido pode voltar depois de pago. O metro sai pela tabela, <b>'+rs(TABELA[modo])+'</b>. '+
'pedido pode voltar depois de pago. '+
'Exportando em <b>PNG</b>, ou num PDF menor, a conferência sai aqui, antes de pagar.</p>' : '')+
(suspeito? '<p class="avisoF"><b>Este PDF passa do tamanho que o formato comporta.</b> '+
'A especificação para em 508 cm e o seu tem '+n1(x.med.alt)+' cm. '+
@@ -518,14 +518,16 @@ function pintaFolha(){
medida='<span class="repPeso">'+escapeHTML(extDe(x.f.name))+' · '+fmt(x.f.size)+'</span>'+
'<p class="avisoF"><b>Este PDF não pode ser orçado.</b> '+escapeHTML(x.measurementError)+'</p>';
}else{
const teto=TABELA[modo], piso=pisoEscada();
const dif=(x.m>0)? (teto+TAXA_MANUAL-piso)*cobrar(x.m*(x.rep||1)) : 0;
medida='<span class="chipSo">Conferência manual · preço cheio</span>'+
// Só a abertura manual muda o metro (TAXA_MANUAL); a nota não mexe no preço.
const dif=(x.m>0)? TAXA_MANUAL*cobrar(x.m*(x.rep||1)) : 0;
medida='<span class="chipSo">Conferência manual</span>'+
'<p class="repTxt">O navegador não abre '+escapeHTML(extDe(x.f.name))+', então alguém da equipe '+
'confere antes de imprimir e o metro sai pela tabela, <b>'+rs(teto)+'</b>'+
(TAXA_MANUAL? ', mais <b>'+rs(TAXA_MANUAL)+'</b> pela abertura manual' : '')+'. '+
'Exportando em <b>PNG ou PDF</b>, o metro pode cair até <b>'+rs(piso)+'</b>'+
(dif>0.5? ' — <b>'+rs(dif)+' a menos</b> só nesta folha' : '')+'.</p>';
'confere antes de imprimir'+
(TAXA_MANUAL? ' e o metro sai a <b>'+rs(precoMetro()+TAXA_MANUAL)+'</b>, com <b>'+rs(TAXA_MANUAL)+
'</b> pela abertura manual' : '')+'. '+
'Exportando em <b>PNG ou PDF</b>, a conferência sai aqui, antes de pagar'+
(TAXA_MANUAL? ', e o metro fica em <b>'+rs(precoMetro())+'</b>'+
(dif>0.5? ' — <b>'+rs(dif)+' a menos</b> só nesta folha' : '') : '')+'.</p>';
manual='<div class="campo"><label for="comp'+i+'">Comprimento</label>'+
'<span class="un"><input type="number" id="comp'+i+'" min="0.5" max="60" step="0.01" data-comp="'+i+'" '+
'placeholder="0,00" value="'+(x.m? x.m.toFixed(2):'')+'"><i>m</i></span></div>';
@@ -535,7 +537,7 @@ function pintaFolha(){
'<span class="progT">'+textoProgresso(x)+'</span>'
: x.semAnalise
? '<div class="progF"><b>Não conseguimos conferir esta folha.</b> '+escapeHTML(x.semAnalise)+
'. Seguimos com o preço de tabela — se quiser a nota e o desconto, exporte a mesma '+
'. Seguimos sem a nota, e a conferência é feita na mão. Se quiser a nota, exporte a mesma '+
'folha em <b>PNG</b>, que a conferência é bem mais leve.</div>'
: '';
// A small thumbnail made once: the list is rebuilt on every change, and the