feat: a pasted list in Montar, with the reference printed under each stamp and the skipped lines in the report (Rodada 5, C4)
One line per item, code size quantity reference. Lines with errors are listed with the line and the reason and mounted only after "Montar sem essas N linhas". A reference is drawn 3 mm high right under the stamp, with 1 cm to the next piece on that side; the list is always Interno and the Prumo report names the skipped lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -146,7 +146,9 @@ def run():
|
||||
|
||||
# Interno is refused while Gestão has not completed the customer.
|
||||
stamp = upload_stamp(shipping)
|
||||
interno = {'kind': 'interno', 'items': [montador_item(stamp)]}
|
||||
batch = {'lines': 2, 'skipped': [
|
||||
{'line': 5, 'text': 'NX.999 Z 1 REF', 'reason': 'tamanho não existe na tabela'}]}
|
||||
interno = {'kind': 'interno', 'items': [montador_item(stamp)], 'batch': batch}
|
||||
refused = shipping.call('/operator/montador/orders', {'request_key': str(uuid4()), **interno},
|
||||
expected=409)
|
||||
assert refused['detail'] == INTERNAL_MISSING, refused
|
||||
@@ -164,6 +166,7 @@ def run():
|
||||
assert order_interno['state'] == 'rec' and order_interno['origin'] == 'dropflow', order_interno
|
||||
assert order_interno['snapshot']['kind'] == 'interno', order_interno['snapshot'].get('kind')
|
||||
assert order_interno['snapshot']['customer']['cnpj'] == '11222333000181', order_interno['snapshot']
|
||||
assert order_interno['snapshot']['batch'] == batch, order_interno['snapshot'].get('batch')
|
||||
payment = order_interno['payment']
|
||||
assert (payment['provider'], payment['method'], payment['status']) == ('manual', 'interno', 'paid'), payment
|
||||
with db.connect() as c:
|
||||
@@ -213,6 +216,12 @@ def run():
|
||||
designer.call('/operator/montador/orders', {'request_key': str(uuid4()), **venda}, expected=403)
|
||||
shipping.call('/operator/montador/orders', {'request_key': str(uuid4()), 'kind': 'interno',
|
||||
'items': [montador_item(stamp, 'file')]}, expected=422)
|
||||
# A pasted list only becomes an Interno order.
|
||||
refused = seller.call('/operator/montador/orders', {'request_key': str(uuid4()), 'kind': 'venda',
|
||||
'customer': venda_customer,
|
||||
'items': [montador_item(venda_stamp)],
|
||||
'batch': batch}, expected=422)
|
||||
assert refused['detail'] == 'A lista colada vira sempre pedido Interno.', refused
|
||||
|
||||
# Venda with Envio: the Site's freight, re-quoted by the server.
|
||||
destination = {'recipient': 'Maria Souza', 'street': 'Rua das Flores', 'number': '100',
|
||||
|
||||
Reference in New Issue
Block a user