# Account\_ar: Argentine localization

**URL:** https://discuss.tryton.org/t/account-ar-argentine-localization/3261
**Category:** Feature
**Tags:** accounting
**Created:** [September 22, 2020, 8:34pm UTC](https://discuss.tryton.org/t/account-ar-argentine-localization/3261 "2020-09-22T20:34:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lukio](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/lukio/32/98_2.png) [@lukio](https://discuss.tryton.org/u/lukio)
#### Post date: [September 22, 2020, 8:34pm UTC](https://discuss.tryton.org/t/account-ar-argentine-localization/3261/1 "2020-09-22T20:34:29Z")

</div>

# Rational

* * *

We need a module with the data and functionalities necessary to fulfill Argentina’s fiscal obligations:

- Standard chart of accounts
- Taxes
- Tax identification of parties
- Points of sale
- Types of invoices
- Reports for tax declaration

## Parties

### VAT Regime

Every party, whether it is a natural person or a legal person, has a category according to the VAT treatment.

Those currently used are:

- Responsable Inscripto
- Sujeto Exento
- Consumidor Final
- Responsable Monotributo
- Sujeto No Categorizado
- Proveedor del Exterior
- Cliente del Exterior

The issuing company can only be one of these:

- Responsable Inscripto
- Sujeto Exento
- Responsable Monotributo

### Fiscal identification

The fiscal identifier of the parties consists of a **Document type** and a **Number**.

The most used _Document types_ are:

- CUIT
- CDI
- DNI
- LE
- LC
- CUIL
- Pasaporte
- CI Extranjera
- Otro

## Invoice types

The _Invoice type_ is a combination of a **Document** and its **Class**.

### Document

The different _fiscal documents_ that can be issued are:

- Factura
- Nota de Débito
- Nota de Crédito
- Recibo
- Liquidación
- Factura de Crédito Electrónica MiPyMEs (FCE)
- Nota de Débito Electrónica MiPyMEs (FCE)
- Nota de Crédito Electrónica MiPyMEs (FCE)
- Ticket
- Ticket Factura

### Class

The _classes_ are:

- A
- B
- C
- M
- E

The class of a document is obtained according to the following rules:

```auto
<issuer == "Responsable Inscripto">
    <receiver == "Responsable Inscripto">
        class = "A"
    <receiver == "Cliente del Exterior">
        class = "E"
    <default>
        class = "B"
<default>
    class = "C"

```

That is to say:

- The “Sujeto Exento” and “Responsable Monotributo” issuers always issue class **C** documents.
- The “Responsable Inscripto” issuers issue **A** , **B** or **E** documents according to the _customer’s VAT Regime_.

Class **M** is a substitute for **A** for some companies that have just registered and are controlled by the AFIP for a period.

### Point of sale

A _fiscal point of sale_ is an invoice grouper.

The relevant data are:

- Number
- Type:
  - Electronic
  - Manual
  - Fiscal Printer

- WS AFIP:
  - None
  - wsfe: Internal market
  - wsfex: Export
  - wsbfe: Fiscal Bond

- Invoice types:
  - Invoice type (Ex: Factura A, Factura B, etc.)
  - Sequence (Exclusive or Shared Numbering)

### Invoice type example

Gathering the previous concepts we have for example: **Factura A 0001-00001234**

- Document: Factura
- Class: A
- Point of sale: 1
- Document number: 1234

## Taxes

It is important to distinguish between two types of taxes, since they are reported separately in sales:

- VAT
- Other tributes (National, Provincial, Municipal, Internal, Others)

### VAT

The different _VATs_ are:

- [1] No Gravado (Fixed 0)
- [2] Exento (Fixed 0)
- [3] 0%
- [9] 2,50%
- [8] 5%
- [4] 10,50%
- [5] 21%
- [6] 27%

Which at the same time are classified as:

- No Gravado: 1
- Exento: 2
- Gravado: 3, 4, 5, 6, 8, 9

The _VAT_ is a tax associated with the product or service sold/purchased. The VAT rate of a product/service is always the same, that is, there are no changes in the application rules or exemption per customer.

### Other tributes

In this category are the perceptions and internal taxes.

It is necessary to classify these _tributes_ as:

- [1] Nacional
- [2] Provincial
- [3] Municipal
- [4] Interno
- [99] Otro

Examples of common _Perceptions_ are:

- Percepción de Impuesto a las Ganancias
- Percepción de IVA
- Percepción de Ingresos Brutos

For some _perceptions_ there may be application/exemption rules or different rates per customer.

It would be useful to indicate, when the jurisdiction of the tax is Provincial or Municipal, to which Province or City it belongs. This could make it easier to automate application rules. Although it may already be possible to handle it manually with tax rules.

### Tax identification

To request the authorization of an invoice or to report it in the VAT books, it is necessary to obtain different subtotals from the taxes involved. For this it is necessary to classify and identify taxes accurately.

Some of the required subtotals are:

- Not Taxed Net Amount: sum of the total amount of the lines whose VAT is “No Gravado”
- Exempt Amount: sum of the total amount of the lines whose VAT is “Exento”
- Taxed Net Amount: sum of the net amount of the lines whose VAT is “Gravado” (0% - 2.5% - 5% - 10.5% - 21% - 27%)
- VAT: sum of the tax of the lines whose VAT is “Gravado”
- Other tributes (National, Provincial, Municipal, Internal, Others): all taxes other than VAT
- Amount of National Tax Perceptions
- Amount of Provincial Tax Perceptions
- Amount of Municipal Tax Perceptions
- Internal tax amount

## Other data

### Currencies

Each currency has an AFIP Code

### Countries

Each country has an AFIP Code

### Units of measure

Each unit of measure has an AFIP Code

## Reports

### Libro IVA Digital (Digital VAT Book)

> **[Ayuda - IVA - ARCA](https://www.afip.gob.ar/iva/ayuda/manuales.asp)**
>
> Guías, manuales, preguntas frecuentes, alícuotas y normativas.

### Libro IVA Ventas (Sales VAT Book)

### Libro IVA Compras (Purchase VAT Book)

## Sales per Document type and VAT Regime

## Glossary

- AFIP: Administración Federal de Ingresos Públicos
- IVA: Impuesto al Valor Agregado (VAT)
- Perception: anticipated “collection” of a provincial or national tax on the invoice.

# Proposal

1. Add a Standard chart of accounts Template

2. Add field to **`account.tax`** model (and **`account.tax.template`** ):

```auto
ar_afip_code = fields.Char('AFIP Code')

```

1. Add Tax codes Template

```auto
Ventas
   - IVA
     - Neto no Gravado
     - Exento
     - Neto Gravado
       - Neto 0%
       - Neto 2,5%
       - Neto 5%
       - Neto 10,5%
       - Neto 21%
       - Neto 27%
     - IVA
       - IVA 0%
       - IVA 2,5%
       - IVA 5%
       - IVA 10,5%
       - IVA 21%
       - IVA 27%
   - Otros tributos
     - Nacionales
       - Percepción de IVA
       - Percepción de Ganancias
     - Provinciales
       - Percepción de Ingresos Brutos
     - Municipales
     - Internos
     - Otros

Compras
   - IVA
     - Neto no Gravado
     - Exento
     - Neto Gravado
       - Neto 0%
       - Neto 2,5%
       - Neto 5%
       - Neto 10,5%
       - Neto 21%
       - Neto 27%
     - IVA
       - IVA 0%
       - IVA 2,5%
       - IVA 5%
       - IVA 10,5%
       - IVA 21%
       - IVA 27%
   - Otros tributos
     - Nacionales
       - Percepción de IVA
       - Percepción de Ganancias
     - Provinciales
       - Percepción de Ingresos Brutos
     - Municipales
     - Internos
     - Otros

```

1. Add field to **`party.party`** model:

```auto
ar_vat_regime = fields.Selection([
    ('RI', 'Responsable Inscripto'),
    ('EX', 'Sujeto Exento'),
    ('CF', 'Consumidor Final'),
    ('MO', 'Responsable Monotributo'),
    ('NC', 'Sujeto No Categorizado'),
    ('PE', 'Proveedor del Exterior'),
    ('CE', 'Cliente del Exterior'),
    ], 'VAT Regime')

```

1. Add options to the **`type`** field in **`party.identifier`** model:

```auto
('ar_cuit', 'CUIT'),
('ar_foreign', 'CUIT País'),
('ar_dni', 'DNI'),

```

1. New model “Invoice type” **`account.invoice.type`** (this could be partially in a more generic module)

```auto
code = fields.Char('Code')
name = fields.Char('Name')
ar_kind = fields.Selection([
    ('A', 'A'),
    ('B', 'B'),
    ('C', 'C'),
    ('M', 'M'),
    ('E', 'E'),
    ], 'Kind')

```

1. Add fields to **`account.journal`** model (this could be partially in a more generic module)

```auto
invoice_types = fields.One2Many('account.journal.invoice_type', 'journal',
    'Invoice types')
ar_pos_number = fields.Char('POS Number',
    states={'invisible': Eval('type') != 'revenue'})
ar_pos_type = fields.Selection([
    ('manual', 'Manual'),
    ('electronic', 'Electronic'),
    ('fiscal_printer', 'Fiscal Printer'),
    ], 'POS Type'
    states={'invisible': Eval('type') != 'revenue'})

```

1. New model “Journal Invoice type” **`account.journal.invoice_type`** (this could be in a more generic module)

```auto
journal = fields.Many2One('account.journal', 'Journal')
invoice_type = fields.Many2One('account.invoice.type', 'Invoice type')
sequence = fields.Many2One('ir.sequence', 'Sequence')

```

1. Add fields to **`account.invoice`** model (this could be partially in a more generic module)

```auto
invoice_type = fields.Many2One('account.invoice.type', 'Invoice type',
    domain=[('ar_kind', '=', Eval('ar_invoice_type_kind'))])
ar_party_vat_regime = fields.Selection() # get from party.ar_vat_regime
ar_invoice_type_kind = fields.Function(fields.Selection()):
    if self.company_party.ar_vat_regime == 'Responsable Inscripto':
        if self.party.ar_vat_regime == 'Responsable Inscripto':
            return 'A'
        elif self.party.ar_vat_regime == 'Cliente del Exterior':
            return 'E'
        else:
            return 'B'
    else:
        return 'C'

```

1. Add logic in **`account.invoice`** :

- if the journal has invoice types, then the `invoice_type` field is required (or could be always required in sales)
- according to the customer’s VAT regime (`ar_party_vat_regime`) we will obtain the correct invoice class (A, B, E, etc.)
- according to the invoice class, the types of invoices in the journal are filtered (`ar_kind`)
- once we have the invoice\_type we can search the journal for the sequence to use (`account.journal.invoice_type`)

## Implementation

Among the proposals we mention a new model for Invoice Types associated with the Journals. We think that can be part of a more generic module.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 22, 2020, 9:35pm UTC](https://discuss.tryton.org/t/account-ar-argentine-localization/3261/2 "2020-09-22T21:35:00Z")

</div>

I have a lot of questions and comments about that but as the text is not here I can not properly quote. Could you please put the text here.  
Also it will have more chance to succeed if the subject is not divided in much smaller subjects.

---

<div class="post-metadata">

### Author: ![lukio](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/lukio/32/98_2.png) [@lukio](https://discuss.tryton.org/u/lukio)
#### Post date: [September 22, 2020, 10:14pm UTC](https://discuss.tryton.org/t/account-ar-argentine-localization/3261/3 "2020-09-22T22:14:32Z")

</div>

> [@ced](#):
>
> I have a lot of questions and comments about that but as the text is not here I can not properly quote. Could you please put the text here.

I edited the post and added the text of the wiki pages to discuss.  
Thanks!

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 22, 2020, 10:30pm UTC](https://discuss.tryton.org/t/account-ar-argentine-localization/3261/4 "2020-09-22T22:30:36Z")

</div>

> [@lukio](#):
>
> Add a Standard chart of accounts Template

Did you have any links to the oficial documentation of such chart?

> [@lukio](#):
>
> 1. Add field to **`account.tax`** model (and **`account.tax.template`** ):
> 
> ```auto
> ar_afip_code = fields.Char('AFIP Code')
> 
> ```

Why is needed?

> [@lukio](#):
>
> ```auto
> ar_vat_regime = fields.Selection([
> ('RI', 'Responsable Inscripto'),
> ('EX', 'Sujeto Exento'),
> ('CF', 'Consumidor Final'),
> ('MO', 'Responsable Monotributo'),
> ('NC', 'Sujeto No Categorizado'),
> ('PE', 'Proveedor del Exterior'),
> ('CE', 'Cliente del Exterior'),
> ], 'VAT Regime')
> 
> ```

Why not using tax rules? We normally use tax rules to set the customer/supplier vat regime and update the taxes acordingly in the documents (invoices, sales, purchases,etc.)

> [@lukio](#):
>
> Add options to the **`type`** field in **`party.identifier`** model:

Should be added to python-stdnum first.

> [@lukio](#):
>
> New model “Invoice type” **`account.invoice.type`** (this could be partially in a more generic module)

Why is required?

I did not comment at all, but I see you are proposing a lot of solutions but not explaining the problems you are trying to solve.

> [@ced](#):
>
> it will have more chance to succeed if the subject is not divided in much smaller subjects.

I completly agree here. Please create several topics. For example:

- One for the chart of accounts
- One for taxes
- Another for invoice numbering

Thanks

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 22, 2020, 10:45pm UTC](https://discuss.tryton.org/t/account-ar-argentine-localization/3261/5 "2020-09-22T22:45:49Z")

</div>

> [@lukio](#):
>
> The _Invoice type_ is a combination of a **Document** and its **Class**.

What is the purpose of this combination? What does it imply?

> [@lukio](#):
>
> A _fiscal point of sale_ is an invoice grouper.

What is the point? Why should the invoice be grouped?

> [@lukio](#):
>
> The VAT rate of a product/service is always the same

But how does it work when selling to or buy from another country?

> [@lukio](#):
>
> Which at the same time are classified

What is the purpose of this classification?

> [@lukio](#):
>
> Other tributes

This is a not clear what are those tributes nor how they apply.

> [@lukio](#):
>
> To request the authorization of an invoice

What is a request of authorization of an invoice?

> [@lukio](#):
>
> New model “Invoice type” **`account.invoice.type`** (this could be partially in a more generic module)

I think the journal is enough to distinct invoices.
