Yaswanth56 commited on
Commit
e1a78d6
·
verified ·
1 Parent(s): fefa689

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -64,8 +64,16 @@ def rewards(customer_id):
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
 
 
64
  customer = sf.Customer_Login__c.get(customer_id)
65
  points = customer['Reward_Points__c']
66
 
67
+ # Example: Calculate additional details
68
+ total_bill = 100.0 # Example total bill amount
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