Openbravo Issue Tracking System - Retail Modules
View Issue Details
0030412Retail ModulesQuotationspublic2015-07-23 12:592015-10-21 09:38
lorenzofidalgo 
marvintm 
immediatemajoralways
closedfixed 
5
main 
RR15Q4 
Orekaria
Packaging and release
main
No
0030412: [RR15Q3] Creating a sales order from quotation with "Firm quotation" unchecked creates wrong total amounts if price has changed
To create a Sales Order from quotation if "Firm quotation" is unchecked and some prices has been changed induces errors in the final total amount. This error also reaches POS backend data.
This situation is generated if the product selected in the quotation appears in some discount record. It is not necessary that the discount is being applied in this certain receipt.
0-Login POS backend and go to "Discounts and promotions" window. Create a new record in that window with the following data:
--
Organization: The White Valley Group
Discount/Promotion Type: Buy X pay Y of same product
Name: Quotation+Discounts error
Printed Name: Quotation+Discounts error
Active: Checked
Starting date: 01-01-2012
Included Products: Only those defined
Included Organizations: Only those defined
X Units: 3
Y Units: 2

In Products tab, add the following record: Camera bag
In Organization tab, add the following record: Vall Blanca Store
--
Save the record.
1- Login POS in VBS terminal and login with vallblanca//openbravo.
2- In dropdown menu, click Create Quotation option.
3- Then click SEARCH option, search camera bag and add 2x "Camera bag".
4- Click the product line and change its price to 1€ each product.
5- Then tap "total amount" button to get that quotation to be under evaluation.
6- In dropdown menu click "Create Sales Order", "Firm quotation" must be UNCHECKED. Then click "Create Sales Order" button in the popup.
7- Defect: Realize Total Amount is wrong.
No tags attached.
depends on backport 0030535RR15Q3 closed jorge-garcia [RR15Q3] Creating a sales order from quotation with "Firm quotation" unchecked creates wrong total amounts if price has changed 
related to defect 0030487 closed Osmany Reactivate quotation shows several errors in POS screen 
causes defect 0030909 closed marvintm Create sales order does not remove the original quotation 
png WrongCalculation.png (158,876) 2015-07-23 12:59
https://issues.openbravo.com/file_download.php?file_id=8302&type=bug
png
Issue History
2015-07-23 12:59lorenzofidalgoNew Issue
2015-07-23 12:59lorenzofidalgoAssigned To => Retail
2015-07-23 12:59lorenzofidalgoFile Added: WrongCalculation.png
2015-07-23 12:59lorenzofidalgoRegression level => Packaging and release
2015-07-23 12:59lorenzofidalgoRegression introduced in release => RR15Q2.2
2015-07-23 12:59lorenzofidalgoTriggers an Emergency Pack => No
2015-07-28 10:32lorenzofidalgoRegression introduced in releaseRR15Q2.2 => main
2015-08-03 10:54jorge-garciaAssigned ToRetail => jorge-garcia
2015-08-06 11:37OrekariaRelationship addedrelated to 0030487
2015-08-10 13:44jorge-garciaStatusnew => scheduled
2015-08-10 14:00hgbotCheckin
2015-08-10 14:00hgbotNote Added: 0079282
2015-08-11 08:45hgbotCheckin
2015-08-11 08:45hgbotNote Added: 0079295
2015-08-12 15:50hgbotCheckin
2015-08-12 15:50hgbotNote Added: 0079329
2015-08-12 15:50hgbotCheckin
2015-08-12 15:50hgbotNote Added: 0079330
2015-08-12 15:50hgbotStatusscheduled => resolved
2015-08-12 15:50hgbotResolutionopen => fixed
2015-08-12 15:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dd1b1654516588be2ac16c7a2996da34cb5f0f02 [^]
2015-09-01 14:05mtaalNote Added: 0079994
2015-09-01 14:05mtaalStatusresolved => new
2015-09-01 14:05mtaalResolutionfixed => open
2015-09-24 10:21OrekariaRelationship addedcauses 0030909
2015-09-29 11:37hgbotCheckin
2015-09-29 11:37hgbotNote Added: 0080691
2015-09-29 11:37hgbotStatusnew => resolved
2015-09-29 11:37hgbotResolutionopen => fixed
2015-09-29 11:37hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dd1b1654516588be2ac16c7a2996da34cb5f0f02 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e960d20067598493e6bdaea0f947efc531e3027d [^]
2015-09-29 12:29marvintmAssigned Tojorge-garcia => marvintm
2015-09-29 18:40marvintmReview Assigned To => Orekaria
2015-09-30 16:15OrekariaStatusresolved => closed
2015-09-30 16:15OrekariaFixed in Version => RR15Q4
2015-10-21 09:38hgbotCheckin
2015-10-21 09:38hgbotNote Added: 0081165

