DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Static Taxes

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Franz Holzinger
Changed:2015-03-05T17:04:32.881062183
Email:contact@fholzinger.com
Info 2:Franz Holzinger
Info 3:
Info 4:

EXT: Static Taxes

Extension Key: static_info_tables_taxes

Copyright 2008-2015, Franz Holzinger <contact@fholzinger.com>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: Static Taxes 1

Introduction 2

What does it do? 2

Requirements 2

Credits 2

Support 2

Users manual 3

Tables Structure 3

static_taxes 3

static_tax_rates 3

Frontend API 3

Class inclusion 3

Class initialization 3

Applying consumer taxes 3

Configuration 5

Installation 5

TYPO3 6.2 5

Language Packs 5

Character encoding 5

Frontend Configuration 5

Static Template 5

TypoScript Reference 5

Change Log 6

Introduction

What does it do?

Static Info Tables is a collection of database tables which provides data on:

taxes

These tables are static. This is an enhancement to the static_info_tables extension 2.0.8+.

The API method tx_staticinfotablestaxes_div::applyConsumerTaxes does taxation as e.g. described in Taxation in Germany (value-added tax) for all the states provided in the table static_taxes.

Requirements

Versions of extension Static Info Tables (static_info_tables) >= 2.0.8 require TYPO3 4.x or 6.x.

Credits

Support

You can get support for this extension at http://jambage.com/index.php?id=162 .

Users manual

This manual provides information for developers.

Tables Structure

static_taxes

CREATE TABLE static_taxes (
        uid int(11) unsigned auto_increment,
        pid int(11) unsigned DEFAULT '0',
        starttime int(11) unsigned DEFAULT '0',
        endtime int(11) unsigned DEFAULT '0',
        tx_country_iso_2 char(2) DEFAULT '' NOT NULL,
        tx_country_iso_3 char(3) DEFAULT '' NOT NULL,
        tx_zn_code varchar(45) DEFAULT '',
        tx_name_en varchar(255) DEFAULT 'VAT',
        tx_scope tinyint(3) unsigned DEFAULT '1',
        tx_code varchar(5) DEFAULT '1',
        tx_class tinyint(3) unsigned DEFAULT '3',
        tx_rate_id tinyint(3) unsigned DEFAULT '1',
        tx_rate_uid int(11) DEFAULT '0' NOT NULL,
        tx_priority tinyint(3) unsigned DEFAULT '0',

        PRIMARY KEY (uid),
        KEY cn_iso_3 (tx_country_iso_3),
        KEY tx_rate_uid (tx_rate_uid)
);

static_tax_rates

CREATE TABLE static_tax_rates (
        uid int(11) unsigned auto_increment,
        pid int(11) unsigned DEFAULT '0',
        starttime int(11) unsigned DEFAULT '0',
        endtime int(11) unsigned DEFAULT '0',
        tx_rate decimal(19,2) DEFAULT '0.00' NOT NULL,
        tx_country_iso_3 char(3) DEFAULT '' NOT NULL,

        PRIMARY KEY (uid),
        KEY cn_iso_3 (tx_country_iso_3)
);

Frontend API

Class tx_staticinfotables_pi1 may be used in any Frontend Typo3 extension.

Some default values may be configured using the TS template constant editor. See the Configuration section.

Class inclusion

Use the following statement to include it in your script:

require_once(t3lib_extMgm::extPath('static_info_tables_taxes').'class.tx_staticinfotablestaxes_div.php');

Class initialization

This is not possible. It is a library class which does not get instantiated.

Applying consumer taxes

The following statement will return an array of taxes applicable to a sale of a specified amount to a final consumer while taking into account import-export and internal market rules (EU and Canada).

$appliedTaxesArray = tx_staticinfotablestaxes_div::applyConsumerTaxes($staticInfoObj, $amount, $taxClass, $shopCountryCode, $shopCountrySubdivisionCode, $buyerCountryCode, $buyerCountrySubdivisionCode, $EUThreshold) ;

where $taxClass takes values 0 – Non-taxable, 1 - Taxable goods, or 2 – Taxable services or reduced taxable good and where setting $EUThreshold indicates that the shop has sales to the buyer’s country beyond the regulatory threshold (meaningful only within EU internal market).

The returned array will be an array of 4-tuples of applied taxes: (‘tx_name’, ‘tx_rate’, ‘tx_amount’, ‘tx_priority’).

Configuration

Installation

TYPO3 6.2

The Due to bug #60748 you must install the extension static info tables taxes manually. Open a SQL tool like phpMyAdmin and import the script file ext_tables_static+adt.sql manually. This will remove all tables before inserting the new values.

Language Packs

The current version of the static tables do not include any other language labels than English. Other languages are provided by extra extensions and extend the current entries.

Character encoding

The tables are encoded with UTF-8. This means that if you use another encoding in your installation you have to convert the encoding.

Frontend Configuration

Static Template

When the frontend API is used, the static template “Static Info Tables Taxes” can be included in the TS template being used.

TypoScript Reference

Use the Constant Editor template tool to set these properties used by frontend API:

xxx

Property

xxx

Data type

string

Description

nothing yet

Default

Change Log

0.2.1

Version

0.2.1

Changes

Restructuring of the TCE display. Add a country ISO3 code to the tax rates table.

0.2.0

Version

0.2.0

Changes

works under TYPO3 6.2

0.0.1

Version

0.0.1

Changes

Taken from static_info_tables 2.0.7

img-1 EXT: Static Taxes - 6