Diese Magento 2 Extension ändert automatisch deutsche Mehrwertsteuersätze (19 % und 7 %) zu einem konfigurierbaren Datum und setzt sie zu einem zweiten Datum wieder zurück, per Cronjob oder CLI-Befehl.
Conlabz_Autovat wurde für die befristete deutsche Mehrwertsteuersenkung 2020 (19 % → 16 %, 7 % → 5 %) entwickelt. Die Extension prüft per Minuten-Cronjob, ob das aktuelle Datum im konfigurierten Zeitraum liegt:
- Liegt das aktuelle Datum im Zeitraum (
Von-DatumbisBis-Datum), werden die Steuersätze für Deutschland auf 16 % bzw. 5 % gesetzt. - Liegt es außerhalb des Zeitraums, werden die Steuersätze auf 19 % bzw. 7 % zurückgesetzt.
Die Änderung erfolgt direkt in der Steuersatz-Tabelle (tax_calculation_rate) über ein eigenes Resource Model.
| Komponente | Version |
|---|---|
| Magento | 2.x (keine spezifische Minor-Version im Composer-Constraint hinterlegt, magento/framework: *) |
| PHP | keine explizite Version im composer.json hinterlegt |
composer require conlabz/magento2-module-autovat
bin/magento module:enable Conlabz_Autovat
bin/magento setup:upgradeIm Magento Backend unter Stores > Configuration > Sales > Tax > Calculation Settings:
- 16%, 5% für DE ab Datum (
autovat_from_date) - 16%, 5% für DE bis Datum (
autovat_to_date)
Standardwerte im Modul: 2020-07-01 00:00:00 bis 2020-12-31 23:59:59 (Zeitraum der deutschen MwSt-Senkung 2020), Zeitzone Europe/Berlin.
Der Cronjob conlabz_autovat läuft standardmäßig jede Minute (* * * * *).
Alternativ lässt sich der Lauf manuell über die Konsole anstoßen, mit optionalen Datumsangaben:
bin/magento autovat:cron:run --from-date="2020-07-01 00:00:00" --to-date="2020-12-31 23:59:59"Bei Fragen zu dieser Extension: conlabz.de
Conlabz_Autovat was built for the temporary 2020 German VAT rate reduction (19% → 16%, 7% → 5%). A cronjob running every minute checks whether the current date falls within a configured date range:
- If the current date is within the range (
from datetoto date), German tax rates are set to 16% and 5%. - If it's outside the range, the tax rates are reset to 19% and 7%.
The change is applied directly to the tax rate table (tax_calculation_rate) through a dedicated resource model.
| Component | Version |
|---|---|
| Magento | 2.x (no specific minor version pinned in composer, magento/framework: *) |
| PHP | no explicit version constraint in composer.json |
composer require conlabz/magento2-module-autovat
bin/magento module:enable Conlabz_Autovat
bin/magento setup:upgradeIn the Magento admin under Stores > Configuration > Sales > Tax > Calculation Settings:
- 16%, 5% für DE ab Datum (from date,
autovat_from_date) - 16%, 5% für DE bis Datum (to date,
autovat_to_date)
Default values shipped with the module: 2020-07-01 00:00:00 to 2020-12-31 23:59:59 (the 2020 German VAT reduction period), timezone Europe/Berlin.
The conlabz_autovat cron job runs every minute (* * * * *) by default.
Alternatively, trigger it manually via the console, with optional date overrides:
bin/magento autovat:cron:run --from-date="2020-07-01 00:00:00" --to-date="2020-12-31 23:59:59"For questions about this extension: conlabz.de
This extension is licensed under the MIT License. See LICENSE for details.