📄 minout.java
字号:
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.util.*;
import java.sql.*;
import java.math.*;
import java.io.Serializable;
import org.compiere.util.Env;
/**
* Shipment Model
*
* @author Jorg Janke
* @version $Id: MInOut.java,v 1.1 2003/04/16 06:08:11 jjanke Exp $
*/
public class MInOut extends PO
{
public MInOut (Properties ctx, int M_InOut_ID)
{
super (ctx, M_InOut_ID);
if (M_InOut_ID == 0)
{
setM_Warehouse_ID (0);
setDateAcct (new Timestamp (System.currentTimeMillis ()));
setMovementType (null);
setDocAction (null);
setMovementDate (new Timestamp (System.currentTimeMillis ()));
setDeliveryViaRule (null);
setProcessed (false);
setPriorityRule (null);
setC_BPartner_Location_ID (0);
setIsSOTrx (false);
setDeliveryRule (null);
setIsPrinted (false);
setFreightCostRule (null);
setM_InOut_ID (0);
setC_BPartner_ID (0);
setC_DocType_ID (0);
setSendEMail (false);
setDocStatus (null);
setDocumentNo (null);
}
} // MInOut
/**
* Load Constructor
* @param ctx context
* @param rs result set record
*/
public MInOut (Properties ctx, ResultSet rs)
{
super (ctx, rs);
} // MInOut
protected POInfo initPO (Properties ctx)
{
int AD_Table_ID = 319;
POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
return poi;
}
public boolean save ()
{
log.debug ("save");
return super.save ();
}
public String toString ()
{
StringBuffer sb = new StringBuffer ("MInOut[").append (getID ()).append ("]");
return sb.toString ();
}
public void setM_Warehouse_ID (int M_Warehouse_ID)
{
setValue ("M_Warehouse_ID", new Integer (M_Warehouse_ID));
}
public int getM_Warehouse_ID ()
{
Integer ii = (Integer)getValue ("M_Warehouse_ID");
if (ii == null)
return 0;
return ii.intValue ();
}
public void setDateAcct (Timestamp DateAcct)
{
if (DateAcct == null)
throw new IllegalArgumentException ("DateAcct is mandatory");
setValue ("DateAcct", DateAcct);
}
public Timestamp getDateAcct ()
{
return (Timestamp)getValue ("DateAcct");
}
public void setC_BPartner_Contact_ID (int C_BPartner_Contact_ID)
{
setValue ("C_BPartner_Contact_ID", new Integer (C_BPartner_Contact_ID));
}
public int getC_BPartner_Contact_ID ()
{
Integer ii = (Integer)getValue ("C_BPartner_Contact_ID");
if (ii == null)
return 0;
return ii.intValue ();
}
public void setCreateFrom (String CreateFrom)
{
setValue ("CreateFrom", CreateFrom);
}
public String getCreateFrom ()
{
return (String)getValue ("CreateFrom");
}
public void setGenerateTo (String GenerateTo)
{
setValue ("GenerateTo", GenerateTo);
}
public String getGenerateTo ()
{
return (String)getValue ("GenerateTo");
}
public void setChargeAmt (BigDecimal ChargeAmt)
{
setValue ("ChargeAmt", ChargeAmt);
}
public BigDecimal getChargeAmt ()
{
BigDecimal bd = (BigDecimal)getValue ("ChargeAmt");
if (bd == null)
return Env.ZERO;
return bd;
}
void setDateOrdered (Timestamp DateOrdered)
{
setValueNoCheck ("DateOrdered", DateOrdered);
}
public Timestamp getDateOrdered ()
{
return (Timestamp)getValue ("DateOrdered");
}
public void setDescription (String Description)
{
setValue ("Description", Description);
}
public String getDescription ()
{
return (String)getValue ("Description");
}
public static final String MovementType_ProductionP = "P+";
public static final String MovementType_ProductionM = "P-";
public static final String MovementType_CustomerShipment = "C-";
public static final String MovementType_CustomerReturns = "C+";
public static final String MovementType_VendorReceipts = "V+";
public static final String MovementType_VendorReturns = "V-";
public static final String MovementType_InventoryOut = "I-";
public static final String MovementType_InventoryIn = "I+";
public static final String MovementType_MovementFrom = "M-";
public static final String MovementType_MovementTo = "M+";
void setMovementType (String MovementType)
{
if (MovementType.equals ("P+") || MovementType.equals ("P-") || MovementType.equals ("C-") || MovementType.equals ("C+") || MovementType.equals ("V+") || MovementType.equals ("V-") || MovementType.equals ("I-") || MovementType.equals ("I+") || MovementType.equals ("M-") || MovementType.equals ("M+"))
;
else
throw new IllegalArgumentException ("MovementType Invalid value - Reference_ID=189 - P+ - P- - C- - C+ - V+ - V- - I- - I+ - M- - M+");
if (MovementType == null)
throw new IllegalArgumentException ("MovementType is mandatory");
setValueNoCheck ("MovementType", MovementType);
}
public String getMovementType ()
{
return (String)getValue ("MovementType");
}
public static final String DocAction_Complete = "CO";
public static final String DocAction_Approve = "AP";
public static final String DocAction_Reject = "RJ";
public static final String DocAction_Post = "PO";
public static final String DocAction_Void = "VO";
public static final String DocAction_Close = "CL";
public static final String DocAction_ReverseCorrection = "RC";
public static final String DocAction_ReverseAccrual = "RA";
public static final String DocAction_Transfer = "TR";
public static final String DocAction_ReActivate = "RE";
public static final String DocAction_None = "--";
public static final String DocAction_Process = "PR";
public static final String DocAction_Unlock = "XL";
void setDocAction (String DocAction)
{
if (DocAction.equals ("CO") || DocAction.equals ("AP") || DocAction.equals ("RJ") || DocAction.equals ("PO") || DocAction.equals ("VO") || DocAction.equals ("CL") || DocAction.equals ("RC") || DocAction.equals ("RA") || DocAction.equals ("TR") || DocAction.equals ("RE") || DocAction.equals ("--") || DocAction.equals ("PR")
|| DocAction.equals ("XL"))
;
else
throw new IllegalArgumentException ("DocAction Invalid value - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - TR - RE - -- - PR - XL");
if (DocAction == null)
throw new IllegalArgumentException ("DocAction is mandatory");
setValueNoCheck ("DocAction", DocAction);
}
public String getDocAction ()
{
return (String)getValue ("DocAction");
}
public void setMovementDate (Timestamp MovementDate)
{
if (MovementDate == null)
throw new IllegalArgumentException ("MovementDate is mandatory");
setValue ("MovementDate", MovementDate);
}
public Timestamp getMovementDate ()
{
return (Timestamp)getValue ("MovementDate");
}
public void setFreightAmt (BigDecimal FreightAmt)
{
setValue ("FreightAmt", FreightAmt);
}
public BigDecimal getFreightAmt ()
{
BigDecimal bd = (BigDecimal)getValue ("FreightAmt");
if (bd == null)
return Env.ZERO;
return bd;
}
public void setC_Invoice_ID (int C_Invoice_ID)
{
setValue ("C_Invoice_ID", new Integer (C_Invoice_ID));
}
public int getC_Invoice_ID ()
{
Integer ii = (Integer)getValue ("C_Invoice_ID");
if (ii == null)
return 0;
return ii.intValue ();
}
public static final String DeliveryViaRule_Pickup = "P";
public static final String DeliveryViaRule_Delivery = "D";
public static final String DeliveryViaRule_Shipper = "S";
public void setDeliveryViaRule (String DeliveryViaRule)
{
if (DeliveryViaRule.equals ("P") || DeliveryViaRule.equals ("D") || DeliveryViaRule.equals ("S"))
;
else
throw new IllegalArgumentException ("DeliveryViaRule Invalid value - Reference_ID=152 - P - D - S");
if (DeliveryViaRule == null)
throw new IllegalArgumentException ("DeliveryViaRule is mandatory");
setValue ("DeliveryViaRule", DeliveryViaRule);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -