/******************************************************************************
 * Product: iDempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.isnov.plugin.model;

import X_iNO_RoomTable;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.model.X_AD_User;
import org.compiere.model.X_C_BPartner;
import org.compiere.model.X_C_Channel;
import org.compiere.model.X_C_Currency;
import org.compiere.model.X_C_DocType;
import org.compiere.model.X_C_Order;
import org.compiere.model.X_C_UOM;
import org.compiere.model.X_M_PriceList;
import org.compiere.model.X_M_Product;
import org.compiere.model.X_M_Warehouse;
import org.compiere.util.Env;

/**
 * Generated Model for table iNO_PrepareOrder
 * @author iDempiere (generated)
 * @version Release 7.1 - $Id$
 */
public class X_iNO_PrepareOrder extends PO implements I_iNO_PrepareOrder, I_Persistent {

	private static final long serialVersionUID = 20240107L;

	/**
	 * Standard Constructor
	 */
	public X_iNO_PrepareOrder (Properties ctx, int iNO_PrepareOrder_ID, String trxName) {
		super (ctx, iNO_PrepareOrder_ID, trxName);
		/** if (iNO_PrepareOrder_ID == 0)
		{
			setC_BPartner_ID (0);
			setC_DocTypeTarget_ID (0);
			setDateOrdered (new Timestamp( System.currentTimeMillis() ));
// @#Date@
			setiEXT_OfflineDate (new Timestamp( System.currentTimeMillis() ));
// @#Date@
			setiNO_PrepareOrder_ID (0);
			setM_PriceList_ID (0);
			setM_Warehouse_ID (0);
			setSalesRep_ID (0);
		} */
    }

	/**
	 * Load Constructor
	 */
	public X_iNO_PrepareOrder (Properties ctx, ResultSet rs, String trxName) {
		super (ctx, rs, trxName);
	}

	/**
	 * AccessLevel
	 * @return 3 - Client - Org 
	 */
	protected int get_AccessLevel() {
		return accessLevel.intValue();
	}

	/**
	 * Load Meta Data
	 */
	protected POInfo initPO (Properties ctx) {
		POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
		return poi;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder ("X_iNO_PrepareOrder[")
			.append(get_ID()).append("]");
		return sb.toString();
	}

	/**
	 * Set BP Name2.
	 * @param BPName2 BP Name2
	 */
	public void setBPName2 (String bPName2) {
		set_ValueNoCheck (COLUMNNAME_BPName2, bPName2);
	}

	/**
	 * Get BP Name2.
	 * @return BP Name2
	 */
	public String getBPName2 () {
		return (String)get_Value(COLUMNNAME_BPName2);
	}

	public X_C_BPartner getC_BPartner() throws RuntimeException {
		return (X_C_BPartner)MTable.get(getCtx(), X_C_BPartner.Table_Name)
				.getPO(getC_BPartner_ID(), get_TrxName());
	}

