|
|
@@ -112,8 +112,8 @@ async def printer_order(order: OrderWeb, current_user: User = Depends(get_curren
|
|
|
|
|
|
for item, product in zip(items, products):
|
|
|
try:
|
|
|
- # Si es dia de promo
|
|
|
- if time.localtime().tm_wday + 1 == product.promo_day and product.promo_id:
|
|
|
+ # Si es dia de promo y es menos de las 8 pm
|
|
|
+ if time.localtime().tm_wday + 1 == product.promo_day and product.promo_id and time.localtime().tm_hour < 20:
|
|
|
logger.info(f"Applying promotion for product {product.id} on table {table}")
|
|
|
fudo_product = add_product_to_fudo(product.promo_id, item.quantity, table)
|
|
|
|