Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036258 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2017-06-14 13:43 | 2017-06-21 07:22 | |||
Reporter | umartirena | View Status | public | |||||
Assigned To | jorge-garcia | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | RR17Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 8f3a4931c19e | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | mtaal | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036258: Qty with decimals it is not properly represented in Web POS | |||||||
Description | Qty with decimals it is not properly represented in Web POS. If the qty to add in a line in Web POS has more decimals than the price precision, if the line is added to the receipt the qty is not properly rounded | |||||||
Steps To Reproduce | * Log into Openbravo ERP and navigate to Product window. * Search "Avalance Transceiver" Product. * Set as UPC/EAN '1234'.Save. * Log into a terminal * Open Chrome Console * Register the following hook: OB.UTIL.HookManager.registerHook('OBPOS_BarcodeScan', function (args, c) { var strScancode = args.code; var strStartpoint = strScancode.substring(0, 2); if (strStartpoint === '21' && args.code.length === 13) { var codeTobeSend = strScancode.substring(2, 6); args.code = codeTobeSend; } args.attrs.cusTwsiStrScancode = strScancode; OB.UTIL.HookManager.callbackExecutor(args, c); }); * Register also the following hook: OB.UTIL.HookManager.registerHook('OBPOS_PreAddProductToOrder', function (args, c) { var strStartpoint = args.attrs.cusTwsiStrScancode; if (strStartpoint && strStartpoint.substring(0, 2) === '21' && strStartpoint.length === 13) { var productPrice = OB.DEC.toBigDecimal(args.productToAdd.get('standardPrice').toString()); var totalCost = OB.DEC.toBigDecimal(strStartpoint.substring(7, 12)); var qty = OB.DEC.div(OB.DEC.div(totalCost, OB.DEC.toBigDecimal('100')), productPrice, 20); args.qtyToAdd = qty; } OB.UTIL.HookManager.callbackExecutor(args, c); }); * In Scan Tab search by the following barcode: 2112345042506 * Notice that the Total Amount is 42.50, what is correct, but the qty is 3.5416666666666665, without any rounding (should be 3.54). Also notice that the Total Qty is 3.542 | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0097427) hgbot (developer) 2017-06-16 08:46 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 8f3a4931c19e35986ed1673cd7bae1fd0f81f1f5 Author: Jorge Garcia <jorge.garcia <at> openbravo.com> Date: Thu Jun 15 17:02:12 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8f3a4931c19e35986ed1673cd7bae1fd0f81f1f5 [^] Fixed issue 36258: Qty with decimals it is not properly represented in Web POS The problems only occurs in the qty of the line. The solution is to apply the scale to the quantity of the line defined in the qty format. --- M web/org.openbravo.retail.posterminal/js/model/order.js --- |
(0097539) mtaal (viewer) 2017-06-21 07:22 |
Reviewed |
![]() |
|||
Date Modified | Username | Field | Change |
2017-06-14 13:43 | umartirena | New Issue | |
2017-06-14 13:43 | umartirena | Assigned To | => Retail |
2017-06-14 13:43 | umartirena | File Added: Selection_077.png | |
2017-06-14 13:43 | umartirena | OBNetwork customer | => No |
2017-06-14 13:43 | umartirena | Triggers an Emergency Pack | => No |
2017-06-15 17:04 | jorge-garcia | Status | new => scheduled |
2017-06-15 17:04 | jorge-garcia | Assigned To | Retail => jorge-garcia |
2017-06-16 08:46 | hgbot | Checkin | |
2017-06-16 08:46 | hgbot | Note Added: 0097427 | |
2017-06-16 08:46 | hgbot | Status | scheduled => resolved |
2017-06-16 08:46 | hgbot | Resolution | open => fixed |
2017-06-16 08:46 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8f3a4931c19e35986ed1673cd7bae1fd0f81f1f5 [^] |
2017-06-21 07:22 | mtaal | Review Assigned To | => mtaal |
2017-06-21 07:22 | mtaal | Note Added: 0097539 | |
2017-06-21 07:22 | mtaal | Status | resolved => closed |
2017-06-21 07:22 | mtaal | Fixed in Version | => RR17Q3 |
Copyright © 2000 - 2009 MantisBT Group |