banking_reports 1.0.0
banking_reports: ^1.0.0 copied to clipboard
A Flutter application for generating and printing banking reports with PDF support.
pdf_reports #
A Flutter package for generating professional PDF reports, specifically designed for banking Statement of Account (SOA) reports. This package provides easy-to-use functions to create formatted PDF documents with bank transaction data.
Features #
- 📄 PDF Report Generation: Create professional Statement of Account reports in PDF format
- 🏦 Banking-focused: Specifically designed for bank statement reports
- 🎨 Customizable Layout: Configurable headers, addresses, and formatting options
- 📱 Flutter Integration: Seamlessly integrates with Flutter applications
- 💾 Web Download: Automatic PDF download functionality for web platforms
- 📊 Transaction Support: Handle debit, credit, and running balance calculations
- 🔢 Pagination: Automatic page numbering and multi-page support
Getting Started #
Prerequisites #
- Flutter SDK ^3.2.0
- Dart SDK ^3.2.0
Installation #
Add this package to your pubspec.yaml file:
dependencies:
pdf_reports: ^1.0.0
Then run:
flutter pub get
Import #
import 'package:pdf_reports/pdf_reports.dart';
Usage #
Basic SOA Report Generation #
import 'package:flutter/material.dart';
import 'package:pdf_reports/pdf_reports.dart';
// Create sample transaction data
List<SoaModel> transactions = [
SoaModel(
transactionDate: DateTime(2024, 1, 15),
transactionCode: 'DEP',
debit: 0.0,
credit: 1000.0,
runningBalance: 1000.0,
branch: 'Main Branch',
tellerId: 'T001',
checkNo: null,
particulars: 'Initial Deposit',
),
SoaModel(
transactionDate: DateTime(2024, 1, 20),
transactionCode: 'WTH',
debit: 250.0,
credit: 0.0,
runningBalance: 750.0,
branch: 'Main Branch',
tellerId: 'T002',
checkNo: '123456',
particulars: 'ATM Withdrawal',
),
];
// Generate the SOA report
void generateReport(BuildContext context) async {
await generateSoaReport(
items: transactions,
branchName: 'Main Branch',
branchAddress: '123 Banking Street, Financial District',
withAddress: true,
withCheckNumber: true,
address: '456 Customer Avenue, City, State 12345',
accountNumber: '1234567890',
accountName: 'John Doe',
dateFrom: DateTime(2024, 1, 1),
dateTo: DateTime(2024, 1, 31),
statementDate: DateTime(2024, 2, 1),
context: context,
);
}
SOA Model Properties #
The SoaModel class includes the following properties:
class SoaModel {
final DateTime? transactionDate; // Date of the transaction
final String? transactionCode; // Transaction type code (DEP, WTH, etc.)
final double? debit; // Debit amount
final double? credit; // Credit amount
final double? runningBalance; // Account balance after transaction
final String? branch; // Branch where transaction occurred
final String? tellerId; // Teller ID who processed transaction
final String? checkNo; // Check number (if applicable)
final String? particulars; // Transaction description
}
Configuration Options #
The generateSoaReport function accepts various configuration parameters:
items: List ofSoaModeltransactionsbranchName: Name of the bank branchbranchAddress: Address of the bank branchwithAddress: Whether to include customer address (default: false)withCheckNumber: Whether to show check numbers (default: false)address: Customer address (optional)accountNumber: Customer account numberaccountName: Customer namedateFrom: Statement period start datedateTo: Statement period end datestatementDate: Date when statement was generatedcontext: Flutter BuildContext for web download
Platform Support #
- ✅ Web: Full support with automatic PDF download
- ✅ Android: Supported
- ✅ iOS: Supported
- ✅ Desktop: Supported (Windows, macOS, Linux)
Dependencies #
This package relies on the following dependencies:
flutter: Flutter SDKprinting: ^5.12.0 - PDF generation and printingpdf: ^3.10.8 - PDF document creationintl: ^0.19.0 - Date formatting and internationalization
Example #
Check out the /example folder for a complete working example of how to use this package in your Flutter application.
Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Support #
If you encounter any issues or have questions, please file an issue on the GitHub repository.
Changelog #
See CHANGELOG.md for a detailed list of changes and updates.