diff --git a/README.md b/README.md index 39f09e6..6d53485 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,28 @@ # Gold Silver Billing -![Homepage](/images/homepage.png) +![Homepage](/images/app.png) ## Our Mission 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. +## Features + +- Real-time Price Calculation +- Transaction History +- Multi Level Authentication +- User-friendly Interface +- Customizable Charges +- Responsive Design +- Secure Data Handling +- Business Customization + ## Demo Demo is live on the the belows servers. -- [Render(Server 1)](https://goldsilverbilling.onrender.com/) - [Railway(Server 2)](https://goldsilverbilling-production.up.railway.app/) +- [Render(Server 1)](https://goldsilverbilling.onrender.com/) ## Building and Running the Docker Container @@ -30,18 +41,59 @@ docker run -p 5000:5000 goldsilverbilling ## Product Screenshots +### Homepage + +![Homepage](/images/homepage.png) + +### Admin Dashboard + +![Admin Dashboard](/images/admin_dashboard.png) + +### Gold Calculator + ![Gold Calculator](/images/gold_calculator.png) -![Gold Home Page](/images/bill_page.png) +### System Settings + +![System Settings](/images/system_setting.png) +### Transaction History + +![Transaction History](/images/transaction_history.png) ## Improvements -- User Authentication: Add a login system to secure sensitive data. -- Data Persistence: Store historical data for future reference. -- API Integration: Fetch real-time gold/silver prices. -- Multi-Currency Support: Allow conversions for different currencies. -- Responsive Design: Enhance mobile usability. -- Advanced Analytics: Provide reports or graphs based on past transactions. -- Multi-Language Support: Cater to a broader audience by including multiple languages. -- Error Handling: Implement robust validation and error messages for user inputs. +| Improvement | Type | Details | Implemented | +|------------------------|-----------------------|-------------------------------------------------------------------------------------------|--------------| +| User Authentication | Security | Add a login system to secure sensitive data. | ☑ | +| Data Persistence | Functionality | Store historical data for future reference. | ☑ | +| Multi-Currency Support | Functionality | Allow conversions for different currencies. | ☑ | +| Responsive Design | User Experience | Enhance mobile usability by optimizing the layout and design for smaller screens. | ☑ | +| Error Handling | Functionality | Implement robust validation and error messages for user inputs to improve user experience. |☑ | +| API Integration | Integration | Fetch real-time gold/silver prices from external APIs. | :x: | +| Advanced Analytics | Functionality | Provide reports or graphs based on past transactions for better insights. | :x: | +| Multi-Language Support | User Experience | Cater to a broader audience by including multiple languages for the user interface. | :x: | + + +## Author + +- [@codeperfectplus](https://github.com/codeperfectplus) + +## License + +This project is open source and available under the [MIT License](LICENSE). + +## Acknowledgments + +- [Font Awesome](https://fontawesome.com/) +- [Bootstrap](https://getbootstrap.com/) +- [Python](https://www.python.org/) +- [Flask](https://flask.palletsprojects.com/) +- [Render](https://render.com/) +- [Railway](https://railway.app/) + +## Contact + +For any queries or feedback, please feel free to reach out to us at [codeperfectplus@gmail.com](mailto:codeperfectplus@gmail.com). + +--- \ No newline at end of file diff --git a/app.py b/app.py index 97c4933..a087b8c 100644 --- a/app.py +++ b/app.py @@ -46,7 +46,14 @@ def load_config() -> dict: app.config.update(load_config()) -# Define the database models +currency_to_symbol_dict = { + "INR" : "₹", + "USD" : "$ ", + "EUR" : "€ ", + "GBP" : "£ ", + "JPY" : "¥ ", + "AUD" : "A$ ", + } class GoldTransaction(db.Model): @@ -147,16 +154,6 @@ def inject_theme(): # Gold calculator route @app.route('/gold-calculator', methods=['GET', 'POST']) def gold_calculator(): - - currency_to_symbol_dict = { - "INR" : "₹ ", - "USD" : "$ ", - "EUR" : "€ ", - "GBP" : "£ ", - "JPY" : "¥ ", - "AUD" : "A$ ", - } - current_currency = Settings.query.first().currency currency_symbol = currency_to_symbol_dict.get(current_currency, '$') if request.method == 'POST': @@ -224,6 +221,8 @@ def gold_calculator(): # Silver calculator route @app.route('/silver-calculator', methods=['GET', 'POST']) def silver_calculator(): + current_currency = Settings.query.first().currency + currency_symbol = currency_to_symbol_dict.get(current_currency, '$') if request.method == 'POST': try: weight = float(request.form['weight']) @@ -264,7 +263,9 @@ def silver_calculator(): weight=weight, price_per_gram=silver_price_per_gram, purity=silver_purity, - config=app.config) + config=app.config, + current_currency=current_currency, + currency_symbol=currency_symbol) except ValueError as e: logging.error(f"ValueError in silver calculator: {str(e)}") flash(f"Input error: {str(e)}", 'error') @@ -279,7 +280,9 @@ def silver_calculator(): price_per_gram=silver_price_per_gram, service_charge=silver_service_charge, tax=silver_tax, - config=app.config) + config=app.config, + current_currency=current_currency, + currency_symbol=currency_symbol) @app.route('/history', methods=['GET']) @login_required diff --git a/images/admin_dashboard.png b/images/admin_dashboard.png new file mode 100644 index 0000000..e1ed91d Binary files /dev/null and b/images/admin_dashboard.png differ diff --git a/images/app.png b/images/app.png new file mode 100644 index 0000000..ca3d9d6 Binary files /dev/null and b/images/app.png differ diff --git a/images/bill_page.png b/images/bill_page.png deleted file mode 100644 index fe50526..0000000 Binary files a/images/bill_page.png and /dev/null differ diff --git a/images/gold_calculator.png b/images/gold_calculator.png index 20c23d1..d121c3d 100644 Binary files a/images/gold_calculator.png and b/images/gold_calculator.png differ diff --git a/images/homepage.png b/images/homepage.png index 7025ce5..8f08558 100644 Binary files a/images/homepage.png and b/images/homepage.png differ diff --git a/images/system_setting.png b/images/system_setting.png new file mode 100644 index 0000000..96b1c03 Binary files /dev/null and b/images/system_setting.png differ diff --git a/images/transaction_history.png b/images/transaction_history.png new file mode 100644 index 0000000..30992a1 Binary files /dev/null and b/images/transaction_history.png differ diff --git a/templates/homepage.html b/templates/homepage.html index 705aa94..a4eaebf 100644 --- a/templates/homepage.html +++ b/templates/homepage.html @@ -21,13 +21,6 @@
Email: {{ config['JEWELLER_EMAIL'] }}
Website: {{ config['JEWELLER_WEBSITE'] }}
GSTIN: {{ config['JEWELLER_GSTIN'] }}
-Silver Rate (Per gm): ₹ {{ price_per_gram }}
+Silver Rate (Per gm): {{ currency_symbol }} {{ price_per_gram }}