⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 docvo.java

📁 Java写的ERP系统
💻 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  Business Solution
 * The Initial Developer of the Original Code is Jorg Janke  and ComPiere, Inc.
 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
 * Contributor(s): ______________________________________.
 *****************************************************************************/
package org.compiere.acct;

import java.sql.*;
import java.math.*;

import org.compiere.util.Env;

/**
 *  Document Value Object - holds common Document Information
 *
 *  @author Jorg Janke
 *  @version  $Id: DocVO.java,v 1.14 2003/03/19 06:47:31 jjanke Exp $
 */
public class DocVO
{
	/**
	 *  Constructor
	 *  @param ad_Table_ID AD_Table_ID
	 */
	protected DocVO (int ad_Table_ID)
	{
		AD_Table_ID = ad_Table_ID;
		//	Amounts
		Amounts[0] = Env.ZERO;
		Amounts[1] = Env.ZERO;
		Amounts[2] = Env.ZERO;
		Amounts[3] = Env.ZERO;
	}   //  DocVO

	//  --- ID

	/** ID - Document Type      */
	public String           DocumentType;
	/** ID - Table ID           */
	public int              AD_Table_ID;
	/** ID - Record ID          */
	public int 				Record_ID;

	//  --- Mandatory

	/** Client                  */
	public int              AD_Client_ID = 0;
	/** Otganization            */
	public int              AD_Org_ID = 0;

	//  --- Optional

	/** Dimensions              */
	public int				C_BPartner_ID = 0;
	public int				M_Product_ID = 0;
	public int              AD_OrgTrx_ID = 0;
	public int              C_SalesRegion_ID = 0;
	public int              C_Project_ID = 0;
	public int              C_Campaign_ID = 0;
	public int              C_Activity_ID = 0;
	public int              C_LocFrom_ID = 0;
	public int              C_LocTo_ID = 0;
	public int              User1_ID = 0;
	public int              User2_ID = 0;

	//  --- Attributes

	public String           DocumentNo = null;
	public Timestamp        DateAcct = null;
	public Timestamp        DateDoc = null;

	public static final int PERIOD_UNDEFINED = -29;
	public int              C_Period_ID = PERIOD_UNDEFINED;

	public boolean 			TaxIncluded = false;

	/** Is (Source) Multi-Currency Document - i.e. the document has different currencies
	 *  (if true, the document will not be source balanced)     */
	public boolean          MultiCurrency = false;

	//  --  Reference

	public int              GL_Category_ID = 0;
	public int              GL_Budget_ID = 0;

	public int              C_BankAccount_ID = 0;
	public int              C_CashBook_ID = 0;

	public int              C_Charge_ID = 0;
	public BigDecimal       ChargeAmt = null;

	public int				M_Warehouse_ID = 0;

	public boolean			Posted = false;

	/*************************************************************************/

	/** Source Currency         */
	public int 				C_Currency_ID = 0;
	/** Source Amounts          */
	public BigDecimal[]     Amounts = new BigDecimal[4];

	public BigDecimal       Qty = null;

	/*************************************************************************/

	/**	Actual Document Status  */
	public String           Status = null;

	public String			Error = null;

	//  Posting Status - AD_Reference_ID=234     //
	/**	Document Status         */
	public static final String 	STATUS_NotPosted        = "N";
	/**	Document Status         */
	public static final String 	STATUS_NotBalanced      = "b";
	/**	Document Status         */
	public static final String 	STATUS_NotConvertible   = "c";
	/**	Document Status         */
	public static final String 	STATUS_PeriodClosed     = "p";
	/**	Document Status         */
	public static final String 	STATUS_InvalidAccount   = "i";
	/**	Document Status         */
	public static final String 	STATUS_PostPrepared     = "y";
	/**	Document Status         */
	public static final String 	STATUS_Posted           = "Y";
	/**	Document Status         */
	public static final String 	STATUS_Error            = "E";

	/**************************************************************************
	 * 	 Document Types
	 *  --------------
	 *  C_DocType.DocBaseType & AD_Reference_ID=183
	 *
	 *  C_Invoice:          ARI, ARC, ARF, API, APC
	 *  C_Payment:          ARP, APP
	 *  C_Order:            SOO, POO
	 *  M_Transaction:      MMI, MMM, MMS, MMR
	 *  C_BankStatement:    CMB
	 *  C_Cash:             CMC
	 *  C_Allocation:       CMA
	 *  GL_Journal:         GLJ
	 *
	 *  ???
	 *  requisition         POR
	 */

	/** Document Type for Document/GL Info      */
	public int                  C_DocType_ID = 0;

	/**	AR Invoices             */
	public static final String 	DOCTYPE_ARInvoice       = "ARI";
	/**	AR Credit Memo          */
	public static final String 	DOCTYPE_ARCredit        = "ARC";
	/**	AR Receipt              */
	public static final String 	DOCTYPE_ARReceipt       = "ARR";
	/**	AR ProForma             */
	public static final String 	DOCTYPE_ARProForma      = "ARF";

	/**	AP Invoices             */
	public static final String 	DOCTYPE_APInvoice       = "API";
	/**	AP Credit Memo          */
	public static final String 	DOCTYPE_APCredit        = "APC";
	/**	AP Payment              */
	public static final String 	DOCTYPE_APPayment       = "APP";

	/**	CashManagement Bank Statement   */
	public static final String 	DOCTYPE_BankStatement   = "CMB";
	/**	CashManagement Cash Journals    */
	public static final String 	DOCTYPE_CashJournal     = "CMC";
	/**	CashManagement Allocations      */
	public static final String 	DOCTYPE_Allocation      = "CMA";

	/** Material Shipment       */
	public static final String 	DOCTYPE_MatShipment     = "MMS";
	/** Material Receipt        */
	public static final String 	DOCTYPE_MatReceipt      = "MMR";
	/** Material Inventory      */
	public static final String 	DOCTYPE_MatInventory    = "MMI";
	/** Material Movement       */
	public static final String 	DOCTYPE_MatMovement     = "MMM";
	/** Material Production     */
	public static final String 	DOCTYPE_MatProduction   = "MMP";

	/** Match Invoice           */
	public static final String 	DOCTYPE_MatMatchInv     = "MXI";
	/** Match PO                */
	public static final String 	DOCTYPE_MatMatchPO      = "MXP";

	/** GL Journal              */
	public static final String 	DOCTYPE_GLJournal       = "GLJ";

	/** Purchase Order          */
	public static final String 	DOCTYPE_POrder          = "POO";
	/** Sales Order             */
	public static final String 	DOCTYPE_SOrder          = "SOO";



	/*************************************************************************/

	/**
	 * String representation
	 * @return String
	 */
	public String toString()
	{
		StringBuffer sb = new StringBuffer("Doc=[");
		sb.append(DocumentType)
			.append(" - DocumentNo=").append(DocumentNo)
			.append(",DateAcct=").append(DateAcct.toString().substring(0,10))
			.append(",Sta=").append(Status);
		sb.append("]");
		return sb.toString();
	}	//	toString

}   //  DocVO

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -