Skip to content

40Keeper/OD-Interest-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OD Interest Calculator

A PyQt5-based desktop application for calculating Overdraft (OD) interest and managing calculations in Excel files.

Features

  • 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

Requirements

  • Python 3.7 or higher
  • PyQt5
  • pandas
  • openpyxl
  • xlsxwriter

Installation

  1. Clone this repository:
git clone <your-repo-url>
cd UDC-Enterprise-Work
  1. Install dependencies:
pip install PyQt5 pandas openpyxl xlsxwriter

Usage

Running the Application

python layout.py

Using the Application

  1. Select Dates:

    • Click "Open Calendar" buttons to select withdrawal and deposit dates
  2. Enter Details:

    • Set the OD Interest Rate (percentage)
    • Enter the Amount Withdrawn
    • Add optional Remarks
  3. Calculate:

    • Click "Calculate" to compute the OD interest
    • Review the calculated interest amount in the popup
  4. 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

Excel File Format

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.

Building Executable

To create a standalone .exe file:

  1. Using the batch file (Windows):

    build_exe.bat
  2. Manual build:

    pip install pyinstaller
    pyinstaller --onefile --noconsole --name "OD_Interest_Calculator" layout.py

The executable will be created in the dist folder.

Project Structure

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

Features in Detail

Calculation Formula

OD Interest = (Principal × Interest Rate × Days) / (100 × 365)

Data Validation

  • Validates all input fields before calculation
  • Ensures deposit date is after withdrawal date
  • Validates Excel file headers before writing
  • Checks file permissions and existence

Error Handling

  • User-friendly error messages for all validation failures
  • Handles file permission errors
  • Validates Excel file format and headers

Contributing

Feel free to submit issues and enhancement requests!

License

MIT

Author

Aashman Chalishazar

About

A PyQt5-based desktop application for calculating Overdraft (OD) interest and managing calculations in Excel files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors