diff --git a/ChangeLog.md b/ChangeLog.md index e6e094a..4014e8e 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,4 +2,13 @@ ## 1.0.0 -Initial version +- Initial version + +## 2.0.0 + +- Transform to a Dolibarr module + +## 2.0.1 + +- Update Swiss QR Bill library to 5.3 +- Fix issue for temporary invoice using a reference number \ No newline at end of file diff --git a/core/modules/facture/doc/pdf_swissqr.modules.php b/core/modules/facture/doc/pdf_swissqr.modules.php index 247e5ad..1118f87 100644 --- a/core/modules/facture/doc/pdf_swissqr.modules.php +++ b/core/modules/facture/doc/pdf_swissqr.modules.php @@ -129,7 +129,7 @@ class pdf_swissqr extends pdf_sponge if (str_contains($ref, 'PROV')) { - $ref = 0; + $ref = 1; } $ref = preg_replace('/[^0-9]/', '', $ref); @@ -212,6 +212,6 @@ class pdf_swissqr extends pdf_sponge $output = new QrBill\PaymentPart\Output\TcPdfOutput\TcPdfOutput($qrBill, 'en', $pdf); } - $output->setPrintable(false)->getPaymentPart(); + $output->getPaymentPart(); } } \ No newline at end of file diff --git a/core/modules/modSwissqr.class.php b/core/modules/modSwissqr.class.php index e8eb313..14aabc0 100644 --- a/core/modules/modSwissqr.class.php +++ b/core/modules/modSwissqr.class.php @@ -75,7 +75,7 @@ class modSwissqr extends DolibarrModules $this->editor_url = 'https://sinabe.ch'; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z' - $this->version = '2.0.0'; + $this->version = '2.0.1'; // Url to the file with your last numberversion of this module $this->url_last_version = 'https://modules-dolibarr.sinabe.ch/swissqr/versionmodule.txt'; diff --git a/includes/composer.json b/includes/composer.json index bd51c6b..7ee67d6 100644 --- a/includes/composer.json +++ b/includes/composer.json @@ -5,6 +5,6 @@ } }, "require": { - "sprain/swiss-qr-bill": "^4.20" + "sprain/swiss-qr-bill": ">=4.20" } } diff --git a/includes/composer.lock b/includes/composer.lock index 68bd885..7f28a7d 100644 --- a/includes/composer.lock +++ b/includes/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9d65b8bb11b1ddc5f9d591023e54ad7f", + "content-hash": "a92ba7cc9d2fc5b76bd3239e21e23cfd", "packages": [ { "name": "bacon/bacon-qr-code", - "version": "v3.0.1", + "version": "v3.0.3", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "f9cc1f52b5a463062251d666761178dbdb6b544f" + "reference": "36a1cb2b81493fa5b82e50bf8068bf84d1542563" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f9cc1f52b5a463062251d666761178dbdb6b544f", - "reference": "f9cc1f52b5a463062251d666761178dbdb6b544f", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/36a1cb2b81493fa5b82e50bf8068bf84d1542563", + "reference": "36a1cb2b81493fa5b82e50bf8068bf84d1542563", "shasum": "" }, "require": { @@ -27,8 +27,9 @@ }, "require-dev": { "phly/keep-a-changelog": "^2.12", - "phpunit/phpunit": "^10.5.11 || 11.0.4", + "phpunit/phpunit": "^10.5.11 || ^11.0.4", "spatie/phpunit-snapshot-assertions": "^5.1.5", + "spatie/pixelmatch-php": "^1.2.0", "squizlabs/php_codesniffer": "^3.9" }, "suggest": { @@ -56,9 +57,9 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "support": { "issues": "https://github.com/Bacon/BaconQrCode/issues", - "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.1" + "source": "https://github.com/Bacon/BaconQrCode/tree/v3.0.3" }, - "time": "2024-10-01T13:55:55+00:00" + "time": "2025-11-19T17:15:36+00:00" }, { "name": "dasprid/enum", @@ -233,16 +234,16 @@ }, { "name": "sprain/swiss-qr-bill", - "version": "v4.20", + "version": "v5.3", "source": { "type": "git", "url": "https://github.com/sprain/php-swiss-qr-bill.git", - "reference": "8f709ab60426c9b6cbc43fb03dee364071eda044" + "reference": "2e5e4f16ae1832d2594ab288e401ede6a76eff2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sprain/php-swiss-qr-bill/zipball/8f709ab60426c9b6cbc43fb03dee364071eda044", - "reference": "8f709ab60426c9b6cbc43fb03dee364071eda044", + "url": "https://api.github.com/repos/sprain/php-swiss-qr-bill/zipball/2e5e4f16ae1832d2594ab288e401ede6a76eff2a", + "reference": "2e5e4f16ae1832d2594ab288e401ede6a76eff2a", "shasum": "" }, "require": { @@ -250,14 +251,11 @@ "ext-bcmath": "*", "ext-dom": "*", "kmukku/php-iso11649": "^1.5", - "php": "~8.1.0|~8.2.0|~8.3.0|~8.4.0", - "symfony/intl": "^4.4|^5.0|^6.0|^7.0", + "php": "~8.1.0|~8.2.0|~8.3.0|~8.4.0|~8.5.0", + "symfony/intl": "^6.3|^7.0|^8.0", "symfony/polyfill-intl-icu": "^1.23", "symfony/polyfill-mbstring": "^1.30", - "symfony/validator": "^4.4|^5.0|^6.0|^7.0" - }, - "conflict": { - "khanamiryan/qrcode-detector-decoder": "1.0.6" + "symfony/validator": "^6.3|^7.0|^8.0" }, "require-dev": { "dg/bypass-finals": "^1.8", @@ -292,7 +290,7 @@ "description": "A PHP library to create Swiss QR bills", "support": { "issues": "https://github.com/sprain/php-swiss-qr-bill/issues", - "source": "https://github.com/sprain/php-swiss-qr-bill/tree/v4.20" + "source": "https://github.com/sprain/php-swiss-qr-bill/tree/v5.3" }, "funding": [ { @@ -300,7 +298,7 @@ "type": "github" } ], - "time": "2025-02-25T08:57:29+00:00" + "time": "2026-01-28T11:45:53+00:00" }, { "name": "symfony/deprecation-contracts", @@ -371,16 +369,16 @@ }, { "name": "symfony/intl", - "version": "v6.4.26", + "version": "v6.4.34", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "0cd11e99e8c505f7ee7c6f0ccc8bccb8e14e652f" + "reference": "ea1b1c555e3f0c6850605307717423ff3a0407ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/0cd11e99e8c505f7ee7c6f0ccc8bccb8e14e652f", - "reference": "0cd11e99e8c505f7ee7c6f0ccc8bccb8e14e652f", + "url": "https://api.github.com/repos/symfony/intl/zipball/ea1b1c555e3f0c6850605307717423ff3a0407ad", + "reference": "ea1b1c555e3f0c6850605307717423ff3a0407ad", "shasum": "" }, "require": { @@ -434,7 +432,7 @@ "localization" ], "support": { - "source": "https://github.com/symfony/intl/tree/v6.4.26" + "source": "https://github.com/symfony/intl/tree/v6.4.34" }, "funding": [ { @@ -454,7 +452,7 @@ "type": "tidelift" } ], - "time": "2025-09-07T21:26:26+00:00" + "time": "2026-02-08T20:40:30+00:00" }, { "name": "symfony/polyfill-ctype", @@ -794,16 +792,16 @@ }, { "name": "symfony/translation-contracts", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d" + "reference": "65a8bc82080447fae78373aa10f8d13b38338977" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/df210c7a2573f1913b2d17cc95f90f53a73d8f7d", - "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/65a8bc82080447fae78373aa10f8d13b38338977", + "reference": "65a8bc82080447fae78373aa10f8d13b38338977", "shasum": "" }, "require": { @@ -852,7 +850,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.6.1" }, "funding": [ { @@ -863,25 +861,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-27T08:32:26+00:00" + "time": "2025-07-15T13:41:35+00:00" }, { "name": "symfony/validator", - "version": "v6.4.26", + "version": "v6.4.34", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "3ed456b3cd04e61fc7ed2601805fee3c1130663a" + "reference": "7c3897b7f739d4ab913481e680405ca82d08084d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/3ed456b3cd04e61fc7ed2601805fee3c1130663a", - "reference": "3ed456b3cd04e61fc7ed2601805fee3c1130663a", + "url": "https://api.github.com/repos/symfony/validator/zipball/7c3897b7f739d4ab913481e680405ca82d08084d", + "reference": "7c3897b7f739d4ab913481e680405ca82d08084d", "shasum": "" }, "require": { @@ -949,7 +951,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v6.4.26" + "source": "https://github.com/symfony/validator/tree/v6.4.34" }, "funding": [ { @@ -969,7 +971,7 @@ "type": "tidelift" } ], - "time": "2025-09-25T15:37:27+00:00" + "time": "2026-02-23T17:49:24+00:00" } ], "packages-dev": [],