Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034631
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2016-11-25 09:452016-12-21 16:55
ReportermigueldejuanaView Statuspublic 
Assigned Tomario_castello 
PrioritynormalResolutionfixedFixed in VersionRR17Q1
StatusclosedFix in branchFixed in SCM revision711b97938381
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0034631: Js error when splitting packs lines (7 packs in advance)

DescriptionWe get a Javascript error when we add many packs to the receipt and we split on of pack's line.

See steps.
The error happens in model/order.js file in line 3815:
clonedPromotion.amt = OB.DEC.toNumber(OB.DEC.toBigDecimal(OB.I18N.formatCurrency((promotion.amt * (clonedPromotion.obdiscQtyoffer / promotion.qtyOffer)))));

If we add 6 packs, the error doesn't appears but if we add 7,8,9... the error starts happening.

 
Steps To Reproduce- Login
- Go to the browser and add 7 times Camping Pack
- We get 14 Down sleeping bag 500
- Select this line and press Split button in EDIT panel
- In Split modal, select 14 lines and press Apply
- ERROR! Javascript error: "bigdecimal-1.0.1.js:14 Uncaught BigDecimal(): Not a number: 1,,,0,0,3,.,6,2"
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0092216)
hgbot (developer)
2016-12-08 16:26

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 711b9793838185ddb271105b38c4dc4053c5488a
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Dec 06 15:41:01 2016 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/711b9793838185ddb271105b38c4dc4053c5488a [^]

Fixed issue 0034631: Js error when splitting packs lines (7 packs in advance)

- Remove the call of the OB.I18N.formatCurrency function inside the transformation of the result to a Number.
- This function generate an error when the numer is over than one thousand because introduce the thousands separator and the result is an string.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0092217)
hgbot (developer)
2016-12-08 16:27

Repository: tools/automation/pi-mobile
Changeset: c2ac6f00d6854349331096a05472b1141a87ea19
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Dec 06 16:03:50 2016 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c2ac6f00d6854349331096a05472b1141a87ea19 [^]

Verifies issue 34631: Added automated test I34631_VerifySplitLinesWithBigDiscount

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/splitline/I34631_VerifySplitLinesWithBigDiscount.java
---
(0092218)
hgbot (developer)
2016-12-08 16:33

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 37b1f3f4030582aac69c60b59ccc17c16b76b9cd
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Wed Dec 07 09:57:28 2016 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/37b1f3f4030582aac69c60b59ccc17c16b76b9cd [^]

Verifies issue 0034631: Js error when splitting packs lines (7 packs in advance)

- Delete the function OB.I18N.formatCurrency when used before the convertion to BigDecimal.

---
M web/org.openbravo.retail.posterminal/js/components/modalsplitlines.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0092219)
mario_castello (developer)
2016-12-08 16:40
edited on: 2016-12-08 16:41

It is not necessary use the formatCurrency when the result can be tranforming to a Number
because this function returns a number as string with formatt.


- Issue History
Date Modified Username Field Change
2016-11-25 09:45 migueldejuana New Issue
2016-11-25 09:45 migueldejuana Assigned To => Retail
2016-11-25 09:45 migueldejuana Triggers an Emergency Pack => No
2016-12-06 21:58 mario_castello Assigned To Retail => mario_castello
2016-12-06 21:58 mario_castello Status new => acknowledged
2016-12-06 21:58 mario_castello Status acknowledged => scheduled
2016-12-08 16:26 hgbot Checkin
2016-12-08 16:26 hgbot Note Added: 0092216
2016-12-08 16:26 hgbot Status scheduled => resolved
2016-12-08 16:26 hgbot Resolution open => fixed
2016-12-08 16:26 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/711b9793838185ddb271105b38c4dc4053c5488a [^]
2016-12-08 16:27 hgbot Checkin
2016-12-08 16:27 hgbot Note Added: 0092217
2016-12-08 16:33 hgbot Checkin
2016-12-08 16:33 hgbot Note Added: 0092218
2016-12-08 16:40 mario_castello Note Added: 0092219
2016-12-08 16:41 mario_castello Note Edited: 0092219 View Revisions
2016-12-21 16:55 marvintm Review Assigned To => marvintm
2016-12-21 16:55 marvintm Status resolved => closed
2016-12-21 16:55 marvintm Fixed in Version => RR17Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker