lino_xl.lib.vat

See vat : Adding VAT (Value-added tax) functionality.

utils

Utility functions for VAT.

(This module's source code is available here.)

Classes

Plugin(site, app_label, app_name, ...)

The Plugin object for this plugin.

class lino_xl.lib.vat.Plugin(site, app_label, app_name, app_module, needed_by)

Bases: lino.core.plugin.Plugin

The Plugin object for this plugin.

eu_country_codes = 'AT BE BG CY CZ DK DE EE ES FI FR GB GR HU HR IE IT LV\n LT LU MT NL PO PT RO SE SI SK'

A space-separated list of ISO codes that are to be considered part of the EU. This is used to define the VAT area of a partner, which in turn influences the available VAT regimes. See lino_xl.lib.vat.VatAreas.

When a member state leaves or joins the EU (and you have partners there), you can either update your Lino (we plan to keep this list up to date), or you can change it locally.

At site startup this is converted from a string to a set. Duplicate codes are ignored. For example so in your layouts_module you may write code like this:

if brexit:
    dd.plugins.vat.eu_country_codes.remove("GB")

The isocode fields in your countries.Countries table must match the codes specified here.

default_vat_regime = 'normal'

The default VAT regime. If this is specified as a string, Lino will resolve it at startup into an item of VatRegimes.

default_vat_class = 'normal'

The default VAT class. If this is specified as a string, Lino will resolve it at startup into an item of VatClasses.

declaration_plugin = None

The plugin to use as your national VAT implementation.

Available VAT declaration plugins are: lino_xl.lib.bevat, lino_xl.lib.bevats and lino_xl.lib.eevat.

get_vat_class(tt, item)

Return the VAT class to be used for given trade type and given invoice item. Return value must be an item of lino_xl.lib.vat.VatClasses.