added description
This commit is contained in:
@@ -504,11 +504,32 @@ def create_a_delivery(user_id):
|
||||
dispatcher_notes_taken = request.json["dispatcher_notes_taken"]
|
||||
prime_info = request.json["prime"]
|
||||
same_day_info = request.json["same_day"]
|
||||
delivery_driver_id = request.json["driver_employee_id"]
|
||||
|
||||
|
||||
card_payment = request.json["credit"]
|
||||
cash_payment = request.json["cash"]
|
||||
check_payment = request.json["check"]
|
||||
other_payment = request.json["other"]
|
||||
|
||||
# 0 = cash only
|
||||
# 1 = credit only
|
||||
# 2 = credit /cash
|
||||
# 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:
|
||||
delivery_payment_method = 3
|
||||
if other_payment is True:
|
||||
delivery_payment_method = 4
|
||||
|
||||
|
||||
delivery_driver_id = request.json["driver_employee_id"]
|
||||
|
||||
get_driver = (db.session
|
||||
.query(Employee_Employee)
|
||||
@@ -537,20 +558,15 @@ def create_a_delivery(user_id):
|
||||
else:
|
||||
card_id_from_customer = None
|
||||
|
||||
# 0 = cash only
|
||||
# 1 = credit only
|
||||
# 2 = credit /cash
|
||||
# 3 unknown
|
||||
|
||||
if cash_payment is True and card_payment is False:
|
||||
delivery_payment_method = 0
|
||||
elif card_payment is True and cash_payment is False:
|
||||
delivery_payment_method = 1
|
||||
|
||||
elif card_payment is True and cash_payment is True:
|
||||
delivery_payment_method = 2
|
||||
else:
|
||||
delivery_payment_method = 3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if customer_wants_fill is True:
|
||||
customer_fill_up = 1
|
||||
|
||||
Reference in New Issue
Block a user