📄 mpricelistversion.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. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.*;
import java.util.*;
import org.compiere.util.*;
/**
* Price List Version Model
*
* @author Jorg Janke
* @version $Id: MPriceListVersion.java,v 1.5 2005/03/11 20:26:04 jjanke Exp $
*/
public class MPriceListVersion extends X_M_PriceList_Version
{
/**
* Standard Cinstructor
* @param ctx context
* @param M_PriceList_Version_ID id
*/
public MPriceListVersion(Properties ctx, int M_PriceList_Version_ID, String trxName)
{
super(ctx, M_PriceList_Version_ID, trxName);
if (M_PriceList_Version_ID == 0)
{
// setName (null); // @#Date@
// setM_PriceList_ID (0);
// setValidFrom (TimeUtil.getDay(null)); // @#Date@
// setM_DiscountSchema_ID (0);
}
} // MPriceListVersion
/**
* Load Constructor
* @param ctx context
* @param rs result set
*/
public MPriceListVersion(Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
} // MPriceListVersion
/**
* Parent Constructor
* @param pl parent
*/
public MPriceListVersion (MPriceList pl)
{
this (pl.getCtx(), 0, pl.get_TrxName());
setClientOrg(pl);
setM_PriceList_ID(pl.getM_PriceList_ID());
} // MPriceListVersion
/**
* Set Name to Valid From Date.
* If valid from not set, use today
*/
public void setName()
{
if (getValidFrom() == null)
setValidFrom (TimeUtil.getDay(null));
if (getName() == null)
{
String name = DisplayType.getDateFormat(DisplayType.Date)
.format(getValidFrom());
setName(name);
}
} // setName
/**
* Before Save
* @param newRecord new
* @return true
*/
protected boolean beforeSave (boolean newRecord)
{
setName();
return true;
} // beforeSave
} // MPriceListVersion
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -