Anh Thao Pham (pta) c61f9d86fc [FIX] account_edi_ubl_cii: no rounding for unit price amount
Steps to reproduce:
- Install l10n_sa_edi
- Switch to a SA company
- Create a 15% INCLUDED tax
- Create an invoice:
  * Customer: [any]
  * Invoice Lines:
    - Product: [any]
    - Quantity: 90
    - Price: 200.00
    - Taxes: [the 15% INCLUDED tax]
- Confirm the invoice and process it by ZATCA service
=> The invoice is accepted by ZATCA, but there is the following warning:
"BR-KSA-EN16931-11 :
 Invoice line net amount (BT-131) must equal (Invoiced quantity (BT-129)
 * (Item net price (BT-146) / item price base quantity (BT-149)))
 + Sum of invoice line charge amount (BT-141) - Sum of invoice line allowance amount (BT-136)"

Cause:
The net unit price (200 / 1.15) has more than 2 decimals but its value is rounded
to the decimal accuracy of "Product Price" (2 digits by default) in the generated
EDI document.
When multiplying its rounded value with the quantity, the result is not equal to
the invoice line subtotal, which is triggering the warning.

Solution:
Remove the rounding for unit price amount as there is no restriction on its number of decimals.

Reference:
- https://docs.peppol.eu/poacc/billing/3.0/bis/#_unit_price_amount
- https://zatca.gov.sa/ar/E-Invoicing/SystemsDevelopers/Documents/20230519_ZATCA_Electronic_Invoice_XML_Implementation_Standard_%20vTrack.pdf

opw-3509940

closes odoo/odoo#143348

X-original-commit: 48a78bed9ad0c10e510b2c3e48e53c4c82ce5761
Related: odoo/enterprise#51469
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-11-27 11:20:05 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-11-20 04:58:31 +00:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%