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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0043710
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2020-04-08 16:032020-04-27 15:09
ReportergorkaionView Statuspublic 
Assigned Toprakashmurugesan88 
PriorityhighResolutionfixedFixed in VersionRR20Q3
StatusclosedFix in branchFixed in SCM revision99383eef2ef8
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

0043710: on manual return change the customer to a one with a different pricelist changes the qty to possitive values

DescriptionOn an environment using multipricelist.

While doing a manual return (not verified return) if you add some lines and later change the business partner the receipt is recalculated with positive quantities instead of negative.
Steps To Reproduce1 Log in in MPL1 terminal.
2 Set the receipt to be returned.
3 Add Alpine skiing backpack 27 L product
4 Change the customer to Bryan Raymond
5 The receipt is recalculated and the line is now with positive quantity.
Proposed SolutionThe issue is in _addProduct function of order.js [1]

These lines:
      if (this.get('orderType') === 1) {
        qty = qty ? -qty : -1;
      } else {
        qty = qty || 1;
      }

If the ordertype is 1 it changes the sign of the quantity. So there are 2 possibilities:

1. Fix that logic to ensure that if the qty is already negative it does not require to change the sign.
2. Fix the logic in removeAndInsertLines function. So when the lines are inserted back the quantity used in the addProduct is positive.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/js/model/order.js#L3394 [^]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0119315)
hgbot (developer)
2020-04-22 08:33

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f5983910853ac45262269a27f29218788a4e7690
Author: Prakash M <prakash <at> qualiantech.com>
Date: Wed Apr 22 12:02:57 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f5983910853ac45262269a27f29218788a4e7690 [^]

Fixed BUG-43710: Change of customer with different pricelist in manual return
changes line qty from negative to positive.

Issue caused in _addProduct function
Here when orderType is return, it converts the sign.
Therefore negative qty converted again to positive.

In removeAndInsertLines function quantites are converted to positive before
addProduct.
Therefore sign convertion for return handled in existing _addProduct function

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0119316)
hgbot (developer)
2020-04-22 08:33

Repository: tools/automation/pi-mobile
Changeset: 8c948ba40e05384b8e3782c26b239a5bb6594f2b
Author: Prakash M <prakash <at> qualiantech.com>
Date: Wed Apr 22 12:03:29 2020 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/8c948ba40e05384b8e3782c26b239a5bb6594f2b [^]

Related to BUG-43710: verifies return qty remains negative on changing customer
with different pricelist in manual return

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multipricelists/I43710_MPLManualReturn.java
---
(0119343)
marvintm (manager)
2020-04-22 18:37

Fix doesn't work correctly in all cases.

Now it works correctly when "Return this receipt" option has been selected.

However, if a normal ticket is created, a line is added, and then "Return line" is selected on this line, and then customer is changed to one that has a different pricelist, the quantity is still changed to positive values.
(0119400)
hgbot (developer)
2020-04-24 15:19

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 99383eef2ef8fc616058ec055b6cfd6a82a32bef
Author: Prakash M <prakash <at> qualiantech.com>
Date: Fri Apr 24 18:48:11 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/99383eef2ef8fc616058ec055b6cfd6a82a32bef [^]

Fixed BUG-43710: Change of customer with different pricelist in a receipt with
line having negative qty, changes qty to positive

* negative quantites are converted to positive for all order types.
* But it should be only for return order.

* In removeAndInsertLines function quantites are converted to positive only if
it is return receipt
* Therefore sign convertion for return receipt handled in existing _addProduct
function

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0119401)
hgbot (developer)
2020-04-24 15:19

Repository: tools/automation/pi-mobile
Changeset: 4fde4fc5a744c91383c3b6dcc81dcdcfc53ba567
Author: Prakash M <prakash <at> qualiantech.com>
Date: Fri Apr 24 18:48:02 2020 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/4fde4fc5a744c91383c3b6dcc81dcdcfc53ba567 [^]

Related to BUG-43710: verifies return qty remains negative on changing customer
with different pricelist in order with negative line

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/multipricelists/I43710_MPLOrderWithNegativeLine.java
---

- Issue History
Date Modified Username Field Change
2020-04-08 16:03 gorkaion New Issue
2020-04-08 16:03 gorkaion Assigned To => Retail
2020-04-08 16:03 gorkaion Resolution time => 1588111200
2020-04-08 16:03 gorkaion Triggers an Emergency Pack => No
2020-04-08 16:42 ahernandezgil Issue Monitored: ahernandezgil
2020-04-17 10:24 prakashmurugesan88 Assigned To Retail => prakashmurugesan88
2020-04-20 10:07 prakashmurugesan88 Status new => scheduled
2020-04-22 08:33 hgbot Checkin
2020-04-22 08:33 hgbot Note Added: 0119315
2020-04-22 08:33 hgbot Status scheduled => resolved
2020-04-22 08:33 hgbot Resolution open => fixed
2020-04-22 08:33 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f5983910853ac45262269a27f29218788a4e7690 [^]
2020-04-22 08:33 hgbot Checkin
2020-04-22 08:33 hgbot Note Added: 0119316
2020-04-22 18:37 marvintm Note Added: 0119343
2020-04-22 18:37 marvintm Status resolved => new
2020-04-22 18:37 marvintm Resolution fixed => open
2020-04-23 10:22 prakashmurugesan88 Status new => scheduled
2020-04-24 15:19 hgbot Checkin
2020-04-24 15:19 hgbot Note Added: 0119400
2020-04-24 15:19 hgbot Status scheduled => resolved
2020-04-24 15:19 hgbot Resolution open => fixed
2020-04-24 15:19 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f5983910853ac45262269a27f29218788a4e7690 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/99383eef2ef8fc616058ec055b6cfd6a82a32bef [^]
2020-04-24 15:19 hgbot Checkin
2020-04-24 15:19 hgbot Note Added: 0119401
2020-04-27 15:09 marvintm Review Assigned To => marvintm
2020-04-27 15:09 marvintm Status resolved => closed
2020-04-27 15:09 marvintm Fixed in Version => RR20Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker