Commit 5d57ceb2 authored by Patrick's avatar Patrick

Clearer basket message if orders are not closed for a delivery point but the...

Clearer basket message if orders are not closed for a delivery point but the customer oder is confirmed
parent 20284e49
......@@ -1062,7 +1062,7 @@ def update_or_create_purchase(customer=None, offer_item_id=None, q_order=None, v
customer_invoice.save()
my_basket(customer_invoice.is_order_confirm_send, order_amount, to_json)
if basket:
basket_message = calc_basket_message(customer, permanence, customer_invoice.status)
basket_message = calc_basket_message(customer, permanence, PERMANENCE_OPENED)
else:
basket_message = EMPTY_STRING
my_order_confirmation(
......
......@@ -62,10 +62,14 @@ def btn_confirm_order_ajax(request):
customer_invoice.save()
to_json = []
my_basket(customer_invoice.is_order_confirm_send, customer_invoice.get_total_price_with_tax(), to_json)
if customer_invoice.delivery is not None:
status = customer_invoice.delivery.status
else:
status = customer_invoice.status
basket_message = calc_basket_message(
customer,
permanence,
PERMANENCE_CLOSED
status
)
my_order_confirmation(
permanence=permanence,
......
......@@ -76,14 +76,14 @@ def delivery_ajax(request):
# IMPORTANT : Set the status of the may be already existing purchase to "Open" so that
# the total_price_with_tax will be correctly calculated on the customer order screen.
Purchase.objects.filter(customer_invoice=customer_invoice).order_by('?').update(status=PERMANENCE_OPENED)
basket_message = calc_basket_message(
customer, permanence, PERMANENCE_OPENED
)
# basket_message = calc_basket_message(
# customer, permanence, PERMANENCE_OPENED
# )
my_order_confirmation(
permanence=permanence,
customer_invoice=customer_invoice,
is_basket=basket,
basket_message=basket_message,
# basket_message=basket_message,
to_json=to_json
)
return HttpResponse(json.dumps(to_json, cls=DjangoJSONEncoder), content_type="application/json")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment