Banking Reports

A comprehensive Flutter package for generating professional PDF reports, specifically designed for banking operations. This package provides easy-to-use functions to create formatted PDF documents for Statement of Account (SOA) reports, Cash Transfer Breakdown reports, Validation Slips, and more.

Features

  • 📄 PDF Report Generation: Create professional banking reports in PDF format
  • 🏦 Banking-focused: Specifically designed for banking operations and reports
  • 💰 Cash Breakdown Reports: Generate detailed cash transfer breakdown reports with denomination counting
  • 📊 SOA Reports: Create comprehensive Statement of Account reports with transaction history
  • 🧾 Validation Slips: Generate official receipt validation slips for teller transactions
  • 📝 Teller Entries & Blotter Reports: Support for teller entry and blotter report generation
  • Cleared Check Reports: Generate loan payment cleared check reports with depositor information
  • 🎨 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
  • 💵 Denomination Tracking: Track bills and coins with automatic total calculations

Getting Started

Prerequisites

  • Flutter SDK ^3.2.0
  • Dart SDK ^3.2.0

Installation

Add this package to your pubspec.yaml file:

dependencies:
  banking_reports: ^1.0.0

Then run:

flutter pub get

Import

import 'package:banking_reports/banking_reports.dart';

Usage

SOA Report Generation

import 'package:flutter/material.dart';
import 'package:banking_reports/banking_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: 'FlexiBank Corp - 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,
  );
}

Cash Breakdown Report Generation

Validation Slip Generation

import 'package:banking_reports/banking_reports.dart';

// Create validation slip data
OfficialReceiptPrintData receiptForm = OfficialReceiptPrintData(
  accountName: "Jane Doe",
  accountNumber: "00123456789",
  transactionCode: "WDWL",
  tellerId: "TELLER002",
  dateTime: DateTime.now().toString(),
  branch: "Main Branch",
  referenceNumber: "REF9876543210",
  transactionDescription: "Cash Withdrawal",
  amount: "5000.00",
  change: "0.00",
  orNumber: "OR20240612001",
);

// Generate the validation slip (web)
generateValidationSlip(receiptForm);
import 'package:flutter/material.dart';
import 'package:banking_reports/banking_reports.dart';

// Create denomination data
DenominationModel denominations = DenominationModel(
  bill1000: 10,    // 10 pieces of ₱1000 bills
  bill500: 5,      // 5 pieces of ₱500 bills
  bill200: 8,      // 8 pieces of ₱200 bills
  bill100: 15,     // 15 pieces of ₱100 bills
  bill50: 20,      // 20 pieces of ₱50 bills
  bill20: 25,      // 25 pieces of ₱20 bills
  coin20: 10,      // 10 pieces of ₱20 coins
  coin10: 15,      // 15 pieces of ₱10 coins
  coin5: 20,       // 20 pieces of ₱5 coins
  coin1: 50,       // 50 pieces of ₱1 coins
  coin025: 40,     // 40 pieces of ₱0.25 coins
  coin010: 30,     // 30 pieces of ₱0.10 coins
  coin005: 20,     // 20 pieces of ₱0.05 coins
  coin001: 100,    // 100 pieces of ₱0.01 coins
);

// Generate the Cash Breakdown report
void generateCashBreakdownReport() async {
  await generateCashierBreakdownReport(
    denominations: denominations,
    branchName: 'FlexiBank Corp - Main Branch',
    remarks: 'End of day cash count',
    branchCode: 'MB001',
    preparedBy: 'Jane Smith',
    acknowledgedBy: 'John Manager',
    acknowledgedDesignation: 'Branch Manager',
    date: DateTime.now(),
    createdAt: DateTime.now(),
    openCageAt: DateTime.now().subtract(Duration(hours: 8)),
  );
}

Model Properties

SoaModel

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
}

DenominationModel

OfficialReceiptPrintData

The OfficialReceiptPrintData class includes the following properties:

class OfficialReceiptPrintData {
  final String accountName;
  final String accountNumber;
  final String transactionCode;
  final String tellerId;
  final String dateTime;
  final String branch;
  final String referenceNumber;
  final String transactionDescription;
  final String amount;
  final String change;
  final String? orNumber;
  // ...other fields as needed
}
class DenominationModel {
  final int bill1000;    // ₱1000 bills
  final int bill500;     // ₱500 bills
  final int bill200;     // ₱200 bills
  final int bill100;     // ₱100 bills
  final int bill50;      // ₱50 bills
  final int bill20;      // ₱20 bills
  final int coin20;      // ₱20 coins
  final int coin10;      // ₱10 coins
  final int coin5;       // ₱5 coins
  final int coin1;       // ₱1 coins
  final int coin025;     // ₱0.25 coins
  final int coin010;     // ₱0.10 coins
  final int coin005;     // ₱0.05 coins
  final int coin001;     // ₱0.01 coins

  // Automatic calculations
  double get totalBills;     // Total value of all bills
  double get totalCoins;     // Total value of all coins
  double get grandTotal;     // Total value of bills + coins
}

Configuration Options

SOA Report Configuration: The generateSoaReport function accepts various configuration parameters:

  • items: List of SoaModel transactions
  • branchName: Name of the bank branch
  • branchAddress: Address of the bank branch
  • withAddress: Whether to include customer address (default: false)
  • withCheckNumber: Whether to show check numbers (default: false)
  • address: Customer address (optional)
  • accountNumber: Customer account number
  • accountName: Customer name
  • dateFrom: Statement period start date
  • dateTo: Statement period end date
  • statementDate: Date when statement was generated
  • context: Flutter BuildContext for web download

Cash Breakdown Report Configuration: The generateCashierBreakdownReport function accepts these parameters:

  • denominations: DenominationModel with cash count data
  • branchName: Name of the bank branch
  • remarks: Additional remarks or notes
  • branchCode: Branch identification code
  • preparedBy: Name of person who prepared the report
  • acknowledgedBy: Name of person who acknowledged the report
  • acknowledgedDesignation: Job title of acknowledging person (optional)
  • date: Date of the cash breakdown
  • createdAt: Timestamp when report was created
  • openCageAt: Time when cash cage was opened (optional)

Validation Slip Configuration: The generateValidationSlip function accepts an OfficialReceiptPrintData object with the following fields:

  • accountName: Customer name
  • accountNumber: Customer account number
  • transactionCode: Transaction code (e.g., WDWL, DPST)
  • tellerId: Teller ID
  • dateTime: Date and time of transaction
  • branch: Branch name
  • referenceNumber: Reference number
  • transactionDescription: Description of transaction
  • amount: Transaction amount
  • change: Change amount
  • orNumber: Official receipt number (optional)

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 SDK
  • printing: ^5.12.0 - PDF generation and printing
  • pdf: ^3.10.8 - PDF document creation
  • intl: ^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. Example files are provided for SOA, Cash Breakdown, and Validation Slip generation.

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.