fix: Atrasados lists production stages and real orders only (front 11)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 4m27s
Build and deploy / Publish images (push) Successful in 1m6s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 4m27s
Build and deploy / Publish images (push) Successful in 1m6s
A delivery is done when it leaves and a test card is not production. Only pickup orders waiting in Finalizado can be late, and the top strip now shows working columns; the finished pickup keeps its card colour and its place in Números.
This commit is contained in:
@@ -245,10 +245,15 @@ def assign_late(c, orders, limits):
|
||||
entered[(str(row['order_id']), row['to_state'])] = row['created_at']
|
||||
now = datetime.now(timezone.utc)
|
||||
for order in orders:
|
||||
if order.get('cancelled_at'):
|
||||
if order.get('cancelled_at') or payments.is_test(order):
|
||||
continue
|
||||
limit = limits.get(order['state'])
|
||||
if not limit or (order['state'] == 'fin' and order.get('picked_up_at')):
|
||||
if not limit:
|
||||
continue
|
||||
# Finalizado only has a pickup deadline; a delivery is done when it
|
||||
# leaves, and a collected order is not waiting for anyone.
|
||||
if order['state'] == 'fin' and (order.get('picked_up_at') or
|
||||
not receipt.is_pickup(order['snapshot'])):
|
||||
continue
|
||||
since = entered.get((str(order['id']), order['state']))
|
||||
if not since and order['state'] == 'fin':
|
||||
|
||||
Reference in New Issue
Block a user