Skip to content

[FIX] account_edi_ubl_cii: invert negative unit price with quantity#3

Open
ntsirintanis wants to merge 1 commit into14.0from
14.0-bis3-negative-fix
Open

[FIX] account_edi_ubl_cii: invert negative unit price with quantity#3
ntsirintanis wants to merge 1 commit into14.0from
14.0-bis3-negative-fix

Conversation

@ntsirintanis
Copy link

Currently, when we use eCommerce with automatic invoicing enabled, and we have the Peppol format enabled in the invoicing settings, there is an issue when coupons or discount codes are applied.

These discounts create a sale order line (and afterwards a move line) with a negative unit price. Since UBL BIS3 does not allow negative unit prices, the automatic generation of the e-invoice is not executed and the customer receives a "proforma invoice" PDF instead (which has no official value). A message is logged in the chatter, but the user has no notification or anything.

We can do better, and instead invert both the unit price and quantity fields (since UBL BIS3 does allow negative quantities), to have the same result when generating the e-invoice.

task-3916181

Currently, when we use eCommerce with automatic invoicing enabled, and
we have the Peppol format enabled in the invoicing settings, there is
an issue when coupons or discount codes are applied.

These discounts create a sale order line (and afterwards a move line)
with a negative unit price. Since UBL BIS3 does not allow negative unit
prices, the automatic generation of the e-invoice is not executed and
the customer receives a "proforma invoice" PDF instead (which has no
official value). A message is logged in the chatter, but the user has no
notification or anything.

We can do better, and instead invert both the unit price and quantity
fields (since UBL BIS3 does allow negative quantities), to have the same
result when generating the e-invoice.

task-3916181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants