fr

package
v0.200.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

README

🇫🇷 GOBL France Tax Regime

Example FR GOBL files can be found in the examples (YAML uncalculated documents) and examples/out (JSON calculated envelopes) subdirectories.

Tax IDs

France has three main company IDs which are all very closely related and may be included on Invoice documents:

  • VAT code, an 11 digit number that starts with a two digit checksum followed by 9 numbers that form the SIREN. In standardised form, this is always presented with the country code (FR), e.g. 44732829320 or FR44732829320.
  • SIREN is the national company ID register and consists of 9 digits with a final digit representing a checksum, e.g. 732829320.
  • SIRET is the SIREN with an additional 5 digits representing a department inside the company or tax agency, e.g. 73282932000015

During the normalization process of Tax Identities, GOBL will automatically convert a SIREN into a VAT code by adding the checksum to beginning.

The SIREN and SIRET numbers may also be defined inside the org.Party's identities property, for example a supplier inside an invoice might look like:

{
  "tax_id": {
    "country": "FR",
    "code": "44732829320"
  },
  "name": "Dummy FR Inc.",
  "addresses": [
    {
      "num": "1",
      "street": "Rue Sundacsakn",
      "locality": "Saint-Germain-En-Laye",
      "code": "75050",
      "country": "FR"
    }
  ],
  "emails": [
    {
      "addr": "email@dummycom.fr"
    }
  ],
  "identities": [
    {
      "type": "SIREN",
      "code": "732829320"
    },
    {
      "type": "SIRET",
      "code": "73282932000015"
    }
  ]
}

Documentation

Overview

Package fr provides the tax region definition for France.

Index

Constants

View Source
const (
	IdentityTypeSIREN cbc.Code = "SIREN" // SIREN is the main local tax code used in france, we use the normalized VAT version for the tax ID.
	IdentityTypeSIRET cbc.Code = "SIRET" // SIRET number combines the SIREN with a branch number.
	IdentityTypeRCS   cbc.Code = "RCS"   // Trade and Companies Register.
	IdentityTypeRM    cbc.Code = "RM"    // Directory of Traders.
	IdentityTypeNAF   cbc.Code = "NAF"   // Identifies the main branch of activity of the company or self-employed person.
)

Identification keys used for additional codes not covered by the standard fields.

Variables

This section is empty.

Functions

func New

func New() *tax.RegimeDef

New provides the tax region definition

func Normalize added in v0.200.0

func Normalize(doc any)

Normalize will attempt to clean the object passed to it.

func Validate

func Validate(doc interface{}) error

Validate checks the document type and determines if it can be validated.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL