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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036324
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2017-06-23 12:412017-09-21 16:49
ReporterJONHMView Statuspublic 
Assigned Toasiermartirena 
PriorityhighResolutionfixedFixed in VersionRR17Q4
StatusclosedFix in branchFixed in SCM revisionb7733f310ef6
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

0036324: Error doing cancel and replace of an already paid and returned receipt

DescriptionHaving a receipt which has been paid, returned and invoiced, there is an error while importing when trying to cancel and replace that receipt.
Steps To Reproduce*Login with vallblanca user In WebPos:
1) Create a new receipt for 'Avalanche transceiver' product and set the 'Invoice this receipt' flag as YES. Finish the payment.
2) Return that receipt: Click on 'Verified returns' and select the previous receipt. Also set the 'Invoice this receipt' flag as YES and finish the return.
3) Cancel and replace the first receipt: Open the tab 'Receipts' and select the previously created receipt. Then, set the 'Invoice this receipt' flag as YES and finish the process.

**In the backend
4) Open window 'Errors While Importing POS Data' and see the related error
Proposed SolutionThe problem is caused because the 'generateShipment' property should be set as 'false', but in this case this is not happening because of this lines of pointofsale-model.js file:

if (_.isUndefined(_.find(receipt.get('lines').models, function (line) {
                var qty = line.get('qty') ? line.get('qty') : 0,
                    remainingQuantity = line.get('remainingQuantity') ? line.get('remainingQuantity') : 0;
                return (qty > 0 && qty > remainingQuantity) || (qty < 0 && qty < remainingQuantity);
              }))) {
                receipt.set('generateShipment', false);
              }

The quantity should be compared with the 'deliveredQuantity' instead of 'remainingQuantity'
TagsNo tags attached.
Attached Files? file icon errorCancReplace.mp4 [^] (4,360,248 bytes) 2017-06-23 12:41

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0098494)
hgbot (developer)
2017-08-14 09:31

Repository: erp/devel/pi
Changeset: b7733f310ef6887e968162da0803e857df11ba0a
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Mon Jul 17 18:28:09 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b7733f310ef6887e968162da0803e857df11ba0a [^]

Fixed issue 36324: Error doing cancel and replace of an already paid and returned receipt.

Also changed the C&R process to work correctly with invoices. Now, after doing a C&R, the lines that were delivered in the initial ticket creates also an invoice line, even if the line doesn't have a goods shipment related.
Managed also the C&R properties. If a netting shipment is created, all invoice lines now has a shipment related, and if the shipment lines are moved from the original ticket to the new ticket, the original invoice lines (if there are) don't have related shipment lines no more and the new invoice lines will be related to the moved shipment lines.

---
M src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java
---
(0098495)
hgbot (developer)
2017-08-14 09:33

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e048e6e1f7f6fd3cdc542f1a2c883281be43b524
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Wed Jul 19 17:11:31 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e048e6e1f7f6fd3cdc542f1a2c883281be43b524 [^]

Related to issue 36324: Error doing cancel and replace of an already paid and returned receipt.

Also changed the C&R process to work correctly with invoices. Now, after doing a C&R, the lines that were delivered in the initial ticket creates also an invoice line, even if the line doesn't have a goods shipment related.
Managed also the C&R properties. If a netting shipment is created, all invoice lines now has a shipment related, and if the shipment lines are moved from the original ticket to the new ticket, the original invoice lines (if there are) don't have related shipment lines no more and the new invoice lines will be related to the moved shipment lines.

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
---
(0098496)
hgbot (developer)
2017-08-14 09:34

Repository: tools/automation/pi-mobile
Changeset: 316929778a5299a286497ed64516b9999da313ad
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Mon Jul 17 18:39:42 2017 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/316929778a5299a286497ed64516b9999da313ad [^]

Related to issue 36324: Automated tests

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/terminals/WebPOSCancelAndReplaceTerminalHelper.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I36324_CancelAndRplcInvOrdWithPrefAssociateShipToNewOrd_AddLne.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I36324_CancelAndRplcInvOrdWithPrefAssociateShipToNewOrd_AddQty.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I36324_CancelAndRplcInvOrdWithPrefNettingGoodShpmnt_AddLne.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I36324_CancelAndRplcInvOrdWithPrefNettingGoodShpmnt_AddQty.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I36324_CancelAndRplcInvOrdWithReturn_AddProd.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I36324_CancelAndRplcInvOrd_AddQtyAndProd.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cancelandreplace/I36324_CancelAndRplcLayawayByInvoicing.java
---
(0099310)
hudsonbot (developer)
2017-09-21 16:49

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-06-23 12:41 JONHM New Issue
2017-06-23 12:41 JONHM Assigned To => Retail
2017-06-23 12:41 JONHM File Added: errorCancReplace.mp4
2017-06-23 12:41 JONHM Resolution time => 1499983200
2017-06-23 12:41 JONHM Triggers an Emergency Pack => No
2017-06-26 10:20 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2017-06-26 10:20 ranjith_qualiantech_com Status new => scheduled
2017-06-27 09:19 ranjith_qualiantech_com Assigned To ranjith_qualiantech_com => Retail
2017-06-27 09:19 ranjith_qualiantech_com Status scheduled => acknowledged
2017-06-27 09:29 asiermartirena Assigned To Retail => asiermartirena
2017-08-14 09:31 hgbot Checkin
2017-08-14 09:31 hgbot Note Added: 0098494
2017-08-14 09:31 hgbot Status acknowledged => resolved
2017-08-14 09:31 hgbot Resolution open => fixed
2017-08-14 09:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b7733f310ef6887e968162da0803e857df11ba0a [^]
2017-08-14 09:33 hgbot Checkin
2017-08-14 09:33 hgbot Note Added: 0098495
2017-08-14 09:34 hgbot Checkin
2017-08-14 09:34 hgbot Note Added: 0098496
2017-08-18 09:44 marvintm Review Assigned To => marvintm
2017-08-18 09:44 marvintm Status resolved => closed
2017-08-18 09:44 marvintm Fixed in Version => RR17Q4
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099310


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker