秘鲁

介绍

秘鲁本地化已得到改进和扩展,在此版本中可用以下模块:

  • l10n_pe:为秘鲁本地化添加会计功能,这代表了公司在秘鲁运营并符合SUNAT法规和指南所需的最低配置。此模块包括的主要元素有:账户图表、税收、文档类型。

  • l10n_pe_edi: includes all technical and functional requirements to generate and validate Electronic Invoice, based on the SUNAT specification to create and process valid electronic documents, for more technical detail you can access the SUNAT EDI specifications, that keeps track of new changes and updates. The features of this module are based on the resolutions published on the SUNAT Legislation.

配置

安装秘鲁本地化模块

转到 应用 并搜索 Peru,然后在模块 Peru EDI 上点击安装。此模块依赖于 Peru - Accounting。如果此模块未安装,Odoo 会自动在 EDI 中安装。

“模块”筛选器已设置为“秘鲁”

注解

当您选择秘鲁作为国家安装数据库时,Odoo会自动安装基础模块:秘鲁 - 会计。

配置您的公司

除了公司的基本信息外,我们需要将秘鲁设置为国家,这对于电子发票的正常工作至关重要。字段 地址类型代码 表示SUNAT在公司注册其RUC(唯一贡献者注册)时分配的机构代码:

秘鲁公司数据,包括RUC和地址类型代码

小技巧

如果地址类型代码未知,您可以将其设置为默认值:0000。请注意,如果输入了不正确的值,则电子发票验证可能会出现错误。

注解

NIF应按照RUC格式设置。

科目表

默认情况下,会安装账户表作为本地化模块中包含的数据集的一部分,账户会自动映射到以下位置:

  • 税费

  • 默认应付账户。

  • 默认应收账款账户

秘鲁的账户表基于最新版本的 PCGE ,它分为几个类别,并与NIIF会计兼容。

会计设置

一旦安装了模块并设置了公司的基本信息,您需要配置所需的电子发票元素。为此,请转到: 会计 ‣ 设置 ‣ 秘鲁本地化

基本概念

以下是秘鲁本地化中必不可少的一些术语:

  • EDI: 电子数据交换,这里指的是电子发票。

  • SUNAT:是负责执行秘鲁的海关和税收的组织。

  • OSE: 电子服务运营商, OSE SUNAT’s 定义.

  • CDR:收据证明(Constancia de Recepción)。

  • SOL凭证:Sunat Operaciones en Línea。用户和密码由SUNAT提供,并授予对在线操作系统的访问权限。

签名提供者

作为秘鲁电子发票的要求之一,您的公司需要选择一个签名提供商来处理文档签名过程并管理SUNAT验证响应。Odoo提供了三个选项:

  1. IAP(Odoo应用内购买)

  2. 迪吉流

  3. 国家税务总局

请参考下面的章节,以检查每个选项的详细信息和注意事项。

IAP(Odoo应用内购买)

这是默认和建议的选项,考虑到数字证书已经作为服务的一部分包含在内。

IAP选项作为签名提供者
什么是IAP?

这是Odoo直接提供的签名服务,该服务负责以下过程:

  1. 提供电子发票证书,您无需自行获取。

  2. 将文档发送给 OSE,在本例中为 Digiflow。

  3. 接收 OSE 验证和 CDR。

它是如何工作的?

该服务需要信用点才能处理您的电子文档。Odoo在新数据库中提供1000个免费信用点。使用完这些信用点后,您需要购买信用点套餐。

信用

欧元

1000

22

5000

110

10,000

220

20,000

440

每发送一份文件到 OSE,就会消耗一定数量的信用点数。

重要

如果您遇到验证错误,需要再次发送文件,则会收取额外的信用点。因此,在将文件发送给 OSE 之前,请务必验证所有信息是否正确。

你需要做什么?
  • 在Odoo中,一旦您的企业合同被激活并开始生产,您需要在消耗前1000个信用点后购买信用点。

  • 由于Digiflow是IAP中使用的OSE,您需要在SUNAT网站上将其作为您公司的官方OSE进行关联。这是一个简单的过程。有关更多信息,请查看 OSE关联指南

  • 将Digiflow注册为授权的PSE,请查看 PSE Affiliation guide.

迪吉流

您可以使用此选项作为替代方案,而不是使用IAP服务,您可以直接将您的文档验证发送到Digiflow。在这种情况下,您需要考虑以下事项:

  • 购买您自己的数字证书:有关官方供应商列表的详细信息和获取过程,请参阅 SUNAT 数字证书

  • Digiflow 直接签订服务协议。

  • 提供您的SOL凭据。

迪吉流
国家税务总局

如果您的公司想直接与SUNAT签署协议,您可以在配置中选择此选项。在这种情况下,您需要考虑:-获得SUNAT认证过程的批准。

  • 购买您自己的数字证书:有关官方供应商列表的详细信息和获取过程,请参阅 SUNAT 数字证书

  • 提供您的SOL凭据。

重要

当使用与SUNAT的直接连接时,SOL用户必须设置为公司RUT +用户ID。示例: 20121888549JOHNSMITH

测试环境

Odoo提供了一个测试环境,可以在您的公司进入生产之前激活。

当使用测试环境和IAP签名时,您不需要购买测试信用额度来验证您的交易,因为它们都是默认验证的。

小技巧

默认情况下,数据库设置为在生产环境下工作,请确保如有需要启用测试模式。

证书

如果您不使用Odoo IAP,则需要一个扩展名为 .pfx 的数字证书来生成电子发票签名。请前往此部分加载您的文件和密码。

EDI证书向导

多币种

秘鲁的官方货币汇率由秘鲁银行提供。Odoo可以直接连接其服务,自动或手动获取货币汇率。

秘鲁银行在多币种服务选项中显示

请参考我们文档中的下一节,了解更多关于 多货币 的信息。

配置主数据

税费

作为本地化模块的一部分,税收会自动创建,并配置其相关的财务账户和电子发票。

默认税收清单
EDI 配置

作为税收配置的一部分,电子发票需要三个新字段,由默认创建的税收已包含这些数据,但如果您创建新的税收,请确保填写这些字段:

秘鲁税收EDI数据

税务位置

在安装秘鲁本地化时,默认包含两个主要的财务职位。

Extranjero - Exportación: 将此财务位置设置为客户的出口交易。

本地秘鲁:将此财务位置设置为本地客户。

文件类型

在一些拉丁美洲国家,包括秘鲁,在政府财政机构(在这种情况下是SUNAT)定义的文档类型中,一些会计交易,如发票和供应商账单被分类。

每种文档类型可以在其分配的日记帐中拥有唯一的序列。作为本地化的一部分,文档类型包括适用于文档的国家;当本地化模块安装时,数据会自动创建。

文档类型所需的信息已默认包含在内,因此用户无需在此视图中填写任何内容:

文档类型列表

警告

目前客户发票支持的文档类型有:发票、Boleta、借记通知单和贷记通知单。

日记账

创建销售日记账时,除了日记账上的标准字段外,还必须填写以下信息:

使用文档

该字段用于定义日志是否使用文档类型。它仅适用于采购和销售日志,这些日志可以与秘鲁提供的不同文档类型集相关联。默认情况下,所有创建的销售日志都使用文档。

电子数据交换

本部分指示发票使用的EDI工作流程,在秘鲁我们必须选择“秘鲁UBL 2.1”。

Journal EDI字段

警告

默认情况下,始终显示Factur-X(FR)值,请确保您可以手动取消选中它。

合作伙伴

身份证类型和增值税

作为秘鲁本地化的一部分,SUNAT定义的身份证类型现在可以在合作伙伴表单上使用,这些信息对于大多数发件公司和客户的交易至关重要,请确保在您的记录中填写这些信息。

合作伙伴身份证明类型

产品

除了产品的基本信息外,在秘鲁本地化中,产品的UNSPC代码是必须配置的值。

产品的UNSPC代码

使用和测试

客户发票

EDI元素

一旦您配置好主数据,发票可以从销售订单或手动创建。除了基本发票信息外,还需要一些字段作为秘鲁EDI的一部分,有关发票流程的详细信息请参阅: 有关发票流程的页面

  • 文档类型:默认值为“Factura Electronica”,但如果需要,您可以手动更改文档类型并选择Boleta,例如。

    发票上的发票文档类型字段
  • 操作类型:此值在电子发票中是必需的,表示交易类型,默认值为“内部销售”,但在需要时可以手动选择其他值,例如货物出口。

    发票上的发票操作类型字段
  • EDI Affectation Reason: 在发票行中,除了税金之外,还有一个“EDI Affectation Reason”字段,该字段根据显示的SUNAT列表确定税收范围。默认加载的所有税收都与默认的EDI影响原因相关联,如果需要,您可以在创建发票时手动选择其他原因。

    发票行中的税收影响原因

发票验证

确认发票信息无误后,您可以进行验证。此操作将注册账户移动并触发电子发票工作流程,将其发送到OSE和SUNAT。以下消息将显示在发票顶部:

以蓝色发送EDI发票

异步意味着发票发布后文档不会自动发送。

电子发票状态

To be Sent: Indicates the document is ready to be sent to the OSE, this can be done either automatically by Odoo with a cron that runs every hour, or the user can send it immediately by clicking on the button “Sent now”.

手动发送EDI

已发送:表示文档已发送到 OSE 并成功验证。作为验证的一部分,将下载一个 ZIP 文件,并在聊天中记录一条消息,指示正确的政府验证。

当发票有效时在聊天中的消息

如果存在验证错误,则电子发票状态仍为“待发送”,以便进行更正并重新发送发票。

警告

每次发送文档进行验证时,将消耗一个信用点。如果在发票上检测到错误并再次发送它,则总共将消耗两个信用点。

常见错误

当 OSE 或 SUNAT 拒绝时,有多种原因,此时 Odoo 会在发票顶部发送一条消息,指示错误详细信息,并在大多数常见情况下提供修复问题的提示。

如果收到验证错误,您有两个选项:

  • 如果错误与合作伙伴、客户或税收的主数据有关,则可以在记录上应用更改(例如客户身份证类型),完成后单击“重试”按钮。

  • 如果错误与发票直接记录的某些数据有关(操作类型,发票行缺少数据),正确的解决方案是将发票重置为草稿状态,应用更改,然后再次将发票发送给SUNAT进行另一次验证。

    发票常见错误列表

更多详细信息,请参考 Common errors in SUNAT

发票 PDF 报告

在发票被SUNAT接受和验证后,可以打印发票PDF报告。该报告包括一个QR码,表示该发票是有效的财务文件。

Invoice PDF报告

IAP积分

Odoo的电子IAP提供1000个免费积分,当这些积分在您的生产数据库中用尽后,您的公司必须购买新的积分才能处理您的交易。

当您的信用额度用尽时,发票顶部会显示一个红色标签,指示需要额外的信用额度,您可以通过访问消息中提供的链接轻松购买它们。

在IAP中购买积分

IAP服务包括不同价格的套餐,基于信用点数。IAP中的价格列表始终以欧元显示。

特殊用例

取消流程

有些情况需要取消发票,例如,当发票被错误地创建时。如果发票已经被发送并由SUNAT验证,正确的操作方式是点击“请求取消”按钮:

请求发票取消按钮

为了取消发票,请提供取消原因。

电子发票状态

取消: 表示取消请求已准备好发送给 OSE,这可以通过 Odoo 自动使用 cron 每小时运行,或者用户可以立即点击“立即发送”按钮发送。一旦发送,将创建一个取消票据,结果是下一条消息和 CDR 文件将记录在聊天中:

SUNAT发送的作废CDR

已取消:表示取消请求已发送到 OSE 并成功验证。作为验证的一部分,将下载一个 ZIP 文件,并在聊天中记录一条消息,指示正确的政府验证。

取消后的发票

警告

每个作废请求将消耗一个信用点。

取消流程

创建出口发票时,请考虑以下事项:

  • 您客户的身份证明类型必须为外国身份证。

  • 发票中的操作类型必须是出口类型。

  • 发票行中包含的税金应为出口税。

出口发票主要数据
预付款
  1. 创建预付款发票并应用其相关付款。

  2. 创建最终发票时不考虑预付款。

  3. 创建一张贷项通知单,金额为预付款金额,针对最终发票。

  4. 将贷项通知单与最终发票进行对账。

  5. 最后一张发票上的剩余余额应该使用常规支付交易进行支付。

扣款发票

