Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,16 +64,8 @@ def rewards(customer_id):
|
|
64 |
customer = sf.Customer_Login__c.get(customer_id)
|
65 |
points = customer['Reward_Points__c']
|
66 |
|
67 |
-
#
|
68 |
-
|
69 |
-
discount = total_bill * 0.10 # 10% discount if applicable
|
70 |
-
gst = total_bill * 0.18 # GST is 18% of the total bill
|
71 |
-
final_bill = total_bill - discount + gst # Final bill after discount and GST
|
72 |
-
|
73 |
-
# Render the rewards page with the additional details
|
74 |
-
return render_template('rewards.html', points=points, total_bill=total_bill,
|
75 |
-
discount=discount, gst=gst, final_bill=final_bill)
|
76 |
-
|
77 |
except Exception as e:
|
78 |
return f"Error fetching rewards: {e}"
|
79 |
|
|
|
64 |
customer = sf.Customer_Login__c.get(customer_id)
|
65 |
points = customer['Reward_Points__c']
|
66 |
|
67 |
+
# Render the rewards page
|
68 |
+
return render_template('rewards.html', points=points, customer_id=customer_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
except Exception as e:
|
70 |
return f"Error fetching rewards: {e}"
|
71 |
|