From 853d0727a582dfd4ebdbc96b9fd0ac3746c6ca3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa?= Date: Fri, 13 Dec 2013 12:58:42 -0500 Subject: [PATCH 1/3] IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating --- org.adempiere.base/src/org/compiere/model/MInvoiceLine.java | 2 +- org.adempiere.base/src/org/compiere/model/MOrderLine.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index dd831c1b7e..93dff64ddf 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -865,7 +865,7 @@ public class MInvoiceLine extends X_C_InvoiceLine enforce = false; // Check Price Limit? if (enforce && getPriceLimit() != Env.ZERO - && getPriceActual().compareTo(getPriceLimit()) < 0) + && getPriceEntered().compareTo(getPriceLimit()) < 0) { log.saveError("UnderLimitPrice", "PriceEntered=" + getPriceEntered() + ", PriceLimit=" + getPriceLimit()); return false; diff --git a/org.adempiere.base/src/org/compiere/model/MOrderLine.java b/org.adempiere.base/src/org/compiere/model/MOrderLine.java index b9a7b31640..32e8209510 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrderLine.java +++ b/org.adempiere.base/src/org/compiere/model/MOrderLine.java @@ -834,7 +834,7 @@ public class MOrderLine extends X_C_OrderLine enforce = false; // Check Price Limit? if (enforce && getPriceLimit() != Env.ZERO - && getPriceActual().compareTo(getPriceLimit()) < 0) + && getPriceEntered().compareTo(getPriceLimit()) < 0) { log.saveError("UnderLimitPrice", "PriceEntered=" + getPriceEntered() + ", PriceLimit=" + getPriceLimit()); return false; From 1d1b72c2f1d1056a2059ca91c1d6042df4cb39e5 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Fri, 13 Dec 2013 13:01:17 -0500 Subject: [PATCH 2/3] IDEMPIERE-1628 Route and Map button are not always correctly translated --- .../src/org/compiere/grid/ed/VLocationDialog.java | 9 ++------- .../src/org/adempiere/webui/window/WLocationDialog.java | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocationDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocationDialog.java index 0e9ff2c0c4..0c7fd90512 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocationDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLocationDialog.java @@ -208,11 +208,6 @@ public class VLocationDialog extends CDialog private boolean inCountryAction; private boolean inOKAction; - - /** The "route" key */ - private static final String TO_ROUTE = Msg.getMsg(Env.getCtx(), "Route"); - /** The "to link" key */ - private static final String TO_LINK = Msg.getMsg(Env.getCtx(), "Map"); private JButton toLink = new JButton(); private JButton toRoute = new JButton(); @@ -235,14 +230,14 @@ public class VLocationDialog extends CDialog southPanel.add(confirmPanel, BorderLayout.NORTH); //BEGIN fernandinho/ricardo - toLink.setText(TO_LINK); + toLink.setText(Msg.getMsg(Env.getCtx(), "Map")); toLink.addActionListener(this); toLink.setMargin(ConfirmPanel.s_insets); confirmPanel.addComponent(toLink); if (MLocation.LOCATION_MAPS_URL_PREFIX == null) toLink.setVisible(false); - toRoute.setText(TO_ROUTE); + toRoute.setText(Msg.getMsg(Env.getCtx(), "Route")); toRoute.addActionListener(this); toRoute.setMargin(ConfirmPanel.s_insets); confirmPanel.addComponent(toRoute); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java index 25b4010f4b..7b1ab14f57 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java @@ -130,11 +130,6 @@ public class WLocationDialog extends Window implements EventListener private boolean inCountryAction; private boolean inOKAction; - /** The "route" key */ - private static final String TO_ROUTE = Msg.getMsg(Env.getCtx(), "Route"); - /** The "to link" key */ - private static final String TO_LINK = Msg.getMsg(Env.getCtx(), "Map"); - private Button toLink; private Button toRoute; private GridField m_GridField = null; @@ -263,10 +258,10 @@ public class WLocationDialog extends Window implements EventListener confirmPanel = new ConfirmPanel(true); confirmPanel.addActionListener(this); - toLink = new Button(TO_LINK); + toLink = new Button(Msg.getMsg(Env.getCtx(), "Map")); LayoutUtils.addSclass("txt-btn", toLink); toLink.addEventListener(Events.ON_CLICK,this); - toRoute = new Button(TO_ROUTE); + toRoute = new Button(Msg.getMsg(Env.getCtx(), "Route")); LayoutUtils.addSclass("txt-btn", toRoute); toRoute.addEventListener(Events.ON_CLICK,this); From edbcd9d83ba09b6d79c7cbd414f4582ed41838c3 Mon Sep 17 00:00:00 2001 From: hieplq Date: Wed, 11 Dec 2013 16:51:42 +0700 Subject: [PATCH 3/3] IDEMPIERE-1622 - NPE when switch field in "receipt create lines from" --- .../adempiere/webui/apps/form/WCreateFromShipmentUI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java index 1fd2d334a0..58aea64731 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java @@ -367,7 +367,11 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi // BPartner - load Order/Invoice/Shipment if (e.getPropertyName().equals("C_BPartner_ID")) { - int C_BPartner_ID = ((Integer)e.getNewValue()).intValue(); + int C_BPartner_ID = 0; + if (e.getNewValue() != null){ + C_BPartner_ID = ((Integer)e.getNewValue()).intValue(); + } + initBPOrderDetails (C_BPartner_ID, true); } window.tableChanged(null);