Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0016629 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
design defect | [Openbravo ERP] 07. Sales management | major | have not tried | 2011-04-04 11:18 | 2013-05-13 16:03 | |||||||
Reporter | adrianromero | View Status | public | |||||||||
Assigned To | mirurita | |||||||||||
Priority | urgent | Resolution | open | Fixed in Version | ||||||||
Status | scheduled | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | pi | SCM revision | ||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0016629: A sales order with discount cannot be reactivated nor closed | |||||||||||
Description | if there is a sales order with discount, and its related invoice or shipment is voided, if you try reactivate or close the sales order, an error is returned and the operation cannot be done. | |||||||||||
Steps To Reproduce | . business partner with discount with check "apply in order" selected . create a new sales order "warehouse order" . process the order . create and process a new invoice from sales order . the invoice is voided . if you try reactivate the sales order, error is returned: "update o delete en «c_orderline» viola la llave foránea «c_invoiceline_c_orderline» en la tabla «c_invoiceline»" | |||||||||||
Tags | VMA-Reviewed | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0035517) hgbot (developer) 2011-04-04 11:20 |
Repository: erp/devel/pi Changeset: 0d9752224f7aeb21eba531cdf7b0c0f3af0191f2 Author: Adrián Romero <adrianromero <at> openbravo.com> Date: Mon Apr 04 11:19:19 2011 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/0d9752224f7aeb21eba531cdf7b0c0f3af0191f2 [^] Issue 0016629: A sales order with discount cannot be reactivated nor closed It has been disabled the recalculation of discounts when closing orders because this is the origin of the error. The recalculation of discounts when closing an order is not necessary because discounts of a completed order are properly calculated yet. --- M src-db/database/model/functions/C_ORDER_POST1.xml --- |
(0036139) adrianromero (manager) 2011-04-27 18:05 |
Repository: erp/devel/pi Changeset: d292a70703182120ee241ce8c61e83f8dc94a916 Author: Adrián Romero <adrianromero <at> openbravo.com> Date: Wed Apr 27 18:00:31 2011 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/d292a70703182120ee241ce8c61e83f8dc94a916 [^] [^] Issue 0016056: A sales order with discount cannot be reactivated nor closed It has been fixed the process of closing sales orders. Discounts are recalculated reusing previous discount lines if it is not possible to delete these discount lines because there already exist records linked to these discount lines --- M src-db/database/model/functions/C_ORDER_POST1.xml |
(0048245) naiaramartinez (developer) 2012-05-02 18:02 |
Create a goods shipment related to a sales order. If the good shipment is processed but then you reactivate it to void, you can reactivate the sales order. That's why in the C_ORDER_POST1 the following is done: UPDATE M_INOUTLINE SET C_ORDERLINE_ID = NULL WHERE (SELECT DISTINCT A.DOCSTATUS FROM M_INOUT A, M_INOUTLINE B, C_ORDERLINE C WHERE A.M_INOUT_ID = B.M_INOUT_ID AND B.C_ORDERLINE_ID = C.C_ORDERLINE_ID AND C.C_ORDER_DISCOUNT_ID IS NOT NULL AND C.C_ORDER_ID = v_Record_ID) = 'VO' AND C_ORDERLINE_ID IN (SELECT C_ORDERLINE_ID FROM C_ORDERLINE WHERE C_ORDER_DISCOUNT_ID IS NOT NULL AND C_ORDER_ID = v_Record_ID); But with invoices this is not done. So if you create an invoice related to a sales order and this invoice you process and then you reactivate to void, the sales order can't be reactivate because the invoicelines are still related to orderlines. So, we have to set to null c_orderline_Id in C_invoicelines when we want to reactivate the order. |
Issue History | |||
Date Modified | Username | Field | Change |
2011-04-04 11:18 | adrianromero | New Issue | |
2011-04-04 11:18 | adrianromero | Assigned To | => adrianromero |
2011-04-04 11:18 | adrianromero | Modules | => Core |
2011-04-04 11:18 | adrianromero | Issue generated from | 0016056 |
2011-04-04 11:18 | adrianromero | Relationship added | blocks 0016056 |
2011-04-04 11:20 | hgbot | Checkin | |
2011-04-04 11:20 | hgbot | Note Added: 0035517 | |
2011-04-04 11:21 | adrianromero | Status | new => scheduled |
2011-04-04 11:21 | adrianromero | fix_in_branch | => pi |
2011-04-27 18:05 | adrianromero | Note Added: 0036139 | |
2011-06-03 10:58 | dalsasua | Assigned To | adrianromero => dalsasua |
2011-07-20 18:16 | dalsasua | Assigned To | dalsasua => jonalegriaesarte |
2012-02-15 19:04 | iciordia | Assigned To | jonalegriaesarte => vmromanos |
2012-02-16 16:05 | vmromanos | Tag Attached: VMA-Reviewed | |
2012-05-02 18:02 | naiaramartinez | Note Added: 0048245 | |
2012-05-10 12:12 | gorka_gil | Assigned To | vmromanos => mirurita |
2013-05-13 16:03 | Sandrahuguet | Triggers an Emergency Pack | => No |
2013-05-13 16:03 | Sandrahuguet | Type | defect => design defect |
2013-05-13 16:03 | Sandrahuguet | fix_in_branch | pi => |
Copyright © 2000 - 2009 MantisBT Group |