A PyQt5-based desktop application for calculating Overdraft (OD) interest and managing calculations in Excel files.
- Date Selection: Easy-to-use calendar widgets for selecting withdrawal and deposit dates
- Interest Calculation: Automatic calculation of OD interest based on:
- Principal amount
- Interest rate (percentage)
- Number of days between withdrawal and deposit
- Excel Integration:
- Export calculated entries to Excel files
- Validates Excel file headers
- Preserves existing data when adding new entries
- Automatic header creation for empty files
- User-Friendly Interface: Clean GUI with proper validation and error handling
- Python 3.7 or higher
- PyQt5
- pandas
- openpyxl
- xlsxwriter
- Clone this repository:
git clone <your-repo-url>
cd UDC-Enterprise-Work- Install dependencies:
pip install PyQt5 pandas openpyxl xlsxwriterpython layout.py-
Select Dates:
- Click "Open Calendar" buttons to select withdrawal and deposit dates
-
Enter Details:
- Set the OD Interest Rate (percentage)
- Enter the Amount Withdrawn
- Add optional Remarks
-
Calculate:
- Click "Calculate" to compute the OD interest
- Review the calculated interest amount in the popup
-
Export to Excel:
- Click "Select File" to choose an Excel file
- Click "Add to Excel" to save the entry
- The entry will be added with all calculated values
The application expects Excel files with the following headers (in order):
- Start Date
- End Date
- OD Interest Rate (%)
- No. of Days
- OD Interest Amount (in Rs.)
- Timestamp
- Remarks
If the file is empty, headers will be automatically created.
To create a standalone .exe file:
-
Using the batch file (Windows):
build_exe.bat
-
Manual build:
pip install pyinstaller pyinstaller --onefile --noconsole --name "OD_Interest_Calculator" layout.py
The executable will be created in the dist folder.
UDC Enterprise Work/
├── layout.py # Main application file
├── layout.ui # UI file (if using Qt Designer)
├── build_exe.bat # Script to build executable
├── BUILD_INSTRUCTIONS.md # Detailed build instructions
├── README.md # This file
└── .gitignore # Git ignore rules
OD Interest = (Principal × Interest Rate × Days) / (100 × 365)
- Validates all input fields before calculation
- Ensures deposit date is after withdrawal date
- Validates Excel file headers before writing
- Checks file permissions and existence
- User-friendly error messages for all validation failures
- Handles file permission errors
- Validates Excel file format and headers
Feel free to submit issues and enhancement requests!
MIT
Aashman Chalishazar