Some checks failed
Dropstar's items 15 and 16 (2026-10-21). - an order above 10 m prints 20 cm of proof first; the room checks it and marks "Prova OK", without stopping the order, and without that mark the order cannot reach Finalizado - at checkout, "Quero aprovar uma prova antes de imprimir", for any length: the paid order arrives marked "Aguardando contato" with what to do, and waits for the customer's word on the photo sent by WhatsApp - the card shows Prova / Prova OK, the panel gives the next step, and "Prova a conferir" is a board filter; the designer cannot mark it - the proof is not billed, as Dropstar leans; rounds and which part of the sheet wait for their answer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
1.0 KiB
Python
24 lines
1.0 KiB
Python
"""The print proof (Dropstar, 2026-10-21).
|
|
|
|
An order above 10 m prints 20 cm of proof before the rest, checked by the
|
|
print room without stopping the order. A customer may also ask for a proof at
|
|
checkout, for any length: that order waits for them, marked "Aguardando
|
|
contato", until they approve the photo sent by WhatsApp. Either way the room
|
|
marks "Prova OK" once the proof is checked, and without it the order does not
|
|
reach Finalizado. The proof is not billed (to be confirmed by Dropstar).
|
|
"""
|
|
from decimal import Decimal
|
|
|
|
PROOF_ABOVE_METRES = Decimal('10')
|
|
CUSTOMER_NOTE = ('O cliente pediu uma prova antes de imprimir: mande a foto da prova pelo WhatsApp '
|
|
'e espere o aceite.')
|
|
|
|
|
|
def billed_metres(snapshot):
|
|
return sum((Decimal(str(item.get('billed_metres') or 0)) for item in snapshot.get('items') or []), Decimal(0))
|
|
|
|
|
|
def needs_proof(snapshot):
|
|
"""Whether the order prints a proof first: asked for, or above 10 m."""
|
|
return bool(snapshot.get('proof')) or billed_metres(snapshot) > PROOF_ABOVE_METRES
|