added emergency price

This commit is contained in:
2024-09-26 08:48:37 -04:00
parent d7c809af82
commit c456ef301c
5 changed files with 28 additions and 19 deletions

View File

@@ -518,15 +518,18 @@ def create_a_delivery(user_id):
# 3 = check
# 4 = other
# 5 = unknown
if cash_payment is True:
delivery_payment_method = 0
if card_payment is True:
delivery_payment_method = 1
if card_payment is True and cash_payment is True:
delivery_payment_method = 2
if check_payment is True:
elif cash_payment is True:
delivery_payment_method = 0
elif card_payment is True:
delivery_payment_method = 1
elif check_payment is True:
delivery_payment_method = 3
if other_payment is True:
elif other_payment is True:
delivery_payment_method = 4
else:
delivery_payment_method = 4
@@ -559,14 +562,6 @@ def create_a_delivery(user_id):
card_id_from_customer = None
if customer_wants_fill is True:
customer_fill_up = 1
@@ -620,6 +615,7 @@ def create_a_delivery(user_id):
when_delivered=None,
expected_delivery_date=when_to_deliver,
automatic=get_customer.customer_automatic,
automatic_id=None,
oil_id=get_today_price.id,
supplier_price=get_today_price.price_from_supplier,
customer_price=get_today_price.price_for_customer,