{"id":25363503,"url":"https://github.com/vitexsoftware/php-pohoda-connector","last_synced_at":"2026-04-01T21:51:31.299Z","repository":{"id":57078421,"uuid":"310991741","full_name":"VitexSoftware/PHP-Pohoda-Connector","owner":"VitexSoftware","description":"client library for Sormware's Pohoda mServer","archived":false,"fork":false,"pushed_at":"2025-07-11T18:44:12.000Z","size":1640,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-11T19:24:51.033Z","etag":null,"topics":["api-client","api-client-php","php","php-library","pohoda","stormware"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VitexSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"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":"2020-11-08T05:21:35.000Z","updated_at":"2025-07-11T18:44:09.000Z","dependencies_parsed_at":"2022-08-24T11:50:06.897Z","dependency_job_id":"b85258ba-84c0-4804-92c4-57ffebdc23da","html_url":"https://github.com/VitexSoftware/PHP-Pohoda-Connector","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.08333333333333337,"last_synced_commit":"c9cd6da04ab0694ccd110515afa2295ef50dbf1f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/VitexSoftware/PHP-Pohoda-Connector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2FPHP-Pohoda-Connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2FPHP-Pohoda-Connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2FPHP-Pohoda-Connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2FPHP-Pohoda-Connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VitexSoftware","download_url":"https://codeload.github.com/VitexSoftware/PHP-Pohoda-Connector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VitexSoftware%2FPHP-Pohoda-Connector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266261187,"owners_count":23901286,"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","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":["api-client","api-client-php","php","php-library","pohoda","stormware"],"created_at":"2025-02-14T22:33:57.628Z","updated_at":"2026-04-01T21:51:31.286Z","avatar_url":"https://github.com/VitexSoftware.png","language":"PHP","funding_links":["https://patreon.com/VitexSoftware"],"categories":[],"sub_categories":[],"readme":"# PHPmServer\n\n\u003c!--toc:start--\u003e\n- [PHPmServer](#phpmserver)\n  - [Installation](#installation)\n  - [Configuration](#configuration)\n  - [Note on Encoding](#note-on-encoding)\n  - [Usage](#usage)\n\u003c!--toc:end--\u003e\n\nclient library for Stormware's [mPohoda mServer](https://www.stormware.cz/pohoda/xml/mserver/)\n\n![Project Logo](phpmserver.svg?raw=true)\n\nThe PHP-Pohoda-Connector library provides a set of features to interact with the Pohoda accounting software. Below are some of the key features along with code examples:\n\n* Check connection\n* Create/Update/Delete records for AddressBook, Invoice, Bank, etc.\n* Broad support for all Pohoda response types (70+ agendas supported)\n\n![PHP from Packagist](https://img.shields.io/packagist/php-v/vitexsoftware/pohoda-connector)\n![Packagist Version](https://img.shields.io/packagist/v/vitexsoftware/pohoda-connector)\n![Packagist Downloads](https://img.shields.io/packagist/dt/vitexsoftware/pohoda-connector)\n![GitHub](https://img.shields.io/github/license/VitexSoftware/PHP-Pohoda-Connector)\n\n## Installation\n\nInstall using composer:\n\n```shell\ncomposer require vitexsoftware/pohoda-connector\n```\n\nOr clone \u003chttps://github.com/VitexSoftware/PHP-Pohoda-Connector.git\u003e\n\n## Configuration\n\nClassess check at startup for this constants or environment variables:\n\n* **POHODA_ICO**      - company indentificator\n* **POHODA_URL**      - mServer endpoint\n* **POHODA_USERNAME** - Pohoda user's login\n* **POHODA_PASSWORD** - Pohoda user's password\n* **POHODA_TIMEOUT**  - Curl timeout\n* **POHODA_COMPRESS** - compress is disabled by default\n* **POHODA_DEBUG**    - debug mode is disabled by default\n\n## Note on Encoding\n\nPohoda always produces XML encoded in `windows-1250`. This library will automatically convert all incoming XML to UTF-8 before processing. As a result, all parsed data and strings you receive from this library will be in UTF-8 encoding, regardless of the original XML encoding.\n\n---\n\n## Usage\n\n1. Check Connection\nThis feature allows you to check if the connection to the Pohoda server is successful.\n\n```php\n\u003c?php\n\nnamespace mServer;\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\n\\Ease\\Shared::init(['POHODA_URL', 'POHODA_USERNAME', 'POHODA_PASSWORD'], \\dirname(__DIR__).'/.env');\n\n$client = new \\mServer\\Client();\n\nif (\\Ease\\Shared::cfg('APP_DEBUG')) {\n    $client-\u003elogBanner();\n}\n\necho  $client-\u003eisOnline() ? 'Online' : 'Offline';\n```\n\n1. Add Addressbook record\nThis feature allows you to add a new addressbook record.\n\n```php\n\u003c?php\n\nnamespace mServer;\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\n\\Ease\\Shared::init(['POHODA_URL', 'POHODA_USERNAME', 'POHODA_PASSWORD'], \\dirname(__DIR__).'/.env');\n\n$addressBookRecord = [\n    'identity' =\u003e [\n        'address' =\u003e [\n            'company' =\u003e 'Vitex Software',\n            'name' =\u003e 'Vítězslav Dvořák',\n            'city' =\u003e 'Prague',\n            'street' =\u003e 'Long',\n            'zip' =\u003e '15800',\n            'ico' =\u003e '69438676',\n            'dic' =\u003e 'CZ7808072811',\n        ],\n    ],\n    'mobil' =\u003e '739 778 202',\n    'web' =\u003e 'https://www.vitexsoftware.cz',\n];\n\n$addresser = new Adressbook($addressBookRecord);\n$addresser-\u003eaddToPohoda();\n\nif ($addresser-\u003ecommit()) {\n    print_r($addresser-\u003eresponse-\u003eproducedDetails);\n}\n```\n\n1. Create Invoice\n\nThis feature allows you to create a new invoice.\n\n```php\n\u003c?php\n\nnamespace mServer;\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\n$invoiceRecord = [\n    'invoiceType' =\u003e 'issuedInvoice',\n    'date' =\u003e date('Y-m-d'),\n    'accounting' =\u003e ['ids' =\u003e '3Fv'],\n    'text' =\u003e 'Faktura za zboží bez adresy',\n    'paymentType' =\u003e 'draft',\n    'note' =\u003e 'Import XML.',\n    'intNote' =\u003e 'Tento doklad byl vytvořen importem přes XML z PHP.',\n    'invoiceSummary' =\u003e [\n        'roundingDocument' =\u003e 'math2one',\n        'homeCurrency' =\u003e [\n            'priceNone' =\u003e 3018,\n            'priceLow' =\u003e 60000,\n            'priceHighSum' =\u003e 557,\n        ],\n    ],\n];\n\n\\Ease\\Shared::init(['POHODA_URL', 'POHODA_USERNAME', 'POHODA_PASSWORD'], \\dirname(__DIR__).'/.env');\n\n$invoicer = new Invoice($invoiceRecord);\n\n$itemRecord = [\n    'text' =\u003e 'Židle Z220',\n    'quantity' =\u003e 1.0,\n    'unit' =\u003e 'ks',\n    'payVAT' =\u003e false,\n    'rateVAT' =\u003e 'high',\n    'homeCurrency' =\u003e [\n        'unitPrice' =\u003e 1968,\n        'price' =\u003e 1968,\n        'priceVAT' =\u003e 413.28,\n        'priceSum' =\u003e 2381.28,\n    ],\n    'code' =\u003e 'Z220',\n    'stockItemIDS' =\u003e 'Z220',\n];\n\n$invoicer-\u003eaddItem($itemRecord);\n$invoicer-\u003eaddToPohoda();\n\nif ($invoicer-\u003ecommit()) {\n    print_r($invoicer-\u003eresponse-\u003eproducedDetails);\n}\n```\n\n1. Addressbook reading\n\nThis feature allows you to read an addressbook record.\n\n```php\n\u003c?php\n\nrequire_once '../vendor/autoload.php';\n\\Ease\\Shared::init(['POHODA_URL', 'POHODA_USERNAME', 'POHODA_PASSWORD'], \\dirname(__DIR__).'/.env');\n$addresser = new \\mServer\\Addressbook();\nprint_r($addresser-\u003egetColumnsFromPohoda(['id', 'jmeno', 'email', 'web']));\n```\n\nSee usage examples in [tests](tests) directory\n\n* [Check Connection](tests/check-connection.php)\n* [Add Addressbook record](tests/insert-address.php)\n* [Create Invoice](tests/insert-invoice.php)\n* [Addressbook reading](tests/read-address.php)\n* [Address update](tests/update-address.php)\n\n\nSome of Projects using pohoda-connector:\n\n* [pohoda-realpad](https://github.com/Spoje-NET/pohoda-realpad) \n* [pohoda-kb](https://github.com/Spoje-NET/pohoda-kb) \n* [pohoda-csas](https://github.com/Spoje-NET/pohoda-csas) \n* [pohoda-raiffeisenbank](https://github.com/Spoje-NET/pohoda-raiffeisenbank) \n* [pohoda-client-checker](https://github.com/Spoje-NET/pohoda-client-checker) \n\n**Many thanks to [Riešenia, spol. s r.o.](https://www.riesenia.com/) for its library \u003chttps://github.com/riesenia/pohoda\u003e**\n\nSee my other libraries: \u003chttps://github.com/Spoje-NET/PohodaSQL\u003e , \u003chttps://github.com/Spoje-NET/php-abraflexi\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitexsoftware%2Fphp-pohoda-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitexsoftware%2Fphp-pohoda-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitexsoftware%2Fphp-pohoda-connector/lists"}