From 32ac47e3f417a7c9e6c465e27ceab716e6b105e3 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 22 Jul 2024 14:01:38 +1000 Subject: [PATCH] Update Peppol integration with definitions for dedicated schemeID --- app/Services/EDocument/Standards/Peppol.php | 70 +++++++++++++++++++++ composer.lock | 12 ++-- 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/app/Services/EDocument/Standards/Peppol.php b/app/Services/EDocument/Standards/Peppol.php index 4bc0ffe8ca3e..c79a25f38ed4 100644 --- a/app/Services/EDocument/Standards/Peppol.php +++ b/app/Services/EDocument/Standards/Peppol.php @@ -55,6 +55,76 @@ class Peppol extends AbstractService use Taxer; use NumberFormatter; + /** + * used as a proxy for + * the schemeID of partyidentification + * property - for Storecove only: + * + * Used in the format key:value + * + * ie. IT:IVA / DE:VAT + * + * Note there are multiple options for the following countries: + * + * US (EIN/SSN) employer identification number / social security number + * IT (CF/IVA) Codice Fiscale (person/company identifier) / company vat number + * + * @var array + */ + private array $schemeIdIdentifiers = [ + 'US' => 'EIN', + 'US' => 'SSN', + 'NZ' => 'GST', + 'CH' => 'VAT', + 'IS' => 'VAT', + 'LI' => 'VAT', + 'NO' => 'VAT', + 'AD' => 'VAT', + 'AL' => 'VAT', + 'AT' => 'VAT', + 'BA' => 'VAT', + 'BE' => 'VAT', + 'BG' => 'VAT', + 'CY' => 'VAT', + 'CZ' => 'VAT', + 'DE' => 'VAT', + 'DK' => 'ERST', + 'EE' => 'VAT', + 'ES' => 'VAT', + 'FI' => 'VAT', + 'FR' => 'VAT', + 'GR' => 'VAT', + 'HR' => 'VAT', + 'HU' => 'VAT', + 'IE' => 'VAT', + 'IT' => 'IVA', + 'IT' => 'CF',, + 'LT' => 'VAT', + 'LU' => 'VAT', + 'LV' => 'VAT', + 'MC' => 'VAT', + 'ME' => 'VAT', + 'MK' => 'VAT', + 'MT' => 'VAT', + 'NL' => 'VAT', + 'PL' => 'VAT', + 'PT' => 'VAT', + 'RO' => 'VAT', + 'RS' => 'VAT', + 'SE' => 'VAT', + 'SI' => 'VAT', + 'SK' => 'VAT', + 'SM' => 'VAT', + 'TR' => 'VAT', + 'VA' => 'VAT', + 'IN' => 'GSTIN', + 'JP' => 'IIN', + 'MY' => 'TIN', + 'SG' => 'GST', + 'GB' => 'VAT', + 'SA' => 'TIN', + ]; + private array $InvoiceTypeCodes = [ "380" => "Commercial invoice", "381" => "Credit note", diff --git a/composer.lock b/composer.lock index 2aae0f6766f0..0037775a98d0 100644 --- a/composer.lock +++ b/composer.lock @@ -2581,7 +2581,7 @@ }, { "name": "google/apiclient-services", - "version": "v0.364.0", + "version": "v0.365.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", @@ -2619,7 +2619,7 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.364.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.365.0" }, "time": "2024-07-11T01:08:44+00:00" }, @@ -4058,12 +4058,12 @@ "source": { "type": "git", "url": "https://github.com/invoiceninja/einvoice.git", - "reference": "29736fb1a007f5fa52aee811397e1ef6611b1b8d" + "reference": "d4f80316744bbd31245900ec9799a6f66a663ed6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/29736fb1a007f5fa52aee811397e1ef6611b1b8d", - "reference": "29736fb1a007f5fa52aee811397e1ef6611b1b8d", + "url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/d4f80316744bbd31245900ec9799a6f66a663ed6", + "reference": "d4f80316744bbd31245900ec9799a6f66a663ed6", "shasum": "" }, "require": { @@ -4105,7 +4105,7 @@ "source": "https://github.com/invoiceninja/einvoice/tree/main", "issues": "https://github.com/invoiceninja/einvoice/issues" }, - "time": "2024-07-11T06:34:33+00:00" + "time": "2024-07-22T02:40:27+00:00" }, { "name": "invoiceninja/inspector",