feat: the team registers an order paid outside the site, choosing its origin and payment (Dropstar's rule D-35)
Some checks failed
Build and deploy / Integration suite on a real stack (push) Failing after 3m26s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Has been skipped
Build and deploy / Validate source (push) Successful in 6s
Some checks failed
Build and deploy / Integration suite on a real stack (push) Failing after 3m26s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Has been skipped
Build and deploy / Validate source (push) Successful in 6s
On an approved quote in Cotacoes, Administrador, Gestao and Vendedor pick the origin (Site, Dropflow, Atendimento) and how it was paid (Pix, cartao, dinheiro, credito do cliente), neither preselected, with an optional note. The price is the quote's, the Site's table price. The order is marked paid outside, counts in Numeros, and goes to Tiny like a Site order with the payment named in its internal note; a Dropflow order stays out of Tiny, status updates and cancelling included, until its revenue category exists. Auto-refresh waits while a register form on screen is half filled in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -152,7 +152,10 @@ def run():
|
||||
seller.call(f'/operator/quotes/{uv_q}/discard', {}, expected=403)
|
||||
seller.call(f'/operator/orders/{textil_o}/machine', {'machine_id': None}, expected=403)
|
||||
seller.call(f'/operator/orders/{textil_o}/contact', {'waiting': True, 'note': 'Ligar'}, expected=403)
|
||||
assert seller.call('/operator/me')['can'] == ['view']
|
||||
# The seller registers orders paid outside (D-35); this quote already has
|
||||
# its order, so the answer is 409, past the permission.
|
||||
assert seller.call('/operator/me')['can'] == ['enter', 'view']
|
||||
seller.call(f'/operator/quotes/{uv_q}/register', {'origin': 'atendimento', 'method': 'pix'}, expected=409)
|
||||
# Only the Revisor releases to Finalizado: not even the administrator.
|
||||
admin.call(f'/operator/orders/{uv_o}/move', {'state': 'fin', 'version': printed['version'], 'reason': ''},
|
||||
expected=403)
|
||||
@@ -171,6 +174,7 @@ def run():
|
||||
assert next(u for u in admin.call('/operator/users')['users'] if u['email'] == emails['designer'])['machines'] == []
|
||||
designer = signed_in(emails['designer'])
|
||||
assert set(designer.call('/operator/me')['can']) == {'view', 'produce'}
|
||||
designer.call(f'/operator/quotes/{uv_q}/register', {'origin': 'atendimento', 'method': 'pix'}, expected=403)
|
||||
assert {str(uv_o), str(textil_o)} <= {o['id'] for o in designer.call('/operator/board')['orders']}
|
||||
version = next(o for o in designer.call('/operator/board')['orders'] if o['id'] == str(textil_o))['version']
|
||||
# A correction and back; Arte conferida only with the final approved.
|
||||
@@ -223,7 +227,7 @@ def run():
|
||||
c.execute('''INSERT INTO dtf_local.quotes(id,owner,request_key,request_hash,draft,approved,approved_at)
|
||||
VALUES(%s,%s,%s,'users-fixture',%s,%s,now())''', (asked, owner, uuid4(), Jsonb(content), Jsonb(content)))
|
||||
quote = c.execute('SELECT * FROM dtf_local.quotes WHERE id=%s', (asked,)).fetchone()
|
||||
order, created = payments.create_order(c, quote, {'provider': 'teste', 'id': f'proof-{tag}'})
|
||||
order, created = payments.create_order(c, quote, {'provider': 'teste', 'id': f'proof-{tag}'}, 'site')
|
||||
made.append((asked, order['id']))
|
||||
assert created and order['contact_since'] and order['contact_note'] == proof.CUSTOMER_NOTE, order
|
||||
|
||||
|
||||
Reference in New Issue
Block a user