From 4910f27f1faf193d851000c3dff18e53e7c1f047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20Moreno?= Date: Sun, 12 Nov 2023 12:01:06 +0100 Subject: [PATCH] Minor documentation fixes - Updated InvoiceTotals class - Updated Invoice class - Updated AllowanceOrCharge class - Updated CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++--- src/AllowanceOrCharge.php | 2 +- src/Invoice.php | 2 +- src/Models/InvoiceTotals.php | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 05214d8..a1a5467 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,17 +19,17 @@ The main repository branch is only for stable releases. ### 2. Passes static analysis inspection ``` -vendor/bin/phan --testdox +vendor/bin/phan --allow-polyfill-parser ``` ### 3. Passes all tests ``` -vendor/bin/simple-phpunit +vendor/bin/simple-phpunit --testdox ``` ### 4. Complies with EN 16931 Although the most popular European Invoicing CIUS is [PEPPOL BIS Billing 3.0](https://docs.peppol.eu/poacc/billing/3.0/), -the real deal is the "European Standard for Electronic invocing" or EN 16931. +the real deal is the "European Standard for Electronic invoicing" or EN 16931. This means that, while most users will use the [Peppol](src/Presets/Peppol.php) preset for reading and writing invoices, there are other CIUS/extensions from various member states and business sectors which might not be an exact match to PEPPOL. diff --git a/src/AllowanceOrCharge.php b/src/AllowanceOrCharge.php index 2d21b72..d585735 100644 --- a/src/AllowanceOrCharge.php +++ b/src/AllowanceOrCharge.php @@ -6,7 +6,7 @@ class AllowanceOrCharge { protected $reasonCode = null; protected $reason = null; - protected $amount = null; + protected $amount = 0; protected $isPercentage = false; use VatTrait; diff --git a/src/Invoice.php b/src/Invoice.php index 97fc946..c07df2f 100644 --- a/src/Invoice.php +++ b/src/Invoice.php @@ -134,7 +134,7 @@ class Invoice { /** * Forwarder's invoice discrepancy report * - * Document/message reporting invoice discrepancies indentified by the forwarder. + * Document/message reporting invoice discrepancies identified by the forwarder. */ const TYPE_FORWARDERS_INVOICE_DISCREPANCY_REPORT = 553; diff --git a/src/Models/InvoiceTotals.php b/src/Models/InvoiceTotals.php index 1917db4..25aa516 100644 --- a/src/Models/InvoiceTotals.php +++ b/src/Models/InvoiceTotals.php @@ -160,10 +160,10 @@ static public function fromInvoice(Invoice $inv): InvoiceTotals { /** * Update VAT map - * @param VatBreakdown[string] &$vatMap VAT map reference - * @param VatTrait $item Item instance - * @param float|null $rate VAT rate - * @param float $addTaxableAmount Taxable amount to add + * @param array &$vatMap VAT map reference + * @param VatTrait $item Item instance + * @param float|null $rate VAT rate + * @param float $addTaxableAmount Taxable amount to add */ static private function updateVatMap(array &$vatMap, $item, float $addTaxableAmount) { $category = $item->getVatCategory();