details: https://code.openbravo.com/erp/devel/pi/rev/08caaa2c34dc
changeset: 19854:08caaa2c34dc
user: Carlos Aristu <carlos.aristu <at> openbravo.com>
date: Mon Mar 04 22:51:13 2013 +0100
summary: fixes issue 22914: Wrong calculation of Planned Order Date in
Manufacturing Plan process
diffstat:
src-db/database/model/functions/MRP_PROCESSPLAN_PLAN.xml | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (17 lines):
diff -r 95d14a197bcd -r 08caaa2c34dc
src-db/database/model/functions/MRP_PROCESSPLAN_PLAN.xml
--- a/src-db/database/model/functions/MRP_PROCESSPLAN_PLAN.xml Mon Mar 04
11:50:38 2013 +0100
+++ b/src-db/database/model/functions/MRP_PROCESSPLAN_PLAN.xml Mon Mar 04
22:51:13 2013 +0100
@@ -88,9 +88,10 @@
END IF;
v_plannedorderdate_new := Cur_Lines.planneddate -
- GREATEST(Cur_Lines.DELAYMIN, (CASE WHEN
Cur_Lines.CAPACITY IS NULL THEN 0
- ELSE
CEIL(v_Qty_new/Cur_Lines.CAPACITY)
- END));
+ (COALESCE(Cur_Lines.DELAYMIN, 0) +
+ (CASE WHEN Cur_Lines.CAPACITY IS NULL THEN 0
+ ELSE CEIL(v_Qty_new/Cur_Lines.CAPACITY)
+ END));
UPDATE MRP_RUN_PRODUCTIONLINE
SET qty = v_qty_new,
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits