Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

conlabz AutoVat: Magento 2 Extension für automatische MwSt-Änderung per Cronjob

🇩🇪 Deutsch · 🇬🇧 English

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.

MIT License Magento 2

Deutsch

Funktion

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-Datum bis Bis-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.

Kompatibilität

Komponente Version
Magento 2.x (keine spezifische Minor-Version im Composer-Constraint hinterlegt, magento/framework: *)
PHP keine explizite Version im composer.json hinterlegt

Installation

composer require conlabz/magento2-module-autovat
bin/magento module:enable Conlabz_Autovat
bin/magento setup:upgrade

Konfiguration

Im 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"

Support

Bei Fragen zu dieser Extension: conlabz.de


English

What it does

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 date to to 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.

Compatibility

Component Version
Magento 2.x (no specific minor version pinned in composer, magento/framework: *)
PHP no explicit version constraint in composer.json

Installation

composer require conlabz/magento2-module-autovat
bin/magento module:enable Conlabz_Autovat
bin/magento setup:upgrade

Configuration

In 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"

Support

For questions about this extension: conlabz.de


License

This extension is licensed under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages