feat: 8 mm of clear film between the copies and sheets of a ready sheet, billed (Marcus, 2026-11-26)
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 7m43s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Successful in 1m23s
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 7m43s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Successful in 1m23s
The Site stacked a ready sheet's copies with nothing between them (#81's were 0,3 mm apart). Now 8 mm separates each copy and each sheet from the next, and the metres include it, as Marcus confirmed. A new cart without the gap is refused with the reason; a quote made before is still reviewed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -166,6 +166,24 @@ class Split(StrictModel):
|
||||
|
||||
|
||||
UV_MODES = ('uvfile', 'uv')
|
||||
SHEET_MODES = ('file', 'uvfile', 'premium')
|
||||
# Clear film between the copies of a ready sheet, and between its sheets, for
|
||||
# cutting; billed like the rest (Marcus, 2026-11-26).
|
||||
SHEET_GAP_CM = Decimal('0.8')
|
||||
SHEET_GAP_CHANGED = ('O espaço entre as cópias da folha pronta passou a ser de 8 mm. '
|
||||
'Remova este item do carrinho e adicione de novo.')
|
||||
|
||||
|
||||
def check_sheet_gaps(items):
|
||||
"""A ready sheet's copies and sheets are SHEET_GAP_CM apart. Only a new
|
||||
cart is held to it: a quote made before still goes through review."""
|
||||
for item in items:
|
||||
if item.mode not in SHEET_MODES:
|
||||
continue
|
||||
placements = sorted(item.production.placements, key=lambda p: p.y_cm)
|
||||
for above, below in zip(placements, placements[1:]):
|
||||
if below.y_cm < above.y_cm + above.length_cm + SHEET_GAP_CM - Decimal('0.02'):
|
||||
raise ValueError(SHEET_GAP_CHANGED)
|
||||
ONE_MACHINE = ('Esse produto é impresso em outra máquina e precisa de um pedido separado. '
|
||||
'Finalize este pedido e faça um novo com ele.')
|
||||
|
||||
@@ -323,6 +341,7 @@ class QuoteRequest(StrictModel):
|
||||
def splits_complete(self):
|
||||
check_splits(self.items)
|
||||
check_one_machine(self.items)
|
||||
check_sheet_gaps(self.items)
|
||||
return self
|
||||
|
||||
@model_validator(mode='after')
|
||||
|
||||
Reference in New Issue
Block a user