| Line 443... |
Line 443... |
| 443 |
__push_collection_to_hotspot(order, "SALE", True)
|
443 |
__push_collection_to_hotspot(order, "SALE", True)
|
| 444 |
|
444 |
|
| 445 |
else:
|
445 |
else:
|
| 446 |
order.status = OrderStatus.COD_VERIFICATION_PENDING
|
446 |
order.status = OrderStatus.COD_VERIFICATION_PENDING
|
| 447 |
content = "<html><body>"
|
447 |
content = "<html><body>"
|
| 448 |
content += "<h2>Order Id: " + str(order.id) + "</h2>"
|
448 |
content += "<h4>Order Id: " + str(order.id) + "</h4>"
|
| 449 |
content += "<h2>Product: " + str(order.lineitems[0]) + "</h2>"
|
449 |
content += "<h4>Product: " + str(order.lineitems[0]) + "</h4>"
|
| 450 |
content += "<h2>Min Price: " + str(sourcePricing.minPrice) + "</h2>"
|
450 |
content += "<h4>Min Price: " + str(sourcePricing.minPrice) + "</h4>"
|
| 451 |
content += "<h2>Max Price: " + str(sourcePricing.maxPrice) + "</h2>"
|
- |
|
| 452 |
content += "<h2>Recommended Price: " + str(sourcePricing.recommendedPrice) + "</h2>"
|
451 |
content += "<h4>Recommended Price: " + str(sourcePricing.recommendedPrice) + "</h4>"
|
| 453 |
content += "<h2>Approval Requested for Price: " + str(order.total_amount) + "</h2>"
|
452 |
content += "<h2>Approval Requested for Price: " + str(order.total_amount) + "</h2>"
|
| 454 |
content += "<h3>Please click on link below to approve the order</h3>"
|
- |
|
| 455 |
content += "<a href='http://support.shop2020.in:8080/Support/price-approval?xszbg=" + base64.b64encode(str(order.id)) + "'>Click here for Approval</a>"
|
453 |
content += "<h2><a href='http://support.shop2020.in:8080/Support/price-approval?xszbg=" + base64.b64encode(str(order.id)) + "'>Click here for Approval</a></h2>"
|
| 456 |
content += "<br><br></body></html>"
|
454 |
content += "<br><br></body></html>"
|
| 457 |
store = get_hotspot_store(order.storeId, "")
|
455 |
store = get_hotspot_store(order.storeId, "")
|
| 458 |
helper_client = HelperClient().get_client()
|
456 |
helper_client = HelperClient().get_client()
|
| 459 |
helper_client.saveUserEmailForSending(store.approvalEmail.split(';'), "", "Price approval requested for " + str(order.lineitems[0]) + " in store " + store.hotspotId , content, str(transaction_id), "PriceApproval", [], [])
|
457 |
helper_client.saveUserEmailForSending(store.approvalEmail.split(';'), "", "Price approval requested for " + str(order.lineitems[0]) + " in store " + store.hotspotId , content, str(transaction_id), "PriceApproval", [], [])
|
| 460 |
session.commit()
|
458 |
session.commit()
|
| Line 2795... |
Line 2793... |
| 2795 |
order_string = "<orderno>" + str(order.id) + "</orderno>"
|
2793 |
order_string = "<orderno>" + str(order.id) + "</orderno>"
|
| 2796 |
collection_type = "<Type>" + type + "</Type>"
|
2794 |
collection_type = "<Type>" + type + "</Type>"
|
| 2797 |
payment_mode = get_order_attribute_value(order.id, "PAYMENT_MODE")
|
2795 |
payment_mode = get_order_attribute_value(order.id, "PAYMENT_MODE")
|
| 2798 |
if type == "SALE":
|
2796 |
if type == "SALE":
|
| 2799 |
if storeOrder:
|
2797 |
if storeOrder:
|
| 2800 |
amount = order.advanceAmount
|
2798 |
amount = int(order.advanceAmount)
|
| - |
|
2799 |
ts = order.created_timestamp
|
| 2801 |
else:
|
2800 |
else:
|
| 2802 |
amount = int(order.total_amount-order.gvAmount)
|
2801 |
amount = int(order.total_amount-order.gvAmount)
|
| 2803 |
ts = order.delivery_timestamp
|
2802 |
ts = order.delivery_timestamp
|
| 2804 |
if type == "SALE RETURN":
|
2803 |
if type == "SALE RETURN":
|
| 2805 |
if storeOrder:
|
2804 |
if storeOrder:
|
| 2806 |
amount = -order.advanceAmount
|
2805 |
amount = -int(order.advanceAmount)
|
| 2807 |
else:
|
2806 |
else:
|
| 2808 |
amount = -int(order.total_amount-order.gvAmount)
|
2807 |
amount = -int(order.total_amount-order.gvAmount)
|
| 2809 |
ts = order.refund_timestamp
|
2808 |
ts = order.refund_timestamp
|
| 2810 |
if payment_mode == "Cash":
|
2809 |
if payment_mode == "Cash":
|
| 2811 |
cash_string = "<cash>" + str(amount) + "</cash>"
|
2810 |
cash_string = "<cash>" + str(amount) + "</cash>"
|