A web-based application for managing financial transactions, multiple bank accounts, and currency exchange rates.
- Support for Excel files (.xlsx, .xls)
- Drag & drop interface
- Automatic data processing
- Transaction and account creation from uploaded data
- Real-time exchange rate fetching
- Caching system to avoid API limits
- Automatic conversion to CHF
- Visual rate display
- View all bank accounts
- Edit account details inline
- Starting and end balance tracking
- Automatic balance calculation in original currency and CHF
- Server-side processing for large datasets
- Inline editing capabilities
- Delete functionality with confirmation
- Sorting and pagination
- Export to Excel and PDF
- Visual representation of account balances over time
- Multiple account tracking
- Total balance line
- Interactive chart with export options
- jQuery 3.5.1
- DataTables for table management
- Highcharts for data visualization
- Font Awesome 5.15.4 for icons
- PHP 5+ (5.7 in current version)
- MySQL/MariaDB
- PHPSpreadsheet for Excel file processing
- PDO for database operations
The system uses three main tables:
-- Database dump from transactions_app-dump.sql file
CREATE TABLE `accounts` (
`id` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`currency` varchar(3) NOT NULL,
`initial_balance` decimal(15,2) DEFAULT 0.00,
PRIMARY KEY (`id`)
);
CREATE TABLE `transactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`account_id` varchar(255) NOT NULL,
`transaction_no` varchar(255) NOT NULL,
`amount` decimal(15,2) NOT NULL,
`currency` varchar(3) NOT NULL,
`date` date NOT NULL,
PRIMARY KEY (`id`),
KEY `account_id` (`account_id`),
CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`)
);
CREATE TABLE `exchange_rates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`currency_from` varchar(3) NOT NULL,
`currency_to` varchar(3) NOT NULL,
`rate` decimal(15,6) NOT NULL,
`last_updated` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
UNIQUE KEY `currency_pair` (`currency_from`,`currency_to`)
);
- Clone the repository:
git clone https://github.com/Shaykhnazar/transaction-management.git
- Set up the database:
mysql -u root -p transactions_app < transactions_app-dump.sql
- Configure the database connection in
config.php
:
define('DB_HOST', 'localhost');
define('DB_NAME', 'your_database');
define('DB_USER', 'your_username');
define('DB_PASS', 'your_password');
- Install dependencies:
composer install
- Set up the exchange rate API:
- Get an API key from exchangerate-api.com
- Add it to your configuration file
- Click "Browse files" or drag & drop an Excel file
- File should contain columns: Account, Transaction No, Amount, Currency, Date
- System will process the file and create/update accounts and transactions
- Click on editable fields to modify account details
- Changes are saved automatically
- End balance is calculated based on initial balance and transactions
- Use pagination to navigate through transactions
- Click on editable fields to modify transaction details
- Click the delete icon to remove transactions (confirmation required)
- Use export buttons to download transaction data
- Chart automatically updates when data changes
- Hover over lines to see specific values
- Use export options to download the chart
project_root/
├── api/
│ └── index.php
├── src/
│ ├── Repository/
│ │ ├── TransactionRepository.php
│ │ └── AccountRepository.php
│ └── Service/
│ ├── ExchangeRateService.php
│ └── FileProcessor.php
├── public/
│ ├── css/
│ └── js/
├── config.php
├── index.html
├── vendor/
└── README.md
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.