br

package
v0.210.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

README

🇧🇷 GOBL Brazil Tax Regime

Brazil uses Notas Fiscais Eletrônicas (like NFSe, NFe or NFCe) for reporting tax information to municipality, state or federal authorities.

Find example BR GOBL files in the examples (uncalculated documents) and examples/out (calculated envelopes) subdirectories.

Public Documentation

Brazil-specific Requirements

Addresses

Brazilian addresses have 3 subdivisions relevant for tax purposes: bairro (neighbourhood), municipio (municipality) and estado (state). Specify them in GOBL addresses like this:

GOBL Field Maps to Example
locality Bairro / Neighbourhood Centro
region Município / Municipality Salvador
state Estado / State BR

For example:

"supplier": {
//...
  "addresses": [
    {
      "num": "75",
      "street": "Avenida Sete de Setembro",
      "street_extra": "Bloco C",
      "locality": "Centro", // Bairro
      "region": "Salvador", // Municipio
      "state": "BA", // State
      "code": "40060-000",
      "country": "BR"
    }
  ],
//...
Service Notes

Services notes (NFSe, Notas fiscais de servicio eletrônicas) let service providers document and report the taxes (e.g. ISS) related to the services they provision. Municipal governments regulate them.

Please also see the NFSe Addon package named br-nfse-v1, which you should include in your documents.

Municipality Code

Set the party's IBGE municipality code using the br-nfse-municipality extension.

For example:

"supplier": {
//...
  "ext": {
    "br-nfse-municipality": "2927408"
  },
//...

Use the same extension at tax level when the municipality where the ISS is levied differs from the supplier's.

For example:

"lines": [
  {
//...
    "taxes": [
      {
        "cat": "ISS",
        "ext": {
          "br-nfse-municipality": "2927408"
        }
//...
National and municipal registration

Specify the party's municipal and national registration numbers as identities using the br-nfse-municipal-reg and br-nfse-national-reg keys.

For example:

"supplier": {
//...
  "identities": [
    {
      "key": "br-nfse-municipal-reg",
      "code": "45678901234567"
    },
    {
      "key": "br-nfse-national-reg",
      "code": "12345012345678"
    }
  ],
//...
“Simples Nacional”

Report whether the party opts in for the Simples Nacional simplified regime using the br-nfse-simples-nacional extension set to any of these codes:

Code Description
1 Opt-in
2 Opt-out

For example:

"supplier": {
//...
  "ext": {
    "br-nfse-simples-nacional": "1", // Opt-in
  },
//...
Special Tax Regime

Specify a special tax regime the party is subject to using the br-nfse-special-regime set to any of these codes:

Code Description
1 Municipal micro-enterprise
2 Estimated
3 Professional Society
4 Cooperative
5 Single micro-entrepreneur (MEI)
6 Micro-enterprise or Small Business (ME EPP)

For example:

"supplier": {
//...
  "ext": {
    "br-nfse-special-regime": "4" // Cooperative
  },
//...
Fiscal Incentive

Report whether the party benefits from a fiscal incentive using the br-nfse-fiscal-incentive extension set to any of these codes:

Code Description
1 Has incentive
2 Does not have incentive (Default)

For example:

"supplier": {
//...
  "ext": {
    "br-nfse-fiscal-incentive": "2" // No tax incentive
  },
//...
Municipality service code

Specify the code assigned by the municipality to a service using the br-nfse-service extension at item level. Typically, one of the codes listed in the Lei Complementar 116/2003, but municipalities can make their own changes.

For example:

"lines": [
  {
    "item": {
//...
      "ext": {
        "br-nfse-service": "1.01"
//...
CNAE code

Set the CNAE code (National Classification of Economic Activities) for a service using the br-nfse-cnae at item level. Find the list of possible codes at the IGBE.

For example:

"lines": [
  {
    "item": {
//...
      "ext": {
        "br-nfse-cnae": "62.01-5-01"
//...
ISS Liability

Report the ISS liability -i.e. whether the tax is due or not and why– using the br-nfse-iss-liability extension at ISS tax level. Find the list of possible codes below:

Code Description
1 Liable (Default)
2 Not subject
3 Exempt
4 Export
5 Immune
6 Suspended Judicially
7 Suspended Administratively

For example:

"lines": [
  {
//...
    "taxes": [
      {
        "cat": "ISS",
        "ext": {
          "br-nfse-iss-liability": "1"
        }
//...

Documentation

Overview

Package br provides the tax region definition for Brazil.

Index

Constants

View Source
const (
	TaxCategoryISS    cbc.Code = "ISS"
	TaxCategoryICMS   cbc.Code = "ICMS"
	TaxCategoryIPI    cbc.Code = "IPI"
	TaxCategoryPIS    cbc.Code = "PIS"
	TaxCategoryCOFINS cbc.Code = "COFINS"
)

Tax categories specific for Brazil.

Variables

This section is empty.

Functions

func New

func New() *tax.RegimeDef

New provides the tax region definition

func Normalize

func Normalize(doc interface{})

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