Ipex ⛗ AbraFlexi integration
- Introduction
- Features
- Technical Requirements
- Installation
- Configuration
- Usage
- Documentation
- Contributing
- License
The abraflexi-ipex project integrates Ipex, a VoIP service, with AbraFlexi, an economic ERP system. The primary function of this integration is to generate invoices in AbraFlexi from Ipex VoIP calls.
- Generate AbraFlexi Orders from Ipex Calls & send Call List to customer
- Generate AbraFlexi Invoices from AbraFlexi orders when amount reach threshold
- Send pre-paid Call list to customer
- Enhanced Audit Reporting with comprehensive transaction tracking
- MultiFlexi Report Schema compliance for standardized integration
- Duplicate Prevention for orders and invoices
- Any-time Execution with proper period-specific processing
- Detailed Metrics and status reporting for compliance
Czech documentation for the invoicing threshold logic is available in
README.cs.md.
- Enhanced Audit Reporting: Comprehensive transaction tracking and detailed reporting
- MultiFlexi Report Format: Standardized reporting for MultiFlexi platform integration
- PHP 8.4+ Compatibility: Full support for PHP 8.4 with proper typed property handling
- Improved Error Handling: Better handling of uninitialized properties and edge cases
- MonthOffset Calculation: Enhanced month offset logic with automatic sign correction for past periods
- Timezone Conversion: Proper UTC to local timezone conversion for accurate date filtering
- PHP: 8.2 or later (tested with PHP 8.4)
- AbraFlexi: Compatible with current AbraFlexi versions
- IPEX API: B2B API access required
- Extensions: PHP extensions for HTTP clients and JSON processing
This application is fully compatible with PHP 8.4 and includes:
- Proper typed property initialization
- Nullable property handling for optional date ranges
- Enhanced error handling for uninitialized properties
- PSR-12 coding standard compliance
The .env file contains the necessary configuration for the integration. Below are the key environment variables:
APP_DEBUG: Enable or disable debug mode (true/false)EASE_LOGGER: Logger type (e.g., syslog|console)EMAIL_FROM: Email address for sending emailsDIGEST_FROM: Email address for sending digestsSEND_INFO_TO: Email address to send informationABRAFLEXI_URL: URL of the AbraFlexi instanceABRAFLEXI_LOGIN: Login username for AbraFlexiABRAFLEXI_PASSWORD: Password for AbraFlexiABRAFLEXI_COMPANY: Company identifier in AbraFlexiABRAFLEXI_ORDERTYPE: Order type code in AbraFlexiABRAFLEXI_PRODUCT: Product code in AbraFlexiABRAFLEXI_DOCTYPE: Document type code in AbraFlexiABRAFLEXI_SKIPLIST: List of items to skip during synchronizationABRAFLEXI_MINIMAL_INVOICING: do not create too low invoices (default is 50))ABRAFLEXI_CREATE_EMPTY_ORDERS: just be sure that month was processedIPEX_URL: URL of the Ipex APIIPEX_LOGIN: Login username for IpexIPEX_PASSWORD: Password for Ipex
To use the abraflexi-ipex integration, run the following commands:
-
For postpaid calls to generate orders and send call list to customer:
abraflexi-ipex-postpaid-orders # Process specific month (any time execution) abraflexi-ipex-postpaid-orders -m -2 # Process 2 months ago # Continue mode - automatically calculate next period from last generated order abraflexi-ipex-postpaid-orders --continue abraflexi-ipex-postpaid-orders -c # Short form # Generate MultiFlexi-compliant report abraflexi-ipex-postpaid-orders -o multiflexi_orders_report.json
-
-m, --monthOffset: Specify the number of months back to process (always negative for past months) -
-c, --continue: Automatically calculate the next period based on the last generated order -
-o, --output: Specify output file for reports (default: stdout) -
-e, --environment: Specify custom environment file path -
For previously saved orders to generate invoices:
abraflexi-ipex-postpaid-invoices # Generate MultiFlexi-compliant report abraflexi-ipex-postpaid-invoices -o multiflexi_invoices_report.json
Example output:
01/17/2025 21:55:09 ⚙ ❲IPEXPostPaidInvoices⦒SpojeNet\AbraFlexiIpex\Ipex❳ IPEXPostPaidInvoices EaseCore 1.45.0 (PHP 8.2.27)
01/17/2025 21:55:10 ⚠ ❲IPEXPostPaidInvoices⦒SpojeNet\AbraFlexiIpex\Ipex❳ Ipex Customer Without externalId: code:01183
01/17/2025 21:55:10 ⚠ ❲IPEXPostPaidInvoices⦒SpojeNet\AbraFlexiIpex\Ipex❳ Ipex Customer Without externalId: code:03489
01/17/2025 21:55:10 ⚠ ❲IPEXPostPaidInvoices⦒SpojeNet\AbraFlexiIpex\Ipex❳ Unknown AbraFlexi customer. No invoice created.
01/17/2025 21:55:10 ⚠ ❲IPEXPostPaidInvoices⦒SpojeNet\AbraFlexiIpex\Ipex❳ Ipex Customer Without externalId: code:01846
01/17/2025 21:55:10 ⚠ ❲IPEXPostPaidInvoices⦒SpojeNet\AbraFlexiIpex\Ipex❳ Ipex Customer Without externalId: code:02509
{
"code:01183": {
"invoice": "Not an Ipex customer: code:01183 ?"
},
"code:03489": {
"invoice": "Not an Ipex customer: code:03489 ?"
},
"nocustomer": [
"OBP0022\/2025",
"OBP0044\/2025",
"OBP0122\/2025",
"OBP0296\/2025"
],
"code:01846": {
"invoice": "Not an Ipex customer: code:01846 ?"
},
"code:02509": {
"invoice": "Not an Ipex customer: code:02509 ?"
}
}01/17/2025 21:55:10 🌼 ❲IPEXPostPaidInvoices⦒SpojeNet\AbraFlexiIpex\Ipex❳ Saving result to php://stdout
-
To send prepaid call list to customer:
abraflexi-ipex-prepaid
-
For initial setup:
abraflexi-ipex-setup
Additional documentation is available:
- CHANGELOG.md: Detailed changelog with version history and changes
- PHP84_COMPATIBILITY.md: Technical guide for PHP 8.4+ compatibility and typed properties
- AUDIT_REPORTS.md: Enhanced audit reporting documentation
- MULTIFLEXI_REPORTS.md: MultiFlexi report format specification
We welcome contributions to the abraflexi-ipex project. To contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them with clear messages.
- Push your changes to your fork.
- Create a pull request to the main repository.
AbraFlexi-Ipex is ready for run as MultiFlexi application. See the full list of ready-to-run applications within the MultiFlexi platform on the application list page.
For Linux, .deb packages are available. Please use the repo:
echo "deb http://repo.vitexsoftware.com $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
sudo wget -O /etc/apt/trusted.gpg.d/vitexsoftware.gpg http://repo.vitexsoftware.cz/keyring.gpg
sudo apt update
sudo apt install abraflexi-ipexThis project is licensed under the MIT License. See the LICENSE file for more details.