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:
@@ -49,17 +49,17 @@ def run():
|
||||
|
||||
refused = client.call('/quotes', quote_body(item, False, mail), expected=422)
|
||||
assert refused['detail'] == ('Sua arte tem nota 50: para imprimir com qualidade, '
|
||||
'o tratamento pelo designer é obrigatório neste pedido.'), refused
|
||||
'o Ajuste Fino é obrigatório neste pedido.'), refused
|
||||
|
||||
made = client.call('/quotes', quote_body(item, True, mail))
|
||||
quote_id = made['id']
|
||||
assert made['status'] == 'approved', made
|
||||
approved = client.call('/quotes/' + quote_id)['approved']
|
||||
assert approved['grade_flags'] == {'aviso': 50, 'tratamento': 50}, approved
|
||||
assert approved['treatment']['cents'] == 1000, approved
|
||||
assert approved['treatment'] == {'cents': 1000, 'hours': 24, 'arts': 1,
|
||||
'unit_cents': 1000}, approved
|
||||
assert approved['total_cents'] == 9990, approved
|
||||
print('PASS: the grade rule requires the designer treatment and flags the order'
|
||||
' with the worst grade')
|
||||
print('PASS: the grade rule requires Ajuste Fino and flags the order with the worst grade')
|
||||
finally:
|
||||
if rules_set:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user