创建需要扣除的发票时,请考虑以下事项:

  1. 发票中包含的所有产品必须配置这些字段:

    产品扣除字段
  2. 发票中的操作类型必须为 1001

    发票上的扣款代码。

贷项通知单

当需要对已验证的发票进行更正或退款时,必须生成贷项通知单,只需单击“添加贷项通知单”按钮,作为秘鲁本地化的一部分,您需要从列表中选择一个信贷原因。

从发票添加贷项通知单

小技巧

创建第一张贷项通知单时,请选择贷项方法:部分退款,这样可以定义贷项通知单序列。

默认情况下,贷项通知单设置在文档类型中:

信用记账单文档类型

要完成工作流,请按照 我们的页面关于信用票据的说明 进行操作。

注解

贷项通知单的EDI工作流程与发票相同。

借记通知单

作为秘鲁本地化的一部分,除了从现有文档创建贷记通知外,您还可以创建借记通知。只需使用“添加借记通知”按钮即可。

默认情况下,借记通知单已在文档类型中设置。

Electronic delivery guide 2.0

The Guía de Remisión Electrónica (GRE) is an electronic document generated by the shipper to support the transportation or transfer of goods from one place to another, such as a warehouse or establishment. In Odoo, there are several configuration steps needed before you can successfully use this feature.

The use of the guía de remisión electrónica electronic document is mandatory and required by SUNAT for taxpayers who need to transfer their products, except those under the Single Simplified Regime (régimen único simplificado or RUS).

Delivery guide types

Sender

The Sender delivery guide type is issued when a sale is made, a service is rendered (including processing), goods are assigned for use, or goods are transferred between premises of the same company and others.

This delivery guide is issued by the owner of the goods (i.e., the sender) at the beginning of the shipment. The sender delivery guide is supported in Odoo.

Carrier

The Carrier delivery guide type justifies the transportation service the driver (or carrier) performs.

This delivery guide is issued by the carrier and must be issued to each shipper when the shipment goes through public transport.

重要

The carrier delivery guide is not supported in Odoo.

Transportation types

Private

The Private transportation type option is used when the owner transfers goods using their own vehicles. In this case, a sender’s delivery guide must be issued.

Public

The Public transportation type option is used when an external carrier moves the goods. In this case, two delivery guides must be issued: the sender’s delivery guide and the carrier’s delivery guide.

Direct submission to SUNAT

The creation of the GRE delivery guide in Odoo must be sent directly to the SUNAT, regardless of the electronic document provider: IAP, Digiflow, or SUNAT.

Required information

Version 2.0 of the electronic delivery guide requires additional information on the general configuration, vehicles, contacts, and products. In the general configuration, it is necessary to add new credentials that you can retrieve from the SUNAT portal.

Cancellations

Both the sender and the carrier can cancel the electronic waybill as long as the following conditions are met:

  • The shipment has not been initiated.

  • If the shipment has been initiated, the receiver must be changed before reaching the final destination.

重要

The SUNAT no longer uses the term “Anula”, but now uses the term “Dar de baja” for cancellations.

测试

The SUNAT does not support a test environment. This means that any delivery guides that were generated by mistake will be sent to the SUNAT.

If, by mistake, the waybill was created in this environment, it is necessary to delete it from the SUNAT portal.

配置

重要

  • Electronic sender’s GRE is currently the only supported type of waybill in Odoo.

  • The delivery guide is dependent on the Odoo Inventory app, the l10n_pe_edi and l10n_pe modules.

  • A second user must be added for the creation of electronic documents.

After following the steps to configure the electronic invoicing and the master data, install the Peruvian - Electronic Delivery Note 2.0 module (l10n_pe_edi_stock_20).

Next, you need to retrieve the client ID and client secret from SUNAT. To do so, follow the manual de servicios web plataforma nueva GRE.

注解

In the SUNAT portal, it is important to have the correct access rights enabled, as they may differ from the user set for electronic invoicing.

These credentials should be used to configure the delivery guide general settings from Accounting ‣ Configuration ‣ Settings ‣ Peruvian Electronic Invoicing.

Example for the SUNAT Delivery Guide API section configuration.

注解

It is required to follow the format RUC + UsuarioSol (e.g., 20557912879SOLUSER) for the Guide SOL User field, depending on the user selected when generating the GRE API credentials in the SUNAT portal.

