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:
@@ -192,16 +192,24 @@
|
||||
const amount=document.createElement('b'); amount.textContent=value;
|
||||
row.append(name,amount); return row;
|
||||
};
|
||||
const umaCasa = value => Number(value).toFixed(1).replace('.',',');
|
||||
// The sheets of a split (item 17) are one line, as in the cart.
|
||||
const linhas=[];
|
||||
const linhas=[], estreitas=[];
|
||||
for (const item of approved.items) {
|
||||
const grupo=item.split && linhas.find(l=>l.split?.group===item.split.group);
|
||||
if (grupo) { grupo.billed_metres=String(Number(grupo.billed_metres)+Number(item.billed_metres)); grupo.total_cents+=item.total_cents; grupo.folhas++; }
|
||||
else linhas.push({...item,folhas:1});
|
||||
const film=item.production?.film_width_cm;
|
||||
if (film!=null) for (const source of item.production.sources || []) {
|
||||
if (source.kind==='sheet' && Number(source.width_cm) < Number(film)-0.1)
|
||||
estreitas.push('Folha de '+umaCasa(source.width_cm)+' cm no tamanho real, '+
|
||||
'centralizada no filme de '+String(Number(film)).replace('.',',')+' cm');
|
||||
}
|
||||
}
|
||||
const rows = linhas.map(item => linha(
|
||||
(MODOS[item.mode]?.tit || item.mode)+(item.folhas>1?' · '+item.folhas+' folhas':'')+' · '+
|
||||
fmtM(Number(item.billed_metres))+' m', rs(item.total_cents/100)));
|
||||
rows.push(...estreitas.map(texto => linha(texto,'')));
|
||||
const pickup = approved.freight.service === 'pickup';
|
||||
const prazo = approved.freight.days ? ' · até '+approved.freight.days+' dias úteis' : '';
|
||||
rows.push(linha(pickup ? 'Retirada em Franca' : (approved.freight.description || 'Frete')+prazo,
|
||||
|
||||
Reference in New Issue
Block a user