Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0036258 | Retail Modules | Web POS | public | 2017-06-14 13:43 | 2017-06-21 07:22 |
Reporter | umartirena | ||||
Assigned To | jorge-garcia | ||||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | RR17Q3 | |||
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 | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=10854&type=bug | ||||
Issue History | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|