Spainaeatmodelo340/Functional Documentation
Document sign-off
Role | Name | Sign-off date
|
Development | Victor Martinez |
Document Status
Date | Author or editor | Description of change | Document status | Document version |
July 21st, 2010 | Patricia San Juan | Document creation | Draft | V1 |
Overview & Justification
Purpose
The purpose of this document is to describe the functional specifications for a new commercial module which is the “340 VAT statement” as a valid file.
340 VAT statement is aimed to include every invoice contained in the "Invoice Register Books"
340 VAT statement must be sent to the Tax Authorities either monthly or quarterly within the 20 days of the next Month/Quarter, respectively.
This report must be mandatory sent through the INTERNET – on line submission of a valid 340 file.
On line submission implies that the Spanish companies must have a Tax ID as well as a user Certificate X.509.V3 issued by FNMT or any other valid Certificate according to tax authorities requirements.
This new feature is going to be developed and delivered as a new commercial module which will be part of the Professional Edition of the Spanish Pack which will be implemented according to the Technical Documentation which can be found here : Spain AEAT Modelo 340 Technical Documentation
Scope
In Scope:
It is in scope of this project the submission of the 340 VAT Statement as a valid txt file, through below AEAT (Spanish Public Treasury) link:
It is important to highlight that the 340 VAT statement will take into account as Deductible VAT the 100% of VAT
A 100% of Deductible VAT means the VAT included in any "Account Payable" related transaction such as a purchase invoice can be 100% deducted
340 VAT statement file is going to include the content of the "Invoice Register Books" listed below :
- Purchase (Received) Invoices Register Book
- Sales (Issued) Invoices Register book
These books are already implemented in Openbravo.
For more information take a look in the following link:Invoices Register Books
Out of Scope
340 VAT statement file is not going to include the content of the "Invoice Register Books" listed below:
- a book named in Spanish "'Libro registro de determinadas operaciones intracomunitarias'", because this book includes not very common intracomunity transactions.
- a book named in Spanish "Libro registro de bienes de inversión, because this book is only mandatory in the case of a non 100% VAT deductible,
what it is called in Spanish "Prorrata de IVA", which is not currently managed in Openbravo.
It is also out of scope "Complentary Declarations or Statements".
A complementary declaration is a 340 VAT statement file including invoices which were not included in an already submitted 340 VAT statement file for a given period, regardless there should have been included.
Finally, it is also out of scope, operation with below "operation keys":
- "A" - "Asiento resumen de facturas"
- "B" - "Asiento resumen de tique"
- "F" - "Adquisicions realizadas por las agencias de viajes"
- "G" - "Régimen especial de grupo de entidades"
- "H" - "Régimen especial de oro de inversión
- "J" - "Tiques"
- "K" - "Rectificación de errores registrales
- "L" - "Aqquisiciones a comerciantes minoristas del IGIC"
Justification
340 VAT statement is a legal requirement in Spain under "Orden EHA/3787/2008, dated on December 29th (BOE December 30th, 2008); which describes 340 VAT statement logical and physical design
as well as the way and time for its submission to the Spanish tax authorities.
New definitions and acronyms
VAT => Value-added tax
VAT Payable => Value-added tax included in any "Account Receivable" related transactions such a "sales invoice or a collection from a customer", in Spanish (IVA Devengado)
VAT Deductible => Value-added tax included in any "Account Payable" related transactions such a "purchase invoice or a payment to a vendor" which is 100% deductible, in Spanish (IVA Deducible) .
AEAT=> Acronyms for the Spanish Public Treasury = “Agencia Estatal de Administración Tributaria”
Tax Base Amount => it is the same as "Taxable Amount", which means the net amount VAT is calculated for, in Spanish "Base Imponible".
Tax Amount => VAT amount, in Spanish "Cuota tributaria"
Tax Rate => VAT %, in Spanish "Tipo impositivo"
Total Amount => this one is the Invoice gross amount, including VAT.
Users & business process description
User goals
340 VAT Settlement will allow the end user to:
- Launch the purchase and sales invoices register books for a given period. Submission period can either be "monthy" or "quarterly".
- Generate the 340 file containing both Books for the same period, as a valid file according to Spanish Tax Authotities requirements.
- Review and validate the 340 file generated here "Programa Prevalidación"
- Submit the 340 file to the tax authorities via INTERNET (on-line submission), here: Presentación eléctronica
User Roles and Personas
The following roles are involved:
Accounting Manager (Mary):
Mary is the accounting manager. She is the accountant responsible, therefore she needs to make sure that the Company complies with the Tax Laws.
She should be able to review each invoice register book, make them final and get the 340 file to be submitted to the tax authorities.
Sales staff (Mike): Mike is an employee part of the sales staff. He will be the one issuing sales invoices in the system, which therefore must be part of the 340 statement, for a given period.
Purchase staff (Alice): Alice is an employee part of the purchase staff. She will be the one entering purchase invoices in the system, which therefore must be part of the 340 statement, for a given period.
Business scenario/s
Small Bazaar is an enterprise located in Spain made of several subsidiaries. Small Bazaar Holding is the parent company while, Small Bazaar Pamp and Small Bazaar Barc are two subsidiaries. Each subsidiary is modeled in OB ERP as a legal entity organization.
As part of each organization daily business, Mike issues sales invoices.
Sales Invoices can be any of the sales invoice types listed below:
- "National" goods & services sales - sales of goods and/or services in Spain
- "Intracommunity" goods & services sales - sales of goods and/or services to any of the EU country.
- "Exports" of goods & services - sales of goods and/or services to any of the rest of countries.
- "Exempt" or "Not subject to VAT" sales - sales of goods and/or services which are not subject to VAT or are exempt.
Every sales invoice of any type above, must have a "correlative" Invoice Number by having into account the Invoice Date.
The sales invoices for a given period must be included in the sales invoice register book for that period.
As part of each organization daily business, Alice must keep tracking of all the purchase invoices received by the Organization, by taking into account the date when were received.
Purchase Invoices can be any of the purchase invoice types listed below:
- "National" goods & services purchase - purchase of goods and/or services in Spain
- "Intracommunity" goods & services purcase - purchase of goods and/or services from any of the EU country.
- "Imports" of goods & services - purchase of goods and/or services from any of the rest of countries.
- "Exempt" or "Not subject to VAT" purchase - purchase of goods and/or services which are not subject to VAT or are exempt.
Every single purchase invoice of any type, must be included in the received invoice register book as they are received, and all of them must be numbered in a correlative way.
Finally, few dates after the corresponding VAT settlement period, Mary must be able to review the books, make the required changes and generate the 340 file for its periodicall submission.
Functional requirements
Functional Requirement 1 - 340 VAT statement generation
It should be possible to generate a 340 VAT statement for a given period, including the content of the existing "Purchase and Sales Invoice Register Books" for that period.
There should be a new "Process" window at the application path:
"Financial Management // Accounting // Analysis Tools"; where the end-user is going to be able to:
- Select the "Organization" for which the 340 VAT statement file is required
- Select the Purchase/Received Invoice Book to include in the file
- Select the Sales/Issued Invoice Book to include in the file
- Flag a 340 VAT statement file as "Supplementary Declaration", in the case it is needed to generate once more a file already generated and submitted for a given period, because there are some transactions which were not included for whatever kind of reason.
- If the flag "Supplementary declaration" is selected, a new field named "340 VAT statement ID", for the end-user to enter the ID number of the 340 VAT statement which is being re-sent.
- Enter the "VAT settlement ID" given by the tax authorities for a given period.
That new process window is going to work as described below:
- Once a book is selected, the system will show as read only the fields:
- Period From
- Period To
Therefore the end-user will only be able to select the second book for the same periods from/to than the ones for the first book selected.
- It should be possible to select only one book, in the case that there is no a book for a give period.
- Once the book/s are selected and the periods are the same, the end user will be able ot press a process button to generate the file.
The system will generate a valid 340 VAT statement file, according to the functional requirement 6 below, with a secuencial number starting by "340......"
Functional Requirement 2 - 340 VAT statement setup
As described in the functional requirement 1, the purchase and sales invoice register books for a given period are going to be part of the 340 VAT statement file.
It is important to remark that:
- The content of each books is setup based on the selection of VAT Tax Rates linked to a Document Type (AP/AR Invoice / AP/AR Credit Memo).
- Openbravo delivered two modules containing the Books setup for 2010 and before, as well as 2011. Therefore there is no any specific setup needed for the 340 VAT statement.
- These two setup modules delivered include "Good and Services VAT Tax Rates", what we call in Spanish "Bienes Corrientes"; as well as "Capital Goods VAT Rates", what we call in Spanish "Bienes de Inversión".
There is only one thing required for 340 VAT Statement setup:
A "Contact Person" and a "Phone Number", which are going to be implemented as a CORE enhancement, therefore:
It is required to implement a new section named "Tax Information" in the Organization window, Information tab. Under that new section, a new field must be created pointing to the "User" table named:
- "Contact person", in this new field the end-user is going to be able to select the "Organization User" who is going to be pointed as contact person in the 340 VAT statement file;
together with the user's phone number.
Functional Requirement 3 - Sales Invoice Book and 340 VAT statement content
There are 2 dates which can be taken into account at the time of selecting the invoices which are going to be part of a sales book for a given period:
- the invoice date
- or the accounting date
In this document we are going to take into account the "Invoice Date".
340 VAT statement implementation will take into account any of above two dates, as the 340 VAT statement will contain what the sales invoice book contains.
The sales invoice register book can be launch at the application path:
"Financial Management // Accounting // Analysis Tools // Invoice Register Book"
It is currently possible to create as many sales invoice register books as required:
- In the case of a "monthly" submission of the 340 VAT statement, end-user will have to create a sales invoice register book for each month, 12 in total, Period From/To:
- Jan-11
- Feb-11
- March-11...and so on so forth.
- In the case of a "quartly" submission of the 340 VAT statement, end-user will have to create a sales invoice register book for each quarter, 4 in total:
- Period From=Jan-11, Period To=March-11
- Period From=Apr-11, Period To=Jun-11..and so on so forth.
The 340 VAT statement of January must include the sales invoice register book of January, and this book must include the sales invoices dated on January (sales invoice date), in other words: once a sales invoice has been completed, it is included in the sales invoice register book of a given period, by taking into account its invoice date.
Example
Dated on January 1st, 2011 Mike starts issuing sales invoices. For doing so he needs to navigate to the application path:
"Sales Management // Transactions // Sales Invoice".
Once there, he needs to create new sales invoices by entering among other data, an "Invoice Date" and an "Accounting Date". The system is going to provide a correlative "Invoice Number", by filling in the field "Document No".
Once a Sales Invoice has been "completed", it is included in the issued register book of the same period as its invoice date.
Let's say that Mike issues 3 invoices in January:
- Sales invoice "001" - with an invoice date of 05-01-2011
- Sales invoice "002" - with an invoice date of 06-01-2011
- Sales invoice "003" - with an invoice date of 10-01-2011
Mike should not issue the next sales invoice, invoice number "004", with an invoice date of 02-01-2011.
Once all the sales invoices related to sales business transactions dated on January are completed, Mary will able to launch the sales invoice book of January.
Once the sales book of January is marked as final, the system will provide a correlative register number which in our case will be:
- Sales invoice "001" - with an invoice date of 05-01-2011 - Register Number 1
- Sales invoice "002" - with an invoice date of 06-01-2011 - Register Number 2
- Sales invoice "003" - with an invoice date of 10-01-2011 - Register Number 3
Above could already be a valid content of the 340 VAT statement for January, among other data. See functional requirement 6.
Dated on February 1st, 2011 Mike starts issuing sales invoices. For doing so he needs to navigate to the application path:
"Sales Management // Transactions // Sales Invoice".
Let's say that Mike issues 2 invoices in February:
- Sales invoice "004" - with an invoice date of 05-02-2011
- Sales invoice "005" - with an invoice date of 06-02-2011
Mike should not issue the next sales invoice, invoice number "006", with an invoice date of 02-02-2011.
Once all the sales invoices related to sales business transactions dated on February are completed will be shown in the sales book of January, as said before by taking into account the invoice date.
Once the sales book of February is marked as final, the system will provide a correlative register number which in our case will be:
- Sales invoice "004" - with an invoice date of 05-02-2011 - Register Number 4
- Sales invoice "005" - with an invoice date of 06-02-2011 - Register Number 5
Above could already be a valid content of the 340 VAT statement for February, among other data. See functional requirement 6.
Functional Requirement 4 - Purchase Invoice Book and 340 VAT statement content
There are 2 document numbers which can be taken into account at the time of entering the invoices which are going to be part of a purchase book for a given period:
- the "Document N0", which is a number which can be either manually entered by the end user or automatically entered by a document sequence in the field "Document No"
- the "Order Reference" (or "Supplier Reference"), which is a number which must be manually entered by the end user in the field "Order Reference" or "Supplier Reference"
Besides, there is only 1 date which is taken into account at the time of selecting the invoices which are going to be part of a purchase book for a given period:
- the accounting date
The reason why is because the received invoices must be included in the purchase invoice book as they are received; that date is likely the accounting date and not the vendor invoice date.
The purchase invoice register book can be launch at the application path:
"Financial Management // Accounting // Analysis Tools // Invoice Register Book"
It is currently possible to create as many purchase invoice register books as required:
- In the case of a "monthly" submission of the 340 VAT statement, end-user will have to create a purchase invoice register book for each month, 12 in total, Period From/To:
- Jan-11
- Feb-11
- March-11...and so on so forth.
- In the case of a "quartly" submission of the 340 VAT statement, end-user will have to create a purchase invoice register book for each quarter, 4 in total:
- Period From=Jan-11, Period To=March-11
- Period From=Apr-11, Period To=Jun-11..and so on so forth.
The 340 VAT statement of January must include the purchase invoice register book of January, and this book must include the purchase invoices with an accounting date of January (accounting date), in other words: once a purchase invoice has been completed, it is included in the purchase invoice register book of a given period, by taking into account its accounting date.
Example
Dated on January 1st, 2011 Alice starts receiving and posting purchase invoices. For doing so she needs to navigate to the application path:
"Procurement Management // Transactions // Purchase Invoice".
Once there, she needs to create register in the system new purchase invoices by entering among other data, the "Vendor Invoice Date" and the "Accounting Date". The system is going to provide a correlative "Document Number", by filling in the field "Document No", and she will also be able to enter the Vendor Invoice Number in the field "Order/Supplier Reference".
Once a Purchase Invoice has been "completed", it is included in the purchase register book of the same period as its accounting date.
Let's say that Alice receives 2 invoices in January:
- Purchase invoice "5896" - Document Nº "001" - with an invoice date of 05-01-2011 and an accounting date of 06-01-2011
- Purchase invoice "JJ896" - Document Nº "002" - with an invoice date of 06-01-2011 and an accounting date of 10-01-2011
Once all the purchase invoices are completed and posted on January, Mary will able to launch the purchase invoice book of January.
Once the purchase book of January is marked as final, the system will provide a correlative register number which in our case will be:
- Purchase invoice "5896" - Document Nº "001" - with an invoice date of 05-01-2011 and an accounting date of 06-01-2011 - Register Number 1
- Purchase invoice "JJ896" - Document Nº "001" - with an invoice date of 06-01-2011 and an accounting date of 10-01-2011 - Register Number 2
Above could already be a valid content of the 340 VAT statement for January, among other data. See functional requirement 6.
Dated on February 1st, 2011 Alice starts receiving and posting purchase invoices. For doing so he needs to navigate to the application path:
"Procurement Management // Transactions // Purchase Invoice".
Let's say that Alice receives 3 invoices in February:
- Purchase invoice "30022" - Document Nº "003" - with an invoice date of 25-01-2011 and an accounting date of 06-02-2011
- Purchase invoice "JJ897" - Document Nº "004" - with an invoice date of 30-01-2011 and an accounting date of 10-02-2011
- Purchase invoice "1580" - Document Nº "005" - with an invoice date of 02-02-2011 and an accounting date of 11-02-2011
Once all the purchase invoices are completed and posted on February, Mary will able to launch the purchase invoice book of February.
Once the purchase book of February is marked as final, the system will provide a correlative register number which in our case will be:
- Purchase invoice "30022" - with an invoice date of 25-01-2011 and an accounting date of 06-02-2011 - Register Number 3
- Purchase invoice "JJ897" - with an invoice date of 30-01-2011 and an accounting date of 10-02-2011 - Register Number 4
- Purchase invoice "1580" - with an invoice date of 02-02-2011 and an accounting date of 11-02-2011 - Register Number 5
Above could already be a valid content of the 340 VAT statement for February, among other data. See functional requirement 6.
Functional Requirement 5 - Closing periods
There is no need to close a period anymore in order to create a book and make it final.
That restriction is going to be removed, as the books needs to be marked as final in order to get a correlative numbering, prior to generating the 340 VAT statement final.
It is important to remark that:
- Once a 340 VAT statement for a given period has been generated and submitted to the tax authorities; it should be possible to generate it once more (both the book and the file), in the case of missing some transactions which should have been included for that period. That is called a suplementary declaration or statement, which is going to contain all the transactions, the ones already submitted and the new ones which were not submitted.
- Complementary declarations which modifies the content of an already submitted declaration or statement will have to be submitted from the following link: Sevicios de Consulta o Modificación de Declaraciones-340
Functional Requirement 6 - 340 file structure
340 File structure can be found in the following link:
There are going to be 2 type of records:
(in Spanish) Modelo 340 registro de tipo 1 - Registro de Declarante:
Positions | Name (english) | Name (spanish) | Description | Content |
1 | Register Type | Tipo de Registro | constant value | "1" |
2-4 | Model | Modelo | constant value | "340" |
5-8 | Year | Ejercicio | output value based on end-user selection of the "Period From" "Period To", while launching the 340 VAT statement file. | 2011 (by example) |
9-17 | Organization Tax ID | NIF Declarante | output value based on end-user selection of the "Organization", while lauching the 340 VAT statement file; system must retrieve here the Organization "Tax ID" field value. | B31313131 (by example) |
18-57 | Organization Name | Apellidos y Nombre o Razón Social del Declarante | output value based on end-user selection of the "Organization", while lauching the 340 VAT statement file; system must retrieve here the Organization "Name" field value. | Openbravo (by example) |
58 | Submission type | Tipo de soporte | constant value | "T" |
59-67 | Phone number | Teléfono | output value based on end-user selection of the "Organization", while lauching the 340 VAT statement file; system must retrieve here the Organization "Contact Person" field value, specifically the field "Phone" of the user selected. | 948112233 (by example) |
68-107 | Contact person | Persona con quien relacionarse | output value based on end-user selection of the "Organization", while lauching the 340 VAT statement file; system must retrieve here the Organization "Contact Person" field value, specifically the fields "Name" of the user selected. | Francisco de Miguel (by example) |
108-120 | 340 VAT statement ID | Número identificativo de la declaración | output value generated by the system as "340EEEEPPXXXX", where 340 is constant EEEE is the year PP is the period and XXXX is a correlative number. | 3402011030002 (by example) |
121 | Complementary declaration | Declaración Complementaria | constant value, as complementary declarations are out of scope. | "0" |
122 | Supplementary declaration | Declaración Suplementaria | output value generated by the system as "S", if the end-user has selected "Supplementary Declaration" flag while generating th 340 VAT statement file. | "S" |
123-135 | 340 VAT statement ID | Número identificativo de la declaración anterior | output value taken from the "340 VAT statement ID" field filled in by the end-user, while launching the 340 VAT statement ID in the case of a "Supplementary Declaration". | "3402011030001" (by example) |
136-137 | Period | Period | output value based on end-user selection of the "Period From" "Period To", while launching the 340 VAT statement file. It could be:"1T"- Fist Quarter "2T"- Second Quarter "3T"- Third Quarter "4T"- Forth Quarter "01"- January "02"- February "03"- March "04"- April "05"- May "06"- June "07"- July "08"- August "09"- September "10"- October "11"- November "12"- December | "07" (by example) |
138-146 | Total Nº of records | Número total de registros | output value, as the sum-up of the number of Type 2 records. | "60" (by example) |
147-147 | Total Tax Base Amount sign | Signo del Importe total de la base imponible | output value, 2 possible options: "N" in the case of a Total Tax Base Amount < 0,00 blank, in the case of a total Tax Base Amount > or = 0,00 | " " (by example) |
148-164 | Total Tax Base Amount | Importe total de la base imponible | output value, as the sum-up of the tax base amounts > 0,00 and the tax base amounts < 0,0, of each type 2 record (122-135 positions). | "00000000001000000" (by example) |
165-165 | Total Tax Amount sign | Signo del Importe total de la cuota tributaria | output value, 2 possible options: "N" in the case of a Total Tax Amount < 0,00 blank, in the case of a Total Tax Amount > or = 0,00 | " " (by example) |
166-182 | Total Tax Amount | Importe total de la cuota tributaria | output value, as the sum-up of the tax amounts > 0,00 and the tax amounts < 0,0, of each type 2 record (136-149 positions). | "00000000000180000" (by example) |
183-183 | Total Invoices Amount sign | Signo del Importe total de las facturas | output value, 2 possible options: "N" in the case of a Total Invoices Amount < 0,00 blank, in the case of a Total Invoices Amount > or = 0,00 | " " (by example) |
184-200 | Total Invoices Amount | Importe total de las facturas | output value, as the sum-up of the invoices amount > 0,00 and the invoices amount < 0,0, of each type 2 record (150-163 positions). | "00000000001180000" (by example) |
201-390 | Blanks | Espacios | constant value | " " |
391-399 | Tax ID's legal representative | NIF del representante legal | constant value | " " |
400-415 | VAT statement Id | Código electrónico Autoliquidación IVA | output value, taken from the field "VAT statement ID" which must be filled-in by the end-user, while generating the 340 VAT statement file for a given period. | "5265895256852589" |
General rules:
- All the amount must be "Positive", "negative" amounts are marked as "N"
- Empty numeric fields must be filled in with "0"
- Empty alphanumeric and alphabetical fileds must be filled in whith blanks " "
- Numeric field must be adjusted right side, and filled in by "0" left side
- Alphanumeric & alphabetical fields must be adjusted right side, and filled in by " " righ side.
- Alphanumeric & alphabetical fields must contain capital letters with no special characters and no puntuaction signs.
(in Spanish) Modelo 340 registro de tipo 2 - Libro de Facturas Expedidas
Type 2 record - Sales Invoice Register Book: each type 2 record is a sales invoice register book line.
Positions | Name (english) | Name (spanish) | Description | Content |
1 | Register Type | Tipo de Registro | constant value | "1" |
2-4 | Model | Modelo | constant value | "340" |
5-8 | Year | Ejercicio | output value based on end-user selection of the "Period From" "Period To", while launching the 340 VAT statement file. | 2011 (by example) |
9-17 | Organization Tax ID | NIF Declarante | output value based on end-user selection of the "Organization", while lauching the 340 VAT statement file; system must retrieve here the Organization "Tax ID" field value. | B31313131 (by example) |
18-26 | BP Tax ID | NIF del declarado | output value taken from the field "Tax ID" of the corresponding sales invoice register book line. | B28282828 (by example) |
27-35 | Tax ID's legal representative | NIF del representante legal | constant value | " " |
36-75 | BP Name | Apellidos y Nombre, Razón Social o denominación del declarado | output value taken from the field "Business Partner" of the corresponding sales invoice register book line. | "RESTAURANTE LUNA LLENA" (by example) |
76-77 | County Code | Código país | output value taken from the field "Country Code" of the corresponding sales invoice register book line. | " " |
78 | Tax ID Key | Clave número de identificación en el país de residencia | output value taken from the field "Tax ID Key" of the corresponding sales invoice register book line. | "1" (by example) |
79-98 | Country Tax ID | Número de identificación fiscal en el país de residencia | output value taken from the field "Country Tax ID" of the corresponding sales invoice register book line. | " " |
99 | Tax book key | Clave Tipo de libro | output value taken from the Book type: two values "E" (Sales Invoice Register Book) and "R" (Purchase Invoice Register Book) | "E" |
100 | Operation key | Clave de operación | output value taken from the field "Operation Key" of the corresponding sales invoice register book. | " " |
101-108 | Invoice date | Fecha de la expedición | output value taken from the field "Document Date" of the corresponding sales invoice register book. | "20110720" |
109-116 | Operation date | Fecha de la operación | output value taken from the field "Operation Date" of the corresponding sales invoice register book. | "20110715" |
117-121 | Tax rate | Tipo impositivo | output value taken from the field "VAT Rate" of the corresponding sales invoice register book. | "01800"
|
122 | Tax Base Amount sign | Signo del Importe de la base imponible | output value, 2 possible options: "N" in the case of a Tax Base Amount < 0,00 (field "Taxable amount" of the corresponding sales invoice register book line) blank, in the case of a total Tax Base Amount > or = 0,00 (field "Taxable amount" of the corresponding sales invoice register book line) | " " (by example) |
123-135 | Tax base amount | Importe de la base imponible | output value taken from the field "Taxable amount" of the corresponding sales invoice register book. | "0000000001000" |
136 | Tax Amount sign | Signo del Importe de la cuota tributaria | output value, 2 possible options: "N" in the case of a Tax Amount < 0,00 (field "VAT amount" of the corresponding sales invoice register book line) blank, in the case of a total Tax Amount > or = 0,00 (field "VAT amount" of the corresponding sales invoice register book line) | " " (by example) |
137-149 | Tax amount | Importe de la cuota tributaria | output value taken from the field "VAT amount" of the corresponding sales invoice register book. | "00000000000180" |
150 | Invoice total Amount sign | Signo del Importe de la factura | output value, 2 possible options: "N" in the case of a Invoice Amount < 0,00 (field "Total Gross Amount" of the corresponding sales invoice register book line) blank, in the case of a total Tax Base Amount > or = 0,00 (field "Total Gross Amount" of the corresponding sales invoice register book line) | " " (by example) |
151-163 | Invoice total amount | Importe total de la factura | output value taken from the field "Total Gross Amount" of the corresponding sales invoice register book. | "00000000001180" |
164-164 | Tax Base amount (cost value) sign | Signos de la Base imponible a coste | constant value | " " |
165-177 | Tax Base amount (cost value) | Base imponible a coste | constant value | "00000000000000" |
178-217 | Invoice Number | Identificación de la factura | output value taken from the field "Document N" of the corresponding sales invoice register book. | "0000000000001" |
218-235 | Register Number | Número de resgistro | output value taken from the field "Register Number" of the corresponding sales invoice register book. | "0000000000001" |
236-243 | Number of invoices | Número de facturas acumuladas | constant value | "0000001" |
244-245 | Number of records | Número de registros | in the case of sales invoice lines with an "operation key" = "C" (sales invoice with diferent VAT rates), system must sum-up the number of sales invoice register book lines linked to an "operation key" = "C" for a give sales invoice. | "02" |
246-325 | Cumulative range | Intervalo de identificación de la acumulación | constant value | " " |
326-365 | Reversed Invoice ID | Identificación de la factura rectificada | output value taken from the "Reversed Invoice" field linked to a sales invoice contained in a book, if any | " " |
366-370 | EC Tax Rate | Tipo de recargo de equivalencia | output value taken from the "EC Tax Rate" field of the corresponding sales invoice register book line | "00400" |
371 | EC Tax sign | Signo de la cuota del recargo de equivalencia | output value, 2 possible options: "N" in the case of a EC Tax Amount < 0,00 (field "EC Tax Amount" of the corresponding sales invoice register book line) blank, in the case of a EC Tax Amount > or = 0,00 (field "EC Tax Amount" of the corresponding sales invoice register book line) | " " |
372-384 | EC Tax amount | Cuota del recargo de equivalencia | output value taken from the "EC Tax Amount" field of the corresponding sales invoice register book line | "00000000004" |
385-500 | Blanks | Blancos | output value | " " |
(in Spanish) Modelo 340 registro de tipo 2 - Libro de Facturas Recibidas
Type 2 record - Purchase Invoice Register Book: each type 2 record is a purchase invoice register book line.
Positions | Name (english) | Name (spanish) | Description | Content |
1 | Register Type | Tipo de Registro | constant value | "1" |
2-4 | Model | Modelo | constant value | "340" |
5-8 | Year | Ejercicio | output value based on end-user selection of the "Period From" "Period To", while launching the 340 VAT statement file. | 2011 (by example) |
9-17 | Organization Tax ID | NIF Declarante | output value based on end-user selection of the "Organization", while lauching the 340 VAT statement file; system must retrieve here the Organization "Tax ID" field value. | B31313131 (by example) |
18-26 | BP Tax ID | NIF del declarado | output value taken from the field "Tax ID" of the corresponding purchase invoice register book line. | B28282828 (by example) |
27-35 | Tax ID's legal representative | NIF del representante legal | constant value | " " |
36-75 | BP Name | Apellidos y Nombre, Razón Social o denominación del declarado | output value taken from the field "Business Partner" of the corresponding purchase invoice register book line. | "SUPERMERCADOS ALIMENTACION" (by example) |
76-77 | County Code | Código país | output value taken from the field "Country Code" of the corresponding purchase invoice register book line. | " " |
78 | Tax ID Key | Clave número de identificación en el país de residencia | output value taken from the field "Tax ID Key" of the corresponding purchase invoice register book line. | "1" (by example) |
79-98 | Country Tax ID | Número de identificación fiscal en el país de residencia | output value taken from the field "Country Tax ID" of the corresponding purchase invoice register book line. | " " |
99 | Tax book key | Clave Tipo de libro | output value taken from the Book type: two values "E" (Sales Invoice Register Book) and "R" (Purchase Invoice Register Book) | "R" |
100 | Operation key | Clave de operación | output value taken from the field "Operation Key" of the corresponding purchase invoice register book. | " " |
101-108 | Invoice date | Fecha de la expedición | output value taken from the field "Document Date" of the corresponding purchase invoice register book. | "20110720" |
109-116 | Operation date | Fecha de la operación | output value taken from the field "Operation Date" of the corresponding purchase invoice register book. | "20110715" |
117-121 | Tax rate | Tipo impositivo | output value taken from the field "VAT Rate" of the corresponding purchase invoice register book. | "01800" |
122 | Tax Base Amount sign | Signo del Importe de la base imponible | output value, 2 possible options: "N" in the case of a Tax Base Amount < 0,00 (field "Taxable amount" of the corresponding purchase invoice register book line) blank, in the case of a total Tax Base Amount > or = 0,00 (field "Taxable amount" of the corresponding sales invoice register book line) | " " (by example) |
123-135 | Tax base amount | Importe de la base imponible | output value taken from the field "Taxable amount" of the corresponding purchase invoice register book. | "0000000001000" |
136 | Tax Amount sign | Signo del Importe de la cuota tributaria | output value, 2 possible options: "N" in the case of a Tax Amount < 0,00 (field "VAT amount" of the corresponding purchase invoice register book line) blank, in the case of a total Tax Amount > or = 0,00 (field "VAT amount" of the corresponding purchase invoice register book line) | " " (by example) |
137-149 | Tax amount | Importe de la cuota tributaria | output value taken from the field "VAT amount" of the corresponding purchase invoice register book. | "00000000000180" |
150 | Invoice total Amount sign | Signo del Importe de la factura | output value, 2 possible options: "N" in the case of a Invoice Amount < 0,00 (field "Total Gross Amount" of the corresponding purchase invoice register book line) blank, in the case of a total Tax Base Amount > or = 0,00 (field "Total Gross Amount" of the corresponding purchase invoice register book line) | " " (by example) |
151-163 | Invoice total amount | Importe total de la factura | output value taken as the sum up of the Tax Amount and the Tax Base Amount of the invoice. | "00000000001180" |
164-164 | Tax Base amount (cost value) sign | Signos de la Base imponible a coste | constant value | " " |
165-177 | Tax Base amount (cost value) | Base imponible a coste | constant value | "00000000000000" |
178-217 | Invoice Number | Identificación de la factura | output value taken from the field "Document Nº" of the corresponding purchase invoice register book. | "0000000000001" |
218-235 | Register Number | Número de resgistro | output value taken from the field "Register Number" of the corresponding purchase invoice register book. | "0000000000001" |
236-253 | Number of invoices | Número de facturas acumuladas | constant value | "0000001" |
254-255 | Number of records | Número de registros | in the case of purchase invoice lines with an "operation key" = "C" (purchase invoice with diferent VAT rates), system must sum-up the number of purchase invoice register book lines linked to an "operation key" = "C" for a give purchase invoice. | "03" |
256-335 | Cumulative range | Intervalo de identificación de la acumulación | constant value | " " |
336-336 | Deductible VAT Amount sign | Signo de la cuota deducible | output value, 2 possible options: "N" in the case of a Deductible tax Amount < 0,00 (field "Deductible tax amount" of the corresponding purchase invoice register book line) blank, in the case of a total Deductible tax Amount > or = 0,00 (field "Deductible tax amount" of the corresponding purchase invoice register book line) | |
337-349 | Deductible VAT Amount | Cuota deducible | output value taken from the field "Deductible tax amount" of the corresponding purchase invoice register book. | "00000000000180" |
350-500 | Blanks | Blancos | output value | " " |
Functional Requirement 8- 340 VAT statement specifics
As described above the 340 VAT statement file content is the Sales/Purchase Invoice Register Book content as already implemented in Openbravo.
The basic content of the Sales Invoice Registe Book by law is, euros (€):
- Sales Invoice number (a correlative issued invoice number, in the case of Openbravo that one is a number filled in automatically by a documente sequence in the field "Document Nº")
- Invoice date
- Operation date, if it is not the same as the invoice date
- Business Partner name (customer name)
- Business Partner tax id
- Tax base amount
- Tax rate
- Tax amount
The basic content of the Purchase Invoice Registe Book by law is, in euros (€):
- Purchase Invoice recepction number (a correlative purchase invoice number, in the case of Openbravo that one is a number filed in automatically by a document sequence in the field "Document Nº")
- Invoice date
- Operation date, if it is not the same as the invoice date
- Business Partner name (vendor name)
- Business Partner tax id
- Tax base amount
- Tax rate
- Tax amount
- Deductiblet tax amount = Tax Amount, based on 100% VAT deductible.
Besides the above, the Purchase and Sales Invoices Register Books already implemented in Openbravo, contain additional information because it is also required by the 340 VAT statement file:
- Invoice Book Type, there are 2 possible values:
- E- Issued
- R - Received
- Tax Book Key, there are several possible values:
- C - this key is automatically linked to invoice lines containing different tax rates or tax percentages (%)
- D - this key is automatically linked to invoices lines which are "negative" invoices (negative AP/AR Invoices) or credit memos (AP/AR Credit Memos).
- I - this key is automatically linked to invoice lines having an "Inversión de Sujeto Pasivo" tax rate.
- Tax Id Key, there are several possible values which must be correctly setup for each business partner:
- 1 - NIF (Spanish tax id's)
- 2 - NOI (EU tax id's)
- 3 - Pasaporte
- 4 - Documento oficial de identificación expedido por el país
- 5 - Certificado de residencia fiscal
- 6 - Otro document probatorio
- Country Code
- This field is populated in the case of BP's do not located in Spain.
- Country Tax Id
- This field is populated in the case of BP's do not located in Spain, and therefore do not having a NIF Tax id.
Functional Requirement 8 - Transactions or Document types to take into account
340 VAT Settlement must take into account below transactions/document types for each type of VAT:
VAT Payable - Account Receivable related transactions:
- Sales invoices (>0) -> Application path = Sales Management || Transactions || Sales Invoice - Document type = AR Invoice(>0).
- For for this type 303 VAT Settlement must get:
- Tax Base Amount (>0)
- Tax Amount (>0)
- Total Amount (>0)
- For for this type 303 VAT Settlement must get:
- Sales invoices (<0) -> Application path = Sales Management || Transactions || Sales Invoice - Document type = AR Invoice(<0).
- For for this type 303 VAT Settlement must get:
- Taxable Amount (<0)
- Tax Amount (<0)
- Total Amount (<0)
- For for this type 303 VAT Settlement must get:
- Sales credit memos (>0) -> Application path = Sales Management || Transactions || Sales Invoice - Document type = AR Credit Memo(>0).
- For for this type 303 VAT Settlement must get:
- Tax Base Amount (<0)
- Tax Amount (<0)
- Total Amount (<0)
- it is important to highlight that AR Invoice (<0) & AR Credit Memo (>0) should behave exactly same way.
- For for this type 303 VAT Settlement must get:
Sales Invoices above described applies to both type of Invoices detailed below:
- Product/Services related Sales Invoices
- Financial Sales Invoices by using a GL item setup as "Enable in Financial Invoices".
VAT Deductible - Account Payable related transactions:
- Purchase invoices -> Application path = Purchase Management || Transactions || Purchase Invoice - Document type = AP Invoice(>0).
- For for this type 303 VAT Settlement must get:
- Taxable Amount (>0)
- Tax Amount (>0)
- Total Amount (>0)
- For for this type 303 VAT Settlement must get:
- Purchase invoices (<0) -> Application path = Purchase Management || Transactions || Purchase Invoice - Document type = AP Invoice(<0).
- For for this type 303 VAT Settlement must get:
- Tax Base Amount (<0)
- Tax Amount (<0)
- Total Amount (<0)
- For for this type 303 VAT Settlement must get:
- Purchase credit memos (>0) -> Application path = Purchase Management || Transactions || Sales Invoice - Document type = AP Credit Memo(>0).
- For for this type 303 VAT Settlement must get:
- Tax Base Amount (<0)
- Tax Amount (<0)
- Total Amount (<0)
- it is important to highlight that AP Invoice (<0) & AP Credit Memo (>0) should behave exactly same way.
- For for this type 303 VAT Settlement must get:
Purchase Invoices above described applies to both type of Invoices detailed below:
- Product/Services related Purchase Invoices
- Financial Purchase Invoices by using a GL item setup as "Enable in Financial Invoices".
Assumptions & Dependencies
Assumptions
N/A
Dependencies
N/A
Design & Technical considerations
Design considerations
340 VAT Settlement must be implemented as a commercial module which will be later on part of the Spanish Professional Localization Pack.
Technical constraints
None
Technical Requirements
340 file generation must be based on an existing feature named “Invoice Register Books”.
User interface
New User Interface
There will be a new process window, as described below:
User interface changes
License
License code description
The Spanish Professional Pack is released under the "Openbravo Commercial License" (OBCL) as opposite as the Openbravo Public License (OPL) for open source modules
The OBCL needs to be accompanied by a "term sheet" that describes the specific licensing terms per module.
It is likely that a number of enhancements to modularity will be needed in order to store the term sheet as attributes of the module and to display them when the user acknowledges the license.
Product Strategy is responsible for publishing the license on the Openbravo web site. Developers are responsible for putting a reference to that license in the file header and to declare it in the module definition.
Functionality enabled by the license code
The functionality enable by the license code will be “303 VAT Declaration as a valid file”