Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014070Openbravo ERP07. Sales managementpublic2010-07-27 17:262010-08-07 00:00
networkb 
sivaraman 
urgentmajoralways
closedfixed 
5
2.50MP20 
2.50MP21 
Core
No
0014070: You can not reactivate a sales order if it has a discount
You can not reactivate a sales order if it has a discount and if it has a good shipment (Void) related.

You can reactivate the order if it has no a discount
- As Openbravo Admin go to Sales Management || Transactions || Sales Order
- Create a new record (Transaction document: standard order)and go to Discounts.
- Create a new record (discount 03%)
- Complete the order.

- Go to Sales Management || Transactions || Create Shipments from Orders

- Go to the good shipment created, void it.

- Go back to the order
- Realize that you can not reactivate it
No tags attached.
Issue History
2010-07-27 17:26networkbNew Issue
2010-07-27 17:26networkbAssigned To => adrianromero
2010-08-03 11:26sivaramanAssigned Toadrianromero => sivaraman
2010-08-05 10:14hgbotCheckin
2010-08-05 10:14hgbotNote Added: 0029814
2010-08-05 10:14hgbotStatusnew => resolved
2010-08-05 10:14hgbotResolutionopen => fixed
2010-08-05 10:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/719c3bbbf9f5441cde8339a02086327897e49758 [^]
2010-08-05 10:18sivaramanNote Added: 0029815
2010-08-05 15:05hudsonbotCheckin
2010-08-05 15:05hudsonbotNote Added: 0029831
2010-08-06 19:38sureshbabuNote Added: 0029843
2010-08-06 19:38sureshbabuStatusresolved => closed
2010-08-07 00:00anonymoussf_bug_id0 => 3040896

Notes
(0029814)
hgbot   
2010-08-05 10:14   
Repository: erp/devel/pi
Changeset: 719c3bbbf9f5441cde8339a02086327897e49758
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Thu Aug 05 13:44:10 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/719c3bbbf9f5441cde8339a02086327897e49758 [^]

Fixes issue 14070: You can not reactivate a sales order if it has a discount

Root cause:
In C_ORDER_POST1, we delete C_ORDERLINE but there is a foreign key constrain in M_INOUTLINE.C_ORDERLINE_ID. Thus, it throws exception in order to prevent C_ORDERLINE.

Fix:
When a sales order with discount is reactivated, null value is updated to it's corresponding m_inoutline.c_orderline_id field before deleting C_ORDERLINE. Thus, foreign key violation is avoided. Also m_inoutline trigger is changed in order to allow to modify c_orderline_id column for voided documents even after processed.

Impacts:
It has been verified that there is no impacts except resolving the issue

---
M src-db/database/model/functions/C_ORDER_POST1.xml
M src-db/database/model/triggers/M_IOLINE_CHK_RESTRICTIONS_TRG.xml
---
(0029815)
sivaraman   
2010-08-05 10:18   
Steps to test:

Kindly follow the steps as given in the Steps To Reproduce section.
(0029831)
hudsonbot   
2010-08-05 15:05   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/719c3bbbf9f5 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/7afc506f5f93 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18021.obx [^]
(0029843)
sureshbabu   
2010-08-06 19:38   
verified