Operator

The operator is the vehicle’s driver in cases where the delivery guide is through private transport.

To create a new operator, navigate to Contacts ‣ Create and fill out the contact information.

First, select Individual as the Company Type. Then, add the Operator License in the Accounting tab of the contact form.

For the customer address, make sure the following fields are complete:

  • District

  • Tax ID (DNI/RUC)

  • Tax ID Number

Individual type operator configurations in the Contact form.
Carrier

The carrier is used when the delivery guide is through public transport.

To create a new carrier, navigate to Contacts ‣ Create and fill out the contact information.

First, select Company as the Company Type. Then, add the MTC Registration Number, Authorization Issuing Entity, and the Authorization Number.

For the company address, make sure the following fields are complete:

  • District

  • Tax ID (DNI/RUC)

  • Tax ID Number

Company type operator configurations in the Contact form.
车辆

To configure the available vehicles, navigate to Inventory ‣ Configuration ‣ Vehicles and fill in the vehicle form with the information needed for the vehicle:

  • Vehicle Name

  • License Plate

  • Is M1 or L?

  • Special Authorization Issuing Entity

  • Authorization Number

  • Default Operator

  • Company

重要

It is important to check the Is M1 or L? checkbox if the vehicle has fewer than four wheels or fewer than eight seats.

Vehicle not selected as an M1 or L type with extra fields shown.
产品

To configure the available products, navigate to Inventory ‣ Products and open the product to be configured.

Make sure that the applicable information in the product form is fully configured. The Partida Arancelaria (Tariff Item) field needs to be completed.

Generating a GRE

Once the delivery from inventory is created during the sales workflow, make sure you complete the GRE fields on the top-right section of the transfer form for the fields:

  • Transport Type

  • Reason for Transfer

  • Departure start date

It is also required to complete the Vehicle and Operator fields under the Guia de Remision PE tab.

The delivery transfer has to be marked as Done for the Generar Guia de Remision button to appear on the left menu of the transfer form.

Generar Guia de Remision button on a transfer form in the Done stage.

Once the transfer form is correctly validated by SUNAT, the generated XML file becomes available in the chatter. You can now print the delivery slip that shows the transfer details and the QR code validated by SUNAT.

Transfer details and QR code on generated delivery slip.

常见错误

  • Diferente prefijo para productos (T001 en algunos, T002 en otros)

    At the moment, Odoo does not support the automation of prefixes for products. This can be done manually for each product output. This can also be done for non-storable products. However, keep in mind that there will be no traceability.

  • 2325 - GrossWeightMeasure - El dato no cumple con el formato establecido "Hace falta el campo" "Peso"" en el producto

    This error occurs when the weight on the product is set as 0.00. To fix this, you need to cancel the waybill and recreate it. Make sure that you fix the weight on the product before creating the new waybill, or it will result in the same error.

  • JSONDecodeError: Expecting value: line 1 column 1 (char 0) when creating a Delivery Guide

    This error is typically generated due to SOL user issues. Verify the user’s connection with the SUNAT; the SOL user must be established with the company RUT + user ID. For example 2012188549JOHNSMITH.

  • El número de documento relacionado al traslado de mercancía no cumple con el formato establecido: error: documento relacionado

    The Related Document Type and Related Document Number fields only apply to invoices and receipts.

  • 400 Client error: Bad Request for URL

    This error is not solvable from Odoo; it is advised you reach out to the SUNAT and verify the user. It may be necessary to create a new user.

  • Invalid content was found starting with element 'cac:BuyerCustomerParty'

    This error occurs when the transfer reason is set as other. Please select another option. Following to the official documentation of the SUNAT’s waybill guide, the transfer reasons 03 (sale with shipment to third party) or 12 (others) does not work in Odoo, since you should not have an empty or blank customer.

  • Duda cliente: consumo de créditos IAP al usar GRE 2.0

    For live clients using IAP, no credit is consumed (in theory) because it does not go through the OSE, i.e., these documents are directly sent to the SUNAT.

  • Errores con formato credenciales GRE 2.0 (traceback error)

    Odoo currently throws an error with a traceback instead of a message that the credentials are not correctly configured in the database. If this occurs on your database, please verify your credentials.