From 81ca7f3f08a8f3e93e3dddf8617819d8fb01c599 Mon Sep 17 00:00:00 2001 From: Gunnar Suwe Date: Fri, 1 Nov 2024 16:49:10 +0100 Subject: [PATCH 1/4] Fix CASE WHEN clause for compatibility with PostgreSQL --- src/Repository/AbstractReportRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/AbstractReportRepository.php b/src/Repository/AbstractReportRepository.php index 054ae0e..7ba3ab2 100644 --- a/src/Repository/AbstractReportRepository.php +++ b/src/Repository/AbstractReportRepository.php @@ -158,7 +158,7 @@ protected function getSelectColumns(bool $isItemUnit = false, bool $isItem = fal ($isItemUnit ? 'CONCAT(item.productName, \' \' ,item.variantName) as variant_name' : ($isItem ? 'CONCAT(element.productName, \' \' , element.variantName) as variant_name' : '\'\' as variant_name')), // Adjustments - $isItemUnit ? 'item.unitPrice - (CASE WHEN tax_adjustment.neutral = 1 THEN tax_adjustment.amount ELSE 0 END) as without_tax' : '0 as without_tax', + $isItemUnit ? 'item.unitPrice - (CASE WHEN tax_adjustment.neutral = true THEN tax_adjustment.amount ELSE 0 END) as without_tax' : '0 as without_tax', // Only retrieve without_tax price for item units '(COALESCE(order_promotion_adjustment.amount, 0) + COALESCE(order_item_promotion_adjustment.amount, 0) + COALESCE(order_shipping_promotion_adjustment.amount, 0) + COALESCE(order_unit_promotion_adjustment.amount, 0)) AS without_tax_promo', 'shipping_adjustment.amount as without_tax_shipping', From 9529b95007ba146903b6747515a23a92ded8165f Mon Sep 17 00:00:00 2001 From: Gunnar Suwe Date: Fri, 1 Nov 2024 17:10:44 +0100 Subject: [PATCH 2/4] Add German translations for sales reports --- src/Resources/translations/messages.de.yml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/Resources/translations/messages.de.yml diff --git a/src/Resources/translations/messages.de.yml b/src/Resources/translations/messages.de.yml new file mode 100644 index 0000000..185d53d --- /dev/null +++ b/src/Resources/translations/messages.de.yml @@ -0,0 +1,39 @@ +monsieurbiz: + sales_reports: + ui: + title: 'Umsatzberichte' + subtitle: 'Sehen Sie Ihre Umsatzberichte an' + day_report: 'Tagesbericht' + day_report_for: 'Tagesbericht für den %date% für %channel%' + period_report: 'Zeitraum-Bericht' + period_report_for: 'Zeitraum-Bericht vom %from% bis %to% für %channel%' + global_report: 'Gesamtbericht' + average_report: 'Durchschnittsbericht' + number_of_orders: 'Anzahl der Bestellungen:' + product_report: 'Produktbericht' + product_variant_report: 'Produktvariantenbericht' + option_report: 'Optionsbericht' + option_value_report: 'Optionswert-Bericht' + statistics: 'Statistiken' + form: + channel: + label: 'Kanal' + date: + label: 'Bestimmter Tag' + from_date: + label: 'Von' + to_date: + label: 'Bis' + view: + amount_without_tax: 'Betrag ohne Steuern' + promo_amount_without_tax: 'Aktionsbetrag ohne Steuern' + shipping_amount_without_tax: 'Versandbetrag ohne Steuern' + tax_amount: 'Steuerbetrag' + total_amount: 'Gesamtbetrag mit Steuern' + number_of_orders: 'Anzahl der Bestellungen' + product_name: 'Produktname' + product_variant_name: 'Produktvariantenname' + no_result: 'Kein Ergebnis' + option_name: 'Optionsname' + option_value: 'Optionswert' + total: 'Gesamt' From 248c4cf6c79229c929c847d6efb8ad349acf03d0 Mon Sep 17 00:00:00 2001 From: Gunnar Suwe Date: Fri, 22 Nov 2024 17:49:05 +0100 Subject: [PATCH 3/4] next version --- .gitignore | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2d7b6c5..a1b4f9c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /.phpunit.result.cache /node_modules /yarn.lock +.idea/ diff --git a/composer.json b/composer.json index 0a23383..00acddd 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "license": "MIT", "require": { "php": "^8.0", - "sylius/sylius": ">=1.11 <1.14" + "sylius/sylius": ">=1.11 <=1.14" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.16", From 312b201116b4f2da1cb580cf18166550b62dacab Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Tue, 21 Jan 2025 18:59:10 +0100 Subject: [PATCH 4/4] feat(deps): add Sylius 1.14 compatibility --- .github/workflows/recipe.yaml | 11 ++--------- .github/workflows/security.yaml | 2 +- .github/workflows/tests.yaml | 2 +- .php-version.dist | 2 +- Makefile | 2 +- README.md | 10 +++++----- composer.json | 4 ++-- docker-compose.yaml.dist | 1 - 8 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/recipe.yaml b/.github/workflows/recipe.yaml index 1555c93..75a68ca 100644 --- a/.github/workflows/recipe.yaml +++ b/.github/workflows/recipe.yaml @@ -14,15 +14,8 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.0', '8.1', '8.2'] - sylius: ["~1.11.0", "~1.12.0", "~1.13.0"] - exclude: - - php: '8.2' - sylius: '~1.11.0' - - php: '8.0' - sylius: '~1.12.0' - - php: '8.0' - sylius: '~1.13.0' + php: ['8.1', '8.2', '8.3'] + sylius: ["~1.12.0", "~1.13.0", "1.14.0"] steps: - name: Setup PHP diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index c100cfa..df6525a 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.1', '8.2'] + php: ['8.1', '8.2', '8.3'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 877ce6a..35e1014 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.1', '8.2'] + php: ['8.1', '8.2', '8.3'] env: SYMFONY_ARGS: --no-tls diff --git a/.php-version.dist b/.php-version.dist index 2983cad..cf02201 100644 --- a/.php-version.dist +++ b/.php-version.dist @@ -1 +1 @@ -8.2 +8.3 diff --git a/Makefile b/Makefile index e4775e2..5b62b2a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .DEFAULT_GOAL := help SHELL=/bin/bash APP_DIR=tests/Application -SYLIUS_VERSION=1.13.0 +SYLIUS_VERSION=1.14.0 SYMFONY=cd ${APP_DIR} && symfony COMPOSER=symfony composer CONSOLE=${SYMFONY} console diff --git a/README.md b/README.md index d99ff0d..a1c598d 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ A simple plugin to have sales reports in Sylius ## Compatibility -| Sylius Version | PHP Version | -|---|---| -| 1.11 | 8.0 - 8.1 | -| 1.12 | 8.1 - 8.2 | -| 1.13 | 8.1 - 8.2 | +| Sylius Version | PHP Version | +|----------------|-----------------| +| 1.12 | 8.1 - 8.2 - 8.3 | +| 1.13 | 8.1 - 8.2 - 8.3 | +| 1.14 | 8.1 - 8.2 - 8.3 | ## Installation diff --git a/composer.json b/composer.json index 00acddd..eef16b7 100644 --- a/composer.json +++ b/composer.json @@ -5,8 +5,8 @@ "description": "A simple plugin to have sales reports in Sylius", "license": "MIT", "require": { - "php": "^8.0", - "sylius/sylius": ">=1.11 <=1.14" + "php": "^8.1", + "sylius/sylius": ">=1.12 <2.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.16", diff --git a/docker-compose.yaml.dist b/docker-compose.yaml.dist index 955683c..24d6f0c 100644 --- a/docker-compose.yaml.dist +++ b/docker-compose.yaml.dist @@ -1,4 +1,3 @@ -version: '3.8' services: database: image: mysql:8.0