add shell scripts for changing article tax rates via mysql command
Dieser Commit ist enthalten in:
Ursprung
2c5b8589c0
Commit
686f07f642
32
bin/raiseArticleTaxMysql
Normale Datei
32
bin/raiseArticleTaxMysql
Normale Datei
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Mail-Versand erfolgt bei Profihost ueber den Cronjob selbst, andere Provider erfordern ggf. expliziten Versand
|
||||
|
||||
TODAY=$(date)
|
||||
HOST=$(hostname)
|
||||
DOMAIN='myhost.de'
|
||||
|
||||
DOMAIN='myhost.de'
|
||||
MYSQLUSER='mysql_user'
|
||||
MYSQLPASS='mysql_pass'
|
||||
MYSQLDB='mysql_db'
|
||||
MYSQLHOST='127.0.0.1'
|
||||
MYSQLPORT='3306'
|
||||
|
||||
echo "------------------------------------------------------------------------------------------"
|
||||
echo "USt.-Anpassung 01.01.2021"
|
||||
echo "Date: $TODAY Host: $HOST ($DOMAIN)"
|
||||
echo "------------------------------------------------------------------------------------------"
|
||||
|
||||
printf '\n 16%% -> 19%%\n\n'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'SELECT CONCAT("Vor Umstellung: ", COUNT(*), " Artikel gefunden") as result FROM oxarticles WHERE oxvat = 16;'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'UPDATE oxarticles SET oxvat = 19 WHERE oxvat = 16;'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'SELECT CONCAT("Nach Umstellung: ", COUNT(*), " Artikel gefunden") as result FROM oxarticles WHERE oxvat = 16;'
|
||||
printf '\n'
|
||||
|
||||
echo "------------------------------------------------------------------------------------------"
|
||||
printf '\n 5%% -> 7%%\n\n'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'SELECT CONCAT("Vor Umstellung: ", COUNT(*), " Artikel gefunden") as result FROM oxarticles WHERE oxvat = 5;'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'UPDATE oxarticles SET oxvat = 7 WHERE oxvat = 5;'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'SELECT CONCAT("Nach Umstellung: ", COUNT(*), " Artikel gefunden") as result FROM oxarticles WHERE oxvat = 5;'
|
||||
printf '\n'
|
32
bin/reduceArticleTaxMysql
Normale Datei
32
bin/reduceArticleTaxMysql
Normale Datei
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Mail-Versand erfolgt bei Profihost ueber den Cronjob selbst, andere Provider erfordern ggf. expliziten Versand
|
||||
|
||||
TODAY=$(date)
|
||||
HOST=$(hostname)
|
||||
DOMAIN='myhost.de'
|
||||
|
||||
DOMAIN='myhost.de'
|
||||
MYSQLUSER='mysql_user'
|
||||
MYSQLPASS='mysql_pass'
|
||||
MYSQLDB='mysql_db'
|
||||
MYSQLHOST='127.0.0.1'
|
||||
MYSQLPORT='3306'
|
||||
|
||||
echo "------------------------------------------------------------------------------------------"
|
||||
echo "USt.-Anpassung 01.07.2020"
|
||||
echo "Date: $TODAY Host: $HOST ($DOMAIN)"
|
||||
echo "------------------------------------------------------------------------------------------"
|
||||
|
||||
printf '\n 19%% -> 16%%\n\n'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'SELECT CONCAT("Vor Umstellung: ", COUNT(*), " Artikel gefunden") as result FROM oxarticles WHERE oxvat = 19;'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'UPDATE oxarticles SET oxvat = 16 WHERE oxvat = 19;'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'SELECT CONCAT("Nach Umstellung: ", COUNT(*), " Artikel gefunden") as result FROM oxarticles WHERE oxvat = 19;'
|
||||
printf '\n'
|
||||
|
||||
echo "------------------------------------------------------------------------------------------"
|
||||
printf '\n 7%% -> 5%%\n\n'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'SELECT CONCAT("Vor Umstellung: ", COUNT(*), " Artikel gefunden") as result FROM oxarticles WHERE oxvat = 7;'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'UPDATE oxarticles SET oxvat = 5 WHERE oxvat = 7;'
|
||||
mysql5 -u$MYSQLUSER -p$MYSQLPASS -D$MYSQLDB -h$MYSQLHOST -P$MYSQLPORT -e 'SELECT CONCAT("Nach Umstellung: ", COUNT(*), " Artikel gefunden") as result FROM oxarticles WHERE oxvat = 7;'
|
||||
printf '\n'
|
In neuem Issue referenzieren
Einen Benutzer sperren