details: /erp/devel/pi/rev/0d9752224f7a
changeset: 11444:0d9752224f7a
user: Adrián Romero <adrianromero <at> openbravo.com>
date: Mon Apr 04 11:19:19 2011 +0200
summary: 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.
diffstat:
src-db/database/model/functions/C_ORDER_POST1.xml | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r dc283db4f5f6 -r 0d9752224f7a
src-db/database/model/functions/C_ORDER_POST1.xml
--- a/src-db/database/model/functions/C_ORDER_POST1.xml Mon Apr 04 09:39:57
2011 +0200
+++ b/src-db/database/model/functions/C_ORDER_POST1.xml Mon Apr 04 11:19:19
2011 +0200
@@ -618,8 +618,12 @@
END IF;--END_PROCESSING
IF(NOT FINISH_PROCESS AND NOT END_PROCESSING) THEN
/**************************************************************************
- * Calculate Discounts
+ * Calculate Discounts only when processing the document.
*************************************************************************/
+
+ -- AProove, COmplete, PRocess
+ IF(v_DocAction IN('AP', 'CO', 'PR')) THEN
+
-- Delete first previous discounts if any and then recalculate them
DELETE
FROM C_ORDERLINE
@@ -706,6 +710,7 @@
END LOOP;
v_Line:=v_Line + 10;
END LOOP;
+ END IF;
END IF;
IF(NOT END_PROCESSING AND NOT FINISH_PROCESS) THEN
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits