{"id":16380245,"url":"https://github.com/josemmo/einvoicing","last_synced_at":"2025-04-05T11:09:48.034Z","repository":{"id":37837070,"uuid":"277130567","full_name":"josemmo/einvoicing","owner":"josemmo","description":"Library for reading and creating European-compliant electronic invoices (EN 16931)","archived":false,"fork":false,"pushed_at":"2024-04-04T09:42:12.000Z","size":2866,"stargazers_count":101,"open_issues_count":1,"forks_count":28,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-02T06:03:28.383Z","etag":null,"topics":["eu","europe","invoice","invoicing","peppol","php","ubl"],"latest_commit_sha":null,"homepage":"https://josemmo.github.io/einvoicing/","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/josemmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2020-07-04T14:55:54.000Z","updated_at":"2024-07-02T07:55:02.902Z","dependencies_parsed_at":"2023-10-20T17:06:14.182Z","dependency_job_id":"9f607065-8454-4968-8da4-b1a6d878083c","html_url":"https://github.com/josemmo/einvoicing","commit_stats":{"total_commits":186,"total_committers":7,"mean_commits":"26.571428571428573","dds":0.05913978494623651,"last_synced_commit":"fb318980fafda05da66385221d590f610945ee28"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josemmo%2Feinvoicing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josemmo%2Feinvoicing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josemmo%2Feinvoicing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josemmo%2Feinvoicing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josemmo","download_url":"https://codeload.github.com/josemmo/einvoicing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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":["eu","europe","invoice","invoicing","peppol","php","ubl"],"created_at":"2024-10-11T03:50:56.043Z","updated_at":"2025-04-05T11:09:48.009Z","avatar_url":"https://github.com/josemmo.png","language":"PHP","funding_links":[],"categories":["Electronic Invoicing"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003ca href=\"https://josemmo.github.io/einvoicing/\"\u003e\u003cimg src=\"docs/logo.svg\" width=\"100\" alt=\"\"\u003e\u003cbr\u003eEuropean Invoicing (eInvoicing)\u003c/a\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/josemmo/einvoicing/actions\"\u003e\u003cimg src=\"https://github.com/josemmo/einvoicing/workflows/CI/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/josemmo/einvoicing\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/josemmo/einvoicing\" alt=\"Latest Version\"\u003e\u003c/a\u003e\n    \u003ca href=\"#installation\"\u003e\u003cimg src=\"https://img.shields.io/packagist/php-v/josemmo/einvoicing\" alt=\"Supported PHP Versions\"\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/josemmo/einvoicing\" alt=\"License\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://josemmo.github.io/einvoicing/\"\u003e\u003cimg src=\"https://img.shields.io/badge/online-docs-blueviolet\" alt=\"Documentation\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## About\neInvoicing is a PHP library for creating and reading electronic invoices according to the [eInvoicing Directive and European standard](https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/eInvoicing).\n\nIt aims to be 100% compliant with [EN 16931](https://ec.europa.eu/digital-building-blocks/wikis/x/boTXGw) as well as with the most popular CIUS and extensions, such as [PEPPOL BIS](https://docs.peppol.eu/poacc/billing/3.0/bis/).\n\n## Installation\nFirst of all, make sure your environment meets the following requirements:\n\n- PHP 7.1 or higher\n- [SimpleXML extension](https://www.php.net/book.simplexml) for reading and exporting UBL/CII invoices\n\nThen, you should be able to install this library using Composer:\n\n```\ncomposer require josemmo/einvoicing\n```\n\n## Usage\nFor a proper quick start guide, visit the documentation website at\n[https://josemmo.github.io/einvoicing/](https://josemmo.github.io/einvoicing/).\n\n### Importing invoice documents\n```php\nuse Einvoicing\\Exceptions\\ValidationException;\nuse Einvoicing\\Readers\\UblReader;\n\n$reader = new UblReader();\n$document = file_get_contents(__DIR__ . \"/example.xml\");\n$inv = $reader-\u003eimport($document);\ntry {\n    $inv-\u003evalidate();\n} catch (ValidationException $e) {\n    // Invoice is not EN 16931 complaint \n}\n```\n\n### Exporting invoice documents\n```php\nuse Einvoicing\\Identifier;\nuse Einvoicing\\Invoice;\nuse Einvoicing\\InvoiceLine;\nuse Einvoicing\\Party;\nuse Einvoicing\\Presets;\nuse Einvoicing\\Writers\\UblWriter;\n\n// Create PEPPOL invoice instance\n$inv = new Invoice(Presets\\Peppol::class);\n$inv-\u003esetNumber('F-202000012')\n    -\u003esetIssueDate(new DateTime('2020-11-01'))\n    -\u003esetDueDate(new DateTime('2020-11-30'));\n\n// Set seller\n$seller = new Party();\n$seller-\u003esetElectronicAddress(new Identifier('9482348239847239874', '0088'))\n    -\u003esetCompanyId(new Identifier('AH88726', '0183'))\n    -\u003esetName('Seller Name Ltd.')\n    -\u003esetTradingName('Seller Name')\n    -\u003esetVatNumber('ESA00000000')\n    -\u003esetAddress(['Fake Street 123', 'Apartment Block 2B'])\n    -\u003esetCity('Springfield')\n    -\u003esetCountry('DE');\n$inv-\u003esetSeller($seller);\n\n// Set buyer\n$buyer = new Party();\n$buyer-\u003esetElectronicAddress(new Identifier('ES12345', '0002'))\n    -\u003esetName('Buyer Name Ltd.')\n    -\u003esetCountry('FR');\n$inv-\u003esetBuyer($buyer);\n\n// Add a product line\n$line = new InvoiceLine();\n$line-\u003esetName('Product Name')\n    -\u003esetPrice(100)\n    -\u003esetVatRate(16)\n    -\u003esetQuantity(1);\n$inv-\u003eaddLine($line);\n\n// Export invoice to a UBL document\nheader('Content-Type: text/xml');\n$writer = new UblWriter();\necho $writer-\u003eexport($inv);\n```\n\n## Roadmap\nThese are the expected features for the library and how's it going so far:\n\n- [x] Representation of invoices, parties and invoice lines as objects\n- [x] Compatibility with the most used [CIUS and extensions](https://ec.europa.eu/digital-building-blocks/wikis/display/EINVCOMMUNITY/Registry+of+CIUS+%28Core+Invoice+Usage+Specifications%29+and+Extensions)\n- [x] Export invoices to UBL documents\n- [x] Import invoices from UBL documents\n- [ ] Export invoices to CII documents\n- [ ] Import invoices from CII documents\n- [x] Proper documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosemmo%2Feinvoicing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosemmo%2Feinvoicing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosemmo%2Feinvoicing/lists"}