feat: a ready sheet prints at its real size, centred on the film, with the customer's confirmation (Marcus, 2026-12-02)
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 7m55s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m43s
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 7m55s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m43s
Replaces 7111995 (only 57,0 cm entered; a whole order of 56,5-56,9 cm
sheets was refused, DTF-WEB-2C). Marcus's rules, for Arquivo por metro,
Premium (57 cm) and UV (27 cm):
1. A known width up to the film (PNG recording 200 DPI or more, or a PDF
page) enters at its real size, centred, billed by its real height.
2. Narrower: his warning before the cart, confirmation required
(Imprimir no tamanho real / Enviar outro arquivo); recorded in the
Prumo report ("cliente confirmou folha de 35,8 cm no tamanho real") and
shown in the cart and payment summaries.
3. Wider than the film: refused with his message.
4. Unknown width: taken as the film's, DPI from the pixels; 200 or more
with a confirmation, under 200 refused with the artes avulsas hint.
Within 0,1 cm of the film counts as the film. The server checks it all
again at checkout (sheet_width_issue, centred placement, size_confirmed).
Also ops.stretched_sheets: the ready-sheet orders since 16/10 laid out
wider than their real width (number, real width, factor), for Marcus.
Contract: output/revisao/contrato-folha-real.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -213,6 +213,17 @@ function itemParaSalvar(it){
|
||||
}
|
||||
return copia;
|
||||
}
|
||||
// A folha que entra no tamanho real, centralizada no filme: o resumo diz isso
|
||||
// uma vez por folha estreita confirmada.
|
||||
function folhasEstreitas(it){
|
||||
const p=it.production;
|
||||
if(!p || p.film_width_cm==null) return [];
|
||||
const filme=Number(p.film_width_cm);
|
||||
return (p.sources||[]).filter(s=>s.kind==='sheet' &&
|
||||
Number(s.width_cm)<filme-0.1).map(s=>
|
||||
'Folha de '+n1(Number(s.width_cm))+' cm no tamanho real, centralizada no filme de '+
|
||||
String(filme).replace('.',',')+' cm');
|
||||
}
|
||||
// O carrinho junta itens de produtos diferentes e cobra uma vez só.
|
||||
function pintaPedido(){
|
||||
const aPagar = itensAPagar();
|
||||
@@ -242,6 +253,7 @@ function pintaPedido(){
|
||||
'<span class="miniItem">'+(it.mini ? '<img src="'+escapeHTML(it.mini)+'" alt="">' : '<i>'+escapeHTML(it.ext||'')+'</i>')+
|
||||
(it.arquivos>1 ? '<em>+'+(it.arquivos-1)+'</em>' : '')+'</span>'+
|
||||
'<div class="nm2"><b>'+escapeHTML(it.tit)+'</b><span>'+escapeHTML(it.desc)+'</span>'+
|
||||
folhasEstreitas(it).map(l=>'<span>'+l+'</span>').join('')+
|
||||
(semMargem(it)?'<span class="avisoF">O espaço entre as cópias passou a ser de 8 mm. Remova este item e adicione a folha de novo.</span>':'')+'</div>'+
|
||||
'<div class="vl2">'+rs(it.total)+'</div>'+
|
||||
(window.dtfContaAberta?'<button type="button" class="salvaBt" data-salvai="'+i+'"'+
|
||||
@@ -353,7 +365,7 @@ function carrinho(){
|
||||
const sources=(ehFolha()?folhas:artes).map(x=>ehFolha()
|
||||
? {kind:'sheet',width_cm:x.med?.larg||larguraFilme(),length_cm:+(x.m*100).toFixed(4),
|
||||
copies:x.rep||1,rotation_degrees:0,mirrored:false,
|
||||
measurement:x.med?'file':'customer',
|
||||
measurement:x.med?'file':'customer',size_confirmed:!!x.confirmado,
|
||||
// The empty strips cut from the top and the bottom (aplicaCorte).
|
||||
...(x.corte?{trim_top_cm:x.corte.topo,trim_bottom_cm:x.corte.fim}:{})}
|
||||
: fonteDaArte(x));
|
||||
@@ -365,7 +377,8 @@ function carrinho(){
|
||||
for(let copy_index=0;copy_index<source.copies;copy_index++){
|
||||
// MARGEM_FOLHA_CM entre uma cópia e a próxima, nunca depois da última.
|
||||
if(placements.length)y+=MARGEM_FOLHA_CM;
|
||||
placements.push({source_index,copy_index,x_cm:0,y_cm:+y.toFixed(4),
|
||||
placements.push({source_index,copy_index,
|
||||
x_cm:+((larguraFilme()-source.width_cm)/2).toFixed(4),y_cm:+y.toFixed(4),
|
||||
width_cm:source.width_cm,length_cm:source.length_cm,
|
||||
rotation_degrees:0,mirrored:false});
|
||||
y+=source.length_cm;
|
||||
|
||||
Reference in New Issue
Block a user