Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038731Retail ModulesWeb POSpublic2018-06-08 15:222018-08-09 17:22
0038731: Layaway price may vary when opened in another terminal
When opening a layaway in another terminal, if it contains products with some specific taxes/price list, the price and tax total can vary from one terminal to the other.
1. Create a Tax Category: 'Category test'.
2. Create a Tax Rate 'Test rate' with summary level checked and Tax Category 'Category test'
3. Create another two Tax Rates 'Test rate 1' and 'Test rate 2' with Tax Category 'Category test' and Parent Tax Rate 'Test rate'. One with Rate 21 and the other one with Rate 2.5
4. Create a Layaway POS Terminal with search Key 'VBS-2' and Name and Order Document No Prefix 'TestTerminal'
5. Change some products Tax Category to 'Category test' and in their Price tab 'The White Valley Group Sale Price List Version' Unit Price and List Price to 2.75
6. In Price list 'The White Valley Group Sale Price List', uncheck 'Price includes Tax'
7. Log into VBS-2 in the POS Terminal and generate a layaway with some of the products we changed before. Generate some more layaways to ensure we can reproduce it.
8. Log into VBS-1 (for example) and open the receipts. The price and Tax Total sometimes changes some cents (they change the most when a lot of different products are in the receipt)
No tags attached.
has duplicate defect 0039682 closed Retail Tax is not properly rounded when loading a paid receipt and changes value of ticket 
related to defect 0038967 closed rqueralta Sum of linenet plus tax can be different than gross 
Issue History
2018-06-08 15:22joniturralde93New Issue
2018-06-08 15:22joniturralde93Assigned To => Retail
2018-06-08 15:22joniturralde93Resolution time => 1530223200
2018-06-08 15:22joniturralde93Triggers an Emergency Pack => No
2018-06-11 13:11juabaezIssue Monitored: juabaez
2018-06-11 21:54rqueraltaAssigned ToRetail => rqueralta
2018-06-11 21:55rqueraltaStatusnew => scheduled
2018-06-15 15:23hgbotCheckin
2018-06-15 15:23hgbotNote Added: 0105188
2018-06-15 15:23hgbotStatusscheduled => resolved
2018-06-15 15:23hgbotResolutionopen => fixed
2018-06-15 15:23hgbotFixed in SCM revision => [^]
2018-06-25 08:56marvintmNote Added: 0105354
2018-06-25 08:56marvintmStatusresolved => new
2018-06-25 08:56marvintmResolutionfixed => open
2018-06-26 20:35rqueraltaStatusnew => scheduled
2018-06-29 09:12hgbotCheckin
2018-06-29 09:12hgbotNote Added: 0105504
2018-07-06 20:38hgbotCheckin
2018-07-06 20:38hgbotNote Added: 0105667
2018-07-06 20:38hgbotStatusscheduled => resolved
2018-07-06 20:38hgbotResolutionopen => fixed
2018-07-06 20:38hgbotFixed in SCM revision [^] => [^]
2018-07-09 11:47migueldejuanaReview Assigned To => migueldejuana
2018-07-09 11:47migueldejuanaNote Added: 0105672
2018-07-09 11:47migueldejuanaStatusresolved => closed
2018-07-16 16:51migueldejuanaRelationship addedrelated to 0038967
2018-08-09 17:22alekosmp86Note Added: 0106269
2018-11-22 17:49adrianromeroRelationship addedhas duplicate 0039682

2018-06-15 15:23   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: caaebcc61ad162cb5a315435a6c810587f90c37b
Author: Rafael Queralta <rafaelcuba81 <at>>
Date: Thu Jun 14 14:26:50 2018 -0400
URL: [^]

Fixed issue 38731: Layaway price may vary when opened in another terminal

M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
2018-06-25 08:56   
The current change would need at least to be replicated to the priceIncludingTaxes flows (function calcTaxesIncPrice).

However, it's unclear to me how this change would solve the issue, as it seems the problem comes from the fact that the layaway taxes are being recalculated, and adding an "and" condition on this part of the code will cause the taxes to be calculated more frequently, not less.
2018-06-29 09:12   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c3c8f2b0362738432056f6aa1cf60a6caea01f19
Author: Antonio Moreno <antonio.moreno <at>>
Date: Fri Jun 29 09:12:35 2018 +0200
URL: [^]

Related to issue 38731. Backed out changeset caaebcc61ad162cb5a315435a6c810587f90c37b, as it requires a bit more thought

M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
2018-07-06 20:38   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 08280eb5871d9f93919e01852ae5a0b49829e0cb
Author: Rafael Queralta <rafaelcuba81 <at>>
Date: Fri Jul 06 11:44:03 2018 -0400
URL: [^]

Fixed issue 38731: Layaway price may vary when opened in another terminal

- It was avoided that the groos of the ticket was changed with the same
condition of the regenerateTaxes function and saved trace that the calculated
gross is different from the original

M web/org.openbravo.retail.posterminal/js/model/order.js
2018-07-09 11:47   
2018-08-09 17:22   
Added automated test [^]