feat: Ajuste Fino priced per art, with the offer under each Prumo warning (Marcus 10/11, point 1)
The designer treatment becomes Ajuste Fino, priced per art with a batch band set in the Site tab (e.g. R$ 9,90, from 10 arts R$ 6,90). Under each art the Prumo warns about, the Site offers 'Quer que um designer resolva? Ajuste Fino'; the cart keeps 'Ajuste Fino em todas as artes'. The server counts the chosen arts, Tiny gets the line with that quantity, the card shows 'Ajuste Fino · N artes'. Old carts asking the treatment for the whole order keep working. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -142,9 +142,9 @@ def quote_view(c, row, order=None, attempt=None, known=False):
|
||||
items = (row['approved'] or row['draft']).get('items') or []
|
||||
treatment = (row['approved'] or {}).get('treatment')
|
||||
if not treatment and (row['draft'] or {}).get('treatment'):
|
||||
offer = catalog.current(c)['tratamento']
|
||||
if offer['enabled'] and offer['unit_cents'] > 0:
|
||||
treatment = {'cents': offer['unit_cents'], 'hours': 24}
|
||||
from .cart_pricing import treatment_price
|
||||
treatment = treatment_price(items, (row['draft'] or {}).get('treatment'),
|
||||
catalog.current(c)['tratamento']) or None
|
||||
return {'id': row['id'], 'created_at': row['created_at'],
|
||||
'draft': row['draft'], 'approved': row['approved'],
|
||||
'expires_at': expires_at.isoformat() if expires_at else None,
|
||||
|
||||
Reference in New Issue
Block a user