Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
    • Graphic
    • HTML / PHP / CMS
    • Java
    • PL / SQL
    • Magento
    • python
    • Asterisk
    • C / C++
    • JavaScript
    • Json
    • Magento
      • Cache
      • Configuration
        • Address fix
        • Breadcrumb
        • CMS extension
        • Category banner
        • Category mouse over
        • Currency exchange
        • Customer salutation
        • Customi Shop by
        • Delete order
        • Featured items
        • Fix PayPal bug
        • Footer
        • German tax
          • german_tax.sql
        • Google +1 Button
        • GoogleAnalytics fix
        • Image Sitemap
        • Language
        • Lightbox
        • Magento Cron
        • Magento SQLs
        • Magento
        • Magento product back button
        • Market Ready Germany
        • Move Cart to Header
        • Multistore 404 Fix
        • Newsletter import
        • NoRegion
        • PayPal
        • Price on request
        • Redirect language
        • Reflection
        • Remove Add to compare
        • Search by Category
        • Session timeout
        • Set featured products
        • Shadowbox
        • Terms and Conditions
        • Theme
        • Top category offer
        • Update core config data
        • Update footer year
        • Update free shipping
        • Upload field
        • VertNav
        • formal customer name
        • local.xml
        • magento_easy_flags
        • proceed to checkout button
        • recently viewed
        • wishlist
      • Database select
      • Delete unused product images
      • Erase credit card
      • Installation
      • Java Connector
      • Magento code snippet
      • mkMagentoDump.sh
      • snippets
    • OpenOffice / LibreOffice
    • Perl
    • Postfix
    • Regular Expression
    • TLA
    • Tomcat
    • Zenity
    • bash
    • find
    • git
    • ofbiz
    • wildfly
    • xml
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
-- delete all tax definitions
DELETE FROM tax_calculation_rule;
DELETE FROM tax_class;
DELETE FROM tax_calculation_rate;
DELETE FROM tax_calculation;

-- create  tax_class
INSERT INTO tax_class(class_name, class_type) VALUES
('Umsatzsteuerpfichtige Güter 19%','PRODUCT'),
('Umsatzsteuerpfichtige Güter 7%','PRODUCT'),
('Umsatzsteuerfreie Güter','PRODUCT'),
('inkl. Mehrwertsteuer','CUSTOMER');

-- update ids
UPDATE tax_class SET class_id = 19 where class_name = 'Umsatzsteuerpfichtige Güter 19%';
UPDATE tax_class SET class_id = 7 where class_name = 'Umsatzsteuerpfichtige Güter 7%';
UPDATE tax_class SET class_id = 0 where class_name = 'Umsatzsteuerfreie Güter';
UPDATE tax_class SET class_id = 1 where class_name = 'inkl. Mehrwertsteuer';

-- create tax_calculation_rate
INSERT INTO tax_calculation_rate(tax_country_id, tax_region_id, tax_postcode, code, rate, zip_is_range, zip_from, zip_to) VALUES
('DE', 0, '*', '19% Steuer', 19.00, NULL, NULL, NULL),
('DE', 0, '*', '7% Steuer', 7.00, NULL, NULL, NULL),
('DE', 0, '*', '0% Steuer', 0.00, NULL, NULL, NULL);


INSERT INTO tax_calculation_rule(code, priority, position) VALUES
('Produkte mit 19% Mwst.', 2, 0),
('Produkte mit 7% Mwst.', 1, 0),
('Umsatzsteuerfreie Güter', 0, 0);


--  create roule for 19%
INSERT INTO tax_calculation	
select (
	select tax_calculation_rate_id
	from tax_calculation_rate
	where code = '19% Steuer'
	and tax_country_id = 'DE'
) tax_calculation_rate_id, (
	select tax_calculation_rule_id
	from tax_calculation_rule
	where code = 'Produkte mit 19% Mwst.'
) tax_calculation_rule_id, (
	select class_id
	from tax_class
	where class_name = 'inkl. Mehrwertsteuer'
	and class_type = 'CUSTOMER'
) customer_tax_class_id, (
	select class_id 	 	
	from tax_class
	where class_name = 'Umsatzsteuerpfichtige Güter 19%'
	and class_type = 'PRODUCT'
) product_tax_class_id;


--  create roule for 7%
INSERT INTO tax_calculation	
select (
	select tax_calculation_rate_id
	from tax_calculation_rate
	where code = '7% Steuer'
	and tax_country_id = 'DE'
) tax_calculation_rate_id, (
	select tax_calculation_rule_id
	from tax_calculation_rule
	where code = 'Produkte mit 7% Mwst.'
) tax_calculation_rule_id, (
	select class_id
	from tax_class
	where class_name = 'inkl. Mehrwertsteuer'
	and class_type = 'CUSTOMER'
) customer_tax_class_id, (
	select class_id 	 	
	from tax_class
	where class_name = 'Umsatzsteuerpfichtige Güter 7%'
	and class_type = 'PRODUCT'
) product_tax_class_id;


--  create roule for 0%
INSERT INTO tax_calculation	
select (
	select tax_calculation_rate_id
	from tax_calculation_rate
	where code = '0% Steuer'
	and tax_country_id = 'DE'
) tax_calculation_rate_id, (
	select tax_calculation_rule_id
	from tax_calculation_rule
	where code = 'Umsatzsteuerfreie Güter'
) tax_calculation_rule_id, (
	select class_id
	from tax_class
	where class_name = 'inkl. Mehrwertsteuer'
	and class_type = 'CUSTOMER'
) customer_tax_class_id, (
	select class_id 	 	
	from tax_class
	where class_name = 'Umsatzsteuerfreie Güter'
	and class_type = 'PRODUCT'
) product_tax_class_id;

-- update ids (old)
--UPDATE tax_calculation_rule SET tax_calculation_rule_id = 19 where code = 'Produkte mit 19% Mwst.';
--UPDATE tax_calculation_rule SET tax_calculation_rule_id = 7 where code = 'Produkte mit 7% Mwst.';
--UPDATE tax_calculation_rule SET tax_calculation_rule_id = 0 where code = 'Umsatzsteuerfreie Güter';

-- view all tax roules
SELECT * from tax_class;

--SELECT tax_calculation_rule_id, code
--FROM tax_calculation_rule
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung