{"id":25363476,"url":"https://github.com/vitexsoftware/abraflexi-reminder","last_synced_at":"2025-10-10T23:18:04.321Z","repository":{"id":61424748,"uuid":"119588068","full_name":"VitexSoftware/abraflexi-reminder","owner":"VitexSoftware","description":"Reminds sender for AbraFlexi","archived":false,"fork":false,"pushed_at":"2025-10-08T13:12:05.000Z","size":1097,"stargazers_count":6,"open_issues_count":10,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-08T15:13:14.490Z","etag":null,"topics":["abraflexi","debian","debtors","debtwire","flexibee","php","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VitexSoftware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":"VitexSoftware","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-01-30T20:06:29.000Z","updated_at":"2025-10-08T13:12:02.000Z","dependencies_parsed_at":"2023-10-23T21:45:10.060Z","dependency_job_id":"e33412c7-37ed-498c-b5fd-e9da9f2ed453","html_url":"https://github.com/VitexSoftware/abraflexi-reminder","commit_stats":{"total_commits":102,"total_committers":3,"mean_commits":34.0,"dds":0.4019607843137255,"last_synced_commit":"12a53c30b1b4eca99d93fbbefc595867d8cfcbb0"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/VitexSoftware/abraflexi-reminder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fabraflexi-reminder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fabraflexi-reminder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fabraflexi-reminder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fabraflexi-reminder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VitexSoftware","download_url":"https://codeload.github.com/VitexSoftware/abraflexi-reminder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2Fabraflexi-reminder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005550,"owners_count":26083918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abraflexi","debian","debtors","debtwire","flexibee","php","ubuntu"],"created_at":"2025-02-14T22:33:04.123Z","updated_at":"2025-10-10T23:18:04.314Z","avatar_url":"https://github.com/VitexSoftware.png","language":"PHP","funding_links":["https://patreon.com/VitexSoftware"],"categories":[],"sub_categories":[],"readme":"AbraFlexi Reminder / Odesílač upomínek pro AbraFlexi\n=====================================================\n\n![Package Logo](abraflexi-reminder.svg?raw=true \"Project Logo\")\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![PHP Version](https://img.shields.io/badge/php-8.2%2B-blue.svg)](https://php.net)\n[![MultiFlexi Ready](https://img.shields.io/badge/MultiFlexi-ready-green.svg)](https://www.multiflexi.eu/)\n\nA comprehensive reminder system for AbraFlexi that automatically sends payment reminders to customers with overdue invoices. Supports multiple notification methods including email, SMS, and Czech data boxes (ISDS).\n\n## Key Features\n\n* **PDF and ISDOC attachments** - Complete invoice documents\n* **QR Payment codes** - Automatic QR code generation for easy payments (optional)\n* **Extensible notification system** - Add custom modules for SMS sending or service disconnection\n* **Configurable email size limits** - Prevent large emails from being rejected\n* **Document type blacklisting** - Skip specific document types (e.g., credit notes)\n* **Label-based control** - Use labels like \"NEUPOMINKOVAT\" (DON'T REMIND) for fine-grained control\n* **Multi-currency support** - Handle invoices in foreign currencies\n* **Company logo integration** - Include your company logo in reminders\n* **Internationalization** - Czech and English localization using gettext\n* **Multiple deployment options** - Debian/Ubuntu packages, Docker, or manual installation\n* **PHP 8.2+ compatibility** - Modern PHP support with strict typing\n\nPříkaz **abraflexi-show-debts** pouze vypíše pohledávky dle jednotlivých dlužníků (export do json).\n\nPříkaz **abraflexi-reminder** Po spuštění (vytvoří potřebné štítky a)\nzkontroluje v přednastavené firmě pohledávky. Při odeslání upomínky\nPokud nemá zákazník nastaven štítek NEUPOMINKOVAT, je mu odeslána upomínka.\npříkaz je určen k automatickému spouštění každý den.\n\n![Upomínka](reminder-screenshot.png?raw=true \"ukázka upomínky\")\n\nPříkaz **abraflexi-inventarize** zašle klientům přehled jejich závazků.\nPředpokládá se jeho automatické spouštění jednou za měsíc.\n\nProhledávají se evidence \"vydané faktury\" a \"pohledávky\"\n\nFunkce štítků\n-------------\n\nŠtítky mají jak informativní tak řídící funkci. Po spuštění upomínkovače se nejprve se projdou všichni klienti a těm kteří nemají žádní neuhrazené pohledávky jsou odstraněny štítky  UPOMINKA1,UPOMINKA2,UPOMINKA3 a NEPLATIC.\nDatum odeslání upomínky je zapisováno do jednotlivé faktury do sloupců `datUp1`,`datUp2` a `datSmir` - [více sloupců ve faktuře abraflexi na to není](https://demo.flexibee.eu/c/demo/faktura-vydana/properties).\nAvšak upomínaný je klient ne faktura a tuto skutečnost je třeba nějakým způsobem poznamenat. To se děje právě prostřednictvím štítku.\nTzn. pokud má klient nastavený štítek `UPOMINKA1` a `UPOMINKA2` znamená to, že klientovi byly již odeslány dvě upomínky. Pro program to znamená že další odeslaná upomínka již bude pokus o smír.\nSoučasně je také informace o tom že upomínka byla opravdu odeslána. tzn. nenastaví se v případě že na zákazníka není znám email, nebo že poštovní server zrovna někdo rebootoval.\nDalší týden po odeslání třetí upomínky se klientovi nastaví informativní štítek `NEPLATIC`\n\nUpomínka Mailem\n---------------\n\nTexty upomínek se mění ve abraflexi evidenci **sablona-upominky**\nA je poznamenán datum jejího odeslání a současně je zákazníkovi přiřazen štítek `UPOMINKA1-3`\nOdeslaná upomínka obsahuje přehled všech položek po splatnosti a k nim patřičné přílohy ve formátech pdf a isdocx\n\nUpomínka SMS\n------------\n\nUpomínky je v současné době možné zasílat jako SMS prostřednictvím těchto metod:\n\n* **místní gnokii** - na stejném stroji kde běží upomínkovač je nainstalována aplikace gnokii.\n* **vzdálené gnokii** - gnokii je nainstalována na jiném stroji. Příkaz na něm je spouštěn prostřednictvím SSH s klíčem\n* **Axfone SMS brána** - Vaše přihlašovací údaje zadejte do konfiguráku pod klíči **AXFONE_USERNAME** a **AXFONE_PASSWORD**\n* **Huawei E5180 API** - Nastavte **MODEM_PASSWORD** (případně **MODEM_IP** pokud se liší od 192.168.8.1)\n\n![SMS Upomínka](reminder-sms-screenshot.png?raw=true \"ukázka SMS upomínky\")\n\njiná akce při upomínání\n-----------------------\n\nDo složky  **src/AbraFlexi/Reminder/Notifier** ( /usr/lib/abraflexi-reminder/Reminder/Notifier/ v případě instalace z debianího balíčku )\nje možné přidat další moduly vykonávající akci. Například odpojení neplatiče od služby atd.\nJak takové doplňky psát by mělo být zřejmé z [ByEmail.php](src/AbraFlexi/Reminder/Notifier/ByEmail.php)\n\n## Installation / Instalace\n\n### Debian/Ubuntu Packages\n\nPre-built .deb packages are available from the VitexSoftware repository:\n\n```bash\nsudo apt install lsb-release wget\necho \"deb http://repo.vitexsoftware.com $(lsb_release -sc) main\" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list\nsudo wget -O /etc/apt/trusted.gpg.d/vitexsoftware.gpg http://repo.vitexsoftware.cz/keyring.gpg\nsudo apt update\nsudo apt install abraflexi-reminder\n```\n\n### Docker Installation\n\n```bash\n# Pull the image\ndocker pull vitexsoftware/abraflexi-reminder\n\n# Run with environment configuration\ndocker run -d \\\n  --name abraflexi-reminder \\\n  --env-file .env \\\n  vitexsoftware/abraflexi-reminder\n```\n\n### Composer Installation\n\n```bash\ncomposer create-project vitexsoftware/abraflexi-reminder\ncd abraflexi-reminder\ncp example.env .env\n# Edit .env with your configuration\n./bin/abraflexi-reminder-init\n```\n\n### MultiFlexi Installation\n\n1. Access your MultiFlexi dashboard\n2. Go to Applications → Add Application\n3. Search for \"AbraFlexi Reminder\"\n4. Click Install and configure environment variables\n5. Set up scheduling for automatic execution\n\nAfter installation, the following commands are available:\n\n| Command | Purpose | Description |\n|---------|---------|-------------|\n| `abraflexi-show-debts` | **Debt Overview** | List all found receivables in JSON format |\n| `abraflexi-reminder` | **Send Reminders** | Main command to send payment reminders to debtors |\n| `abraflexi-notify-customers` | **Customer Notifications** | Send customers a list of their obligations (inventarization) |\n| `abraflexi-reminder-init` | **Initialize Setup** | Prepare the default company for use with the reminder system |\n\n### Command Examples\n\n```bash\n# Initialize the system (create required labels)\nabraflexi-reminder-init\n\n# Show current debts without sending reminders\nabraflexi-show-debts\n\n# Send reminders (production mode)\nabraflexi-reminder\n\n# Test mode - send all notifications to admin email\nMUTE=true abraflexi-reminder\n\n# Send monthly inventarization to customers\nabraflexi-notify-customers\n```\n\n## Configuration / Konfigurace\n\nThe application can be configured using:\n1. Configuration file: `/etc/abraflexi/reminder.json`\n2. Environment variables (recommended for containers and MultiFlexi)\n3. Command line parameters\n\n### Environment Variables\n\nCopy and modify the `example.env` file to set up your configuration:\n\n```bash\n# Application Settings\nAPP_DEBUG=false\nEASE_LOGGER=syslog\nLANG=cs_CZ\n\n# AbraFlexi Connection\nABRAFLEXI_URL=https://demo.flexibee.eu:5434\nABRAFLEXI_LOGIN=winstrom\nABRAFLEXI_PASSWORD=winstrom\nABRAFLEXI_COMPANY=demo_de\n\n# Email Configuration\nREMIND_FROM=noreply@yourdomain.net\nEASE_MAILTO=info@yourdomain.net\nMAIL_CC=accounting@yourdomain.net\nMAX_MAIL_SIZE=1250000\n\n# Reminder Settings\nQR_PAYMENTS=true\nADD_LOGO=true\nSURRENDER_DAYS=365\nNO_REMIND_LABEL=NEUPOMINAT\nREMINDER_SKIPDOCTYPE=DOBROPIS,ZDD\nMUTE=false\n\n# SMS Configuration\nSMS_SENDER=+420739778202\nSMS_ENGINE=gnokii\nSMS_SIGNATURE=Your Company\nGNOKII_HOST=sms@your-server.com\n\n# Data Box (ISDS) Configuration\nDATOVKA_LOGIN=your_databox_login\nDATOVKA_PASSWORD=your_databox_password\n\n# Huawei Modem Settings\nMODEM_IP=192.168.8.1\nMODEM_PASSWORD=admin\n\n# Output Settings\nRESULT_FILE=reminder_{ABRAFLEXI_COMPANY}.json\n```\n\n### Configuration Parameters\n\n#### Core Settings\n* **APP_DEBUG** - Enable debug mode (bool, default: false)\n* **LANG** - Application locale (cs_CZ or en_US, default: cs_CZ)\n* **EASE_LOGGER** - Logging method (memory|console|file|syslog|email|std|eventlog)\n\n#### AbraFlexi Connection\n* **ABRAFLEXI_URL** - AbraFlexi server URL (required)\n* **ABRAFLEXI_LOGIN** - AbraFlexi username (required)\n* **ABRAFLEXI_PASSWORD** - AbraFlexi password (required)\n* **ABRAFLEXI_COMPANY** - Company database name (required)\n\n#### Email Configuration\n* **REMIND_FROM** - Sender email address for reminders (required)\n* **EASE_MAILTO** - Email for logs and reports when MUTE is enabled\n* **MAIL_CC** - Send copy of each reminder to this email\n* **MAX_MAIL_SIZE** - Maximum email size in bytes (default: 1250000 = ~10MB)\n\n#### Reminder Behavior\n* **QR_PAYMENTS** - Include QR payment codes in reminders (bool, default: true)\n* **ADD_LOGO** - Include company logo in reminders (bool, default: true)\n* **SURRENDER_DAYS** - Skip processing cases older than this many days (integer, default: 365)\n* **REMINDER_SKIPDOCTYPE** - Comma-separated list of document types to ignore (e.g., \"DOBROPIS,ZDD\")\n* **NO_REMIND_LABEL** - Label to skip reminders (default: \"NEUPOMINAT\")\n* **MUTE** - Test mode - send notifications to EASE_MAILTO instead of customers (bool, default: false)\n\n#### SMS Configuration\n* **SMS_ENGINE** - SMS sending method: none|gnokii|sshgnokii|axfone|huaweiapi\n* **SMS_SENDER** - Sender phone number (e.g., +420739778202)\n* **SMS_SIGNATURE** - Signature appended to SMS messages\n* **GNOKII_HOST** - Remote gnokii server (format: user@host)\n* **AXFONE_USERNAME** - Axfone API username\n* **AXFONE_PASSWORD** - Axfone API password\n* **MODEM_IP** - Huawei modem IP address (default: 192.168.8.1)\n* **MODEM_PASSWORD** - Huawei modem web interface password\n\n#### Data Box (ISDS) Configuration\n* **DATOVKA_LOGIN** - Czech Data Box login\n* **DATOVKA_PASSWORD** - Czech Data Box password\n\n#### Output Settings\n* **RESULT_FILE** - JSON report output file (default: reminder_{ABRAFLEXI_COMPANY}.json)\n\nV případě že nepoužíváte debianí balíček ale pouze klonujete repozitář, je potřeba před prvním použitím spustit [skript Init.php](src/Init.php) který vytvoří štítky 'UPOMINKA1', 'UPOMINKA2', 'UPOMINKA3', 'NEPLATIC', 'NEUPOMINKOVAT'\n\nISDS Datové schránky\n--------------------\n\n* **DATOVKA_LOGIN** - Přihlašovací jméno do datovky\n* **DATOVKA_PASSWORD** - Login do datovky\n\nUpomínky a inventarizace jsou odesílány i do datovky pokud je tato nastavena v konfiguraci a dlužík má v adresáři nastavený štítek `DATA_BOX`\n\n## Dependencies / Závislosti\n\nThis application requires the following PHP libraries:\n\n| Library | Version | Purpose |\n|---------|---------|---------|\n| [**PHP AbraFlexi**](https://github.com/Spoje-NET/php-abraflexi) | ^3.6 | Communication with AbraFlexi ERP system |\n| [**AbraFlexi Bricks**](https://github.com/VitexSoftware/php-abraflexi-bricks) | ^1.4 | Customer and document handling classes |\n| [**HTML2PDF**](https://github.com/spipu/html2pdf) | ^5.3 | PDF generation from HTML templates |\n| [**TCPDF**](https://github.com/tecnickcom/TCPDF) | ^6.10 | Advanced PDF processing |\n| [**Huawei API**](https://github.com/hsp-dev/huawei-api) | dev-master | Communication with Huawei modems |\n| [**Czech DataBox**](https://github.com/dfridrich/CzechDataBox) | ^1.3 | Czech ISDS data box integration |\n\n### System Requirements\n\n- **PHP**: 8.2 or higher\n- **Extensions**: curl, json, mbstring, xml, zip\n- **Optional**: gnokii (for SMS via mobile phones)\n- **AbraFlexi**: Compatible version with REST API access\n\n## Troubleshooting\n\n### Common Issues\n\n#### MultiFlexi JSON Validation Errors\nIf you encounter validation errors during MultiFlexi deployment:\n```\nJSON does not validate Violation: [environment.*.type] Does not have a value in the enumeration\n```\n\n**Solution**: The JSON schema has been updated. Ensure you're using the latest version (1.7.3+) which includes the schema compliance fixes.\n\n#### SMS Not Sending\n- Check SMS_ENGINE configuration\n- Verify modem connectivity (for gnokii/huaweiapi)\n- Test API credentials (for axfone)\n- Check logs for detailed error messages\n\n#### Email Delivery Issues\n- Verify SMTP configuration in AbraFlexi\n- Check MAX_MAIL_SIZE if attachments are large\n- Ensure REMIND_FROM has proper sender reputation\n- Test with MUTE=true first\n\n#### AbraFlexi Connection Problems\n- Verify ABRAFLEXI_URL is accessible\n- Check credentials and company database name\n- Ensure AbraFlexi user has sufficient permissions\n- Test connection with `abraflexi-show-debts` first\n\n### Debug Mode\n\nEnable debug mode for detailed logging:\n```bash\nexport APP_DEBUG=true\nexport EASE_LOGGER=console\n./bin/abraflexi-reminder\n```\n\nMohlo by vás zajímat\n--------------------\n\n* https://github.com/VitexSoftware/php-abraflexi-matcher - Párovač faktur \n* https://github.com/VitexSoftware/AbraFlexi-Digest      - Pravidelný souhrn vašeho AbraFlexi\n\n## Documentation\n\n- **[API Documentation](docs/API.md)** - Developer guide and extension points\n- **[Environment Variables](docs/environment-variables.md)** - Complete configuration reference\n- **[Changelog](CHANGELOG.md)** - Version history and changes\n- **[Update Script](docs/update-docs.sh)** - Documentation maintenance tool\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\nPlease ensure:\n- All tests pass (`composer test`)\n- Code follows PSR-12 standards (`composer fix-cs`)\n- Documentation is updated\n- MultiFlexi JSON files validate against schema\n\n## Acknowledgments / Poděkování\n\nThis project would not exist without the support of [Spoje.Net s.r.o.](http://spoje.net/)\n\n![Spoje.Net](https://raw.githubusercontent.com/VitexSoftware/php-abraflexi-reminder/master/logo-spojenet.png \"Spoje.Net s.r.o.\")\n\nHTML version of reminders and inclusion of other receivables was funded by [Medinet s.r.o.](http://medinetsro.cz/)\n\n![Medinet](https://raw.githubusercontent.com/VitexSoftware/php-abraflexi-reminder/master/mendinet-logo.png \"Medinet s.r.o.\")\n\n## MultiFlexi Integration\n\nAbraFlexi Reminder is fully compatible with [MultiFlexi](https://multiflexi.eu) platform and includes four ready-to-run applications:\n\n| Application | Description | UUID |\n|-------------|-------------|------|\n| **Reminder** | Main reminder sender for overdue invoices | `0fd52fdd-1c83-4346-b9f9-13e82bd5d6d0` |\n| **Inventarize** | Send customers overview of their obligations | Available in MultiFlexi |\n| **Clean Labels** | Remove reminder labels from paid customers | Available in MultiFlexi |\n| **Show Debts** | Generate debts overview report | Available in MultiFlexi |\n\n\u003cimg src=\"abraflexi-inventarize.svg?raw=true\" width=\"100\" height=\"100\"\u003e\u003cimg src=\"abraflexi-reminder-clean-labels.svg?raw=true\" width=\"100\" height=\"100\"\u003e\u003cimg src=\"abraflexi-reminder.svg?raw=true\" width=\"100\" height=\"100\"\u003e\u003cimg src=\"abraflexi-show-debts.svg?raw=true\" width=\"100\" height=\"100\"\u003e\n\n### MultiFlexi Deployment\n\n1. Install MultiFlexi platform\n2. Add AbraFlexi Reminder from the application catalog\n3. Configure environment variables through MultiFlexi interface\n4. Schedule automatic execution\n\nAll applications are validated against MultiFlexi schema version 2.1.1 and support:\n- Environment-based configuration\n- Docker container deployment\n- Automatic dependency management\n- Integrated logging and monitoring\n\nSee the full list of ready-to-run applications within the MultiFlexi platform on the [application list page](https://www.multiflexi.eu/apps.php).\n\n[![MultiFlexi App](https://github.com/VitexSoftware/MultiFlexi/blob/main/doc/multiflexi-app.svg)](https://www.multiflexi.eu/apps.php)\n\n## Recent Updates (v1.7.3)\n\n- **JSON Schema Compliance**: Fixed MultiFlexi application JSON validation issues\n- **Type Safety**: Updated environment variable types to match schema requirements:\n  - `boolean` → `bool` for APP_DEBUG\n  - `number` → `integer` for SURRENDER_DAYS and OVERDUE_PATIENCE\n- **DataBox Improvements**: Enhanced Czech Data Box (ISDS) message sending\n- **PHP 8.2+ Support**: Full compatibility with modern PHP versions\n- **Strict Type Declarations**: Improved code reliability and performance\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitexsoftware%2Fabraflexi-reminder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitexsoftware%2Fabraflexi-reminder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitexsoftware%2Fabraflexi-reminder/lists"}