IDEMPIERE-780 On Invoice Gen/Shipment Gen, Document Action (make that field mandatory) / based on patch from Richard Morales
This commit is contained in:
parent
1cfb0bc2e0
commit
fefc1c0ee3
|
@ -192,6 +192,9 @@ public class WInOutGen extends InOutGen implements IFormController, EventListene
|
||||||
{
|
{
|
||||||
throw new WrongValueException(fWarehouse.getComponent(), Msg.translate(Env.getCtx(), "FillMandatory"));
|
throw new WrongValueException(fWarehouse.getComponent(), Msg.translate(Env.getCtx(), "FillMandatory"));
|
||||||
}
|
}
|
||||||
|
String docActionSelected = (String)docAction.getValue();
|
||||||
|
if ( docActionSelected==null || docActionSelected.isEmpty() )
|
||||||
|
throw new WrongValueException(docAction.getComponent(), Msg.translate(Env.getCtx(), "FillMandatory"));
|
||||||
|
|
||||||
form.saveSelection();
|
form.saveSelection();
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
import org.zkoss.zk.ui.WrongValueException;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zul.Space;
|
import org.zkoss.zul.Space;
|
||||||
|
@ -186,6 +187,10 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
|
||||||
|
|
||||||
public void validate()
|
public void validate()
|
||||||
{
|
{
|
||||||
|
String docActionSelected = (String)docAction.getValue();
|
||||||
|
if ( docActionSelected==null || docActionSelected.isEmpty() )
|
||||||
|
throw new WrongValueException(docAction.getComponent(), Msg.translate(Env.getCtx(), "FillMandatory"));
|
||||||
|
|
||||||
form.saveSelection();
|
form.saveSelection();
|
||||||
|
|
||||||
ArrayList<Integer> selection = getSelection();
|
ArrayList<Integer> selection = getSelection();
|
||||||
|
|
Loading…
Reference in New Issue