IDEMPIERE-780 On Invoice Gen/Shipment Gen, Document Action (make that field mandatory) / based on patch from Richard Morales

This commit is contained in:
Carlos Ruiz 2013-03-22 16:05:26 -05:00
parent 1cfb0bc2e0
commit fefc1c0ee3
2 changed files with 8 additions and 0 deletions

View File

@ -192,6 +192,9 @@ public class WInOutGen extends InOutGen implements IFormController, EventListene
{
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();

View File

@ -37,6 +37,7 @@ import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Space;
@ -186,6 +187,10 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
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();
ArrayList<Integer> selection = getSelection();