Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0056612 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Retail Modules] Web POS | major | always | 2024-10-01 15:51 | 2024-10-28 09:32 | |||
| Reporter | sofidossant | View Status | public | |||||
| Assigned To | kousalya_r | |||||||
| Priority | high | Resolution | invalid | Fixed in Version | ||||
| Status | closed | Fix in branch | Fixed in SCM revision | |||||
| Projection | none | ETA | none | Target Version | ||||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | pi | SCM revision | ||||||
| Merge Request Status | ||||||||
| Review Assigned To | aferraz | |||||||
| OBNetwork customer | OBPS | |||||||
| Support ticket | 109287 | |||||||
| Regression level | ||||||||
| Regression date | ||||||||
| Regression introduced in release | ||||||||
| Regression introduced by commit | ||||||||
| Triggers an Emergency Pack | No | |||||||
| Summary | 0056612: Error in tax calculation | |||||||
| Description | I reproduced an order in livebuilds with 39 lines and an amount, when the 13% tax is applied, it is calculated wrong. This is due to rounding. Since if we take the 3 decimals the calculation is correct, but if we take 2, the calculation is wrong. | |||||||
| Steps To Reproduce | 1 - Configuration of the tax rate - (attached the image) 2 - Make 39 lines of different products, and then add the quantities and amounts I attach. IMPORTANT: if any discount is applied, deactivate them, or make the amount of the line with the discount equal to the one I attach in the excel. Then you can see that the total of the order is 24474.24 The tax shown in the pos is 21658.56 but if I calculate the 13% of the total it is 21658.6194 There is a difference of 5 VIDEO https://drive.google.com/file/d/1ACtCLdGewuDWgBgI0ZLd2XLpZT08i7yx/view?usp=sharing [^] | |||||||
| Proposed Solution | The problem is in this line when we calculate the getTaxeLine OB.DEC.toNumber(amount.multiply(amount).divide(amount.add(taxAmount), 20, BigDecimal.prototype.ROUND_HALF_UP)); | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Notes |
|
|
(0169894) frank_gonzalez (viewer) 2024-10-02 11:01 |
Jira: https://openbravo.atlassian.net/browse/RM-17859 [^] |
|
(0169900) sofidossant (viewer) 2024-10-02 13:47 |
Another issue https://drive.google.com/file/d/16hS29erR7G0bhVZPishmDSV-WT6fTN8x/view?usp=sharing [^] 80 product with price 42.47 |
|
(0170090) aferraz (viewer) 2024-10-08 11:16 |
The current tax information is properly calculated based on your Tax Rate configuration. See: https://wiki.openbravo.com/wiki/Tax_Rate#Tax [^] "Document Tax Amount Calculation" which is the way how the tax amount is going to be calculated per each tax rate (or %). The options available are: "Document based amount by rate", this option implies that the tax amount is going to be calculated as tax amount = (tax base amounts sum at the same rate * tax rate) "Line base amount by rate", this option implies that the tax amount is going to be calculated by line as tax amount = (tax base amount line 1 * tax rate) + (tax base amount line 2 * tax rate) + ....+ (tax base amount line n + tax rate). As the Tax Rate is configured with Document Tax Amount Calculation = Line base amount by rate, the tax is calculated per line, that is why it doesn't match with the tax calculated by document: https://docs.google.com/spreadsheets/d/1bV9AirYmu1i_5VfhhBLsy4AADDLjdJ6qN2_VVoWW0W8 [^] In summary: If you configure the Tax Rate as Document Tax Amount Calculation = Line base amount by rate you will get: Total Gross Amount: 24474.24 Total Net Amount: 21658.56 Total Tax Amount: 2815.68 If you configure the Tax Rate as Document Tax Amount Calculation = Document base amount by rate you will get: Total Gross Amount: 24474.24 Total Net Amount: 21658.62 Total Tax Amount: 2815.62 |
|
(0170974) sofidossant (viewer) 2024-10-25 18:52 |
I have a new case 80 lines with price 5 With tax Entregas IVA 13% 79 lines have the correct tax: Taxable Amount * 4.42 Tax Amount * 0.58 And one have Taxable Amount * 4.80 Tax Amount * 0.20 It is INCORRECT Attached https://drive.google.com/file/d/1PAukEmFXj_LVrlGUuh_Tn3XZj-nNi4Td/view?usp=sharing [^] |
|
(0171005) aferraz (viewer) 2024-10-28 09:32 |
Rejected again because of the same reason explained here: https://issues.openbravo.com/view.php?id=56612#c170090 [^] Besides, after 0055876, the needed adjustments are now distributed among all the lines. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2024-10-01 15:51 | sofidossant | New Issue | |
| 2024-10-01 15:51 | sofidossant | Assigned To | => Retail |
| 2024-10-01 15:51 | sofidossant | OBNetwork customer | => OBPS |
| 2024-10-01 15:51 | sofidossant | Support ticket | => 109287 |
| 2024-10-01 15:51 | sofidossant | Triggers an Emergency Pack | => No |
| 2024-10-01 15:52 | sofidossant | File Added: Captura de pantalla -2024-10-01 10-52-01.png | |
| 2024-10-01 15:52 | sofidossant | Steps to Reproduce Updated | View Revisions |
| 2024-10-01 15:53 | sofidossant | Steps to Reproduce Updated | View Revisions |
| 2024-10-01 15:54 | Practics | Issue Monitored: Practics | |
| 2024-10-01 16:18 | sofidossant | File Added: example.ods | |
| 2024-10-02 07:14 | guillermogil | Assigned To | Retail => Triage Omni OMS |
| 2024-10-02 11:01 | frank_gonzalez | Note Added: 0169894 | |
| 2024-10-02 11:01 | frank_gonzalez | Assigned To | Triage Omni OMS => kousalya_r |
| 2024-10-02 13:47 | sofidossant | Note Added: 0169900 | |
| 2024-10-08 11:16 | aferraz | Note Added: 0170090 | |
| 2024-10-08 11:16 | aferraz | Review Assigned To | => aferraz |
| 2024-10-08 11:16 | aferraz | Status | new => closed |
| 2024-10-08 11:16 | aferraz | Resolution | open => no change required |
| 2024-10-25 18:48 | sofidossant | Status | closed => new |
| 2024-10-25 18:52 | sofidossant | Note Added: 0170974 | |
| 2024-10-28 09:22 | aferraz | Relationship added | related to 0055876 |
| 2024-10-28 09:22 | aferraz | Relationship added | related to 0056547 |
| 2024-10-28 09:22 | aferraz | Relationship added | related to 0056546 |
| 2024-10-28 09:32 | aferraz | Note Added: 0171005 | |
| 2024-10-28 09:32 | aferraz | Status | new => closed |
| 2024-10-28 09:32 | aferraz | Resolution | no change required => invalid |
| Copyright © 2000 - 2009 MantisBT Group |