Skip to content

Commit 5044cf4

Browse files
chore: 📖 docs updated and latest screenshot added
1 parent 31c01c7 commit 5044cf4

File tree

11 files changed

+81
-33
lines changed

11 files changed

+81
-33
lines changed

README.md

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
# Gold Silver Billing
22

3-
![Homepage](/images/homepage.png)
3+
![Homepage](/images/app.png)
44

55
## Our Mission
66

77
Our mission is to simplify the process of calculating gold prices for jewellers and customers alike. We aim to provide a user-friendly tool that allows for accurate and efficient calculations, ensuring transparency and trust in every transaction.
88

9+
## Features
10+
11+
- Real-time Price Calculation
12+
- Transaction History
13+
- Multi Level Authentication
14+
- User-friendly Interface
15+
- Customizable Charges
16+
- Responsive Design
17+
- Secure Data Handling
18+
- Business Customization
19+
920
## Demo
1021

1122
Demo is live on the the belows servers.
1223

13-
- [Render(Server 1)](https://goldsilverbilling.onrender.com/)
1424
- [Railway(Server 2)](https://goldsilverbilling-production.up.railway.app/)
25+
- [Render(Server 1)](https://goldsilverbilling.onrender.com/)
1526

1627
## Building and Running the Docker Container
1728

@@ -30,18 +41,59 @@ docker run -p 5000:5000 goldsilverbilling
3041

3142
## Product Screenshots
3243

44+
### Homepage
45+
46+
![Homepage](/images/homepage.png)
47+
48+
### Admin Dashboard
49+
50+
![Admin Dashboard](/images/admin_dashboard.png)
51+
52+
### Gold Calculator
53+
3354
![Gold Calculator](/images/gold_calculator.png)
3455

35-
![Gold Home Page](/images/bill_page.png)
56+
### System Settings
57+
58+
![System Settings](/images/system_setting.png)
3659

60+
### Transaction History
61+
62+
![Transaction History](/images/transaction_history.png)
3763

3864
## Improvements
3965

40-
- User Authentication: Add a login system to secure sensitive data.
41-
- Data Persistence: Store historical data for future reference.
42-
- API Integration: Fetch real-time gold/silver prices.
43-
- Multi-Currency Support: Allow conversions for different currencies.
44-
- Responsive Design: Enhance mobile usability.
45-
- Advanced Analytics: Provide reports or graphs based on past transactions.
46-
- Multi-Language Support: Cater to a broader audience by including multiple languages.
47-
- Error Handling: Implement robust validation and error messages for user inputs.
66+
| Improvement | Type | Details | Implemented |
67+
|------------------------|-----------------------|-------------------------------------------------------------------------------------------|--------------|
68+
| User Authentication | Security | Add a login system to secure sensitive data. | ☑ |
69+
| Data Persistence | Functionality | Store historical data for future reference. | ☑ |
70+
| Multi-Currency Support | Functionality | Allow conversions for different currencies. | ☑ |
71+
| Responsive Design | User Experience | Enhance mobile usability by optimizing the layout and design for smaller screens. | ☑ |
72+
| Error Handling | Functionality | Implement robust validation and error messages for user inputs to improve user experience. |☑ |
73+
| API Integration | Integration | Fetch real-time gold/silver prices from external APIs. | :x: |
74+
| Advanced Analytics | Functionality | Provide reports or graphs based on past transactions for better insights. | :x: |
75+
| Multi-Language Support | User Experience | Cater to a broader audience by including multiple languages for the user interface. | :x: |
76+
77+
78+
## Author
79+
80+
- [@codeperfectplus](https://github.com/codeperfectplus)
81+
82+
## License
83+
84+
This project is open source and available under the [MIT License](LICENSE).
85+
86+
## Acknowledgments
87+
88+
- [Font Awesome](https://fontawesome.com/)
89+
- [Bootstrap](https://getbootstrap.com/)
90+
- [Python](https://www.python.org/)
91+
- [Flask](https://flask.palletsprojects.com/)
92+
- [Render](https://render.com/)
93+
- [Railway](https://railway.app/)
94+
95+
## Contact
96+
97+
For any queries or feedback, please feel free to reach out to us at [[email protected]](mailto:[email protected]).
98+
99+
---

app.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ def load_config() -> dict:
4646

4747
app.config.update(load_config())
4848

49-
# Define the database models
49+
currency_to_symbol_dict = {
50+
"INR" : "₹",
51+
"USD" : "$ ",
52+
"EUR" : "€ ",
53+
"GBP" : "£ ",
54+
"JPY" : "¥ ",
55+
"AUD" : "A$ ",
56+
}
5057

5158

5259
class GoldTransaction(db.Model):
@@ -147,16 +154,6 @@ def inject_theme():
147154
# Gold calculator route
148155
@app.route('/gold-calculator', methods=['GET', 'POST'])
149156
def gold_calculator():
150-
151-
currency_to_symbol_dict = {
152-
"INR" : "₹ ",
153-
"USD" : "$ ",
154-
"EUR" : "€ ",
155-
"GBP" : "£ ",
156-
"JPY" : "¥ ",
157-
"AUD" : "A$ ",
158-
}
159-
160157
current_currency = Settings.query.first().currency
161158
currency_symbol = currency_to_symbol_dict.get(current_currency, '$')
162159
if request.method == 'POST':
@@ -224,6 +221,8 @@ def gold_calculator():
224221
# Silver calculator route
225222
@app.route('/silver-calculator', methods=['GET', 'POST'])
226223
def silver_calculator():
224+
current_currency = Settings.query.first().currency
225+
currency_symbol = currency_to_symbol_dict.get(current_currency, '$')
227226
if request.method == 'POST':
228227
try:
229228
weight = float(request.form['weight'])
@@ -264,7 +263,9 @@ def silver_calculator():
264263
weight=weight,
265264
price_per_gram=silver_price_per_gram,
266265
purity=silver_purity,
267-
config=app.config)
266+
config=app.config,
267+
current_currency=current_currency,
268+
currency_symbol=currency_symbol)
268269
except ValueError as e:
269270
logging.error(f"ValueError in silver calculator: {str(e)}")
270271
flash(f"Input error: {str(e)}", 'error')
@@ -279,7 +280,9 @@ def silver_calculator():
279280
price_per_gram=silver_price_per_gram,
280281
service_charge=silver_service_charge,
281282
tax=silver_tax,
282-
config=app.config)
283+
config=app.config,
284+
current_currency=current_currency,
285+
currency_symbol=currency_symbol)
283286

284287
@app.route('/history', methods=['GET'])
285288
@login_required

images/admin_dashboard.png

72.5 KB
Loading

images/app.png

30.7 KB
Loading

images/bill_page.png

-198 KB
Binary file not shown.

images/gold_calculator.png

27.2 KB
Loading

images/homepage.png

-173 KB
Loading

images/system_setting.png

44.9 KB
Loading

images/transaction_history.png

61.3 KB
Loading

templates/homepage.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ <h1>Welcome to the Pricing Calculator</h1>
2121
<a href="{{ url_for('pricing') }}" class="btn btn-hero">
2222
<i class="fa-solid fa-money-check-dollar fa-lg"></i> Pricing
2323
</a>
24-
{% if current_user.is_authenticated %}
25-
{% if current_user.user_level == 'admin' %}
26-
<a href="{{ url_for('history') }}" class="btn btn-hero">
27-
<i class="fa-solid fa-history fa-lg"></i> History
28-
</a>
29-
{% endif %}
30-
{% endif %}
3124
</div>
3225
</div>
3326
{% endblock %}

0 commit comments

Comments
 (0)