Ändert MwSt-Sätze in Magento 1 automatisch zu einem konfigurierten Zeitpunkt per Cronjob, ursprünglich gebaut für die deutsche MwSt-Senkung 2020.
Ein Magento 1 Modul. Es ändert die deutschen MwSt-Sätze automatisch zu einem festgelegten Datum.
Das Modul wurde für die deutsche MwSt-Senkung 2020 gebaut. In diesem Zeitraum änderten sich die Sätze von 19% auf 16% und von 7% auf 5%.
Ein Cronjob startet das Model autovat/cron. Der Cronjob läuft jede Minute in den
ersten 6 Minuten der Stunden 0 bis 3.
Das Model vergleicht die aktuelle Zeit (Zeitzone Europe/Berlin) mit den zwei
konfigurierten Daten:
- Liegt die aktuelle Zeit im Zeitraum, setzt das Modul den Satz 19 auf 16 und den Satz 7 auf 5.
- Liegt die aktuelle Zeit nicht im Zeitraum, setzt das Modul den Satz 16 auf 19 und den Satz 5 auf 7.
Das Modul schreibt den neuen Wert direkt in die Tabelle tax_calculation_rate.
Nur die Sätze der konfigurierten Länder ändern sich.
Gehe zu System > Configuration > Sales > Tax > Calculation Settings. Drei Felder
sind verfügbar:
| Feld | Config-Pfad | Standard |
|---|---|---|
16%, 5% ab Datum |
tax/calculation/autovat_from_date |
2020-07-01 00:00:00 |
16%, 5% bis Datum |
tax/calculation/autovat_to_date |
2020-12-31 23:59:59 |
16%, 5% Länder |
tax/calculation/autovat_countries |
DE |
Die Felder sind nur im Default-Scope verfügbar.
Nutze modman oder Composer (empfohlen):
modman clone git@github.com:conlabz/magex_autovat.gitcomposer require conlabz/magex_autovatOder manuell:
cp -r code/* app/code/community/Conlabz/AutoVat/
touch app/etc/modules/Conlabz_Autoversioning.xml
cp shell/* shell/Danach die Änderung ausführen (optional):
php shell/autovat.phpMagento-Cache nach der Installation leeren.
Die Änderung kann auch manuell gestartet werden:
php shell/autovat.php
php shell/autovat.php --from-date "2020-07-01 00:00:00" --to-date "2020-12-31 23:59:59"
Die beiden Argumente sind optional. Wird ein Argument angegeben, ersetzt es den konfigurierten Wert.
- Die alten und neuen Sätze stehen im Code. Sie sind nicht konfigurierbar.
- Das Modul ändert nur Sätze mit exakt dem Wert 19, 7, 16 oder 5.
- Cache leeren nach einer Änderung, falls der Shop Steuerdaten cacht.
Fragen oder Support: conlabz.de
A Magento 1 module. It changes the German VAT rates automatically at a given date.
The module was made for the German VAT reduction in 2020. In that period the rates changed from 19% to 16% and from 7% to 5%.
A cron job starts the model autovat/cron. The cron job runs every minute in the
first 6 minutes of the hours 0 to 3.
The model compares the actual time (time zone Europe/Berlin) with the two
configured dates:
- If the actual time is in the period, the module sets the rate 19 to 16 and the rate 7 to 5.
- If the actual time is not in the period, the module sets the rate 16 to 19 and the rate 5 to 7.
The module writes the new value directly into the table tax_calculation_rate.
Only the rates of the configured countries change.
Go to System > Configuration > Sales > Tax > Calculation Settings. Three fields
are available:
| Field | Config path | Default |
|---|---|---|
16%, 5% ab Datum |
tax/calculation/autovat_from_date |
2020-07-01 00:00:00 |
16%, 5% bis Datum |
tax/calculation/autovat_to_date |
2020-12-31 23:59:59 |
16%, 5% Länder |
tax/calculation/autovat_countries |
DE |
The fields are only available on the default scope.
Use modman or Composer (recommended):
modman clone git@github.com:conlabz/magex_autovat.gitcomposer require conlabz/magex_autovatOr manually:
cp -r code/* app/code/community/Conlabz/AutoVat/
touch app/etc/modules/Conlabz_Autoversioning.xml
cp shell/* shell/Then run the change (optional):
php shell/autovat.phpClear Magento cache after installation.
You can also start the change manually:
php shell/autovat.php
php shell/autovat.php --from-date "2020-07-01 00:00:00" --to-date "2020-12-31 23:59:59"
The two arguments are optional. If you give an argument, it replaces the configured value.
- The old and the new rates are in the code. You cannot configure them.
- The module changes only rates that have exactly the value 19, 7, 16 or 5.
- Flush the cache after a change if your shop caches tax data.
Questions or support: conlabz.de
Diese Extension steht unter der MIT-Lizenz. Details siehe LICENSE.