POS Sales Order -> Could not create Shipment Line

https://sourceforge.net/tracker/?func=detail&aid=2757978&group_id=176962&atid=879332

Carlos, please help me with a review
This commit is contained in:
teo_sarca 2009-04-30 07:53:28 +00:00
parent e5c714c084
commit db9e81c387
3 changed files with 57 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import java.sql.ResultSet;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import org.adempiere.exceptions.FillMandatoryException;
import org.compiere.util.DB; import org.compiere.util.DB;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
@ -481,7 +482,12 @@ public class MInOutLine extends X_M_InOutLine
*/ */
protected boolean beforeSave (boolean newRecord) protected boolean beforeSave (boolean newRecord)
{ {
log.fine(""); log.fine("");
// Locator is mandatory if no charge is defined - teo_sarca BF [ 2757978 ]
if (getM_Locator_ID() <= 0 && getC_Charge_ID() <= 0)
{
throw new FillMandatoryException(COLUMNNAME_M_Locator_ID);
}
// Get Line No // Get Line No
if (getLine() == 0) if (getLine() == 0)
{ {

View File

@ -0,0 +1,25 @@
-- Apr 30, 2009 10:13:34 AM EEST
--
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2009-04-30 10:13:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=3537
;
-- Apr 30, 2009 10:13:48 AM EEST
--
ALTER TABLE M_InOutLine MODIFY M_Locator_ID NUMBER(10) DEFAULT NULL
;
-- Apr 30, 2009 10:13:48 AM EEST
--
ALTER TABLE M_InOutLine MODIFY M_Locator_ID NULL
;
-- Apr 30, 2009 10:45:23 AM EEST
--
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2009-04-30 10:45:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=3514
;
-- Apr 30, 2009 10:46:16 AM EEST
--
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2009-04-30 10:46:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=2717
;

View File

@ -0,0 +1,25 @@
-- Apr 30, 2009 10:13:34 AM EEST
--
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2009-04-30 10:13:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=3537
;
-- Apr 30, 2009 10:13:48 AM EEST
--
insert into t_alter_column values('m_inoutline','M_Locator_ID','NUMERIC(10)',null,'NULL')
;
-- Apr 30, 2009 10:13:48 AM EEST
--
insert into t_alter_column values('m_inoutline','M_Locator_ID',null,'NULL',null)
;
-- Apr 30, 2009 10:45:23 AM EEST
--
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2009-04-30 10:45:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=3514
;
-- Apr 30, 2009 10:46:16 AM EEST
--
UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2009-04-30 10:46:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=2717
;