	/**
	 * Set Business Partner .
	 * @param C_BPartner_ID 
	 * Identifies a Business Partner
	 */
	public void setC_BPartner_ID (int bPartnerID) {
		if (bPartnerID < 1) 
			set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, Integer.valueOf(bPartnerID));
	}

	/**
	 * Get Business Partner .
	 * @return Identifies a Business Partner
	 */
	public int getC_BPartner_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public X_C_Channel getC_Channel() throws RuntimeException {
		return (X_C_Channel)MTable.get(getCtx(), X_C_Channel.Table_Name)
				.getPO(getC_Channel_ID(), get_TrxName());
	}

	/**
	 * Set Channel.
	 * @param C_Channel_ID 
	 * Sales Channel
	 */
	public void setC_Channel_ID (int channelID) {
		if (channelID < 1) 
			set_Value (COLUMNNAME_C_Channel_ID, null);
		else 
			set_Value (COLUMNNAME_C_Channel_ID, Integer.valueOf(channelID));
	}

	/**
	 * Get Channel.
	 * @return Sales Channel
	 */
	public int getC_Channel_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Channel_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public X_C_Currency getC_Currency() throws RuntimeException {
		return (X_C_Currency)MTable.get(getCtx(), X_C_Currency.Table_Name)
				.getPO(getC_Currency_ID(), get_TrxName());
	}

	/**
	 * Set Currency.
	 * @param C_Currency_ID 
	 * The Currency for this record
	 */
	public void setC_Currency_ID (int currencyID) {
		if (currencyID < 1) 
			set_Value (COLUMNNAME_C_Currency_ID, null);
		else 
			set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(currencyID));
	}

	/**
	 * Get Currency.
	 * @return The Currency for this record
	 */
	public int getC_Currency_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public X_C_DocType getC_DocTypeTarget() throws RuntimeException {
		return (X_C_DocType)MTable.get(getCtx(), X_C_DocType.Table_Name)
				.getPO(getC_DocTypeTarget_ID(), get_TrxName());
	}

	/**
	 * Set Target Document Type.
	 * @param C_DocTypeTarget_ID 
	 * Target document type for conversing documents
	 */
	public void setC_DocTypeTarget_ID (int docTypeTargetID) {
		if (docTypeTargetID < 1) 
			set_ValueNoCheck (COLUMNNAME_C_DocTypeTarget_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(docTypeTargetID));
	}

	/**
	 * Get Target Document Type.
	 * @return Target document type for conversing documents
	 */
	public int getC_DocTypeTarget_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeTarget_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public X_C_Order getC_Order() throws RuntimeException {
		return (X_C_Order)MTable.get(getCtx(), X_C_Order.Table_Name)
				.getPO(getC_Order_ID(), get_TrxName());
	}

	/**
	 * Set Order.
	 * @param C_Order_ID 
	 * Order
	 */
	public void setC_Order_ID (int orderID) {
		if (orderID < 1) 
			set_Value (COLUMNNAME_C_Order_ID, null);
		else 
			set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(orderID));
	}

	/**
	 * Get Order.
	 * @return Order
	 */
	public int getC_Order_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set Date Ordered.
	 * @param DateOrdered 
	 * Date of Order
	 */
	public void setDateOrdered (Timestamp dateOrdered) {
		set_ValueNoCheck (COLUMNNAME_DateOrdered, dateOrdered);
	}

	/**
	 * Get Date Ordered.
	 * @return Date of Order
	 */
	public Timestamp getDateOrdered () {
		return (Timestamp)get_Value(COLUMNNAME_DateOrdered);
	}

	/**
	 * Set Date Promised.
	 * @param DatePromised 
	 * Date Order was promised
	 */
	public void setDatePromised (Timestamp datePromised) {
		set_Value (COLUMNNAME_DatePromised, datePromised);
	}

	/**
	 * Get Date Promised.
	 * @return Date Order was promised
	 */
	public Timestamp getDatePromised () {
		return (Timestamp)get_Value(COLUMNNAME_DatePromised);
	}

	/**
	 * Set Description.
	 * @param Description 
	 * Optional short description of the record
	 */
	public void setDescription (String description) {
		set_Value (COLUMNNAME_Description, description);
	}

	/**
	 * Get Description.
	 * @return Optional short description of the record
	 */
	public String getDescription () {
		return (String)get_Value(COLUMNNAME_Description);
	}

	/**
	 * Set Grand Total.
	 * @param GrandTotal 
	 * Total amount of document
	 */
	public void setGrandTotal (BigDecimal grandTotal) {
		set_ValueNoCheck (COLUMNNAME_GrandTotal, grandTotal);
	}

	/**
	 * Get Grand Total.
	 * @return Total amount of document
	 */
	public BigDecimal getGrandTotal () {
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_GrandTotal);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/**
	 * Set Delivery Location.
	 * @param iEXT_DeliveryLocation Delivery Location
	 */
	public void setiEXT_DeliveryLocation (String deliveryLocation) {
		set_Value (COLUMNNAME_iEXT_DeliveryLocation, deliveryLocation);
	}

	/**
	 * Get Delivery Location.
	 * @return Delivery Location
	 */
	public String getiEXT_DeliveryLocation () {
		return (String)get_Value(COLUMNNAME_iEXT_DeliveryLocation);
	}

	/**
	 * Set External Trx UUID.
	 * @param iEXT_ExternalTrx_UUID External Trx UUID
	 */
	public void setiEXT_ExternalTrx_UUID (String externalTrxUUID) {
		set_Value (COLUMNNAME_iEXT_ExternalTrx_UUID, externalTrxUUID);
	}

	/**
	 * Get External Trx UUID.
	 * @return External Trx UUID
	 */
	public String getiEXT_ExternalTrx_UUID () {
		return (String)get_Value(COLUMNNAME_iEXT_ExternalTrx_UUID);
	}

	/**
	 * Set Process Now.
	 * @param iEXT_HDR_Processing Process Now
	 */
	public void setiEXT_HDR_Processing (String hDRProcessing) {
		set_Value (COLUMNNAME_iEXT_HDR_Processing, hDRProcessing);
	}

	/**
	 * Get Process Now.
	 * @return Process Now
	 */
	public String getiEXT_HDR_Processing () {
		return (String)get_Value(COLUMNNAME_iEXT_HDR_Processing);
	}

	public X_M_Product getiEXT_HDR_Product() throws RuntimeException {
		return (X_M_Product)MTable.get(getCtx(), X_M_Product.Table_Name)
				.getPO(getiEXT_HDR_Product_ID(), get_TrxName());
	}

	/**
	 * Set Product.
	 * @param iEXT_HDR_Product_ID Product
	 */
	public void setiEXT_HDR_Product_ID (int hDRProductID) {
		if (hDRProductID < 1) 
			set_Value (COLUMNNAME_iEXT_HDR_Product_ID, null);
		else 
			set_Value (COLUMNNAME_iEXT_HDR_Product_ID, Integer.valueOf(hDRProductID));
	}

	/**
	 * Get Product.
	 * @return Product
	 */
	public int getiEXT_HDR_Product_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_iEXT_HDR_Product_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set Qty.
	 * @param iEXT_HDR_Qty Qty
	 */
	public void setiEXT_HDR_Qty (BigDecimal hDRQty) {
		set_Value (COLUMNNAME_iEXT_HDR_Qty, hDRQty);
	}

	/**
	 * Get Qty.
	 * @return Qty
	 */
	public BigDecimal getiEXT_HDR_Qty () {
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_iEXT_HDR_Qty);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public X_C_UOM getiEXT_HDR_UOM() throws RuntimeException {
		return (X_C_UOM)MTable.get(getCtx(), X_C_UOM.Table_Name)
				.getPO(getiEXT_HDR_UOM_ID(), get_TrxName());
	}

	/**
	 * Set UOM.
	 * @param iEXT_HDR_UOM_ID UOM
	 */
	public void setiEXT_HDR_UOM_ID (int hDRUOMID) {
		if (hDRUOMID < 1) 
			set_Value (COLUMNNAME_iEXT_HDR_UOM_ID, null);
		else 
			set_Value (COLUMNNAME_iEXT_HDR_UOM_ID, Integer.valueOf(hDRUOMID));
	}

	/**
	 * Get UOM.
	 * @return UOM
	 */
	public int getiEXT_HDR_UOM_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_iEXT_HDR_UOM_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set Is For Future Delivery.
	 * @param iEXT_IsForFutureDelivery Is For Future Delivery
	 */
	public void setiEXT_IsForFutureDelivery (boolean isForFutureDelivery) {
		set_Value (COLUMNNAME_iEXT_IsForFutureDelivery, Boolean.valueOf(isForFutureDelivery));
	}

	/**
	 * Get Is For Future Delivery.
	 * @return Is For Future Delivery
	 */
	public boolean isiEXT_IsForFutureDelivery () {
		Object oo = get_Value(COLUMNNAME_iEXT_IsForFutureDelivery);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/**
	 * Set Is Partial Service.
	 * @param iEXT_IsPartialService Is Partial Service
	 */
	public void setiEXT_IsPartialService (boolean isPartialService) {
		set_Value (COLUMNNAME_iEXT_IsPartialService, Boolean.valueOf(isPartialService));
	}

	/**
	 * Get Is Partial Service.
	 * @return Is Partial Service
	 */
	public boolean isiEXT_IsPartialService () {
		Object oo = get_Value(COLUMNNAME_iEXT_IsPartialService);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/**
	 * Set Is To Take Away.
	 * @param iEXT_IsToTakeAway Is To Take Away
	 */
	public void setiEXT_IsToTakeAway (boolean isToTakeAway) {
		set_Value (COLUMNNAME_iEXT_IsToTakeAway, Boolean.valueOf(isToTakeAway));
	}

	/**
	 * Get Is To Take Away.
	 * @return Is To Take Away
	 */
	public boolean isiEXT_IsToTakeAway () {
		Object oo = get_Value(COLUMNNAME_iEXT_IsToTakeAway);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/**
	 * Set Offline Created Date.
	 * @param iEXT_OfflineDate Offline Created Date
	 */
	public void setiEXT_OfflineDate (Timestamp offlineDate) {
		set_Value (COLUMNNAME_iEXT_OfflineDate, offlineDate);
	}

	/**
	 * Get Offline Created Date.
	 * @return Offline Created Date
	 */
	public Timestamp getiEXT_OfflineDate () {
		return (Timestamp)get_Value(COLUMNNAME_iEXT_OfflineDate);
	}

	/**
	 * Set Price committed.
	 * @param IEXT_PriceEntered Price committed
	 */
	public void setIEXT_PriceEntered (BigDecimal priceEntered) {
		set_Value (COLUMNNAME_IEXT_PriceEntered, priceEntered);
	}

	/**
	 * Get Price committed.
	 * @return Price committed
	 */
	public BigDecimal getIEXT_PriceEntered () {
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_IEXT_PriceEntered);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/**
	 * Set Process MoMo Now.
	 * @param IEXT_Processing Process MoMo Now
	 */
	public void setIEXT_Processing (String processing) {
		set_Value (COLUMNNAME_IEXT_Processing, processing);
	}

	/**
	 * Get Process MoMo Now.
	 * @return Process MoMo Now
	 */
	public String getIEXT_Processing () {
		return (String)get_Value(COLUMNNAME_IEXT_Processing);
	}

	/**
	 * Set Prepare Order.
	 * @param iNO_PrepareOrder_ID Prepare Order
	 */
	public void setiNO_PrepareOrder_ID (int prepareOrderID) {
		if (prepareOrderID < 1) 
			set_ValueNoCheck (COLUMNNAME_iNO_PrepareOrder_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_iNO_PrepareOrder_ID, Integer.valueOf(prepareOrderID));
	}

	/**
	 * Get Prepare Order.
	 * @return Prepare Order
	 */
	public int getiNO_PrepareOrder_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_iNO_PrepareOrder_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set iNO_PrepareOrder_UU.
	 * @param iNO_PrepareOrder_UU iNO_PrepareOrder_UU
	 */
	public void setiNO_PrepareOrder_UU (String prepareOrderUU) {
		set_Value (COLUMNNAME_iNO_PrepareOrder_UU, prepareOrderUU);
	}

	/**
	 * Get iNO_PrepareOrder_UU.
	 * @return iNO_PrepareOrder_UU
	 */
	public String getiNO_PrepareOrder_UU () {
		return (String)get_Value(COLUMNNAME_iNO_PrepareOrder_UU);
	}

	public X_iNO_RoomTable getiNO_RoomTable() throws RuntimeException {
		return (X_iNO_RoomTable)MTable.get(getCtx(), X_iNO_RoomTable.Table_Name)
				.getPO(getiNO_RoomTable_ID(), get_TrxName());
	}

	/**
	 * Set Room Table.
	 * @param iNO_RoomTable_ID Room Table
	 */
	public void setiNO_RoomTable_ID (int roomTableID) {
		if (roomTableID < 1) 
			set_ValueNoCheck (COLUMNNAME_iNO_RoomTable_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_iNO_RoomTable_ID, Integer.valueOf(roomTableID));
	}

	/**
	 * Get Room Table.
	 * @return Room Table
	 */
	public int getiNO_RoomTable_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_iNO_RoomTable_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set Delivered.
	 * @param IsDelivered Delivered
	 */
	public void setIsDelivered (boolean isDelivered) {
		set_Value (COLUMNNAME_IsDelivered, Boolean.valueOf(isDelivered));
	}

	/**
	 * Get Delivered.
	 * @return Delivered
	 */
	public boolean isDelivered () {
		Object oo = get_Value(COLUMNNAME_IsDelivered);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/**
	 * Set Paid.
	 * @param IsPaid 
	 * The document is paid
	 */
	public void setIsPaid (boolean isPaid) {
		set_Value (COLUMNNAME_IsPaid, Boolean.valueOf(isPaid));
	}

	/**
	 * Get Paid.
	 * @return The document is paid
	 */
	public boolean isPaid () {
		Object oo = get_Value(COLUMNNAME_IsPaid);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/**
	 * Set Sales Transaction.
	 * @param IsSOTrx 
	 * This is a Sales Transaction
	 */
	public void setIsSOTrx (boolean isSOTrx) {
		set_ValueNoCheck (COLUMNNAME_IsSOTrx, Boolean.valueOf(isSOTrx));
	}

	/**
	 * Get Sales Transaction.
	 * @return This is a Sales Transaction
	 */
	public boolean isSOTrx () {
		Object oo = get_Value(COLUMNNAME_IsSOTrx);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/**
	 * Set Valid.
	 * @param IsValid 
	 * Element is valid
	 */
	public void setIsValid (boolean isValid) {
		set_Value (COLUMNNAME_IsValid, Boolean.valueOf(isValid));
	}

	/**
	 * Get Valid.
	 * @return Element is valid
	 */
	public boolean isValid () {
		Object oo = get_Value(COLUMNNAME_IsValid);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/**
	 * Set Latitude.
	 * @param Latitude 
	 * Defines where the center of the map will be when it first opens. 
	 */
	public void setLatitude (BigDecimal latitude) {
		set_Value (COLUMNNAME_Latitude, latitude);
	}

	/**
	 * Get Latitude.
	 * @return Defines where the center of the map will be when it first opens. 
	 */
	public BigDecimal getLatitude () {
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Latitude);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/**
	 * Set Longitude.
	 * @param Longitude 
	 * Defines where the center of the map will be when it first opens. 
	 */
	public void setLongitude (BigDecimal longitude) {
		set_Value (COLUMNNAME_Longitude, longitude);
	}

	/**
	 * Get Longitude.
	 * @return Defines where the center of the map will be when it first opens. 
	 */
	public BigDecimal getLongitude () {
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Longitude);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public X_M_PriceList getM_PriceList() throws RuntimeException {
		return (X_M_PriceList)MTable.get(getCtx(), X_M_PriceList.Table_Name)
				.getPO(getM_PriceList_ID(), get_TrxName());
	}

	/**
	 * Set Price List.
	 * @param M_PriceList_ID 
	 * Unique identifier of a Price List
	 */
	public void setM_PriceList_ID (int priceListID) {
		if (priceListID < 1) 
			set_Value (COLUMNNAME_M_PriceList_ID, null);
		else 
			set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(priceListID));
	}

	/**
	 * Get Price List.
	 * @return Unique identifier of a Price List
	 */
	public int getM_PriceList_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public X_M_Warehouse getM_Warehouse() throws RuntimeException {
		return (X_M_Warehouse)MTable.get(getCtx(), X_M_Warehouse.Table_Name)
				.getPO(getM_Warehouse_ID(), get_TrxName());
	}

	/**
	 * Set Warehouse.
	 * @param M_Warehouse_ID 
	 * Storage Warehouse and Service Point
	 */
	public void setM_Warehouse_ID (int warehouseID) {
		if (warehouseID < 1) 
			set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(warehouseID));
	}

	/**
	 * Get Warehouse.
	 * @return Storage Warehouse and Service Point
	 */
	public int getM_Warehouse_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set Phone.
	 * @param Phone 
	 * Identifies a telephone number
	 */
	public void setPhone (String phone) {
		set_ValueNoCheck (COLUMNNAME_Phone, phone);
	}

	/**
	 * Get Phone.
	 * @return Identifies a telephone number
	 */
	public String getPhone () {
		return (String)get_Value(COLUMNNAME_Phone);
	}

	/**
	 * Set Order Reference.
	 * @param POReference 
	 * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
	 */
	public void setPOReference (String pOReference) {
		set_ValueNoCheck (COLUMNNAME_POReference, pOReference);
	}

	/**
	 * Get Order Reference.
	 * @return Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
	 */
	public String getPOReference () {
		return (String)get_Value(COLUMNNAME_POReference);
	}

	/**
	 * Set Process Now.
	 * @param Processing Process Now
	 */
	public void setProcessing (boolean processing) {
		set_Value (COLUMNNAME_Processing, Boolean.valueOf(processing));
	}

	/**
	 * Get Process Now.
	 * @return Process Now
	 */
	public boolean isProcessing () {
		Object oo = get_Value(COLUMNNAME_Processing);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	public X_AD_User getSalesRep() throws RuntimeException {
		return (X_AD_User)MTable.get(getCtx(), X_AD_User.Table_Name)
				.getPO(getSalesRep_ID(), get_TrxName());
	}

	/**
	 * Set Sales Representative.
	 * @param SalesRep_ID 
	 * Sales Representative or Company Agent
	 */
	public void setSalesRep_ID (int iD) {
		if (iD < 1) 
			set_ValueNoCheck (COLUMNNAME_SalesRep_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_SalesRep_ID, Integer.valueOf(iD));
	}

	/**
	 * Get Sales Representative.
	 * @return Sales Representative or Company Agent
	 */
	public int getSalesRep_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}