[jira] [Updated] (OFBIZ-11316) Bug when order contains adjustments with NULL amount

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-11316) Bug when order contains adjustments with NULL amount

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-11316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-11316:
------------------------------------
    Description:
The issue was introduced by OFBIZ-7012 where adding isTaxIncludedInPrice was missing at line 565. Because the compared amount in this line (in the adjustment) is different from 0 and equals to amountAlreadyIncluded only if  the tax is included in price


  was:
On org/apache/ofbiz/accounting/invoice/InvoiceServices.java:561.

The condition evaluation gives an error when the adjustment has a null amount even when isTaxIncludedInPrice is FALSE.

 

The condition should be re-written to

 

if (isTaxIncludedInPrice && (adj.getBigDecimal("amount").signum() == 0))


> Bug when order contains adjustments with NULL amount
> ----------------------------------------------------
>
>                 Key: OFBIZ-11316
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11316
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Trunk
>            Reporter: Amine Azzi
>            Assignee: Jacques Le Roux
>            Priority: Major
>         Attachments: OFBIZ-11316.patch
>
>
> The issue was introduced by OFBIZ-7012 where adding isTaxIncludedInPrice was missing at line 565. Because the compared amount in this line (in the adjustment) is different from 0 and equals to amountAlreadyIncluded only if  the tax is included in price



--
This message was sent by Atlassian Jira
(v8.3.4#803005)