Notes
(0079282)
hgbot   
2015-08-10 14:00   
Repository: tools/automation/pi-mobile
Changeset: 7bcc967a0ca533a53cabf324885d6f71f932ab4a
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Mon Aug 10 13:59:13 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/7bcc967a0ca533a53cabf324885d6f71f932ab4a [^]

Verifies issue 30412: Added Test I30412_QuotationsAndPromotions

---
M src-test/org/openbravo/test/mobile/common/selenium/javascript/TestId.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I30412_QuotationsAndPromotions.java
---
(0079295)
hgbot   
2015-08-11 08:45   
Repository: retail/backports/3.0RR15Q3/org.openbravo.retail.posterminal
Changeset: c4fd068a6e7779d494d794388cc4f7d7b34b25a3
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Aug 11 08:43:28 2015 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR15Q3/org.openbravo.retail.posterminal/rev/c4fd068a6e7779d494d794388cc4f7d7b34b25a3 [^]

Fixed issue 30535: Creating a sales order from quotation with "Firm quotation"

Backport for the issue 30412

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0079329)
hgbot   
2015-08-12 15:50   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: afb5fb3f52114d5d9542e64e0557bf7a5bbce233
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Wed Aug 12 15:44:38 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/afb5fb3f52114d5d9542e64e0557bf7a5bbce233 [^]

Backed out changeset: eb99e00b4fac, issue 30487: The fix is replaced by the issue 30412 fix

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0079330)
hgbot   
2015-08-12 15:50   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: dd1b1654516588be2ac16c7a2996da34cb5f0f02
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Aug 11 08:43:28 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dd1b1654516588be2ac16c7a2996da34cb5f0f02 [^]

Fixed issue 30412: Removed the 'orderCreatedFromQuotation' trigger

Creating a sales order from quotation with "Firm quotation" or reactivate quotation no longer fire the trigger

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0079994)
mtaal   
2015-09-01 14:05   
Hi,
When reviewing I saw strange things in the flow of creating the order from the quotation. Not related to the changes done for this issue but in earlier code.
The solution in this issue tries to solve it by remove the trigger call to orderCreatedFromQuotation

However when checking the code, the trigger code seems strange, it does a clone of a quotation this while it is only called from the order.js.createOrderFromQuotation which already changes the quotation to an order and saves it (but where does it add it to the orderlist).

As part of the fix I propose the following:
- check the logic/flow in the orderCreatedFromQuotation trigger and then validate which part of this logic of this trigger makes still sense (when comparing/checking against the code in the createOrderFromQuotation method
- then move/re-implement this part of the orderCreatedFromQuotation trigger in the createOrderFromQuotation function.
- and remove the orderCreatedFromQuotation trigger implementation and call to it

gr. Martin
(0080691)
hgbot   
2015-09-29 11:37   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e960d20067598493e6bdaea0f947efc531e3027d
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Sep 29 11:37:00 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e960d20067598493e6bdaea0f947efc531e3027d [^]

Fixed issue 30412. Fixed issue 30909. Now quotations will be closed in the backend when tickets are done.
- Unneeded event has been removed, as it was no longer necessary.
- OldId property will be set correctly, in the proper callback.

---
M web/org.openbravo.retail.posterminal/js/components/modalcreateorderfromquotation.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
---
(0081165)
hgbot   
2015-10-21 09:38   
Repository: tools/automation/pi-mobile
Changeset: cef475bcfa9a44edebfb7b262d99dfec488cb6ba
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Tue Oct 20 22:48:18 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/cef475bcfa9a44edebfb7b262d99dfec488cb6ba [^]

Related to issue 29953, Related to issue 30412: Add new test to validate quotations flow

---
M src-test/org/openbravo/test/mobile/common/selenium/javascript/TestId.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I29953_ReactivateQuotation.java
---