Skip to main content

A command line tool for calculating fees and VAT from CRDB account statements in Excel format

Project description

CRDB Fee Calculator

A command line tool for calculating fees and VAT from CRDB account statements in Excel format.

Features

  • ๐Ÿš€ Simple command line interface
  • ๐Ÿ“Š Automatic detection of fees/charges
  • ๐Ÿ›๏ธ VAT calculation
  • ๐Ÿ’ฑ Automatic currency detection (USD/TZS)
  • ๐Ÿ’ฐ Support for different currencies
  • ๐ŸŽจ Beautiful, formatted output
  • ๐Ÿ“ Supports .xlsx and .xls files

Installation

From PyPI (Recommended)

pip install crdb-fee-calculator

From Source

Requirements

  • Linux system (Ubuntu 22.04+ recommended)
  • Python 3.7 or higher
  • python3-venv (will be installed automatically)

Quick Installation

  1. Clone or download repository
  2. Make installation script executable:
    chmod +x install.sh
    
  3. Run installation:
    ./install.sh
    

The tool will be automatically installed in /usr/local/bin and will be available from anywhere.

Note: This installation method is for development/testing. For production use, install from PyPI.

Manual Installation

  1. Create virtual environment:

    python3 -m venv venv
    source venv/bin/activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Make script executable and copy to PATH:

    chmod +x crdbfee.py
    sudo cp crdbfee.py /usr/local/bin/crdbfee
    

Note: The automated installation script is recommended as it handles virtual environment setup automatically.

Usage

Basic Usage

crdbfee statement.xlsx

Show Help

crdbfee --help

Show Version

crdbfee --version

Example Output

USD Output

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                    CRDB Fee Calculator                      โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  ๐Ÿ“Š  Fees/Charges:          125.50 USD                     โ•‘
โ•‘  ๐Ÿ›๏ธ   VAT Total:             25.10 USD                     โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  ๐Ÿ’ฐ  Total Amount:          150.60 USD                     โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
๐Ÿ’ฑ Detected currency: USD

TZS Output

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘                    CRDB Fee Calculator                      โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  ๐Ÿ“Š  Fees/Charges:        25000.00 TZS                     โ•‘
โ•‘  ๐Ÿ›๏ธ   VAT Total:           5000.00 TZS                     โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘  ๐Ÿ’ฐ  Total Amount:        30000.00 TZS                     โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
๐Ÿ’ฑ Detected currency: TZS

Uninstallation

chmod +x uninstall.sh
./uninstall.sh

Supported File Formats

  • Excel (.xlsx)
  • Excel (.xls)

Detection of Fees and VAT

The tool automatically detects:

Fees/Charges:

  • charge
  • commission
  • fee
  • levy
  • fund transfer

VAT:

  • All entries with "vat" in the description text

Currency Detection

The tool automatically detects the currency from:

  • Column names (e.g., "Balance USD", "Amount TZS")
  • Description texts (e.g., "Bank Fee USD", "Commission TZS")
  • Currency symbols ($, TSH, TZS)
  • Fallback: USD (default)

Supported Currencies:

  • USD: US Dollar
  • TZS: Tanzania Shilling

Troubleshooting

"File does not exist"

  • Check the file path
  • Make sure the file is in the current directory

"Not an Excel file"

  • Use only .xlsx or .xls files
  • Make sure the file is not corrupted

"Python not found"

  • Install Python 3.7 or higher
  • Make sure python3 is available in PATH

"externally-managed-environment" Error (Ubuntu 22.04+)

  • This error occurs because Ubuntu prevents system-wide pip installations
  • The installation script automatically creates a virtual environment to solve this
  • If you encounter this error, use the provided install.sh script instead of manual pip installation

License

See LICENSE file for details.

Support

For problems or questions, please create an issue in the repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crdb_fee_calculator-1.0.2.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crdb_fee_calculator-1.0.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file crdb_fee_calculator-1.0.2.tar.gz.

File metadata

  • Download URL: crdb_fee_calculator-1.0.2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for crdb_fee_calculator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 220bf1bd5ddf5e16365dbac2d1d33df73afef9c12e7197e2fce60f792bc6a282
MD5 75a081829cb199c091cb90fbe91cb45e
BLAKE2b-256 b429e8278fe0030c7693e90cf5d5f377b6c3adb82d168cade93714751ac7a788

See more details on using hashes here.

Provenance

The following attestation bundles were made for crdb_fee_calculator-1.0.2.tar.gz:

Publisher: publish.yml on lkasdorf/crdb_fee_calculator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file crdb_fee_calculator-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for crdb_fee_calculator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8647c26ce12d52a03dd839b1e1160af9ed456dd09de2d095efa90a4bc50b6586
MD5 2616a90207bf3565fe89903ce3c429e7
BLAKE2b-256 51caceaa27fd12a503f181b425f3433c18efd62c200e803f98e3489c323e4316

See more details on using hashes here.

Provenance

The following attestation bundles were made for crdb_fee_calculator-1.0.2-py3-none-any.whl:

Publisher: publish.yml on lkasdorf/crdb_fee_calculator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page