Analytical digest generator for Stormware Pohoda accounting system using modular architecture.
- Modular architecture - Uses DigestModules for data collection and DigestRenderer for output
- Multiple output formats - HTML, Email-compatible HTML, JSON
- Comprehensive analytics - Invoice analysis, debtor reports, financial summaries
- Themed output - Bootstrap responsive theme, Email-compatible theme
- Easy integration - Works with existing Pohoda mServer installations
composer install
cp .env.example .env
# Edit .env with your Pohoda connection detailsCopy the .env.example file to .env and configure:
POHODA_URL=https://your-pohoda-server.example.com
POHODA_ICO=12345678
POHODA_USERNAME=api
POHODA_PASSWORD=your-api-password# Generate digest for current month
php bin/pohoda-digest.php
# Generate digest for specific period
php bin/pohoda-digest.php --start=2024-01-01 --end=2024-01-31
# Generate with specific theme
php bin/pohoda-digest.php --theme=email
# Output JSON only
php bin/pohoda-digest.php --format=json
# Send by email
php bin/pohoda-digest.php [email protected]For convenience, there are predefined launcher scripts for common time periods:
| Script | Description | Time Period |
|---|---|---|
pohoda-daydigest |
Daily digest | Current day |
pohoda-weekdigest |
Weekly digest | Current week (Monday-Sunday) |
pohoda-monthdigest |
Monthly digest | Current month |
pohoda-yeardigest |
Yearly digest | Current year |
pohoda-alltimedigest |
All-time digest | From 2000-01-01 to today |
# Example usage after Debian package installation
pohoda-daydigest
pohoda-weekdigest
pohoda-monthdigestThese scripts are installed to /usr/bin/ during Debian packaging and can be used directly from the command line or in cron jobs.
Pohoda-Digest provides full MultiFlexi integration through the multiflexi-pohoda-digest package:
# Install MultiFlexi integration
sudo apt install multiflexi-pohoda-digestThis adds all digest tools to your MultiFlexi environment:
- Daily Digest -
pohoda-daydigest - Weekly Digest -
pohoda-weekdigest - Monthly Digest -
pohoda-monthdigest - Yearly Digest -
pohoda-yeardigest - All-time Digest -
pohoda-alltimedigest
Each MultiFlexi app supports the following environment variables:
POHODA_URL- Pohoda mServer URLPOHODA_ICO- Company identification number (IČO)POHODA_USERNAME- API usernamePOHODA_PASSWORD- API passwordTHEME- Report theme (bootstraporemail)EMAIL_ADDRESS- Send digest to email addressOUTPUT_FILE- Save output to fileOUTPUT_FORMAT- Output format (htmlorjson)MODULES- Comma-separated list of modules
use VitexSoftware\PohodaDigest\PohodaDigestor;
// Create digestor with Pohoda connection
$digestor = new PohodaDigestor();
// Generate digest for period
$period = [
'start' => '2024-01-01',
'end' => '2024-01-31'
];
// Get JSON data
$jsonData = $digestor->getJsonData($period);
// Generate HTML with Bootstrap theme
$html = $digestor->generateHtml($period, 'bootstrap');
// Send by email
$digestor->sendByEmail($period, '[email protected]', 'email');- OutcomingInvoices - Analysis of issued invoices
- Debtors - Overdue receivables analysis
- BankTransactions - Bank activity summary
- TaxSummary - VAT and tax overview
- Bootstrap - Modern responsive HTML for web viewing
- Email - Compatible with email clients, inline CSS
- PHP 8.1 or higher
- Pohoda mServer installation
- Valid Pohoda API credentials
MIT License