diff --git a/base/src/org/adempiere/pipo/handler/RoleElementHandler.java b/base/src/org/adempiere/pipo/handler/RoleElementHandler.java new file mode 100644 index 0000000000..06609a3658 --- /dev/null +++ b/base/src/org/adempiere/pipo/handler/RoleElementHandler.java @@ -0,0 +1,515 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 Adempiere, 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. * + * + * Copyright (C) 2005 Robert Klein. robeklein@hotmail.com + * Contributor(s): Low Heng Sin hengsin@avantz.com + *****************************************************************************/ +package org.adempiere.pipo.handler; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import java.util.logging.Level; + +import javax.xml.transform.sax.TransformerHandler; + +import org.adempiere.pipo.AbstractElementHandler; +import org.adempiere.pipo.Element; +import org.adempiere.pipo.exception.DatabaseAccessException; +import org.adempiere.pipo.exception.POSaveFailedException; +import org.compiere.model.MRole; +import org.compiere.model.X_AD_Form; +import org.compiere.model.X_AD_Package_Exp_Detail; +import org.compiere.model.X_AD_Process; +import org.compiere.model.X_AD_Role; +import org.compiere.model.X_AD_Task; +import org.compiere.model.X_AD_User; +import org.compiere.model.X_AD_Window; +import org.compiere.model.X_AD_Workflow; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.AttributesImpl; + +public class RoleElementHandler extends AbstractElementHandler { + + private List roles = new ArrayList(); + + private OrgRoleElementHandler orgHandler = new OrgRoleElementHandler(); + private ProcessAccessElementHandler processHandler = new ProcessAccessElementHandler(); + private UserRoleElementHandler userHandler = new UserRoleElementHandler(); + private WindowAccessElementHandler windowHandler = new WindowAccessElementHandler(); + private FormAccessElementHandler formHandler = new FormAccessElementHandler(); + private TaskAccessElementHandler taskHandler = new TaskAccessElementHandler(); + private WorkflowAccessElementHandler workflowHandler = new WorkflowAccessElementHandler(); + + public void startElement(Properties ctx, Element element) + throws SAXException { + String elementValue = element.getElementValue(); + Attributes atts = element.attributes; + log.info(elementValue + " " + atts.getValue("Name")); + + String name = atts.getValue("Name"); + + int id = get_ID(ctx, "AD_Role", name); + MRole m_Role = new MRole(ctx, id, getTrxName(ctx)); + + int AD_Backup_ID = -1; + String Object_Status = null; + if (id > 0) { + AD_Backup_ID = copyRecord(ctx, "AD_Role", m_Role); + Object_Status = "Update"; + } else { + Object_Status = "New"; + AD_Backup_ID = 0; + } + + m_Role.setName(name); + name = atts.getValue("treemenuname"); + if (name != null && name.trim().length() > 0) { + id = get_IDWithColumn(ctx, "AD_Tree", "Name", name); + if (id <= 0) { + element.defer = true; + return; + } + m_Role.setAD_Tree_Menu_ID(id); + } + + name = atts.getValue("treeorgname"); + if (name != null && name.trim().length() > 0) { + id = get_IDWithColumn(ctx, "AD_Tree", "Name", name); + if (id <= 0) { + element.defer = true; + return; + } + m_Role.setAD_Tree_Org_ID(id); + } + + name = atts.getValue("currencycode"); + if (name != null && name.trim().length() > 0) { + id = get_IDWithColumn(ctx, "C_Currency", "ISO_Code", name); + if (id <= 0) { + element.defer = true; + return; + } + m_Role.setC_Currency_ID(id); + } + + name = atts.getValue("supervisorid"); + if (name != null && name.trim().length() > 0) { + id = get_IDWithColumn(ctx, "AD_User", "Name", name); + if (id <= 0) { + element.defer = true; + return; + } + m_Role.setC_Currency_ID(id); + } + + m_Role.setDescription(getStringValue(atts,"Description")); + String amtApproval = getStringValue(atts,"AmtApproval"); + if (amtApproval != null) + m_Role.setAmtApproval(new BigDecimal(amtApproval)); + m_Role.setIsActive(atts.getValue("isActive") != null ? Boolean.valueOf( + atts.getValue("isActive")).booleanValue() : true); + m_Role + .setIsAccessAllOrgs(atts.getValue("isAccessAllOrgs") != null ? Boolean + .valueOf(atts.getValue("isAccessAllOrgs")) + .booleanValue() + : true); + m_Role + .setIsCanApproveOwnDoc(atts.getValue("isCanApproveOwnDoc") != null ? Boolean + .valueOf(atts.getValue("isCanApproveOwnDoc")) + .booleanValue() + : true); + m_Role.setIsCanExport(atts.getValue("isCanExport") != null ? Boolean + .valueOf(atts.getValue("isCanExport")).booleanValue() : true); + m_Role.setIsCanReport(atts.getValue("isCanReport") != null ? Boolean + .valueOf(atts.getValue("isCanReport")).booleanValue() : true); + m_Role.setIsChangeLog(atts.getValue("isChangeLog") != null ? Boolean + .valueOf(atts.getValue("isChangeLog")).booleanValue() : true); + m_Role.setIsManual(atts.getValue("isManual") != null ? Boolean.valueOf( + atts.getValue("isManual")).booleanValue() : true); + m_Role + .setIsPersonalAccess(atts.getValue("isPersonalAccess") != null ? Boolean + .valueOf(atts.getValue("isPersonalAccess")) + .booleanValue() + : true); + m_Role + .setIsPersonalLock(atts.getValue("isPersonalLock") != null ? Boolean + .valueOf(atts.getValue("isPersonalLock")) + .booleanValue() + : true); + m_Role.setIsShowAcct(atts.getValue("isShowAcct") != null ? Boolean + .valueOf(atts.getValue("isShowAcct")).booleanValue() : true); + m_Role + .setIsUseUserOrgAccess(atts.getValue("isUseUserOrgAccess") != null ? Boolean + .valueOf(atts.getValue("isUseUserOrgAccess")) + .booleanValue() + : true); + m_Role + .setOverwritePriceLimit(atts.getValue("isOverwritePriceLimit") != null ? Boolean + .valueOf(atts.getValue("isOverwritePriceLimit")) + .booleanValue() + : true); + m_Role.setPreferenceType(atts.getValue("PreferenceType")); + m_Role.setUserLevel(atts.getValue("UserLevel")); + m_Role.setAllow_Info_Account(Boolean.valueOf(atts.getValue("AllowInfoAccount"))); + m_Role.setAllow_Info_Asset(Boolean.valueOf(atts.getValue("AllowInfoAsset"))); + m_Role.setAllow_Info_BPartner(Boolean.valueOf(atts.getValue("AllowInfoBPartner"))); + m_Role.setAllow_Info_CashJournal(Boolean.valueOf(atts.getValue("AllowInfoCashJournal"))); + m_Role.setAllow_Info_InOut(Boolean.valueOf(atts.getValue("AllowInfoInOut"))); + m_Role.setAllow_Info_Invoice(Boolean.valueOf(atts.getValue("AllowInfoInvoice"))); + m_Role.setAllow_Info_Order(Boolean.valueOf(atts.getValue("AllowInfoOrder"))); + m_Role.setAllow_Info_Payment(Boolean.valueOf(atts.getValue("AllowInfoPayment"))); + m_Role.setAllow_Info_Product(Boolean.valueOf(atts.getValue("AllowInfoProduct"))); + m_Role.setAllow_Info_Resource(Boolean.valueOf(atts.getValue("AllowInfoResource"))); + m_Role.setAllow_Info_Schedule(Boolean.valueOf(atts.getValue("AllowInfoSchedule"))); + m_Role.setAllow_Info_Schedule(Boolean.valueOf(atts.getValue("AllowInfoCRP"))); + m_Role.setAllow_Info_Schedule(Boolean.valueOf(atts.getValue("AllowInfoMRP"))); + + + if (m_Role.save(getTrxName(ctx)) == true) { + + record_log(ctx, 1, m_Role.getName(), "Role", m_Role.get_ID(), + AD_Backup_ID, Object_Status, "AD_Role", get_IDWithColumn( + ctx, "AD_Table", "TableName", "AD_Role")); + } else { + + record_log(ctx, 0, m_Role.getName(), "Role", m_Role.get_ID(), + AD_Backup_ID, Object_Status, "AD_Role", get_IDWithColumn( + ctx, "AD_Table", "TableName", "AD_Role")); + throw new POSaveFailedException("Role"); + } + } + + public void endElement(Properties ctx, Element element) throws SAXException { + } + + public void create(Properties ctx, TransformerHandler document) + throws SAXException { + int Role_id = Env.getContextAsInt(ctx, + X_AD_Package_Exp_Detail.COLUMNNAME_AD_Role_ID); + if (roles.contains(Role_id)) + return; + roles.add(Role_id); + X_AD_Role m_Role = new X_AD_Role(ctx, Role_id, null); + AttributesImpl atts = new AttributesImpl(); + createRoleBinding(atts, m_Role); + document.startElement("", "", "role", atts); + + // Process org access + String sql = "SELECT * FROM AD_Role_OrgAccess WHERE AD_Role_ID= " + + Role_id; + PreparedStatement pstmt = null; + pstmt = DB.prepareStatement(sql, getTrxName(ctx)); + try { + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + createOrgAccess(ctx, document, rs.getInt("AD_Org_ID"), rs + .getInt("AD_Role_ID")); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + + catch (Exception e) { + log.log(Level.SEVERE, "AD_Role_OrgAccess", e); + throw new DatabaseAccessException("Failed to export organization role access."); + } + // Process user assignment access + sql = "SELECT * FROM AD_User_Roles WHERE AD_Role_ID= " + Role_id; + pstmt = null; + pstmt = DB.prepareStatement(sql, getTrxName(ctx)); + try { + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + createUserRole(ctx, document, rs.getInt("AD_User_ID"), + rs.getInt("AD_Role_ID"), rs.getInt("AD_Org_ID")); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + + catch (Exception e) { + log.log(Level.SEVERE, "AD_User_Roles", e); + throw new DatabaseAccessException("Failed to export user role assignment."); + } + + // Process AD_Window_Access Values + sql = "SELECT * FROM AD_Window_Access WHERE AD_Role_ID= " + Role_id; + pstmt = null; + pstmt = DB.prepareStatement(sql, getTrxName(ctx)); + try { + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + createWindowAccess(ctx, document, rs + .getInt("AD_Window_ID"), rs.getInt("AD_Role_ID")); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + + catch (Exception e) { + log.log(Level.SEVERE, "AD_Window_Access", e); + throw new DatabaseAccessException("Failed to export window access."); + } + + // Process AD_Process_Access Values + sql = "SELECT * FROM AD_Process_Access WHERE AD_Role_ID= " + Role_id; + pstmt = null; + pstmt = DB.prepareStatement(sql, getTrxName(ctx)); + try { + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + createProcessAccess(ctx, document, rs + .getInt("AD_Process_ID"), rs.getInt("AD_Role_ID")); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + + catch (Exception e) { + log.log(Level.SEVERE, "AD_Process_Access", e); + throw new DatabaseAccessException("Failed to export process access."); + } + + // Process AD_Form_Access Values + sql = "SELECT * FROM AD_Form_Access WHERE AD_Role_ID= " + Role_id; + pstmt = null; + pstmt = DB.prepareStatement(sql, getTrxName(ctx)); + try { + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + createFormAccess(ctx, document, rs.getInt("AD_Form_ID"), + rs.getInt("AD_Role_ID")); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + + catch (Exception e) { + log.log(Level.SEVERE, "AD_Form_Access", e); + throw new DatabaseAccessException("Failed to export form access."); + } + + // Process AD_Workflow_Access Values + sql = "SELECT * FROM AD_Workflow_Access WHERE AD_Role_ID= " + Role_id; + pstmt = null; + pstmt = DB.prepareStatement(sql, getTrxName(ctx)); + try { + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + createWorkflowAccess(ctx, document, rs + .getInt("AD_Workflow_ID"), rs.getInt("AD_Role_ID")); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + + catch (Exception e) { + log.log(Level.SEVERE, "AD_Workflow_Access", e); + throw new DatabaseAccessException("Failed to export workflow access."); + } + + // Process AD_Task_Access Values + sql = "SELECT * FROM AD_Task_Access WHERE AD_Role_ID= " + Role_id; + pstmt = null; + pstmt = DB.prepareStatement(sql, getTrxName(ctx)); + try { + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + createTaskAccess(ctx, document, rs.getInt("AD_Task_ID"), rs + .getInt("AD_Role_ID")); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + + catch (Exception e) { + log.log(Level.SEVERE, "AD_Task_Access", e); + throw new DatabaseAccessException("Failed to export task access."); + } finally { + try { + if (pstmt != null) + pstmt.close(); + } catch (Exception e) { + } + pstmt = null; + } + document.endElement("", "", "role"); + } + + private void createTaskAccess(Properties ctx, TransformerHandler document, + int AD_Task_ID, int AD_Role_ID) throws SAXException { + Env.setContext(ctx, X_AD_Task.COLUMNNAME_AD_Task_ID, AD_Task_ID); + Env.setContext(ctx, X_AD_Role.COLUMNNAME_AD_Role_ID, AD_Role_ID); + taskHandler.create(ctx, document); + ctx.remove(X_AD_Task.COLUMNNAME_AD_Task_ID); + ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); + } + + private void createWorkflowAccess(Properties ctx, + TransformerHandler document, int AD_Workflow_ID, int AD_Role_ID) throws SAXException { + Env.setContext(ctx, X_AD_Workflow.COLUMNNAME_AD_Workflow_ID, AD_Workflow_ID); + Env.setContext(ctx, X_AD_Role.COLUMNNAME_AD_Role_ID, AD_Role_ID); + workflowHandler.create(ctx, document); + ctx.remove(X_AD_Workflow.COLUMNNAME_AD_Workflow_ID); + ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); + } + + private void createFormAccess(Properties ctx, TransformerHandler document, + int AD_Form_ID, int AD_Role_ID) throws SAXException { + Env.setContext(ctx, X_AD_Form.COLUMNNAME_AD_Form_ID, AD_Form_ID); + Env.setContext(ctx, X_AD_Role.COLUMNNAME_AD_Role_ID, AD_Role_ID); + formHandler.create(ctx, document); + ctx.remove(X_AD_Form.COLUMNNAME_AD_Form_ID); + ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); + } + + private void createProcessAccess(Properties ctx, + TransformerHandler document, int AD_Process_ID, int AD_Role_ID) throws SAXException { + Env.setContext(ctx, X_AD_Process.COLUMNNAME_AD_Process_ID, AD_Process_ID); + Env.setContext(ctx, X_AD_Role.COLUMNNAME_AD_Role_ID, AD_Role_ID); + processHandler.create(ctx, document); + ctx.remove(X_AD_Process.COLUMNNAME_AD_Process_ID); + ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); + } + + private void createWindowAccess(Properties ctx, + TransformerHandler document, int AD_Window_ID, int AD_Role_ID) throws SAXException { + Env.setContext(ctx, X_AD_Window.COLUMNNAME_AD_Window_ID, AD_Window_ID); + Env.setContext(ctx, X_AD_Role.COLUMNNAME_AD_Role_ID, AD_Role_ID); + windowHandler.create(ctx, document); + ctx.remove(X_AD_Window.COLUMNNAME_AD_Window_ID); + ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); + } + + private void createUserRole(Properties ctx, TransformerHandler document, + int AD_User_ID, int AD_Role_ID, int AD_Org_ID) throws SAXException { + Env.setContext(ctx, X_AD_User.COLUMNNAME_AD_User_ID, AD_User_ID); + Env.setContext(ctx, X_AD_Role.COLUMNNAME_AD_Role_ID, AD_Role_ID); + Env.setContext(ctx, "AD_Org_ID", AD_Org_ID); + userHandler.create(ctx, document); + ctx.remove(X_AD_User.COLUMNNAME_AD_User_ID); + ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); + ctx.remove("AD_Org_ID"); + } + + private void createOrgAccess(Properties ctx, TransformerHandler document, + int AD_Org_ID, int AD_Role_ID) throws SAXException { + Env.setContext(ctx, "AD_Org_ID", AD_Org_ID); + Env.setContext(ctx, X_AD_Role.COLUMNNAME_AD_Role_ID, AD_Role_ID); + orgHandler.create(ctx, document); + ctx.remove("AD_Org_ID"); + ctx.remove(X_AD_Role.COLUMNNAME_AD_Role_ID); + } + + private AttributesImpl createRoleBinding(AttributesImpl atts, + X_AD_Role m_Role) { + String sql = null; + String name = null; + atts.clear(); + + if (m_Role.getAD_Tree_Menu_ID() > 0) { + sql = "SELECT Name FROM AD_Tree WHERE AD_Tree_ID=? AND AD_Tree.TreeType='MM'"; + name = DB.getSQLValueString(null, sql, m_Role.getAD_Tree_Menu_ID()); + atts.addAttribute("", "", "treemenuname", "CDATA", name); + } else + atts.addAttribute("", "", "treemenuname", "CDATA", ""); + + if (m_Role.getAD_Tree_Org_ID() > 0) { + sql = "SELECT Name FROM AD_Tree WHERE AD_Tree_ID=? AND AD_Tree.TreeType='OO'"; + name = DB.getSQLValueString(null, sql, m_Role.getAD_Tree_Org_ID()); + atts.addAttribute("", "", "treeorgname", "CDATA", name); + } else + atts.addAttribute("", "", "treeorgname", "CDATA", ""); + + if (m_Role.getC_Currency_ID() > 0) { + sql = "SELECT ISO_Code FROM C_Currency WHERE C_Currency_ID=?"; + name = DB.getSQLValueString(null, sql, m_Role.getC_Currency_ID()); + atts.addAttribute("", "", "currencycode", "CDATA", name); + } else + atts.addAttribute("", "", "currencycode", "CDATA", ""); + + if (m_Role.getSupervisor_ID() > 0) { + sql = "SELECT Name FROM AD_User WHERE AD_User_ID=?"; + name = DB.getSQLValueString(null, sql, m_Role.getC_Currency_ID()); + atts.addAttribute("", "", "supervisorid", "CDATA", name); + } else + atts.addAttribute("", "", "supervisorid", "CDATA", ""); + + atts.addAttribute("", "", "Description", "CDATA", (m_Role + .getDescription() != null ? m_Role.getDescription() : "")); + atts.addAttribute("", "", "Name", "CDATA", + (m_Role.getName() != null ? m_Role.getName() : "")); + atts.addAttribute("", "", "AmtApproval", "CDATA", ("" + m_Role + .getAmtApproval())); + atts.addAttribute("", "", "isAccessAllOrgs", "CDATA", (m_Role + .isAccessAllOrgs() == true ? "true" : "false")); + atts.addAttribute("", "", "isActive", "CDATA", + (m_Role.isActive() == true ? "true" : "false")); + atts.addAttribute("", "", "isCanApproveOwnDoc", "CDATA", (m_Role + .isCanApproveOwnDoc() == true ? "true" : "false")); + atts.addAttribute("", "", "isCanExport", "CDATA", + (m_Role.isCanExport() == true ? "true" : "false")); + atts.addAttribute("", "", "isCanReport", "CDATA", + (m_Role.isCanReport() == true ? "true" : "false")); + atts.addAttribute("", "", "isChangeLog", "CDATA", + (m_Role.isChangeLog() == true ? "true" : "false")); + atts.addAttribute("", "", "isManual", "CDATA", + (m_Role.isManual() == true ? "true" : "false")); + atts.addAttribute("", "", "isPersonalAccess", "CDATA", (m_Role + .isPersonalAccess() == true ? "true" : "false")); + atts.addAttribute("", "", "isPersonalLock", "CDATA", (m_Role + .isPersonalLock() == true ? "true" : "false")); + atts.addAttribute("", "", "isShowAcct", "CDATA", + (m_Role.isShowAcct() == true ? "true" : "false")); + atts.addAttribute("", "", "isUseUserOrgAccess", "CDATA", (m_Role + .isUseUserOrgAccess() == true ? "true" : "false")); + atts.addAttribute("", "", "isOverwritePriceLimit", "CDATA", (m_Role + .isOverwritePriceLimit() == true ? "true" : "false")); + atts + .addAttribute("", "", "PreferenceType", "CDATA", (m_Role + .getPreferenceType() != null ? m_Role + .getPreferenceType() : "")); + atts.addAttribute("", "", "UserLevel", "CDATA", + (m_Role.getUserLevel() != null ? m_Role.getUserLevel() : "")); + + atts.addAttribute("", "", "AllowInfoAccount", "CDATA", Boolean.toString(m_Role.isAllow_Info_Account())); + atts.addAttribute("", "", "AllowInfoAsset", "CDATA", Boolean.toString(m_Role.isAllow_Info_Asset())); + atts.addAttribute("", "", "AllowInfoBPartner", "CDATA", Boolean.toString(m_Role.isAllow_Info_BPartner())); + atts.addAttribute("", "", "AllowInfoCashJournal", "CDATA", Boolean.toString(m_Role.isAllow_Info_CashJournal())); + atts.addAttribute("", "", "AllowInfoInOut", "CDATA", Boolean.toString(m_Role.isAllow_Info_InOut())); + atts.addAttribute("", "", "AllowInfoInvoice", "CDATA", Boolean.toString(m_Role.isAllow_Info_Invoice())); + atts.addAttribute("", "", "AllowInfoOrder", "CDATA", Boolean.toString(m_Role.isAllow_Info_Order())); + atts.addAttribute("", "", "AllowInfoPayment", "CDATA", Boolean.toString(m_Role.isAllow_Info_Payment())); + atts.addAttribute("", "", "AllowInfoProduct", "CDATA", Boolean.toString(m_Role.isAllow_Info_Product())); + atts.addAttribute("", "", "AllowInfoResource", "CDATA", Boolean.toString(m_Role.isAllow_Info_Resource())); + atts.addAttribute("", "", "AllowInfoSchedule", "CDATA", Boolean.toString(m_Role.isAllow_Info_Schedule())); + atts.addAttribute("", "", "AllowInfoCRP", "CDATA", Boolean.toString(m_Role.isAllow_Info_CRP())); + atts.addAttribute("", "", "AllowInfoMRP", "CDATA", Boolean.toString(m_Role.isAllow_Info_MRP())); + + return atts; + } +} diff --git a/base/src/org/compiere/Adempiere.java b/base/src/org/compiere/Adempiere.java index 8c29dd6788..c60ee1eddb 100644 --- a/base/src/org/compiere/Adempiere.java +++ b/base/src/org/compiere/Adempiere.java @@ -58,11 +58,11 @@ public final class Adempiere /** Main Version String */ // Conventions for naming second number is even for stable, and odd for unstable // the releases will have a suffix (b) for beta - (t) for trunk - and (s) for stable - static public final String MAIN_VERSION = "Release 3.4.0s"; + static public final String MAIN_VERSION = "Release 3.5.1a"; /** Detail Version as date Used for Client/Server */ - static public final String DATE_VERSION = "2008-03-26"; + static public final String DATE_VERSION = "2008-05-29"; /** Database Version as date Compared with AD_System */ - static public final String DB_VERSION = "2008-03-26"; + static public final String DB_VERSION = "2008-05-29"; /** Product Name */ static public final String NAME = "Adempiere\u00AE"; diff --git a/base/src/org/compiere/model/I_AD_AccessLog.java b/base/src/org/compiere/model/I_AD_AccessLog.java index b2dcf8ea12..802d4dd24f 100644 --- a/base/src/org/compiere/model/I_AD_AccessLog.java +++ b/base/src/org/compiere/model/I_AD_AccessLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_AccessLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_AccessLog { diff --git a/base/src/org/compiere/model/I_AD_Alert.java b/base/src/org/compiere/model/I_AD_Alert.java index 530cf32ff1..8dad6bd838 100644 --- a/base/src/org/compiere/model/I_AD_Alert.java +++ b/base/src/org/compiere/model/I_AD_Alert.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Alert * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Alert { diff --git a/base/src/org/compiere/model/I_AD_AlertProcessor.java b/base/src/org/compiere/model/I_AD_AlertProcessor.java index 1c34a61790..75802a6252 100644 --- a/base/src/org/compiere/model/I_AD_AlertProcessor.java +++ b/base/src/org/compiere/model/I_AD_AlertProcessor.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_AlertProcessor * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_AlertProcessor { diff --git a/base/src/org/compiere/model/I_AD_AlertProcessorLog.java b/base/src/org/compiere/model/I_AD_AlertProcessorLog.java index fd53e47dad..fba238c23d 100644 --- a/base/src/org/compiere/model/I_AD_AlertProcessorLog.java +++ b/base/src/org/compiere/model/I_AD_AlertProcessorLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_AlertProcessorLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_AlertProcessorLog { diff --git a/base/src/org/compiere/model/I_AD_AlertRecipient.java b/base/src/org/compiere/model/I_AD_AlertRecipient.java index 7133146675..eacd4bbfe7 100644 --- a/base/src/org/compiere/model/I_AD_AlertRecipient.java +++ b/base/src/org/compiere/model/I_AD_AlertRecipient.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_AlertRecipient * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_AlertRecipient { diff --git a/base/src/org/compiere/model/I_AD_AlertRule.java b/base/src/org/compiere/model/I_AD_AlertRule.java index 68755c2c76..7b556b913b 100644 --- a/base/src/org/compiere/model/I_AD_AlertRule.java +++ b/base/src/org/compiere/model/I_AD_AlertRule.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_AlertRule * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_AlertRule { diff --git a/base/src/org/compiere/model/I_AD_Archive.java b/base/src/org/compiere/model/I_AD_Archive.java index 2ca49211c9..a5bd52d1fa 100644 --- a/base/src/org/compiere/model/I_AD_Archive.java +++ b/base/src/org/compiere/model/I_AD_Archive.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Archive * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Archive { diff --git a/base/src/org/compiere/model/I_AD_Attachment.java b/base/src/org/compiere/model/I_AD_Attachment.java index bc0a83c13d..3784ecf339 100644 --- a/base/src/org/compiere/model/I_AD_Attachment.java +++ b/base/src/org/compiere/model/I_AD_Attachment.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Attachment * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Attachment { diff --git a/base/src/org/compiere/model/I_AD_AttachmentNote.java b/base/src/org/compiere/model/I_AD_AttachmentNote.java index 45c179392f..add30cdba7 100644 --- a/base/src/org/compiere/model/I_AD_AttachmentNote.java +++ b/base/src/org/compiere/model/I_AD_AttachmentNote.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_AttachmentNote * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_AttachmentNote { diff --git a/base/src/org/compiere/model/I_AD_Attribute.java b/base/src/org/compiere/model/I_AD_Attribute.java index e31d0b30f3..9ba3974a27 100644 --- a/base/src/org/compiere/model/I_AD_Attribute.java +++ b/base/src/org/compiere/model/I_AD_Attribute.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Attribute * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Attribute { diff --git a/base/src/org/compiere/model/I_AD_Attribute_Value.java b/base/src/org/compiere/model/I_AD_Attribute_Value.java index 76a4ada5f6..aac4500e9c 100644 --- a/base/src/org/compiere/model/I_AD_Attribute_Value.java +++ b/base/src/org/compiere/model/I_AD_Attribute_Value.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Attribute_Value * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Attribute_Value { diff --git a/base/src/org/compiere/model/I_AD_ChangeLog.java b/base/src/org/compiere/model/I_AD_ChangeLog.java index a2b1a3fa6c..337e1b54c2 100644 --- a/base/src/org/compiere/model/I_AD_ChangeLog.java +++ b/base/src/org/compiere/model/I_AD_ChangeLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ChangeLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ChangeLog { diff --git a/base/src/org/compiere/model/I_AD_Client.java b/base/src/org/compiere/model/I_AD_Client.java deleted file mode 100644 index e3db612c66..0000000000 --- a/base/src/org/compiere/model/I_AD_Client.java +++ /dev/null @@ -1,385 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for AD_Client - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_AD_Client -{ - - /** TableName=AD_Client */ - public static final String Table_Name = "AD_Client"; - - /** AD_Table_ID=112 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 6 - System - Client - */ - BigDecimal accessLevel = BigDecimal.valueOf(6); - - /** Load Meta Data */ - - /** Column name AD_Language */ - public static final String COLUMNNAME_AD_Language = "AD_Language"; - - /** Set Language. - * Language for this entity - */ - public void setAD_Language (String AD_Language); - - /** Get Language. - * Language for this entity - */ - public String getAD_Language(); - - /** Column name AutoArchive */ - public static final String COLUMNNAME_AutoArchive = "AutoArchive"; - - /** Set Auto Archive. - * Enable and level of automatic Archive of documents - */ - public void setAutoArchive (String AutoArchive); - - /** Get Auto Archive. - * Enable and level of automatic Archive of documents - */ - public String getAutoArchive(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DocumentDir */ - public static final String COLUMNNAME_DocumentDir = "DocumentDir"; - - /** Set Document Directory. - * Directory for documents from the application server - */ - public void setDocumentDir (String DocumentDir); - - /** Get Document Directory. - * Directory for documents from the application server - */ - public String getDocumentDir(); - - /** Column name EMailTest */ - public static final String COLUMNNAME_EMailTest = "EMailTest"; - - /** Set EMail Test. - * Test EMail - */ - public void setEMailTest (String EMailTest); - - /** Get EMail Test. - * Test EMail - */ - public String getEMailTest(); - - /** Column name IsCostImmediate */ - public static final String COLUMNNAME_IsCostImmediate = "IsCostImmediate"; - - /** Set Cost Immediately. - * Update Costs immediately for testing - */ - public void setIsCostImmediate (boolean IsCostImmediate); - - /** Get Cost Immediately. - * Update Costs immediately for testing - */ - public boolean isCostImmediate(); - - /** Column name IsMultiLingualDocument */ - public static final String COLUMNNAME_IsMultiLingualDocument = "IsMultiLingualDocument"; - - /** Set Multi Lingual Documents. - * Documents are Multi Lingual - */ - public void setIsMultiLingualDocument (boolean IsMultiLingualDocument); - - /** Get Multi Lingual Documents. - * Documents are Multi Lingual - */ - public boolean isMultiLingualDocument(); - - /** Column name IsPostImmediate */ - public static final String COLUMNNAME_IsPostImmediate = "IsPostImmediate"; - - /** Set Post Immediately. - * Post the accounting immediately for testing - */ - public void setIsPostImmediate (boolean IsPostImmediate); - - /** Get Post Immediately. - * Post the accounting immediately for testing - */ - public boolean isPostImmediate(); - - /** Column name IsServerEMail */ - public static final String COLUMNNAME_IsServerEMail = "IsServerEMail"; - - /** Set Server EMail. - * Send EMail from Server - */ - public void setIsServerEMail (boolean IsServerEMail); - - /** Get Server EMail. - * Send EMail from Server - */ - public boolean isServerEMail(); - - /** Column name IsSmtpAuthorization */ - public static final String COLUMNNAME_IsSmtpAuthorization = "IsSmtpAuthorization"; - - /** Set SMTP Authentication. - * Your mail server requires Authentication - */ - public void setIsSmtpAuthorization (boolean IsSmtpAuthorization); - - /** Get SMTP Authentication. - * Your mail server requires Authentication - */ - public boolean isSmtpAuthorization(); - - /** Column name IsUseASP */ - public static final String COLUMNNAME_IsUseASP = "IsUseASP"; - - /** Set IsUseASP */ - public void setIsUseASP (boolean IsUseASP); - - /** Get IsUseASP */ - public boolean isUseASP(); - - /** Column name IsUseBetaFunctions */ - public static final String COLUMNNAME_IsUseBetaFunctions = "IsUseBetaFunctions"; - - /** Set Use Beta Functions. - * Enable the use of Beta Functionality - */ - public void setIsUseBetaFunctions (boolean IsUseBetaFunctions); - - /** Get Use Beta Functions. - * Enable the use of Beta Functionality - */ - public boolean isUseBetaFunctions(); - - /** Column name MMPolicy */ - public static final String COLUMNNAME_MMPolicy = "MMPolicy"; - - /** Set Material Policy. - * Material Movement Policy - */ - public void setMMPolicy (String MMPolicy); - - /** Get Material Policy. - * Material Movement Policy - */ - public String getMMPolicy(); - - /** Column name ModelValidationClasses */ - public static final String COLUMNNAME_ModelValidationClasses = "ModelValidationClasses"; - - /** Set Model Validation Classes. - * List of data model validation classes separated by ; - - */ - public void setModelValidationClasses (String ModelValidationClasses); - - /** Get Model Validation Classes. - * List of data model validation classes separated by ; - - */ - public String getModelValidationClasses(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name RequestEMail */ - public static final String COLUMNNAME_RequestEMail = "RequestEMail"; - - /** Set Request EMail. - * EMail address to send automated mails from or receive mails for automated processing (fully qualified) - */ - public void setRequestEMail (String RequestEMail); - - /** Get Request EMail. - * EMail address to send automated mails from or receive mails for automated processing (fully qualified) - */ - public String getRequestEMail(); - - /** Column name RequestFolder */ - public static final String COLUMNNAME_RequestFolder = "RequestFolder"; - - /** Set Request Folder. - * EMail folder to process incoming emails; - if empty INBOX is used - */ - public void setRequestFolder (String RequestFolder); - - /** Get Request Folder. - * EMail folder to process incoming emails; - if empty INBOX is used - */ - public String getRequestFolder(); - - /** Column name RequestUser */ - public static final String COLUMNNAME_RequestUser = "RequestUser"; - - /** Set Request User. - * User Name (ID) of the email owner - */ - public void setRequestUser (String RequestUser); - - /** Get Request User. - * User Name (ID) of the email owner - */ - public String getRequestUser(); - - /** Column name RequestUserPW */ - public static final String COLUMNNAME_RequestUserPW = "RequestUserPW"; - - /** Set Request User Password. - * Password of the user name (ID) for mail processing - */ - public void setRequestUserPW (String RequestUserPW); - - /** Get Request User Password. - * Password of the user name (ID) for mail processing - */ - public String getRequestUserPW(); - - /** Column name SMTPHost */ - public static final String COLUMNNAME_SMTPHost = "SMTPHost"; - - /** Set Mail Host. - * Hostname of Mail Server for SMTP and IMAP - */ - public void setSMTPHost (String SMTPHost); - - /** Get Mail Host. - * Hostname of Mail Server for SMTP and IMAP - */ - public String getSMTPHost(); - - /** Column name StoreArchiveOnFileSystem */ - public static final String COLUMNNAME_StoreArchiveOnFileSystem = "StoreArchiveOnFileSystem"; - - /** Set Store Archive On File System */ - public void setStoreArchiveOnFileSystem (boolean StoreArchiveOnFileSystem); - - /** Get Store Archive On File System */ - public boolean isStoreArchiveOnFileSystem(); - - /** Column name StoreAttachmentsOnFileSystem */ - public static final String COLUMNNAME_StoreAttachmentsOnFileSystem = "StoreAttachmentsOnFileSystem"; - - /** Set Store Attachments On File System */ - public void setStoreAttachmentsOnFileSystem (boolean StoreAttachmentsOnFileSystem); - - /** Get Store Attachments On File System */ - public boolean isStoreAttachmentsOnFileSystem(); - - /** Column name UnixArchivePath */ - public static final String COLUMNNAME_UnixArchivePath = "UnixArchivePath"; - - /** Set Unix Archive Path */ - public void setUnixArchivePath (String UnixArchivePath); - - /** Get Unix Archive Path */ - public String getUnixArchivePath(); - - /** Column name UnixAttachmentPath */ - public static final String COLUMNNAME_UnixAttachmentPath = "UnixAttachmentPath"; - - /** Set Unix Attachment Path */ - public void setUnixAttachmentPath (String UnixAttachmentPath); - - /** Get Unix Attachment Path */ - public String getUnixAttachmentPath(); - - /** Column name Value */ - public static final String COLUMNNAME_Value = "Value"; - - /** Set Search Key. - * Search key for the record in the format required - must be unique - */ - public void setValue (String Value); - - /** Get Search Key. - * Search key for the record in the format required - must be unique - */ - public String getValue(); - - /** Column name WindowsArchivePath */ - public static final String COLUMNNAME_WindowsArchivePath = "WindowsArchivePath"; - - /** Set Windows Archive Path */ - public void setWindowsArchivePath (String WindowsArchivePath); - - /** Get Windows Archive Path */ - public String getWindowsArchivePath(); - - /** Column name WindowsAttachmentPath */ - public static final String COLUMNNAME_WindowsAttachmentPath = "WindowsAttachmentPath"; - - /** Set Windows Attachment Path */ - public void setWindowsAttachmentPath (String WindowsAttachmentPath); - - /** Get Windows Attachment Path */ - public String getWindowsAttachmentPath(); -} diff --git a/base/src/org/compiere/model/I_AD_ClientInfo.java b/base/src/org/compiere/model/I_AD_ClientInfo.java index 1bbd664a78..4aada29cac 100644 --- a/base/src/org/compiere/model/I_AD_ClientInfo.java +++ b/base/src/org/compiere/model/I_AD_ClientInfo.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ClientInfo * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ClientInfo { diff --git a/base/src/org/compiere/model/I_AD_ClientShare.java b/base/src/org/compiere/model/I_AD_ClientShare.java index 1358c850bf..77c364083d 100644 --- a/base/src/org/compiere/model/I_AD_ClientShare.java +++ b/base/src/org/compiere/model/I_AD_ClientShare.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ClientShare * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ClientShare { diff --git a/base/src/org/compiere/model/I_AD_Color.java b/base/src/org/compiere/model/I_AD_Color.java index 3feaa4cb8c..1f467d9a10 100644 --- a/base/src/org/compiere/model/I_AD_Color.java +++ b/base/src/org/compiere/model/I_AD_Color.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Color * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Color { diff --git a/base/src/org/compiere/model/I_AD_Column.java b/base/src/org/compiere/model/I_AD_Column.java index 284d11e3d7..e6259d7690 100644 --- a/base/src/org/compiere/model/I_AD_Column.java +++ b/base/src/org/compiere/model/I_AD_Column.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Column * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Column { diff --git a/base/src/org/compiere/model/I_AD_Column_Access.java b/base/src/org/compiere/model/I_AD_Column_Access.java index 7736f2e261..ca9e70d000 100644 --- a/base/src/org/compiere/model/I_AD_Column_Access.java +++ b/base/src/org/compiere/model/I_AD_Column_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Column_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Column_Access { diff --git a/base/src/org/compiere/model/I_AD_Desktop.java b/base/src/org/compiere/model/I_AD_Desktop.java index 20a3bbf73d..3cb0e32cd5 100644 --- a/base/src/org/compiere/model/I_AD_Desktop.java +++ b/base/src/org/compiere/model/I_AD_Desktop.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Desktop * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Desktop { diff --git a/base/src/org/compiere/model/I_AD_DesktopWorkbench.java b/base/src/org/compiere/model/I_AD_DesktopWorkbench.java index 89c5767344..3db7857dad 100644 --- a/base/src/org/compiere/model/I_AD_DesktopWorkbench.java +++ b/base/src/org/compiere/model/I_AD_DesktopWorkbench.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_DesktopWorkbench * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_DesktopWorkbench { diff --git a/base/src/org/compiere/model/I_AD_Document_Action_Access.java b/base/src/org/compiere/model/I_AD_Document_Action_Access.java index ccabb80841..269b0967eb 100644 --- a/base/src/org/compiere/model/I_AD_Document_Action_Access.java +++ b/base/src/org/compiere/model/I_AD_Document_Action_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Document_Action_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Document_Action_Access { diff --git a/base/src/org/compiere/model/I_AD_Element.java b/base/src/org/compiere/model/I_AD_Element.java index 98f80ad2d5..8d671d69a2 100644 --- a/base/src/org/compiere/model/I_AD_Element.java +++ b/base/src/org/compiere/model/I_AD_Element.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Element * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Element { diff --git a/base/src/org/compiere/model/I_AD_EntityType.java b/base/src/org/compiere/model/I_AD_EntityType.java index 5441c52398..5b4761c29b 100644 --- a/base/src/org/compiere/model/I_AD_EntityType.java +++ b/base/src/org/compiere/model/I_AD_EntityType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_EntityType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_EntityType { diff --git a/base/src/org/compiere/model/I_AD_Error.java b/base/src/org/compiere/model/I_AD_Error.java index 3d275e87c9..d2b8bd0a8d 100644 --- a/base/src/org/compiere/model/I_AD_Error.java +++ b/base/src/org/compiere/model/I_AD_Error.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Error * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Error { diff --git a/base/src/org/compiere/model/I_AD_Field.java b/base/src/org/compiere/model/I_AD_Field.java index 52b3f67914..2bc94daf4e 100644 --- a/base/src/org/compiere/model/I_AD_Field.java +++ b/base/src/org/compiere/model/I_AD_Field.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Field * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Field { diff --git a/base/src/org/compiere/model/I_AD_FieldGroup.java b/base/src/org/compiere/model/I_AD_FieldGroup.java index 0bba2bcae8..f4c82baec8 100644 --- a/base/src/org/compiere/model/I_AD_FieldGroup.java +++ b/base/src/org/compiere/model/I_AD_FieldGroup.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_FieldGroup * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_FieldGroup { diff --git a/base/src/org/compiere/model/I_AD_Find.java b/base/src/org/compiere/model/I_AD_Find.java index d424a2be3a..a8f0a66fae 100644 --- a/base/src/org/compiere/model/I_AD_Find.java +++ b/base/src/org/compiere/model/I_AD_Find.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Find * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Find { diff --git a/base/src/org/compiere/model/I_AD_Form.java b/base/src/org/compiere/model/I_AD_Form.java index 2a7b8aa4b7..095daccc68 100644 --- a/base/src/org/compiere/model/I_AD_Form.java +++ b/base/src/org/compiere/model/I_AD_Form.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Form * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Form { diff --git a/base/src/org/compiere/model/I_AD_Form_Access.java b/base/src/org/compiere/model/I_AD_Form_Access.java index 10a029f802..e6b130422c 100644 --- a/base/src/org/compiere/model/I_AD_Form_Access.java +++ b/base/src/org/compiere/model/I_AD_Form_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Form_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Form_Access { diff --git a/base/src/org/compiere/model/I_AD_Image.java b/base/src/org/compiere/model/I_AD_Image.java index 02e0dfd323..c52ac54830 100644 --- a/base/src/org/compiere/model/I_AD_Image.java +++ b/base/src/org/compiere/model/I_AD_Image.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Image * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Image { diff --git a/base/src/org/compiere/model/I_AD_ImpFormat.java b/base/src/org/compiere/model/I_AD_ImpFormat.java index 185766f441..587673902a 100644 --- a/base/src/org/compiere/model/I_AD_ImpFormat.java +++ b/base/src/org/compiere/model/I_AD_ImpFormat.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ImpFormat * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ImpFormat { diff --git a/base/src/org/compiere/model/I_AD_ImpFormat_Row.java b/base/src/org/compiere/model/I_AD_ImpFormat_Row.java index fae6d57282..7f00af1caa 100644 --- a/base/src/org/compiere/model/I_AD_ImpFormat_Row.java +++ b/base/src/org/compiere/model/I_AD_ImpFormat_Row.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ImpFormat_Row * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ImpFormat_Row { diff --git a/base/src/org/compiere/model/I_AD_InfoColumn.java b/base/src/org/compiere/model/I_AD_InfoColumn.java index 1198e6d6d6..cead541360 100644 --- a/base/src/org/compiere/model/I_AD_InfoColumn.java +++ b/base/src/org/compiere/model/I_AD_InfoColumn.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_InfoColumn * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_InfoColumn { diff --git a/base/src/org/compiere/model/I_AD_InfoWindow.java b/base/src/org/compiere/model/I_AD_InfoWindow.java index 8911a489b1..c7dc5bf271 100644 --- a/base/src/org/compiere/model/I_AD_InfoWindow.java +++ b/base/src/org/compiere/model/I_AD_InfoWindow.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_InfoWindow * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_InfoWindow { diff --git a/base/src/org/compiere/model/I_AD_Issue.java b/base/src/org/compiere/model/I_AD_Issue.java index 282e7ae973..cd598214e7 100644 --- a/base/src/org/compiere/model/I_AD_Issue.java +++ b/base/src/org/compiere/model/I_AD_Issue.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Issue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Issue { diff --git a/base/src/org/compiere/model/I_AD_LabelPrinter.java b/base/src/org/compiere/model/I_AD_LabelPrinter.java index 45b1a25f0f..3bf5c1968e 100644 --- a/base/src/org/compiere/model/I_AD_LabelPrinter.java +++ b/base/src/org/compiere/model/I_AD_LabelPrinter.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_LabelPrinter * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_LabelPrinter { diff --git a/base/src/org/compiere/model/I_AD_LabelPrinterFunction.java b/base/src/org/compiere/model/I_AD_LabelPrinterFunction.java index 7faf8191ef..68088c501b 100644 --- a/base/src/org/compiere/model/I_AD_LabelPrinterFunction.java +++ b/base/src/org/compiere/model/I_AD_LabelPrinterFunction.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_LabelPrinterFunction * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_LabelPrinterFunction { diff --git a/base/src/org/compiere/model/I_AD_Language.java b/base/src/org/compiere/model/I_AD_Language.java index d97471ab36..31012a65bb 100644 --- a/base/src/org/compiere/model/I_AD_Language.java +++ b/base/src/org/compiere/model/I_AD_Language.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Language * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Language { diff --git a/base/src/org/compiere/model/I_AD_LdapAccess.java b/base/src/org/compiere/model/I_AD_LdapAccess.java index 0b97242596..cf10a5fb94 100644 --- a/base/src/org/compiere/model/I_AD_LdapAccess.java +++ b/base/src/org/compiere/model/I_AD_LdapAccess.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_LdapAccess * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_LdapAccess { diff --git a/base/src/org/compiere/model/I_AD_LdapProcessor.java b/base/src/org/compiere/model/I_AD_LdapProcessor.java index 51b014c60c..e799486926 100644 --- a/base/src/org/compiere/model/I_AD_LdapProcessor.java +++ b/base/src/org/compiere/model/I_AD_LdapProcessor.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_LdapProcessor * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_LdapProcessor { diff --git a/base/src/org/compiere/model/I_AD_LdapProcessorLog.java b/base/src/org/compiere/model/I_AD_LdapProcessorLog.java index c20d3bd174..7c9f1c03e9 100644 --- a/base/src/org/compiere/model/I_AD_LdapProcessorLog.java +++ b/base/src/org/compiere/model/I_AD_LdapProcessorLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_LdapProcessorLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_LdapProcessorLog { diff --git a/base/src/org/compiere/model/I_AD_Menu.java b/base/src/org/compiere/model/I_AD_Menu.java index 264ab2a288..ed7c6c97ce 100644 --- a/base/src/org/compiere/model/I_AD_Menu.java +++ b/base/src/org/compiere/model/I_AD_Menu.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Menu * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Menu { diff --git a/base/src/org/compiere/model/I_AD_Message.java b/base/src/org/compiere/model/I_AD_Message.java index 4c3ec1081f..fa4e72b343 100644 --- a/base/src/org/compiere/model/I_AD_Message.java +++ b/base/src/org/compiere/model/I_AD_Message.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Message * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Message { diff --git a/base/src/org/compiere/model/I_AD_MigrationScript.java b/base/src/org/compiere/model/I_AD_MigrationScript.java new file mode 100644 index 0000000000..b2253788fc --- /dev/null +++ b/base/src/org/compiere/model/I_AD_MigrationScript.java @@ -0,0 +1,211 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for AD_MigrationScript + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_AD_MigrationScript +{ + + /** TableName=AD_MigrationScript */ + public static final String Table_Name = "AD_MigrationScript"; + + /** AD_Table_ID=53064 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 4 - System + */ + BigDecimal accessLevel = BigDecimal.valueOf(4); + + /** Load Meta Data */ + + /** Column name AD_MigrationScript_ID */ + public static final String COLUMNNAME_AD_MigrationScript_ID = "AD_MigrationScript_ID"; + + /** Set Migration Script */ + public void setAD_MigrationScript_ID (int AD_MigrationScript_ID); + + /** Get Migration Script */ + public int getAD_MigrationScript_ID(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name DeveloperName */ + public static final String COLUMNNAME_DeveloperName = "DeveloperName"; + + /** Set Developer Name */ + public void setDeveloperName (String DeveloperName); + + /** Get Developer Name */ + public String getDeveloperName(); + + /** Column name FileName */ + public static final String COLUMNNAME_FileName = "FileName"; + + /** Set File Name. + * Name of the local file or URL + */ + public void setFileName (String FileName); + + /** Get File Name. + * Name of the local file or URL + */ + public String getFileName(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name ProjectName */ + public static final String COLUMNNAME_ProjectName = "ProjectName"; + + /** Set Project. + * Name of the Project + */ + public void setProjectName (String ProjectName); + + /** Get Project. + * Name of the Project + */ + public String getProjectName(); + + /** Column name Reference */ + public static final String COLUMNNAME_Reference = "Reference"; + + /** Set Reference. + * Reference for this record + */ + public void setReference (String Reference); + + /** Get Reference. + * Reference for this record + */ + public String getReference(); + + /** Column name ReleaseNo */ + public static final String COLUMNNAME_ReleaseNo = "ReleaseNo"; + + /** Set Release No. + * Internal Release Number + */ + public void setReleaseNo (String ReleaseNo); + + /** Get Release No. + * Internal Release Number + */ + public String getReleaseNo(); + + /** Column name Script */ + public static final String COLUMNNAME_Script = "Script"; + + /** Set Script. + * Dynamic Java Language Script to calculate result + */ + public void setScript (byte[] Script); + + /** Get Script. + * Dynamic Java Language Script to calculate result + */ + public byte[] getScript(); + + /** Column name ScriptRoll */ + public static final String COLUMNNAME_ScriptRoll = "ScriptRoll"; + + /** Set Roll the Script */ + public void setScriptRoll (String ScriptRoll); + + /** Get Roll the Script */ + public String getScriptRoll(); + + /** Column name Status */ + public static final String COLUMNNAME_Status = "Status"; + + /** Set Status. + * Status of the currently running check + */ + public void setStatus (String Status); + + /** Get Status. + * Status of the currently running check + */ + public String getStatus(); + + /** Column name URL */ + public static final String COLUMNNAME_URL = "URL"; + + /** Set URL. + * Full URL address - e.g. http://www.adempiere.org + */ + public void setURL (String URL); + + /** Get URL. + * Full URL address - e.g. http://www.adempiere.org + */ + public String getURL(); + + /** Column name isApply */ + public static final String COLUMNNAME_isApply = "isApply"; + + /** Set Apply Script */ + public void setisApply (boolean isApply); + + /** Get Apply Script */ + public boolean isApply(); +} diff --git a/base/src/org/compiere/model/I_AD_ModelValidator.java b/base/src/org/compiere/model/I_AD_ModelValidator.java index 54a9fda94c..15fdc57e5a 100644 --- a/base/src/org/compiere/model/I_AD_ModelValidator.java +++ b/base/src/org/compiere/model/I_AD_ModelValidator.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ModelValidator * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ModelValidator { diff --git a/base/src/org/compiere/model/I_AD_Modification.java b/base/src/org/compiere/model/I_AD_Modification.java index 852f086afe..ececb8cc4d 100644 --- a/base/src/org/compiere/model/I_AD_Modification.java +++ b/base/src/org/compiere/model/I_AD_Modification.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Modification * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Modification { diff --git a/base/src/org/compiere/model/I_AD_Note.java b/base/src/org/compiere/model/I_AD_Note.java index cb3f061335..febb82b475 100644 --- a/base/src/org/compiere/model/I_AD_Note.java +++ b/base/src/org/compiere/model/I_AD_Note.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Note * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Note { diff --git a/base/src/org/compiere/model/I_AD_Org.java b/base/src/org/compiere/model/I_AD_Org.java index 661589899b..64cd440f8c 100644 --- a/base/src/org/compiere/model/I_AD_Org.java +++ b/base/src/org/compiere/model/I_AD_Org.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Org * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Org { diff --git a/base/src/org/compiere/model/I_AD_OrgInfo.java b/base/src/org/compiere/model/I_AD_OrgInfo.java index a1e0ecaea6..82c23919e8 100644 --- a/base/src/org/compiere/model/I_AD_OrgInfo.java +++ b/base/src/org/compiere/model/I_AD_OrgInfo.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_OrgInfo * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_OrgInfo { diff --git a/base/src/org/compiere/model/I_AD_OrgType.java b/base/src/org/compiere/model/I_AD_OrgType.java index bd6aadef30..169fd4cb08 100644 --- a/base/src/org/compiere/model/I_AD_OrgType.java +++ b/base/src/org/compiere/model/I_AD_OrgType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_OrgType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_OrgType { diff --git a/base/src/org/compiere/model/I_AD_PInstance.java b/base/src/org/compiere/model/I_AD_PInstance.java index 1257841e56..da32c17a40 100644 --- a/base/src/org/compiere/model/I_AD_PInstance.java +++ b/base/src/org/compiere/model/I_AD_PInstance.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PInstance * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PInstance { diff --git a/base/src/org/compiere/model/I_AD_PInstance_Log.java b/base/src/org/compiere/model/I_AD_PInstance_Log.java index 20be5502ab..d075f9d7b6 100644 --- a/base/src/org/compiere/model/I_AD_PInstance_Log.java +++ b/base/src/org/compiere/model/I_AD_PInstance_Log.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PInstance_Log * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PInstance_Log { diff --git a/base/src/org/compiere/model/I_AD_PInstance_Para.java b/base/src/org/compiere/model/I_AD_PInstance_Para.java index f8aad50a87..08a6b6a52a 100644 --- a/base/src/org/compiere/model/I_AD_PInstance_Para.java +++ b/base/src/org/compiere/model/I_AD_PInstance_Para.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PInstance_Para * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PInstance_Para { diff --git a/base/src/org/compiere/model/I_AD_Package_Exp.java b/base/src/org/compiere/model/I_AD_Package_Exp.java index c4cc1a1879..48bbe02a66 100644 --- a/base/src/org/compiere/model/I_AD_Package_Exp.java +++ b/base/src/org/compiere/model/I_AD_Package_Exp.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Package_Exp * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Package_Exp { diff --git a/base/src/org/compiere/model/I_AD_Package_Exp_Common.java b/base/src/org/compiere/model/I_AD_Package_Exp_Common.java index 6848a97e3d..ade205e916 100644 --- a/base/src/org/compiere/model/I_AD_Package_Exp_Common.java +++ b/base/src/org/compiere/model/I_AD_Package_Exp_Common.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Package_Exp_Common * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Package_Exp_Common { diff --git a/base/src/org/compiere/model/I_AD_Package_Exp_Detail.java b/base/src/org/compiere/model/I_AD_Package_Exp_Detail.java index 32c874b14c..b420fd09d0 100644 --- a/base/src/org/compiere/model/I_AD_Package_Exp_Detail.java +++ b/base/src/org/compiere/model/I_AD_Package_Exp_Detail.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Package_Exp_Detail * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Package_Exp_Detail { diff --git a/base/src/org/compiere/model/I_AD_Package_Imp.java b/base/src/org/compiere/model/I_AD_Package_Imp.java index 8e60a631fa..0579c2bf14 100644 --- a/base/src/org/compiere/model/I_AD_Package_Imp.java +++ b/base/src/org/compiere/model/I_AD_Package_Imp.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Package_Imp * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Package_Imp { diff --git a/base/src/org/compiere/model/I_AD_Package_Imp_Backup.java b/base/src/org/compiere/model/I_AD_Package_Imp_Backup.java index 18f9a24e4f..0825b70cc7 100644 --- a/base/src/org/compiere/model/I_AD_Package_Imp_Backup.java +++ b/base/src/org/compiere/model/I_AD_Package_Imp_Backup.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Package_Imp_Backup * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Package_Imp_Backup { diff --git a/base/src/org/compiere/model/I_AD_Package_Imp_Detail.java b/base/src/org/compiere/model/I_AD_Package_Imp_Detail.java index f0165c4eee..986f81fe7a 100644 --- a/base/src/org/compiere/model/I_AD_Package_Imp_Detail.java +++ b/base/src/org/compiere/model/I_AD_Package_Imp_Detail.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Package_Imp_Detail * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Package_Imp_Detail { diff --git a/base/src/org/compiere/model/I_AD_Package_Imp_Inst.java b/base/src/org/compiere/model/I_AD_Package_Imp_Inst.java index 14c8f3e188..ec714e034e 100644 --- a/base/src/org/compiere/model/I_AD_Package_Imp_Inst.java +++ b/base/src/org/compiere/model/I_AD_Package_Imp_Inst.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Package_Imp_Inst * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Package_Imp_Inst { diff --git a/base/src/org/compiere/model/I_AD_Package_Imp_Proc.java b/base/src/org/compiere/model/I_AD_Package_Imp_Proc.java index ee2291ad74..e20d779bf4 100644 --- a/base/src/org/compiere/model/I_AD_Package_Imp_Proc.java +++ b/base/src/org/compiere/model/I_AD_Package_Imp_Proc.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Package_Imp_Proc * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Package_Imp_Proc { diff --git a/base/src/org/compiere/model/I_AD_Preference.java b/base/src/org/compiere/model/I_AD_Preference.java index 6209ffbb3e..74da5fe153 100644 --- a/base/src/org/compiere/model/I_AD_Preference.java +++ b/base/src/org/compiere/model/I_AD_Preference.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Preference * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Preference { diff --git a/base/src/org/compiere/model/I_AD_PrintColor.java b/base/src/org/compiere/model/I_AD_PrintColor.java index 8412d304e0..30cd7101a8 100644 --- a/base/src/org/compiere/model/I_AD_PrintColor.java +++ b/base/src/org/compiere/model/I_AD_PrintColor.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintColor * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintColor { diff --git a/base/src/org/compiere/model/I_AD_PrintFont.java b/base/src/org/compiere/model/I_AD_PrintFont.java index 5a60ca607a..9acca5b6cd 100644 --- a/base/src/org/compiere/model/I_AD_PrintFont.java +++ b/base/src/org/compiere/model/I_AD_PrintFont.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintFont * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintFont { diff --git a/base/src/org/compiere/model/I_AD_PrintForm.java b/base/src/org/compiere/model/I_AD_PrintForm.java index 98a9dbfccc..5590aa2955 100644 --- a/base/src/org/compiere/model/I_AD_PrintForm.java +++ b/base/src/org/compiere/model/I_AD_PrintForm.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintForm * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintForm { diff --git a/base/src/org/compiere/model/I_AD_PrintFormat.java b/base/src/org/compiere/model/I_AD_PrintFormat.java index 013570816a..4ab31ef171 100644 --- a/base/src/org/compiere/model/I_AD_PrintFormat.java +++ b/base/src/org/compiere/model/I_AD_PrintFormat.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintFormat * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintFormat { diff --git a/base/src/org/compiere/model/I_AD_PrintFormatItem.java b/base/src/org/compiere/model/I_AD_PrintFormatItem.java index 476f9aa2bb..32be2d64e5 100644 --- a/base/src/org/compiere/model/I_AD_PrintFormatItem.java +++ b/base/src/org/compiere/model/I_AD_PrintFormatItem.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintFormatItem * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintFormatItem { diff --git a/base/src/org/compiere/model/I_AD_PrintGraph.java b/base/src/org/compiere/model/I_AD_PrintGraph.java index 7572eb1d9a..334d810b1c 100644 --- a/base/src/org/compiere/model/I_AD_PrintGraph.java +++ b/base/src/org/compiere/model/I_AD_PrintGraph.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintGraph * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintGraph { diff --git a/base/src/org/compiere/model/I_AD_PrintLabel.java b/base/src/org/compiere/model/I_AD_PrintLabel.java index 822f318919..a67c91de4b 100644 --- a/base/src/org/compiere/model/I_AD_PrintLabel.java +++ b/base/src/org/compiere/model/I_AD_PrintLabel.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintLabel * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintLabel { diff --git a/base/src/org/compiere/model/I_AD_PrintLabelLine.java b/base/src/org/compiere/model/I_AD_PrintLabelLine.java index ecb3638450..c9274543a7 100644 --- a/base/src/org/compiere/model/I_AD_PrintLabelLine.java +++ b/base/src/org/compiere/model/I_AD_PrintLabelLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintLabelLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintLabelLine { diff --git a/base/src/org/compiere/model/I_AD_PrintPaper.java b/base/src/org/compiere/model/I_AD_PrintPaper.java index aad1e38d7d..874a7c9e4b 100644 --- a/base/src/org/compiere/model/I_AD_PrintPaper.java +++ b/base/src/org/compiere/model/I_AD_PrintPaper.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintPaper * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintPaper { diff --git a/base/src/org/compiere/model/I_AD_PrintTableFormat.java b/base/src/org/compiere/model/I_AD_PrintTableFormat.java index 6f41a95eb7..55e578408f 100644 --- a/base/src/org/compiere/model/I_AD_PrintTableFormat.java +++ b/base/src/org/compiere/model/I_AD_PrintTableFormat.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_PrintTableFormat * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_PrintTableFormat { diff --git a/base/src/org/compiere/model/I_AD_Private_Access.java b/base/src/org/compiere/model/I_AD_Private_Access.java index 261241492d..f4c4e93237 100644 --- a/base/src/org/compiere/model/I_AD_Private_Access.java +++ b/base/src/org/compiere/model/I_AD_Private_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Private_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Private_Access { diff --git a/base/src/org/compiere/model/I_AD_Process.java b/base/src/org/compiere/model/I_AD_Process.java index 8320ebe547..d6df143d9c 100644 --- a/base/src/org/compiere/model/I_AD_Process.java +++ b/base/src/org/compiere/model/I_AD_Process.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Process * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Process { diff --git a/base/src/org/compiere/model/I_AD_Process_Access.java b/base/src/org/compiere/model/I_AD_Process_Access.java index 09cacd917c..50b8f48e2a 100644 --- a/base/src/org/compiere/model/I_AD_Process_Access.java +++ b/base/src/org/compiere/model/I_AD_Process_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Process_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Process_Access { diff --git a/base/src/org/compiere/model/I_AD_Process_Para.java b/base/src/org/compiere/model/I_AD_Process_Para.java index 7dc26cf5af..d07b6adaa9 100644 --- a/base/src/org/compiere/model/I_AD_Process_Para.java +++ b/base/src/org/compiere/model/I_AD_Process_Para.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Process_Para * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Process_Para { diff --git a/base/src/org/compiere/model/I_AD_Record_Access.java b/base/src/org/compiere/model/I_AD_Record_Access.java index 5b9fb6b32e..2818097875 100644 --- a/base/src/org/compiere/model/I_AD_Record_Access.java +++ b/base/src/org/compiere/model/I_AD_Record_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Record_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Record_Access { diff --git a/base/src/org/compiere/model/I_AD_Ref_List.java b/base/src/org/compiere/model/I_AD_Ref_List.java index 593cbadb79..7a51ac644a 100644 --- a/base/src/org/compiere/model/I_AD_Ref_List.java +++ b/base/src/org/compiere/model/I_AD_Ref_List.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Ref_List * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Ref_List { diff --git a/base/src/org/compiere/model/I_AD_Ref_Table.java b/base/src/org/compiere/model/I_AD_Ref_Table.java index 35149fa41b..df55a08a1f 100644 --- a/base/src/org/compiere/model/I_AD_Ref_Table.java +++ b/base/src/org/compiere/model/I_AD_Ref_Table.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Ref_Table * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Ref_Table { diff --git a/base/src/org/compiere/model/I_AD_Reference.java b/base/src/org/compiere/model/I_AD_Reference.java index ab0209ccab..a0f6e2eaa2 100644 --- a/base/src/org/compiere/model/I_AD_Reference.java +++ b/base/src/org/compiere/model/I_AD_Reference.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Reference * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Reference { diff --git a/base/src/org/compiere/model/I_AD_Registration.java b/base/src/org/compiere/model/I_AD_Registration.java index 088c76796e..e709fc0f83 100644 --- a/base/src/org/compiere/model/I_AD_Registration.java +++ b/base/src/org/compiere/model/I_AD_Registration.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Registration * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Registration { diff --git a/base/src/org/compiere/model/I_AD_Replication.java b/base/src/org/compiere/model/I_AD_Replication.java index e56fd360a7..913ba4f45b 100644 --- a/base/src/org/compiere/model/I_AD_Replication.java +++ b/base/src/org/compiere/model/I_AD_Replication.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Replication * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Replication { diff --git a/base/src/org/compiere/model/I_AD_ReplicationDocument.java b/base/src/org/compiere/model/I_AD_ReplicationDocument.java new file mode 100644 index 0000000000..af6fe4df68 --- /dev/null +++ b/base/src/org/compiere/model/I_AD_ReplicationDocument.java @@ -0,0 +1,136 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for AD_ReplicationDocument + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_AD_ReplicationDocument +{ + + /** TableName=AD_ReplicationDocument */ + public static final String Table_Name = "AD_ReplicationDocument"; + + /** AD_Table_ID=53071 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_ReplicationDocument_ID */ + public static final String COLUMNNAME_AD_ReplicationDocument_ID = "AD_ReplicationDocument_ID"; + + /** Set AD_ReplicationDocument_ID */ + public void setAD_ReplicationDocument_ID (int AD_ReplicationDocument_ID); + + /** Get AD_ReplicationDocument_ID */ + public int getAD_ReplicationDocument_ID(); + + /** Column name AD_ReplicationStrategy_ID */ + public static final String COLUMNNAME_AD_ReplicationStrategy_ID = "AD_ReplicationStrategy_ID"; + + /** Set Replication Strategy. + * Data Replication Strategy + */ + public void setAD_ReplicationStrategy_ID (int AD_ReplicationStrategy_ID); + + /** Get Replication Strategy. + * Data Replication Strategy + */ + public int getAD_ReplicationStrategy_ID(); + + /** Column name AD_Table_ID */ + public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID"; + + /** Set Table. + * Database Table information + */ + public void setAD_Table_ID (int AD_Table_ID); + + /** Get Table. + * Database Table information + */ + public int getAD_Table_ID(); + + public I_AD_Table getAD_Table() throws Exception; + + /** Column name C_DocType_ID */ + public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; + + /** Set Document Type. + * Document type or rules + */ + public void setC_DocType_ID (int C_DocType_ID); + + /** Get Document Type. + * Document type or rules + */ + public int getC_DocType_ID(); + + public I_C_DocType getC_DocType() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name ReplicationType */ + public static final String COLUMNNAME_ReplicationType = "ReplicationType"; + + /** Set Replication Type. + * Type of Data Replication + */ + public void setReplicationType (String ReplicationType); + + /** Get Replication Type. + * Type of Data Replication + */ + public String getReplicationType(); +} diff --git a/base/src/org/compiere/model/I_AD_ReplicationTable.java b/base/src/org/compiere/model/I_AD_ReplicationTable.java index a13abf7007..9257aaf871 100644 --- a/base/src/org/compiere/model/I_AD_ReplicationTable.java +++ b/base/src/org/compiere/model/I_AD_ReplicationTable.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ReplicationTable * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ReplicationTable { diff --git a/base/src/org/compiere/model/I_AD_Replication_Log.java b/base/src/org/compiere/model/I_AD_Replication_Log.java index 285fec8869..a1d519e68c 100644 --- a/base/src/org/compiere/model/I_AD_Replication_Log.java +++ b/base/src/org/compiere/model/I_AD_Replication_Log.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Replication_Log * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Replication_Log { diff --git a/base/src/org/compiere/model/I_AD_Replication_Run.java b/base/src/org/compiere/model/I_AD_Replication_Run.java index 15f3bae861..10f8c4efc6 100644 --- a/base/src/org/compiere/model/I_AD_Replication_Run.java +++ b/base/src/org/compiere/model/I_AD_Replication_Run.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Replication_Run * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Replication_Run { diff --git a/base/src/org/compiere/model/I_AD_ReportView.java b/base/src/org/compiere/model/I_AD_ReportView.java index 0aaea82b5a..b7f18f6cef 100644 --- a/base/src/org/compiere/model/I_AD_ReportView.java +++ b/base/src/org/compiere/model/I_AD_ReportView.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ReportView * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ReportView { diff --git a/base/src/org/compiere/model/I_AD_ReportView_Col.java b/base/src/org/compiere/model/I_AD_ReportView_Col.java index 41ce33dcbc..6bc6035208 100644 --- a/base/src/org/compiere/model/I_AD_ReportView_Col.java +++ b/base/src/org/compiere/model/I_AD_ReportView_Col.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_ReportView_Col * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_ReportView_Col { diff --git a/base/src/org/compiere/model/I_AD_Role.java b/base/src/org/compiere/model/I_AD_Role.java deleted file mode 100644 index 78375b7e88..0000000000 --- a/base/src/org/compiere/model/I_AD_Role.java +++ /dev/null @@ -1,480 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for AD_Role - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_AD_Role -{ - - /** TableName=AD_Role */ - public static final String Table_Name = "AD_Role"; - - /** AD_Table_ID=156 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 6 - System - Client - */ - BigDecimal accessLevel = BigDecimal.valueOf(6); - - /** Load Meta Data */ - - /** Column name AD_Role_ID */ - public static final String COLUMNNAME_AD_Role_ID = "AD_Role_ID"; - - /** Set Role. - * Responsibility Role - */ - public void setAD_Role_ID (int AD_Role_ID); - - /** Get Role. - * Responsibility Role - */ - public int getAD_Role_ID(); - - /** Column name AD_Tree_Menu_ID */ - public static final String COLUMNNAME_AD_Tree_Menu_ID = "AD_Tree_Menu_ID"; - - /** Set Menu Tree. - * Tree of the menu - */ - public void setAD_Tree_Menu_ID (int AD_Tree_Menu_ID); - - /** Get Menu Tree. - * Tree of the menu - */ - public int getAD_Tree_Menu_ID(); - - /** Column name AD_Tree_Org_ID */ - public static final String COLUMNNAME_AD_Tree_Org_ID = "AD_Tree_Org_ID"; - - /** Set Organization Tree. - * Tree to determine organizational hierarchy - */ - public void setAD_Tree_Org_ID (int AD_Tree_Org_ID); - - /** Get Organization Tree. - * Tree to determine organizational hierarchy - */ - public int getAD_Tree_Org_ID(); - - /** Column name Allow_Info_Account */ - public static final String COLUMNNAME_Allow_Info_Account = "Allow_Info_Account"; - - /** Set Allow Info Account */ - public void setAllow_Info_Account (boolean Allow_Info_Account); - - /** Get Allow Info Account */ - public boolean isAllow_Info_Account(); - - /** Column name Allow_Info_Asset */ - public static final String COLUMNNAME_Allow_Info_Asset = "Allow_Info_Asset"; - - /** Set Allow Info Asset */ - public void setAllow_Info_Asset (boolean Allow_Info_Asset); - - /** Get Allow Info Asset */ - public boolean isAllow_Info_Asset(); - - /** Column name Allow_Info_BPartner */ - public static final String COLUMNNAME_Allow_Info_BPartner = "Allow_Info_BPartner"; - - /** Set Allow Info BPartner */ - public void setAllow_Info_BPartner (boolean Allow_Info_BPartner); - - /** Get Allow Info BPartner */ - public boolean isAllow_Info_BPartner(); - - /** Column name Allow_Info_CashJournal */ - public static final String COLUMNNAME_Allow_Info_CashJournal = "Allow_Info_CashJournal"; - - /** Set Allow Info CashJournal */ - public void setAllow_Info_CashJournal (boolean Allow_Info_CashJournal); - - /** Get Allow Info CashJournal */ - public boolean isAllow_Info_CashJournal(); - - /** Column name Allow_Info_InOut */ - public static final String COLUMNNAME_Allow_Info_InOut = "Allow_Info_InOut"; - - /** Set Allow Info InOut */ - public void setAllow_Info_InOut (boolean Allow_Info_InOut); - - /** Get Allow Info InOut */ - public boolean isAllow_Info_InOut(); - - /** Column name Allow_Info_Invoice */ - public static final String COLUMNNAME_Allow_Info_Invoice = "Allow_Info_Invoice"; - - /** Set Allow Info Invoice */ - public void setAllow_Info_Invoice (boolean Allow_Info_Invoice); - - /** Get Allow Info Invoice */ - public boolean isAllow_Info_Invoice(); - - /** Column name Allow_Info_Order */ - public static final String COLUMNNAME_Allow_Info_Order = "Allow_Info_Order"; - - /** Set Allow Info Order */ - public void setAllow_Info_Order (boolean Allow_Info_Order); - - /** Get Allow Info Order */ - public boolean isAllow_Info_Order(); - - /** Column name Allow_Info_Payment */ - public static final String COLUMNNAME_Allow_Info_Payment = "Allow_Info_Payment"; - - /** Set Allow Info Payment */ - public void setAllow_Info_Payment (boolean Allow_Info_Payment); - - /** Get Allow Info Payment */ - public boolean isAllow_Info_Payment(); - - /** Column name Allow_Info_Product */ - public static final String COLUMNNAME_Allow_Info_Product = "Allow_Info_Product"; - - /** Set Allow Info Product */ - public void setAllow_Info_Product (boolean Allow_Info_Product); - - /** Get Allow Info Product */ - public boolean isAllow_Info_Product(); - - /** Column name Allow_Info_Resource */ - public static final String COLUMNNAME_Allow_Info_Resource = "Allow_Info_Resource"; - - /** Set Allow Info Resource */ - public void setAllow_Info_Resource (boolean Allow_Info_Resource); - - /** Get Allow Info Resource */ - public boolean isAllow_Info_Resource(); - - /** Column name Allow_Info_Schedule */ - public static final String COLUMNNAME_Allow_Info_Schedule = "Allow_Info_Schedule"; - - /** Set Allow Info Schedule */ - public void setAllow_Info_Schedule (boolean Allow_Info_Schedule); - - /** Get Allow Info Schedule */ - public boolean isAllow_Info_Schedule(); - - /** Column name AmtApproval */ - public static final String COLUMNNAME_AmtApproval = "AmtApproval"; - - /** Set Approval Amount. - * The approval amount limit for this role - */ - public void setAmtApproval (BigDecimal AmtApproval); - - /** Get Approval Amount. - * The approval amount limit for this role - */ - public BigDecimal getAmtApproval(); - - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name ConfirmQueryRecords */ - public static final String COLUMNNAME_ConfirmQueryRecords = "ConfirmQueryRecords"; - - /** Set Confirm Query Records. - * Require Confirmation if more records will be returned by the query (If not defined 500) - */ - public void setConfirmQueryRecords (int ConfirmQueryRecords); - - /** Get Confirm Query Records. - * Require Confirmation if more records will be returned by the query (If not defined 500) - */ - public int getConfirmQueryRecords(); - - /** Column name ConnectionProfile */ - public static final String COLUMNNAME_ConnectionProfile = "ConnectionProfile"; - - /** Set Connection Profile. - * How a Java Client connects to the server(s) - */ - public void setConnectionProfile (String ConnectionProfile); - - /** Get Connection Profile. - * How a Java Client connects to the server(s) - */ - public String getConnectionProfile(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name IsAccessAllOrgs */ - public static final String COLUMNNAME_IsAccessAllOrgs = "IsAccessAllOrgs"; - - /** Set Access all Orgs. - * Access all Organizations (no org access control) of the client - */ - public void setIsAccessAllOrgs (boolean IsAccessAllOrgs); - - /** Get Access all Orgs. - * Access all Organizations (no org access control) of the client - */ - public boolean isAccessAllOrgs(); - - /** Column name IsCanApproveOwnDoc */ - public static final String COLUMNNAME_IsCanApproveOwnDoc = "IsCanApproveOwnDoc"; - - /** Set Approve own Documents. - * Users with this role can approve their own documents - */ - public void setIsCanApproveOwnDoc (boolean IsCanApproveOwnDoc); - - /** Get Approve own Documents. - * Users with this role can approve their own documents - */ - public boolean isCanApproveOwnDoc(); - - /** Column name IsCanExport */ - public static final String COLUMNNAME_IsCanExport = "IsCanExport"; - - /** Set Can Export. - * Users with this role can export data - */ - public void setIsCanExport (boolean IsCanExport); - - /** Get Can Export. - * Users with this role can export data - */ - public boolean isCanExport(); - - /** Column name IsCanReport */ - public static final String COLUMNNAME_IsCanReport = "IsCanReport"; - - /** Set Can Report. - * Users with this role can create reports - */ - public void setIsCanReport (boolean IsCanReport); - - /** Get Can Report. - * Users with this role can create reports - */ - public boolean isCanReport(); - - /** Column name IsChangeLog */ - public static final String COLUMNNAME_IsChangeLog = "IsChangeLog"; - - /** Set Maintain Change Log. - * Maintain a log of changes - */ - public void setIsChangeLog (boolean IsChangeLog); - - /** Get Maintain Change Log. - * Maintain a log of changes - */ - public boolean isChangeLog(); - - /** Column name IsManual */ - public static final String COLUMNNAME_IsManual = "IsManual"; - - /** Set Manual. - * This is a manual process - */ - public void setIsManual (boolean IsManual); - - /** Get Manual. - * This is a manual process - */ - public boolean isManual(); - - /** Column name IsPersonalAccess */ - public static final String COLUMNNAME_IsPersonalAccess = "IsPersonalAccess"; - - /** Set Personal Access. - * Allow access to all personal records - */ - public void setIsPersonalAccess (boolean IsPersonalAccess); - - /** Get Personal Access. - * Allow access to all personal records - */ - public boolean isPersonalAccess(); - - /** Column name IsPersonalLock */ - public static final String COLUMNNAME_IsPersonalLock = "IsPersonalLock"; - - /** Set Personal Lock. - * Allow users with role to lock access to personal records - */ - public void setIsPersonalLock (boolean IsPersonalLock); - - /** Get Personal Lock. - * Allow users with role to lock access to personal records - */ - public boolean isPersonalLock(); - - /** Column name IsShowAcct */ - public static final String COLUMNNAME_IsShowAcct = "IsShowAcct"; - - /** Set Show Accounting. - * Users with this role can see accounting information - */ - public void setIsShowAcct (boolean IsShowAcct); - - /** Get Show Accounting. - * Users with this role can see accounting information - */ - public boolean isShowAcct(); - - /** Column name IsUseUserOrgAccess */ - public static final String COLUMNNAME_IsUseUserOrgAccess = "IsUseUserOrgAccess"; - - /** Set Use User Org Access. - * Use Org Access defined by user instead of Role Org Access - */ - public void setIsUseUserOrgAccess (boolean IsUseUserOrgAccess); - - /** Get Use User Org Access. - * Use Org Access defined by user instead of Role Org Access - */ - public boolean isUseUserOrgAccess(); - - /** Column name MaxQueryRecords */ - public static final String COLUMNNAME_MaxQueryRecords = "MaxQueryRecords"; - - /** Set Max Query Records. - * If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records - */ - public void setMaxQueryRecords (int MaxQueryRecords); - - /** Get Max Query Records. - * If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records - */ - public int getMaxQueryRecords(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name OverwritePriceLimit */ - public static final String COLUMNNAME_OverwritePriceLimit = "OverwritePriceLimit"; - - /** Set Overwrite Price Limit. - * Overwrite Price Limit if the Price List enforces the Price Limit - */ - public void setOverwritePriceLimit (boolean OverwritePriceLimit); - - /** Get Overwrite Price Limit. - * Overwrite Price Limit if the Price List enforces the Price Limit - */ - public boolean isOverwritePriceLimit(); - - /** Column name PreferenceType */ - public static final String COLUMNNAME_PreferenceType = "PreferenceType"; - - /** Set Preference Level. - * Determines what preferences the user can set - */ - public void setPreferenceType (String PreferenceType); - - /** Get Preference Level. - * Determines what preferences the user can set - */ - public String getPreferenceType(); - - /** Column name Supervisor_ID */ - public static final String COLUMNNAME_Supervisor_ID = "Supervisor_ID"; - - /** Set Supervisor. - * Supervisor for this user/organization - used for escalation and approval - */ - public void setSupervisor_ID (int Supervisor_ID); - - /** Get Supervisor. - * Supervisor for this user/organization - used for escalation and approval - */ - public int getSupervisor_ID(); - - /** Column name UserDiscount */ - public static final String COLUMNNAME_UserDiscount = "UserDiscount"; - - /** Set UserDiscount */ - public void setUserDiscount (BigDecimal UserDiscount); - - /** Get UserDiscount */ - public BigDecimal getUserDiscount(); - - /** Column name UserLevel */ - public static final String COLUMNNAME_UserLevel = "UserLevel"; - - /** Set User Level. - * System Client Organization - */ - public void setUserLevel (String UserLevel); - - /** Get User Level. - * System Client Organization - */ - public String getUserLevel(); -} diff --git a/base/src/org/compiere/model/I_AD_Role_OrgAccess.java b/base/src/org/compiere/model/I_AD_Role_OrgAccess.java index cc25c9c7cd..89bda20c34 100644 --- a/base/src/org/compiere/model/I_AD_Role_OrgAccess.java +++ b/base/src/org/compiere/model/I_AD_Role_OrgAccess.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Role_OrgAccess * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Role_OrgAccess { diff --git a/base/src/org/compiere/model/I_AD_Rule.java b/base/src/org/compiere/model/I_AD_Rule.java index f15ea2a323..bdc266ca85 100644 --- a/base/src/org/compiere/model/I_AD_Rule.java +++ b/base/src/org/compiere/model/I_AD_Rule.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Rule * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Rule { diff --git a/base/src/org/compiere/model/I_AD_Scheduler.java b/base/src/org/compiere/model/I_AD_Scheduler.java index 88031d0934..80fe5bdd4f 100644 --- a/base/src/org/compiere/model/I_AD_Scheduler.java +++ b/base/src/org/compiere/model/I_AD_Scheduler.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Scheduler * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Scheduler { diff --git a/base/src/org/compiere/model/I_AD_SchedulerLog.java b/base/src/org/compiere/model/I_AD_SchedulerLog.java index 542739289e..6e5521c7f9 100644 --- a/base/src/org/compiere/model/I_AD_SchedulerLog.java +++ b/base/src/org/compiere/model/I_AD_SchedulerLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_SchedulerLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_SchedulerLog { diff --git a/base/src/org/compiere/model/I_AD_SchedulerRecipient.java b/base/src/org/compiere/model/I_AD_SchedulerRecipient.java index e428e4f648..5b75e9e73a 100644 --- a/base/src/org/compiere/model/I_AD_SchedulerRecipient.java +++ b/base/src/org/compiere/model/I_AD_SchedulerRecipient.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_SchedulerRecipient * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_SchedulerRecipient { diff --git a/base/src/org/compiere/model/I_AD_Scheduler_Para.java b/base/src/org/compiere/model/I_AD_Scheduler_Para.java index 2a3ab7f807..db8ee636e2 100644 --- a/base/src/org/compiere/model/I_AD_Scheduler_Para.java +++ b/base/src/org/compiere/model/I_AD_Scheduler_Para.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Scheduler_Para * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Scheduler_Para { diff --git a/base/src/org/compiere/model/I_AD_Sequence.java b/base/src/org/compiere/model/I_AD_Sequence.java index 1927b2b953..36885203c0 100644 --- a/base/src/org/compiere/model/I_AD_Sequence.java +++ b/base/src/org/compiere/model/I_AD_Sequence.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Sequence * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Sequence { diff --git a/base/src/org/compiere/model/I_AD_Sequence_Audit.java b/base/src/org/compiere/model/I_AD_Sequence_Audit.java index 86c0b1bbeb..84947a18c3 100644 --- a/base/src/org/compiere/model/I_AD_Sequence_Audit.java +++ b/base/src/org/compiere/model/I_AD_Sequence_Audit.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Sequence_Audit * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Sequence_Audit { diff --git a/base/src/org/compiere/model/I_AD_Sequence_No.java b/base/src/org/compiere/model/I_AD_Sequence_No.java index f7325f223f..1961e5b400 100644 --- a/base/src/org/compiere/model/I_AD_Sequence_No.java +++ b/base/src/org/compiere/model/I_AD_Sequence_No.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Sequence_No * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Sequence_No { diff --git a/base/src/org/compiere/model/I_AD_Session.java b/base/src/org/compiere/model/I_AD_Session.java index 8bb67ae9bf..b832ca6e7c 100644 --- a/base/src/org/compiere/model/I_AD_Session.java +++ b/base/src/org/compiere/model/I_AD_Session.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Session * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Session { diff --git a/base/src/org/compiere/model/I_AD_System.java b/base/src/org/compiere/model/I_AD_System.java index b041789d57..b9e29e66c5 100644 --- a/base/src/org/compiere/model/I_AD_System.java +++ b/base/src/org/compiere/model/I_AD_System.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_System * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_System { diff --git a/base/src/org/compiere/model/I_AD_Tab.java b/base/src/org/compiere/model/I_AD_Tab.java index b827bbba30..029a6679c6 100644 --- a/base/src/org/compiere/model/I_AD_Tab.java +++ b/base/src/org/compiere/model/I_AD_Tab.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Tab * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Tab { diff --git a/base/src/org/compiere/model/I_AD_Table.java b/base/src/org/compiere/model/I_AD_Table.java index ebec841b41..b7d8b0203c 100644 --- a/base/src/org/compiere/model/I_AD_Table.java +++ b/base/src/org/compiere/model/I_AD_Table.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Table * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Table { diff --git a/base/src/org/compiere/model/I_AD_Table_Access.java b/base/src/org/compiere/model/I_AD_Table_Access.java index 3320e039db..ff00ec1cb5 100644 --- a/base/src/org/compiere/model/I_AD_Table_Access.java +++ b/base/src/org/compiere/model/I_AD_Table_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Table_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Table_Access { diff --git a/base/src/org/compiere/model/I_AD_Table_ScriptValidator.java b/base/src/org/compiere/model/I_AD_Table_ScriptValidator.java index 65dc007ec0..a247ab500c 100644 --- a/base/src/org/compiere/model/I_AD_Table_ScriptValidator.java +++ b/base/src/org/compiere/model/I_AD_Table_ScriptValidator.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Table_ScriptValidator * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Table_ScriptValidator { diff --git a/base/src/org/compiere/model/I_AD_Task.java b/base/src/org/compiere/model/I_AD_Task.java index 1b5e064ab2..db8f251152 100644 --- a/base/src/org/compiere/model/I_AD_Task.java +++ b/base/src/org/compiere/model/I_AD_Task.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Task * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Task { diff --git a/base/src/org/compiere/model/I_AD_TaskInstance.java b/base/src/org/compiere/model/I_AD_TaskInstance.java index 60f1e0caf2..a3eeec1d90 100644 --- a/base/src/org/compiere/model/I_AD_TaskInstance.java +++ b/base/src/org/compiere/model/I_AD_TaskInstance.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TaskInstance * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TaskInstance { diff --git a/base/src/org/compiere/model/I_AD_Task_Access.java b/base/src/org/compiere/model/I_AD_Task_Access.java index cf09fc839a..20ef6a1103 100644 --- a/base/src/org/compiere/model/I_AD_Task_Access.java +++ b/base/src/org/compiere/model/I_AD_Task_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Task_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Task_Access { diff --git a/base/src/org/compiere/model/I_AD_Tree.java b/base/src/org/compiere/model/I_AD_Tree.java index 13cd87013c..e7767f9719 100644 --- a/base/src/org/compiere/model/I_AD_Tree.java +++ b/base/src/org/compiere/model/I_AD_Tree.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Tree * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Tree { diff --git a/base/src/org/compiere/model/I_AD_TreeBar.java b/base/src/org/compiere/model/I_AD_TreeBar.java index b8e5a5558f..a8fb472c9d 100644 --- a/base/src/org/compiere/model/I_AD_TreeBar.java +++ b/base/src/org/compiere/model/I_AD_TreeBar.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeBar * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeBar { diff --git a/base/src/org/compiere/model/I_AD_TreeNode.java b/base/src/org/compiere/model/I_AD_TreeNode.java index 87875b7af9..edcd474555 100644 --- a/base/src/org/compiere/model/I_AD_TreeNode.java +++ b/base/src/org/compiere/model/I_AD_TreeNode.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNode * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNode { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeBP.java b/base/src/org/compiere/model/I_AD_TreeNodeBP.java index 90d31f5873..eb2ad83fa0 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeBP.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeBP.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeBP * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeBP { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeCMC.java b/base/src/org/compiere/model/I_AD_TreeNodeCMC.java index 7f1d03c914..03d28d7005 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeCMC.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeCMC.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeCMC * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeCMC { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeCMM.java b/base/src/org/compiere/model/I_AD_TreeNodeCMM.java index 452d3502cb..a4430bfaee 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeCMM.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeCMM.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeCMM * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeCMM { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeCMS.java b/base/src/org/compiere/model/I_AD_TreeNodeCMS.java index 3743b34f9f..9cf9975f1c 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeCMS.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeCMS.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeCMS * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeCMS { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeCMT.java b/base/src/org/compiere/model/I_AD_TreeNodeCMT.java index 717c54fa95..8e5678855c 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeCMT.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeCMT.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeCMT * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeCMT { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeMM.java b/base/src/org/compiere/model/I_AD_TreeNodeMM.java index aef653c5e6..8e01587dcd 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeMM.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeMM.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeMM * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeMM { diff --git a/base/src/org/compiere/model/I_AD_TreeNodePR.java b/base/src/org/compiere/model/I_AD_TreeNodePR.java index 0a28427c8f..0630ede2f5 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodePR.java +++ b/base/src/org/compiere/model/I_AD_TreeNodePR.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodePR * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodePR { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeU1.java b/base/src/org/compiere/model/I_AD_TreeNodeU1.java index 5f7f2ea136..7c31649277 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeU1.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeU1.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeU1 * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeU1 { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeU2.java b/base/src/org/compiere/model/I_AD_TreeNodeU2.java index c341ed6423..5875d1dd1d 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeU2.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeU2.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeU2 * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeU2 { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeU3.java b/base/src/org/compiere/model/I_AD_TreeNodeU3.java index de7ce49542..944710cb18 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeU3.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeU3.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeU3 * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeU3 { diff --git a/base/src/org/compiere/model/I_AD_TreeNodeU4.java b/base/src/org/compiere/model/I_AD_TreeNodeU4.java index 2fc533fbd3..1438a59b59 100644 --- a/base/src/org/compiere/model/I_AD_TreeNodeU4.java +++ b/base/src/org/compiere/model/I_AD_TreeNodeU4.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_TreeNodeU4 * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_TreeNodeU4 { diff --git a/base/src/org/compiere/model/I_AD_User.java b/base/src/org/compiere/model/I_AD_User.java index 7bc634587e..0a842f4e35 100644 --- a/base/src/org/compiere/model/I_AD_User.java +++ b/base/src/org/compiere/model/I_AD_User.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_User * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_User { diff --git a/base/src/org/compiere/model/I_AD_UserBPAccess.java b/base/src/org/compiere/model/I_AD_UserBPAccess.java index 0fd806fcf6..3ad91f6f12 100644 --- a/base/src/org/compiere/model/I_AD_UserBPAccess.java +++ b/base/src/org/compiere/model/I_AD_UserBPAccess.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_UserBPAccess * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_UserBPAccess { diff --git a/base/src/org/compiere/model/I_AD_UserDef_Field.java b/base/src/org/compiere/model/I_AD_UserDef_Field.java index aebdd65ce2..72688a2d42 100644 --- a/base/src/org/compiere/model/I_AD_UserDef_Field.java +++ b/base/src/org/compiere/model/I_AD_UserDef_Field.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_UserDef_Field * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_UserDef_Field { diff --git a/base/src/org/compiere/model/I_AD_UserDef_Tab.java b/base/src/org/compiere/model/I_AD_UserDef_Tab.java index cbaf692ba4..5f7674870a 100644 --- a/base/src/org/compiere/model/I_AD_UserDef_Tab.java +++ b/base/src/org/compiere/model/I_AD_UserDef_Tab.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_UserDef_Tab * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_UserDef_Tab { diff --git a/base/src/org/compiere/model/I_AD_UserDef_Win.java b/base/src/org/compiere/model/I_AD_UserDef_Win.java index 63d2c48523..e80f649c36 100644 --- a/base/src/org/compiere/model/I_AD_UserDef_Win.java +++ b/base/src/org/compiere/model/I_AD_UserDef_Win.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_UserDef_Win * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_UserDef_Win { diff --git a/base/src/org/compiere/model/I_AD_UserMail.java b/base/src/org/compiere/model/I_AD_UserMail.java index fa3119e69b..2e9d2654fd 100644 --- a/base/src/org/compiere/model/I_AD_UserMail.java +++ b/base/src/org/compiere/model/I_AD_UserMail.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_UserMail * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_UserMail { diff --git a/base/src/org/compiere/model/I_AD_UserQuery.java b/base/src/org/compiere/model/I_AD_UserQuery.java index a294116b2c..56ab112627 100644 --- a/base/src/org/compiere/model/I_AD_UserQuery.java +++ b/base/src/org/compiere/model/I_AD_UserQuery.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_UserQuery * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_UserQuery { diff --git a/base/src/org/compiere/model/I_AD_User_OrgAccess.java b/base/src/org/compiere/model/I_AD_User_OrgAccess.java index 8df7b8b79b..9d510a83bd 100644 --- a/base/src/org/compiere/model/I_AD_User_OrgAccess.java +++ b/base/src/org/compiere/model/I_AD_User_OrgAccess.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_User_OrgAccess * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_User_OrgAccess { diff --git a/base/src/org/compiere/model/I_AD_User_Roles.java b/base/src/org/compiere/model/I_AD_User_Roles.java index 94e9994ced..0fab9bf4fa 100644 --- a/base/src/org/compiere/model/I_AD_User_Roles.java +++ b/base/src/org/compiere/model/I_AD_User_Roles.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_User_Roles * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_User_Roles { diff --git a/base/src/org/compiere/model/I_AD_User_Substitute.java b/base/src/org/compiere/model/I_AD_User_Substitute.java index 64d662a793..876dc2d4b4 100644 --- a/base/src/org/compiere/model/I_AD_User_Substitute.java +++ b/base/src/org/compiere/model/I_AD_User_Substitute.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_User_Substitute * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_User_Substitute { diff --git a/base/src/org/compiere/model/I_AD_Val_Rule.java b/base/src/org/compiere/model/I_AD_Val_Rule.java index 48ee32c4be..0461857314 100644 --- a/base/src/org/compiere/model/I_AD_Val_Rule.java +++ b/base/src/org/compiere/model/I_AD_Val_Rule.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Val_Rule * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Val_Rule { diff --git a/base/src/org/compiere/model/I_AD_WF_Activity.java b/base/src/org/compiere/model/I_AD_WF_Activity.java index 6becce7866..0a48e04807 100644 --- a/base/src/org/compiere/model/I_AD_WF_Activity.java +++ b/base/src/org/compiere/model/I_AD_WF_Activity.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_Activity * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_Activity { diff --git a/base/src/org/compiere/model/I_AD_WF_ActivityResult.java b/base/src/org/compiere/model/I_AD_WF_ActivityResult.java index 9ec41a24cb..05c41a63fd 100644 --- a/base/src/org/compiere/model/I_AD_WF_ActivityResult.java +++ b/base/src/org/compiere/model/I_AD_WF_ActivityResult.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_ActivityResult * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_ActivityResult { diff --git a/base/src/org/compiere/model/I_AD_WF_Block.java b/base/src/org/compiere/model/I_AD_WF_Block.java index 8c74e2a78f..8d378e377e 100644 --- a/base/src/org/compiere/model/I_AD_WF_Block.java +++ b/base/src/org/compiere/model/I_AD_WF_Block.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_Block * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_Block { diff --git a/base/src/org/compiere/model/I_AD_WF_EventAudit.java b/base/src/org/compiere/model/I_AD_WF_EventAudit.java index 50306b572f..4c6b048216 100644 --- a/base/src/org/compiere/model/I_AD_WF_EventAudit.java +++ b/base/src/org/compiere/model/I_AD_WF_EventAudit.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_EventAudit * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_EventAudit { diff --git a/base/src/org/compiere/model/I_AD_WF_NextCondition.java b/base/src/org/compiere/model/I_AD_WF_NextCondition.java index dad7ffcabb..e4e18e8dd8 100644 --- a/base/src/org/compiere/model/I_AD_WF_NextCondition.java +++ b/base/src/org/compiere/model/I_AD_WF_NextCondition.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_NextCondition * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_NextCondition { diff --git a/base/src/org/compiere/model/I_AD_WF_NodeNext.java b/base/src/org/compiere/model/I_AD_WF_NodeNext.java index 81ed01247c..ff200cfa83 100644 --- a/base/src/org/compiere/model/I_AD_WF_NodeNext.java +++ b/base/src/org/compiere/model/I_AD_WF_NodeNext.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_NodeNext * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_NodeNext { diff --git a/base/src/org/compiere/model/I_AD_WF_Node_Para.java b/base/src/org/compiere/model/I_AD_WF_Node_Para.java index 4db0c9c5fa..e027086040 100644 --- a/base/src/org/compiere/model/I_AD_WF_Node_Para.java +++ b/base/src/org/compiere/model/I_AD_WF_Node_Para.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_Node_Para * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_Node_Para { diff --git a/base/src/org/compiere/model/I_AD_WF_Process.java b/base/src/org/compiere/model/I_AD_WF_Process.java index a151a1327d..0af5ecc26d 100644 --- a/base/src/org/compiere/model/I_AD_WF_Process.java +++ b/base/src/org/compiere/model/I_AD_WF_Process.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_Process * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_Process { diff --git a/base/src/org/compiere/model/I_AD_WF_ProcessData.java b/base/src/org/compiere/model/I_AD_WF_ProcessData.java index 41d17c7ef0..982f4dcfaf 100644 --- a/base/src/org/compiere/model/I_AD_WF_ProcessData.java +++ b/base/src/org/compiere/model/I_AD_WF_ProcessData.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_ProcessData * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_ProcessData { diff --git a/base/src/org/compiere/model/I_AD_WF_Responsible.java b/base/src/org/compiere/model/I_AD_WF_Responsible.java index 49a2630b0d..c19bfefb81 100644 --- a/base/src/org/compiere/model/I_AD_WF_Responsible.java +++ b/base/src/org/compiere/model/I_AD_WF_Responsible.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WF_Responsible * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WF_Responsible { diff --git a/base/src/org/compiere/model/I_AD_Window.java b/base/src/org/compiere/model/I_AD_Window.java index 00b76e0e3e..acfef3e122 100644 --- a/base/src/org/compiere/model/I_AD_Window.java +++ b/base/src/org/compiere/model/I_AD_Window.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Window * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Window { diff --git a/base/src/org/compiere/model/I_AD_Window_Access.java b/base/src/org/compiere/model/I_AD_Window_Access.java index f0a2119458..ba6138b9f9 100644 --- a/base/src/org/compiere/model/I_AD_Window_Access.java +++ b/base/src/org/compiere/model/I_AD_Window_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Window_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Window_Access { diff --git a/base/src/org/compiere/model/I_AD_Workbench.java b/base/src/org/compiere/model/I_AD_Workbench.java index 900b6bf2ca..ffccf11322 100644 --- a/base/src/org/compiere/model/I_AD_Workbench.java +++ b/base/src/org/compiere/model/I_AD_Workbench.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Workbench * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Workbench { diff --git a/base/src/org/compiere/model/I_AD_WorkbenchWindow.java b/base/src/org/compiere/model/I_AD_WorkbenchWindow.java index 0536f256fe..368fbf9d74 100644 --- a/base/src/org/compiere/model/I_AD_WorkbenchWindow.java +++ b/base/src/org/compiere/model/I_AD_WorkbenchWindow.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WorkbenchWindow * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WorkbenchWindow { diff --git a/base/src/org/compiere/model/I_AD_WorkflowProcessor.java b/base/src/org/compiere/model/I_AD_WorkflowProcessor.java index 3c55e279fa..fa7ce30d12 100644 --- a/base/src/org/compiere/model/I_AD_WorkflowProcessor.java +++ b/base/src/org/compiere/model/I_AD_WorkflowProcessor.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WorkflowProcessor * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WorkflowProcessor { diff --git a/base/src/org/compiere/model/I_AD_WorkflowProcessorLog.java b/base/src/org/compiere/model/I_AD_WorkflowProcessorLog.java index 5ebb4a3f4e..a5b134415b 100644 --- a/base/src/org/compiere/model/I_AD_WorkflowProcessorLog.java +++ b/base/src/org/compiere/model/I_AD_WorkflowProcessorLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_WorkflowProcessorLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_WorkflowProcessorLog { diff --git a/base/src/org/compiere/model/I_AD_Workflow_Access.java b/base/src/org/compiere/model/I_AD_Workflow_Access.java index 2f3af5036e..c1ee353b8d 100644 --- a/base/src/org/compiere/model/I_AD_Workflow_Access.java +++ b/base/src/org/compiere/model/I_AD_Workflow_Access.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for AD_Workflow_Access * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_AD_Workflow_Access { diff --git a/base/src/org/compiere/model/I_ASP_ClientException.java b/base/src/org/compiere/model/I_ASP_ClientException.java index 3bda0f230b..04f03aac29 100644 --- a/base/src/org/compiere/model/I_ASP_ClientException.java +++ b/base/src/org/compiere/model/I_ASP_ClientException.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_ClientException * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_ClientException { diff --git a/base/src/org/compiere/model/I_ASP_ClientLevel.java b/base/src/org/compiere/model/I_ASP_ClientLevel.java index 6d7db24837..81989875a1 100644 --- a/base/src/org/compiere/model/I_ASP_ClientLevel.java +++ b/base/src/org/compiere/model/I_ASP_ClientLevel.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_ClientLevel * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_ClientLevel { diff --git a/base/src/org/compiere/model/I_ASP_Field.java b/base/src/org/compiere/model/I_ASP_Field.java index f690717cab..f704eae288 100644 --- a/base/src/org/compiere/model/I_ASP_Field.java +++ b/base/src/org/compiere/model/I_ASP_Field.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Field * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Field { diff --git a/base/src/org/compiere/model/I_ASP_Form.java b/base/src/org/compiere/model/I_ASP_Form.java index 934d020837..bc05543d66 100644 --- a/base/src/org/compiere/model/I_ASP_Form.java +++ b/base/src/org/compiere/model/I_ASP_Form.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Form * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Form { diff --git a/base/src/org/compiere/model/I_ASP_Level.java b/base/src/org/compiere/model/I_ASP_Level.java index 29567730ad..f892f93f4e 100644 --- a/base/src/org/compiere/model/I_ASP_Level.java +++ b/base/src/org/compiere/model/I_ASP_Level.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Level * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Level { diff --git a/base/src/org/compiere/model/I_ASP_Module.java b/base/src/org/compiere/model/I_ASP_Module.java index c44bf64aa1..c02110539f 100644 --- a/base/src/org/compiere/model/I_ASP_Module.java +++ b/base/src/org/compiere/model/I_ASP_Module.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Module * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Module { diff --git a/base/src/org/compiere/model/I_ASP_Process.java b/base/src/org/compiere/model/I_ASP_Process.java index ae9ab7ab83..15d6d99b4c 100644 --- a/base/src/org/compiere/model/I_ASP_Process.java +++ b/base/src/org/compiere/model/I_ASP_Process.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Process * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Process { diff --git a/base/src/org/compiere/model/I_ASP_Process_Para.java b/base/src/org/compiere/model/I_ASP_Process_Para.java index 748a4ffa4a..bda5d560e5 100644 --- a/base/src/org/compiere/model/I_ASP_Process_Para.java +++ b/base/src/org/compiere/model/I_ASP_Process_Para.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Process_Para * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Process_Para { diff --git a/base/src/org/compiere/model/I_ASP_Tab.java b/base/src/org/compiere/model/I_ASP_Tab.java index c9cd0aee74..ac80a6b215 100644 --- a/base/src/org/compiere/model/I_ASP_Tab.java +++ b/base/src/org/compiere/model/I_ASP_Tab.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Tab * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Tab { diff --git a/base/src/org/compiere/model/I_ASP_Task.java b/base/src/org/compiere/model/I_ASP_Task.java index 906b2440d4..880385324e 100644 --- a/base/src/org/compiere/model/I_ASP_Task.java +++ b/base/src/org/compiere/model/I_ASP_Task.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Task * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Task { diff --git a/base/src/org/compiere/model/I_ASP_Window.java b/base/src/org/compiere/model/I_ASP_Window.java index ca3a4d9a50..2983e0e96e 100644 --- a/base/src/org/compiere/model/I_ASP_Window.java +++ b/base/src/org/compiere/model/I_ASP_Window.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Window * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Window { diff --git a/base/src/org/compiere/model/I_ASP_Workflow.java b/base/src/org/compiere/model/I_ASP_Workflow.java index bf31fa1ea0..f3db568946 100644 --- a/base/src/org/compiere/model/I_ASP_Workflow.java +++ b/base/src/org/compiere/model/I_ASP_Workflow.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for ASP_Workflow * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_ASP_Workflow { diff --git a/base/src/org/compiere/model/I_A_Asset.java b/base/src/org/compiere/model/I_A_Asset.java index 1ac36d4b93..8a9736bb8c 100644 --- a/base/src/org/compiere/model/I_A_Asset.java +++ b/base/src/org/compiere/model/I_A_Asset.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for A_Asset * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_A_Asset { diff --git a/base/src/org/compiere/model/I_A_Asset_Delivery.java b/base/src/org/compiere/model/I_A_Asset_Delivery.java index 322b5ea6f2..662ee2d5bd 100644 --- a/base/src/org/compiere/model/I_A_Asset_Delivery.java +++ b/base/src/org/compiere/model/I_A_Asset_Delivery.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for A_Asset_Delivery * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_A_Asset_Delivery { diff --git a/base/src/org/compiere/model/I_A_Asset_Group.java b/base/src/org/compiere/model/I_A_Asset_Group.java index 0c2e68c309..16c0f2f669 100644 --- a/base/src/org/compiere/model/I_A_Asset_Group.java +++ b/base/src/org/compiere/model/I_A_Asset_Group.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for A_Asset_Group * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_A_Asset_Group { diff --git a/base/src/org/compiere/model/I_A_Asset_Retirement.java b/base/src/org/compiere/model/I_A_Asset_Retirement.java index 69c7dde54f..93543b0dc7 100644 --- a/base/src/org/compiere/model/I_A_Asset_Retirement.java +++ b/base/src/org/compiere/model/I_A_Asset_Retirement.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for A_Asset_Retirement * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_A_Asset_Retirement { diff --git a/base/src/org/compiere/model/I_A_Registration.java b/base/src/org/compiere/model/I_A_Registration.java index 7444f31043..f405dc5843 100644 --- a/base/src/org/compiere/model/I_A_Registration.java +++ b/base/src/org/compiere/model/I_A_Registration.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for A_Registration * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_A_Registration { diff --git a/base/src/org/compiere/model/I_A_RegistrationAttribute.java b/base/src/org/compiere/model/I_A_RegistrationAttribute.java index 2ff1b3fe3f..6f0d4a0ffd 100644 --- a/base/src/org/compiere/model/I_A_RegistrationAttribute.java +++ b/base/src/org/compiere/model/I_A_RegistrationAttribute.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for A_RegistrationAttribute * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_A_RegistrationAttribute { diff --git a/base/src/org/compiere/model/I_A_RegistrationProduct.java b/base/src/org/compiere/model/I_A_RegistrationProduct.java index c617bc782a..48d2e6f2fa 100644 --- a/base/src/org/compiere/model/I_A_RegistrationProduct.java +++ b/base/src/org/compiere/model/I_A_RegistrationProduct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for A_RegistrationProduct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_A_RegistrationProduct { diff --git a/base/src/org/compiere/model/I_A_RegistrationValue.java b/base/src/org/compiere/model/I_A_RegistrationValue.java index e63811a979..eba0d61cdc 100644 --- a/base/src/org/compiere/model/I_A_RegistrationValue.java +++ b/base/src/org/compiere/model/I_A_RegistrationValue.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for A_RegistrationValue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_A_RegistrationValue { diff --git a/base/src/org/compiere/model/I_B_Bid.java b/base/src/org/compiere/model/I_B_Bid.java index b11714023a..c75b2af7cc 100644 --- a/base/src/org/compiere/model/I_B_Bid.java +++ b/base/src/org/compiere/model/I_B_Bid.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_Bid * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_Bid { diff --git a/base/src/org/compiere/model/I_B_BidComment.java b/base/src/org/compiere/model/I_B_BidComment.java index 604614c1ce..0e7a578c0f 100644 --- a/base/src/org/compiere/model/I_B_BidComment.java +++ b/base/src/org/compiere/model/I_B_BidComment.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_BidComment * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_BidComment { diff --git a/base/src/org/compiere/model/I_B_Buyer.java b/base/src/org/compiere/model/I_B_Buyer.java index 5af7a8d387..dc37531e58 100644 --- a/base/src/org/compiere/model/I_B_Buyer.java +++ b/base/src/org/compiere/model/I_B_Buyer.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_Buyer * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_Buyer { diff --git a/base/src/org/compiere/model/I_B_BuyerFunds.java b/base/src/org/compiere/model/I_B_BuyerFunds.java index 741800893d..202231aa5b 100644 --- a/base/src/org/compiere/model/I_B_BuyerFunds.java +++ b/base/src/org/compiere/model/I_B_BuyerFunds.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_BuyerFunds * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_BuyerFunds { diff --git a/base/src/org/compiere/model/I_B_Offer.java b/base/src/org/compiere/model/I_B_Offer.java index 79bcd08057..14d773b566 100644 --- a/base/src/org/compiere/model/I_B_Offer.java +++ b/base/src/org/compiere/model/I_B_Offer.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_Offer * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_Offer { diff --git a/base/src/org/compiere/model/I_B_Seller.java b/base/src/org/compiere/model/I_B_Seller.java index ba2281af82..7364bd65c5 100644 --- a/base/src/org/compiere/model/I_B_Seller.java +++ b/base/src/org/compiere/model/I_B_Seller.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_Seller * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_Seller { diff --git a/base/src/org/compiere/model/I_B_SellerFunds.java b/base/src/org/compiere/model/I_B_SellerFunds.java index 67212b81f0..cbd0923995 100644 --- a/base/src/org/compiere/model/I_B_SellerFunds.java +++ b/base/src/org/compiere/model/I_B_SellerFunds.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_SellerFunds * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_SellerFunds { diff --git a/base/src/org/compiere/model/I_B_Topic.java b/base/src/org/compiere/model/I_B_Topic.java index 98b130f16d..0a6341168b 100644 --- a/base/src/org/compiere/model/I_B_Topic.java +++ b/base/src/org/compiere/model/I_B_Topic.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_Topic * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_Topic { diff --git a/base/src/org/compiere/model/I_B_TopicCategory.java b/base/src/org/compiere/model/I_B_TopicCategory.java index 45fe891590..b5ba4e9df2 100644 --- a/base/src/org/compiere/model/I_B_TopicCategory.java +++ b/base/src/org/compiere/model/I_B_TopicCategory.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_TopicCategory * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_TopicCategory { diff --git a/base/src/org/compiere/model/I_B_TopicType.java b/base/src/org/compiere/model/I_B_TopicType.java index 02f84084d2..1b933182d8 100644 --- a/base/src/org/compiere/model/I_B_TopicType.java +++ b/base/src/org/compiere/model/I_B_TopicType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for B_TopicType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_B_TopicType { diff --git a/base/src/org/compiere/model/I_CM_AccessContainer.java b/base/src/org/compiere/model/I_CM_AccessContainer.java index a9ab17393e..8d33eb0486 100644 --- a/base/src/org/compiere/model/I_CM_AccessContainer.java +++ b/base/src/org/compiere/model/I_CM_AccessContainer.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_AccessContainer * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_AccessContainer { diff --git a/base/src/org/compiere/model/I_CM_AccessListBPGroup.java b/base/src/org/compiere/model/I_CM_AccessListBPGroup.java index 78f6ee81fa..e18fa829f9 100644 --- a/base/src/org/compiere/model/I_CM_AccessListBPGroup.java +++ b/base/src/org/compiere/model/I_CM_AccessListBPGroup.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_AccessListBPGroup * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_AccessListBPGroup { diff --git a/base/src/org/compiere/model/I_CM_AccessListRole.java b/base/src/org/compiere/model/I_CM_AccessListRole.java index 571bfcd9b0..6e0ecf0028 100644 --- a/base/src/org/compiere/model/I_CM_AccessListRole.java +++ b/base/src/org/compiere/model/I_CM_AccessListRole.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_AccessListRole * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_AccessListRole { diff --git a/base/src/org/compiere/model/I_CM_AccessMedia.java b/base/src/org/compiere/model/I_CM_AccessMedia.java index ce108016cb..658d8f8885 100644 --- a/base/src/org/compiere/model/I_CM_AccessMedia.java +++ b/base/src/org/compiere/model/I_CM_AccessMedia.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_AccessMedia * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_AccessMedia { diff --git a/base/src/org/compiere/model/I_CM_AccessNewsChannel.java b/base/src/org/compiere/model/I_CM_AccessNewsChannel.java index 25acb9c55e..aa63f3c24e 100644 --- a/base/src/org/compiere/model/I_CM_AccessNewsChannel.java +++ b/base/src/org/compiere/model/I_CM_AccessNewsChannel.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_AccessNewsChannel * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_AccessNewsChannel { diff --git a/base/src/org/compiere/model/I_CM_AccessProfile.java b/base/src/org/compiere/model/I_CM_AccessProfile.java index 0fecf86a08..1314a1261f 100644 --- a/base/src/org/compiere/model/I_CM_AccessProfile.java +++ b/base/src/org/compiere/model/I_CM_AccessProfile.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_AccessProfile * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_AccessProfile { diff --git a/base/src/org/compiere/model/I_CM_AccessStage.java b/base/src/org/compiere/model/I_CM_AccessStage.java index 4331f81295..6880c7439b 100644 --- a/base/src/org/compiere/model/I_CM_AccessStage.java +++ b/base/src/org/compiere/model/I_CM_AccessStage.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_AccessStage * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_AccessStage { diff --git a/base/src/org/compiere/model/I_CM_Ad.java b/base/src/org/compiere/model/I_CM_Ad.java index bf40caa8a8..2d41649606 100644 --- a/base/src/org/compiere/model/I_CM_Ad.java +++ b/base/src/org/compiere/model/I_CM_Ad.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Ad * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Ad { diff --git a/base/src/org/compiere/model/I_CM_Ad_Cat.java b/base/src/org/compiere/model/I_CM_Ad_Cat.java index 06c1f82289..93a6ac10bd 100644 --- a/base/src/org/compiere/model/I_CM_Ad_Cat.java +++ b/base/src/org/compiere/model/I_CM_Ad_Cat.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Ad_Cat * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Ad_Cat { diff --git a/base/src/org/compiere/model/I_CM_BroadcastServer.java b/base/src/org/compiere/model/I_CM_BroadcastServer.java index 79b6758621..c061c2a7c3 100644 --- a/base/src/org/compiere/model/I_CM_BroadcastServer.java +++ b/base/src/org/compiere/model/I_CM_BroadcastServer.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_BroadcastServer * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_BroadcastServer { diff --git a/base/src/org/compiere/model/I_CM_CStage.java b/base/src/org/compiere/model/I_CM_CStage.java index f7e89e3e39..099703f92b 100644 --- a/base/src/org/compiere/model/I_CM_CStage.java +++ b/base/src/org/compiere/model/I_CM_CStage.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_CStage * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_CStage { diff --git a/base/src/org/compiere/model/I_CM_CStageTTable.java b/base/src/org/compiere/model/I_CM_CStageTTable.java index 2006867602..03c65f917c 100644 --- a/base/src/org/compiere/model/I_CM_CStageTTable.java +++ b/base/src/org/compiere/model/I_CM_CStageTTable.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_CStageTTable * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_CStageTTable { diff --git a/base/src/org/compiere/model/I_CM_CStage_Element.java b/base/src/org/compiere/model/I_CM_CStage_Element.java index 85fe7fc6e6..c32dc3947a 100644 --- a/base/src/org/compiere/model/I_CM_CStage_Element.java +++ b/base/src/org/compiere/model/I_CM_CStage_Element.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_CStage_Element * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_CStage_Element { diff --git a/base/src/org/compiere/model/I_CM_Chat.java b/base/src/org/compiere/model/I_CM_Chat.java index 2ce496b5a6..401e50b959 100644 --- a/base/src/org/compiere/model/I_CM_Chat.java +++ b/base/src/org/compiere/model/I_CM_Chat.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Chat * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Chat { diff --git a/base/src/org/compiere/model/I_CM_ChatEntry.java b/base/src/org/compiere/model/I_CM_ChatEntry.java index 16d6296778..57585ef223 100644 --- a/base/src/org/compiere/model/I_CM_ChatEntry.java +++ b/base/src/org/compiere/model/I_CM_ChatEntry.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_ChatEntry * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_ChatEntry { diff --git a/base/src/org/compiere/model/I_CM_ChatType.java b/base/src/org/compiere/model/I_CM_ChatType.java index 0060aaa027..b3334a9378 100644 --- a/base/src/org/compiere/model/I_CM_ChatType.java +++ b/base/src/org/compiere/model/I_CM_ChatType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_ChatType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_ChatType { diff --git a/base/src/org/compiere/model/I_CM_ChatTypeUpdate.java b/base/src/org/compiere/model/I_CM_ChatTypeUpdate.java index efff883c7d..0ad2be2d45 100644 --- a/base/src/org/compiere/model/I_CM_ChatTypeUpdate.java +++ b/base/src/org/compiere/model/I_CM_ChatTypeUpdate.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_ChatTypeUpdate * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_ChatTypeUpdate { diff --git a/base/src/org/compiere/model/I_CM_ChatUpdate.java b/base/src/org/compiere/model/I_CM_ChatUpdate.java index b2e9c504b6..ea5a662d14 100644 --- a/base/src/org/compiere/model/I_CM_ChatUpdate.java +++ b/base/src/org/compiere/model/I_CM_ChatUpdate.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_ChatUpdate * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_ChatUpdate { diff --git a/base/src/org/compiere/model/I_CM_Container.java b/base/src/org/compiere/model/I_CM_Container.java index 81de076d88..ff588cd9d3 100644 --- a/base/src/org/compiere/model/I_CM_Container.java +++ b/base/src/org/compiere/model/I_CM_Container.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Container * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Container { diff --git a/base/src/org/compiere/model/I_CM_ContainerTTable.java b/base/src/org/compiere/model/I_CM_ContainerTTable.java index df9cb18365..33b64560bf 100644 --- a/base/src/org/compiere/model/I_CM_ContainerTTable.java +++ b/base/src/org/compiere/model/I_CM_ContainerTTable.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_ContainerTTable * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_ContainerTTable { diff --git a/base/src/org/compiere/model/I_CM_Container_Element.java b/base/src/org/compiere/model/I_CM_Container_Element.java index 3a8e44e6c7..f9a8b1c26c 100644 --- a/base/src/org/compiere/model/I_CM_Container_Element.java +++ b/base/src/org/compiere/model/I_CM_Container_Element.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Container_Element * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Container_Element { diff --git a/base/src/org/compiere/model/I_CM_Container_URL.java b/base/src/org/compiere/model/I_CM_Container_URL.java index b54aeb3662..c82d7c7e2e 100644 --- a/base/src/org/compiere/model/I_CM_Container_URL.java +++ b/base/src/org/compiere/model/I_CM_Container_URL.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Container_URL * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Container_URL { diff --git a/base/src/org/compiere/model/I_CM_Media.java b/base/src/org/compiere/model/I_CM_Media.java index 7b108b95c2..13c26d4b05 100644 --- a/base/src/org/compiere/model/I_CM_Media.java +++ b/base/src/org/compiere/model/I_CM_Media.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Media * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Media { diff --git a/base/src/org/compiere/model/I_CM_MediaDeploy.java b/base/src/org/compiere/model/I_CM_MediaDeploy.java index c2d0ea332c..4cc17e5130 100644 --- a/base/src/org/compiere/model/I_CM_MediaDeploy.java +++ b/base/src/org/compiere/model/I_CM_MediaDeploy.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_MediaDeploy * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_MediaDeploy { diff --git a/base/src/org/compiere/model/I_CM_Media_Server.java b/base/src/org/compiere/model/I_CM_Media_Server.java index 800b66b1a9..70ffe15d08 100644 --- a/base/src/org/compiere/model/I_CM_Media_Server.java +++ b/base/src/org/compiere/model/I_CM_Media_Server.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Media_Server * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Media_Server { diff --git a/base/src/org/compiere/model/I_CM_NewsChannel.java b/base/src/org/compiere/model/I_CM_NewsChannel.java index 128e8253b5..bf278b1a9c 100644 --- a/base/src/org/compiere/model/I_CM_NewsChannel.java +++ b/base/src/org/compiere/model/I_CM_NewsChannel.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_NewsChannel * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_NewsChannel { diff --git a/base/src/org/compiere/model/I_CM_NewsItem.java b/base/src/org/compiere/model/I_CM_NewsItem.java index da91089006..713ca1e525 100644 --- a/base/src/org/compiere/model/I_CM_NewsItem.java +++ b/base/src/org/compiere/model/I_CM_NewsItem.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_NewsItem * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_NewsItem { diff --git a/base/src/org/compiere/model/I_CM_Template.java b/base/src/org/compiere/model/I_CM_Template.java index b2f0332147..2aabe0ddeb 100644 --- a/base/src/org/compiere/model/I_CM_Template.java +++ b/base/src/org/compiere/model/I_CM_Template.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Template * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Template { diff --git a/base/src/org/compiere/model/I_CM_TemplateTable.java b/base/src/org/compiere/model/I_CM_TemplateTable.java index 23f33ea183..1f5bfc2447 100644 --- a/base/src/org/compiere/model/I_CM_TemplateTable.java +++ b/base/src/org/compiere/model/I_CM_TemplateTable.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_TemplateTable * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_TemplateTable { diff --git a/base/src/org/compiere/model/I_CM_Template_Ad_Cat.java b/base/src/org/compiere/model/I_CM_Template_Ad_Cat.java index 632c6ccd05..636e5b9a3d 100644 --- a/base/src/org/compiere/model/I_CM_Template_Ad_Cat.java +++ b/base/src/org/compiere/model/I_CM_Template_Ad_Cat.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_Template_Ad_Cat * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_Template_Ad_Cat { diff --git a/base/src/org/compiere/model/I_CM_WebAccessLog.java b/base/src/org/compiere/model/I_CM_WebAccessLog.java index 13bee911ac..ec2e65d9a5 100644 --- a/base/src/org/compiere/model/I_CM_WebAccessLog.java +++ b/base/src/org/compiere/model/I_CM_WebAccessLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_WebAccessLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_WebAccessLog { diff --git a/base/src/org/compiere/model/I_CM_WebProject.java b/base/src/org/compiere/model/I_CM_WebProject.java index 773f77819a..783e0b7ff4 100644 --- a/base/src/org/compiere/model/I_CM_WebProject.java +++ b/base/src/org/compiere/model/I_CM_WebProject.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_WebProject * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_WebProject { diff --git a/base/src/org/compiere/model/I_CM_WebProject_Domain.java b/base/src/org/compiere/model/I_CM_WebProject_Domain.java index 3d9bd6c217..67182ac2b2 100644 --- a/base/src/org/compiere/model/I_CM_WebProject_Domain.java +++ b/base/src/org/compiere/model/I_CM_WebProject_Domain.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_WebProject_Domain * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_WebProject_Domain { diff --git a/base/src/org/compiere/model/I_CM_WikiToken.java b/base/src/org/compiere/model/I_CM_WikiToken.java index c38e89bf73..a769fe3fd3 100644 --- a/base/src/org/compiere/model/I_CM_WikiToken.java +++ b/base/src/org/compiere/model/I_CM_WikiToken.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for CM_WikiToken * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_CM_WikiToken { diff --git a/base/src/org/compiere/model/I_C_AcctProcessor.java b/base/src/org/compiere/model/I_C_AcctProcessor.java index ee5e7606f1..84b36af965 100644 --- a/base/src/org/compiere/model/I_C_AcctProcessor.java +++ b/base/src/org/compiere/model/I_C_AcctProcessor.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_AcctProcessor * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_AcctProcessor { diff --git a/base/src/org/compiere/model/I_C_AcctProcessorLog.java b/base/src/org/compiere/model/I_C_AcctProcessorLog.java index 76171df394..455498b167 100644 --- a/base/src/org/compiere/model/I_C_AcctProcessorLog.java +++ b/base/src/org/compiere/model/I_C_AcctProcessorLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_AcctProcessorLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_AcctProcessorLog { diff --git a/base/src/org/compiere/model/I_C_AcctSchema.java b/base/src/org/compiere/model/I_C_AcctSchema.java index 98bf2dcc61..dd559a46b1 100644 --- a/base/src/org/compiere/model/I_C_AcctSchema.java +++ b/base/src/org/compiere/model/I_C_AcctSchema.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_AcctSchema * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_AcctSchema { diff --git a/base/src/org/compiere/model/I_C_AcctSchema_Default.java b/base/src/org/compiere/model/I_C_AcctSchema_Default.java index 890dc8e7d5..cccba79f38 100644 --- a/base/src/org/compiere/model/I_C_AcctSchema_Default.java +++ b/base/src/org/compiere/model/I_C_AcctSchema_Default.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_AcctSchema_Default * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_AcctSchema_Default { diff --git a/base/src/org/compiere/model/I_C_AcctSchema_Element.java b/base/src/org/compiere/model/I_C_AcctSchema_Element.java index e1619e9194..e751c07639 100644 --- a/base/src/org/compiere/model/I_C_AcctSchema_Element.java +++ b/base/src/org/compiere/model/I_C_AcctSchema_Element.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_AcctSchema_Element * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_AcctSchema_Element { diff --git a/base/src/org/compiere/model/I_C_AcctSchema_GL.java b/base/src/org/compiere/model/I_C_AcctSchema_GL.java index 367e427d21..70a6875d8e 100644 --- a/base/src/org/compiere/model/I_C_AcctSchema_GL.java +++ b/base/src/org/compiere/model/I_C_AcctSchema_GL.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_AcctSchema_GL * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_AcctSchema_GL { diff --git a/base/src/org/compiere/model/I_C_Activity.java b/base/src/org/compiere/model/I_C_Activity.java index d3a249283d..0a3abe2f05 100644 --- a/base/src/org/compiere/model/I_C_Activity.java +++ b/base/src/org/compiere/model/I_C_Activity.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Activity * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Activity { diff --git a/base/src/org/compiere/model/I_C_AllocationHdr.java b/base/src/org/compiere/model/I_C_AllocationHdr.java index 49f806d672..a2785bb816 100644 --- a/base/src/org/compiere/model/I_C_AllocationHdr.java +++ b/base/src/org/compiere/model/I_C_AllocationHdr.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_AllocationHdr * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_AllocationHdr { diff --git a/base/src/org/compiere/model/I_C_AllocationLine.java b/base/src/org/compiere/model/I_C_AllocationLine.java index 6008e0392f..95b9765415 100644 --- a/base/src/org/compiere/model/I_C_AllocationLine.java +++ b/base/src/org/compiere/model/I_C_AllocationLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_AllocationLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_AllocationLine { diff --git a/base/src/org/compiere/model/I_C_BP_BankAccount.java b/base/src/org/compiere/model/I_C_BP_BankAccount.java index 10cca298dc..26efebad20 100644 --- a/base/src/org/compiere/model/I_C_BP_BankAccount.java +++ b/base/src/org/compiere/model/I_C_BP_BankAccount.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_BankAccount * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_BankAccount { diff --git a/base/src/org/compiere/model/I_C_BP_Customer_Acct.java b/base/src/org/compiere/model/I_C_BP_Customer_Acct.java index 4b7e623e78..846e46c644 100644 --- a/base/src/org/compiere/model/I_C_BP_Customer_Acct.java +++ b/base/src/org/compiere/model/I_C_BP_Customer_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_Customer_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_Customer_Acct { diff --git a/base/src/org/compiere/model/I_C_BP_EDI.java b/base/src/org/compiere/model/I_C_BP_EDI.java index b23e702849..b4695d0983 100644 --- a/base/src/org/compiere/model/I_C_BP_EDI.java +++ b/base/src/org/compiere/model/I_C_BP_EDI.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_EDI * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_EDI { diff --git a/base/src/org/compiere/model/I_C_BP_Employee_Acct.java b/base/src/org/compiere/model/I_C_BP_Employee_Acct.java index 49a3cf3240..387fcd273b 100644 --- a/base/src/org/compiere/model/I_C_BP_Employee_Acct.java +++ b/base/src/org/compiere/model/I_C_BP_Employee_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_Employee_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_Employee_Acct { diff --git a/base/src/org/compiere/model/I_C_BP_Group.java b/base/src/org/compiere/model/I_C_BP_Group.java index 25210c5e7b..7363c61cd3 100644 --- a/base/src/org/compiere/model/I_C_BP_Group.java +++ b/base/src/org/compiere/model/I_C_BP_Group.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_Group * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_Group { diff --git a/base/src/org/compiere/model/I_C_BP_Group_Acct.java b/base/src/org/compiere/model/I_C_BP_Group_Acct.java index a3830ba029..3b28cb8f1d 100644 --- a/base/src/org/compiere/model/I_C_BP_Group_Acct.java +++ b/base/src/org/compiere/model/I_C_BP_Group_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_Group_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_Group_Acct { diff --git a/base/src/org/compiere/model/I_C_BP_Relation.java b/base/src/org/compiere/model/I_C_BP_Relation.java index 1191f02a52..4bb70b4eb6 100644 --- a/base/src/org/compiere/model/I_C_BP_Relation.java +++ b/base/src/org/compiere/model/I_C_BP_Relation.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_Relation * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_Relation { diff --git a/base/src/org/compiere/model/I_C_BP_Vendor_Acct.java b/base/src/org/compiere/model/I_C_BP_Vendor_Acct.java index afb8176d47..460ac66b5d 100644 --- a/base/src/org/compiere/model/I_C_BP_Vendor_Acct.java +++ b/base/src/org/compiere/model/I_C_BP_Vendor_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_Vendor_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_Vendor_Acct { diff --git a/base/src/org/compiere/model/I_C_BP_Withholding.java b/base/src/org/compiere/model/I_C_BP_Withholding.java index ef22545384..c4c1f772f7 100644 --- a/base/src/org/compiere/model/I_C_BP_Withholding.java +++ b/base/src/org/compiere/model/I_C_BP_Withholding.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BP_Withholding * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BP_Withholding { diff --git a/base/src/org/compiere/model/I_C_BPartner.java b/base/src/org/compiere/model/I_C_BPartner.java deleted file mode 100644 index 5bb2f389ab..0000000000 --- a/base/src/org/compiere/model/I_C_BPartner.java +++ /dev/null @@ -1,830 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for C_BPartner - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_C_BPartner -{ - - /** TableName=C_BPartner */ - public static final String Table_Name = "C_BPartner"; - - /** AD_Table_ID=291 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name AD_Language */ - public static final String COLUMNNAME_AD_Language = "AD_Language"; - - /** Set Language. - * Language for this entity - */ - public void setAD_Language (String AD_Language); - - /** Get Language. - * Language for this entity - */ - public String getAD_Language(); - - /** Column name AD_OrgBP_ID */ - public static final String COLUMNNAME_AD_OrgBP_ID = "AD_OrgBP_ID"; - - /** Set Linked Organization. - * The Business Partner is another Organization for explicit Inter-Org transactions - */ - public void setAD_OrgBP_ID (String AD_OrgBP_ID); - - /** Get Linked Organization. - * The Business Partner is another Organization for explicit Inter-Org transactions - */ - public String getAD_OrgBP_ID(); - - /** Column name AcqusitionCost */ - public static final String COLUMNNAME_AcqusitionCost = "AcqusitionCost"; - - /** Set Acquisition Cost. - * The cost of gaining the prospect as a customer - */ - public void setAcqusitionCost (BigDecimal AcqusitionCost); - - /** Get Acquisition Cost. - * The cost of gaining the prospect as a customer - */ - public BigDecimal getAcqusitionCost(); - - /** Column name ActualLifeTimeValue */ - public static final String COLUMNNAME_ActualLifeTimeValue = "ActualLifeTimeValue"; - - /** Set Actual Life Time Value. - * Actual Life Time Revenue - */ - public void setActualLifeTimeValue (BigDecimal ActualLifeTimeValue); - - /** Get Actual Life Time Value. - * Actual Life Time Revenue - */ - public BigDecimal getActualLifeTimeValue(); - - /** Column name BPartner_Parent_ID */ - public static final String COLUMNNAME_BPartner_Parent_ID = "BPartner_Parent_ID"; - - /** Set Partner Parent. - * Business Partner Parent - */ - public void setBPartner_Parent_ID (int BPartner_Parent_ID); - - /** Get Partner Parent. - * Business Partner Parent - */ - public int getBPartner_Parent_ID(); - - /** Column name C_BP_Group_ID */ - public static final String COLUMNNAME_C_BP_Group_ID = "C_BP_Group_ID"; - - /** Set Business Partner Group. - * Business Partner Group - */ - public void setC_BP_Group_ID (int C_BP_Group_ID); - - /** Get Business Partner Group. - * Business Partner Group - */ - public int getC_BP_Group_ID(); - - public I_C_BP_Group getC_BP_Group() throws Exception; - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - /** Column name C_Dunning_ID */ - public static final String COLUMNNAME_C_Dunning_ID = "C_Dunning_ID"; - - /** Set Dunning. - * Dunning Rules for overdue invoices - */ - public void setC_Dunning_ID (int C_Dunning_ID); - - /** Get Dunning. - * Dunning Rules for overdue invoices - */ - public int getC_Dunning_ID(); - - public I_C_Dunning getC_Dunning() throws Exception; - - /** Column name C_Greeting_ID */ - public static final String COLUMNNAME_C_Greeting_ID = "C_Greeting_ID"; - - /** Set Greeting. - * Greeting to print on correspondence - */ - public void setC_Greeting_ID (int C_Greeting_ID); - - /** Get Greeting. - * Greeting to print on correspondence - */ - public int getC_Greeting_ID(); - - public I_C_Greeting getC_Greeting() throws Exception; - - /** Column name C_InvoiceSchedule_ID */ - public static final String COLUMNNAME_C_InvoiceSchedule_ID = "C_InvoiceSchedule_ID"; - - /** Set Invoice Schedule. - * Schedule for generating Invoices - */ - public void setC_InvoiceSchedule_ID (int C_InvoiceSchedule_ID); - - /** Get Invoice Schedule. - * Schedule for generating Invoices - */ - public int getC_InvoiceSchedule_ID(); - - public I_C_InvoiceSchedule getC_InvoiceSchedule() throws Exception; - - /** Column name C_PaymentTerm_ID */ - public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID"; - - /** Set Payment Term. - * The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID); - - /** Get Payment Term. - * The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID(); - - public I_C_PaymentTerm getC_PaymentTerm() throws Exception; - - /** Column name DUNS */ - public static final String COLUMNNAME_DUNS = "DUNS"; - - /** Set D-U-N-S. - * Dun & Bradstreet Number - */ - public void setDUNS (String DUNS); - - /** Get D-U-N-S. - * Dun & Bradstreet Number - */ - public String getDUNS(); - - /** Column name DeliveryRule */ - public static final String COLUMNNAME_DeliveryRule = "DeliveryRule"; - - /** Set Delivery Rule. - * Defines the timing of Delivery - */ - public void setDeliveryRule (String DeliveryRule); - - /** Get Delivery Rule. - * Defines the timing of Delivery - */ - public String getDeliveryRule(); - - /** Column name DeliveryViaRule */ - public static final String COLUMNNAME_DeliveryViaRule = "DeliveryViaRule"; - - /** Set Delivery Via. - * How the order will be delivered - */ - public void setDeliveryViaRule (String DeliveryViaRule); - - /** Get Delivery Via. - * How the order will be delivered - */ - public String getDeliveryViaRule(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DocumentCopies */ - public static final String COLUMNNAME_DocumentCopies = "DocumentCopies"; - - /** Set Document Copies. - * Number of copies to be printed - */ - public void setDocumentCopies (int DocumentCopies); - - /** Get Document Copies. - * Number of copies to be printed - */ - public int getDocumentCopies(); - - /** Column name DunningGrace */ - public static final String COLUMNNAME_DunningGrace = "DunningGrace"; - - /** Set Dunning Grace */ - public void setDunningGrace (Timestamp DunningGrace); - - /** Get Dunning Grace */ - public Timestamp getDunningGrace(); - - /** Column name FirstSale */ - public static final String COLUMNNAME_FirstSale = "FirstSale"; - - /** Set First Sale. - * Date of First Sale - */ - public void setFirstSale (Timestamp FirstSale); - - /** Get First Sale. - * Date of First Sale - */ - public Timestamp getFirstSale(); - - /** Column name FlatDiscount */ - public static final String COLUMNNAME_FlatDiscount = "FlatDiscount"; - - /** Set Flat Discount %. - * Flat discount percentage - */ - public void setFlatDiscount (BigDecimal FlatDiscount); - - /** Get Flat Discount %. - * Flat discount percentage - */ - public BigDecimal getFlatDiscount(); - - /** Column name FreightCostRule */ - public static final String COLUMNNAME_FreightCostRule = "FreightCostRule"; - - /** Set Freight Cost Rule. - * Method for charging Freight - */ - public void setFreightCostRule (String FreightCostRule); - - /** Get Freight Cost Rule. - * Method for charging Freight - */ - public String getFreightCostRule(); - - /** Column name InvoiceRule */ - public static final String COLUMNNAME_InvoiceRule = "InvoiceRule"; - - /** Set Invoice Rule. - * Frequency and method of invoicing - */ - public void setInvoiceRule (String InvoiceRule); - - /** Get Invoice Rule. - * Frequency and method of invoicing - */ - public String getInvoiceRule(); - - /** Column name Invoice_PrintFormat_ID */ - public static final String COLUMNNAME_Invoice_PrintFormat_ID = "Invoice_PrintFormat_ID"; - - /** Set Invoice Print Format. - * Print Format for printing Invoices - */ - public void setInvoice_PrintFormat_ID (int Invoice_PrintFormat_ID); - - /** Get Invoice Print Format. - * Print Format for printing Invoices - */ - public int getInvoice_PrintFormat_ID(); - - /** Column name IsCustomer */ - public static final String COLUMNNAME_IsCustomer = "IsCustomer"; - - /** Set Customer. - * Indicates if this Business Partner is a Customer - */ - public void setIsCustomer (boolean IsCustomer); - - /** Get Customer. - * Indicates if this Business Partner is a Customer - */ - public boolean isCustomer(); - - /** Column name IsDiscountPrinted */ - public static final String COLUMNNAME_IsDiscountPrinted = "IsDiscountPrinted"; - - /** Set Discount Printed. - * Print Discount on Invoice and Order - */ - public void setIsDiscountPrinted (boolean IsDiscountPrinted); - - /** Get Discount Printed. - * Print Discount on Invoice and Order - */ - public boolean isDiscountPrinted(); - - /** Column name IsEmployee */ - public static final String COLUMNNAME_IsEmployee = "IsEmployee"; - - /** Set Employee. - * Indicates if this Business Partner is an employee - */ - public void setIsEmployee (boolean IsEmployee); - - /** Get Employee. - * Indicates if this Business Partner is an employee - */ - public boolean isEmployee(); - - /** Column name IsOneTime */ - public static final String COLUMNNAME_IsOneTime = "IsOneTime"; - - /** Set One time transaction */ - public void setIsOneTime (boolean IsOneTime); - - /** Get One time transaction */ - public boolean isOneTime(); - - /** Column name IsProspect */ - public static final String COLUMNNAME_IsProspect = "IsProspect"; - - /** Set Prospect. - * Indicates this is a Prospect - */ - public void setIsProspect (boolean IsProspect); - - /** Get Prospect. - * Indicates this is a Prospect - */ - public boolean isProspect(); - - /** Column name IsSalesRep */ - public static final String COLUMNNAME_IsSalesRep = "IsSalesRep"; - - /** Set Sales Representative. - * Indicates if the business partner is a sales representative or company agent - */ - public void setIsSalesRep (boolean IsSalesRep); - - /** Get Sales Representative. - * Indicates if the business partner is a sales representative or company agent - */ - public boolean isSalesRep(); - - /** Column name IsSummary */ - public static final String COLUMNNAME_IsSummary = "IsSummary"; - - /** Set Summary Level. - * This is a summary entity - */ - public void setIsSummary (boolean IsSummary); - - /** Get Summary Level. - * This is a summary entity - */ - public boolean isSummary(); - - /** Column name IsTaxExempt */ - public static final String COLUMNNAME_IsTaxExempt = "IsTaxExempt"; - - /** Set Tax exempt. - * Business partner is exempt from tax - */ - public void setIsTaxExempt (boolean IsTaxExempt); - - /** Get Tax exempt. - * Business partner is exempt from tax - */ - public boolean isTaxExempt(); - - /** Column name IsVendor */ - public static final String COLUMNNAME_IsVendor = "IsVendor"; - - /** Set Vendor. - * Indicates if this Business Partner is a Vendor - */ - public void setIsVendor (boolean IsVendor); - - /** Get Vendor. - * Indicates if this Business Partner is a Vendor - */ - public boolean isVendor(); - - /** Column name M_DiscountSchema_ID */ - public static final String COLUMNNAME_M_DiscountSchema_ID = "M_DiscountSchema_ID"; - - /** Set Discount Schema. - * Schema to calculate the trade discount percentage - */ - public void setM_DiscountSchema_ID (int M_DiscountSchema_ID); - - /** Get Discount Schema. - * Schema to calculate the trade discount percentage - */ - public int getM_DiscountSchema_ID(); - - /** Column name M_PriceList_ID */ - public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; - - /** Set Price List. - * Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID); - - /** Get Price List. - * Unique identifier of a Price List - */ - public int getM_PriceList_ID(); - - public I_M_PriceList getM_PriceList() throws Exception; - - /** Column name NAICS */ - public static final String COLUMNNAME_NAICS = "NAICS"; - - /** Set NAICS/SIC. - * Standard Industry Code or its successor NAIC - http://www.osha.gov/oshstats/sicser.html - */ - public void setNAICS (String NAICS); - - /** Get NAICS/SIC. - * Standard Industry Code or its successor NAIC - http://www.osha.gov/oshstats/sicser.html - */ - public String getNAICS(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name Name2 */ - public static final String COLUMNNAME_Name2 = "Name2"; - - /** Set Name 2. - * Additional Name - */ - public void setName2 (String Name2); - - /** Get Name 2. - * Additional Name - */ - public String getName2(); - - /** Column name NumberEmployees */ - public static final String COLUMNNAME_NumberEmployees = "NumberEmployees"; - - /** Set Employees. - * Number of employees - */ - public void setNumberEmployees (int NumberEmployees); - - /** Get Employees. - * Number of employees - */ - public int getNumberEmployees(); - - /** Column name POReference */ - public static final String COLUMNNAME_POReference = "POReference"; - - /** Set Order Reference. - * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public void setPOReference (String POReference); - - /** Get Order Reference. - * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public String getPOReference(); - - /** Column name PO_DiscountSchema_ID */ - public static final String COLUMNNAME_PO_DiscountSchema_ID = "PO_DiscountSchema_ID"; - - /** Set PO Discount Schema. - * Schema to calculate the purchase trade discount percentage - */ - public void setPO_DiscountSchema_ID (int PO_DiscountSchema_ID); - - /** Get PO Discount Schema. - * Schema to calculate the purchase trade discount percentage - */ - public int getPO_DiscountSchema_ID(); - - /** Column name PO_PaymentTerm_ID */ - public static final String COLUMNNAME_PO_PaymentTerm_ID = "PO_PaymentTerm_ID"; - - /** Set PO Payment Term. - * Payment rules for a purchase order - */ - public void setPO_PaymentTerm_ID (int PO_PaymentTerm_ID); - - /** Get PO Payment Term. - * Payment rules for a purchase order - */ - public int getPO_PaymentTerm_ID(); - - /** Column name PO_PriceList_ID */ - public static final String COLUMNNAME_PO_PriceList_ID = "PO_PriceList_ID"; - - /** Set Purchase Pricelist. - * Price List used by this Business Partner - */ - public void setPO_PriceList_ID (int PO_PriceList_ID); - - /** Get Purchase Pricelist. - * Price List used by this Business Partner - */ - public int getPO_PriceList_ID(); - - /** Column name PaymentRule */ - public static final String COLUMNNAME_PaymentRule = "PaymentRule"; - - /** Set Payment Rule. - * How you pay the invoice - */ - public void setPaymentRule (String PaymentRule); - - /** Get Payment Rule. - * How you pay the invoice - */ - public String getPaymentRule(); - - /** Column name PaymentRulePO */ - public static final String COLUMNNAME_PaymentRulePO = "PaymentRulePO"; - - /** Set Payment Rule. - * Purchase payment option - */ - public void setPaymentRulePO (String PaymentRulePO); - - /** Get Payment Rule. - * Purchase payment option - */ - public String getPaymentRulePO(); - - /** Column name PotentialLifeTimeValue */ - public static final String COLUMNNAME_PotentialLifeTimeValue = "PotentialLifeTimeValue"; - - /** Set Potential Life Time Value. - * Total Revenue expected - */ - public void setPotentialLifeTimeValue (BigDecimal PotentialLifeTimeValue); - - /** Get Potential Life Time Value. - * Total Revenue expected - */ - public BigDecimal getPotentialLifeTimeValue(); - - /** Column name Rating */ - public static final String COLUMNNAME_Rating = "Rating"; - - /** Set Rating. - * Classification or Importance - */ - public void setRating (String Rating); - - /** Get Rating. - * Classification or Importance - */ - public String getRating(); - - /** Column name ReferenceNo */ - public static final String COLUMNNAME_ReferenceNo = "ReferenceNo"; - - /** Set Reference No. - * Your customer or vendor number at the Business Partner's site - */ - public void setReferenceNo (String ReferenceNo); - - /** Get Reference No. - * Your customer or vendor number at the Business Partner's site - */ - public String getReferenceNo(); - - /** Column name SOCreditStatus */ - public static final String COLUMNNAME_SOCreditStatus = "SOCreditStatus"; - - /** Set Credit Status. - * Business Partner Credit Status - */ - public void setSOCreditStatus (String SOCreditStatus); - - /** Get Credit Status. - * Business Partner Credit Status - */ - public String getSOCreditStatus(); - - /** Column name SO_CreditLimit */ - public static final String COLUMNNAME_SO_CreditLimit = "SO_CreditLimit"; - - /** Set Credit Limit. - * Total outstanding invoice amounts allowed - */ - public void setSO_CreditLimit (BigDecimal SO_CreditLimit); - - /** Get Credit Limit. - * Total outstanding invoice amounts allowed - */ - public BigDecimal getSO_CreditLimit(); - - /** Column name SO_CreditUsed */ - public static final String COLUMNNAME_SO_CreditUsed = "SO_CreditUsed"; - - /** Set Credit Used. - * Current open balance - */ - public void setSO_CreditUsed (BigDecimal SO_CreditUsed); - - /** Get Credit Used. - * Current open balance - */ - public BigDecimal getSO_CreditUsed(); - - /** Column name SO_Description */ - public static final String COLUMNNAME_SO_Description = "SO_Description"; - - /** Set Order Description. - * Description to be used on orders - */ - public void setSO_Description (String SO_Description); - - /** Get Order Description. - * Description to be used on orders - */ - public String getSO_Description(); - - /** Column name SalesRep_ID */ - public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; - - /** Set Sales Representative. - * Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID); - - /** Get Sales Representative. - * Sales Representative or Company Agent - */ - public int getSalesRep_ID(); - - /** Column name SalesVolume */ - public static final String COLUMNNAME_SalesVolume = "SalesVolume"; - - /** Set Sales Volume in 1.000. - * Total Volume of Sales in Thousands of Currency - */ - public void setSalesVolume (int SalesVolume); - - /** Get Sales Volume in 1.000. - * Total Volume of Sales in Thousands of Currency - */ - public int getSalesVolume(); - - /** Column name SendEMail */ - public static final String COLUMNNAME_SendEMail = "SendEMail"; - - /** Set Send EMail. - * Enable sending Document EMail - */ - public void setSendEMail (boolean SendEMail); - - /** Get Send EMail. - * Enable sending Document EMail - */ - public boolean isSendEMail(); - - /** Column name ShareOfCustomer */ - public static final String COLUMNNAME_ShareOfCustomer = "ShareOfCustomer"; - - /** Set Share. - * Share of Customer's business as a percentage - */ - public void setShareOfCustomer (int ShareOfCustomer); - - /** Get Share. - * Share of Customer's business as a percentage - */ - public int getShareOfCustomer(); - - /** Column name ShelfLifeMinPct */ - public static final String COLUMNNAME_ShelfLifeMinPct = "ShelfLifeMinPct"; - - /** Set Min Shelf Life %. - * Minimum Shelf Life in percent based on Product Instance Guarantee Date - */ - public void setShelfLifeMinPct (int ShelfLifeMinPct); - - /** Get Min Shelf Life %. - * Minimum Shelf Life in percent based on Product Instance Guarantee Date - */ - public int getShelfLifeMinPct(); - - /** Column name TaxID */ - public static final String COLUMNNAME_TaxID = "TaxID"; - - /** Set Tax ID. - * Tax Identification - */ - public void setTaxID (String TaxID); - - /** Get Tax ID. - * Tax Identification - */ - public String getTaxID(); - - /** Column name TotalOpenBalance */ - public static final String COLUMNNAME_TotalOpenBalance = "TotalOpenBalance"; - - /** Set Open Balance. - * Total Open Balance Amount in primary Accounting Currency - */ - public void setTotalOpenBalance (BigDecimal TotalOpenBalance); - - /** Get Open Balance. - * Total Open Balance Amount in primary Accounting Currency - */ - public BigDecimal getTotalOpenBalance(); - - /** Column name URL */ - public static final String COLUMNNAME_URL = "URL"; - - /** Set URL. - * Full URL address - e.g. http://www.adempiere.org - */ - public void setURL (String URL); - - /** Get URL. - * Full URL address - e.g. http://www.adempiere.org - */ - public String getURL(); - - /** Column name Value */ - public static final String COLUMNNAME_Value = "Value"; - - /** Set Search Key. - * Search key for the record in the format required - must be unique - */ - public void setValue (String Value); - - /** Get Search Key. - * Search key for the record in the format required - must be unique - */ - public String getValue(); -} diff --git a/base/src/org/compiere/model/I_C_BPartner_Location.java b/base/src/org/compiere/model/I_C_BPartner_Location.java index c2956c75cc..7e2194be8f 100644 --- a/base/src/org/compiere/model/I_C_BPartner_Location.java +++ b/base/src/org/compiere/model/I_C_BPartner_Location.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BPartner_Location * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BPartner_Location { diff --git a/base/src/org/compiere/model/I_C_BPartner_Product.java b/base/src/org/compiere/model/I_C_BPartner_Product.java index 30323c16dc..408f373364 100644 --- a/base/src/org/compiere/model/I_C_BPartner_Product.java +++ b/base/src/org/compiere/model/I_C_BPartner_Product.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BPartner_Product * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BPartner_Product { diff --git a/base/src/org/compiere/model/I_C_Bank.java b/base/src/org/compiere/model/I_C_Bank.java index 9840742ff9..7904b2bde1 100644 --- a/base/src/org/compiere/model/I_C_Bank.java +++ b/base/src/org/compiere/model/I_C_Bank.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Bank * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Bank { diff --git a/base/src/org/compiere/model/I_C_BankAccount.java b/base/src/org/compiere/model/I_C_BankAccount.java index 2fb749f8ab..b6becdfb7a 100644 --- a/base/src/org/compiere/model/I_C_BankAccount.java +++ b/base/src/org/compiere/model/I_C_BankAccount.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BankAccount * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BankAccount { diff --git a/base/src/org/compiere/model/I_C_BankAccountDoc.java b/base/src/org/compiere/model/I_C_BankAccountDoc.java index 6041644d61..5d0d881361 100644 --- a/base/src/org/compiere/model/I_C_BankAccountDoc.java +++ b/base/src/org/compiere/model/I_C_BankAccountDoc.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BankAccountDoc * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BankAccountDoc { diff --git a/base/src/org/compiere/model/I_C_BankAccount_Acct.java b/base/src/org/compiere/model/I_C_BankAccount_Acct.java index c723329d12..d0a972c078 100644 --- a/base/src/org/compiere/model/I_C_BankAccount_Acct.java +++ b/base/src/org/compiere/model/I_C_BankAccount_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BankAccount_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BankAccount_Acct { diff --git a/base/src/org/compiere/model/I_C_BankStatement.java b/base/src/org/compiere/model/I_C_BankStatement.java index 4756e230d7..5a7aa5a33c 100644 --- a/base/src/org/compiere/model/I_C_BankStatement.java +++ b/base/src/org/compiere/model/I_C_BankStatement.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BankStatement * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BankStatement { diff --git a/base/src/org/compiere/model/I_C_BankStatementLine.java b/base/src/org/compiere/model/I_C_BankStatementLine.java index 87e454aab9..c373ee3cda 100644 --- a/base/src/org/compiere/model/I_C_BankStatementLine.java +++ b/base/src/org/compiere/model/I_C_BankStatementLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BankStatementLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BankStatementLine { diff --git a/base/src/org/compiere/model/I_C_BankStatementLoader.java b/base/src/org/compiere/model/I_C_BankStatementLoader.java index 991ba0ca26..9a170fea0b 100644 --- a/base/src/org/compiere/model/I_C_BankStatementLoader.java +++ b/base/src/org/compiere/model/I_C_BankStatementLoader.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BankStatementLoader * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BankStatementLoader { diff --git a/base/src/org/compiere/model/I_C_BankStatementMatcher.java b/base/src/org/compiere/model/I_C_BankStatementMatcher.java index 1a2ec23c39..f5a2531c7a 100644 --- a/base/src/org/compiere/model/I_C_BankStatementMatcher.java +++ b/base/src/org/compiere/model/I_C_BankStatementMatcher.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_BankStatementMatcher * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_BankStatementMatcher { diff --git a/base/src/org/compiere/model/I_C_Calendar.java b/base/src/org/compiere/model/I_C_Calendar.java index c62a60fe7e..2f7424df13 100644 --- a/base/src/org/compiere/model/I_C_Calendar.java +++ b/base/src/org/compiere/model/I_C_Calendar.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Calendar * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Calendar { diff --git a/base/src/org/compiere/model/I_C_Campaign.java b/base/src/org/compiere/model/I_C_Campaign.java index 816f6657d9..ead8b3c8aa 100644 --- a/base/src/org/compiere/model/I_C_Campaign.java +++ b/base/src/org/compiere/model/I_C_Campaign.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Campaign * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Campaign { diff --git a/base/src/org/compiere/model/I_C_Cash.java b/base/src/org/compiere/model/I_C_Cash.java index 69562ffd03..7f40afc8fb 100644 --- a/base/src/org/compiere/model/I_C_Cash.java +++ b/base/src/org/compiere/model/I_C_Cash.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Cash * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Cash { diff --git a/base/src/org/compiere/model/I_C_CashBook.java b/base/src/org/compiere/model/I_C_CashBook.java index 63bd104b42..c50bd28fed 100644 --- a/base/src/org/compiere/model/I_C_CashBook.java +++ b/base/src/org/compiere/model/I_C_CashBook.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_CashBook * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_CashBook { diff --git a/base/src/org/compiere/model/I_C_CashBook_Acct.java b/base/src/org/compiere/model/I_C_CashBook_Acct.java index 2ed599ce95..8c126ea9ee 100644 --- a/base/src/org/compiere/model/I_C_CashBook_Acct.java +++ b/base/src/org/compiere/model/I_C_CashBook_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_CashBook_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_CashBook_Acct { diff --git a/base/src/org/compiere/model/I_C_CashLine.java b/base/src/org/compiere/model/I_C_CashLine.java deleted file mode 100644 index 671288b1b2..0000000000 --- a/base/src/org/compiere/model/I_C_CashLine.java +++ /dev/null @@ -1,250 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for C_CashLine - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_C_CashLine -{ - - /** TableName=C_CashLine */ - public static final String Table_Name = "C_CashLine"; - - /** AD_Table_ID=410 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name Amount */ - public static final String COLUMNNAME_Amount = "Amount"; - - /** Set Amount. - * Amount in a defined currency - */ - public void setAmount (BigDecimal Amount); - - /** Get Amount. - * Amount in a defined currency - */ - public BigDecimal getAmount(); - - /** Column name C_BankAccount_ID */ - public static final String COLUMNNAME_C_BankAccount_ID = "C_BankAccount_ID"; - - /** Set Bank Account. - * Account at the Bank - */ - public void setC_BankAccount_ID (int C_BankAccount_ID); - - /** Get Bank Account. - * Account at the Bank - */ - public int getC_BankAccount_ID(); - - public I_C_BankAccount getC_BankAccount() throws Exception; - - /** Column name C_CashLine_ID */ - public static final String COLUMNNAME_C_CashLine_ID = "C_CashLine_ID"; - - /** Set Cash Journal Line. - * Cash Journal Line - */ - public void setC_CashLine_ID (int C_CashLine_ID); - - /** Get Cash Journal Line. - * Cash Journal Line - */ - public int getC_CashLine_ID(); - - /** Column name C_Cash_ID */ - public static final String COLUMNNAME_C_Cash_ID = "C_Cash_ID"; - - /** Set Cash Journal. - * Cash Journal - */ - public void setC_Cash_ID (int C_Cash_ID); - - /** Get Cash Journal. - * Cash Journal - */ - public int getC_Cash_ID(); - - public I_C_Cash getC_Cash() throws Exception; - - /** Column name C_Charge_ID */ - public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID"; - - /** Set Charge. - * Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID); - - /** Get Charge. - * Additional document charges - */ - public int getC_Charge_ID(); - - public I_C_Charge getC_Charge() throws Exception; - - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name C_Invoice_ID */ - public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID"; - - /** Set Invoice. - * Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID); - - /** Get Invoice. - * Invoice Identifier - */ - public int getC_Invoice_ID(); - - public I_C_Invoice getC_Invoice() throws Exception; - - /** Column name CashType */ - public static final String COLUMNNAME_CashType = "CashType"; - - /** Set Cash Type. - * Source of Cash - */ - public void setCashType (String CashType); - - /** Get Cash Type. - * Source of Cash - */ - public String getCashType(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DiscountAmt */ - public static final String COLUMNNAME_DiscountAmt = "DiscountAmt"; - - /** Set Discount Amount. - * Calculated amount of discount - */ - public void setDiscountAmt (BigDecimal DiscountAmt); - - /** Get Discount Amount. - * Calculated amount of discount - */ - public BigDecimal getDiscountAmt(); - - /** Column name IsGenerated */ - public static final String COLUMNNAME_IsGenerated = "IsGenerated"; - - /** Set Generated. - * This Line is generated - */ - public void setIsGenerated (boolean IsGenerated); - - /** Get Generated. - * This Line is generated - */ - public boolean isGenerated(); - - /** Column name Line */ - public static final String COLUMNNAME_Line = "Line"; - - /** Set Line No. - * Unique line for this document - */ - public void setLine (int Line); - - /** Get Line No. - * Unique line for this document - */ - public int getLine(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name WriteOffAmt */ - public static final String COLUMNNAME_WriteOffAmt = "WriteOffAmt"; - - /** Set Write-off Amount. - * Amount to write-off - */ - public void setWriteOffAmt (BigDecimal WriteOffAmt); - - /** Get Write-off Amount. - * Amount to write-off - */ - public BigDecimal getWriteOffAmt(); -} diff --git a/base/src/org/compiere/model/I_C_Channel.java b/base/src/org/compiere/model/I_C_Channel.java index dd89299ae4..1342e72d2d 100644 --- a/base/src/org/compiere/model/I_C_Channel.java +++ b/base/src/org/compiere/model/I_C_Channel.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Channel * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Channel { diff --git a/base/src/org/compiere/model/I_C_Charge.java b/base/src/org/compiere/model/I_C_Charge.java index 54995dd5bc..944edab6aa 100644 --- a/base/src/org/compiere/model/I_C_Charge.java +++ b/base/src/org/compiere/model/I_C_Charge.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Charge * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Charge { diff --git a/base/src/org/compiere/model/I_C_Charge_Acct.java b/base/src/org/compiere/model/I_C_Charge_Acct.java index 13bc646337..13dd976944 100644 --- a/base/src/org/compiere/model/I_C_Charge_Acct.java +++ b/base/src/org/compiere/model/I_C_Charge_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Charge_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Charge_Acct { diff --git a/base/src/org/compiere/model/I_C_City.java b/base/src/org/compiere/model/I_C_City.java index f478066885..6054fc412c 100644 --- a/base/src/org/compiere/model/I_C_City.java +++ b/base/src/org/compiere/model/I_C_City.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_City * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_City { diff --git a/base/src/org/compiere/model/I_C_Commission.java b/base/src/org/compiere/model/I_C_Commission.java index ca9abf5902..f5555225a4 100644 --- a/base/src/org/compiere/model/I_C_Commission.java +++ b/base/src/org/compiere/model/I_C_Commission.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Commission * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Commission { diff --git a/base/src/org/compiere/model/I_C_CommissionAmt.java b/base/src/org/compiere/model/I_C_CommissionAmt.java index 95063fe63a..aa66060c62 100644 --- a/base/src/org/compiere/model/I_C_CommissionAmt.java +++ b/base/src/org/compiere/model/I_C_CommissionAmt.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_CommissionAmt * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_CommissionAmt { diff --git a/base/src/org/compiere/model/I_C_CommissionDetail.java b/base/src/org/compiere/model/I_C_CommissionDetail.java index 518d6aad5f..f80e668961 100644 --- a/base/src/org/compiere/model/I_C_CommissionDetail.java +++ b/base/src/org/compiere/model/I_C_CommissionDetail.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_CommissionDetail * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_CommissionDetail { diff --git a/base/src/org/compiere/model/I_C_CommissionLine.java b/base/src/org/compiere/model/I_C_CommissionLine.java index dc922b182e..6fe54396c3 100644 --- a/base/src/org/compiere/model/I_C_CommissionLine.java +++ b/base/src/org/compiere/model/I_C_CommissionLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_CommissionLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_CommissionLine { @@ -250,6 +250,19 @@ public interface I_C_CommissionLine */ public int getOrg_ID(); + /** Column name PaymentRule */ + public static final String COLUMNNAME_PaymentRule = "PaymentRule"; + + /** Set Payment Rule. + * How you pay the invoice + */ + public void setPaymentRule (String PaymentRule); + + /** Get Payment Rule. + * How you pay the invoice + */ + public String getPaymentRule(); + /** Column name QtyMultiplier */ public static final String COLUMNNAME_QtyMultiplier = "QtyMultiplier"; diff --git a/base/src/org/compiere/model/I_C_CommissionRun.java b/base/src/org/compiere/model/I_C_CommissionRun.java index c21494f778..a48b937337 100644 --- a/base/src/org/compiere/model/I_C_CommissionRun.java +++ b/base/src/org/compiere/model/I_C_CommissionRun.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_CommissionRun * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_CommissionRun { diff --git a/base/src/org/compiere/model/I_C_ConversionType.java b/base/src/org/compiere/model/I_C_ConversionType.java index e7ee777038..1e7016a43a 100644 --- a/base/src/org/compiere/model/I_C_ConversionType.java +++ b/base/src/org/compiere/model/I_C_ConversionType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ConversionType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ConversionType { diff --git a/base/src/org/compiere/model/I_C_Conversion_Rate.java b/base/src/org/compiere/model/I_C_Conversion_Rate.java index 071582c5d9..bb64e4b93d 100644 --- a/base/src/org/compiere/model/I_C_Conversion_Rate.java +++ b/base/src/org/compiere/model/I_C_Conversion_Rate.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Conversion_Rate * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Conversion_Rate { diff --git a/base/src/org/compiere/model/I_C_Country.java b/base/src/org/compiere/model/I_C_Country.java index 7fa380eea6..262197427d 100644 --- a/base/src/org/compiere/model/I_C_Country.java +++ b/base/src/org/compiere/model/I_C_Country.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Country * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Country { diff --git a/base/src/org/compiere/model/I_C_Currency.java b/base/src/org/compiere/model/I_C_Currency.java index 06189a9d53..35ae8186eb 100644 --- a/base/src/org/compiere/model/I_C_Currency.java +++ b/base/src/org/compiere/model/I_C_Currency.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Currency * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Currency { diff --git a/base/src/org/compiere/model/I_C_Currency_Acct.java b/base/src/org/compiere/model/I_C_Currency_Acct.java index e68f248966..dafd1c458f 100644 --- a/base/src/org/compiere/model/I_C_Currency_Acct.java +++ b/base/src/org/compiere/model/I_C_Currency_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Currency_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Currency_Acct { diff --git a/base/src/org/compiere/model/I_C_Cycle.java b/base/src/org/compiere/model/I_C_Cycle.java index 9bc11ff395..b985cc735c 100644 --- a/base/src/org/compiere/model/I_C_Cycle.java +++ b/base/src/org/compiere/model/I_C_Cycle.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Cycle * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Cycle { diff --git a/base/src/org/compiere/model/I_C_CyclePhase.java b/base/src/org/compiere/model/I_C_CyclePhase.java index d2dd18743a..57436fa2ee 100644 --- a/base/src/org/compiere/model/I_C_CyclePhase.java +++ b/base/src/org/compiere/model/I_C_CyclePhase.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_CyclePhase * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_CyclePhase { diff --git a/base/src/org/compiere/model/I_C_CycleStep.java b/base/src/org/compiere/model/I_C_CycleStep.java index 04b3dfe96d..d54b9adf27 100644 --- a/base/src/org/compiere/model/I_C_CycleStep.java +++ b/base/src/org/compiere/model/I_C_CycleStep.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_CycleStep * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_CycleStep { diff --git a/base/src/org/compiere/model/I_C_DocType.java b/base/src/org/compiere/model/I_C_DocType.java index 7f2c499d31..07a96b0a11 100644 --- a/base/src/org/compiere/model/I_C_DocType.java +++ b/base/src/org/compiere/model/I_C_DocType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_DocType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_DocType { diff --git a/base/src/org/compiere/model/I_C_DocTypeCounter.java b/base/src/org/compiere/model/I_C_DocTypeCounter.java index 66e09741b1..f6e460be29 100644 --- a/base/src/org/compiere/model/I_C_DocTypeCounter.java +++ b/base/src/org/compiere/model/I_C_DocTypeCounter.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_DocTypeCounter * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_DocTypeCounter { diff --git a/base/src/org/compiere/model/I_C_Dunning.java b/base/src/org/compiere/model/I_C_Dunning.java index 957e6d53be..d6bf2bbb23 100644 --- a/base/src/org/compiere/model/I_C_Dunning.java +++ b/base/src/org/compiere/model/I_C_Dunning.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Dunning * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Dunning { diff --git a/base/src/org/compiere/model/I_C_DunningLevel.java b/base/src/org/compiere/model/I_C_DunningLevel.java index 4ca7fc2fad..2d11c3a7ac 100644 --- a/base/src/org/compiere/model/I_C_DunningLevel.java +++ b/base/src/org/compiere/model/I_C_DunningLevel.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_DunningLevel * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_DunningLevel { diff --git a/base/src/org/compiere/model/I_C_DunningRun.java b/base/src/org/compiere/model/I_C_DunningRun.java index b320503af9..71825c7c0b 100644 --- a/base/src/org/compiere/model/I_C_DunningRun.java +++ b/base/src/org/compiere/model/I_C_DunningRun.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_DunningRun * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_DunningRun { diff --git a/base/src/org/compiere/model/I_C_DunningRunEntry.java b/base/src/org/compiere/model/I_C_DunningRunEntry.java index e61d3fafe2..a822737fe4 100644 --- a/base/src/org/compiere/model/I_C_DunningRunEntry.java +++ b/base/src/org/compiere/model/I_C_DunningRunEntry.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_DunningRunEntry * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_DunningRunEntry { diff --git a/base/src/org/compiere/model/I_C_DunningRunLine.java b/base/src/org/compiere/model/I_C_DunningRunLine.java index 678a530f4b..c0a4be1654 100644 --- a/base/src/org/compiere/model/I_C_DunningRunLine.java +++ b/base/src/org/compiere/model/I_C_DunningRunLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_DunningRunLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_DunningRunLine { diff --git a/base/src/org/compiere/model/I_C_Element.java b/base/src/org/compiere/model/I_C_Element.java index b43891bcd0..0ca8876954 100644 --- a/base/src/org/compiere/model/I_C_Element.java +++ b/base/src/org/compiere/model/I_C_Element.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Element * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Element { diff --git a/base/src/org/compiere/model/I_C_ElementValue.java b/base/src/org/compiere/model/I_C_ElementValue.java index 31e62b59c0..5f324b94bb 100644 --- a/base/src/org/compiere/model/I_C_ElementValue.java +++ b/base/src/org/compiere/model/I_C_ElementValue.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ElementValue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ElementValue { diff --git a/base/src/org/compiere/model/I_C_Greeting.java b/base/src/org/compiere/model/I_C_Greeting.java index 6d8dee5f3f..e5d678a907 100644 --- a/base/src/org/compiere/model/I_C_Greeting.java +++ b/base/src/org/compiere/model/I_C_Greeting.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Greeting * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Greeting { diff --git a/base/src/org/compiere/model/I_C_InterOrg_Acct.java b/base/src/org/compiere/model/I_C_InterOrg_Acct.java index ea67de4465..a7544d0857 100644 --- a/base/src/org/compiere/model/I_C_InterOrg_Acct.java +++ b/base/src/org/compiere/model/I_C_InterOrg_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_InterOrg_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_InterOrg_Acct { diff --git a/base/src/org/compiere/model/I_C_Invoice.java b/base/src/org/compiere/model/I_C_Invoice.java deleted file mode 100644 index 5a46cf9260..0000000000 --- a/base/src/org/compiere/model/I_C_Invoice.java +++ /dev/null @@ -1,803 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for C_Invoice - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_C_Invoice -{ - - /** TableName=C_Invoice */ - public static final String Table_Name = "C_Invoice"; - - /** AD_Table_ID=318 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 1 - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(1); - - /** Load Meta Data */ - - /** Column name AD_OrgTrx_ID */ - public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; - - /** Set Trx Organization. - * Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); - - /** Get Trx Organization. - * Performing or initiating organization - */ - public int getAD_OrgTrx_ID(); - - /** Column name AD_User_ID */ - public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; - - /** Set User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID); - - /** Get User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID(); - - public I_AD_User getAD_User() throws Exception; - - /** Column name C_Activity_ID */ - public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; - - /** Set Activity. - * Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID); - - /** Get Activity. - * Business Activity - */ - public int getC_Activity_ID(); - - public I_C_Activity getC_Activity() throws Exception; - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public I_C_BPartner getC_BPartner() throws Exception; - - /** Column name C_BPartner_Location_ID */ - public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID"; - - /** Set Partner Location. - * Identifies the (ship to) address for this Business Partner - */ - public void setC_BPartner_Location_ID (int C_BPartner_Location_ID); - - /** Get Partner Location. - * Identifies the (ship to) address for this Business Partner - */ - public int getC_BPartner_Location_ID(); - - public I_C_BPartner_Location getC_BPartner_Location() throws Exception; - - /** Column name C_Campaign_ID */ - public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; - - /** Set Campaign. - * Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID); - - /** Get Campaign. - * Marketing Campaign - */ - public int getC_Campaign_ID(); - - public I_C_Campaign getC_Campaign() throws Exception; - - /** Column name C_CashLine_ID */ - public static final String COLUMNNAME_C_CashLine_ID = "C_CashLine_ID"; - - /** Set Cash Journal Line. - * Cash Journal Line - */ - public void setC_CashLine_ID (int C_CashLine_ID); - - /** Get Cash Journal Line. - * Cash Journal Line - */ - public int getC_CashLine_ID(); - - public I_C_CashLine getC_CashLine() throws Exception; - - /** Column name C_Charge_ID */ - public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID"; - - /** Set Charge. - * Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID); - - /** Get Charge. - * Additional document charges - */ - public int getC_Charge_ID(); - - /** Column name C_ConversionType_ID */ - public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID"; - - /** Set Currency Type. - * Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID); - - /** Get Currency Type. - * Currency Conversion Rate Type - */ - public int getC_ConversionType_ID(); - - public I_C_ConversionType getC_ConversionType() throws Exception; - - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name C_DocTypeTarget_ID */ - public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID"; - - /** Set Target Document Type. - * Target document type for conversing documents - */ - public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID); - - /** Get Target Document Type. - * Target document type for conversing documents - */ - public int getC_DocTypeTarget_ID(); - - /** Column name C_DocType_ID */ - public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; - - /** Set Document Type. - * Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID); - - /** Get Document Type. - * Document type or rules - */ - public int getC_DocType_ID(); - - public I_C_DocType getC_DocType() throws Exception; - - /** Column name C_DunningLevel_ID */ - public static final String COLUMNNAME_C_DunningLevel_ID = "C_DunningLevel_ID"; - - /** Set Dunning Level */ - public void setC_DunningLevel_ID (int C_DunningLevel_ID); - - /** Get Dunning Level */ - public int getC_DunningLevel_ID(); - - public I_C_DunningLevel getC_DunningLevel() throws Exception; - - /** Column name C_Invoice_ID */ - public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID"; - - /** Set Invoice. - * Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID); - - /** Get Invoice. - * Invoice Identifier - */ - public int getC_Invoice_ID(); - - /** Column name C_Order_ID */ - public static final String COLUMNNAME_C_Order_ID = "C_Order_ID"; - - /** Set Order. - * Order - */ - public void setC_Order_ID (int C_Order_ID); - - /** Get Order. - * Order - */ - public int getC_Order_ID(); - - public I_C_Order getC_Order() throws Exception; - - /** Column name C_PaymentTerm_ID */ - public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID"; - - /** Set Payment Term. - * The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID); - - /** Get Payment Term. - * The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID(); - - public I_C_PaymentTerm getC_PaymentTerm() throws Exception; - - /** Column name C_Payment_ID */ - public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID"; - - /** Set Payment. - * Payment identifier - */ - public void setC_Payment_ID (int C_Payment_ID); - - /** Get Payment. - * Payment identifier - */ - public int getC_Payment_ID(); - - public I_C_Payment getC_Payment() throws Exception; - - /** Column name C_Project_ID */ - public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; - - /** Set Project. - * Financial Project - */ - public void setC_Project_ID (int C_Project_ID); - - /** Get Project. - * Financial Project - */ - public int getC_Project_ID(); - - public I_C_Project getC_Project() throws Exception; - - /** Column name ChargeAmt */ - public static final String COLUMNNAME_ChargeAmt = "ChargeAmt"; - - /** Set Charge amount. - * Charge Amount - */ - public void setChargeAmt (BigDecimal ChargeAmt); - - /** Get Charge amount. - * Charge Amount - */ - public BigDecimal getChargeAmt(); - - /** Column name CopyFrom */ - public static final String COLUMNNAME_CopyFrom = "CopyFrom"; - - /** Set Copy From. - * Copy From Record - */ - public void setCopyFrom (String CopyFrom); - - /** Get Copy From. - * Copy From Record - */ - public String getCopyFrom(); - - /** Column name CreateFrom */ - public static final String COLUMNNAME_CreateFrom = "CreateFrom"; - - /** Set Create lines from. - * Process which will generate a new document lines based on an existing document - */ - public void setCreateFrom (String CreateFrom); - - /** Get Create lines from. - * Process which will generate a new document lines based on an existing document - */ - public String getCreateFrom(); - - /** Column name DateAcct */ - public static final String COLUMNNAME_DateAcct = "DateAcct"; - - /** Set Account Date. - * Accounting Date - */ - public void setDateAcct (Timestamp DateAcct); - - /** Get Account Date. - * Accounting Date - */ - public Timestamp getDateAcct(); - - /** Column name DateInvoiced */ - public static final String COLUMNNAME_DateInvoiced = "DateInvoiced"; - - /** Set Date Invoiced. - * Date printed on Invoice - */ - public void setDateInvoiced (Timestamp DateInvoiced); - - /** Get Date Invoiced. - * Date printed on Invoice - */ - public Timestamp getDateInvoiced(); - - /** Column name DateOrdered */ - public static final String COLUMNNAME_DateOrdered = "DateOrdered"; - - /** Set Date Ordered. - * Date of Order - */ - public void setDateOrdered (Timestamp DateOrdered); - - /** Get Date Ordered. - * Date of Order - */ - public Timestamp getDateOrdered(); - - /** Column name DatePrinted */ - public static final String COLUMNNAME_DatePrinted = "DatePrinted"; - - /** Set Date printed. - * Date the document was printed. - */ - public void setDatePrinted (Timestamp DatePrinted); - - /** Get Date printed. - * Date the document was printed. - */ - public Timestamp getDatePrinted(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DocAction */ - public static final String COLUMNNAME_DocAction = "DocAction"; - - /** Set Document Action. - * The targeted status of the document - */ - public void setDocAction (String DocAction); - - /** Get Document Action. - * The targeted status of the document - */ - public String getDocAction(); - - /** Column name DocStatus */ - public static final String COLUMNNAME_DocStatus = "DocStatus"; - - /** Set Document Status. - * The current status of the document - */ - public void setDocStatus (String DocStatus); - - /** Get Document Status. - * The current status of the document - */ - public String getDocStatus(); - - /** Column name DocumentNo */ - public static final String COLUMNNAME_DocumentNo = "DocumentNo"; - - /** Set Document No. - * Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo); - - /** Get Document No. - * Document sequence number of the document - */ - public String getDocumentNo(); - - /** Column name DunningGrace */ - public static final String COLUMNNAME_DunningGrace = "DunningGrace"; - - /** Set Dunning Grace */ - public void setDunningGrace (Timestamp DunningGrace); - - /** Get Dunning Grace */ - public Timestamp getDunningGrace(); - - /** Column name GenerateTo */ - public static final String COLUMNNAME_GenerateTo = "GenerateTo"; - - /** Set Generate To. - * Generate To - */ - public void setGenerateTo (String GenerateTo); - - /** Get Generate To. - * Generate To - */ - public String getGenerateTo(); - - /** Column name GrandTotal */ - public static final String COLUMNNAME_GrandTotal = "GrandTotal"; - - /** Set Grand Total. - * Total amount of document - */ - public void setGrandTotal (BigDecimal GrandTotal); - - /** Get Grand Total. - * Total amount of document - */ - public BigDecimal getGrandTotal(); - - /** Column name InvoiceCollectionType */ - public static final String COLUMNNAME_InvoiceCollectionType = "InvoiceCollectionType"; - - /** Set Collection Status. - * Invoice Collection Status - */ - public void setInvoiceCollectionType (String InvoiceCollectionType); - - /** Get Collection Status. - * Invoice Collection Status - */ - public String getInvoiceCollectionType(); - - /** Column name IsApproved */ - public static final String COLUMNNAME_IsApproved = "IsApproved"; - - /** Set Approved. - * Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved); - - /** Get Approved. - * Indicates if this document requires approval - */ - public boolean isApproved(); - - /** Column name IsDiscountPrinted */ - public static final String COLUMNNAME_IsDiscountPrinted = "IsDiscountPrinted"; - - /** Set Discount Printed. - * Print Discount on Invoice and Order - */ - public void setIsDiscountPrinted (boolean IsDiscountPrinted); - - /** Get Discount Printed. - * Print Discount on Invoice and Order - */ - public boolean isDiscountPrinted(); - - /** Column name IsInDispute */ - public static final String COLUMNNAME_IsInDispute = "IsInDispute"; - - /** Set In Dispute. - * Document is in dispute - */ - public void setIsInDispute (boolean IsInDispute); - - /** Get In Dispute. - * Document is in dispute - */ - public boolean isInDispute(); - - /** Column name IsPaid */ - public static final String COLUMNNAME_IsPaid = "IsPaid"; - - /** Set Paid. - * The document is paid - */ - public void setIsPaid (boolean IsPaid); - - /** Get Paid. - * The document is paid - */ - public boolean isPaid(); - - /** Column name IsPayScheduleValid */ - public static final String COLUMNNAME_IsPayScheduleValid = "IsPayScheduleValid"; - - /** Set Pay Schedule valid. - * Is the Payment Schedule is valid - */ - public void setIsPayScheduleValid (boolean IsPayScheduleValid); - - /** Get Pay Schedule valid. - * Is the Payment Schedule is valid - */ - public boolean isPayScheduleValid(); - - /** Column name IsPrinted */ - public static final String COLUMNNAME_IsPrinted = "IsPrinted"; - - /** Set Printed. - * Indicates if this document / line is printed - */ - public void setIsPrinted (boolean IsPrinted); - - /** Get Printed. - * Indicates if this document / line is printed - */ - public boolean isPrinted(); - - /** Column name IsSOTrx */ - public static final String COLUMNNAME_IsSOTrx = "IsSOTrx"; - - /** Set Sales Transaction. - * This is a Sales Transaction - */ - public void setIsSOTrx (boolean IsSOTrx); - - /** Get Sales Transaction. - * This is a Sales Transaction - */ - public boolean isSOTrx(); - - /** Column name IsSelfService */ - public static final String COLUMNNAME_IsSelfService = "IsSelfService"; - - /** Set Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService); - - /** Get Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService(); - - /** Column name IsTaxIncluded */ - public static final String COLUMNNAME_IsTaxIncluded = "IsTaxIncluded"; - - /** Set Price includes Tax. - * Tax is included in the price - */ - public void setIsTaxIncluded (boolean IsTaxIncluded); - - /** Get Price includes Tax. - * Tax is included in the price - */ - public boolean isTaxIncluded(); - - /** Column name IsTransferred */ - public static final String COLUMNNAME_IsTransferred = "IsTransferred"; - - /** Set Transferred. - * Transferred to General Ledger (i.e. accounted) - */ - public void setIsTransferred (boolean IsTransferred); - - /** Get Transferred. - * Transferred to General Ledger (i.e. accounted) - */ - public boolean isTransferred(); - - /** Column name M_PriceList_ID */ - public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; - - /** Set Price List. - * Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID); - - /** Get Price List. - * Unique identifier of a Price List - */ - public int getM_PriceList_ID(); - - public I_M_PriceList getM_PriceList() throws Exception; - - /** Column name M_RMA_ID */ - public static final String COLUMNNAME_M_RMA_ID = "M_RMA_ID"; - - /** Set RMA. - * Return Material Authorization - */ - public void setM_RMA_ID (int M_RMA_ID); - - /** Get RMA. - * Return Material Authorization - */ - public int getM_RMA_ID(); - - public I_M_RMA getM_RMA() throws Exception; - - /** Column name POReference */ - public static final String COLUMNNAME_POReference = "POReference"; - - /** Set Order Reference. - * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public void setPOReference (String POReference); - - /** Get Order Reference. - * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public String getPOReference(); - - /** Column name PaymentRule */ - public static final String COLUMNNAME_PaymentRule = "PaymentRule"; - - /** Set Payment Rule. - * How you pay the invoice - */ - public void setPaymentRule (String PaymentRule); - - /** Get Payment Rule. - * How you pay the invoice - */ - public String getPaymentRule(); - - /** Column name Posted */ - public static final String COLUMNNAME_Posted = "Posted"; - - /** Set Posted. - * Posting status - */ - public void setPosted (boolean Posted); - - /** Get Posted. - * Posting status - */ - public boolean isPosted(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; - - /** Set Process Now */ - public void setProcessing (boolean Processing); - - /** Get Process Now */ - public boolean isProcessing(); - - /** Column name Ref_Invoice_ID */ - public static final String COLUMNNAME_Ref_Invoice_ID = "Ref_Invoice_ID"; - - /** Set Referenced Invoice */ - public void setRef_Invoice_ID (int Ref_Invoice_ID); - - /** Get Referenced Invoice */ - public int getRef_Invoice_ID(); - - /** Column name SalesRep_ID */ - public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; - - /** Set Sales Representative. - * Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID); - - /** Get Sales Representative. - * Sales Representative or Company Agent - */ - public int getSalesRep_ID(); - - /** Column name SendEMail */ - public static final String COLUMNNAME_SendEMail = "SendEMail"; - - /** Set Send EMail. - * Enable sending Document EMail - */ - public void setSendEMail (boolean SendEMail); - - /** Get Send EMail. - * Enable sending Document EMail - */ - public boolean isSendEMail(); - - /** Column name TotalLines */ - public static final String COLUMNNAME_TotalLines = "TotalLines"; - - /** Set Total Lines. - * Total of all document lines - */ - public void setTotalLines (BigDecimal TotalLines); - - /** Get Total Lines. - * Total of all document lines - */ - public BigDecimal getTotalLines(); - - /** Column name User1_ID */ - public static final String COLUMNNAME_User1_ID = "User1_ID"; - - /** Set User List 1. - * User defined list element #1 - */ - public void setUser1_ID (int User1_ID); - - /** Get User List 1. - * User defined list element #1 - */ - public int getUser1_ID(); - - /** Column name User2_ID */ - public static final String COLUMNNAME_User2_ID = "User2_ID"; - - /** Set User List 2. - * User defined list element #2 - */ - public void setUser2_ID (int User2_ID); - - /** Get User List 2. - * User defined list element #2 - */ - public int getUser2_ID(); -} diff --git a/base/src/org/compiere/model/I_C_InvoiceBatch.java b/base/src/org/compiere/model/I_C_InvoiceBatch.java index bc4144aaae..ff1fdca1ff 100644 --- a/base/src/org/compiere/model/I_C_InvoiceBatch.java +++ b/base/src/org/compiere/model/I_C_InvoiceBatch.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_InvoiceBatch * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_InvoiceBatch { diff --git a/base/src/org/compiere/model/I_C_InvoiceBatchLine.java b/base/src/org/compiere/model/I_C_InvoiceBatchLine.java index c2886157ff..de7770d548 100644 --- a/base/src/org/compiere/model/I_C_InvoiceBatchLine.java +++ b/base/src/org/compiere/model/I_C_InvoiceBatchLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_InvoiceBatchLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_InvoiceBatchLine { diff --git a/base/src/org/compiere/model/I_C_InvoiceLine.java b/base/src/org/compiere/model/I_C_InvoiceLine.java index 4c2b01c7d2..886f0eac5a 100644 --- a/base/src/org/compiere/model/I_C_InvoiceLine.java +++ b/base/src/org/compiere/model/I_C_InvoiceLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_InvoiceLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_InvoiceLine { diff --git a/base/src/org/compiere/model/I_C_InvoicePaySchedule.java b/base/src/org/compiere/model/I_C_InvoicePaySchedule.java index edf9fe442d..b7b8ea8890 100644 --- a/base/src/org/compiere/model/I_C_InvoicePaySchedule.java +++ b/base/src/org/compiere/model/I_C_InvoicePaySchedule.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_InvoicePaySchedule * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_InvoicePaySchedule { diff --git a/base/src/org/compiere/model/I_C_InvoiceSchedule.java b/base/src/org/compiere/model/I_C_InvoiceSchedule.java index faad0f628d..6baaf2c04d 100644 --- a/base/src/org/compiere/model/I_C_InvoiceSchedule.java +++ b/base/src/org/compiere/model/I_C_InvoiceSchedule.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_InvoiceSchedule * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_InvoiceSchedule { diff --git a/base/src/org/compiere/model/I_C_InvoiceTax.java b/base/src/org/compiere/model/I_C_InvoiceTax.java index 6da30b000f..d8f1e8ff20 100644 --- a/base/src/org/compiere/model/I_C_InvoiceTax.java +++ b/base/src/org/compiere/model/I_C_InvoiceTax.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_InvoiceTax * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_InvoiceTax { diff --git a/base/src/org/compiere/model/I_C_Job.java b/base/src/org/compiere/model/I_C_Job.java index e6c2ecb0a9..bab89fab4d 100644 --- a/base/src/org/compiere/model/I_C_Job.java +++ b/base/src/org/compiere/model/I_C_Job.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Job * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Job { diff --git a/base/src/org/compiere/model/I_C_JobAssignment.java b/base/src/org/compiere/model/I_C_JobAssignment.java index 540df90b4c..3622d3f138 100644 --- a/base/src/org/compiere/model/I_C_JobAssignment.java +++ b/base/src/org/compiere/model/I_C_JobAssignment.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_JobAssignment * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_JobAssignment { diff --git a/base/src/org/compiere/model/I_C_JobCategory.java b/base/src/org/compiere/model/I_C_JobCategory.java index 52bd9378d4..efd260d5e9 100644 --- a/base/src/org/compiere/model/I_C_JobCategory.java +++ b/base/src/org/compiere/model/I_C_JobCategory.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_JobCategory * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_JobCategory { diff --git a/base/src/org/compiere/model/I_C_JobRemuneration.java b/base/src/org/compiere/model/I_C_JobRemuneration.java index 4fafb479d8..57041e1da8 100644 --- a/base/src/org/compiere/model/I_C_JobRemuneration.java +++ b/base/src/org/compiere/model/I_C_JobRemuneration.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_JobRemuneration * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_JobRemuneration { diff --git a/base/src/org/compiere/model/I_C_LandedCost.java b/base/src/org/compiere/model/I_C_LandedCost.java index 8a4e73b2f2..262c19bdc4 100644 --- a/base/src/org/compiere/model/I_C_LandedCost.java +++ b/base/src/org/compiere/model/I_C_LandedCost.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_LandedCost * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_LandedCost { diff --git a/base/src/org/compiere/model/I_C_LandedCostAllocation.java b/base/src/org/compiere/model/I_C_LandedCostAllocation.java index 30a696de3f..926c2ea8d4 100644 --- a/base/src/org/compiere/model/I_C_LandedCostAllocation.java +++ b/base/src/org/compiere/model/I_C_LandedCostAllocation.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_LandedCostAllocation * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_LandedCostAllocation { diff --git a/base/src/org/compiere/model/I_C_Location.java b/base/src/org/compiere/model/I_C_Location.java index 597f2c18d2..732f89cb8c 100644 --- a/base/src/org/compiere/model/I_C_Location.java +++ b/base/src/org/compiere/model/I_C_Location.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Location * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Location { diff --git a/base/src/org/compiere/model/I_C_NonBusinessDay.java b/base/src/org/compiere/model/I_C_NonBusinessDay.java index a2a898b275..de799de764 100644 --- a/base/src/org/compiere/model/I_C_NonBusinessDay.java +++ b/base/src/org/compiere/model/I_C_NonBusinessDay.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_NonBusinessDay * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_NonBusinessDay { diff --git a/base/src/org/compiere/model/I_C_Order.java b/base/src/org/compiere/model/I_C_Order.java deleted file mode 100644 index 91a9b7d510..0000000000 --- a/base/src/org/compiere/model/I_C_Order.java +++ /dev/null @@ -1,977 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for C_Order - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_C_Order -{ - - /** TableName=C_Order */ - public static final String Table_Name = "C_Order"; - - /** AD_Table_ID=259 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 1 - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(1); - - /** Load Meta Data */ - - /** Column name AD_OrgTrx_ID */ - public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; - - /** Set Trx Organization. - * Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); - - /** Get Trx Organization. - * Performing or initiating organization - */ - public int getAD_OrgTrx_ID(); - - /** Column name AD_User_ID */ - public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; - - /** Set User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID); - - /** Get User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID(); - - public I_AD_User getAD_User() throws Exception; - - /** Column name AmountRefunded */ - public static final String COLUMNNAME_AmountRefunded = "AmountRefunded"; - - /** Set AmountRefunded */ - public void setAmountRefunded (BigDecimal AmountRefunded); - - /** Get AmountRefunded */ - public BigDecimal getAmountRefunded(); - - /** Column name AmountTendered */ - public static final String COLUMNNAME_AmountTendered = "AmountTendered"; - - /** Set AmountTendered */ - public void setAmountTendered (BigDecimal AmountTendered); - - /** Get AmountTendered */ - public BigDecimal getAmountTendered(); - - /** Column name Bill_BPartner_ID */ - public static final String COLUMNNAME_Bill_BPartner_ID = "Bill_BPartner_ID"; - - /** Set Invoice Partner. - * Business Partner to be invoiced - */ - public void setBill_BPartner_ID (int Bill_BPartner_ID); - - /** Get Invoice Partner. - * Business Partner to be invoiced - */ - public int getBill_BPartner_ID(); - - /** Column name Bill_Location_ID */ - public static final String COLUMNNAME_Bill_Location_ID = "Bill_Location_ID"; - - /** Set Invoice Location. - * Business Partner Location for invoicing - */ - public void setBill_Location_ID (int Bill_Location_ID); - - /** Get Invoice Location. - * Business Partner Location for invoicing - */ - public int getBill_Location_ID(); - - /** Column name Bill_User_ID */ - public static final String COLUMNNAME_Bill_User_ID = "Bill_User_ID"; - - /** Set Invoice Contact. - * Business Partner Contact for invoicing - */ - public void setBill_User_ID (int Bill_User_ID); - - /** Get Invoice Contact. - * Business Partner Contact for invoicing - */ - public int getBill_User_ID(); - - /** Column name C_Activity_ID */ - public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; - - /** Set Activity. - * Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID); - - /** Get Activity. - * Business Activity - */ - public int getC_Activity_ID(); - - public I_C_Activity getC_Activity() throws Exception; - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public I_C_BPartner getC_BPartner() throws Exception; - - /** Column name C_BPartner_Location_ID */ - public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID"; - - /** Set Partner Location. - * Identifies the (ship to) address for this Business Partner - */ - public void setC_BPartner_Location_ID (int C_BPartner_Location_ID); - - /** Get Partner Location. - * Identifies the (ship to) address for this Business Partner - */ - public int getC_BPartner_Location_ID(); - - public I_C_BPartner_Location getC_BPartner_Location() throws Exception; - - /** Column name C_Campaign_ID */ - public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; - - /** Set Campaign. - * Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID); - - /** Get Campaign. - * Marketing Campaign - */ - public int getC_Campaign_ID(); - - public I_C_Campaign getC_Campaign() throws Exception; - - /** Column name C_CashLine_ID */ - public static final String COLUMNNAME_C_CashLine_ID = "C_CashLine_ID"; - - /** Set Cash Journal Line. - * Cash Journal Line - */ - public void setC_CashLine_ID (int C_CashLine_ID); - - /** Get Cash Journal Line. - * Cash Journal Line - */ - public int getC_CashLine_ID(); - - public I_C_CashLine getC_CashLine() throws Exception; - - /** Column name C_Charge_ID */ - public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID"; - - /** Set Charge. - * Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID); - - /** Get Charge. - * Additional document charges - */ - public int getC_Charge_ID(); - - /** Column name C_ConversionType_ID */ - public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID"; - - /** Set Currency Type. - * Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID); - - /** Get Currency Type. - * Currency Conversion Rate Type - */ - public int getC_ConversionType_ID(); - - public I_C_ConversionType getC_ConversionType() throws Exception; - - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name C_DocTypeTarget_ID */ - public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID"; - - /** Set Target Document Type. - * Target document type for conversing documents - */ - public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID); - - /** Get Target Document Type. - * Target document type for conversing documents - */ - public int getC_DocTypeTarget_ID(); - - /** Column name C_DocType_ID */ - public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; - - /** Set Document Type. - * Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID); - - /** Get Document Type. - * Document type or rules - */ - public int getC_DocType_ID(); - - public I_C_DocType getC_DocType() throws Exception; - - /** Column name C_Order_ID */ - public static final String COLUMNNAME_C_Order_ID = "C_Order_ID"; - - /** Set Order. - * Order - */ - public void setC_Order_ID (int C_Order_ID); - - /** Get Order. - * Order - */ - public int getC_Order_ID(); - - /** Column name C_POS_ID */ - public static final String COLUMNNAME_C_POS_ID = "C_POS_ID"; - - /** Set POS Terminal. - * Point of Sales Terminal - */ - public void setC_POS_ID (int C_POS_ID); - - /** Get POS Terminal. - * Point of Sales Terminal - */ - public int getC_POS_ID(); - - public I_C_POS getC_POS() throws Exception; - - /** Column name C_PaymentTerm_ID */ - public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID"; - - /** Set Payment Term. - * The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID); - - /** Get Payment Term. - * The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID(); - - public I_C_PaymentTerm getC_PaymentTerm() throws Exception; - - /** Column name C_Payment_ID */ - public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID"; - - /** Set Payment. - * Payment identifier - */ - public void setC_Payment_ID (int C_Payment_ID); - - /** Get Payment. - * Payment identifier - */ - public int getC_Payment_ID(); - - public I_C_Payment getC_Payment() throws Exception; - - /** Column name C_Project_ID */ - public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; - - /** Set Project. - * Financial Project - */ - public void setC_Project_ID (int C_Project_ID); - - /** Get Project. - * Financial Project - */ - public int getC_Project_ID(); - - public I_C_Project getC_Project() throws Exception; - - /** Column name ChargeAmt */ - public static final String COLUMNNAME_ChargeAmt = "ChargeAmt"; - - /** Set Charge amount. - * Charge Amount - */ - public void setChargeAmt (BigDecimal ChargeAmt); - - /** Get Charge amount. - * Charge Amount - */ - public BigDecimal getChargeAmt(); - - /** Column name CopyFrom */ - public static final String COLUMNNAME_CopyFrom = "CopyFrom"; - - /** Set Copy From. - * Copy From Record - */ - public void setCopyFrom (String CopyFrom); - - /** Get Copy From. - * Copy From Record - */ - public String getCopyFrom(); - - /** Column name DateAcct */ - public static final String COLUMNNAME_DateAcct = "DateAcct"; - - /** Set Account Date. - * Accounting Date - */ - public void setDateAcct (Timestamp DateAcct); - - /** Get Account Date. - * Accounting Date - */ - public Timestamp getDateAcct(); - - /** Column name DateOrdered */ - public static final String COLUMNNAME_DateOrdered = "DateOrdered"; - - /** Set Date Ordered. - * Date of Order - */ - public void setDateOrdered (Timestamp DateOrdered); - - /** Get Date Ordered. - * Date of Order - */ - public Timestamp getDateOrdered(); - - /** Column name DatePrinted */ - public static final String COLUMNNAME_DatePrinted = "DatePrinted"; - - /** Set Date printed. - * Date the document was printed. - */ - public void setDatePrinted (Timestamp DatePrinted); - - /** Get Date printed. - * Date the document was printed. - */ - public Timestamp getDatePrinted(); - - /** Column name DatePromised */ - public static final String COLUMNNAME_DatePromised = "DatePromised"; - - /** Set Date Promised. - * Date Order was promised - */ - public void setDatePromised (Timestamp DatePromised); - - /** Get Date Promised. - * Date Order was promised - */ - public Timestamp getDatePromised(); - - /** Column name DeliveryRule */ - public static final String COLUMNNAME_DeliveryRule = "DeliveryRule"; - - /** Set Delivery Rule. - * Defines the timing of Delivery - */ - public void setDeliveryRule (String DeliveryRule); - - /** Get Delivery Rule. - * Defines the timing of Delivery - */ - public String getDeliveryRule(); - - /** Column name DeliveryViaRule */ - public static final String COLUMNNAME_DeliveryViaRule = "DeliveryViaRule"; - - /** Set Delivery Via. - * How the order will be delivered - */ - public void setDeliveryViaRule (String DeliveryViaRule); - - /** Get Delivery Via. - * How the order will be delivered - */ - public String getDeliveryViaRule(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DocAction */ - public static final String COLUMNNAME_DocAction = "DocAction"; - - /** Set Document Action. - * The targeted status of the document - */ - public void setDocAction (String DocAction); - - /** Get Document Action. - * The targeted status of the document - */ - public String getDocAction(); - - /** Column name DocStatus */ - public static final String COLUMNNAME_DocStatus = "DocStatus"; - - /** Set Document Status. - * The current status of the document - */ - public void setDocStatus (String DocStatus); - - /** Get Document Status. - * The current status of the document - */ - public String getDocStatus(); - - /** Column name DocumentNo */ - public static final String COLUMNNAME_DocumentNo = "DocumentNo"; - - /** Set Document No. - * Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo); - - /** Get Document No. - * Document sequence number of the document - */ - public String getDocumentNo(); - - /** Column name FreightAmt */ - public static final String COLUMNNAME_FreightAmt = "FreightAmt"; - - /** Set Freight Amount. - * Freight Amount - */ - public void setFreightAmt (BigDecimal FreightAmt); - - /** Get Freight Amount. - * Freight Amount - */ - public BigDecimal getFreightAmt(); - - /** Column name FreightCostRule */ - public static final String COLUMNNAME_FreightCostRule = "FreightCostRule"; - - /** Set Freight Cost Rule. - * Method for charging Freight - */ - public void setFreightCostRule (String FreightCostRule); - - /** Get Freight Cost Rule. - * Method for charging Freight - */ - public String getFreightCostRule(); - - /** Column name GrandTotal */ - public static final String COLUMNNAME_GrandTotal = "GrandTotal"; - - /** Set Grand Total. - * Total amount of document - */ - public void setGrandTotal (BigDecimal GrandTotal); - - /** Get Grand Total. - * Total amount of document - */ - public BigDecimal getGrandTotal(); - - /** Column name InvoiceRule */ - public static final String COLUMNNAME_InvoiceRule = "InvoiceRule"; - - /** Set Invoice Rule. - * Frequency and method of invoicing - */ - public void setInvoiceRule (String InvoiceRule); - - /** Get Invoice Rule. - * Frequency and method of invoicing - */ - public String getInvoiceRule(); - - /** Column name IsApproved */ - public static final String COLUMNNAME_IsApproved = "IsApproved"; - - /** Set Approved. - * Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved); - - /** Get Approved. - * Indicates if this document requires approval - */ - public boolean isApproved(); - - /** Column name IsCreditApproved */ - public static final String COLUMNNAME_IsCreditApproved = "IsCreditApproved"; - - /** Set Credit Approved. - * Credit has been approved - */ - public void setIsCreditApproved (boolean IsCreditApproved); - - /** Get Credit Approved. - * Credit has been approved - */ - public boolean isCreditApproved(); - - /** Column name IsDelivered */ - public static final String COLUMNNAME_IsDelivered = "IsDelivered"; - - /** Set Delivered */ - public void setIsDelivered (boolean IsDelivered); - - /** Get Delivered */ - public boolean isDelivered(); - - /** Column name IsDiscountPrinted */ - public static final String COLUMNNAME_IsDiscountPrinted = "IsDiscountPrinted"; - - /** Set Discount Printed. - * Print Discount on Invoice and Order - */ - public void setIsDiscountPrinted (boolean IsDiscountPrinted); - - /** Get Discount Printed. - * Print Discount on Invoice and Order - */ - public boolean isDiscountPrinted(); - - /** Column name IsDropShip */ - public static final String COLUMNNAME_IsDropShip = "IsDropShip"; - - /** Set Drop Shipment. - * Drop Shipments are sent from the Vendor directly to the Customer - */ - public void setIsDropShip (boolean IsDropShip); - - /** Get Drop Shipment. - * Drop Shipments are sent from the Vendor directly to the Customer - */ - public boolean isDropShip(); - - /** Column name IsInvoiced */ - public static final String COLUMNNAME_IsInvoiced = "IsInvoiced"; - - /** Set Invoiced. - * Is this invoiced? - */ - public void setIsInvoiced (boolean IsInvoiced); - - /** Get Invoiced. - * Is this invoiced? - */ - public boolean isInvoiced(); - - /** Column name IsPrinted */ - public static final String COLUMNNAME_IsPrinted = "IsPrinted"; - - /** Set Printed. - * Indicates if this document / line is printed - */ - public void setIsPrinted (boolean IsPrinted); - - /** Get Printed. - * Indicates if this document / line is printed - */ - public boolean isPrinted(); - - /** Column name IsSOTrx */ - public static final String COLUMNNAME_IsSOTrx = "IsSOTrx"; - - /** Set Sales Transaction. - * This is a Sales Transaction - */ - public void setIsSOTrx (boolean IsSOTrx); - - /** Get Sales Transaction. - * This is a Sales Transaction - */ - public boolean isSOTrx(); - - /** Column name IsSelected */ - public static final String COLUMNNAME_IsSelected = "IsSelected"; - - /** Set Selected */ - public void setIsSelected (boolean IsSelected); - - /** Get Selected */ - public boolean isSelected(); - - /** Column name IsSelfService */ - public static final String COLUMNNAME_IsSelfService = "IsSelfService"; - - /** Set Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService); - - /** Get Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService(); - - /** Column name IsTaxIncluded */ - public static final String COLUMNNAME_IsTaxIncluded = "IsTaxIncluded"; - - /** Set Price includes Tax. - * Tax is included in the price - */ - public void setIsTaxIncluded (boolean IsTaxIncluded); - - /** Get Price includes Tax. - * Tax is included in the price - */ - public boolean isTaxIncluded(); - - /** Column name IsTransferred */ - public static final String COLUMNNAME_IsTransferred = "IsTransferred"; - - /** Set Transferred. - * Transferred to General Ledger (i.e. accounted) - */ - public void setIsTransferred (boolean IsTransferred); - - /** Get Transferred. - * Transferred to General Ledger (i.e. accounted) - */ - public boolean isTransferred(); - - /** Column name M_PriceList_ID */ - public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; - - /** Set Price List. - * Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID); - - /** Get Price List. - * Unique identifier of a Price List - */ - public int getM_PriceList_ID(); - - public I_M_PriceList getM_PriceList() throws Exception; - - /** Column name M_Shipper_ID */ - public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID"; - - /** Set Shipper. - * Method or manner of product delivery - */ - public void setM_Shipper_ID (int M_Shipper_ID); - - /** Get Shipper. - * Method or manner of product delivery - */ - public int getM_Shipper_ID(); - - public I_M_Shipper getM_Shipper() throws Exception; - - /** Column name M_Warehouse_ID */ - public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; - - /** Set Warehouse. - * Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID); - - /** Get Warehouse. - * Storage Warehouse and Service Point - */ - public int getM_Warehouse_ID(); - - public I_M_Warehouse getM_Warehouse() throws Exception; - - /** Column name OrderType */ - public static final String COLUMNNAME_OrderType = "OrderType"; - - /** Set OrderType */ - public void setOrderType (String OrderType); - - /** Get OrderType */ - public String getOrderType(); - - /** Column name POReference */ - public static final String COLUMNNAME_POReference = "POReference"; - - /** Set Order Reference. - * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public void setPOReference (String POReference); - - /** Get Order Reference. - * Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public String getPOReference(); - - /** Column name Pay_BPartner_ID */ - public static final String COLUMNNAME_Pay_BPartner_ID = "Pay_BPartner_ID"; - - /** Set Payment BPartner. - * Business Partner responsible for the payment - */ - public void setPay_BPartner_ID (int Pay_BPartner_ID); - - /** Get Payment BPartner. - * Business Partner responsible for the payment - */ - public int getPay_BPartner_ID(); - - /** Column name Pay_Location_ID */ - public static final String COLUMNNAME_Pay_Location_ID = "Pay_Location_ID"; - - /** Set Payment Location. - * Location of the Business Partner responsible for the payment - */ - public void setPay_Location_ID (int Pay_Location_ID); - - /** Get Payment Location. - * Location of the Business Partner responsible for the payment - */ - public int getPay_Location_ID(); - - /** Column name PaymentRule */ - public static final String COLUMNNAME_PaymentRule = "PaymentRule"; - - /** Set Payment Rule. - * How you pay the invoice - */ - public void setPaymentRule (String PaymentRule); - - /** Get Payment Rule. - * How you pay the invoice - */ - public String getPaymentRule(); - - /** Column name Posted */ - public static final String COLUMNNAME_Posted = "Posted"; - - /** Set Posted. - * Posting status - */ - public void setPosted (boolean Posted); - - /** Get Posted. - * Posting status - */ - public boolean isPosted(); - - /** Column name PriorityRule */ - public static final String COLUMNNAME_PriorityRule = "PriorityRule"; - - /** Set Priority. - * Priority of a document - */ - public void setPriorityRule (String PriorityRule); - - /** Get Priority. - * Priority of a document - */ - public String getPriorityRule(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; - - /** Set Process Now */ - public void setProcessing (boolean Processing); - - /** Get Process Now */ - public boolean isProcessing(); - - /** Column name Ref_Order_ID */ - public static final String COLUMNNAME_Ref_Order_ID = "Ref_Order_ID"; - - /** Set Referenced Order. - * Reference to corresponding Sales/Purchase Order - */ - public void setRef_Order_ID (int Ref_Order_ID); - - /** Get Referenced Order. - * Reference to corresponding Sales/Purchase Order - */ - public int getRef_Order_ID(); - - /** Column name SalesRep_ID */ - public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; - - /** Set Sales Representative. - * Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID); - - /** Get Sales Representative. - * Sales Representative or Company Agent - */ - public int getSalesRep_ID(); - - /** Column name SendEMail */ - public static final String COLUMNNAME_SendEMail = "SendEMail"; - - /** Set Send EMail. - * Enable sending Document EMail - */ - public void setSendEMail (boolean SendEMail); - - /** Get Send EMail. - * Enable sending Document EMail - */ - public boolean isSendEMail(); - - /** Column name TotalLines */ - public static final String COLUMNNAME_TotalLines = "TotalLines"; - - /** Set Total Lines. - * Total of all document lines - */ - public void setTotalLines (BigDecimal TotalLines); - - /** Get Total Lines. - * Total of all document lines - */ - public BigDecimal getTotalLines(); - - /** Column name User1_ID */ - public static final String COLUMNNAME_User1_ID = "User1_ID"; - - /** Set User List 1. - * User defined list element #1 - */ - public void setUser1_ID (int User1_ID); - - /** Get User List 1. - * User defined list element #1 - */ - public int getUser1_ID(); - - /** Column name User2_ID */ - public static final String COLUMNNAME_User2_ID = "User2_ID"; - - /** Set User List 2. - * User defined list element #2 - */ - public void setUser2_ID (int User2_ID); - - /** Get User List 2. - * User defined list element #2 - */ - public int getUser2_ID(); - - /** Column name Volume */ - public static final String COLUMNNAME_Volume = "Volume"; - - /** Set Volume. - * Volume of a product - */ - public void setVolume (BigDecimal Volume); - - /** Get Volume. - * Volume of a product - */ - public BigDecimal getVolume(); - - /** Column name Weight */ - public static final String COLUMNNAME_Weight = "Weight"; - - /** Set Weight. - * Weight of a product - */ - public void setWeight (BigDecimal Weight); - - /** Get Weight. - * Weight of a product - */ - public BigDecimal getWeight(); -} diff --git a/base/src/org/compiere/model/I_C_OrderTax.java b/base/src/org/compiere/model/I_C_OrderTax.java index 23f391c362..3765b4d37a 100644 --- a/base/src/org/compiere/model/I_C_OrderTax.java +++ b/base/src/org/compiere/model/I_C_OrderTax.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_OrderTax * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_OrderTax { diff --git a/base/src/org/compiere/model/I_C_OrgAssignment.java b/base/src/org/compiere/model/I_C_OrgAssignment.java index e0e8391904..9167d286aa 100644 --- a/base/src/org/compiere/model/I_C_OrgAssignment.java +++ b/base/src/org/compiere/model/I_C_OrgAssignment.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_OrgAssignment * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_OrgAssignment { diff --git a/base/src/org/compiere/model/I_C_POS.java b/base/src/org/compiere/model/I_C_POS.java deleted file mode 100644 index cd7bba9e2f..0000000000 --- a/base/src/org/compiere/model/I_C_POS.java +++ /dev/null @@ -1,246 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for C_POS - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_C_POS -{ - - /** TableName=C_POS */ - public static final String Table_Name = "C_POS"; - - /** AD_Table_ID=748 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 2 - Client - */ - BigDecimal accessLevel = BigDecimal.valueOf(2); - - /** Load Meta Data */ - - /** Column name C_BPartnerCashTrx_ID */ - public static final String COLUMNNAME_C_BPartnerCashTrx_ID = "C_BPartnerCashTrx_ID"; - - /** Set Template B.Partner. - * Business Partner used for creating new Business Partners on the fly - */ - public void setC_BPartnerCashTrx_ID (int C_BPartnerCashTrx_ID); - - /** Get Template B.Partner. - * Business Partner used for creating new Business Partners on the fly - */ - public int getC_BPartnerCashTrx_ID(); - - /** Column name C_CashBook_ID */ - public static final String COLUMNNAME_C_CashBook_ID = "C_CashBook_ID"; - - /** Set Cash Book. - * Cash Book for recording petty cash transactions - */ - public void setC_CashBook_ID (int C_CashBook_ID); - - /** Get Cash Book. - * Cash Book for recording petty cash transactions - */ - public int getC_CashBook_ID(); - - public I_C_CashBook getC_CashBook() throws Exception; - - /** Column name C_DocType_ID */ - public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; - - /** Set Document Type. - * Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID); - - /** Get Document Type. - * Document type or rules - */ - public int getC_DocType_ID(); - - public I_C_DocType getC_DocType() throws Exception; - - /** Column name C_POSKeyLayout_ID */ - public static final String COLUMNNAME_C_POSKeyLayout_ID = "C_POSKeyLayout_ID"; - - /** Set POS Key Layout. - * POS Function Key Layout - */ - public void setC_POSKeyLayout_ID (int C_POSKeyLayout_ID); - - /** Get POS Key Layout. - * POS Function Key Layout - */ - public int getC_POSKeyLayout_ID(); - - public I_C_POSKeyLayout getC_POSKeyLayout() throws Exception; - - /** Column name C_POS_ID */ - public static final String COLUMNNAME_C_POS_ID = "C_POS_ID"; - - /** Set POS Terminal. - * Point of Sales Terminal - */ - public void setC_POS_ID (int C_POS_ID); - - /** Get POS Terminal. - * Point of Sales Terminal - */ - public int getC_POS_ID(); - - /** Column name CashDrawer */ - public static final String COLUMNNAME_CashDrawer = "CashDrawer"; - - /** Set CashDrawer */ - public void setCashDrawer (String CashDrawer); - - /** Get CashDrawer */ - public String getCashDrawer(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name Help */ - public static final String COLUMNNAME_Help = "Help"; - - /** Set Comment/Help. - * Comment or Hint - */ - public void setHelp (String Help); - - /** Get Comment/Help. - * Comment or Hint - */ - public String getHelp(); - - /** Column name IsModifyPrice */ - public static final String COLUMNNAME_IsModifyPrice = "IsModifyPrice"; - - /** Set Modify Price. - * Allow modifying the price - */ - public void setIsModifyPrice (boolean IsModifyPrice); - - /** Get Modify Price. - * Allow modifying the price - */ - public boolean isModifyPrice(); - - /** Column name M_PriceList_ID */ - public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; - - /** Set Price List. - * Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID); - - /** Get Price List. - * Unique identifier of a Price List - */ - public int getM_PriceList_ID(); - - public I_M_PriceList getM_PriceList() throws Exception; - - /** Column name M_Warehouse_ID */ - public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; - - /** Set Warehouse. - * Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID); - - /** Get Warehouse. - * Storage Warehouse and Service Point - */ - public int getM_Warehouse_ID(); - - public I_M_Warehouse getM_Warehouse() throws Exception; - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name PrinterName */ - public static final String COLUMNNAME_PrinterName = "PrinterName"; - - /** Set Printer Name. - * Name of the Printer - */ - public void setPrinterName (String PrinterName); - - /** Get Printer Name. - * Name of the Printer - */ - public String getPrinterName(); - - /** Column name SalesRep_ID */ - public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; - - /** Set Sales Representative. - * Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID); - - /** Get Sales Representative. - * Sales Representative or Company Agent - */ - public int getSalesRep_ID(); -} diff --git a/base/src/org/compiere/model/I_C_POSKey.java b/base/src/org/compiere/model/I_C_POSKey.java index 21ab9e5b56..8f8350dd73 100644 --- a/base/src/org/compiere/model/I_C_POSKey.java +++ b/base/src/org/compiere/model/I_C_POSKey.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_POSKey * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_POSKey { diff --git a/base/src/org/compiere/model/I_C_POSKeyLayout.java b/base/src/org/compiere/model/I_C_POSKeyLayout.java index 153e00893a..6535ff4f74 100644 --- a/base/src/org/compiere/model/I_C_POSKeyLayout.java +++ b/base/src/org/compiere/model/I_C_POSKeyLayout.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_POSKeyLayout * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_POSKeyLayout { diff --git a/base/src/org/compiere/model/I_C_PaySchedule.java b/base/src/org/compiere/model/I_C_PaySchedule.java index 0f49eea7f5..e3ac89fd8a 100644 --- a/base/src/org/compiere/model/I_C_PaySchedule.java +++ b/base/src/org/compiere/model/I_C_PaySchedule.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PaySchedule * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PaySchedule { diff --git a/base/src/org/compiere/model/I_C_PaySelection.java b/base/src/org/compiere/model/I_C_PaySelection.java index 2568a05b8a..e580b3a531 100644 --- a/base/src/org/compiere/model/I_C_PaySelection.java +++ b/base/src/org/compiere/model/I_C_PaySelection.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PaySelection * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PaySelection { diff --git a/base/src/org/compiere/model/I_C_PaySelectionCheck.java b/base/src/org/compiere/model/I_C_PaySelectionCheck.java index f08b7708b2..3e43a16f50 100644 --- a/base/src/org/compiere/model/I_C_PaySelectionCheck.java +++ b/base/src/org/compiere/model/I_C_PaySelectionCheck.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PaySelectionCheck * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PaySelectionCheck { diff --git a/base/src/org/compiere/model/I_C_PaySelectionLine.java b/base/src/org/compiere/model/I_C_PaySelectionLine.java index 6fe89f7e40..6f489cd477 100644 --- a/base/src/org/compiere/model/I_C_PaySelectionLine.java +++ b/base/src/org/compiere/model/I_C_PaySelectionLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PaySelectionLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PaySelectionLine { diff --git a/base/src/org/compiere/model/I_C_Payment.java b/base/src/org/compiere/model/I_C_Payment.java deleted file mode 100644 index 6dca19b3da..0000000000 --- a/base/src/org/compiere/model/I_C_Payment.java +++ /dev/null @@ -1,1078 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for C_Payment - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_C_Payment -{ - - /** TableName=C_Payment */ - public static final String Table_Name = "C_Payment"; - - /** AD_Table_ID=335 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 1 - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(1); - - /** Load Meta Data */ - - /** Column name AD_OrgTrx_ID */ - public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; - - /** Set Trx Organization. - * Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); - - /** Get Trx Organization. - * Performing or initiating organization - */ - public int getAD_OrgTrx_ID(); - - /** Column name A_City */ - public static final String COLUMNNAME_A_City = "A_City"; - - /** Set Account City. - * City or the Credit Card or Account Holder - */ - public void setA_City (String A_City); - - /** Get Account City. - * City or the Credit Card or Account Holder - */ - public String getA_City(); - - /** Column name A_Country */ - public static final String COLUMNNAME_A_Country = "A_Country"; - - /** Set Account Country. - * Country - */ - public void setA_Country (String A_Country); - - /** Get Account Country. - * Country - */ - public String getA_Country(); - - /** Column name A_EMail */ - public static final String COLUMNNAME_A_EMail = "A_EMail"; - - /** Set Account EMail. - * Email Address - */ - public void setA_EMail (String A_EMail); - - /** Get Account EMail. - * Email Address - */ - public String getA_EMail(); - - /** Column name A_Ident_DL */ - public static final String COLUMNNAME_A_Ident_DL = "A_Ident_DL"; - - /** Set Driver License. - * Payment Identification - Driver License - */ - public void setA_Ident_DL (String A_Ident_DL); - - /** Get Driver License. - * Payment Identification - Driver License - */ - public String getA_Ident_DL(); - - /** Column name A_Ident_SSN */ - public static final String COLUMNNAME_A_Ident_SSN = "A_Ident_SSN"; - - /** Set Social Security No. - * Payment Identification - Social Security No - */ - public void setA_Ident_SSN (String A_Ident_SSN); - - /** Get Social Security No. - * Payment Identification - Social Security No - */ - public String getA_Ident_SSN(); - - /** Column name A_Name */ - public static final String COLUMNNAME_A_Name = "A_Name"; - - /** Set Account Name. - * Name on Credit Card or Account holder - */ - public void setA_Name (String A_Name); - - /** Get Account Name. - * Name on Credit Card or Account holder - */ - public String getA_Name(); - - /** Column name A_State */ - public static final String COLUMNNAME_A_State = "A_State"; - - /** Set Account State. - * State of the Credit Card or Account holder - */ - public void setA_State (String A_State); - - /** Get Account State. - * State of the Credit Card or Account holder - */ - public String getA_State(); - - /** Column name A_Street */ - public static final String COLUMNNAME_A_Street = "A_Street"; - - /** Set Account Street. - * Street address of the Credit Card or Account holder - */ - public void setA_Street (String A_Street); - - /** Get Account Street. - * Street address of the Credit Card or Account holder - */ - public String getA_Street(); - - /** Column name A_Zip */ - public static final String COLUMNNAME_A_Zip = "A_Zip"; - - /** Set Account Zip/Postal. - * Zip Code of the Credit Card or Account Holder - */ - public void setA_Zip (String A_Zip); - - /** Get Account Zip/Postal. - * Zip Code of the Credit Card or Account Holder - */ - public String getA_Zip(); - - /** Column name AccountNo */ - public static final String COLUMNNAME_AccountNo = "AccountNo"; - - /** Set Account No. - * Account Number - */ - public void setAccountNo (String AccountNo); - - /** Get Account No. - * Account Number - */ - public String getAccountNo(); - - /** Column name C_Activity_ID */ - public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; - - /** Set Activity. - * Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID); - - /** Get Activity. - * Business Activity - */ - public int getC_Activity_ID(); - - public I_C_Activity getC_Activity() throws Exception; - - /** Column name C_BP_BankAccount_ID */ - public static final String COLUMNNAME_C_BP_BankAccount_ID = "C_BP_BankAccount_ID"; - - /** Set Partner Bank Account. - * Bank Account of the Business Partner - */ - public void setC_BP_BankAccount_ID (int C_BP_BankAccount_ID); - - /** Get Partner Bank Account. - * Bank Account of the Business Partner - */ - public int getC_BP_BankAccount_ID(); - - public I_C_BP_BankAccount getC_BP_BankAccount() throws Exception; - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public I_C_BPartner getC_BPartner() throws Exception; - - /** Column name C_BankAccount_ID */ - public static final String COLUMNNAME_C_BankAccount_ID = "C_BankAccount_ID"; - - /** Set Bank Account. - * Account at the Bank - */ - public void setC_BankAccount_ID (int C_BankAccount_ID); - - /** Get Bank Account. - * Account at the Bank - */ - public int getC_BankAccount_ID(); - - public I_C_BankAccount getC_BankAccount() throws Exception; - - /** Column name C_Campaign_ID */ - public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; - - /** Set Campaign. - * Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID); - - /** Get Campaign. - * Marketing Campaign - */ - public int getC_Campaign_ID(); - - public I_C_Campaign getC_Campaign() throws Exception; - - /** Column name C_Charge_ID */ - public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID"; - - /** Set Charge. - * Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID); - - /** Get Charge. - * Additional document charges - */ - public int getC_Charge_ID(); - - public I_C_Charge getC_Charge() throws Exception; - - /** Column name C_ConversionType_ID */ - public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID"; - - /** Set Currency Type. - * Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID); - - /** Get Currency Type. - * Currency Conversion Rate Type - */ - public int getC_ConversionType_ID(); - - public I_C_ConversionType getC_ConversionType() throws Exception; - - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name C_DocType_ID */ - public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; - - /** Set Document Type. - * Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID); - - /** Get Document Type. - * Document type or rules - */ - public int getC_DocType_ID(); - - public I_C_DocType getC_DocType() throws Exception; - - /** Column name C_Invoice_ID */ - public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID"; - - /** Set Invoice. - * Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID); - - /** Get Invoice. - * Invoice Identifier - */ - public int getC_Invoice_ID(); - - public I_C_Invoice getC_Invoice() throws Exception; - - /** Column name C_Order_ID */ - public static final String COLUMNNAME_C_Order_ID = "C_Order_ID"; - - /** Set Order. - * Order - */ - public void setC_Order_ID (int C_Order_ID); - - /** Get Order. - * Order - */ - public int getC_Order_ID(); - - public I_C_Order getC_Order() throws Exception; - - /** Column name C_PaymentBatch_ID */ - public static final String COLUMNNAME_C_PaymentBatch_ID = "C_PaymentBatch_ID"; - - /** Set Payment Batch. - * Payment batch for EFT - */ - public void setC_PaymentBatch_ID (int C_PaymentBatch_ID); - - /** Get Payment Batch. - * Payment batch for EFT - */ - public int getC_PaymentBatch_ID(); - - public I_C_PaymentBatch getC_PaymentBatch() throws Exception; - - /** Column name C_Payment_ID */ - public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID"; - - /** Set Payment. - * Payment identifier - */ - public void setC_Payment_ID (int C_Payment_ID); - - /** Get Payment. - * Payment identifier - */ - public int getC_Payment_ID(); - - /** Column name C_Project_ID */ - public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; - - /** Set Project. - * Financial Project - */ - public void setC_Project_ID (int C_Project_ID); - - /** Get Project. - * Financial Project - */ - public int getC_Project_ID(); - - public I_C_Project getC_Project() throws Exception; - - /** Column name ChargeAmt */ - public static final String COLUMNNAME_ChargeAmt = "ChargeAmt"; - - /** Set Charge amount. - * Charge Amount - */ - public void setChargeAmt (BigDecimal ChargeAmt); - - /** Get Charge amount. - * Charge Amount - */ - public BigDecimal getChargeAmt(); - - /** Column name CheckNo */ - public static final String COLUMNNAME_CheckNo = "CheckNo"; - - /** Set Check No. - * Check Number - */ - public void setCheckNo (String CheckNo); - - /** Get Check No. - * Check Number - */ - public String getCheckNo(); - - /** Column name CreditCardExpMM */ - public static final String COLUMNNAME_CreditCardExpMM = "CreditCardExpMM"; - - /** Set Exp. Month. - * Expiry Month - */ - public void setCreditCardExpMM (int CreditCardExpMM); - - /** Get Exp. Month. - * Expiry Month - */ - public int getCreditCardExpMM(); - - /** Column name CreditCardExpYY */ - public static final String COLUMNNAME_CreditCardExpYY = "CreditCardExpYY"; - - /** Set Exp. Year. - * Expiry Year - */ - public void setCreditCardExpYY (int CreditCardExpYY); - - /** Get Exp. Year. - * Expiry Year - */ - public int getCreditCardExpYY(); - - /** Column name CreditCardNumber */ - public static final String COLUMNNAME_CreditCardNumber = "CreditCardNumber"; - - /** Set Number. - * Credit Card Number - */ - public void setCreditCardNumber (String CreditCardNumber); - - /** Get Number. - * Credit Card Number - */ - public String getCreditCardNumber(); - - /** Column name CreditCardType */ - public static final String COLUMNNAME_CreditCardType = "CreditCardType"; - - /** Set Credit Card. - * Credit Card (Visa, MC, AmEx) - */ - public void setCreditCardType (String CreditCardType); - - /** Get Credit Card. - * Credit Card (Visa, MC, AmEx) - */ - public String getCreditCardType(); - - /** Column name CreditCardVV */ - public static final String COLUMNNAME_CreditCardVV = "CreditCardVV"; - - /** Set Verification Code. - * Credit Card Verification code on credit card - */ - public void setCreditCardVV (String CreditCardVV); - - /** Get Verification Code. - * Credit Card Verification code on credit card - */ - public String getCreditCardVV(); - - /** Column name DateAcct */ - public static final String COLUMNNAME_DateAcct = "DateAcct"; - - /** Set Account Date. - * Accounting Date - */ - public void setDateAcct (Timestamp DateAcct); - - /** Get Account Date. - * Accounting Date - */ - public Timestamp getDateAcct(); - - /** Column name DateTrx */ - public static final String COLUMNNAME_DateTrx = "DateTrx"; - - /** Set Transaction Date. - * Transaction Date - */ - public void setDateTrx (Timestamp DateTrx); - - /** Get Transaction Date. - * Transaction Date - */ - public Timestamp getDateTrx(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DiscountAmt */ - public static final String COLUMNNAME_DiscountAmt = "DiscountAmt"; - - /** Set Discount Amount. - * Calculated amount of discount - */ - public void setDiscountAmt (BigDecimal DiscountAmt); - - /** Get Discount Amount. - * Calculated amount of discount - */ - public BigDecimal getDiscountAmt(); - - /** Column name DocAction */ - public static final String COLUMNNAME_DocAction = "DocAction"; - - /** Set Document Action. - * The targeted status of the document - */ - public void setDocAction (String DocAction); - - /** Get Document Action. - * The targeted status of the document - */ - public String getDocAction(); - - /** Column name DocStatus */ - public static final String COLUMNNAME_DocStatus = "DocStatus"; - - /** Set Document Status. - * The current status of the document - */ - public void setDocStatus (String DocStatus); - - /** Get Document Status. - * The current status of the document - */ - public String getDocStatus(); - - /** Column name DocumentNo */ - public static final String COLUMNNAME_DocumentNo = "DocumentNo"; - - /** Set Document No. - * Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo); - - /** Get Document No. - * Document sequence number of the document - */ - public String getDocumentNo(); - - /** Column name IsAllocated */ - public static final String COLUMNNAME_IsAllocated = "IsAllocated"; - - /** Set Allocated. - * Indicates if the payment has been allocated - */ - public void setIsAllocated (boolean IsAllocated); - - /** Get Allocated. - * Indicates if the payment has been allocated - */ - public boolean isAllocated(); - - /** Column name IsApproved */ - public static final String COLUMNNAME_IsApproved = "IsApproved"; - - /** Set Approved. - * Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved); - - /** Get Approved. - * Indicates if this document requires approval - */ - public boolean isApproved(); - - /** Column name IsDelayedCapture */ - public static final String COLUMNNAME_IsDelayedCapture = "IsDelayedCapture"; - - /** Set Delayed Capture. - * Charge after Shipment - */ - public void setIsDelayedCapture (boolean IsDelayedCapture); - - /** Get Delayed Capture. - * Charge after Shipment - */ - public boolean isDelayedCapture(); - - /** Column name IsOnline */ - public static final String COLUMNNAME_IsOnline = "IsOnline"; - - /** Set Online Access. - * Can be accessed online - */ - public void setIsOnline (boolean IsOnline); - - /** Get Online Access. - * Can be accessed online - */ - public boolean isOnline(); - - /** Column name IsOverUnderPayment */ - public static final String COLUMNNAME_IsOverUnderPayment = "IsOverUnderPayment"; - - /** Set Over/Under Payment. - * Over-Payment (unallocated) or Under-Payment (partial payment) - */ - public void setIsOverUnderPayment (boolean IsOverUnderPayment); - - /** Get Over/Under Payment. - * Over-Payment (unallocated) or Under-Payment (partial payment) - */ - public boolean isOverUnderPayment(); - - /** Column name IsPrepayment */ - public static final String COLUMNNAME_IsPrepayment = "IsPrepayment"; - - /** Set Prepayment. - * The Payment/Receipt is a Prepayment - */ - public void setIsPrepayment (boolean IsPrepayment); - - /** Get Prepayment. - * The Payment/Receipt is a Prepayment - */ - public boolean isPrepayment(); - - /** Column name IsReceipt */ - public static final String COLUMNNAME_IsReceipt = "IsReceipt"; - - /** Set Receipt. - * This is a sales transaction (receipt) - */ - public void setIsReceipt (boolean IsReceipt); - - /** Get Receipt. - * This is a sales transaction (receipt) - */ - public boolean isReceipt(); - - /** Column name IsReconciled */ - public static final String COLUMNNAME_IsReconciled = "IsReconciled"; - - /** Set Reconciled. - * Payment is reconciled with bank statement - */ - public void setIsReconciled (boolean IsReconciled); - - /** Get Reconciled. - * Payment is reconciled with bank statement - */ - public boolean isReconciled(); - - /** Column name IsSelfService */ - public static final String COLUMNNAME_IsSelfService = "IsSelfService"; - - /** Set Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService); - - /** Get Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService(); - - /** Column name Micr */ - public static final String COLUMNNAME_Micr = "Micr"; - - /** Set Micr. - * Combination of routing no, account and check no - */ - public void setMicr (String Micr); - - /** Get Micr. - * Combination of routing no, account and check no - */ - public String getMicr(); - - /** Column name OProcessing */ - public static final String COLUMNNAME_OProcessing = "OProcessing"; - - /** Set Online Processing. - * This payment can be processed online - */ - public void setOProcessing (String OProcessing); - - /** Get Online Processing. - * This payment can be processed online - */ - public String getOProcessing(); - - /** Column name Orig_TrxID */ - public static final String COLUMNNAME_Orig_TrxID = "Orig_TrxID"; - - /** Set Original Transaction ID. - * Original Transaction ID - */ - public void setOrig_TrxID (String Orig_TrxID); - - /** Get Original Transaction ID. - * Original Transaction ID - */ - public String getOrig_TrxID(); - - /** Column name OverUnderAmt */ - public static final String COLUMNNAME_OverUnderAmt = "OverUnderAmt"; - - /** Set Over/Under Payment. - * Over-Payment (unallocated) or Under-Payment (partial payment) Amount - */ - public void setOverUnderAmt (BigDecimal OverUnderAmt); - - /** Get Over/Under Payment. - * Over-Payment (unallocated) or Under-Payment (partial payment) Amount - */ - public BigDecimal getOverUnderAmt(); - - /** Column name PONum */ - public static final String COLUMNNAME_PONum = "PONum"; - - /** Set PO Number. - * Purchase Order Number - */ - public void setPONum (String PONum); - - /** Get PO Number. - * Purchase Order Number - */ - public String getPONum(); - - /** Column name PayAmt */ - public static final String COLUMNNAME_PayAmt = "PayAmt"; - - /** Set Payment amount. - * Amount being paid - */ - public void setPayAmt (BigDecimal PayAmt); - - /** Get Payment amount. - * Amount being paid - */ - public BigDecimal getPayAmt(); - - /** Column name Posted */ - public static final String COLUMNNAME_Posted = "Posted"; - - /** Set Posted. - * Posting status - */ - public void setPosted (boolean Posted); - - /** Get Posted. - * Posting status - */ - public boolean isPosted(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; - - /** Set Process Now */ - public void setProcessing (boolean Processing); - - /** Get Process Now */ - public boolean isProcessing(); - - /** Column name R_AuthCode */ - public static final String COLUMNNAME_R_AuthCode = "R_AuthCode"; - - /** Set Authorization Code. - * Authorization Code returned - */ - public void setR_AuthCode (String R_AuthCode); - - /** Get Authorization Code. - * Authorization Code returned - */ - public String getR_AuthCode(); - - /** Column name R_AuthCode_DC */ - public static final String COLUMNNAME_R_AuthCode_DC = "R_AuthCode_DC"; - - /** Set Authorization Code (DC). - * Authorization Code Delayed Capture returned - */ - public void setR_AuthCode_DC (String R_AuthCode_DC); - - /** Get Authorization Code (DC). - * Authorization Code Delayed Capture returned - */ - public String getR_AuthCode_DC(); - - /** Column name R_AvsAddr */ - public static final String COLUMNNAME_R_AvsAddr = "R_AvsAddr"; - - /** Set Address verified. - * This address has been verified - */ - public void setR_AvsAddr (String R_AvsAddr); - - /** Get Address verified. - * This address has been verified - */ - public String getR_AvsAddr(); - - /** Column name R_AvsZip */ - public static final String COLUMNNAME_R_AvsZip = "R_AvsZip"; - - /** Set Zip verified. - * The Zip Code has been verified - */ - public void setR_AvsZip (String R_AvsZip); - - /** Get Zip verified. - * The Zip Code has been verified - */ - public String getR_AvsZip(); - - /** Column name R_CVV2Match */ - public static final String COLUMNNAME_R_CVV2Match = "R_CVV2Match"; - - /** Set CVV Match. - * Credit Card Verification Code Match - */ - public void setR_CVV2Match (boolean R_CVV2Match); - - /** Get CVV Match. - * Credit Card Verification Code Match - */ - public boolean isR_CVV2Match(); - - /** Column name R_Info */ - public static final String COLUMNNAME_R_Info = "R_Info"; - - /** Set Info. - * Response info - */ - public void setR_Info (String R_Info); - - /** Get Info. - * Response info - */ - public String getR_Info(); - - /** Column name R_PnRef */ - public static final String COLUMNNAME_R_PnRef = "R_PnRef"; - - /** Set Reference. - * Payment reference - */ - public void setR_PnRef (String R_PnRef); - - /** Get Reference. - * Payment reference - */ - public String getR_PnRef(); - - /** Column name R_PnRef_DC */ - public static final String COLUMNNAME_R_PnRef_DC = "R_PnRef_DC"; - - /** Set Reference (DC). - * Payment Reference Delayed Capture - */ - public void setR_PnRef_DC (String R_PnRef_DC); - - /** Get Reference (DC). - * Payment Reference Delayed Capture - */ - public String getR_PnRef_DC(); - - /** Column name R_RespMsg */ - public static final String COLUMNNAME_R_RespMsg = "R_RespMsg"; - - /** Set Response Message. - * Response message - */ - public void setR_RespMsg (String R_RespMsg); - - /** Get Response Message. - * Response message - */ - public String getR_RespMsg(); - - /** Column name R_Result */ - public static final String COLUMNNAME_R_Result = "R_Result"; - - /** Set Result. - * Result of transmission - */ - public void setR_Result (String R_Result); - - /** Get Result. - * Result of transmission - */ - public String getR_Result(); - - /** Column name Ref_Payment_ID */ - public static final String COLUMNNAME_Ref_Payment_ID = "Ref_Payment_ID"; - - /** Set Referenced Payment */ - public void setRef_Payment_ID (int Ref_Payment_ID); - - /** Get Referenced Payment */ - public int getRef_Payment_ID(); - - /** Column name RoutingNo */ - public static final String COLUMNNAME_RoutingNo = "RoutingNo"; - - /** Set Routing No. - * Bank Routing Number - */ - public void setRoutingNo (String RoutingNo); - - /** Get Routing No. - * Bank Routing Number - */ - public String getRoutingNo(); - - /** Column name Swipe */ - public static final String COLUMNNAME_Swipe = "Swipe"; - - /** Set Swipe. - * Track 1 and 2 of the Credit Card - */ - public void setSwipe (String Swipe); - - /** Get Swipe. - * Track 1 and 2 of the Credit Card - */ - public String getSwipe(); - - /** Column name TaxAmt */ - public static final String COLUMNNAME_TaxAmt = "TaxAmt"; - - /** Set Tax Amount. - * Tax Amount for a document - */ - public void setTaxAmt (BigDecimal TaxAmt); - - /** Get Tax Amount. - * Tax Amount for a document - */ - public BigDecimal getTaxAmt(); - - /** Column name TenderType */ - public static final String COLUMNNAME_TenderType = "TenderType"; - - /** Set Tender type. - * Method of Payment - */ - public void setTenderType (String TenderType); - - /** Get Tender type. - * Method of Payment - */ - public String getTenderType(); - - /** Column name TrxType */ - public static final String COLUMNNAME_TrxType = "TrxType"; - - /** Set Transaction Type. - * Type of credit card transaction - */ - public void setTrxType (String TrxType); - - /** Get Transaction Type. - * Type of credit card transaction - */ - public String getTrxType(); - - /** Column name User1_ID */ - public static final String COLUMNNAME_User1_ID = "User1_ID"; - - /** Set User List 1. - * User defined list element #1 - */ - public void setUser1_ID (int User1_ID); - - /** Get User List 1. - * User defined list element #1 - */ - public int getUser1_ID(); - - /** Column name User2_ID */ - public static final String COLUMNNAME_User2_ID = "User2_ID"; - - /** Set User List 2. - * User defined list element #2 - */ - public void setUser2_ID (int User2_ID); - - /** Get User List 2. - * User defined list element #2 - */ - public int getUser2_ID(); - - /** Column name VoiceAuthCode */ - public static final String COLUMNNAME_VoiceAuthCode = "VoiceAuthCode"; - - /** Set Voice authorization code. - * Voice Authorization Code from credit card company - */ - public void setVoiceAuthCode (String VoiceAuthCode); - - /** Get Voice authorization code. - * Voice Authorization Code from credit card company - */ - public String getVoiceAuthCode(); - - /** Column name WriteOffAmt */ - public static final String COLUMNNAME_WriteOffAmt = "WriteOffAmt"; - - /** Set Write-off Amount. - * Amount to write-off - */ - public void setWriteOffAmt (BigDecimal WriteOffAmt); - - /** Get Write-off Amount. - * Amount to write-off - */ - public BigDecimal getWriteOffAmt(); -} diff --git a/base/src/org/compiere/model/I_C_PaymentAllocate.java b/base/src/org/compiere/model/I_C_PaymentAllocate.java index d1db588d34..bc3cb75409 100644 --- a/base/src/org/compiere/model/I_C_PaymentAllocate.java +++ b/base/src/org/compiere/model/I_C_PaymentAllocate.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PaymentAllocate * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PaymentAllocate { diff --git a/base/src/org/compiere/model/I_C_PaymentBatch.java b/base/src/org/compiere/model/I_C_PaymentBatch.java index 3fcfbef6ac..d705634dc3 100644 --- a/base/src/org/compiere/model/I_C_PaymentBatch.java +++ b/base/src/org/compiere/model/I_C_PaymentBatch.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PaymentBatch * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PaymentBatch { diff --git a/base/src/org/compiere/model/I_C_PaymentProcessor.java b/base/src/org/compiere/model/I_C_PaymentProcessor.java index 6d2f82aae2..dc7b495249 100644 --- a/base/src/org/compiere/model/I_C_PaymentProcessor.java +++ b/base/src/org/compiere/model/I_C_PaymentProcessor.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PaymentProcessor * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PaymentProcessor { diff --git a/base/src/org/compiere/model/I_C_PaymentTerm.java b/base/src/org/compiere/model/I_C_PaymentTerm.java index 144d3b90f3..a4b9a0a72a 100644 --- a/base/src/org/compiere/model/I_C_PaymentTerm.java +++ b/base/src/org/compiere/model/I_C_PaymentTerm.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PaymentTerm * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PaymentTerm { diff --git a/base/src/org/compiere/model/I_C_Period.java b/base/src/org/compiere/model/I_C_Period.java index 5d5077e68e..183691ab77 100644 --- a/base/src/org/compiere/model/I_C_Period.java +++ b/base/src/org/compiere/model/I_C_Period.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Period * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Period { diff --git a/base/src/org/compiere/model/I_C_PeriodControl.java b/base/src/org/compiere/model/I_C_PeriodControl.java index 48ce00342a..675aac25b8 100644 --- a/base/src/org/compiere/model/I_C_PeriodControl.java +++ b/base/src/org/compiere/model/I_C_PeriodControl.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_PeriodControl * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_PeriodControl { diff --git a/base/src/org/compiere/model/I_C_Phase.java b/base/src/org/compiere/model/I_C_Phase.java index d656155185..38be90843b 100644 --- a/base/src/org/compiere/model/I_C_Phase.java +++ b/base/src/org/compiere/model/I_C_Phase.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Phase * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Phase { diff --git a/base/src/org/compiere/model/I_C_Project.java b/base/src/org/compiere/model/I_C_Project.java index 42e79c6259..08b6379ed9 100644 --- a/base/src/org/compiere/model/I_C_Project.java +++ b/base/src/org/compiere/model/I_C_Project.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Project * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Project { diff --git a/base/src/org/compiere/model/I_C_ProjectIssue.java b/base/src/org/compiere/model/I_C_ProjectIssue.java index 0276de5811..0495f985ad 100644 --- a/base/src/org/compiere/model/I_C_ProjectIssue.java +++ b/base/src/org/compiere/model/I_C_ProjectIssue.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ProjectIssue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ProjectIssue { diff --git a/base/src/org/compiere/model/I_C_ProjectIssueMA.java b/base/src/org/compiere/model/I_C_ProjectIssueMA.java index 3540739d4d..55d3e2d2e2 100644 --- a/base/src/org/compiere/model/I_C_ProjectIssueMA.java +++ b/base/src/org/compiere/model/I_C_ProjectIssueMA.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ProjectIssueMA * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ProjectIssueMA { diff --git a/base/src/org/compiere/model/I_C_ProjectLine.java b/base/src/org/compiere/model/I_C_ProjectLine.java index afc73a5143..b0931ca6ea 100644 --- a/base/src/org/compiere/model/I_C_ProjectLine.java +++ b/base/src/org/compiere/model/I_C_ProjectLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ProjectLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ProjectLine { diff --git a/base/src/org/compiere/model/I_C_ProjectPhase.java b/base/src/org/compiere/model/I_C_ProjectPhase.java index 4b844266e2..1729104d2b 100644 --- a/base/src/org/compiere/model/I_C_ProjectPhase.java +++ b/base/src/org/compiere/model/I_C_ProjectPhase.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ProjectPhase * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ProjectPhase { diff --git a/base/src/org/compiere/model/I_C_ProjectTask.java b/base/src/org/compiere/model/I_C_ProjectTask.java index 40b61fc37c..b3e002620d 100644 --- a/base/src/org/compiere/model/I_C_ProjectTask.java +++ b/base/src/org/compiere/model/I_C_ProjectTask.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ProjectTask * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ProjectTask { diff --git a/base/src/org/compiere/model/I_C_ProjectType.java b/base/src/org/compiere/model/I_C_ProjectType.java index 9abf3542da..32d9cd2ce4 100644 --- a/base/src/org/compiere/model/I_C_ProjectType.java +++ b/base/src/org/compiere/model/I_C_ProjectType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ProjectType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ProjectType { diff --git a/base/src/org/compiere/model/I_C_Project_Acct.java b/base/src/org/compiere/model/I_C_Project_Acct.java index 3bc8adb691..3ca2e13091 100644 --- a/base/src/org/compiere/model/I_C_Project_Acct.java +++ b/base/src/org/compiere/model/I_C_Project_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Project_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Project_Acct { diff --git a/base/src/org/compiere/model/I_C_Recurring.java b/base/src/org/compiere/model/I_C_Recurring.java index db700e7552..c6052ae773 100644 --- a/base/src/org/compiere/model/I_C_Recurring.java +++ b/base/src/org/compiere/model/I_C_Recurring.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Recurring * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Recurring { diff --git a/base/src/org/compiere/model/I_C_Recurring_Run.java b/base/src/org/compiere/model/I_C_Recurring_Run.java index 2d8661bebc..1c9c2a98a4 100644 --- a/base/src/org/compiere/model/I_C_Recurring_Run.java +++ b/base/src/org/compiere/model/I_C_Recurring_Run.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Recurring_Run * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Recurring_Run { diff --git a/base/src/org/compiere/model/I_C_Region.java b/base/src/org/compiere/model/I_C_Region.java index afc2ae6fcb..c6481b4cbb 100644 --- a/base/src/org/compiere/model/I_C_Region.java +++ b/base/src/org/compiere/model/I_C_Region.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Region * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Region { diff --git a/base/src/org/compiere/model/I_C_Remuneration.java b/base/src/org/compiere/model/I_C_Remuneration.java index 20ba890bf3..f670039774 100644 --- a/base/src/org/compiere/model/I_C_Remuneration.java +++ b/base/src/org/compiere/model/I_C_Remuneration.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Remuneration * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Remuneration { diff --git a/base/src/org/compiere/model/I_C_RevenueRecognition.java b/base/src/org/compiere/model/I_C_RevenueRecognition.java index 86eeeb5e6c..a34db32427 100644 --- a/base/src/org/compiere/model/I_C_RevenueRecognition.java +++ b/base/src/org/compiere/model/I_C_RevenueRecognition.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RevenueRecognition * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RevenueRecognition { diff --git a/base/src/org/compiere/model/I_C_RevenueRecognition_Plan.java b/base/src/org/compiere/model/I_C_RevenueRecognition_Plan.java index 7fbc52f731..bfa1fc9284 100644 --- a/base/src/org/compiere/model/I_C_RevenueRecognition_Plan.java +++ b/base/src/org/compiere/model/I_C_RevenueRecognition_Plan.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RevenueRecognition_Plan * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RevenueRecognition_Plan { diff --git a/base/src/org/compiere/model/I_C_RevenueRecognition_Run.java b/base/src/org/compiere/model/I_C_RevenueRecognition_Run.java index fa48b1b4c0..74c74db941 100644 --- a/base/src/org/compiere/model/I_C_RevenueRecognition_Run.java +++ b/base/src/org/compiere/model/I_C_RevenueRecognition_Run.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RevenueRecognition_Run * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RevenueRecognition_Run { diff --git a/base/src/org/compiere/model/I_C_RfQ.java b/base/src/org/compiere/model/I_C_RfQ.java index 0523e8fe6b..10cbf85575 100644 --- a/base/src/org/compiere/model/I_C_RfQ.java +++ b/base/src/org/compiere/model/I_C_RfQ.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQ * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQ { diff --git a/base/src/org/compiere/model/I_C_RfQLine.java b/base/src/org/compiere/model/I_C_RfQLine.java index 3f8c142a4f..ff14d1f4c2 100644 --- a/base/src/org/compiere/model/I_C_RfQLine.java +++ b/base/src/org/compiere/model/I_C_RfQLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQLine { diff --git a/base/src/org/compiere/model/I_C_RfQLineQty.java b/base/src/org/compiere/model/I_C_RfQLineQty.java index 549a5affea..30ad67ffe8 100644 --- a/base/src/org/compiere/model/I_C_RfQLineQty.java +++ b/base/src/org/compiere/model/I_C_RfQLineQty.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQLineQty * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQLineQty { diff --git a/base/src/org/compiere/model/I_C_RfQResponse.java b/base/src/org/compiere/model/I_C_RfQResponse.java index 3cb14d190c..2da19fa616 100644 --- a/base/src/org/compiere/model/I_C_RfQResponse.java +++ b/base/src/org/compiere/model/I_C_RfQResponse.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQResponse * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQResponse { diff --git a/base/src/org/compiere/model/I_C_RfQResponseLine.java b/base/src/org/compiere/model/I_C_RfQResponseLine.java index cc62c1f55f..91293aa02d 100644 --- a/base/src/org/compiere/model/I_C_RfQResponseLine.java +++ b/base/src/org/compiere/model/I_C_RfQResponseLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQResponseLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQResponseLine { diff --git a/base/src/org/compiere/model/I_C_RfQResponseLineQty.java b/base/src/org/compiere/model/I_C_RfQResponseLineQty.java index 65d68967c7..4d71234460 100644 --- a/base/src/org/compiere/model/I_C_RfQResponseLineQty.java +++ b/base/src/org/compiere/model/I_C_RfQResponseLineQty.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQResponseLineQty * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQResponseLineQty { diff --git a/base/src/org/compiere/model/I_C_RfQ_Topic.java b/base/src/org/compiere/model/I_C_RfQ_Topic.java index 5ea1c3e5d8..c1347a66bc 100644 --- a/base/src/org/compiere/model/I_C_RfQ_Topic.java +++ b/base/src/org/compiere/model/I_C_RfQ_Topic.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQ_Topic * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQ_Topic { diff --git a/base/src/org/compiere/model/I_C_RfQ_TopicSubscriber.java b/base/src/org/compiere/model/I_C_RfQ_TopicSubscriber.java index 83dedb9006..cebd4dd560 100644 --- a/base/src/org/compiere/model/I_C_RfQ_TopicSubscriber.java +++ b/base/src/org/compiere/model/I_C_RfQ_TopicSubscriber.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQ_TopicSubscriber * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQ_TopicSubscriber { diff --git a/base/src/org/compiere/model/I_C_RfQ_TopicSubscriberOnly.java b/base/src/org/compiere/model/I_C_RfQ_TopicSubscriberOnly.java index 48e832b155..a3d8a4af8a 100644 --- a/base/src/org/compiere/model/I_C_RfQ_TopicSubscriberOnly.java +++ b/base/src/org/compiere/model/I_C_RfQ_TopicSubscriberOnly.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_RfQ_TopicSubscriberOnly * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_RfQ_TopicSubscriberOnly { diff --git a/base/src/org/compiere/model/I_C_SalesRegion.java b/base/src/org/compiere/model/I_C_SalesRegion.java index fa4bae0f84..af8963c3a1 100644 --- a/base/src/org/compiere/model/I_C_SalesRegion.java +++ b/base/src/org/compiere/model/I_C_SalesRegion.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_SalesRegion * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_SalesRegion { diff --git a/base/src/org/compiere/model/I_C_ServiceLevel.java b/base/src/org/compiere/model/I_C_ServiceLevel.java index 0ed92c63dc..253ff91ab6 100644 --- a/base/src/org/compiere/model/I_C_ServiceLevel.java +++ b/base/src/org/compiere/model/I_C_ServiceLevel.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ServiceLevel * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ServiceLevel { diff --git a/base/src/org/compiere/model/I_C_ServiceLevelLine.java b/base/src/org/compiere/model/I_C_ServiceLevelLine.java index 66d9187b77..677348ef70 100644 --- a/base/src/org/compiere/model/I_C_ServiceLevelLine.java +++ b/base/src/org/compiere/model/I_C_ServiceLevelLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ServiceLevelLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ServiceLevelLine { diff --git a/base/src/org/compiere/model/I_C_SubAcct.java b/base/src/org/compiere/model/I_C_SubAcct.java index e359b8b8aa..2f7f7509fc 100644 --- a/base/src/org/compiere/model/I_C_SubAcct.java +++ b/base/src/org/compiere/model/I_C_SubAcct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_SubAcct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_SubAcct { diff --git a/base/src/org/compiere/model/I_C_Subscription.java b/base/src/org/compiere/model/I_C_Subscription.java index 1134dacfcf..75c9b13515 100644 --- a/base/src/org/compiere/model/I_C_Subscription.java +++ b/base/src/org/compiere/model/I_C_Subscription.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Subscription * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Subscription { diff --git a/base/src/org/compiere/model/I_C_SubscriptionType.java b/base/src/org/compiere/model/I_C_SubscriptionType.java index c7d0aa0a96..ec50bd2f18 100644 --- a/base/src/org/compiere/model/I_C_SubscriptionType.java +++ b/base/src/org/compiere/model/I_C_SubscriptionType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_SubscriptionType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_SubscriptionType { diff --git a/base/src/org/compiere/model/I_C_Subscription_Delivery.java b/base/src/org/compiere/model/I_C_Subscription_Delivery.java index b670184a1e..17793c7680 100644 --- a/base/src/org/compiere/model/I_C_Subscription_Delivery.java +++ b/base/src/org/compiere/model/I_C_Subscription_Delivery.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Subscription_Delivery * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Subscription_Delivery { diff --git a/base/src/org/compiere/model/I_C_Task.java b/base/src/org/compiere/model/I_C_Task.java index 1a98ff3036..07b522a1f8 100644 --- a/base/src/org/compiere/model/I_C_Task.java +++ b/base/src/org/compiere/model/I_C_Task.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Task * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Task { diff --git a/base/src/org/compiere/model/I_C_Tax.java b/base/src/org/compiere/model/I_C_Tax.java deleted file mode 100644 index 741ff2be33..0000000000 --- a/base/src/org/compiere/model/I_C_Tax.java +++ /dev/null @@ -1,308 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for C_Tax - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_C_Tax -{ - - /** TableName=C_Tax */ - public static final String Table_Name = "C_Tax"; - - /** AD_Table_ID=261 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 2 - Client - */ - BigDecimal accessLevel = BigDecimal.valueOf(2); - - /** Load Meta Data */ - - /** Column name C_Country_ID */ - public static final String COLUMNNAME_C_Country_ID = "C_Country_ID"; - - /** Set Country. - * Country - */ - public void setC_Country_ID (int C_Country_ID); - - /** Get Country. - * Country - */ - public int getC_Country_ID(); - - /** Column name C_Region_ID */ - public static final String COLUMNNAME_C_Region_ID = "C_Region_ID"; - - /** Set Region. - * Identifies a geographical Region - */ - public void setC_Region_ID (int C_Region_ID); - - /** Get Region. - * Identifies a geographical Region - */ - public int getC_Region_ID(); - - /** Column name C_TaxCategory_ID */ - public static final String COLUMNNAME_C_TaxCategory_ID = "C_TaxCategory_ID"; - - /** Set Tax Category. - * Tax Category - */ - public void setC_TaxCategory_ID (int C_TaxCategory_ID); - - /** Get Tax Category. - * Tax Category - */ - public int getC_TaxCategory_ID(); - - public I_C_TaxCategory getC_TaxCategory() throws Exception; - - /** Column name C_Tax_ID */ - public static final String COLUMNNAME_C_Tax_ID = "C_Tax_ID"; - - /** Set Tax. - * Tax identifier - */ - public void setC_Tax_ID (int C_Tax_ID); - - /** Get Tax. - * Tax identifier - */ - public int getC_Tax_ID(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name IsDefault */ - public static final String COLUMNNAME_IsDefault = "IsDefault"; - - /** Set Default. - * Default value - */ - public void setIsDefault (boolean IsDefault); - - /** Get Default. - * Default value - */ - public boolean isDefault(); - - /** Column name IsDocumentLevel */ - public static final String COLUMNNAME_IsDocumentLevel = "IsDocumentLevel"; - - /** Set Document Level. - * Tax is calculated on document level (rather than line by line) - */ - public void setIsDocumentLevel (boolean IsDocumentLevel); - - /** Get Document Level. - * Tax is calculated on document level (rather than line by line) - */ - public boolean isDocumentLevel(); - - /** Column name IsSalesTax */ - public static final String COLUMNNAME_IsSalesTax = "IsSalesTax"; - - /** Set Sales Tax. - * This is a sales tax (i.e. not a value added tax) - */ - public void setIsSalesTax (boolean IsSalesTax); - - /** Get Sales Tax. - * This is a sales tax (i.e. not a value added tax) - */ - public boolean isSalesTax(); - - /** Column name IsSummary */ - public static final String COLUMNNAME_IsSummary = "IsSummary"; - - /** Set Summary Level. - * This is a summary entity - */ - public void setIsSummary (boolean IsSummary); - - /** Get Summary Level. - * This is a summary entity - */ - public boolean isSummary(); - - /** Column name IsTaxExempt */ - public static final String COLUMNNAME_IsTaxExempt = "IsTaxExempt"; - - /** Set Tax exempt. - * Business partner is exempt from tax - */ - public void setIsTaxExempt (boolean IsTaxExempt); - - /** Get Tax exempt. - * Business partner is exempt from tax - */ - public boolean isTaxExempt(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name Parent_Tax_ID */ - public static final String COLUMNNAME_Parent_Tax_ID = "Parent_Tax_ID"; - - /** Set Parent Tax. - * Parent Tax indicates a tax that is made up of multiple taxes - */ - public void setParent_Tax_ID (int Parent_Tax_ID); - - /** Get Parent Tax. - * Parent Tax indicates a tax that is made up of multiple taxes - */ - public int getParent_Tax_ID(); - - /** Column name Rate */ - public static final String COLUMNNAME_Rate = "Rate"; - - /** Set Rate. - * Rate or Tax or Exchange - */ - public void setRate (BigDecimal Rate); - - /** Get Rate. - * Rate or Tax or Exchange - */ - public BigDecimal getRate(); - - /** Column name RequiresTaxCertificate */ - public static final String COLUMNNAME_RequiresTaxCertificate = "RequiresTaxCertificate"; - - /** Set Requires Tax Certificate. - * This tax rate requires the Business Partner to be tax exempt - */ - public void setRequiresTaxCertificate (boolean RequiresTaxCertificate); - - /** Get Requires Tax Certificate. - * This tax rate requires the Business Partner to be tax exempt - */ - public boolean isRequiresTaxCertificate(); - - /** Column name SOPOType */ - public static final String COLUMNNAME_SOPOType = "SOPOType"; - - /** Set SO/PO Type. - * Sales Tax applies to sales situations, Purchase Tax to purchase situations - */ - public void setSOPOType (String SOPOType); - - /** Get SO/PO Type. - * Sales Tax applies to sales situations, Purchase Tax to purchase situations - */ - public String getSOPOType(); - - /** Column name TaxIndicator */ - public static final String COLUMNNAME_TaxIndicator = "TaxIndicator"; - - /** Set Tax Indicator. - * Short form for Tax to be printed on documents - */ - public void setTaxIndicator (String TaxIndicator); - - /** Get Tax Indicator. - * Short form for Tax to be printed on documents - */ - public String getTaxIndicator(); - - /** Column name To_Country_ID */ - public static final String COLUMNNAME_To_Country_ID = "To_Country_ID"; - - /** Set To. - * Receiving Country - */ - public void setTo_Country_ID (int To_Country_ID); - - /** Get To. - * Receiving Country - */ - public int getTo_Country_ID(); - - /** Column name To_Region_ID */ - public static final String COLUMNNAME_To_Region_ID = "To_Region_ID"; - - /** Set To. - * Receiving Region - */ - public void setTo_Region_ID (int To_Region_ID); - - /** Get To. - * Receiving Region - */ - public int getTo_Region_ID(); - - /** Column name ValidFrom */ - public static final String COLUMNNAME_ValidFrom = "ValidFrom"; - - /** Set Valid from. - * Valid from including this date (first day) - */ - public void setValidFrom (Timestamp ValidFrom); - - /** Get Valid from. - * Valid from including this date (first day) - */ - public Timestamp getValidFrom(); -} diff --git a/base/src/org/compiere/model/I_C_TaxCategory.java b/base/src/org/compiere/model/I_C_TaxCategory.java index f3f8d73d89..fce89c9ccc 100644 --- a/base/src/org/compiere/model/I_C_TaxCategory.java +++ b/base/src/org/compiere/model/I_C_TaxCategory.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_TaxCategory * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_TaxCategory { diff --git a/base/src/org/compiere/model/I_C_TaxDeclaration.java b/base/src/org/compiere/model/I_C_TaxDeclaration.java index da8c6c54f3..5734f77791 100644 --- a/base/src/org/compiere/model/I_C_TaxDeclaration.java +++ b/base/src/org/compiere/model/I_C_TaxDeclaration.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_TaxDeclaration * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_TaxDeclaration { diff --git a/base/src/org/compiere/model/I_C_TaxDeclarationAcct.java b/base/src/org/compiere/model/I_C_TaxDeclarationAcct.java index f9c1cf1ffe..6d3ac410cc 100644 --- a/base/src/org/compiere/model/I_C_TaxDeclarationAcct.java +++ b/base/src/org/compiere/model/I_C_TaxDeclarationAcct.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_TaxDeclarationAcct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_TaxDeclarationAcct { @@ -245,6 +245,8 @@ public interface I_C_TaxDeclarationAcct /** Get Accounting Fact */ public int getFact_Acct_ID(); + public I_Fact_Acct getFact_Acct() throws Exception; + /** Column name Line */ public static final String COLUMNNAME_Line = "Line"; diff --git a/base/src/org/compiere/model/I_C_TaxDeclarationLine.java b/base/src/org/compiere/model/I_C_TaxDeclarationLine.java index 480ed934bc..8d4e4eaf87 100644 --- a/base/src/org/compiere/model/I_C_TaxDeclarationLine.java +++ b/base/src/org/compiere/model/I_C_TaxDeclarationLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_TaxDeclarationLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_TaxDeclarationLine { diff --git a/base/src/org/compiere/model/I_C_TaxPostal.java b/base/src/org/compiere/model/I_C_TaxPostal.java index 1f46144ac4..45504573a0 100644 --- a/base/src/org/compiere/model/I_C_TaxPostal.java +++ b/base/src/org/compiere/model/I_C_TaxPostal.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_TaxPostal * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_TaxPostal { diff --git a/base/src/org/compiere/model/I_C_Tax_Acct.java b/base/src/org/compiere/model/I_C_Tax_Acct.java index de0ccc1e69..05af168848 100644 --- a/base/src/org/compiere/model/I_C_Tax_Acct.java +++ b/base/src/org/compiere/model/I_C_Tax_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Tax_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Tax_Acct { diff --git a/base/src/org/compiere/model/I_C_UOM.java b/base/src/org/compiere/model/I_C_UOM.java index 83dd526e32..12de535b0a 100644 --- a/base/src/org/compiere/model/I_C_UOM.java +++ b/base/src/org/compiere/model/I_C_UOM.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_UOM * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_UOM { diff --git a/base/src/org/compiere/model/I_C_UOM_Conversion.java b/base/src/org/compiere/model/I_C_UOM_Conversion.java index 2de428d74e..97597ad307 100644 --- a/base/src/org/compiere/model/I_C_UOM_Conversion.java +++ b/base/src/org/compiere/model/I_C_UOM_Conversion.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_UOM_Conversion * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_UOM_Conversion { diff --git a/base/src/org/compiere/model/I_C_UserRemuneration.java b/base/src/org/compiere/model/I_C_UserRemuneration.java index f101c23317..eb3344088d 100644 --- a/base/src/org/compiere/model/I_C_UserRemuneration.java +++ b/base/src/org/compiere/model/I_C_UserRemuneration.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_UserRemuneration * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_UserRemuneration { diff --git a/base/src/org/compiere/model/I_C_ValidCombination.java b/base/src/org/compiere/model/I_C_ValidCombination.java index df7227d9f1..72be8443bc 100644 --- a/base/src/org/compiere/model/I_C_ValidCombination.java +++ b/base/src/org/compiere/model/I_C_ValidCombination.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_ValidCombination * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_ValidCombination { diff --git a/base/src/org/compiere/model/I_C_Withholding.java b/base/src/org/compiere/model/I_C_Withholding.java index a9f6e96b86..52a1cb2c97 100644 --- a/base/src/org/compiere/model/I_C_Withholding.java +++ b/base/src/org/compiere/model/I_C_Withholding.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Withholding * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Withholding { diff --git a/base/src/org/compiere/model/I_C_Withholding_Acct.java b/base/src/org/compiere/model/I_C_Withholding_Acct.java index f958e06d01..8b0968126a 100644 --- a/base/src/org/compiere/model/I_C_Withholding_Acct.java +++ b/base/src/org/compiere/model/I_C_Withholding_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Withholding_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Withholding_Acct { diff --git a/base/src/org/compiere/model/I_C_Year.java b/base/src/org/compiere/model/I_C_Year.java index fb5a409e33..72cb629b08 100644 --- a/base/src/org/compiere/model/I_C_Year.java +++ b/base/src/org/compiere/model/I_C_Year.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for C_Year * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_C_Year { diff --git a/base/src/org/compiere/model/I_DD_Order_Header_v.java b/base/src/org/compiere/model/I_DD_Order_Header_v.java new file mode 100644 index 0000000000..809b5ff389 --- /dev/null +++ b/base/src/org/compiere/model/I_DD_Order_Header_v.java @@ -0,0 +1,58 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for DD_Order_Header_v + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_DD_Order_Header_v +{ + + /** TableName=DD_Order_Header_v */ + public static final String Table_Name = "DD_Order_Header_v"; + + /** AD_Table_ID=53039 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ +} diff --git a/base/src/org/compiere/model/I_Fact_Acct.java b/base/src/org/compiere/model/I_Fact_Acct.java index f8310fc6b0..ac65f0566c 100644 --- a/base/src/org/compiere/model/I_Fact_Acct.java +++ b/base/src/org/compiere/model/I_Fact_Acct.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for Fact_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_Fact_Acct { diff --git a/base/src/org/compiere/model/I_Fact_Acct_Balance.java b/base/src/org/compiere/model/I_Fact_Acct_Balance.java index 33186a5a28..78b53d893f 100644 --- a/base/src/org/compiere/model/I_Fact_Acct_Balance.java +++ b/base/src/org/compiere/model/I_Fact_Acct_Balance.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for Fact_Acct_Balance * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_Fact_Acct_Balance { diff --git a/base/src/org/compiere/model/I_GL_Budget.java b/base/src/org/compiere/model/I_GL_Budget.java index 127f3bd5e2..eeaf555dc8 100644 --- a/base/src/org/compiere/model/I_GL_Budget.java +++ b/base/src/org/compiere/model/I_GL_Budget.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for GL_Budget * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_GL_Budget { diff --git a/base/src/org/compiere/model/I_GL_BudgetControl.java b/base/src/org/compiere/model/I_GL_BudgetControl.java index 75114f69f3..f18b367e7f 100644 --- a/base/src/org/compiere/model/I_GL_BudgetControl.java +++ b/base/src/org/compiere/model/I_GL_BudgetControl.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for GL_BudgetControl * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_GL_BudgetControl { diff --git a/base/src/org/compiere/model/I_GL_Category.java b/base/src/org/compiere/model/I_GL_Category.java index 2bc4b241a6..2b058cc01e 100644 --- a/base/src/org/compiere/model/I_GL_Category.java +++ b/base/src/org/compiere/model/I_GL_Category.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for GL_Category * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_GL_Category { diff --git a/base/src/org/compiere/model/I_GL_Distribution.java b/base/src/org/compiere/model/I_GL_Distribution.java index 5fc1713d89..04e5c5a193 100644 --- a/base/src/org/compiere/model/I_GL_Distribution.java +++ b/base/src/org/compiere/model/I_GL_Distribution.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for GL_Distribution * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_GL_Distribution { diff --git a/base/src/org/compiere/model/I_GL_DistributionLine.java b/base/src/org/compiere/model/I_GL_DistributionLine.java index 58ee6b97ad..a5fe92dfaf 100644 --- a/base/src/org/compiere/model/I_GL_DistributionLine.java +++ b/base/src/org/compiere/model/I_GL_DistributionLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for GL_DistributionLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_GL_DistributionLine { diff --git a/base/src/org/compiere/model/I_GL_Fund.java b/base/src/org/compiere/model/I_GL_Fund.java index 33bb83ffc4..7791a046f3 100644 --- a/base/src/org/compiere/model/I_GL_Fund.java +++ b/base/src/org/compiere/model/I_GL_Fund.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for GL_Fund * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_GL_Fund { diff --git a/base/src/org/compiere/model/I_GL_FundRestriction.java b/base/src/org/compiere/model/I_GL_FundRestriction.java index 3a0d8af35b..2b867d9d1e 100644 --- a/base/src/org/compiere/model/I_GL_FundRestriction.java +++ b/base/src/org/compiere/model/I_GL_FundRestriction.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for GL_FundRestriction * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_GL_FundRestriction { diff --git a/base/src/org/compiere/model/I_GL_Journal.java b/base/src/org/compiere/model/I_GL_Journal.java deleted file mode 100644 index 91af479be7..0000000000 --- a/base/src/org/compiere/model/I_GL_Journal.java +++ /dev/null @@ -1,394 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for GL_Journal - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_GL_Journal -{ - - /** TableName=GL_Journal */ - public static final String Table_Name = "GL_Journal"; - - /** AD_Table_ID=224 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 1 - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(1); - - /** Load Meta Data */ - - /** Column name C_AcctSchema_ID */ - public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID"; - - /** Set Accounting Schema. - * Rules for accounting - */ - public void setC_AcctSchema_ID (int C_AcctSchema_ID); - - /** Get Accounting Schema. - * Rules for accounting - */ - public int getC_AcctSchema_ID(); - - public I_C_AcctSchema getC_AcctSchema() throws Exception; - - /** Column name C_ConversionType_ID */ - public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID"; - - /** Set Currency Type. - * Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID); - - /** Get Currency Type. - * Currency Conversion Rate Type - */ - public int getC_ConversionType_ID(); - - public I_C_ConversionType getC_ConversionType() throws Exception; - - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name C_DocType_ID */ - public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; - - /** Set Document Type. - * Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID); - - /** Get Document Type. - * Document type or rules - */ - public int getC_DocType_ID(); - - public I_C_DocType getC_DocType() throws Exception; - - /** Column name C_Period_ID */ - public static final String COLUMNNAME_C_Period_ID = "C_Period_ID"; - - /** Set Period. - * Period of the Calendar - */ - public void setC_Period_ID (int C_Period_ID); - - /** Get Period. - * Period of the Calendar - */ - public int getC_Period_ID(); - - /** Column name ControlAmt */ - public static final String COLUMNNAME_ControlAmt = "ControlAmt"; - - /** Set Control Amount. - * If not zero, the Debit amount of the document must be equal this amount - */ - public void setControlAmt (BigDecimal ControlAmt); - - /** Get Control Amount. - * If not zero, the Debit amount of the document must be equal this amount - */ - public BigDecimal getControlAmt(); - - /** Column name CurrencyRate */ - public static final String COLUMNNAME_CurrencyRate = "CurrencyRate"; - - /** Set Rate. - * Currency Conversion Rate - */ - public void setCurrencyRate (BigDecimal CurrencyRate); - - /** Get Rate. - * Currency Conversion Rate - */ - public BigDecimal getCurrencyRate(); - - /** Column name DateAcct */ - public static final String COLUMNNAME_DateAcct = "DateAcct"; - - /** Set Account Date. - * Accounting Date - */ - public void setDateAcct (Timestamp DateAcct); - - /** Get Account Date. - * Accounting Date - */ - public Timestamp getDateAcct(); - - /** Column name DateDoc */ - public static final String COLUMNNAME_DateDoc = "DateDoc"; - - /** Set Document Date. - * Date of the Document - */ - public void setDateDoc (Timestamp DateDoc); - - /** Get Document Date. - * Date of the Document - */ - public Timestamp getDateDoc(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DocAction */ - public static final String COLUMNNAME_DocAction = "DocAction"; - - /** Set Document Action. - * The targeted status of the document - */ - public void setDocAction (String DocAction); - - /** Get Document Action. - * The targeted status of the document - */ - public String getDocAction(); - - /** Column name DocStatus */ - public static final String COLUMNNAME_DocStatus = "DocStatus"; - - /** Set Document Status. - * The current status of the document - */ - public void setDocStatus (String DocStatus); - - /** Get Document Status. - * The current status of the document - */ - public String getDocStatus(); - - /** Column name DocumentNo */ - public static final String COLUMNNAME_DocumentNo = "DocumentNo"; - - /** Set Document No. - * Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo); - - /** Get Document No. - * Document sequence number of the document - */ - public String getDocumentNo(); - - /** Column name GL_Budget_ID */ - public static final String COLUMNNAME_GL_Budget_ID = "GL_Budget_ID"; - - /** Set Budget. - * General Ledger Budget - */ - public void setGL_Budget_ID (int GL_Budget_ID); - - /** Get Budget. - * General Ledger Budget - */ - public int getGL_Budget_ID(); - - public I_GL_Budget getGL_Budget() throws Exception; - - /** Column name GL_Category_ID */ - public static final String COLUMNNAME_GL_Category_ID = "GL_Category_ID"; - - /** Set GL Category. - * General Ledger Category - */ - public void setGL_Category_ID (int GL_Category_ID); - - /** Get GL Category. - * General Ledger Category - */ - public int getGL_Category_ID(); - - public I_GL_Category getGL_Category() throws Exception; - - /** Column name GL_JournalBatch_ID */ - public static final String COLUMNNAME_GL_JournalBatch_ID = "GL_JournalBatch_ID"; - - /** Set Journal Batch. - * General Ledger Journal Batch - */ - public void setGL_JournalBatch_ID (int GL_JournalBatch_ID); - - /** Get Journal Batch. - * General Ledger Journal Batch - */ - public int getGL_JournalBatch_ID(); - - public I_GL_JournalBatch getGL_JournalBatch() throws Exception; - - /** Column name GL_Journal_ID */ - public static final String COLUMNNAME_GL_Journal_ID = "GL_Journal_ID"; - - /** Set Journal. - * General Ledger Journal - */ - public void setGL_Journal_ID (int GL_Journal_ID); - - /** Get Journal. - * General Ledger Journal - */ - public int getGL_Journal_ID(); - - /** Column name IsApproved */ - public static final String COLUMNNAME_IsApproved = "IsApproved"; - - /** Set Approved. - * Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved); - - /** Get Approved. - * Indicates if this document requires approval - */ - public boolean isApproved(); - - /** Column name IsPrinted */ - public static final String COLUMNNAME_IsPrinted = "IsPrinted"; - - /** Set Printed. - * Indicates if this document / line is printed - */ - public void setIsPrinted (boolean IsPrinted); - - /** Get Printed. - * Indicates if this document / line is printed - */ - public boolean isPrinted(); - - /** Column name Posted */ - public static final String COLUMNNAME_Posted = "Posted"; - - /** Set Posted. - * Posting status - */ - public void setPosted (boolean Posted); - - /** Get Posted. - * Posting status - */ - public boolean isPosted(); - - /** Column name PostingType */ - public static final String COLUMNNAME_PostingType = "PostingType"; - - /** Set PostingType. - * The type of posted amount for the transaction - */ - public void setPostingType (String PostingType); - - /** Get PostingType. - * The type of posted amount for the transaction - */ - public String getPostingType(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; - - /** Set Process Now */ - public void setProcessing (boolean Processing); - - /** Get Process Now */ - public boolean isProcessing(); - - /** Column name TotalCr */ - public static final String COLUMNNAME_TotalCr = "TotalCr"; - - /** Set Total Credit. - * Total Credit in document currency - */ - public void setTotalCr (BigDecimal TotalCr); - - /** Get Total Credit. - * Total Credit in document currency - */ - public BigDecimal getTotalCr(); - - /** Column name TotalDr */ - public static final String COLUMNNAME_TotalDr = "TotalDr"; - - /** Set Total Debit. - * Total debit in document currency - */ - public void setTotalDr (BigDecimal TotalDr); - - /** Get Total Debit. - * Total debit in document currency - */ - public BigDecimal getTotalDr(); -} diff --git a/base/src/org/compiere/model/I_GL_JournalBatch.java b/base/src/org/compiere/model/I_GL_JournalBatch.java deleted file mode 100644 index 5533fde084..0000000000 --- a/base/src/org/compiere/model/I_GL_JournalBatch.java +++ /dev/null @@ -1,308 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for GL_JournalBatch - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_GL_JournalBatch -{ - - /** TableName=GL_JournalBatch */ - public static final String Table_Name = "GL_JournalBatch"; - - /** AD_Table_ID=225 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 1 - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(1); - - /** Load Meta Data */ - - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name C_DocType_ID */ - public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; - - /** Set Document Type. - * Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID); - - /** Get Document Type. - * Document type or rules - */ - public int getC_DocType_ID(); - - public I_C_DocType getC_DocType() throws Exception; - - /** Column name C_Period_ID */ - public static final String COLUMNNAME_C_Period_ID = "C_Period_ID"; - - /** Set Period. - * Period of the Calendar - */ - public void setC_Period_ID (int C_Period_ID); - - /** Get Period. - * Period of the Calendar - */ - public int getC_Period_ID(); - - /** Column name ControlAmt */ - public static final String COLUMNNAME_ControlAmt = "ControlAmt"; - - /** Set Control Amount. - * If not zero, the Debit amount of the document must be equal this amount - */ - public void setControlAmt (BigDecimal ControlAmt); - - /** Get Control Amount. - * If not zero, the Debit amount of the document must be equal this amount - */ - public BigDecimal getControlAmt(); - - /** Column name CopyFrom */ - public static final String COLUMNNAME_CopyFrom = "CopyFrom"; - - /** Set Copy From. - * Copy From Record - */ - public void setCopyFrom (String CopyFrom); - - /** Get Copy From. - * Copy From Record - */ - public String getCopyFrom(); - - /** Column name DateAcct */ - public static final String COLUMNNAME_DateAcct = "DateAcct"; - - /** Set Account Date. - * Accounting Date - */ - public void setDateAcct (Timestamp DateAcct); - - /** Get Account Date. - * Accounting Date - */ - public Timestamp getDateAcct(); - - /** Column name DateDoc */ - public static final String COLUMNNAME_DateDoc = "DateDoc"; - - /** Set Document Date. - * Date of the Document - */ - public void setDateDoc (Timestamp DateDoc); - - /** Get Document Date. - * Date of the Document - */ - public Timestamp getDateDoc(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DocAction */ - public static final String COLUMNNAME_DocAction = "DocAction"; - - /** Set Document Action. - * The targeted status of the document - */ - public void setDocAction (String DocAction); - - /** Get Document Action. - * The targeted status of the document - */ - public String getDocAction(); - - /** Column name DocStatus */ - public static final String COLUMNNAME_DocStatus = "DocStatus"; - - /** Set Document Status. - * The current status of the document - */ - public void setDocStatus (String DocStatus); - - /** Get Document Status. - * The current status of the document - */ - public String getDocStatus(); - - /** Column name DocumentNo */ - public static final String COLUMNNAME_DocumentNo = "DocumentNo"; - - /** Set Document No. - * Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo); - - /** Get Document No. - * Document sequence number of the document - */ - public String getDocumentNo(); - - /** Column name GL_Category_ID */ - public static final String COLUMNNAME_GL_Category_ID = "GL_Category_ID"; - - /** Set GL Category. - * General Ledger Category - */ - public void setGL_Category_ID (int GL_Category_ID); - - /** Get GL Category. - * General Ledger Category - */ - public int getGL_Category_ID(); - - public I_GL_Category getGL_Category() throws Exception; - - /** Column name GL_JournalBatch_ID */ - public static final String COLUMNNAME_GL_JournalBatch_ID = "GL_JournalBatch_ID"; - - /** Set Journal Batch. - * General Ledger Journal Batch - */ - public void setGL_JournalBatch_ID (int GL_JournalBatch_ID); - - /** Get Journal Batch. - * General Ledger Journal Batch - */ - public int getGL_JournalBatch_ID(); - - /** Column name IsApproved */ - public static final String COLUMNNAME_IsApproved = "IsApproved"; - - /** Set Approved. - * Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved); - - /** Get Approved. - * Indicates if this document requires approval - */ - public boolean isApproved(); - - /** Column name PostingType */ - public static final String COLUMNNAME_PostingType = "PostingType"; - - /** Set PostingType. - * The type of posted amount for the transaction - */ - public void setPostingType (String PostingType); - - /** Get PostingType. - * The type of posted amount for the transaction - */ - public String getPostingType(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; - - /** Set Process Now */ - public void setProcessing (boolean Processing); - - /** Get Process Now */ - public boolean isProcessing(); - - /** Column name TotalCr */ - public static final String COLUMNNAME_TotalCr = "TotalCr"; - - /** Set Total Credit. - * Total Credit in document currency - */ - public void setTotalCr (BigDecimal TotalCr); - - /** Get Total Credit. - * Total Credit in document currency - */ - public BigDecimal getTotalCr(); - - /** Column name TotalDr */ - public static final String COLUMNNAME_TotalDr = "TotalDr"; - - /** Set Total Debit. - * Total debit in document currency - */ - public void setTotalDr (BigDecimal TotalDr); - - /** Get Total Debit. - * Total debit in document currency - */ - public BigDecimal getTotalDr(); -} diff --git a/base/src/org/compiere/model/I_GL_JournalLine.java b/base/src/org/compiere/model/I_GL_JournalLine.java index 902ad4445f..495ef9b887 100644 --- a/base/src/org/compiere/model/I_GL_JournalLine.java +++ b/base/src/org/compiere/model/I_GL_JournalLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for GL_JournalLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_GL_JournalLine { diff --git a/base/src/org/compiere/model/I_I_BPartner.java b/base/src/org/compiere/model/I_I_BPartner.java index 6c8e49a8b5..0ee6242e90 100644 --- a/base/src/org/compiere/model/I_I_BPartner.java +++ b/base/src/org/compiere/model/I_I_BPartner.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_BPartner * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_BPartner { diff --git a/base/src/org/compiere/model/I_I_BankStatement.java b/base/src/org/compiere/model/I_I_BankStatement.java index a81728ec16..3d50615af5 100644 --- a/base/src/org/compiere/model/I_I_BankStatement.java +++ b/base/src/org/compiere/model/I_I_BankStatement.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_BankStatement * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_BankStatement { diff --git a/base/src/org/compiere/model/I_I_Conversion_Rate.java b/base/src/org/compiere/model/I_I_Conversion_Rate.java index f1b5a536dc..262b978bc6 100644 --- a/base/src/org/compiere/model/I_I_Conversion_Rate.java +++ b/base/src/org/compiere/model/I_I_Conversion_Rate.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_Conversion_Rate * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_Conversion_Rate { diff --git a/base/src/org/compiere/model/I_I_ElementValue.java b/base/src/org/compiere/model/I_I_ElementValue.java index a14107ce9e..4018cbfcf5 100644 --- a/base/src/org/compiere/model/I_I_ElementValue.java +++ b/base/src/org/compiere/model/I_I_ElementValue.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_ElementValue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_ElementValue { diff --git a/base/src/org/compiere/model/I_I_GLJournal.java b/base/src/org/compiere/model/I_I_GLJournal.java index 423430b74d..d9fa9e9e55 100644 --- a/base/src/org/compiere/model/I_I_GLJournal.java +++ b/base/src/org/compiere/model/I_I_GLJournal.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_GLJournal * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_GLJournal { diff --git a/base/src/org/compiere/model/I_I_InOutLineConfirm.java b/base/src/org/compiere/model/I_I_InOutLineConfirm.java index 4c4d67476d..2590457a34 100644 --- a/base/src/org/compiere/model/I_I_InOutLineConfirm.java +++ b/base/src/org/compiere/model/I_I_InOutLineConfirm.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_InOutLineConfirm * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_InOutLineConfirm { diff --git a/base/src/org/compiere/model/I_I_Inventory.java b/base/src/org/compiere/model/I_I_Inventory.java index e564a6b761..7fa73b8339 100644 --- a/base/src/org/compiere/model/I_I_Inventory.java +++ b/base/src/org/compiere/model/I_I_Inventory.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_Inventory * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_Inventory { diff --git a/base/src/org/compiere/model/I_I_Invoice.java b/base/src/org/compiere/model/I_I_Invoice.java index 28df03451a..8cac4707c5 100644 --- a/base/src/org/compiere/model/I_I_Invoice.java +++ b/base/src/org/compiere/model/I_I_Invoice.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_Invoice * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_Invoice { diff --git a/base/src/org/compiere/model/I_I_Order.java b/base/src/org/compiere/model/I_I_Order.java index 028d9deacb..322a024392 100644 --- a/base/src/org/compiere/model/I_I_Order.java +++ b/base/src/org/compiere/model/I_I_Order.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_Order * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_Order { diff --git a/base/src/org/compiere/model/I_I_Payment.java b/base/src/org/compiere/model/I_I_Payment.java index b30cf6bc77..c58050b4ab 100644 --- a/base/src/org/compiere/model/I_I_Payment.java +++ b/base/src/org/compiere/model/I_I_Payment.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_Payment * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_Payment { diff --git a/base/src/org/compiere/model/I_I_Product.java b/base/src/org/compiere/model/I_I_Product.java index 740a888fee..025ffe9171 100644 --- a/base/src/org/compiere/model/I_I_Product.java +++ b/base/src/org/compiere/model/I_I_Product.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_Product * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_Product { diff --git a/base/src/org/compiere/model/I_I_ReportLine.java b/base/src/org/compiere/model/I_I_ReportLine.java index 27a5e80c92..7e5ac15d97 100644 --- a/base/src/org/compiere/model/I_I_ReportLine.java +++ b/base/src/org/compiere/model/I_I_ReportLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_ReportLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_I_ReportLine { diff --git a/base/src/org/compiere/model/I_K_Category.java b/base/src/org/compiere/model/I_K_Category.java index 6777c47979..3be6c20780 100644 --- a/base/src/org/compiere/model/I_K_Category.java +++ b/base/src/org/compiere/model/I_K_Category.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_Category * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_Category { diff --git a/base/src/org/compiere/model/I_K_CategoryValue.java b/base/src/org/compiere/model/I_K_CategoryValue.java index 34d310929d..0c744122bc 100644 --- a/base/src/org/compiere/model/I_K_CategoryValue.java +++ b/base/src/org/compiere/model/I_K_CategoryValue.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_CategoryValue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_CategoryValue { diff --git a/base/src/org/compiere/model/I_K_Comment.java b/base/src/org/compiere/model/I_K_Comment.java index 9932e0e2aa..1347dea5cb 100644 --- a/base/src/org/compiere/model/I_K_Comment.java +++ b/base/src/org/compiere/model/I_K_Comment.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_Comment * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_Comment { diff --git a/base/src/org/compiere/model/I_K_Entry.java b/base/src/org/compiere/model/I_K_Entry.java index b7cf1d5d60..b9d1bea2e6 100644 --- a/base/src/org/compiere/model/I_K_Entry.java +++ b/base/src/org/compiere/model/I_K_Entry.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_Entry * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_Entry { diff --git a/base/src/org/compiere/model/I_K_EntryCategory.java b/base/src/org/compiere/model/I_K_EntryCategory.java index 77349dca93..4a33e186c2 100644 --- a/base/src/org/compiere/model/I_K_EntryCategory.java +++ b/base/src/org/compiere/model/I_K_EntryCategory.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_EntryCategory * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_EntryCategory { diff --git a/base/src/org/compiere/model/I_K_EntryRelated.java b/base/src/org/compiere/model/I_K_EntryRelated.java index debb97e079..902b9c4cd2 100644 --- a/base/src/org/compiere/model/I_K_EntryRelated.java +++ b/base/src/org/compiere/model/I_K_EntryRelated.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_EntryRelated * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_EntryRelated { diff --git a/base/src/org/compiere/model/I_K_Index.java b/base/src/org/compiere/model/I_K_Index.java index 41ed9a3930..4469b01904 100644 --- a/base/src/org/compiere/model/I_K_Index.java +++ b/base/src/org/compiere/model/I_K_Index.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_Index * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_Index { diff --git a/base/src/org/compiere/model/I_K_IndexLog.java b/base/src/org/compiere/model/I_K_IndexLog.java index cea6da8b87..10d16f2f79 100644 --- a/base/src/org/compiere/model/I_K_IndexLog.java +++ b/base/src/org/compiere/model/I_K_IndexLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_IndexLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_IndexLog { diff --git a/base/src/org/compiere/model/I_K_IndexStop.java b/base/src/org/compiere/model/I_K_IndexStop.java index 7b9340aa42..3449322e14 100644 --- a/base/src/org/compiere/model/I_K_IndexStop.java +++ b/base/src/org/compiere/model/I_K_IndexStop.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_IndexStop * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_IndexStop { diff --git a/base/src/org/compiere/model/I_K_Source.java b/base/src/org/compiere/model/I_K_Source.java index ebca71a51e..b4201ba2c8 100644 --- a/base/src/org/compiere/model/I_K_Source.java +++ b/base/src/org/compiere/model/I_K_Source.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_Source * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_Source { diff --git a/base/src/org/compiere/model/I_K_Synonym.java b/base/src/org/compiere/model/I_K_Synonym.java index 28531c5d37..2ba0097332 100644 --- a/base/src/org/compiere/model/I_K_Synonym.java +++ b/base/src/org/compiere/model/I_K_Synonym.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_Synonym * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_Synonym { diff --git a/base/src/org/compiere/model/I_K_Topic.java b/base/src/org/compiere/model/I_K_Topic.java index 312ac42b2f..1414c3003b 100644 --- a/base/src/org/compiere/model/I_K_Topic.java +++ b/base/src/org/compiere/model/I_K_Topic.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_Topic * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_Topic { diff --git a/base/src/org/compiere/model/I_K_Type.java b/base/src/org/compiere/model/I_K_Type.java index 6b3a3617b1..9d6a89ef57 100644 --- a/base/src/org/compiere/model/I_K_Type.java +++ b/base/src/org/compiere/model/I_K_Type.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for K_Type * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_K_Type { diff --git a/base/src/org/compiere/model/I_M_Attribute.java b/base/src/org/compiere/model/I_M_Attribute.java index ddba0caca6..cac50a0fb0 100644 --- a/base/src/org/compiere/model/I_M_Attribute.java +++ b/base/src/org/compiere/model/I_M_Attribute.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Attribute * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Attribute { diff --git a/base/src/org/compiere/model/I_M_AttributeInstance.java b/base/src/org/compiere/model/I_M_AttributeInstance.java index e58dd2757b..60c04ffdd4 100644 --- a/base/src/org/compiere/model/I_M_AttributeInstance.java +++ b/base/src/org/compiere/model/I_M_AttributeInstance.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_AttributeInstance * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_AttributeInstance { diff --git a/base/src/org/compiere/model/I_M_AttributeSearch.java b/base/src/org/compiere/model/I_M_AttributeSearch.java index cfb226d036..cf0f007a97 100644 --- a/base/src/org/compiere/model/I_M_AttributeSearch.java +++ b/base/src/org/compiere/model/I_M_AttributeSearch.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_AttributeSearch * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_AttributeSearch { diff --git a/base/src/org/compiere/model/I_M_AttributeSet.java b/base/src/org/compiere/model/I_M_AttributeSet.java index 8aba0ee47e..24676c29db 100644 --- a/base/src/org/compiere/model/I_M_AttributeSet.java +++ b/base/src/org/compiere/model/I_M_AttributeSet.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_AttributeSet * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_AttributeSet { diff --git a/base/src/org/compiere/model/I_M_AttributeSetExclude.java b/base/src/org/compiere/model/I_M_AttributeSetExclude.java index bf9f7bf151..8cdaa1a43f 100644 --- a/base/src/org/compiere/model/I_M_AttributeSetExclude.java +++ b/base/src/org/compiere/model/I_M_AttributeSetExclude.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_AttributeSetExclude * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_AttributeSetExclude { diff --git a/base/src/org/compiere/model/I_M_AttributeSetInstance.java b/base/src/org/compiere/model/I_M_AttributeSetInstance.java index 62647ea9a4..d7a94e7e8e 100644 --- a/base/src/org/compiere/model/I_M_AttributeSetInstance.java +++ b/base/src/org/compiere/model/I_M_AttributeSetInstance.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_AttributeSetInstance * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_AttributeSetInstance { diff --git a/base/src/org/compiere/model/I_M_AttributeUse.java b/base/src/org/compiere/model/I_M_AttributeUse.java index 58a238272a..d9bfd74ee6 100644 --- a/base/src/org/compiere/model/I_M_AttributeUse.java +++ b/base/src/org/compiere/model/I_M_AttributeUse.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_AttributeUse * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_AttributeUse { diff --git a/base/src/org/compiere/model/I_M_AttributeValue.java b/base/src/org/compiere/model/I_M_AttributeValue.java index 54b4c0bf7c..632733197a 100644 --- a/base/src/org/compiere/model/I_M_AttributeValue.java +++ b/base/src/org/compiere/model/I_M_AttributeValue.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_AttributeValue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_AttributeValue { diff --git a/base/src/org/compiere/model/I_M_BOM.java b/base/src/org/compiere/model/I_M_BOM.java index 82885f22bf..27fb8f5623 100644 --- a/base/src/org/compiere/model/I_M_BOM.java +++ b/base/src/org/compiere/model/I_M_BOM.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_BOM * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_BOM { diff --git a/base/src/org/compiere/model/I_M_BOMAlternative.java b/base/src/org/compiere/model/I_M_BOMAlternative.java index 75953886d2..11c3e93dc4 100644 --- a/base/src/org/compiere/model/I_M_BOMAlternative.java +++ b/base/src/org/compiere/model/I_M_BOMAlternative.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_BOMAlternative * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_BOMAlternative { diff --git a/base/src/org/compiere/model/I_M_BOMProduct.java b/base/src/org/compiere/model/I_M_BOMProduct.java index 92e54416e4..95dcb3fcb3 100644 --- a/base/src/org/compiere/model/I_M_BOMProduct.java +++ b/base/src/org/compiere/model/I_M_BOMProduct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_BOMProduct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_BOMProduct { diff --git a/base/src/org/compiere/model/I_M_ChangeNotice.java b/base/src/org/compiere/model/I_M_ChangeNotice.java index fd7225f561..fb4e4733ef 100644 --- a/base/src/org/compiere/model/I_M_ChangeNotice.java +++ b/base/src/org/compiere/model/I_M_ChangeNotice.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_ChangeNotice * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_ChangeNotice { diff --git a/base/src/org/compiere/model/I_M_ChangeRequest.java b/base/src/org/compiere/model/I_M_ChangeRequest.java index 7e0ea429f8..f43435b5ea 100644 --- a/base/src/org/compiere/model/I_M_ChangeRequest.java +++ b/base/src/org/compiere/model/I_M_ChangeRequest.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_ChangeRequest * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_ChangeRequest { diff --git a/base/src/org/compiere/model/I_M_Cost.java b/base/src/org/compiere/model/I_M_Cost.java index 35da6e81bb..a7a7f316bc 100644 --- a/base/src/org/compiere/model/I_M_Cost.java +++ b/base/src/org/compiere/model/I_M_Cost.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Cost * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Cost { diff --git a/base/src/org/compiere/model/I_M_CostDetail.java b/base/src/org/compiere/model/I_M_CostDetail.java index 4a9c7a6959..b4db4742b2 100644 --- a/base/src/org/compiere/model/I_M_CostDetail.java +++ b/base/src/org/compiere/model/I_M_CostDetail.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_CostDetail * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_CostDetail { diff --git a/base/src/org/compiere/model/I_M_CostElement.java b/base/src/org/compiere/model/I_M_CostElement.java index f020576882..66339b4673 100644 --- a/base/src/org/compiere/model/I_M_CostElement.java +++ b/base/src/org/compiere/model/I_M_CostElement.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_CostElement * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_CostElement { diff --git a/base/src/org/compiere/model/I_M_CostQueue.java b/base/src/org/compiere/model/I_M_CostQueue.java index 54556a6d68..0782d3a58b 100644 --- a/base/src/org/compiere/model/I_M_CostQueue.java +++ b/base/src/org/compiere/model/I_M_CostQueue.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_CostQueue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_CostQueue { diff --git a/base/src/org/compiere/model/I_M_CostType.java b/base/src/org/compiere/model/I_M_CostType.java index 0fe083d674..3355d6ab1d 100644 --- a/base/src/org/compiere/model/I_M_CostType.java +++ b/base/src/org/compiere/model/I_M_CostType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_CostType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_CostType { diff --git a/base/src/org/compiere/model/I_M_Demand.java b/base/src/org/compiere/model/I_M_Demand.java index 40e3e24033..e7ce585f70 100644 --- a/base/src/org/compiere/model/I_M_Demand.java +++ b/base/src/org/compiere/model/I_M_Demand.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Demand * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Demand { diff --git a/base/src/org/compiere/model/I_M_DemandDetail.java b/base/src/org/compiere/model/I_M_DemandDetail.java index 62a0f1f206..999d79fe33 100644 --- a/base/src/org/compiere/model/I_M_DemandDetail.java +++ b/base/src/org/compiere/model/I_M_DemandDetail.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_DemandDetail * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_DemandDetail { diff --git a/base/src/org/compiere/model/I_M_DemandLine.java b/base/src/org/compiere/model/I_M_DemandLine.java index d295bd5a10..4a348e5a27 100644 --- a/base/src/org/compiere/model/I_M_DemandLine.java +++ b/base/src/org/compiere/model/I_M_DemandLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_DemandLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_DemandLine { diff --git a/base/src/org/compiere/model/I_M_DiscountSchema.java b/base/src/org/compiere/model/I_M_DiscountSchema.java index e2b989a450..95b132510f 100644 --- a/base/src/org/compiere/model/I_M_DiscountSchema.java +++ b/base/src/org/compiere/model/I_M_DiscountSchema.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_DiscountSchema * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_DiscountSchema { diff --git a/base/src/org/compiere/model/I_M_DiscountSchemaBreak.java b/base/src/org/compiere/model/I_M_DiscountSchemaBreak.java index 909ee25016..aef734347b 100644 --- a/base/src/org/compiere/model/I_M_DiscountSchemaBreak.java +++ b/base/src/org/compiere/model/I_M_DiscountSchemaBreak.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_DiscountSchemaBreak * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_DiscountSchemaBreak { diff --git a/base/src/org/compiere/model/I_M_DiscountSchemaLine.java b/base/src/org/compiere/model/I_M_DiscountSchemaLine.java deleted file mode 100644 index 166f625f87..0000000000 --- a/base/src/org/compiere/model/I_M_DiscountSchemaLine.java +++ /dev/null @@ -1,452 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for M_DiscountSchemaLine - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_M_DiscountSchemaLine -{ - - /** TableName=M_DiscountSchemaLine */ - public static final String Table_Name = "M_DiscountSchemaLine"; - - /** AD_Table_ID=477 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public I_C_BPartner getC_BPartner() throws Exception; - - /** Column name C_ConversionType_ID */ - public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID"; - - /** Set Currency Type. - * Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID); - - /** Get Currency Type. - * Currency Conversion Rate Type - */ - public int getC_ConversionType_ID(); - - public I_C_ConversionType getC_ConversionType() throws Exception; - - /** Column name ConversionDate */ - public static final String COLUMNNAME_ConversionDate = "ConversionDate"; - - /** Set Conversion Date. - * Date for selecting conversion rate - */ - public void setConversionDate (Timestamp ConversionDate); - - /** Get Conversion Date. - * Date for selecting conversion rate - */ - public Timestamp getConversionDate(); - - /** Column name Limit_AddAmt */ - public static final String COLUMNNAME_Limit_AddAmt = "Limit_AddAmt"; - - /** Set Limit price Surcharge Amount. - * Amount added to the converted/copied price before multiplying - */ - public void setLimit_AddAmt (BigDecimal Limit_AddAmt); - - /** Get Limit price Surcharge Amount. - * Amount added to the converted/copied price before multiplying - */ - public BigDecimal getLimit_AddAmt(); - - /** Column name Limit_Base */ - public static final String COLUMNNAME_Limit_Base = "Limit_Base"; - - /** Set Limit price Base. - * Base price for calculation of the new price - */ - public void setLimit_Base (String Limit_Base); - - /** Get Limit price Base. - * Base price for calculation of the new price - */ - public String getLimit_Base(); - - /** Column name Limit_Discount */ - public static final String COLUMNNAME_Limit_Discount = "Limit_Discount"; - - /** Set Limit price Discount %. - * Discount in percent to be subtracted from base, if negative it will be added to base price - */ - public void setLimit_Discount (BigDecimal Limit_Discount); - - /** Get Limit price Discount %. - * Discount in percent to be subtracted from base, if negative it will be added to base price - */ - public BigDecimal getLimit_Discount(); - - /** Column name Limit_Fixed */ - public static final String COLUMNNAME_Limit_Fixed = "Limit_Fixed"; - - /** Set Fixed Limit Price. - * Fixed Limit Price (not calculated) - */ - public void setLimit_Fixed (BigDecimal Limit_Fixed); - - /** Get Fixed Limit Price. - * Fixed Limit Price (not calculated) - */ - public BigDecimal getLimit_Fixed(); - - /** Column name Limit_MaxAmt */ - public static final String COLUMNNAME_Limit_MaxAmt = "Limit_MaxAmt"; - - /** Set Limit price max Margin. - * Maximum difference to original limit price; - ignored if zero - */ - public void setLimit_MaxAmt (BigDecimal Limit_MaxAmt); - - /** Get Limit price max Margin. - * Maximum difference to original limit price; - ignored if zero - */ - public BigDecimal getLimit_MaxAmt(); - - /** Column name Limit_MinAmt */ - public static final String COLUMNNAME_Limit_MinAmt = "Limit_MinAmt"; - - /** Set Limit price min Margin. - * Minimum difference to original limit price; - ignored if zero - */ - public void setLimit_MinAmt (BigDecimal Limit_MinAmt); - - /** Get Limit price min Margin. - * Minimum difference to original limit price; - ignored if zero - */ - public BigDecimal getLimit_MinAmt(); - - /** Column name Limit_Rounding */ - public static final String COLUMNNAME_Limit_Rounding = "Limit_Rounding"; - - /** Set Limit price Rounding. - * Rounding of the final result - */ - public void setLimit_Rounding (String Limit_Rounding); - - /** Get Limit price Rounding. - * Rounding of the final result - */ - public String getLimit_Rounding(); - - /** Column name List_AddAmt */ - public static final String COLUMNNAME_List_AddAmt = "List_AddAmt"; - - /** Set List price Surcharge Amount. - * List Price Surcharge Amount - */ - public void setList_AddAmt (BigDecimal List_AddAmt); - - /** Get List price Surcharge Amount. - * List Price Surcharge Amount - */ - public BigDecimal getList_AddAmt(); - - /** Column name List_Base */ - public static final String COLUMNNAME_List_Base = "List_Base"; - - /** Set List price Base. - * Price used as the basis for price list calculations - */ - public void setList_Base (String List_Base); - - /** Get List price Base. - * Price used as the basis for price list calculations - */ - public String getList_Base(); - - /** Column name List_Discount */ - public static final String COLUMNNAME_List_Discount = "List_Discount"; - - /** Set List price Discount %. - * Discount from list price as a percentage - */ - public void setList_Discount (BigDecimal List_Discount); - - /** Get List price Discount %. - * Discount from list price as a percentage - */ - public BigDecimal getList_Discount(); - - /** Column name List_Fixed */ - public static final String COLUMNNAME_List_Fixed = "List_Fixed"; - - /** Set Fixed List Price. - * Fixes List Price (not calculated) - */ - public void setList_Fixed (BigDecimal List_Fixed); - - /** Get Fixed List Price. - * Fixes List Price (not calculated) - */ - public BigDecimal getList_Fixed(); - - /** Column name List_MaxAmt */ - public static final String COLUMNNAME_List_MaxAmt = "List_MaxAmt"; - - /** Set List price max Margin. - * Maximum margin for a product - */ - public void setList_MaxAmt (BigDecimal List_MaxAmt); - - /** Get List price max Margin. - * Maximum margin for a product - */ - public BigDecimal getList_MaxAmt(); - - /** Column name List_MinAmt */ - public static final String COLUMNNAME_List_MinAmt = "List_MinAmt"; - - /** Set List price min Margin. - * Minimum margin for a product - */ - public void setList_MinAmt (BigDecimal List_MinAmt); - - /** Get List price min Margin. - * Minimum margin for a product - */ - public BigDecimal getList_MinAmt(); - - /** Column name List_Rounding */ - public static final String COLUMNNAME_List_Rounding = "List_Rounding"; - - /** Set List price Rounding. - * Rounding rule for final list price - */ - public void setList_Rounding (String List_Rounding); - - /** Get List price Rounding. - * Rounding rule for final list price - */ - public String getList_Rounding(); - - /** Column name M_DiscountSchemaLine_ID */ - public static final String COLUMNNAME_M_DiscountSchemaLine_ID = "M_DiscountSchemaLine_ID"; - - /** Set Discount Pricelist. - * Line of the pricelist trade discount schema - */ - public void setM_DiscountSchemaLine_ID (int M_DiscountSchemaLine_ID); - - /** Get Discount Pricelist. - * Line of the pricelist trade discount schema - */ - public int getM_DiscountSchemaLine_ID(); - - /** Column name M_DiscountSchema_ID */ - public static final String COLUMNNAME_M_DiscountSchema_ID = "M_DiscountSchema_ID"; - - /** Set Discount Schema. - * Schema to calculate the trade discount percentage - */ - public void setM_DiscountSchema_ID (int M_DiscountSchema_ID); - - /** Get Discount Schema. - * Schema to calculate the trade discount percentage - */ - public int getM_DiscountSchema_ID(); - - public I_M_DiscountSchema getM_DiscountSchema() throws Exception; - - /** Column name M_Product_Category_ID */ - public static final String COLUMNNAME_M_Product_Category_ID = "M_Product_Category_ID"; - - /** Set Product Category. - * Category of a Product - */ - public void setM_Product_Category_ID (int M_Product_Category_ID); - - /** Get Product Category. - * Category of a Product - */ - public int getM_Product_Category_ID(); - - public I_M_Product_Category getM_Product_Category() throws Exception; - - /** Column name M_Product_ID */ - public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; - - /** Set Product. - * Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID); - - /** Get Product. - * Product, Service, Item - */ - public int getM_Product_ID(); - - public I_M_Product getM_Product() throws Exception; - - /** Column name SeqNo */ - public static final String COLUMNNAME_SeqNo = "SeqNo"; - - /** Set Sequence. - * Method of ordering records; - lowest number comes first - */ - public void setSeqNo (int SeqNo); - - /** Get Sequence. - * Method of ordering records; - lowest number comes first - */ - public int getSeqNo(); - - /** Column name Std_AddAmt */ - public static final String COLUMNNAME_Std_AddAmt = "Std_AddAmt"; - - /** Set Standard price Surcharge Amount. - * Amount added to a price as a surcharge - */ - public void setStd_AddAmt (BigDecimal Std_AddAmt); - - /** Get Standard price Surcharge Amount. - * Amount added to a price as a surcharge - */ - public BigDecimal getStd_AddAmt(); - - /** Column name Std_Base */ - public static final String COLUMNNAME_Std_Base = "Std_Base"; - - /** Set Standard price Base. - * Base price for calculating new standard price - */ - public void setStd_Base (String Std_Base); - - /** Get Standard price Base. - * Base price for calculating new standard price - */ - public String getStd_Base(); - - /** Column name Std_Discount */ - public static final String COLUMNNAME_Std_Discount = "Std_Discount"; - - /** Set Standard price Discount %. - * Discount percentage to subtract from base price - */ - public void setStd_Discount (BigDecimal Std_Discount); - - /** Get Standard price Discount %. - * Discount percentage to subtract from base price - */ - public BigDecimal getStd_Discount(); - - /** Column name Std_Fixed */ - public static final String COLUMNNAME_Std_Fixed = "Std_Fixed"; - - /** Set Fixed Standard Price. - * Fixed Standard Price (not calculated) - */ - public void setStd_Fixed (BigDecimal Std_Fixed); - - /** Get Fixed Standard Price. - * Fixed Standard Price (not calculated) - */ - public BigDecimal getStd_Fixed(); - - /** Column name Std_MaxAmt */ - public static final String COLUMNNAME_Std_MaxAmt = "Std_MaxAmt"; - - /** Set Standard max Margin. - * Maximum margin allowed for a product - */ - public void setStd_MaxAmt (BigDecimal Std_MaxAmt); - - /** Get Standard max Margin. - * Maximum margin allowed for a product - */ - public BigDecimal getStd_MaxAmt(); - - /** Column name Std_MinAmt */ - public static final String COLUMNNAME_Std_MinAmt = "Std_MinAmt"; - - /** Set Standard price min Margin. - * Minimum margin allowed for a product - */ - public void setStd_MinAmt (BigDecimal Std_MinAmt); - - /** Get Standard price min Margin. - * Minimum margin allowed for a product - */ - public BigDecimal getStd_MinAmt(); - - /** Column name Std_Rounding */ - public static final String COLUMNNAME_Std_Rounding = "Std_Rounding"; - - /** Set Standard price Rounding. - * Rounding rule for calculated price - */ - public void setStd_Rounding (String Std_Rounding); - - /** Get Standard price Rounding. - * Rounding rule for calculated price - */ - public String getStd_Rounding(); -} diff --git a/base/src/org/compiere/model/I_M_DistributionList.java b/base/src/org/compiere/model/I_M_DistributionList.java index f39497150e..4a2c0979ef 100644 --- a/base/src/org/compiere/model/I_M_DistributionList.java +++ b/base/src/org/compiere/model/I_M_DistributionList.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_DistributionList * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_DistributionList { diff --git a/base/src/org/compiere/model/I_M_DistributionListLine.java b/base/src/org/compiere/model/I_M_DistributionListLine.java index 9aafe8b86f..78f786be64 100644 --- a/base/src/org/compiere/model/I_M_DistributionListLine.java +++ b/base/src/org/compiere/model/I_M_DistributionListLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_DistributionListLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_DistributionListLine { diff --git a/base/src/org/compiere/model/I_M_DistributionRun.java b/base/src/org/compiere/model/I_M_DistributionRun.java index 8c5707ad25..011d38d317 100644 --- a/base/src/org/compiere/model/I_M_DistributionRun.java +++ b/base/src/org/compiere/model/I_M_DistributionRun.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_DistributionRun * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_DistributionRun { diff --git a/base/src/org/compiere/model/I_M_DistributionRunLine.java b/base/src/org/compiere/model/I_M_DistributionRunLine.java index 419da43304..e171db3eb3 100644 --- a/base/src/org/compiere/model/I_M_DistributionRunLine.java +++ b/base/src/org/compiere/model/I_M_DistributionRunLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_DistributionRunLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_DistributionRunLine { diff --git a/base/src/org/compiere/model/I_M_EDI.java b/base/src/org/compiere/model/I_M_EDI.java index 7820f11cbb..c24dea310f 100644 --- a/base/src/org/compiere/model/I_M_EDI.java +++ b/base/src/org/compiere/model/I_M_EDI.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_EDI * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_EDI { diff --git a/base/src/org/compiere/model/I_M_EDI_Info.java b/base/src/org/compiere/model/I_M_EDI_Info.java index dca1132e44..c28b06ba7d 100644 --- a/base/src/org/compiere/model/I_M_EDI_Info.java +++ b/base/src/org/compiere/model/I_M_EDI_Info.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_EDI_Info * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_EDI_Info { diff --git a/base/src/org/compiere/model/I_M_Freight.java b/base/src/org/compiere/model/I_M_Freight.java index e34d2b105f..3a0a19328b 100644 --- a/base/src/org/compiere/model/I_M_Freight.java +++ b/base/src/org/compiere/model/I_M_Freight.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Freight * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Freight { diff --git a/base/src/org/compiere/model/I_M_FreightCategory.java b/base/src/org/compiere/model/I_M_FreightCategory.java index 7cba21938b..9dfe40bf5d 100644 --- a/base/src/org/compiere/model/I_M_FreightCategory.java +++ b/base/src/org/compiere/model/I_M_FreightCategory.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_FreightCategory * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_FreightCategory { diff --git a/base/src/org/compiere/model/I_M_InOutConfirm.java b/base/src/org/compiere/model/I_M_InOutConfirm.java index 2fe153ecbb..06bd31d351 100644 --- a/base/src/org/compiere/model/I_M_InOutConfirm.java +++ b/base/src/org/compiere/model/I_M_InOutConfirm.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_InOutConfirm * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_InOutConfirm { diff --git a/base/src/org/compiere/model/I_M_InOutLine.java b/base/src/org/compiere/model/I_M_InOutLine.java index 45cf3df4e2..e73eb527e3 100644 --- a/base/src/org/compiere/model/I_M_InOutLine.java +++ b/base/src/org/compiere/model/I_M_InOutLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_InOutLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_InOutLine { diff --git a/base/src/org/compiere/model/I_M_InOutLineConfirm.java b/base/src/org/compiere/model/I_M_InOutLineConfirm.java index 3f04691966..9c357a7994 100644 --- a/base/src/org/compiere/model/I_M_InOutLineConfirm.java +++ b/base/src/org/compiere/model/I_M_InOutLineConfirm.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_InOutLineConfirm * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_InOutLineConfirm { diff --git a/base/src/org/compiere/model/I_M_InOutLineMA.java b/base/src/org/compiere/model/I_M_InOutLineMA.java index a7922cfbe3..fef8a56413 100644 --- a/base/src/org/compiere/model/I_M_InOutLineMA.java +++ b/base/src/org/compiere/model/I_M_InOutLineMA.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_InOutLineMA * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_InOutLineMA { diff --git a/base/src/org/compiere/model/I_M_InventoryLine.java b/base/src/org/compiere/model/I_M_InventoryLine.java index 4b2c962e7b..fcef6eb580 100644 --- a/base/src/org/compiere/model/I_M_InventoryLine.java +++ b/base/src/org/compiere/model/I_M_InventoryLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_InventoryLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_InventoryLine { diff --git a/base/src/org/compiere/model/I_M_InventoryLineMA.java b/base/src/org/compiere/model/I_M_InventoryLineMA.java index 8112933f08..defbe54bd1 100644 --- a/base/src/org/compiere/model/I_M_InventoryLineMA.java +++ b/base/src/org/compiere/model/I_M_InventoryLineMA.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_InventoryLineMA * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_InventoryLineMA { diff --git a/base/src/org/compiere/model/I_M_Locator.java b/base/src/org/compiere/model/I_M_Locator.java index 76abcd7e84..e72eb165ba 100644 --- a/base/src/org/compiere/model/I_M_Locator.java +++ b/base/src/org/compiere/model/I_M_Locator.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Locator * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Locator { diff --git a/base/src/org/compiere/model/I_M_Lot.java b/base/src/org/compiere/model/I_M_Lot.java index 1aae114deb..7ef05553aa 100644 --- a/base/src/org/compiere/model/I_M_Lot.java +++ b/base/src/org/compiere/model/I_M_Lot.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Lot * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Lot { diff --git a/base/src/org/compiere/model/I_M_LotCtl.java b/base/src/org/compiere/model/I_M_LotCtl.java index 8290d7e3ef..c4e5092895 100644 --- a/base/src/org/compiere/model/I_M_LotCtl.java +++ b/base/src/org/compiere/model/I_M_LotCtl.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_LotCtl * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_LotCtl { diff --git a/base/src/org/compiere/model/I_M_LotCtlExclude.java b/base/src/org/compiere/model/I_M_LotCtlExclude.java index 2bcce3010f..d53753feb8 100644 --- a/base/src/org/compiere/model/I_M_LotCtlExclude.java +++ b/base/src/org/compiere/model/I_M_LotCtlExclude.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_LotCtlExclude * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_LotCtlExclude { diff --git a/base/src/org/compiere/model/I_M_MatchInv.java b/base/src/org/compiere/model/I_M_MatchInv.java index c6e1e6cee0..dc3e877b46 100644 --- a/base/src/org/compiere/model/I_M_MatchInv.java +++ b/base/src/org/compiere/model/I_M_MatchInv.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_MatchInv * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_MatchInv { diff --git a/base/src/org/compiere/model/I_M_MatchPO.java b/base/src/org/compiere/model/I_M_MatchPO.java index 54efdff8c0..0249659c39 100644 --- a/base/src/org/compiere/model/I_M_MatchPO.java +++ b/base/src/org/compiere/model/I_M_MatchPO.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_MatchPO * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_MatchPO { diff --git a/base/src/org/compiere/model/I_M_Movement.java b/base/src/org/compiere/model/I_M_Movement.java deleted file mode 100644 index 85ddd13fd5..0000000000 --- a/base/src/org/compiere/model/I_M_Movement.java +++ /dev/null @@ -1,323 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for M_Movement - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_M_Movement -{ - - /** TableName=M_Movement */ - public static final String Table_Name = "M_Movement"; - - /** AD_Table_ID=323 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 1 - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(1); - - /** Load Meta Data */ - - /** Column name AD_OrgTrx_ID */ - public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; - - /** Set Trx Organization. - * Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); - - /** Get Trx Organization. - * Performing or initiating organization - */ - public int getAD_OrgTrx_ID(); - - /** Column name ApprovalAmt */ - public static final String COLUMNNAME_ApprovalAmt = "ApprovalAmt"; - - /** Set Approval Amount. - * Document Approval Amount - */ - public void setApprovalAmt (BigDecimal ApprovalAmt); - - /** Get Approval Amount. - * Document Approval Amount - */ - public BigDecimal getApprovalAmt(); - - /** Column name C_Activity_ID */ - public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; - - /** Set Activity. - * Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID); - - /** Get Activity. - * Business Activity - */ - public int getC_Activity_ID(); - - public I_C_Activity getC_Activity() throws Exception; - - /** Column name C_Campaign_ID */ - public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; - - /** Set Campaign. - * Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID); - - /** Get Campaign. - * Marketing Campaign - */ - public int getC_Campaign_ID(); - - public I_C_Campaign getC_Campaign() throws Exception; - - /** Column name C_DocType_ID */ - public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; - - /** Set Document Type. - * Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID); - - /** Get Document Type. - * Document type or rules - */ - public int getC_DocType_ID(); - - public I_C_DocType getC_DocType() throws Exception; - - /** Column name C_Project_ID */ - public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; - - /** Set Project. - * Financial Project - */ - public void setC_Project_ID (int C_Project_ID); - - /** Get Project. - * Financial Project - */ - public int getC_Project_ID(); - - public I_C_Project getC_Project() throws Exception; - - /** Column name DateReceived */ - public static final String COLUMNNAME_DateReceived = "DateReceived"; - - /** Set Date received. - * Date a product was received - */ - public void setDateReceived (Timestamp DateReceived); - - /** Get Date received. - * Date a product was received - */ - public Timestamp getDateReceived(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DocAction */ - public static final String COLUMNNAME_DocAction = "DocAction"; - - /** Set Document Action. - * The targeted status of the document - */ - public void setDocAction (String DocAction); - - /** Get Document Action. - * The targeted status of the document - */ - public String getDocAction(); - - /** Column name DocStatus */ - public static final String COLUMNNAME_DocStatus = "DocStatus"; - - /** Set Document Status. - * The current status of the document - */ - public void setDocStatus (String DocStatus); - - /** Get Document Status. - * The current status of the document - */ - public String getDocStatus(); - - /** Column name DocumentNo */ - public static final String COLUMNNAME_DocumentNo = "DocumentNo"; - - /** Set Document No. - * Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo); - - /** Get Document No. - * Document sequence number of the document - */ - public String getDocumentNo(); - - /** Column name IsApproved */ - public static final String COLUMNNAME_IsApproved = "IsApproved"; - - /** Set Approved. - * Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved); - - /** Get Approved. - * Indicates if this document requires approval - */ - public boolean isApproved(); - - /** Column name IsInTransit */ - public static final String COLUMNNAME_IsInTransit = "IsInTransit"; - - /** Set In Transit. - * Movement is in transit - */ - public void setIsInTransit (boolean IsInTransit); - - /** Get In Transit. - * Movement is in transit - */ - public boolean isInTransit(); - - /** Column name M_Movement_ID */ - public static final String COLUMNNAME_M_Movement_ID = "M_Movement_ID"; - - /** Set Inventory Move. - * Movement of Inventory - */ - public void setM_Movement_ID (int M_Movement_ID); - - /** Get Inventory Move. - * Movement of Inventory - */ - public int getM_Movement_ID(); - - /** Column name MovementDate */ - public static final String COLUMNNAME_MovementDate = "MovementDate"; - - /** Set Movement Date. - * Date a product was moved in or out of inventory - */ - public void setMovementDate (Timestamp MovementDate); - - /** Get Movement Date. - * Date a product was moved in or out of inventory - */ - public Timestamp getMovementDate(); - - /** Column name Posted */ - public static final String COLUMNNAME_Posted = "Posted"; - - /** Set Posted. - * Posting status - */ - public void setPosted (boolean Posted); - - /** Get Posted. - * Posting status - */ - public boolean isPosted(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; - - /** Set Process Now */ - public void setProcessing (boolean Processing); - - /** Get Process Now */ - public boolean isProcessing(); - - /** Column name User1_ID */ - public static final String COLUMNNAME_User1_ID = "User1_ID"; - - /** Set User List 1. - * User defined list element #1 - */ - public void setUser1_ID (int User1_ID); - - /** Get User List 1. - * User defined list element #1 - */ - public int getUser1_ID(); - - /** Column name User2_ID */ - public static final String COLUMNNAME_User2_ID = "User2_ID"; - - /** Set User List 2. - * User defined list element #2 - */ - public void setUser2_ID (int User2_ID); - - /** Get User List 2. - * User defined list element #2 - */ - public int getUser2_ID(); -} diff --git a/base/src/org/compiere/model/I_M_MovementConfirm.java b/base/src/org/compiere/model/I_M_MovementConfirm.java index 25df9a6875..1e75a4045d 100644 --- a/base/src/org/compiere/model/I_M_MovementConfirm.java +++ b/base/src/org/compiere/model/I_M_MovementConfirm.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_MovementConfirm * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_MovementConfirm { diff --git a/base/src/org/compiere/model/I_M_MovementLine.java b/base/src/org/compiere/model/I_M_MovementLine.java deleted file mode 100644 index cffa067f72..0000000000 --- a/base/src/org/compiere/model/I_M_MovementLine.java +++ /dev/null @@ -1,242 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for M_MovementLine - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_M_MovementLine -{ - - /** TableName=M_MovementLine */ - public static final String Table_Name = "M_MovementLine"; - - /** AD_Table_ID=324 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 1 - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(1); - - /** Load Meta Data */ - - /** Column name ConfirmedQty */ - public static final String COLUMNNAME_ConfirmedQty = "ConfirmedQty"; - - /** Set Confirmed Quantity. - * Confirmation of a received quantity - */ - public void setConfirmedQty (BigDecimal ConfirmedQty); - - /** Get Confirmed Quantity. - * Confirmation of a received quantity - */ - public BigDecimal getConfirmedQty(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name Line */ - public static final String COLUMNNAME_Line = "Line"; - - /** Set Line No. - * Unique line for this document - */ - public void setLine (int Line); - - /** Get Line No. - * Unique line for this document - */ - public int getLine(); - - /** Column name M_AttributeSetInstanceTo_ID */ - public static final String COLUMNNAME_M_AttributeSetInstanceTo_ID = "M_AttributeSetInstanceTo_ID"; - - /** Set Attribute Set Instance To. - * Target Product Attribute Set Instance - */ - public void setM_AttributeSetInstanceTo_ID (int M_AttributeSetInstanceTo_ID); - - /** Get Attribute Set Instance To. - * Target Product Attribute Set Instance - */ - public int getM_AttributeSetInstanceTo_ID(); - - /** Column name M_AttributeSetInstance_ID */ - public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; - - /** Set Attribute Set Instance. - * Product Attribute Set Instance - */ - public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); - - /** Get Attribute Set Instance. - * Product Attribute Set Instance - */ - public int getM_AttributeSetInstance_ID(); - - /** Column name M_LocatorTo_ID */ - public static final String COLUMNNAME_M_LocatorTo_ID = "M_LocatorTo_ID"; - - /** Set Locator To. - * Location inventory is moved to - */ - public void setM_LocatorTo_ID (int M_LocatorTo_ID); - - /** Get Locator To. - * Location inventory is moved to - */ - public int getM_LocatorTo_ID(); - - /** Column name M_Locator_ID */ - public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID"; - - /** Set Locator. - * Warehouse Locator - */ - public void setM_Locator_ID (int M_Locator_ID); - - /** Get Locator. - * Warehouse Locator - */ - public int getM_Locator_ID(); - - /** Column name M_MovementLine_ID */ - public static final String COLUMNNAME_M_MovementLine_ID = "M_MovementLine_ID"; - - /** Set Move Line. - * Inventory Move document Line - */ - public void setM_MovementLine_ID (int M_MovementLine_ID); - - /** Get Move Line. - * Inventory Move document Line - */ - public int getM_MovementLine_ID(); - - /** Column name M_Movement_ID */ - public static final String COLUMNNAME_M_Movement_ID = "M_Movement_ID"; - - /** Set Inventory Move. - * Movement of Inventory - */ - public void setM_Movement_ID (int M_Movement_ID); - - /** Get Inventory Move. - * Movement of Inventory - */ - public int getM_Movement_ID(); - - public I_M_Movement getM_Movement() throws Exception; - - /** Column name M_Product_ID */ - public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; - - /** Set Product. - * Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID); - - /** Get Product. - * Product, Service, Item - */ - public int getM_Product_ID(); - - /** Column name MovementQty */ - public static final String COLUMNNAME_MovementQty = "MovementQty"; - - /** Set Movement Quantity. - * Quantity of a product moved. - */ - public void setMovementQty (BigDecimal MovementQty); - - /** Get Movement Quantity. - * Quantity of a product moved. - */ - public BigDecimal getMovementQty(); - - /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; - - /** Set Processed. - * The document has been processed - */ - public void setProcessed (boolean Processed); - - /** Get Processed. - * The document has been processed - */ - public boolean isProcessed(); - - /** Column name ScrappedQty */ - public static final String COLUMNNAME_ScrappedQty = "ScrappedQty"; - - /** Set Scrapped Quantity. - * The Quantity scrapped due to QA issues - */ - public void setScrappedQty (BigDecimal ScrappedQty); - - /** Get Scrapped Quantity. - * The Quantity scrapped due to QA issues - */ - public BigDecimal getScrappedQty(); - - /** Column name TargetQty */ - public static final String COLUMNNAME_TargetQty = "TargetQty"; - - /** Set Target Quantity. - * Target Movement Quantity - */ - public void setTargetQty (BigDecimal TargetQty); - - /** Get Target Quantity. - * Target Movement Quantity - */ - public BigDecimal getTargetQty(); -} diff --git a/base/src/org/compiere/model/I_M_MovementLineConfirm.java b/base/src/org/compiere/model/I_M_MovementLineConfirm.java index ab9b3b6c3b..2ad6e7f1ae 100644 --- a/base/src/org/compiere/model/I_M_MovementLineConfirm.java +++ b/base/src/org/compiere/model/I_M_MovementLineConfirm.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_MovementLineConfirm * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_MovementLineConfirm { diff --git a/base/src/org/compiere/model/I_M_MovementLineMA.java b/base/src/org/compiere/model/I_M_MovementLineMA.java index 4a7915b47f..cb352deebf 100644 --- a/base/src/org/compiere/model/I_M_MovementLineMA.java +++ b/base/src/org/compiere/model/I_M_MovementLineMA.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_MovementLineMA * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_MovementLineMA { diff --git a/base/src/org/compiere/model/I_M_OperationResource.java b/base/src/org/compiere/model/I_M_OperationResource.java index 131dce0768..2460e40846 100644 --- a/base/src/org/compiere/model/I_M_OperationResource.java +++ b/base/src/org/compiere/model/I_M_OperationResource.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_OperationResource * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_OperationResource { diff --git a/base/src/org/compiere/model/I_M_Package.java b/base/src/org/compiere/model/I_M_Package.java index 193511a01a..00f204679e 100644 --- a/base/src/org/compiere/model/I_M_Package.java +++ b/base/src/org/compiere/model/I_M_Package.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Package * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Package { diff --git a/base/src/org/compiere/model/I_M_PackageLine.java b/base/src/org/compiere/model/I_M_PackageLine.java index cc2c27c0da..4698fc38ac 100644 --- a/base/src/org/compiere/model/I_M_PackageLine.java +++ b/base/src/org/compiere/model/I_M_PackageLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_PackageLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_PackageLine { diff --git a/base/src/org/compiere/model/I_M_PerpetualInv.java b/base/src/org/compiere/model/I_M_PerpetualInv.java index 72bb866dbe..dec74c4e2b 100644 --- a/base/src/org/compiere/model/I_M_PerpetualInv.java +++ b/base/src/org/compiere/model/I_M_PerpetualInv.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_PerpetualInv * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_PerpetualInv { diff --git a/base/src/org/compiere/model/I_M_PriceList.java b/base/src/org/compiere/model/I_M_PriceList.java index 0c9e35ed01..bcc942cc15 100644 --- a/base/src/org/compiere/model/I_M_PriceList.java +++ b/base/src/org/compiere/model/I_M_PriceList.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_PriceList * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_PriceList { diff --git a/base/src/org/compiere/model/I_M_PriceList_Version.java b/base/src/org/compiere/model/I_M_PriceList_Version.java index 72f044aba5..1fa22e4b70 100644 --- a/base/src/org/compiere/model/I_M_PriceList_Version.java +++ b/base/src/org/compiere/model/I_M_PriceList_Version.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_PriceList_Version * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_PriceList_Version { diff --git a/base/src/org/compiere/model/I_M_Product.java b/base/src/org/compiere/model/I_M_Product.java deleted file mode 100644 index 7267f7741e..0000000000 --- a/base/src/org/compiere/model/I_M_Product.java +++ /dev/null @@ -1,728 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for M_Product - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_M_Product -{ - - /** TableName=M_Product */ - public static final String Table_Name = "M_Product"; - - /** AD_Table_ID=208 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name C_RevenueRecognition_ID */ - public static final String COLUMNNAME_C_RevenueRecognition_ID = "C_RevenueRecognition_ID"; - - /** Set Revenue Recognition. - * Method for recording revenue - */ - public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID); - - /** Get Revenue Recognition. - * Method for recording revenue - */ - public int getC_RevenueRecognition_ID(); - - public I_C_RevenueRecognition getC_RevenueRecognition() throws Exception; - - /** Column name C_SubscriptionType_ID */ - public static final String COLUMNNAME_C_SubscriptionType_ID = "C_SubscriptionType_ID"; - - /** Set Subscription Type. - * Type of subscription - */ - public void setC_SubscriptionType_ID (int C_SubscriptionType_ID); - - /** Get Subscription Type. - * Type of subscription - */ - public int getC_SubscriptionType_ID(); - - /** Column name C_TaxCategory_ID */ - public static final String COLUMNNAME_C_TaxCategory_ID = "C_TaxCategory_ID"; - - /** Set Tax Category. - * Tax Category - */ - public void setC_TaxCategory_ID (int C_TaxCategory_ID); - - /** Get Tax Category. - * Tax Category - */ - public int getC_TaxCategory_ID(); - - public I_C_TaxCategory getC_TaxCategory() throws Exception; - - /** Column name C_UOM_ID */ - public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; - - /** Set UOM. - * Unit of Measure - */ - public void setC_UOM_ID (int C_UOM_ID); - - /** Get UOM. - * Unit of Measure - */ - public int getC_UOM_ID(); - - public I_C_UOM getC_UOM() throws Exception; - - /** Column name Classification */ - public static final String COLUMNNAME_Classification = "Classification"; - - /** Set Classification. - * Classification for grouping - */ - public void setClassification (String Classification); - - /** Get Classification. - * Classification for grouping - */ - public String getClassification(); - - /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; - - /** Set Description. - * Optional short description of the record - */ - public void setDescription (String Description); - - /** Get Description. - * Optional short description of the record - */ - public String getDescription(); - - /** Column name DescriptionURL */ - public static final String COLUMNNAME_DescriptionURL = "DescriptionURL"; - - /** Set Description URL. - * URL for the description - */ - public void setDescriptionURL (String DescriptionURL); - - /** Get Description URL. - * URL for the description - */ - public String getDescriptionURL(); - - /** Column name Discontinued */ - public static final String COLUMNNAME_Discontinued = "Discontinued"; - - /** Set Discontinued. - * This product is no longer available - */ - public void setDiscontinued (boolean Discontinued); - - /** Get Discontinued. - * This product is no longer available - */ - public boolean isDiscontinued(); - - /** Column name DiscontinuedBy */ - public static final String COLUMNNAME_DiscontinuedBy = "DiscontinuedBy"; - - /** Set Discontinued by. - * Discontinued By - */ - public void setDiscontinuedBy (Timestamp DiscontinuedBy); - - /** Get Discontinued by. - * Discontinued By - */ - public Timestamp getDiscontinuedBy(); - - /** Column name DocumentNote */ - public static final String COLUMNNAME_DocumentNote = "DocumentNote"; - - /** Set Document Note. - * Additional information for a Document - */ - public void setDocumentNote (String DocumentNote); - - /** Get Document Note. - * Additional information for a Document - */ - public String getDocumentNote(); - - /** Column name Group1 */ - public static final String COLUMNNAME_Group1 = "Group1"; - - /** Set Group1 */ - public void setGroup1 (String Group1); - - /** Get Group1 */ - public String getGroup1(); - - /** Column name Group2 */ - public static final String COLUMNNAME_Group2 = "Group2"; - - /** Set Group2 */ - public void setGroup2 (String Group2); - - /** Get Group2 */ - public String getGroup2(); - - /** Column name GuaranteeDays */ - public static final String COLUMNNAME_GuaranteeDays = "GuaranteeDays"; - - /** Set Guarantee Days. - * Number of days the product is guaranteed or available - */ - public void setGuaranteeDays (int GuaranteeDays); - - /** Get Guarantee Days. - * Number of days the product is guaranteed or available - */ - public int getGuaranteeDays(); - - /** Column name GuaranteeDaysMin */ - public static final String COLUMNNAME_GuaranteeDaysMin = "GuaranteeDaysMin"; - - /** Set Min Guarantee Days. - * Minumum number of guarantee days - */ - public void setGuaranteeDaysMin (int GuaranteeDaysMin); - - /** Get Min Guarantee Days. - * Minumum number of guarantee days - */ - public int getGuaranteeDaysMin(); - - /** Column name Help */ - public static final String COLUMNNAME_Help = "Help"; - - /** Set Comment/Help. - * Comment or Hint - */ - public void setHelp (String Help); - - /** Get Comment/Help. - * Comment or Hint - */ - public String getHelp(); - - /** Column name ImageURL */ - public static final String COLUMNNAME_ImageURL = "ImageURL"; - - /** Set Image URL. - * URL of image - */ - public void setImageURL (String ImageURL); - - /** Get Image URL. - * URL of image - */ - public String getImageURL(); - - /** Column name IsBOM */ - public static final String COLUMNNAME_IsBOM = "IsBOM"; - - /** Set Bill of Materials. - * Bill of Materials - */ - public void setIsBOM (boolean IsBOM); - - /** Get Bill of Materials. - * Bill of Materials - */ - public boolean isBOM(); - - /** Column name IsDropShip */ - public static final String COLUMNNAME_IsDropShip = "IsDropShip"; - - /** Set Drop Shipment. - * Drop Shipments are sent from the Vendor directly to the Customer - */ - public void setIsDropShip (boolean IsDropShip); - - /** Get Drop Shipment. - * Drop Shipments are sent from the Vendor directly to the Customer - */ - public boolean isDropShip(); - - /** Column name IsExcludeAutoDelivery */ - public static final String COLUMNNAME_IsExcludeAutoDelivery = "IsExcludeAutoDelivery"; - - /** Set Exclude Auto Delivery. - * Exclude from automatic Delivery - */ - public void setIsExcludeAutoDelivery (boolean IsExcludeAutoDelivery); - - /** Get Exclude Auto Delivery. - * Exclude from automatic Delivery - */ - public boolean isExcludeAutoDelivery(); - - /** Column name IsInvoicePrintDetails */ - public static final String COLUMNNAME_IsInvoicePrintDetails = "IsInvoicePrintDetails"; - - /** Set Print detail records on invoice . - * Print detail BOM elements on the invoice - */ - public void setIsInvoicePrintDetails (boolean IsInvoicePrintDetails); - - /** Get Print detail records on invoice . - * Print detail BOM elements on the invoice - */ - public boolean isInvoicePrintDetails(); - - /** Column name IsPickListPrintDetails */ - public static final String COLUMNNAME_IsPickListPrintDetails = "IsPickListPrintDetails"; - - /** Set Print detail records on pick list. - * Print detail BOM elements on the pick list - */ - public void setIsPickListPrintDetails (boolean IsPickListPrintDetails); - - /** Get Print detail records on pick list. - * Print detail BOM elements on the pick list - */ - public boolean isPickListPrintDetails(); - - /** Column name IsPurchased */ - public static final String COLUMNNAME_IsPurchased = "IsPurchased"; - - /** Set Purchased. - * Organization purchases this product - */ - public void setIsPurchased (boolean IsPurchased); - - /** Get Purchased. - * Organization purchases this product - */ - public boolean isPurchased(); - - /** Column name IsSelfService */ - public static final String COLUMNNAME_IsSelfService = "IsSelfService"; - - /** Set Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService); - - /** Get Self-Service. - * This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService(); - - /** Column name IsSold */ - public static final String COLUMNNAME_IsSold = "IsSold"; - - /** Set Sold. - * Organization sells this product - */ - public void setIsSold (boolean IsSold); - - /** Get Sold. - * Organization sells this product - */ - public boolean isSold(); - - /** Column name IsStocked */ - public static final String COLUMNNAME_IsStocked = "IsStocked"; - - /** Set Stocked. - * Organization stocks this product - */ - public void setIsStocked (boolean IsStocked); - - /** Get Stocked. - * Organization stocks this product - */ - public boolean isStocked(); - - /** Column name IsSummary */ - public static final String COLUMNNAME_IsSummary = "IsSummary"; - - /** Set Summary Level. - * This is a summary entity - */ - public void setIsSummary (boolean IsSummary); - - /** Get Summary Level. - * This is a summary entity - */ - public boolean isSummary(); - - /** Column name IsVerified */ - public static final String COLUMNNAME_IsVerified = "IsVerified"; - - /** Set Verified. - * The BOM configuration has been verified - */ - public void setIsVerified (boolean IsVerified); - - /** Get Verified. - * The BOM configuration has been verified - */ - public boolean isVerified(); - - /** Column name IsWebStoreFeatured */ - public static final String COLUMNNAME_IsWebStoreFeatured = "IsWebStoreFeatured"; - - /** Set Featured in Web Store. - * If selected, the product is displayed in the inital or any empy search - */ - public void setIsWebStoreFeatured (boolean IsWebStoreFeatured); - - /** Get Featured in Web Store. - * If selected, the product is displayed in the inital or any empy search - */ - public boolean isWebStoreFeatured(); - - /** Column name M_AttributeSetInstance_ID */ - public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; - - /** Set Attribute Set Instance. - * Product Attribute Set Instance - */ - public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); - - /** Get Attribute Set Instance. - * Product Attribute Set Instance - */ - public int getM_AttributeSetInstance_ID(); - - /** Column name M_AttributeSet_ID */ - public static final String COLUMNNAME_M_AttributeSet_ID = "M_AttributeSet_ID"; - - /** Set Attribute Set. - * Product Attribute Set - */ - public void setM_AttributeSet_ID (int M_AttributeSet_ID); - - /** Get Attribute Set. - * Product Attribute Set - */ - public int getM_AttributeSet_ID(); - - public I_M_AttributeSet getM_AttributeSet() throws Exception; - - /** Column name M_FreightCategory_ID */ - public static final String COLUMNNAME_M_FreightCategory_ID = "M_FreightCategory_ID"; - - /** Set Freight Category. - * Category of the Freight - */ - public void setM_FreightCategory_ID (int M_FreightCategory_ID); - - /** Get Freight Category. - * Category of the Freight - */ - public int getM_FreightCategory_ID(); - - public I_M_FreightCategory getM_FreightCategory() throws Exception; - - /** Column name M_Locator_ID */ - public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID"; - - /** Set Locator. - * Warehouse Locator - */ - public void setM_Locator_ID (int M_Locator_ID); - - /** Get Locator. - * Warehouse Locator - */ - public int getM_Locator_ID(); - - /** Column name M_Product_Category_ID */ - public static final String COLUMNNAME_M_Product_Category_ID = "M_Product_Category_ID"; - - /** Set Product Category. - * Category of a Product - */ - public void setM_Product_Category_ID (int M_Product_Category_ID); - - /** Get Product Category. - * Category of a Product - */ - public int getM_Product_Category_ID(); - - public I_M_Product_Category getM_Product_Category() throws Exception; - - /** Column name M_Product_ID */ - public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; - - /** Set Product. - * Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID); - - /** Get Product. - * Product, Service, Item - */ - public int getM_Product_ID(); - - /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; - - /** Set Name. - * Alphanumeric identifier of the entity - */ - public void setName (String Name); - - /** Get Name. - * Alphanumeric identifier of the entity - */ - public String getName(); - - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; - - /** Set Process Now */ - public void setProcessing (boolean Processing); - - /** Get Process Now */ - public boolean isProcessing(); - - /** Column name ProductType */ - public static final String COLUMNNAME_ProductType = "ProductType"; - - /** Set Product Type. - * Type of product - */ - public void setProductType (String ProductType); - - /** Get Product Type. - * Type of product - */ - public String getProductType(); - - /** Column name R_MailText_ID */ - public static final String COLUMNNAME_R_MailText_ID = "R_MailText_ID"; - - /** Set Mail Template. - * Text templates for mailings - */ - public void setR_MailText_ID (int R_MailText_ID); - - /** Get Mail Template. - * Text templates for mailings - */ - public int getR_MailText_ID(); - - public I_R_MailText getR_MailText() throws Exception; - - /** Column name SKU */ - public static final String COLUMNNAME_SKU = "SKU"; - - /** Set SKU. - * Stock Keeping Unit - */ - public void setSKU (String SKU); - - /** Get SKU. - * Stock Keeping Unit - */ - public String getSKU(); - - /** Column name S_ExpenseType_ID */ - public static final String COLUMNNAME_S_ExpenseType_ID = "S_ExpenseType_ID"; - - /** Set Expense Type. - * Expense report type - */ - public void setS_ExpenseType_ID (int S_ExpenseType_ID); - - /** Get Expense Type. - * Expense report type - */ - public int getS_ExpenseType_ID(); - - public I_S_ExpenseType getS_ExpenseType() throws Exception; - - /** Column name S_Resource_ID */ - public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; - - /** Set Resource. - * Resource - */ - public void setS_Resource_ID (int S_Resource_ID); - - /** Get Resource. - * Resource - */ - public int getS_Resource_ID(); - - public I_S_Resource getS_Resource() throws Exception; - - /** Column name SalesRep_ID */ - public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; - - /** Set Sales Representative. - * Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID); - - /** Get Sales Representative. - * Sales Representative or Company Agent - */ - public int getSalesRep_ID(); - - /** Column name ShelfDepth */ - public static final String COLUMNNAME_ShelfDepth = "ShelfDepth"; - - /** Set Shelf Depth. - * Shelf depth required - */ - public void setShelfDepth (int ShelfDepth); - - /** Get Shelf Depth. - * Shelf depth required - */ - public int getShelfDepth(); - - /** Column name ShelfHeight */ - public static final String COLUMNNAME_ShelfHeight = "ShelfHeight"; - - /** Set Shelf Height. - * Shelf height required - */ - public void setShelfHeight (int ShelfHeight); - - /** Get Shelf Height. - * Shelf height required - */ - public int getShelfHeight(); - - /** Column name ShelfWidth */ - public static final String COLUMNNAME_ShelfWidth = "ShelfWidth"; - - /** Set Shelf Width. - * Shelf width required - */ - public void setShelfWidth (int ShelfWidth); - - /** Get Shelf Width. - * Shelf width required - */ - public int getShelfWidth(); - - /** Column name UPC */ - public static final String COLUMNNAME_UPC = "UPC"; - - /** Set UPC/EAN. - * Bar Code (Universal Product Code or its superset European Article Number) - */ - public void setUPC (String UPC); - - /** Get UPC/EAN. - * Bar Code (Universal Product Code or its superset European Article Number) - */ - public String getUPC(); - - /** Column name UnitsPerPallet */ - public static final String COLUMNNAME_UnitsPerPallet = "UnitsPerPallet"; - - /** Set Units Per Pallet. - * Units Per Pallet - */ - public void setUnitsPerPallet (int UnitsPerPallet); - - /** Get Units Per Pallet. - * Units Per Pallet - */ - public int getUnitsPerPallet(); - - /** Column name Value */ - public static final String COLUMNNAME_Value = "Value"; - - /** Set Search Key. - * Search key for the record in the format required - must be unique - */ - public void setValue (String Value); - - /** Get Search Key. - * Search key for the record in the format required - must be unique - */ - public String getValue(); - - /** Column name VersionNo */ - public static final String COLUMNNAME_VersionNo = "VersionNo"; - - /** Set Version No. - * Version Number - */ - public void setVersionNo (String VersionNo); - - /** Get Version No. - * Version Number - */ - public String getVersionNo(); - - /** Column name Volume */ - public static final String COLUMNNAME_Volume = "Volume"; - - /** Set Volume. - * Volume of a product - */ - public void setVolume (BigDecimal Volume); - - /** Get Volume. - * Volume of a product - */ - public BigDecimal getVolume(); - - /** Column name Weight */ - public static final String COLUMNNAME_Weight = "Weight"; - - /** Set Weight. - * Weight of a product - */ - public void setWeight (BigDecimal Weight); - - /** Get Weight. - * Weight of a product - */ - public BigDecimal getWeight(); -} diff --git a/base/src/org/compiere/model/I_M_ProductDownload.java b/base/src/org/compiere/model/I_M_ProductDownload.java index c2dfc3a177..9f3e2e4c53 100644 --- a/base/src/org/compiere/model/I_M_ProductDownload.java +++ b/base/src/org/compiere/model/I_M_ProductDownload.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_ProductDownload * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_ProductDownload { diff --git a/base/src/org/compiere/model/I_M_ProductOperation.java b/base/src/org/compiere/model/I_M_ProductOperation.java index 813ebbee30..0abda57599 100644 --- a/base/src/org/compiere/model/I_M_ProductOperation.java +++ b/base/src/org/compiere/model/I_M_ProductOperation.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_ProductOperation * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_ProductOperation { diff --git a/base/src/org/compiere/model/I_M_ProductPrice.java b/base/src/org/compiere/model/I_M_ProductPrice.java index 936a9a71b9..f49182da89 100644 --- a/base/src/org/compiere/model/I_M_ProductPrice.java +++ b/base/src/org/compiere/model/I_M_ProductPrice.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_ProductPrice * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_ProductPrice { diff --git a/base/src/org/compiere/model/I_M_Product_Acct.java b/base/src/org/compiere/model/I_M_Product_Acct.java index f0481b8cbb..f49d47fc96 100644 --- a/base/src/org/compiere/model/I_M_Product_Acct.java +++ b/base/src/org/compiere/model/I_M_Product_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Product_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Product_Acct { diff --git a/base/src/org/compiere/model/I_M_Product_BOM.java b/base/src/org/compiere/model/I_M_Product_BOM.java index 51328f1664..cc9026123c 100644 --- a/base/src/org/compiere/model/I_M_Product_BOM.java +++ b/base/src/org/compiere/model/I_M_Product_BOM.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Product_BOM * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Product_BOM { diff --git a/base/src/org/compiere/model/I_M_Product_Category.java b/base/src/org/compiere/model/I_M_Product_Category.java index 5b1a643fe2..2992151789 100644 --- a/base/src/org/compiere/model/I_M_Product_Category.java +++ b/base/src/org/compiere/model/I_M_Product_Category.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Product_Category * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Product_Category { diff --git a/base/src/org/compiere/model/I_M_Product_Category_Acct.java b/base/src/org/compiere/model/I_M_Product_Category_Acct.java index 9e6889811b..9b11b1fcf0 100644 --- a/base/src/org/compiere/model/I_M_Product_Category_Acct.java +++ b/base/src/org/compiere/model/I_M_Product_Category_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Product_Category_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Product_Category_Acct { diff --git a/base/src/org/compiere/model/I_M_Product_Costing.java b/base/src/org/compiere/model/I_M_Product_Costing.java index 41671715fd..518e8469f0 100644 --- a/base/src/org/compiere/model/I_M_Product_Costing.java +++ b/base/src/org/compiere/model/I_M_Product_Costing.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Product_Costing * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Product_Costing { diff --git a/base/src/org/compiere/model/I_M_Product_PO.java b/base/src/org/compiere/model/I_M_Product_PO.java index be24d95283..95dde1d855 100644 --- a/base/src/org/compiere/model/I_M_Product_PO.java +++ b/base/src/org/compiere/model/I_M_Product_PO.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Product_PO * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Product_PO { diff --git a/base/src/org/compiere/model/I_M_Production.java b/base/src/org/compiere/model/I_M_Production.java index a32240450f..810b331956 100644 --- a/base/src/org/compiere/model/I_M_Production.java +++ b/base/src/org/compiere/model/I_M_Production.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Production * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Production { diff --git a/base/src/org/compiere/model/I_M_ProductionLine.java b/base/src/org/compiere/model/I_M_ProductionLine.java index f9b0af17f5..9a607c1611 100644 --- a/base/src/org/compiere/model/I_M_ProductionLine.java +++ b/base/src/org/compiere/model/I_M_ProductionLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_ProductionLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_ProductionLine { diff --git a/base/src/org/compiere/model/I_M_ProductionLineMA.java b/base/src/org/compiere/model/I_M_ProductionLineMA.java index 735bae9755..a49f5737d3 100644 --- a/base/src/org/compiere/model/I_M_ProductionLineMA.java +++ b/base/src/org/compiere/model/I_M_ProductionLineMA.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_ProductionLineMA * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_ProductionLineMA { diff --git a/base/src/org/compiere/model/I_M_ProductionPlan.java b/base/src/org/compiere/model/I_M_ProductionPlan.java index c8fdecd5ba..88ebe46739 100644 --- a/base/src/org/compiere/model/I_M_ProductionPlan.java +++ b/base/src/org/compiere/model/I_M_ProductionPlan.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_ProductionPlan * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_ProductionPlan { diff --git a/base/src/org/compiere/model/I_M_RMA.java b/base/src/org/compiere/model/I_M_RMA.java index d800e754f6..9dde8b5749 100644 --- a/base/src/org/compiere/model/I_M_RMA.java +++ b/base/src/org/compiere/model/I_M_RMA.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_RMA * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_RMA { diff --git a/base/src/org/compiere/model/I_M_RMALine.java b/base/src/org/compiere/model/I_M_RMALine.java index 85f50a5a3e..862b4ecbb4 100644 --- a/base/src/org/compiere/model/I_M_RMALine.java +++ b/base/src/org/compiere/model/I_M_RMALine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_RMALine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_RMALine { diff --git a/base/src/org/compiere/model/I_M_RMAType.java b/base/src/org/compiere/model/I_M_RMAType.java index a61df7bc3b..b39ea00eee 100644 --- a/base/src/org/compiere/model/I_M_RMAType.java +++ b/base/src/org/compiere/model/I_M_RMAType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_RMAType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_RMAType { diff --git a/base/src/org/compiere/model/I_M_RelatedProduct.java b/base/src/org/compiere/model/I_M_RelatedProduct.java index 939222736a..322f1dc5b8 100644 --- a/base/src/org/compiere/model/I_M_RelatedProduct.java +++ b/base/src/org/compiere/model/I_M_RelatedProduct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_RelatedProduct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_RelatedProduct { diff --git a/base/src/org/compiere/model/I_M_Replenish.java b/base/src/org/compiere/model/I_M_Replenish.java index 737853f9a0..6dac84271d 100644 --- a/base/src/org/compiere/model/I_M_Replenish.java +++ b/base/src/org/compiere/model/I_M_Replenish.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Replenish * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Replenish { diff --git a/base/src/org/compiere/model/I_M_Requisition.java b/base/src/org/compiere/model/I_M_Requisition.java index 19f76fce58..a8f2dcd300 100644 --- a/base/src/org/compiere/model/I_M_Requisition.java +++ b/base/src/org/compiere/model/I_M_Requisition.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Requisition * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Requisition { diff --git a/base/src/org/compiere/model/I_M_RequisitionLine.java b/base/src/org/compiere/model/I_M_RequisitionLine.java index 5f118815ca..983bcecabd 100644 --- a/base/src/org/compiere/model/I_M_RequisitionLine.java +++ b/base/src/org/compiere/model/I_M_RequisitionLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_RequisitionLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_RequisitionLine { diff --git a/base/src/org/compiere/model/I_M_SerNoCtl.java b/base/src/org/compiere/model/I_M_SerNoCtl.java index 8dc987c3b0..1e143cd54a 100644 --- a/base/src/org/compiere/model/I_M_SerNoCtl.java +++ b/base/src/org/compiere/model/I_M_SerNoCtl.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_SerNoCtl * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_SerNoCtl { diff --git a/base/src/org/compiere/model/I_M_SerNoCtlExclude.java b/base/src/org/compiere/model/I_M_SerNoCtlExclude.java index 8d85505b0b..75ab0e22f3 100644 --- a/base/src/org/compiere/model/I_M_SerNoCtlExclude.java +++ b/base/src/org/compiere/model/I_M_SerNoCtlExclude.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_SerNoCtlExclude * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_SerNoCtlExclude { diff --git a/base/src/org/compiere/model/I_M_Shipper.java b/base/src/org/compiere/model/I_M_Shipper.java index 773f6f22c2..eb8511ae10 100644 --- a/base/src/org/compiere/model/I_M_Shipper.java +++ b/base/src/org/compiere/model/I_M_Shipper.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Shipper * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Shipper { diff --git a/base/src/org/compiere/model/I_M_Storage.java b/base/src/org/compiere/model/I_M_Storage.java index 8f29306200..005ba7f56e 100644 --- a/base/src/org/compiere/model/I_M_Storage.java +++ b/base/src/org/compiere/model/I_M_Storage.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Storage * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Storage { diff --git a/base/src/org/compiere/model/I_M_Substitute.java b/base/src/org/compiere/model/I_M_Substitute.java index 2ff04d2aaa..27e6fae8a0 100644 --- a/base/src/org/compiere/model/I_M_Substitute.java +++ b/base/src/org/compiere/model/I_M_Substitute.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Substitute * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Substitute { diff --git a/base/src/org/compiere/model/I_M_Transaction.java b/base/src/org/compiere/model/I_M_Transaction.java deleted file mode 100644 index 93b097daf1..0000000000 --- a/base/src/org/compiere/model/I_M_Transaction.java +++ /dev/null @@ -1,223 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for M_Transaction - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_M_Transaction -{ - - /** TableName=M_Transaction */ - public static final String Table_Name = "M_Transaction"; - - /** AD_Table_ID=329 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 1 - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(1); - - /** Load Meta Data */ - - /** Column name C_ProjectIssue_ID */ - public static final String COLUMNNAME_C_ProjectIssue_ID = "C_ProjectIssue_ID"; - - /** Set Project Issue. - * Project Issues (Material, Labor) - */ - public void setC_ProjectIssue_ID (int C_ProjectIssue_ID); - - /** Get Project Issue. - * Project Issues (Material, Labor) - */ - public int getC_ProjectIssue_ID(); - - public I_C_ProjectIssue getC_ProjectIssue() throws Exception; - - /** Column name M_AttributeSetInstance_ID */ - public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; - - /** Set Attribute Set Instance. - * Product Attribute Set Instance - */ - public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); - - /** Get Attribute Set Instance. - * Product Attribute Set Instance - */ - public int getM_AttributeSetInstance_ID(); - - /** Column name M_InOutLine_ID */ - public static final String COLUMNNAME_M_InOutLine_ID = "M_InOutLine_ID"; - - /** Set Shipment/Receipt Line. - * Line on Shipment or Receipt document - */ - public void setM_InOutLine_ID (int M_InOutLine_ID); - - /** Get Shipment/Receipt Line. - * Line on Shipment or Receipt document - */ - public int getM_InOutLine_ID(); - - public I_M_InOutLine getM_InOutLine() throws Exception; - - /** Column name M_InventoryLine_ID */ - public static final String COLUMNNAME_M_InventoryLine_ID = "M_InventoryLine_ID"; - - /** Set Phys.Inventory Line. - * Unique line in an Inventory document - */ - public void setM_InventoryLine_ID (int M_InventoryLine_ID); - - /** Get Phys.Inventory Line. - * Unique line in an Inventory document - */ - public int getM_InventoryLine_ID(); - - public I_M_InventoryLine getM_InventoryLine() throws Exception; - - /** Column name M_Locator_ID */ - public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID"; - - /** Set Locator. - * Warehouse Locator - */ - public void setM_Locator_ID (int M_Locator_ID); - - /** Get Locator. - * Warehouse Locator - */ - public int getM_Locator_ID(); - - /** Column name M_MovementLine_ID */ - public static final String COLUMNNAME_M_MovementLine_ID = "M_MovementLine_ID"; - - /** Set Move Line. - * Inventory Move document Line - */ - public void setM_MovementLine_ID (int M_MovementLine_ID); - - /** Get Move Line. - * Inventory Move document Line - */ - public int getM_MovementLine_ID(); - - public I_M_MovementLine getM_MovementLine() throws Exception; - - /** Column name M_Product_ID */ - public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; - - /** Set Product. - * Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID); - - /** Get Product. - * Product, Service, Item - */ - public int getM_Product_ID(); - - public I_M_Product getM_Product() throws Exception; - - /** Column name M_ProductionLine_ID */ - public static final String COLUMNNAME_M_ProductionLine_ID = "M_ProductionLine_ID"; - - /** Set Production Line. - * Document Line representing a production - */ - public void setM_ProductionLine_ID (int M_ProductionLine_ID); - - /** Get Production Line. - * Document Line representing a production - */ - public int getM_ProductionLine_ID(); - - public I_M_ProductionLine getM_ProductionLine() throws Exception; - - /** Column name M_Transaction_ID */ - public static final String COLUMNNAME_M_Transaction_ID = "M_Transaction_ID"; - - /** Set Inventory Transaction */ - public void setM_Transaction_ID (int M_Transaction_ID); - - /** Get Inventory Transaction */ - public int getM_Transaction_ID(); - - /** Column name MovementDate */ - public static final String COLUMNNAME_MovementDate = "MovementDate"; - - /** Set Movement Date. - * Date a product was moved in or out of inventory - */ - public void setMovementDate (Timestamp MovementDate); - - /** Get Movement Date. - * Date a product was moved in or out of inventory - */ - public Timestamp getMovementDate(); - - /** Column name MovementQty */ - public static final String COLUMNNAME_MovementQty = "MovementQty"; - - /** Set Movement Quantity. - * Quantity of a product moved. - */ - public void setMovementQty (BigDecimal MovementQty); - - /** Get Movement Quantity. - * Quantity of a product moved. - */ - public BigDecimal getMovementQty(); - - /** Column name MovementType */ - public static final String COLUMNNAME_MovementType = "MovementType"; - - /** Set Movement Type. - * Method of moving the inventory - */ - public void setMovementType (String MovementType); - - /** Get Movement Type. - * Method of moving the inventory - */ - public String getMovementType(); -} diff --git a/base/src/org/compiere/model/I_M_TransactionAllocation.java b/base/src/org/compiere/model/I_M_TransactionAllocation.java index b360c5780d..0fa555c1e8 100644 --- a/base/src/org/compiere/model/I_M_TransactionAllocation.java +++ b/base/src/org/compiere/model/I_M_TransactionAllocation.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_TransactionAllocation * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_TransactionAllocation { diff --git a/base/src/org/compiere/model/I_M_Warehouse_Acct.java b/base/src/org/compiere/model/I_M_Warehouse_Acct.java index e5a7cd3178..ff77fb4e1f 100644 --- a/base/src/org/compiere/model/I_M_Warehouse_Acct.java +++ b/base/src/org/compiere/model/I_M_Warehouse_Acct.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for M_Warehouse_Acct * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_M_Warehouse_Acct { diff --git a/base/src/org/compiere/model/I_PA_Achievement.java b/base/src/org/compiere/model/I_PA_Achievement.java index b75dc0c5b8..65dfcd341f 100644 --- a/base/src/org/compiere/model/I_PA_Achievement.java +++ b/base/src/org/compiere/model/I_PA_Achievement.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_Achievement * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_Achievement { diff --git a/base/src/org/compiere/model/I_PA_Benchmark.java b/base/src/org/compiere/model/I_PA_Benchmark.java index b0bf88ebf2..64013143fd 100644 --- a/base/src/org/compiere/model/I_PA_Benchmark.java +++ b/base/src/org/compiere/model/I_PA_Benchmark.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_Benchmark * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_Benchmark { diff --git a/base/src/org/compiere/model/I_PA_BenchmarkData.java b/base/src/org/compiere/model/I_PA_BenchmarkData.java index 59bbe82926..9b862e6dbf 100644 --- a/base/src/org/compiere/model/I_PA_BenchmarkData.java +++ b/base/src/org/compiere/model/I_PA_BenchmarkData.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_BenchmarkData * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_BenchmarkData { diff --git a/base/src/org/compiere/model/I_PA_ColorSchema.java b/base/src/org/compiere/model/I_PA_ColorSchema.java index 105d8078b3..d1ab03ddde 100644 --- a/base/src/org/compiere/model/I_PA_ColorSchema.java +++ b/base/src/org/compiere/model/I_PA_ColorSchema.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_ColorSchema * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_ColorSchema { diff --git a/base/src/org/compiere/model/I_PA_DashboardContent.java b/base/src/org/compiere/model/I_PA_DashboardContent.java index 90be6b4e6b..685fc8a3f8 100644 --- a/base/src/org/compiere/model/I_PA_DashboardContent.java +++ b/base/src/org/compiere/model/I_PA_DashboardContent.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_DashboardContent * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_DashboardContent { diff --git a/base/src/org/compiere/model/I_PA_Goal.java b/base/src/org/compiere/model/I_PA_Goal.java index fc0f53eaa8..01a8e74d7f 100644 --- a/base/src/org/compiere/model/I_PA_Goal.java +++ b/base/src/org/compiere/model/I_PA_Goal.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_Goal * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_Goal { diff --git a/base/src/org/compiere/model/I_PA_GoalRestriction.java b/base/src/org/compiere/model/I_PA_GoalRestriction.java index 1bc11157fb..5e8114b32f 100644 --- a/base/src/org/compiere/model/I_PA_GoalRestriction.java +++ b/base/src/org/compiere/model/I_PA_GoalRestriction.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_GoalRestriction * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_GoalRestriction { diff --git a/base/src/org/compiere/model/I_PA_Hierarchy.java b/base/src/org/compiere/model/I_PA_Hierarchy.java index 067f5f9208..7781563f3e 100644 --- a/base/src/org/compiere/model/I_PA_Hierarchy.java +++ b/base/src/org/compiere/model/I_PA_Hierarchy.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_Hierarchy * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_Hierarchy { diff --git a/base/src/org/compiere/model/I_PA_Measure.java b/base/src/org/compiere/model/I_PA_Measure.java index f89c9c3a77..1cf633c670 100644 --- a/base/src/org/compiere/model/I_PA_Measure.java +++ b/base/src/org/compiere/model/I_PA_Measure.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_Measure * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_Measure { diff --git a/base/src/org/compiere/model/I_PA_MeasureCalc.java b/base/src/org/compiere/model/I_PA_MeasureCalc.java index f0cfa6df66..95ae0255ee 100644 --- a/base/src/org/compiere/model/I_PA_MeasureCalc.java +++ b/base/src/org/compiere/model/I_PA_MeasureCalc.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_MeasureCalc * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_MeasureCalc { diff --git a/base/src/org/compiere/model/I_PA_Ratio.java b/base/src/org/compiere/model/I_PA_Ratio.java index e4c9d69b2c..f8b84272c8 100644 --- a/base/src/org/compiere/model/I_PA_Ratio.java +++ b/base/src/org/compiere/model/I_PA_Ratio.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_Ratio * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_Ratio { diff --git a/base/src/org/compiere/model/I_PA_RatioElement.java b/base/src/org/compiere/model/I_PA_RatioElement.java index cd31936ead..2154e08e82 100644 --- a/base/src/org/compiere/model/I_PA_RatioElement.java +++ b/base/src/org/compiere/model/I_PA_RatioElement.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_RatioElement * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_RatioElement { diff --git a/base/src/org/compiere/model/I_PA_Report.java b/base/src/org/compiere/model/I_PA_Report.java index 400965f3c1..992053b9a0 100644 --- a/base/src/org/compiere/model/I_PA_Report.java +++ b/base/src/org/compiere/model/I_PA_Report.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_Report * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_Report { diff --git a/base/src/org/compiere/model/I_PA_ReportColumn.java b/base/src/org/compiere/model/I_PA_ReportColumn.java index 812844caf3..1d63a54a69 100644 --- a/base/src/org/compiere/model/I_PA_ReportColumn.java +++ b/base/src/org/compiere/model/I_PA_ReportColumn.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_ReportColumn * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_ReportColumn { diff --git a/base/src/org/compiere/model/I_PA_ReportColumnSet.java b/base/src/org/compiere/model/I_PA_ReportColumnSet.java index 73a2089f6c..9f8536dcad 100644 --- a/base/src/org/compiere/model/I_PA_ReportColumnSet.java +++ b/base/src/org/compiere/model/I_PA_ReportColumnSet.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_ReportColumnSet * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_ReportColumnSet { diff --git a/base/src/org/compiere/model/I_PA_ReportLine.java b/base/src/org/compiere/model/I_PA_ReportLine.java index 7ea86b6a85..470f98b9db 100644 --- a/base/src/org/compiere/model/I_PA_ReportLine.java +++ b/base/src/org/compiere/model/I_PA_ReportLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_ReportLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_ReportLine { diff --git a/base/src/org/compiere/model/I_PA_ReportLineSet.java b/base/src/org/compiere/model/I_PA_ReportLineSet.java index e3ab47f20e..2d525fae57 100644 --- a/base/src/org/compiere/model/I_PA_ReportLineSet.java +++ b/base/src/org/compiere/model/I_PA_ReportLineSet.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_ReportLineSet * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_ReportLineSet { diff --git a/base/src/org/compiere/model/I_PA_ReportSource.java b/base/src/org/compiere/model/I_PA_ReportSource.java index 201b9204f7..0aab658084 100644 --- a/base/src/org/compiere/model/I_PA_ReportSource.java +++ b/base/src/org/compiere/model/I_PA_ReportSource.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_ReportSource * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_ReportSource { diff --git a/base/src/org/compiere/model/I_PA_SLA_Criteria.java b/base/src/org/compiere/model/I_PA_SLA_Criteria.java index 7110342eb7..251d1a814f 100644 --- a/base/src/org/compiere/model/I_PA_SLA_Criteria.java +++ b/base/src/org/compiere/model/I_PA_SLA_Criteria.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_SLA_Criteria * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_SLA_Criteria { diff --git a/base/src/org/compiere/model/I_PA_SLA_Goal.java b/base/src/org/compiere/model/I_PA_SLA_Goal.java index 4f6defb27a..0f5e1c2314 100644 --- a/base/src/org/compiere/model/I_PA_SLA_Goal.java +++ b/base/src/org/compiere/model/I_PA_SLA_Goal.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_SLA_Goal * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_SLA_Goal { diff --git a/base/src/org/compiere/model/I_PA_SLA_Measure.java b/base/src/org/compiere/model/I_PA_SLA_Measure.java index 305786b8d1..5fffb30523 100644 --- a/base/src/org/compiere/model/I_PA_SLA_Measure.java +++ b/base/src/org/compiere/model/I_PA_SLA_Measure.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for PA_SLA_Measure * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_PA_SLA_Measure { diff --git a/base/src/org/compiere/model/I_RV_BPartner.java b/base/src/org/compiere/model/I_RV_BPartner.java index cf7baa0927..58452abff7 100644 --- a/base/src/org/compiere/model/I_RV_BPartner.java +++ b/base/src/org/compiere/model/I_RV_BPartner.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for RV_BPartner * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_RV_BPartner { diff --git a/base/src/org/compiere/model/I_RV_PP_Order_BOMLine.java b/base/src/org/compiere/model/I_RV_PP_Order_BOMLine.java new file mode 100644 index 0000000000..cffc263d4f --- /dev/null +++ b/base/src/org/compiere/model/I_RV_PP_Order_BOMLine.java @@ -0,0 +1,58 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for RV_PP_Order_BOMLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_RV_PP_Order_BOMLine +{ + + /** TableName=RV_PP_Order_BOMLine */ + public static final String Table_Name = "RV_PP_Order_BOMLine"; + + /** AD_Table_ID=53028 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ +} diff --git a/base/src/org/compiere/model/I_RV_PP_WIP.java b/base/src/org/compiere/model/I_RV_PP_WIP.java new file mode 100644 index 0000000000..e6eea8ad3a --- /dev/null +++ b/base/src/org/compiere/model/I_RV_PP_WIP.java @@ -0,0 +1,58 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for RV_PP_WIP + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_RV_PP_WIP +{ + + /** TableName=RV_PP_WIP */ + public static final String Table_Name = "RV_PP_WIP"; + + /** AD_Table_ID=53033 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ +} diff --git a/base/src/org/compiere/model/I_RV_WarehousePrice.java b/base/src/org/compiere/model/I_RV_WarehousePrice.java index 48c734fb02..f661d2ecbb 100644 --- a/base/src/org/compiere/model/I_RV_WarehousePrice.java +++ b/base/src/org/compiere/model/I_RV_WarehousePrice.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for RV_WarehousePrice * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_RV_WarehousePrice { diff --git a/base/src/org/compiere/model/I_R_Category.java b/base/src/org/compiere/model/I_R_Category.java index ea58e84f33..4e1c1bf628 100644 --- a/base/src/org/compiere/model/I_R_Category.java +++ b/base/src/org/compiere/model/I_R_Category.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_Category * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_Category { diff --git a/base/src/org/compiere/model/I_R_CategoryUpdates.java b/base/src/org/compiere/model/I_R_CategoryUpdates.java index e683301709..f381cac18a 100644 --- a/base/src/org/compiere/model/I_R_CategoryUpdates.java +++ b/base/src/org/compiere/model/I_R_CategoryUpdates.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_CategoryUpdates * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_CategoryUpdates { diff --git a/base/src/org/compiere/model/I_R_ContactInterest.java b/base/src/org/compiere/model/I_R_ContactInterest.java index 277e93be41..a352760774 100644 --- a/base/src/org/compiere/model/I_R_ContactInterest.java +++ b/base/src/org/compiere/model/I_R_ContactInterest.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_ContactInterest * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_ContactInterest { diff --git a/base/src/org/compiere/model/I_R_Group.java b/base/src/org/compiere/model/I_R_Group.java index d9ddbe84c4..72f409c27a 100644 --- a/base/src/org/compiere/model/I_R_Group.java +++ b/base/src/org/compiere/model/I_R_Group.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_Group * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_Group { diff --git a/base/src/org/compiere/model/I_R_GroupUpdates.java b/base/src/org/compiere/model/I_R_GroupUpdates.java index b09d9e71a2..54166bf1c1 100644 --- a/base/src/org/compiere/model/I_R_GroupUpdates.java +++ b/base/src/org/compiere/model/I_R_GroupUpdates.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_GroupUpdates * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_GroupUpdates { diff --git a/base/src/org/compiere/model/I_R_InterestArea.java b/base/src/org/compiere/model/I_R_InterestArea.java index 32d88d0c43..de5a26a177 100644 --- a/base/src/org/compiere/model/I_R_InterestArea.java +++ b/base/src/org/compiere/model/I_R_InterestArea.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_InterestArea * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_InterestArea { diff --git a/base/src/org/compiere/model/I_R_IssueKnown.java b/base/src/org/compiere/model/I_R_IssueKnown.java index 73c2db1a8c..3f4b05843b 100644 --- a/base/src/org/compiere/model/I_R_IssueKnown.java +++ b/base/src/org/compiere/model/I_R_IssueKnown.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_IssueKnown * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_IssueKnown { diff --git a/base/src/org/compiere/model/I_R_IssueProject.java b/base/src/org/compiere/model/I_R_IssueProject.java index 386735c000..de4ee55664 100644 --- a/base/src/org/compiere/model/I_R_IssueProject.java +++ b/base/src/org/compiere/model/I_R_IssueProject.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_IssueProject * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_IssueProject { diff --git a/base/src/org/compiere/model/I_R_IssueRecommendation.java b/base/src/org/compiere/model/I_R_IssueRecommendation.java index e0bffb0469..58f962b9b2 100644 --- a/base/src/org/compiere/model/I_R_IssueRecommendation.java +++ b/base/src/org/compiere/model/I_R_IssueRecommendation.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_IssueRecommendation * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_IssueRecommendation { diff --git a/base/src/org/compiere/model/I_R_IssueStatus.java b/base/src/org/compiere/model/I_R_IssueStatus.java index 49fb5e3143..368a56f918 100644 --- a/base/src/org/compiere/model/I_R_IssueStatus.java +++ b/base/src/org/compiere/model/I_R_IssueStatus.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_IssueStatus * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_IssueStatus { diff --git a/base/src/org/compiere/model/I_R_IssueSystem.java b/base/src/org/compiere/model/I_R_IssueSystem.java index 0760920fe1..de0284d387 100644 --- a/base/src/org/compiere/model/I_R_IssueSystem.java +++ b/base/src/org/compiere/model/I_R_IssueSystem.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_IssueSystem * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_IssueSystem { diff --git a/base/src/org/compiere/model/I_R_IssueUser.java b/base/src/org/compiere/model/I_R_IssueUser.java index 89f5285ae3..6544c5d541 100644 --- a/base/src/org/compiere/model/I_R_IssueUser.java +++ b/base/src/org/compiere/model/I_R_IssueUser.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_IssueUser * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_IssueUser { diff --git a/base/src/org/compiere/model/I_R_MailText.java b/base/src/org/compiere/model/I_R_MailText.java index e647a87bcb..7beae4917f 100644 --- a/base/src/org/compiere/model/I_R_MailText.java +++ b/base/src/org/compiere/model/I_R_MailText.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_MailText * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_MailText { diff --git a/base/src/org/compiere/model/I_R_Request.java b/base/src/org/compiere/model/I_R_Request.java index 09307224c1..b0d2d0548c 100644 --- a/base/src/org/compiere/model/I_R_Request.java +++ b/base/src/org/compiere/model/I_R_Request.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_Request * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_Request { diff --git a/base/src/org/compiere/model/I_R_RequestAction.java b/base/src/org/compiere/model/I_R_RequestAction.java index d0d5fb3296..b08418f8ec 100644 --- a/base/src/org/compiere/model/I_R_RequestAction.java +++ b/base/src/org/compiere/model/I_R_RequestAction.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_RequestAction * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_RequestAction { diff --git a/base/src/org/compiere/model/I_R_RequestProcessor.java b/base/src/org/compiere/model/I_R_RequestProcessor.java index 4281c1b1b3..c4cf20192d 100644 --- a/base/src/org/compiere/model/I_R_RequestProcessor.java +++ b/base/src/org/compiere/model/I_R_RequestProcessor.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_RequestProcessor * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_RequestProcessor { diff --git a/base/src/org/compiere/model/I_R_RequestProcessorLog.java b/base/src/org/compiere/model/I_R_RequestProcessorLog.java index 848962bccc..e0a691bdab 100644 --- a/base/src/org/compiere/model/I_R_RequestProcessorLog.java +++ b/base/src/org/compiere/model/I_R_RequestProcessorLog.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_RequestProcessorLog * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_RequestProcessorLog { diff --git a/base/src/org/compiere/model/I_R_RequestProcessor_Route.java b/base/src/org/compiere/model/I_R_RequestProcessor_Route.java index 99bde8fe4c..83cbf19f71 100644 --- a/base/src/org/compiere/model/I_R_RequestProcessor_Route.java +++ b/base/src/org/compiere/model/I_R_RequestProcessor_Route.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_RequestProcessor_Route * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_RequestProcessor_Route { diff --git a/base/src/org/compiere/model/I_R_RequestType.java b/base/src/org/compiere/model/I_R_RequestType.java index a9a0a138de..509221277f 100644 --- a/base/src/org/compiere/model/I_R_RequestType.java +++ b/base/src/org/compiere/model/I_R_RequestType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_RequestType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_RequestType { diff --git a/base/src/org/compiere/model/I_R_RequestTypeUpdates.java b/base/src/org/compiere/model/I_R_RequestTypeUpdates.java index a90c339b68..804f1d2a25 100644 --- a/base/src/org/compiere/model/I_R_RequestTypeUpdates.java +++ b/base/src/org/compiere/model/I_R_RequestTypeUpdates.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_RequestTypeUpdates * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_RequestTypeUpdates { diff --git a/base/src/org/compiere/model/I_R_RequestUpdate.java b/base/src/org/compiere/model/I_R_RequestUpdate.java index a834924c90..9c319f0d2f 100644 --- a/base/src/org/compiere/model/I_R_RequestUpdate.java +++ b/base/src/org/compiere/model/I_R_RequestUpdate.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_RequestUpdate * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_RequestUpdate { diff --git a/base/src/org/compiere/model/I_R_RequestUpdates.java b/base/src/org/compiere/model/I_R_RequestUpdates.java index 79de3d13cb..30a37ddfac 100644 --- a/base/src/org/compiere/model/I_R_RequestUpdates.java +++ b/base/src/org/compiere/model/I_R_RequestUpdates.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_RequestUpdates * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_RequestUpdates { diff --git a/base/src/org/compiere/model/I_R_Resolution.java b/base/src/org/compiere/model/I_R_Resolution.java index da1607aea9..305db819a9 100644 --- a/base/src/org/compiere/model/I_R_Resolution.java +++ b/base/src/org/compiere/model/I_R_Resolution.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_Resolution * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_Resolution { diff --git a/base/src/org/compiere/model/I_R_StandardResponse.java b/base/src/org/compiere/model/I_R_StandardResponse.java index 5332319fb0..d319caf77a 100644 --- a/base/src/org/compiere/model/I_R_StandardResponse.java +++ b/base/src/org/compiere/model/I_R_StandardResponse.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_StandardResponse * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_StandardResponse { diff --git a/base/src/org/compiere/model/I_R_Status.java b/base/src/org/compiere/model/I_R_Status.java index 8298cb7ae4..03bcffb1f8 100644 --- a/base/src/org/compiere/model/I_R_Status.java +++ b/base/src/org/compiere/model/I_R_Status.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_Status * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_Status { diff --git a/base/src/org/compiere/model/I_R_StatusCategory.java b/base/src/org/compiere/model/I_R_StatusCategory.java index 14c3ec845f..bc2ff822f8 100644 --- a/base/src/org/compiere/model/I_R_StatusCategory.java +++ b/base/src/org/compiere/model/I_R_StatusCategory.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for R_StatusCategory * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_R_StatusCategory { diff --git a/base/src/org/compiere/model/I_S_ExpenseType.java b/base/src/org/compiere/model/I_S_ExpenseType.java index a9cca1969c..981743e020 100644 --- a/base/src/org/compiere/model/I_S_ExpenseType.java +++ b/base/src/org/compiere/model/I_S_ExpenseType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_ExpenseType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_ExpenseType { diff --git a/base/src/org/compiere/model/I_S_ResourceAssignment.java b/base/src/org/compiere/model/I_S_ResourceAssignment.java index 88c435d54a..4154e97a76 100644 --- a/base/src/org/compiere/model/I_S_ResourceAssignment.java +++ b/base/src/org/compiere/model/I_S_ResourceAssignment.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_ResourceAssignment * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_ResourceAssignment { diff --git a/base/src/org/compiere/model/I_S_ResourceType.java b/base/src/org/compiere/model/I_S_ResourceType.java index ff95fc3e25..ea6e6cc7cc 100644 --- a/base/src/org/compiere/model/I_S_ResourceType.java +++ b/base/src/org/compiere/model/I_S_ResourceType.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_ResourceType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_ResourceType { diff --git a/base/src/org/compiere/model/I_S_ResourceUnAvailable.java b/base/src/org/compiere/model/I_S_ResourceUnAvailable.java index 43036973e8..f5aa3af567 100644 --- a/base/src/org/compiere/model/I_S_ResourceUnAvailable.java +++ b/base/src/org/compiere/model/I_S_ResourceUnAvailable.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_ResourceUnAvailable * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_ResourceUnAvailable { diff --git a/base/src/org/compiere/model/I_S_TimeExpense.java b/base/src/org/compiere/model/I_S_TimeExpense.java index ac46738e5f..da9a6ac4fc 100644 --- a/base/src/org/compiere/model/I_S_TimeExpense.java +++ b/base/src/org/compiere/model/I_S_TimeExpense.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_TimeExpense * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_TimeExpense { diff --git a/base/src/org/compiere/model/I_S_TimeExpenseLine.java b/base/src/org/compiere/model/I_S_TimeExpenseLine.java index b67251a538..b27584f2a6 100644 --- a/base/src/org/compiere/model/I_S_TimeExpenseLine.java +++ b/base/src/org/compiere/model/I_S_TimeExpenseLine.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_TimeExpenseLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_TimeExpenseLine { diff --git a/base/src/org/compiere/model/I_S_TimeType.java b/base/src/org/compiere/model/I_S_TimeType.java index baad1ef9bb..009fb17ea0 100644 --- a/base/src/org/compiere/model/I_S_TimeType.java +++ b/base/src/org/compiere/model/I_S_TimeType.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_TimeType * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_TimeType { diff --git a/base/src/org/compiere/model/I_S_Training.java b/base/src/org/compiere/model/I_S_Training.java index 04fd547b80..d617208a6f 100644 --- a/base/src/org/compiere/model/I_S_Training.java +++ b/base/src/org/compiere/model/I_S_Training.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_Training * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_Training { diff --git a/base/src/org/compiere/model/I_S_Training_Class.java b/base/src/org/compiere/model/I_S_Training_Class.java index b61d339ebf..3972a152f7 100644 --- a/base/src/org/compiere/model/I_S_Training_Class.java +++ b/base/src/org/compiere/model/I_S_Training_Class.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for S_Training_Class * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_S_Training_Class { diff --git a/base/src/org/compiere/model/I_T_Aging.java b/base/src/org/compiere/model/I_T_Aging.java deleted file mode 100644 index a0bd013163..0000000000 --- a/base/src/org/compiere/model/I_T_Aging.java +++ /dev/null @@ -1,469 +0,0 @@ -/********************************************************************** - * This file is part of Adempiere ERP Bazaar * - * http://www.adempiere.org * - * * - * Copyright (C) Trifon Trifonov. * - * Copyright (C) Contributors * - * * - * This program is free software; - you can redistribute it and/or * - * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; - either version 2 * - * of the License, or (at your option) any later version. * - * * - * 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., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301, USA. * - * * - * Contributors: * - * - Trifon Trifonov (trifonnt@users.sourceforge.net) * - * * - * Sponsors: * - * - Company (http://www.site.com) * - **********************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for T_Aging - * @author Trifon Trifonov (generated) - * @version Release 3.4.0s - */ -public interface I_T_Aging -{ - - /** TableName=T_Aging */ - public static final String Table_Name = "T_Aging"; - - /** AD_Table_ID=631 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** Load Meta Data */ - - /** Column name AD_PInstance_ID */ - public static final String COLUMNNAME_AD_PInstance_ID = "AD_PInstance_ID"; - - /** Set Process Instance. - * Instance of the process - */ - public void setAD_PInstance_ID (int AD_PInstance_ID); - - /** Get Process Instance. - * Instance of the process - */ - public int getAD_PInstance_ID(); - - public I_AD_PInstance getAD_PInstance() throws Exception; - - /** Column name C_Activity_ID */ - public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; - - /** Set Activity. - * Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID); - - /** Get Activity. - * Business Activity - */ - public int getC_Activity_ID(); - - public I_C_Activity getC_Activity() throws Exception; - - /** Column name C_BP_Group_ID */ - public static final String COLUMNNAME_C_BP_Group_ID = "C_BP_Group_ID"; - - /** Set Business Partner Group. - * Business Partner Group - */ - public void setC_BP_Group_ID (int C_BP_Group_ID); - - /** Get Business Partner Group. - * Business Partner Group - */ - public int getC_BP_Group_ID(); - - public I_C_BP_Group getC_BP_Group() throws Exception; - - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public I_C_BPartner getC_BPartner() throws Exception; - - /** Column name C_Campaign_ID */ - public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; - - /** Set Campaign. - * Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID); - - /** Get Campaign. - * Marketing Campaign - */ - public int getC_Campaign_ID(); - - public I_C_Campaign getC_Campaign() throws Exception; - - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name C_InvoicePaySchedule_ID */ - public static final String COLUMNNAME_C_InvoicePaySchedule_ID = "C_InvoicePaySchedule_ID"; - - /** Set Invoice Payment Schedule. - * Invoice Payment Schedule - */ - public void setC_InvoicePaySchedule_ID (int C_InvoicePaySchedule_ID); - - /** Get Invoice Payment Schedule. - * Invoice Payment Schedule - */ - public int getC_InvoicePaySchedule_ID(); - - public I_C_InvoicePaySchedule getC_InvoicePaySchedule() throws Exception; - - /** Column name C_Invoice_ID */ - public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID"; - - /** Set Invoice. - * Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID); - - /** Get Invoice. - * Invoice Identifier - */ - public int getC_Invoice_ID(); - - public I_C_Invoice getC_Invoice() throws Exception; - - /** Column name C_Project_ID */ - public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; - - /** Set Project. - * Financial Project - */ - public void setC_Project_ID (int C_Project_ID); - - /** Get Project. - * Financial Project - */ - public int getC_Project_ID(); - - public I_C_Project getC_Project() throws Exception; - - /** Column name DaysDue */ - public static final String COLUMNNAME_DaysDue = "DaysDue"; - - /** Set Days due. - * Number of days due (negative: due in number of days) - */ - public void setDaysDue (int DaysDue); - - /** Get Days due. - * Number of days due (negative: due in number of days) - */ - public int getDaysDue(); - - /** Column name Due0 */ - public static final String COLUMNNAME_Due0 = "Due0"; - - /** Set Due Today */ - public void setDue0 (BigDecimal Due0); - - /** Get Due Today */ - public BigDecimal getDue0(); - - /** Column name Due0_30 */ - public static final String COLUMNNAME_Due0_30 = "Due0_30"; - - /** Set Due Today-30 */ - public void setDue0_30 (BigDecimal Due0_30); - - /** Get Due Today-30 */ - public BigDecimal getDue0_30(); - - /** Column name Due0_7 */ - public static final String COLUMNNAME_Due0_7 = "Due0_7"; - - /** Set Due Today-7 */ - public void setDue0_7 (BigDecimal Due0_7); - - /** Get Due Today-7 */ - public BigDecimal getDue0_7(); - - /** Column name Due1_7 */ - public static final String COLUMNNAME_Due1_7 = "Due1_7"; - - /** Set Due 1-7 */ - public void setDue1_7 (BigDecimal Due1_7); - - /** Get Due 1-7 */ - public BigDecimal getDue1_7(); - - /** Column name Due31_60 */ - public static final String COLUMNNAME_Due31_60 = "Due31_60"; - - /** Set Due 31-60 */ - public void setDue31_60 (BigDecimal Due31_60); - - /** Get Due 31-60 */ - public BigDecimal getDue31_60(); - - /** Column name Due31_Plus */ - public static final String COLUMNNAME_Due31_Plus = "Due31_Plus"; - - /** Set Due > 31 */ - public void setDue31_Plus (BigDecimal Due31_Plus); - - /** Get Due > 31 */ - public BigDecimal getDue31_Plus(); - - /** Column name Due61_90 */ - public static final String COLUMNNAME_Due61_90 = "Due61_90"; - - /** Set Due 61-90 */ - public void setDue61_90 (BigDecimal Due61_90); - - /** Get Due 61-90 */ - public BigDecimal getDue61_90(); - - /** Column name Due61_Plus */ - public static final String COLUMNNAME_Due61_Plus = "Due61_Plus"; - - /** Set Due > 61 */ - public void setDue61_Plus (BigDecimal Due61_Plus); - - /** Get Due > 61 */ - public BigDecimal getDue61_Plus(); - - /** Column name Due8_30 */ - public static final String COLUMNNAME_Due8_30 = "Due8_30"; - - /** Set Due 8-30 */ - public void setDue8_30 (BigDecimal Due8_30); - - /** Get Due 8-30 */ - public BigDecimal getDue8_30(); - - /** Column name Due91_Plus */ - public static final String COLUMNNAME_Due91_Plus = "Due91_Plus"; - - /** Set Due > 91 */ - public void setDue91_Plus (BigDecimal Due91_Plus); - - /** Get Due > 91 */ - public BigDecimal getDue91_Plus(); - - /** Column name DueAmt */ - public static final String COLUMNNAME_DueAmt = "DueAmt"; - - /** Set Amount due. - * Amount of the payment due - */ - public void setDueAmt (BigDecimal DueAmt); - - /** Get Amount due. - * Amount of the payment due - */ - public BigDecimal getDueAmt(); - - /** Column name DueDate */ - public static final String COLUMNNAME_DueDate = "DueDate"; - - /** Set Due Date. - * Date when the payment is due - */ - public void setDueDate (Timestamp DueDate); - - /** Get Due Date. - * Date when the payment is due - */ - public Timestamp getDueDate(); - - /** Column name InvoicedAmt */ - public static final String COLUMNNAME_InvoicedAmt = "InvoicedAmt"; - - /** Set Invoiced Amount. - * The amount invoiced - */ - public void setInvoicedAmt (BigDecimal InvoicedAmt); - - /** Get Invoiced Amount. - * The amount invoiced - */ - public BigDecimal getInvoicedAmt(); - - /** Column name IsListInvoices */ - public static final String COLUMNNAME_IsListInvoices = "IsListInvoices"; - - /** Set List Invoices. - * Include List of Invoices - */ - public void setIsListInvoices (boolean IsListInvoices); - - /** Get List Invoices. - * Include List of Invoices - */ - public boolean isListInvoices(); - - /** Column name IsSOTrx */ - public static final String COLUMNNAME_IsSOTrx = "IsSOTrx"; - - /** Set Sales Transaction. - * This is a Sales Transaction - */ - public void setIsSOTrx (boolean IsSOTrx); - - /** Get Sales Transaction. - * This is a Sales Transaction - */ - public boolean isSOTrx(); - - /** Column name OpenAmt */ - public static final String COLUMNNAME_OpenAmt = "OpenAmt"; - - /** Set Open Amount. - * Open item amount - */ - public void setOpenAmt (BigDecimal OpenAmt); - - /** Get Open Amount. - * Open item amount - */ - public BigDecimal getOpenAmt(); - - /** Column name PastDue1_30 */ - public static final String COLUMNNAME_PastDue1_30 = "PastDue1_30"; - - /** Set Past Due 1-30 */ - public void setPastDue1_30 (BigDecimal PastDue1_30); - - /** Get Past Due 1-30 */ - public BigDecimal getPastDue1_30(); - - /** Column name PastDue1_7 */ - public static final String COLUMNNAME_PastDue1_7 = "PastDue1_7"; - - /** Set Past Due 1-7 */ - public void setPastDue1_7 (BigDecimal PastDue1_7); - - /** Get Past Due 1-7 */ - public BigDecimal getPastDue1_7(); - - /** Column name PastDue31_60 */ - public static final String COLUMNNAME_PastDue31_60 = "PastDue31_60"; - - /** Set Past Due 31-60 */ - public void setPastDue31_60 (BigDecimal PastDue31_60); - - /** Get Past Due 31-60 */ - public BigDecimal getPastDue31_60(); - - /** Column name PastDue31_Plus */ - public static final String COLUMNNAME_PastDue31_Plus = "PastDue31_Plus"; - - /** Set Past Due > 31 */ - public void setPastDue31_Plus (BigDecimal PastDue31_Plus); - - /** Get Past Due > 31 */ - public BigDecimal getPastDue31_Plus(); - - /** Column name PastDue61_90 */ - public static final String COLUMNNAME_PastDue61_90 = "PastDue61_90"; - - /** Set Past Due 61-90 */ - public void setPastDue61_90 (BigDecimal PastDue61_90); - - /** Get Past Due 61-90 */ - public BigDecimal getPastDue61_90(); - - /** Column name PastDue61_Plus */ - public static final String COLUMNNAME_PastDue61_Plus = "PastDue61_Plus"; - - /** Set Past Due > 61 */ - public void setPastDue61_Plus (BigDecimal PastDue61_Plus); - - /** Get Past Due > 61 */ - public BigDecimal getPastDue61_Plus(); - - /** Column name PastDue8_30 */ - public static final String COLUMNNAME_PastDue8_30 = "PastDue8_30"; - - /** Set Past Due 8-30 */ - public void setPastDue8_30 (BigDecimal PastDue8_30); - - /** Get Past Due 8-30 */ - public BigDecimal getPastDue8_30(); - - /** Column name PastDue91_Plus */ - public static final String COLUMNNAME_PastDue91_Plus = "PastDue91_Plus"; - - /** Set Past Due > 91 */ - public void setPastDue91_Plus (BigDecimal PastDue91_Plus); - - /** Get Past Due > 91 */ - public BigDecimal getPastDue91_Plus(); - - /** Column name PastDueAmt */ - public static final String COLUMNNAME_PastDueAmt = "PastDueAmt"; - - /** Set Past Due */ - public void setPastDueAmt (BigDecimal PastDueAmt); - - /** Get Past Due */ - public BigDecimal getPastDueAmt(); - - /** Column name StatementDate */ - public static final String COLUMNNAME_StatementDate = "StatementDate"; - - /** Set Statement date. - * Date of the statement - */ - public void setStatementDate (Timestamp StatementDate); - - /** Get Statement date. - * Date of the statement - */ - public Timestamp getStatementDate(); -} diff --git a/base/src/org/compiere/model/I_T_DistributionRunDetail.java b/base/src/org/compiere/model/I_T_DistributionRunDetail.java index 87cbc81588..3bc1ea72a5 100644 --- a/base/src/org/compiere/model/I_T_DistributionRunDetail.java +++ b/base/src/org/compiere/model/I_T_DistributionRunDetail.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for T_DistributionRunDetail * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_T_DistributionRunDetail { diff --git a/base/src/org/compiere/model/I_T_InventoryValue.java b/base/src/org/compiere/model/I_T_InventoryValue.java index 738c7533b9..3070882822 100644 --- a/base/src/org/compiere/model/I_T_InventoryValue.java +++ b/base/src/org/compiere/model/I_T_InventoryValue.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for T_InventoryValue * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_T_InventoryValue { diff --git a/base/src/org/compiere/model/I_T_InvoiceGL.java b/base/src/org/compiere/model/I_T_InvoiceGL.java index 9f6faebb45..03c6efb917 100644 --- a/base/src/org/compiere/model/I_T_InvoiceGL.java +++ b/base/src/org/compiere/model/I_T_InvoiceGL.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for T_InvoiceGL * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_T_InvoiceGL { diff --git a/base/src/org/compiere/model/I_T_Replenish.java b/base/src/org/compiere/model/I_T_Replenish.java index f39825268f..db14f387ed 100644 --- a/base/src/org/compiere/model/I_T_Replenish.java +++ b/base/src/org/compiere/model/I_T_Replenish.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for T_Replenish * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_T_Replenish { diff --git a/base/src/org/compiere/model/I_T_Report.java b/base/src/org/compiere/model/I_T_Report.java index d72a20cf69..3b24dd8beb 100644 --- a/base/src/org/compiere/model/I_T_Report.java +++ b/base/src/org/compiere/model/I_T_Report.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for T_Report * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_T_Report { diff --git a/base/src/org/compiere/model/I_T_ReportStatement.java b/base/src/org/compiere/model/I_T_ReportStatement.java index 17271b63a4..2b9da0e1e8 100644 --- a/base/src/org/compiere/model/I_T_ReportStatement.java +++ b/base/src/org/compiere/model/I_T_ReportStatement.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for T_ReportStatement * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_T_ReportStatement { diff --git a/base/src/org/compiere/model/I_T_Transaction.java b/base/src/org/compiere/model/I_T_Transaction.java index 7cee8ff653..9582f3bb9b 100644 --- a/base/src/org/compiere/model/I_T_Transaction.java +++ b/base/src/org/compiere/model/I_T_Transaction.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for T_Transaction * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_T_Transaction { diff --git a/base/src/org/compiere/model/I_Test.java b/base/src/org/compiere/model/I_Test.java index 8759ef7374..3372fe6541 100644 --- a/base/src/org/compiere/model/I_Test.java +++ b/base/src/org/compiere/model/I_Test.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for Test * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_Test { diff --git a/base/src/org/compiere/model/I_U_BlackListCheque.java b/base/src/org/compiere/model/I_U_BlackListCheque.java index e53c91f604..943b22fa8f 100644 --- a/base/src/org/compiere/model/I_U_BlackListCheque.java +++ b/base/src/org/compiere/model/I_U_BlackListCheque.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for U_BlackListCheque * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_U_BlackListCheque { diff --git a/base/src/org/compiere/model/I_U_RoleMenu.java b/base/src/org/compiere/model/I_U_RoleMenu.java index a5eb96b4ad..66274361d3 100644 --- a/base/src/org/compiere/model/I_U_RoleMenu.java +++ b/base/src/org/compiere/model/I_U_RoleMenu.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for U_RoleMenu * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_U_RoleMenu { diff --git a/base/src/org/compiere/model/I_U_WebMenu.java b/base/src/org/compiere/model/I_U_WebMenu.java index 8545c097d2..3cf29ab371 100644 --- a/base/src/org/compiere/model/I_U_WebMenu.java +++ b/base/src/org/compiere/model/I_U_WebMenu.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for U_WebMenu * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_U_WebMenu { diff --git a/base/src/org/compiere/model/I_U_Web_Properties.java b/base/src/org/compiere/model/I_U_Web_Properties.java index dcdf75ff0a..8a3b4c6b9d 100644 --- a/base/src/org/compiere/model/I_U_Web_Properties.java +++ b/base/src/org/compiere/model/I_U_Web_Properties.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for U_Web_Properties * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_U_Web_Properties { diff --git a/base/src/org/compiere/model/I_W_Advertisement.java b/base/src/org/compiere/model/I_W_Advertisement.java index bfd1e5459c..0a621f9418 100644 --- a/base/src/org/compiere/model/I_W_Advertisement.java +++ b/base/src/org/compiere/model/I_W_Advertisement.java @@ -38,7 +38,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_Advertisement * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_Advertisement { diff --git a/base/src/org/compiere/model/I_W_Basket.java b/base/src/org/compiere/model/I_W_Basket.java index 1d4f4f2de9..50dc0e1c56 100644 --- a/base/src/org/compiere/model/I_W_Basket.java +++ b/base/src/org/compiere/model/I_W_Basket.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_Basket * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_Basket { diff --git a/base/src/org/compiere/model/I_W_BasketLine.java b/base/src/org/compiere/model/I_W_BasketLine.java index d45a29ecc8..2911cb7ef8 100644 --- a/base/src/org/compiere/model/I_W_BasketLine.java +++ b/base/src/org/compiere/model/I_W_BasketLine.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_BasketLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_BasketLine { diff --git a/base/src/org/compiere/model/I_W_Click.java b/base/src/org/compiere/model/I_W_Click.java index 5b96d05190..c528354ed0 100644 --- a/base/src/org/compiere/model/I_W_Click.java +++ b/base/src/org/compiere/model/I_W_Click.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_Click * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_Click { diff --git a/base/src/org/compiere/model/I_W_ClickCount.java b/base/src/org/compiere/model/I_W_ClickCount.java index 3b72e9f5b8..bde120751c 100644 --- a/base/src/org/compiere/model/I_W_ClickCount.java +++ b/base/src/org/compiere/model/I_W_ClickCount.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_ClickCount * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_ClickCount { diff --git a/base/src/org/compiere/model/I_W_Counter.java b/base/src/org/compiere/model/I_W_Counter.java index a2c7be2ea1..b44c33bd5e 100644 --- a/base/src/org/compiere/model/I_W_Counter.java +++ b/base/src/org/compiere/model/I_W_Counter.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_Counter * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_Counter { diff --git a/base/src/org/compiere/model/I_W_CounterCount.java b/base/src/org/compiere/model/I_W_CounterCount.java index 498977caa2..b57cd4f2fb 100644 --- a/base/src/org/compiere/model/I_W_CounterCount.java +++ b/base/src/org/compiere/model/I_W_CounterCount.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_CounterCount * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_CounterCount { diff --git a/base/src/org/compiere/model/I_W_MailMsg.java b/base/src/org/compiere/model/I_W_MailMsg.java index 686f87a808..10f6523628 100644 --- a/base/src/org/compiere/model/I_W_MailMsg.java +++ b/base/src/org/compiere/model/I_W_MailMsg.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_MailMsg * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_MailMsg { diff --git a/base/src/org/compiere/model/I_W_Store.java b/base/src/org/compiere/model/I_W_Store.java index d6ac6d215f..7bf66c3a88 100644 --- a/base/src/org/compiere/model/I_W_Store.java +++ b/base/src/org/compiere/model/I_W_Store.java @@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for W_Store * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ public interface I_W_Store { diff --git a/base/src/org/compiere/model/MAllocationHdr.java b/base/src/org/compiere/model/MAllocationHdr.java new file mode 100644 index 0000000000..f9583ecbb3 --- /dev/null +++ b/base/src/org/compiere/model/MAllocationHdr.java @@ -0,0 +1,787 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.File; +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.process.DocAction; +import org.compiere.process.DocumentEngine; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Msg; + +/** + * Payment Allocation Model. + * Allocation Trigger update C_BPartner + * + * @author Jorg Janke + * @version $Id: MAllocationHdr.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ + * @author victor.perez@e-evolution.com www.e-evolution.com FR [ 1866214 ] http://sourceforge.net/tracker/index.php?func=detail&aid=1866214&group_id=176962&atid=879335 + */ +public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction +{ + /** + * Get Allocations of Payment + * @param ctx context + * @param C_Payment_ID payment + * @return allocations of payment + * @param trxName transaction + */ + public static MAllocationHdr[] getOfPayment (Properties ctx, int C_Payment_ID, String trxName) + { + String sql = "SELECT * FROM C_AllocationHdr h " + + "WHERE IsActive='Y'" + + " AND EXISTS (SELECT * FROM C_AllocationLine l " + + "WHERE h.C_AllocationHdr_ID=l.C_AllocationHdr_ID AND l.C_Payment_ID=?)"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, trxName); + pstmt.setInt(1, C_Payment_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + list.add (new MAllocationHdr(ctx, rs, trxName)); + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + MAllocationHdr[] retValue = new MAllocationHdr[list.size()]; + list.toArray(retValue); + return retValue; + } // getOfPayment + + /** + * Get Allocations of Invoice + * @param ctx context + * @param C_Invoice_ID payment + * @return allocations of payment + * @param trxName transaction + */ + public static MAllocationHdr[] getOfInvoice (Properties ctx, int C_Invoice_ID, String trxName) + { + String sql = "SELECT * FROM C_AllocationHdr h " + + "WHERE IsActive='Y'" + + " AND EXISTS (SELECT * FROM C_AllocationLine l " + + "WHERE h.C_AllocationHdr_ID=l.C_AllocationHdr_ID AND l.C_Invoice_ID=?)"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, trxName); + pstmt.setInt(1, C_Invoice_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + list.add (new MAllocationHdr(ctx, rs, trxName)); + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + MAllocationHdr[] retValue = new MAllocationHdr[list.size()]; + list.toArray(retValue); + return retValue; + } // getOfInvoice + + //FR [ 1866214 ] + /** + * Get Allocations of Cash + * @param ctx context + * @param C_Cash_ID Cash ID + * @return allocations of payment + * @param trxName transaction + */ + public static MAllocationHdr[] getOfCash (Properties ctx, int C_Cash_ID, String trxName) + { + String sql = "SELECT a.C_AllocationHdr_ID FROM C_Cash c " + + " INNER JOIN C_Cashline cl ON (c.C_Cash_ID= cl.C_Cash_ID) " + + " INNER JOIN C_AllocationLine al ON (al.C_Cashline_ID=cl.C_Cashline_ID) " + + " INNER JOIN C_AllocationHdr a ON(al.C_AllocationHdr_ID=a.C_AllocationHdr_ID) " + + " WHERE c.C_Cash_ID=? GROUP BY a.C_AllocationHdr_ID"; + + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, trxName); + pstmt.setInt(1, C_Cash_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + list.add (new MAllocationHdr(ctx, rs.getInt(1), trxName)); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + MAllocationHdr[] retValue = new MAllocationHdr[list.size()]; + list.toArray(retValue); + return retValue; + } // getOfInvoice + + /** Logger */ + private static CLogger s_log = CLogger.getCLogger(MAllocationHdr.class); + + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param C_AllocationHdr_ID id + * @param trxName transaction + */ + public MAllocationHdr (Properties ctx, int C_AllocationHdr_ID, String trxName) + { + super (ctx, C_AllocationHdr_ID, trxName); + if (C_AllocationHdr_ID == 0) + { + // setDocumentNo (null); + setDateTrx (new Timestamp(System.currentTimeMillis())); + setDateAcct (getDateTrx()); + setDocAction (DOCACTION_Complete); // CO + setDocStatus (DOCSTATUS_Drafted); // DR + // setC_Currency_ID (0); + setApprovalAmt (Env.ZERO); + setIsApproved (false); + setIsManual (false); + // + setPosted (false); + setProcessed (false); + setProcessing(false); + } + } // MAllocation + + /** + * Mandatory New Constructor + * @param ctx context + * @param IsManual manual trx + * @param DateTrx date (if null today) + * @param C_Currency_ID currency + * @param description description + * @param trxName transaction + */ + public MAllocationHdr (Properties ctx, boolean IsManual, Timestamp DateTrx, + int C_Currency_ID, String description, String trxName) + { + this (ctx, 0, trxName); + setIsManual(IsManual); + if (DateTrx != null) + { + setDateTrx (DateTrx); + setDateAcct (DateTrx); + } + setC_Currency_ID (C_Currency_ID); + if (description != null) + setDescription(description); + } // create Allocation + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MAllocationHdr (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MAllocation + + /** Lines */ + private MAllocationLine[] m_lines = null; + + /** + * Get Lines + * @param requery if true requery + * @return lines + */ + public MAllocationLine[] getLines (boolean requery) + { + if (m_lines != null && m_lines.length != 0 && !requery) { + set_TrxName(m_lines, get_TrxName()); + return m_lines; + } + // + String sql = "SELECT * FROM C_AllocationLine WHERE C_AllocationHdr_ID=?"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getC_AllocationHdr_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + { + MAllocationLine line = new MAllocationLine(getCtx(), rs, get_TrxName()); + line.setParent(this); + list.add (line); + } + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + // + m_lines = new MAllocationLine[list.size ()]; + list.toArray (m_lines); + return m_lines; + } // getLines + + /** + * Set Processed + * @param processed Processed + */ + public void setProcessed (boolean processed) + { + super.setProcessed (processed); + if (get_ID() == 0) + return; + String sql = "UPDATE C_AllocationHdr SET Processed='" + + (processed ? "Y" : "N") + + "' WHERE C_AllocationHdr_ID=" + getC_AllocationHdr_ID(); + int no = DB.executeUpdate(sql, get_TrxName()); + m_lines = null; + log.fine(processed + " - #" + no); + } // setProcessed + + + /************************************************************************** + * Before Save + * @param newRecord + * @return save + */ + protected boolean beforeSave (boolean newRecord) + { + // Changed from Not to Active + if (!newRecord && is_ValueChanged("IsActive") && isActive()) + { + log.severe ("Cannot Re-Activate deactivated Allocations"); + return false; + } + return true; + } // beforeSave + + /** + * Before Delete. + * @return true if acct was deleted + */ + protected boolean beforeDelete () + { + String trxName = get_TrxName(); + if (trxName == null || trxName.length() == 0) + log.warning ("No transaction"); + if (isPosted()) + { + if (!MPeriod.isOpen(getCtx(), getDateTrx(), MDocType.DOCBASETYPE_PaymentAllocation)) + { + log.warning ("Period Closed"); + return false; + } + setPosted(false); + if (MFactAcct.delete (Table_ID, get_ID(), trxName) < 0) + return false; + } + // Mark as Inactive + setIsActive(false); // updated DB for line delete/process + String sql = "UPDATE C_AllocationHdr SET IsActive='N' WHERE C_AllocationHdr_ID=?"; + DB.executeUpdate(sql, getC_AllocationHdr_ID(), trxName); + + // Unlink + getLines(true); + HashSet bps = new HashSet(); + for (int i = 0; i < m_lines.length; i++) + { + MAllocationLine line = m_lines[i]; + bps.add(new Integer(line.getC_BPartner_ID())); + if (!line.delete(true, trxName)) + return false; + } + updateBP(bps); + return true; + } // beforeDelete + + /** + * After Save + * @param newRecord + * @param success + * @return success + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + return success; + } // afterSave + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // processIt + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info(toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info(toString()); + setDocAction(DOCACTION_Prepare); + return true; + } // invalidateIt + + /** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getDateAcct(), MDocType.DOCBASETYPE_PaymentAllocation)) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + getLines(false); + if (m_lines.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + // Add up Amounts & validate + BigDecimal approval = Env.ZERO; + for (int i = 0; i < m_lines.length; i++) + { + MAllocationLine line = m_lines[i]; + approval = approval.add(line.getWriteOffAmt()).add(line.getDiscountAmt()); + // Make sure there is BP + if (line.getC_BPartner_ID() == 0) + { + m_processMsg = "No Business Partner"; + return DocAction.STATUS_Invalid; + } + } + setApprovalAmt(approval); + // + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + m_justPrepared = true; + if (!DOCACTION_Complete.equals(getDocAction())) + setDocAction(DOCACTION_Complete); + + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info(toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info(toString()); + setIsApproved(false); + return true; + } // rejectIt + + /** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Implicit Approval + if (!isApproved()) + approveIt(); + log.info(toString()); + + // Link + getLines(false); + HashSet bps = new HashSet(); + for (int i = 0; i < m_lines.length; i++) + { + MAllocationLine line = m_lines[i]; + bps.add(new Integer(line.processIt(false))); // not reverse + } + updateBP(bps); + + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Void Document. + * Same as Close. + * @return true if success + */ + public boolean voidIt() + { + log.info(toString()); + + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + boolean retValue = reverseIt(); + + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + + setDocAction(DOCACTION_None); + + return retValue; + } // voidIt + + /** + * Close Document. + * Cancel not delivered Qunatities + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + setDocAction(DOCACTION_None); + + return true; + } // closeIt + + /** + * Reverse Correction + * @return true if success + */ + public boolean reverseCorrectIt() + { + log.info(toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + boolean retValue = reverseIt(); + + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + + setDocAction(DOCACTION_None); + return retValue; + } // reverseCorrectionIt + + /** + * Reverse Accrual - none + * @return false + */ + public boolean reverseAccrualIt() + { + log.info(toString()); + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + boolean retValue = reverseIt(); + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + setDocAction(DOCACTION_None); + return retValue; + } // reverseAccrualIt + + /** + * Re-activate + * @return false + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + return false; + } // reActivateIt + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MAllocationHdr["); + sb.append(get_ID()).append("-").append(getSummary()).append ("]"); + return sb.toString (); + } // toString + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + return Msg.getElement(getCtx(), "C_AllocationHdr_ID") + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID()); + // if (re == null) + return null; + // return re.getPDF(file); + } // createPDF + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Total Lines = 123.00 (#1) + sb.append(": ") + .append(Msg.translate(getCtx(),"ApprovalAmt")).append("=").append(getApprovalAmt()) + .append(" (#").append(getLines(false).length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID + */ + public int getDoc_User_ID() + { + return getCreatedBy(); + } // getDoc_User_ID + + + /************************************************************************** + * Reverse Allocation. + * Period needs to be open + * @return true if reversed + */ + private boolean reverseIt() + { + if (!isActive()) + throw new IllegalStateException("Allocation already reversed (not active)"); + + // Can we delete posting + if (!MPeriod.isOpen(getCtx(), getDateTrx(), MPeriodControl.DOCBASETYPE_PaymentAllocation)) + throw new IllegalStateException("@PeriodClosed@"); + + // Set Inactive + setIsActive (false); + setDocumentNo(getDocumentNo()+"^"); + setDocStatus(DOCSTATUS_Reversed); // for direct calls + if (!save() || isActive()) + throw new IllegalStateException("Cannot de-activate allocation"); + + // Delete Posting + int no = MFactAcct.delete(MAllocationHdr.Table_ID, getC_AllocationHdr_ID(), get_TrxName()); + log.fine("Fact_Acct deleted #" + no); + + // Unlink Invoices + getLines(true); + HashSet bps = new HashSet(); + for (int i = 0; i < m_lines.length; i++) + { + MAllocationLine line = m_lines[i]; + line.setIsActive(false); + line.save(); + bps.add(new Integer(line.processIt(true))); // reverse + } + updateBP(bps); + return true; + } // reverse + + + /** + * Update Open Balance of BP's + * @param bps list of business partners + */ + private void updateBP(HashSet bps) + { + log.info("#" + bps.size()); + Iterator it = bps.iterator(); + while (it.hasNext()) + { + int C_BPartner_ID = it.next(); + MBPartner bp = new MBPartner(getCtx(), C_BPartner_ID, get_TrxName()); + bp.setTotalOpenBalance(); // recalculates from scratch + // bp.setSOCreditStatus(); // called automatically + if (bp.save()) + log.fine(bp.toString()); + else + log.log(Level.SEVERE, "BP not updated - " + bp); + } + } // updateBP + +} // MAllocation diff --git a/base/src/org/compiere/model/MCash.java b/base/src/org/compiere/model/MCash.java new file mode 100644 index 0000000000..d2c08161db --- /dev/null +++ b/base/src/org/compiere/model/MCash.java @@ -0,0 +1,878 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.File; +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.process.DocAction; +import org.compiere.process.DocumentEngine; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.Msg; +import org.compiere.util.TimeUtil; + +/** + * Cash Journal Model + * + * @author Jorg Janke + * @version $Id: MCash.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ + * @author victor.perez@e-evolution.com www.e-evolution.com FR [ 1866214 ] http://sourceforge.net/tracker/index.php?func=detail&aid=1866214&group_id=176962&atid=879335 + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1831997 ] Cash journal allocation reversed + *
  • BF [ 1894524 ] Pay an reversed invoice + */ +public class MCash extends X_C_Cash implements DocAction +{ + /** + * Get Cash Journal for currency, org and date + * @param ctx context + * @param C_Currency_ID currency + * @param AD_Org_ID org + * @param dateAcct date + * @param trxName transaction + * @return cash + */ + public static MCash get (Properties ctx, int AD_Org_ID, + Timestamp dateAcct, int C_Currency_ID, String trxName) + { + MCash retValue = null; + // Existing Journal + String sql; + sql = "SELECT * FROM C_Cash c " + + "WHERE c.AD_Org_ID=?" // #1 + + " AND TRUNC(c.StatementDate)=?" // #2 + + " AND c.Processed='N'" + + " AND EXISTS (SELECT * FROM C_CashBook cb " + + "WHERE c.C_CashBook_ID=cb.C_CashBook_ID AND cb.AD_Org_ID=c.AD_Org_ID" + + " AND cb.C_Currency_ID=?)"; // #3 + + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, AD_Org_ID); + pstmt.setTimestamp (2, TimeUtil.getDay(dateAcct)); + pstmt.setInt (3, C_Currency_ID); + rs = pstmt.executeQuery (); + if (rs.next ()) + retValue = new MCash (ctx, rs, trxName); + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + if (retValue != null) + return retValue; + + // Get CashBook + MCashBook cb = MCashBook.get (ctx, AD_Org_ID, C_Currency_ID); + if (cb == null) + { + s_log.warning("No CashBook for AD_Org_ID=" + AD_Org_ID + ", C_Currency_ID=" + C_Currency_ID); + return null; + } + + // Create New Journal + retValue = new MCash (cb, dateAcct); + retValue.save(trxName); + return retValue; + } // get + + /** + * Get Cash Journal for CashBook and date + * @param ctx context + * @param C_CashBook_ID cashbook + * @param dateAcct date + * @param trxName transaction + * @return cash + */ + public static MCash get (Properties ctx, int C_CashBook_ID, + Timestamp dateAcct, String trxName) + { + MCash retValue = null; + // Existing Journal + String sql = "SELECT * FROM C_Cash c " + + "WHERE c.C_CashBook_ID=?" // #1 + + " AND TRUNC(c.StatementDate)=?" // #2 + + " AND c.Processed='N'"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, C_CashBook_ID); + pstmt.setTimestamp (2, TimeUtil.getDay(dateAcct)); + rs = pstmt.executeQuery (); + if (rs.next ()) + retValue = new MCash (ctx, rs, trxName); + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + if (retValue != null) + return retValue; + + // Get CashBook + MCashBook cb = new MCashBook (ctx, C_CashBook_ID, trxName); + if (cb.get_ID() ==0) + { + s_log.warning("Not found C_CashBook_ID=" + C_CashBook_ID); + return null; + } + + // Create New Journal + retValue = new MCash (cb, dateAcct); + retValue.save(trxName); + return retValue; + } // get + + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MCash.class); + + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param C_Cash_ID id + * @param trxName transaction + */ + public MCash (Properties ctx, int C_Cash_ID, String trxName) + { + super (ctx, C_Cash_ID, trxName); + if (C_Cash_ID == 0) + { + // setC_CashBook_ID (0); // FK + setBeginningBalance (Env.ZERO); + setEndingBalance (Env.ZERO); + setStatementDifference(Env.ZERO); + setDocAction(DOCACTION_Complete); + setDocStatus(DOCSTATUS_Drafted); + // + Timestamp today = TimeUtil.getDay(System.currentTimeMillis()); + setStatementDate (today); // @#Date@ + setDateAcct (today); // @#Date@ + String name = DisplayType.getDateFormat(DisplayType.Date).format(today) + + " " + MOrg.get(ctx, getAD_Org_ID()).getValue(); + setName (name); + setIsApproved(false); + setPosted (false); // N + setProcessed (false); + } + } // MCash + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MCash (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MCash + + /** + * Parent Constructor + * @param cb cash book + * @param today date - if null today + */ + public MCash (MCashBook cb, Timestamp today) + { + this (cb.getCtx(), 0, cb.get_TrxName()); + setClientOrg(cb); + setC_CashBook_ID(cb.getC_CashBook_ID()); + if (today != null) + { + setStatementDate (today); + setDateAcct (today); + String name = DisplayType.getDateFormat(DisplayType.Date).format(today) + + " " + cb.getName(); + setName (name); + } + m_book = cb; + } // MCash + + /** Lines */ + private MCashLine[] m_lines = null; + /** CashBook */ + private MCashBook m_book = null; + + /** + * Get Lines + * @param requery requery + * @return lines + */ + public MCashLine[] getLines (boolean requery) + { + if (m_lines != null && !requery) { + set_TrxName(m_lines, get_TrxName()); + return m_lines; + } + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM C_CashLine WHERE C_Cash_ID=? ORDER BY Line"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getC_Cash_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new MCashLine (getCtx(), rs, get_TrxName())); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + + m_lines = new MCashLine[list.size ()]; + list.toArray (m_lines); + return m_lines; + } // getLines + + /** + * Get Cash Book + * @return cash book + */ + public MCashBook getCashBook() + { + if (m_book == null) + m_book = MCashBook.get(getCtx(), getC_CashBook_ID()); + return m_book; + } // getCashBook + + /** + * Get Document No + * @return name + */ + public String getDocumentNo() + { + return getName(); + } // getDocumentNo + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + return Msg.getElement(getCtx(), "C_Cash_ID") + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID()); + // if (re == null) + return null; + // return re.getPDF(file); + } // createPDF + + /** + * Before Save + * @param newRecord + * @return true + */ + protected boolean beforeSave (boolean newRecord) + { + setAD_Org_ID(getCashBook().getAD_Org_ID()); + if (getAD_Org_ID() == 0) + { + log.saveError("Error", Msg.parseTranslation(getCtx(), "@AD_Org_ID@")); + return false; + } + // Calculate End Balance + setEndingBalance(getBeginningBalance().add(getStatementDifference())); + return true; + } // beforeSave + + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // process + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info(toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info(toString()); + setDocAction(DOCACTION_Prepare); + return true; + } // invalidateIt + + /** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getDateAcct(), MDocType.DOCBASETYPE_CashJournal)) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + MCashLine[] lines = getLines(false); + if (lines.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + // Add up Amounts + BigDecimal difference = Env.ZERO; + int C_Currency_ID = getC_Currency_ID(); + for (int i = 0; i < lines.length; i++) + { + MCashLine line = lines[i]; + if (!line.isActive()) + continue; + if (C_Currency_ID == line.getC_Currency_ID()) + difference = difference.add(line.getAmount()); + else + { + BigDecimal amt = MConversionRate.convert(getCtx(), line.getAmount(), + line.getC_Currency_ID(), C_Currency_ID, getDateAcct(), 0, + getAD_Client_ID(), getAD_Org_ID()); + if (amt == null) + { + m_processMsg = "No Conversion Rate found - @C_CashLine_ID@= " + line.getLine(); + return DocAction.STATUS_Invalid; + } + difference = difference.add(amt); + } + } + setStatementDifference(difference); + // setEndingBalance(getBeginningBalance().add(getStatementDifference())); + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + m_justPrepared = true; + if (!DOCACTION_Complete.equals(getDocAction())) + setDocAction(DOCACTION_Complete); + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info(toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info(toString()); + setIsApproved(false); + return true; + } // rejectIt + + /** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + + // Implicit Approval + if (!isApproved()) + approveIt(); + // + log.info(toString()); + + MCashLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MCashLine line = lines[i]; + if (MCashLine.CASHTYPE_Invoice.equals(line.getCashType())) + { + // Check if the invoice is completed - teo_sarca BF [ 1894524 ] + MInvoice invoice = line.getInvoice(); + if (!MInvoice.DOCSTATUS_Completed.equals(invoice.getDocStatus()) + && !MInvoice.DOCSTATUS_Closed.equals(invoice.getDocStatus())) + { + m_processMsg = "@Line@ "+line.getLine()+": @InvoiceCreateDocNotCompleted@"; + return DocAction.STATUS_Invalid; + } + // + String name = Msg.translate(getCtx(), "C_Cash_ID") + ": " + getName() + + " - " + Msg.translate(getCtx(), "Line") + " " + line.getLine(); + MAllocationHdr hdr = new MAllocationHdr(getCtx(), false, + getDateAcct(), line.getC_Currency_ID(), + name, get_TrxName()); + hdr.setAD_Org_ID(getAD_Org_ID()); + if (!hdr.save()) + { + m_processMsg = CLogger.retrieveErrorString("Could not create Allocation Hdr"); + return DocAction.STATUS_Invalid; + } + // Allocation Line + MAllocationLine aLine = new MAllocationLine (hdr, line.getAmount(), + line.getDiscountAmt(), line.getWriteOffAmt(), Env.ZERO); + aLine.setC_Invoice_ID(line.getC_Invoice_ID()); + aLine.setC_CashLine_ID(line.getC_CashLine_ID()); + if (!aLine.save()) + { + m_processMsg = CLogger.retrieveErrorString("Could not create Allocation Line"); + return DocAction.STATUS_Invalid; + } + // Should start WF + if(!hdr.processIt(DocAction.ACTION_Complete)) { + m_processMsg = CLogger.retrieveErrorString("Could not process Allocation"); + return DocAction.STATUS_Invalid; + } + if (!hdr.save()) { + m_processMsg = CLogger.retrieveErrorString("Could not save Allocation"); + return DocAction.STATUS_Invalid; + } + } + else if (MCashLine.CASHTYPE_BankAccountTransfer.equals(line.getCashType())) + { + // Payment just as intermediate info + MPayment pay = new MPayment (getCtx(), 0, get_TrxName()); + pay.setAD_Org_ID(getAD_Org_ID()); + String documentNo = getName(); + pay.setDocumentNo(documentNo); + pay.setR_PnRef(documentNo); + pay.set_Value("TrxType", "X"); // Transfer + pay.set_Value("TenderType", "X"); + // + pay.setC_BankAccount_ID(line.getC_BankAccount_ID()); + pay.setC_DocType_ID(true); // Receipt + pay.setDateTrx(getStatementDate()); + pay.setDateAcct(getDateAcct()); + pay.setAmount(line.getC_Currency_ID(), line.getAmount().negate()); // Transfer + pay.setDescription(line.getDescription()); + pay.setDocStatus(MPayment.DOCSTATUS_Closed); + pay.setDocAction(MPayment.DOCACTION_None); + pay.setPosted(true); + pay.setIsAllocated(true); // Has No Allocation! + pay.setProcessed(true); + if (!pay.save()) + { + m_processMsg = CLogger.retrieveErrorString("Could not create Payment"); + return DocAction.STATUS_Invalid; + } + + line.setC_Payment_ID(pay.getC_Payment_ID()); + if (!line.save()) + { + m_processMsg = "Could not update Cash Line"; + return DocAction.STATUS_Invalid; + } + } + } + + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + // + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Void Document. + * Same as Close. + * @return true if success + */ + public boolean voidIt() + { + log.info(toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + //FR [ 1866214 ] + boolean retValue = reverseIt(); + + if (retValue) { + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + setDocAction(DOCACTION_None); + } + + return retValue; + } // voidIt + + //FR [ 1866214 ] + /************************************************************************** + * Reverse Cash + * Period needs to be open + * @return true if reversed + */ + private boolean reverseIt() + { + if (DOCSTATUS_Closed.equals(getDocStatus()) + || DOCSTATUS_Reversed.equals(getDocStatus()) + || DOCSTATUS_Voided.equals(getDocStatus())) + { + m_processMsg = "Document Closed: " + getDocStatus(); + setDocAction(DOCACTION_None); + return false; + } + + // Can we delete posting + if (!MPeriod.isOpen(getCtx(), this.getDateAcct(), MPeriodControl.DOCBASETYPE_CashJournal)) + throw new IllegalStateException("@PeriodClosed@"); + + // Reverse Allocations + MAllocationHdr[] allocations = MAllocationHdr.getOfCash(getCtx(), getC_Cash_ID(), get_TrxName()); + for(MAllocationHdr allocation : allocations) + { + allocation.reverseCorrectIt(); + if(!allocation.save()) + throw new IllegalStateException("Cannot reverse allocations"); + } + + MCashLine[] cashlines = getLines(true); + for (MCashLine cashline : cashlines ) + { + BigDecimal oldAmount = cashline.getAmount(); + BigDecimal oldDiscount = cashline.getDiscountAmt(); + BigDecimal oldWriteOff = cashline.getWriteOffAmt(); + cashline.setAmount(Env.ZERO); + cashline.setDiscountAmt(Env.ZERO); + cashline.setWriteOffAmt(Env.ZERO); + cashline.addDescription(Msg.getMsg(getCtx(), "Voided") + + " (Amount=" + oldAmount + ", Discount=" + oldDiscount + + ", WriteOff=" + oldWriteOff + ", )"); + if (MCashLine.CASHTYPE_BankAccountTransfer.equals(cashline.getCashType())) + { + if (cashline.getC_Payment_ID() == 0) + throw new IllegalStateException("Cannot reverse payment"); + + MPayment payment = new MPayment(getCtx(), cashline.getC_Payment_ID(),get_TrxName()); + payment.reverseCorrectIt(); + if (!payment.save()) + throw new IllegalStateException("Cannot reverse payment"); + } + } + + setName(getName()+"^"); + addDescription(Msg.getMsg(getCtx(), "Voided")); + setDocStatus(DOCSTATUS_Reversed); // for direct calls + setProcessed(true); + setDocAction(DOCACTION_None); + if (!save()) + throw new IllegalStateException("Cannot save journal cash"); + + // Delete Posting + String sql = "DELETE FROM Fact_Acct WHERE AD_Table_ID=" + MCash.Table_ID + + " AND Record_ID=" + getC_Cash_ID(); + int no = DB.executeUpdate(sql, get_TrxName()); + log.fine("Fact_Acct deleted #" + no); + return true; + } // reverse + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + /** + * Close Document. + * Cancel not delivered Quantities + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + setDocAction(DOCACTION_None); + return true; + } // closeIt + + /** + * Reverse Correction + * @return true if success + */ + public boolean reverseCorrectIt() + { + log.info(toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + //FR [ 1866214 ] + boolean retValue = reverseIt(); + + if (retValue) { + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + } + + return retValue; + } // reverseCorrectionIt + + /** + * Reverse Accrual - none + * @return true if success + */ + public boolean reverseAccrualIt() + { + log.info(toString()); + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return false; + } // reverseAccrualIt + + /** + * Re-activate + * @return true if success + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + setProcessed(false); + if (reverseCorrectIt()) + return true; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + return false; + } // reActivateIt + + /** + * Set Processed + * @param processed processed + */ + public void setProcessed (boolean processed) + { + super.setProcessed (processed); + String sql = "UPDATE C_CashLine SET Processed='" + + (processed ? "Y" : "N") + + "' WHERE C_Cash_ID=" + getC_Cash_ID(); + int noLine = DB.executeUpdate (sql, get_TrxName()); + m_lines = null; + log.fine(processed + " - Lines=" + noLine); + } // setProcessed + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MCash["); + sb.append (get_ID ()) + .append ("-").append (getName()) + .append(", Balance=").append(getBeginningBalance()) + .append("->").append(getEndingBalance()) + .append ("]"); + return sb.toString (); + } // toString + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getName()); + // : Total Lines = 123.00 (#1) + sb.append(": ") + .append(Msg.translate(getCtx(),"BeginningBalance")).append("=").append(getBeginningBalance()) + .append(",") + .append(Msg.translate(getCtx(),"EndingBalance")).append("=").append(getEndingBalance()) + .append(" (#").append(getLines(false).length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID + */ + public int getDoc_User_ID() + { + return getCreatedBy(); + } // getDoc_User_ID + + /** + * Get Document Approval Amount + * @return amount difference + */ + public BigDecimal getApprovalAmt() + { + return getStatementDifference(); + } // getApprovalAmt + + /** + * Get Currency + * @return Currency + */ + public int getC_Currency_ID () + { + return getCashBook().getC_Currency_ID(); + } // getC_Currency_ID + +} // MCash diff --git a/base/src/org/compiere/model/MInOut.java b/base/src/org/compiere/model/MInOut.java new file mode 100644 index 0000000000..b40ff26b12 --- /dev/null +++ b/base/src/org/compiere/model/MInOut.java @@ -0,0 +1,2090 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.*; +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.print.*; +import org.compiere.process.*; +import org.compiere.util.*; + +/** + * Shipment Model + * + * @author Jorg Janke + * @version $Id: MInOut.java,v 1.4 2006/07/30 00:51:03 jjanke Exp $ + * + * Modifications: Added the RMA functionality (Ashley Ramdass) + * @author Karsten Thiemann, Schaeffer AG + *
  • Bug [ 1759431 ] Problems with VCreateFrom + * @author victor.perez@e-evolution.com, e-Evolution + *
  • FR [ 1948157 ] Is necessary the reference for document reverse + * @see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962 + */ +public class MInOut extends X_M_InOut implements DocAction +{ + /** + * Create Shipment From Order + * @param order order + * @param movementDate optional movement date + * @param forceDelivery ignore order delivery rule + * @param allAttributeInstances if true, all attribute set instances + * @param minGuaranteeDate optional minimum guarantee date if all attribute instances + * @param complete complete document (Process if false, Complete if true) + * @param trxName transaction + * @return Shipment or null + */ + public static MInOut createFrom (MOrder order, Timestamp movementDate, + boolean forceDelivery, boolean allAttributeInstances, Timestamp minGuaranteeDate, + boolean complete, String trxName) + { + if (order == null) + throw new IllegalArgumentException("No Order"); + // + if (!forceDelivery && DELIVERYRULE_CompleteLine.equals(order.getDeliveryRule())) + { + return null; + } + + // Create Meader + MInOut retValue = new MInOut (order, 0, movementDate); + retValue.setDocAction(complete ? DOCACTION_Complete : DOCACTION_Prepare); + + // Check if we can create the lines + MOrderLine[] oLines = order.getLines(true, "M_Product_ID"); + for (int i = 0; i < oLines.length; i++) + { + BigDecimal qty = oLines[i].getQtyOrdered().subtract(oLines[i].getQtyDelivered()); + // Nothing to deliver + if (qty.signum() == 0) + continue; + // Stock Info + MStorage[] storages = null; + MProduct product = oLines[i].getProduct(); + if (product != null && product.get_ID() != 0 && product.isStocked()) + { + String MMPolicy = product.getMMPolicy(); + storages = MStorage.getWarehouse (order.getCtx(), order.getM_Warehouse_ID(), + oLines[i].getM_Product_ID(), oLines[i].getM_AttributeSetInstance_ID(), + product.getM_AttributeSet_ID(), + allAttributeInstances, minGuaranteeDate, + MClient.MMPOLICY_FiFo.equals(MMPolicy), trxName); + } else { + continue; + } + + if (!forceDelivery) + { + BigDecimal maxQty = Env.ZERO; + for (int ll = 0; ll < storages.length; ll++) + maxQty = maxQty.add(storages[ll].getQtyOnHand()); + if (DELIVERYRULE_Availability.equals(order.getDeliveryRule())) + { + if (maxQty.compareTo(qty) < 0) + qty = maxQty; + } + else if (DELIVERYRULE_CompleteLine.equals(order.getDeliveryRule())) + { + if (maxQty.compareTo(qty) < 0) + continue; + } + } + // Create Line + if (retValue.get_ID() == 0) // not saved yet + retValue.save(trxName); + // Create a line until qty is reached + for (int ll = 0; ll < storages.length; ll++) + { + BigDecimal lineQty = storages[ll].getQtyOnHand(); + if (lineQty.compareTo(qty) > 0) + lineQty = qty; + MInOutLine line = new MInOutLine (retValue); + line.setOrderLine(oLines[i], storages[ll].getM_Locator_ID(), + order.isSOTrx() ? lineQty : Env.ZERO); + line.setQty(lineQty); // Correct UOM for QtyEntered + if (oLines[i].getQtyEntered().compareTo(oLines[i].getQtyOrdered()) != 0) + line.setQtyEntered(lineQty + .multiply(oLines[i].getQtyEntered()) + .divide(oLines[i].getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP)); + line.setC_Project_ID(oLines[i].getC_Project_ID()); + line.save(trxName); + // Delivered everything ? + qty = qty.subtract(lineQty); + // storage[ll].changeQtyOnHand(lineQty, !order.isSOTrx()); // Credit Memo not considered + // storage[ll].save(get_TrxName()); + if (qty.signum() == 0) + break; + } + } // for all order lines + + // No Lines saved + if (retValue.get_ID() == 0) + return null; + + return retValue; + } // createFrom + + /** + * Create new Shipment by copying + * @param from shipment + * @param dateDoc date of the document date + * @param C_DocType_ID doc type + * @param isSOTrx sales order + * @param counter create counter links + * @param trxName trx + * @param setOrder set the order link + * @return Shipment + */ + public static MInOut copyFrom (MInOut from, Timestamp dateDoc, + int C_DocType_ID, boolean isSOTrx, boolean counter, String trxName, boolean setOrder) + { + MInOut to = new MInOut (from.getCtx(), 0, null); + to.set_TrxName(trxName); + copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org_ID()); + to.set_ValueNoCheck ("M_InOut_ID", I_ZERO); + to.set_ValueNoCheck ("DocumentNo", null); + // + to.setDocStatus (DOCSTATUS_Drafted); // Draft + to.setDocAction(DOCACTION_Complete); + // + to.setC_DocType_ID (C_DocType_ID); + to.setIsSOTrx(isSOTrx); + if (counter) + to.setMovementType (isSOTrx ? MOVEMENTTYPE_CustomerShipment : MOVEMENTTYPE_VendorReceipts); + // + to.setDateOrdered (dateDoc); + to.setDateAcct (dateDoc); + to.setMovementDate(dateDoc); + to.setDatePrinted(null); + to.setIsPrinted (false); + to.setDateReceived(null); + to.setNoPackages(0); + to.setShipDate(null); + to.setPickDate(null); + to.setIsInTransit(false); + // + to.setIsApproved (false); + to.setC_Invoice_ID(0); + to.setTrackingNo(null); + to.setIsInDispute(false); + // + to.setPosted (false); + to.setProcessed (false); + //[ 1633721 ] Reverse Documents- Processing=Y + to.setProcessing(false); + to.setC_Order_ID(0); // Overwritten by setOrder + to.setM_RMA_ID(0); // Overwritten by setOrder + if (counter) + { + to.setC_Order_ID(0); + to.setRef_InOut_ID(from.getM_InOut_ID()); + // Try to find Order/Invoice link + if (from.getC_Order_ID() != 0) + { + MOrder peer = new MOrder (from.getCtx(), from.getC_Order_ID(), from.get_TrxName()); + if (peer.getRef_Order_ID() != 0) + to.setC_Order_ID(peer.getRef_Order_ID()); + } + if (from.getC_Invoice_ID() != 0) + { + MInvoice peer = new MInvoice (from.getCtx(), from.getC_Invoice_ID(), from.get_TrxName()); + if (peer.getRef_Invoice_ID() != 0) + to.setC_Invoice_ID(peer.getRef_Invoice_ID()); + } + } + else + { + to.setRef_InOut_ID(0); + if (setOrder) + { + to.setC_Order_ID(from.getC_Order_ID()); + to.setM_RMA_ID(from.getM_RMA_ID()); // Copy also RMA + } + } + // + if (!to.save(trxName)) + throw new IllegalStateException("Could not create Shipment"); + if (counter) + from.setRef_InOut_ID(to.getM_InOut_ID()); + + if (to.copyLinesFrom(from, counter, setOrder) == 0) + throw new IllegalStateException("Could not create Shipment Lines"); + + return to; + } // copyFrom + + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param M_InOut_ID + * @param trxName rx name + */ + public MInOut (Properties ctx, int M_InOut_ID, String trxName) + { + super (ctx, M_InOut_ID, trxName); + if (M_InOut_ID == 0) + { + // setDocumentNo (null); + // setC_BPartner_ID (0); + // setC_BPartner_Location_ID (0); + // setM_Warehouse_ID (0); + // setC_DocType_ID (0); + setIsSOTrx (false); + setMovementDate (new Timestamp (System.currentTimeMillis ())); + setDateAcct (getMovementDate()); + // setMovementType (MOVEMENTTYPE_CustomerShipment); + setDeliveryRule (DELIVERYRULE_Availability); + setDeliveryViaRule (DELIVERYVIARULE_Pickup); + setFreightCostRule (FREIGHTCOSTRULE_FreightIncluded); + setDocStatus (DOCSTATUS_Drafted); + setDocAction (DOCACTION_Complete); + setPriorityRule (PRIORITYRULE_Medium); + setNoPackages(0); + setIsInTransit(false); + setIsPrinted (false); + setSendEMail (false); + setIsInDispute(false); + // + setIsApproved(false); + super.setProcessed (false); + setProcessing(false); + setPosted(false); + } + } // MInOut + + /** + * Load Constructor + * @param ctx context + * @param rs result set record + * @param trxName transaction + */ + public MInOut (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MInOut + + /** + * Order Constructor - create header only + * @param order order + * @param movementDate optional movement date (default today) + * @param C_DocTypeShipment_ID document type or 0 + */ + public MInOut (MOrder order, int C_DocTypeShipment_ID, Timestamp movementDate) + { + this (order.getCtx(), 0, order.get_TrxName()); + setClientOrg(order); + setC_BPartner_ID (order.getC_BPartner_ID()); + setC_BPartner_Location_ID (order.getC_BPartner_Location_ID()); // shipment address + setAD_User_ID(order.getAD_User_ID()); + // + setM_Warehouse_ID (order.getM_Warehouse_ID()); + setIsSOTrx (order.isSOTrx()); + setMovementType (order.isSOTrx() ? MOVEMENTTYPE_CustomerShipment : MOVEMENTTYPE_VendorReceipts); + if (C_DocTypeShipment_ID == 0) + C_DocTypeShipment_ID = DB.getSQLValue(null, + "SELECT C_DocTypeShipment_ID FROM C_DocType WHERE C_DocType_ID=?", + order.getC_DocType_ID()); + setC_DocType_ID (C_DocTypeShipment_ID); + + // Default - Today + if (movementDate != null) + setMovementDate (movementDate); + setDateAcct (getMovementDate()); + + // Copy from Order + setC_Order_ID(order.getC_Order_ID()); + setDeliveryRule (order.getDeliveryRule()); + setDeliveryViaRule (order.getDeliveryViaRule()); + setM_Shipper_ID(order.getM_Shipper_ID()); + setFreightCostRule (order.getFreightCostRule()); + setFreightAmt(order.getFreightAmt()); + setSalesRep_ID(order.getSalesRep_ID()); + // + setC_Activity_ID(order.getC_Activity_ID()); + setC_Campaign_ID(order.getC_Campaign_ID()); + setC_Charge_ID(order.getC_Charge_ID()); + setChargeAmt(order.getChargeAmt()); + // + setC_Project_ID(order.getC_Project_ID()); + setDateOrdered(order.getDateOrdered()); + setDescription(order.getDescription()); + setPOReference(order.getPOReference()); + setSalesRep_ID(order.getSalesRep_ID()); + setAD_OrgTrx_ID(order.getAD_OrgTrx_ID()); + setUser1_ID(order.getUser1_ID()); + setUser2_ID(order.getUser2_ID()); + setPriorityRule(order.getPriorityRule()); + } // MInOut + + /** + * Invoice Constructor - create header only + * @param invoice invoice + * @param C_DocTypeShipment_ID document type or 0 + * @param movementDate optional movement date (default today) + * @param M_Warehouse_ID warehouse + */ + public MInOut (MInvoice invoice, int C_DocTypeShipment_ID, Timestamp movementDate, int M_Warehouse_ID) + { + this (invoice.getCtx(), 0, invoice.get_TrxName()); + setClientOrg(invoice); + setC_BPartner_ID (invoice.getC_BPartner_ID()); + setC_BPartner_Location_ID (invoice.getC_BPartner_Location_ID()); // shipment address + setAD_User_ID(invoice.getAD_User_ID()); + // + setM_Warehouse_ID (M_Warehouse_ID); + setIsSOTrx (invoice.isSOTrx()); + setMovementType (invoice.isSOTrx() ? MOVEMENTTYPE_CustomerShipment : MOVEMENTTYPE_VendorReceipts); + MOrder order = null; + if (invoice.getC_Order_ID() != 0) + order = new MOrder (invoice.getCtx(), invoice.getC_Order_ID(), invoice.get_TrxName()); + if (C_DocTypeShipment_ID == 0 && order != null) + C_DocTypeShipment_ID = DB.getSQLValue(null, + "SELECT C_DocTypeShipment_ID FROM C_DocType WHERE C_DocType_ID=?", + order.getC_DocType_ID()); + if (C_DocTypeShipment_ID != 0) + setC_DocType_ID (C_DocTypeShipment_ID); + else + setC_DocType_ID(); + + // Default - Today + if (movementDate != null) + setMovementDate (movementDate); + setDateAcct (getMovementDate()); + + // Copy from Invoice + setC_Order_ID(invoice.getC_Order_ID()); + setSalesRep_ID(invoice.getSalesRep_ID()); + // + setC_Activity_ID(invoice.getC_Activity_ID()); + setC_Campaign_ID(invoice.getC_Campaign_ID()); + setC_Charge_ID(invoice.getC_Charge_ID()); + setChargeAmt(invoice.getChargeAmt()); + // + setC_Project_ID(invoice.getC_Project_ID()); + setDateOrdered(invoice.getDateOrdered()); + setDescription(invoice.getDescription()); + setPOReference(invoice.getPOReference()); + setAD_OrgTrx_ID(invoice.getAD_OrgTrx_ID()); + setUser1_ID(invoice.getUser1_ID()); + setUser2_ID(invoice.getUser2_ID()); + + if (order != null) + { + setDeliveryRule (order.getDeliveryRule()); + setDeliveryViaRule (order.getDeliveryViaRule()); + setM_Shipper_ID(order.getM_Shipper_ID()); + setFreightCostRule (order.getFreightCostRule()); + setFreightAmt(order.getFreightAmt()); + } + } // MInOut + + /** + * Copy Constructor - create header only + * @param original original + * @param movementDate optional movement date (default today) + * @param C_DocTypeShipment_ID document type or 0 + */ + public MInOut (MInOut original, int C_DocTypeShipment_ID, Timestamp movementDate) + { + this (original.getCtx(), 0, original.get_TrxName()); + setClientOrg(original); + setC_BPartner_ID (original.getC_BPartner_ID()); + setC_BPartner_Location_ID (original.getC_BPartner_Location_ID()); // shipment address + setAD_User_ID(original.getAD_User_ID()); + // + setM_Warehouse_ID (original.getM_Warehouse_ID()); + setIsSOTrx (original.isSOTrx()); + setMovementType (original.getMovementType()); + if (C_DocTypeShipment_ID == 0) + setC_DocType_ID(original.getC_DocType_ID()); + else + setC_DocType_ID (C_DocTypeShipment_ID); + + // Default - Today + if (movementDate != null) + setMovementDate (movementDate); + setDateAcct (getMovementDate()); + + // Copy from Order + setC_Order_ID(original.getC_Order_ID()); + setDeliveryRule (original.getDeliveryRule()); + setDeliveryViaRule (original.getDeliveryViaRule()); + setM_Shipper_ID(original.getM_Shipper_ID()); + setFreightCostRule (original.getFreightCostRule()); + setFreightAmt(original.getFreightAmt()); + setSalesRep_ID(original.getSalesRep_ID()); + // + setC_Activity_ID(original.getC_Activity_ID()); + setC_Campaign_ID(original.getC_Campaign_ID()); + setC_Charge_ID(original.getC_Charge_ID()); + setChargeAmt(original.getChargeAmt()); + // + setC_Project_ID(original.getC_Project_ID()); + setDateOrdered(original.getDateOrdered()); + setDescription(original.getDescription()); + setPOReference(original.getPOReference()); + setSalesRep_ID(original.getSalesRep_ID()); + setAD_OrgTrx_ID(original.getAD_OrgTrx_ID()); + setUser1_ID(original.getUser1_ID()); + setUser2_ID(original.getUser2_ID()); + } // MInOut + + + /** Lines */ + private MInOutLine[] m_lines = null; + /** Confirmations */ + private MInOutConfirm[] m_confirms = null; + /** BPartner */ + private MBPartner m_partner = null; + + + /** + * Get Document Status + * @return Document Status Clear Text + */ + public String getDocStatusName() + { + return MRefList.getListName(getCtx(), 131, getDocStatus()); + } // getDocStatusName + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + /** + * String representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MInOut[") + .append (get_ID()).append("-").append(getDocumentNo()) + .append(",DocStatus=").append(getDocStatus()) + .append ("]"); + return sb.toString (); + } // toString + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + return dt.getName() + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.SHIPMENT, getM_InOut_ID(), get_TrxName()); + if (re == null) + return null; + return re.getPDF(file); + } // createPDF + + /** + * Get Lines of Shipment + * @param requery refresh from db + * @return lines + */ + public MInOutLine[] getLines (boolean requery) + { + if (m_lines != null && !requery) { + set_TrxName(m_lines, get_TrxName()); + return m_lines; + } + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_InOutLine WHERE M_InOut_ID=? ORDER BY Line"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getM_InOut_ID()); + rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new MInOutLine(getCtx(), rs, get_TrxName())); + rs.close(); + rs = null; + pstmt.close(); + pstmt = null; + } + catch (SQLException ex) + { + log.log(Level.SEVERE, sql, ex); + list = null; + // throw new DBException(ex); + } + finally + { + try + { + if (rs != null) + rs.close(); + if (pstmt != null) + pstmt.close(); + } + catch (SQLException e) + { + } + } + pstmt = null; + rs = null; + // + if (list == null) + return null; + // + m_lines = new MInOutLine[list.size()]; + list.toArray(m_lines); + return m_lines; + } // getMInOutLines + + /** + * Get Lines of Shipment + * @return lines + */ + public MInOutLine[] getLines() + { + return getLines(false); + } // getLines + + + /** + * Get Confirmations + * @param requery requery + * @return array of Confirmations + */ + public MInOutConfirm[] getConfirmations(boolean requery) + { + if (m_confirms != null && !requery) + return m_confirms; + + ArrayList list = new ArrayList (); + String sql = "SELECT * FROM M_InOutConfirm WHERE M_InOut_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getM_InOut_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add(new MInOutConfirm(getCtx(), rs, get_TrxName())); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + m_confirms = new MInOutConfirm[list.size ()]; + list.toArray (m_confirms); + return m_confirms; + } // getConfirmations + + + /** + * Copy Lines From other Shipment + * @param otherShipment shipment + * @param counter set counter info + * @param setOrder set order link + * @return number of lines copied + */ + public int copyLinesFrom (MInOut otherShipment, boolean counter, boolean setOrder) + { + if (isProcessed() || isPosted() || otherShipment == null) + return 0; + MInOutLine[] fromLines = otherShipment.getLines(false); + int count = 0; + for (int i = 0; i < fromLines.length; i++) + { + MInOutLine line = new MInOutLine (this); + MInOutLine fromLine = fromLines[i]; + line.set_TrxName(get_TrxName()); + if (counter) // header + PO.copyValues(fromLine, line, getAD_Client_ID(), getAD_Org_ID()); + else + PO.copyValues(fromLine, line, fromLine.getAD_Client_ID(), fromLine.getAD_Org_ID()); + line.setM_InOut_ID(getM_InOut_ID()); + line.set_ValueNoCheck ("M_InOutLine_ID", I_ZERO); // new + // Reset + if (!setOrder) + { + line.setC_OrderLine_ID(0); + line.setM_RMALine_ID(0); // Reset RMA Line + } + if (!counter) + line.setM_AttributeSetInstance_ID(0); + // line.setS_ResourceAssignment_ID(0); + line.setRef_InOutLine_ID(0); + line.setIsInvoiced(false); + // + line.setConfirmedQty(Env.ZERO); + line.setPickedQty(Env.ZERO); + line.setScrappedQty(Env.ZERO); + line.setTargetQty(Env.ZERO); + // Set Locator based on header Warehouse + if (getM_Warehouse_ID() != otherShipment.getM_Warehouse_ID()) + { + line.setM_Locator_ID(0); + line.setM_Locator_ID(Env.ZERO); + } + // + if (counter) + { + line.setRef_InOutLine_ID(fromLine.getM_InOutLine_ID()); + if (fromLine.getC_OrderLine_ID() != 0) + { + MOrderLine peer = new MOrderLine (getCtx(), fromLine.getC_OrderLine_ID(), get_TrxName()); + if (peer.getRef_OrderLine_ID() != 0) + line.setC_OrderLine_ID(peer.getRef_OrderLine_ID()); + } + } + // + line.setProcessed(false); + if (line.save(get_TrxName())) + count++; + // Cross Link + if (counter) + { + fromLine.setRef_InOutLine_ID(line.getM_InOutLine_ID()); + fromLine.save(get_TrxName()); + } + } + if (fromLines.length != count) + log.log(Level.SEVERE, "Line difference - From=" + fromLines.length + " <> Saved=" + count); + return count; + } // copyLinesFrom + + /** Reversal Flag */ + private boolean m_reversal = false; + + /** + * Set Reversal + * @param reversal reversal + */ + private void setReversal(boolean reversal) + { + m_reversal = reversal; + } // setReversal + /** + * Is Reversal + * @return reversal + */ + private boolean isReversal() + { + return m_reversal; + } // isReversal + + /** + * Set Processed. + * Propergate to Lines/Taxes + * @param processed processed + */ + public void setProcessed (boolean processed) + { + super.setProcessed (processed); + if (get_ID() == 0) + return; + String sql = "UPDATE M_InOutLine SET Processed='" + + (processed ? "Y" : "N") + + "' WHERE M_InOut_ID=" + getM_InOut_ID(); + int noLine = DB.executeUpdate(sql, get_TrxName()); + m_lines = null; + log.fine(processed + " - Lines=" + noLine); + } // setProcessed + + /** + * Get BPartner + * @return partner + */ + public MBPartner getBPartner() + { + if (m_partner == null) + m_partner = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + return m_partner; + } // getPartner + + /** + * Set Document Type + * @param DocBaseType doc type MDocType.DOCBASETYPE_ + */ + public void setC_DocType_ID (String DocBaseType) + { + String sql = "SELECT C_DocType_ID FROM C_DocType " + + "WHERE AD_Client_ID=? AND DocBaseType=?" + + " AND IsActive='Y'" + + " AND IsSOTrx='" + (isSOTrx() ? "Y" : "N") + "' " + + "ORDER BY IsDefault DESC"; + int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID(), DocBaseType); + if (C_DocType_ID <= 0) + log.log(Level.SEVERE, "Not found for AC_Client_ID=" + + getAD_Client_ID() + " - " + DocBaseType); + else + { + log.fine("DocBaseType=" + DocBaseType + " - C_DocType_ID=" + C_DocType_ID); + setC_DocType_ID (C_DocType_ID); + boolean isSOTrx = MDocType.DOCBASETYPE_MaterialDelivery.equals(DocBaseType); + setIsSOTrx (isSOTrx); + } + } // setC_DocType_ID + + /** + * Set Default C_DocType_ID. + * Based on SO flag + */ + public void setC_DocType_ID() + { + if (isSOTrx()) + setC_DocType_ID(MDocType.DOCBASETYPE_MaterialDelivery); + else + setC_DocType_ID(MDocType.DOCBASETYPE_MaterialReceipt); + } // setC_DocType_ID + + /** + * Set Business Partner Defaults & Details + * @param bp business partner + */ + public void setBPartner (MBPartner bp) + { + if (bp == null) + return; + + setC_BPartner_ID(bp.getC_BPartner_ID()); + + // Set Locations + MBPartnerLocation[] locs = bp.getLocations(false); + if (locs != null) + { + for (int i = 0; i < locs.length; i++) + { + if (locs[i].isShipTo()) + setC_BPartner_Location_ID(locs[i].getC_BPartner_Location_ID()); + } + // set to first if not set + if (getC_BPartner_Location_ID() == 0 && locs.length > 0) + setC_BPartner_Location_ID(locs[0].getC_BPartner_Location_ID()); + } + if (getC_BPartner_Location_ID() == 0) + log.log(Level.SEVERE, "Has no To Address: " + bp); + + // Set Contact + MUser[] contacts = bp.getContacts(false); + if (contacts != null && contacts.length > 0) // get first User + setAD_User_ID(contacts[0].getAD_User_ID()); + } // setBPartner + + /** + * Create the missing next Confirmation + */ + public void createConfirmation() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + boolean pick = dt.isPickQAConfirm(); + boolean ship = dt.isShipConfirm(); + // Nothing to do + if (!pick && !ship) + { + log.fine("No need"); + return; + } + + // Create Both .. after each other + if (pick && ship) + { + boolean havePick = false; + boolean haveShip = false; + MInOutConfirm[] confirmations = getConfirmations(false); + for (int i = 0; i < confirmations.length; i++) + { + MInOutConfirm confirm = confirmations[i]; + if (MInOutConfirm.CONFIRMTYPE_PickQAConfirm.equals(confirm.getConfirmType())) + { + if (!confirm.isProcessed()) // wait intil done + { + log.fine("Unprocessed: " + confirm); + return; + } + havePick = true; + } + else if (MInOutConfirm.CONFIRMTYPE_ShipReceiptConfirm.equals(confirm.getConfirmType())) + haveShip = true; + } + // Create Pick + if (!havePick) + { + MInOutConfirm.create (this, MInOutConfirm.CONFIRMTYPE_PickQAConfirm, false); + return; + } + // Create Ship + if (!haveShip) + { + MInOutConfirm.create (this, MInOutConfirm.CONFIRMTYPE_ShipReceiptConfirm, false); + return; + } + return; + } + // Create just one + if (pick) + MInOutConfirm.create (this, MInOutConfirm.CONFIRMTYPE_PickQAConfirm, true); + else if (ship) + MInOutConfirm.create (this, MInOutConfirm.CONFIRMTYPE_ShipReceiptConfirm, true); + } // createConfirmation + + + /** + * Set Warehouse and check/set Organization + * @param M_Warehouse_ID id + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + if (M_Warehouse_ID == 0) + { + log.severe("Ignored - Cannot set AD_Warehouse_ID to 0"); + return; + } + super.setM_Warehouse_ID (M_Warehouse_ID); + // + MWarehouse wh = MWarehouse.get(getCtx(), getM_Warehouse_ID()); + if (wh.getAD_Org_ID() != getAD_Org_ID()) + { + log.warning("M_Warehouse_ID=" + M_Warehouse_ID + + ", Overwritten AD_Org_ID=" + getAD_Org_ID() + "->" + wh.getAD_Org_ID()); + setAD_Org_ID(wh.getAD_Org_ID()); + } + } // setM_Warehouse_ID + + + /** + * Before Save + * @param newRecord new + * @return true or false + */ + protected boolean beforeSave (boolean newRecord) + { + // Warehouse Org + if (newRecord) + { + MWarehouse wh = MWarehouse.get(getCtx(), getM_Warehouse_ID()); + if (wh.getAD_Org_ID() != getAD_Org_ID()) + { + log.saveError("WarehouseOrgConflict", ""); + return false; + } + } + + // Shipment/Receipt can have either Order/RMA (For Movement type) + if (getC_Order_ID() != 0 && getM_RMA_ID() != 0) + { + log.saveError("OrderOrRMA", ""); + return false; + } + + // Shipment - Needs Order/RMA + if (!getMovementType().contentEquals(MInOut.MOVEMENTTYPE_CustomerReturns) && isSOTrx() && getC_Order_ID() == 0 && getM_RMA_ID() == 0) + { + log.saveError("FillMandatory", Msg.translate(getCtx(), "C_Order_ID")); + return false; + } + + if (isSOTrx() && getM_RMA_ID() != 0) + { + // Set Document and Movement type for this Receipt + MRMA rma = new MRMA(getCtx(), getM_RMA_ID(), get_TrxName()); + MDocType docType = MDocType.get(getCtx(), rma.getC_DocType_ID()); + setC_DocType_ID(docType.getC_DocTypeShipment_ID()); + } + + return true; + } // beforeSave + + /** + * After Save + * @param newRecord new + * @param success success + * @return success + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + if (!success || newRecord) + return success; + + if (is_ValueChanged("AD_Org_ID")) + { + String sql = "UPDATE M_InOutLine ol" + + " SET AD_Org_ID =" + + "(SELECT AD_Org_ID" + + " FROM M_InOut o WHERE ol.M_InOut_ID=o.M_InOut_ID) " + + "WHERE M_InOut_ID=" + getC_Order_ID(); + int no = DB.executeUpdate(sql, get_TrxName()); + log.fine("Lines -> #" + no); + } + return true; + } // afterSave + + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // process + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info(toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info(toString()); + setDocAction(DOCACTION_Prepare); + return true; + } // invalidateIt + + /** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + + // Order OR RMA can be processed on a shipment/receipt + if (getC_Order_ID() != 0 && getM_RMA_ID() != 0) + { + m_processMsg = "@OrderOrRMA@"; + return DocAction.STATUS_Invalid; + } + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + + // Credit Check + if (isSOTrx() && !isReversal()) + { + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + if (MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditHold@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + BigDecimal notInvoicedAmt = MBPartner.getNotInvoicedAmt(getC_BPartner_ID()); + if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus(notInvoicedAmt))) + { + m_processMsg = "@BPartnerOverSCreditHold@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + ", @NotInvoicedAmt@=" + notInvoicedAmt + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + } + + // Lines + MInOutLine[] lines = getLines(true); + if (lines == null || lines.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + BigDecimal Volume = Env.ZERO; + BigDecimal Weight = Env.ZERO; + + // Mandatory Attributes + for (int i = 0; i < lines.length; i++) + { + MInOutLine line = lines[i]; + MProduct product = line.getProduct(); + if (product != null) + { + Volume = Volume.add(product.getVolume().multiply(line.getMovementQty())); + Weight = Weight.add(product.getWeight().multiply(line.getMovementQty())); + } + // + if (line.getM_AttributeSetInstance_ID() != 0) + continue; + if (product != null && product.isASIMandatory(isSOTrx())) + { + m_processMsg = "@M_AttributeSet_ID@ @IsMandatory@ (@Line@ #" + lines[i].getLine() + + ", @M_Product_ID@=" + product.getValue() + ")"; + return DocAction.STATUS_Invalid; + } + } + setVolume(Volume); + setWeight(Weight); + + if (!isReversal()) // don't change reversal + { + createConfirmation(); + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + m_justPrepared = true; + if (!DOCACTION_Complete.equals(getDocAction())) + setDocAction(DOCACTION_Complete); + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info(toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info(toString()); + setIsApproved(false); + return true; + } // rejectIt + + /** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Outstanding (not processed) Incoming Confirmations ? + MInOutConfirm[] confirmations = getConfirmations(true); + for (int i = 0; i < confirmations.length; i++) + { + MInOutConfirm confirm = confirmations[i]; + if (!confirm.isProcessed()) + { + if (MInOutConfirm.CONFIRMTYPE_CustomerConfirmation.equals(confirm.getConfirmType())) + continue; + // + m_processMsg = "Open @M_InOutConfirm_ID@: " + + confirm.getConfirmTypeName() + " - " + confirm.getDocumentNo(); + return DocAction.STATUS_InProgress; + } + } + + + // Implicit Approval + if (!isApproved()) + approveIt(); + log.info(toString()); + StringBuffer info = new StringBuffer(); + + // For all lines + MInOutLine[] lines = getLines(false); + for (int lineIndex = 0; lineIndex < lines.length; lineIndex++) + { + MInOutLine sLine = lines[lineIndex]; + MProduct product = sLine.getProduct(); + + // Qty & Type + String MovementType = getMovementType(); + BigDecimal Qty = sLine.getMovementQty(); + if (MovementType.charAt(1) == '-') // C- Customer Shipment - V- Vendor Return + Qty = Qty.negate(); + BigDecimal QtySO = Env.ZERO; + BigDecimal QtyPO = Env.ZERO; + + // Update Order Line + MOrderLine oLine = null; + if (sLine.getC_OrderLine_ID() != 0) + { + oLine = new MOrderLine (getCtx(), sLine.getC_OrderLine_ID(), get_TrxName()); + log.fine("OrderLine - Reserved=" + oLine.getQtyReserved() + + ", Delivered=" + oLine.getQtyDelivered()); + if (isSOTrx()) + QtySO = sLine.getMovementQty(); + else + QtyPO = sLine.getMovementQty(); + } + + + // Load RMA Line + MRMALine rmaLine = null; + + if (sLine.getM_RMALine_ID() != 0) + { + rmaLine = new MRMALine(getCtx(), sLine.getM_RMALine_ID(), get_TrxName()); + } + + log.info("Line=" + sLine.getLine() + " - Qty=" + sLine.getMovementQty()); + + // Stock Movement - Counterpart MOrder.reserveStock + if (product != null + && product.isStocked() ) + { + //Ignore the Material Policy when is Reverse Correction + if(!isReversal()) + checkMaterialPolicy(sLine); + + log.fine("Material Transaction"); + MTransaction mtrx = null; + //same warehouse in order and receipt? + boolean sameWarehouse = true; + // Reservation ASI - assume none + int reservationAttributeSetInstance_ID = 0; // sLine.getM_AttributeSetInstance_ID(); + if (oLine != null) { + reservationAttributeSetInstance_ID = oLine.getM_AttributeSetInstance_ID(); + sameWarehouse = oLine.getM_Warehouse_ID()==getM_Warehouse_ID(); + } + // + if (sLine.getM_AttributeSetInstance_ID() == 0) + { + MInOutLineMA mas[] = MInOutLineMA.get(getCtx(), + sLine.getM_InOutLine_ID(), get_TrxName()); + for (int j = 0; j < mas.length; j++) + { + MInOutLineMA ma = mas[j]; + BigDecimal QtyMA = ma.getMovementQty(); + if (MovementType.charAt(1) == '-') // C- Customer Shipment - V- Vendor Return + QtyMA = QtyMA.negate(); + BigDecimal QtySOMA = Env.ZERO; + BigDecimal QtyPOMA = Env.ZERO; + if (sLine.getC_OrderLine_ID() != 0) + { + if (isSOTrx()) + QtySOMA = ma.getMovementQty(); + else + QtyPOMA = ma.getMovementQty(); + } + BigDecimal diffQtyOrdered = QtyPOMA.negate(); + if (!sameWarehouse) { + diffQtyOrdered = Env.ZERO; + } + // Update Storage - see also VMatch.createMatchRecord + if (!MStorage.add(getCtx(), getM_Warehouse_ID(), + sLine.getM_Locator_ID(), + sLine.getM_Product_ID(), + ma.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID, + QtyMA, QtySOMA.negate(), diffQtyOrdered, get_TrxName())) + { + m_processMsg = "Cannot correct Inventory (MA)"; + return DocAction.STATUS_Invalid; + } + if (!sameWarehouse) { + //correct qtyOrdered in warehouse of order + MWarehouse wh = MWarehouse.get(getCtx(), oLine.getM_Warehouse_ID()); + if (!MStorage.add(getCtx(), oLine.getM_Warehouse_ID(), + wh.getDefaultLocator().getM_Locator_ID(), + sLine.getM_Product_ID(), + ma.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID, + Env.ZERO, Env.ZERO, QtyPOMA.negate(), get_TrxName())) + { + m_processMsg = "Cannot correct Inventory (MA) in order warehouse"; + return DocAction.STATUS_Invalid; + } + } + // Create Transaction + mtrx = new MTransaction (getCtx(), sLine.getAD_Org_ID(), + MovementType, sLine.getM_Locator_ID(), + sLine.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), + QtyMA, getMovementDate(), get_TrxName()); + mtrx.setM_InOutLine_ID(sLine.getM_InOutLine_ID()); + if (!mtrx.save()) + { + m_processMsg = "Could not create Material Transaction (MA)"; + return DocAction.STATUS_Invalid; + } + } + } + // sLine.getM_AttributeSetInstance_ID() != 0 + if (mtrx == null) + { + BigDecimal diffQtyOrdered = QtyPO.negate(); + if (!sameWarehouse) { + diffQtyOrdered = Env.ZERO; + } + // Fallback: Update Storage - see also VMatch.createMatchRecord + if (!MStorage.add(getCtx(), getM_Warehouse_ID(), + sLine.getM_Locator_ID(), + sLine.getM_Product_ID(), + sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID, + Qty, QtySO.negate(), diffQtyOrdered, get_TrxName())) + { + m_processMsg = "Cannot correct Inventory"; + return DocAction.STATUS_Invalid; + } + if (!sameWarehouse) { + //correct qtyOrdered in warehouse of order + MWarehouse wh = MWarehouse.get(getCtx(), oLine.getM_Warehouse_ID()); + if (!MStorage.add(getCtx(), oLine.getM_Warehouse_ID(), + wh.getDefaultLocator().getM_Locator_ID(), + sLine.getM_Product_ID(), + sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID, + Env.ZERO, Env.ZERO, QtyPO.negate(), get_TrxName())) + { + m_processMsg = "Cannot correct Inventory"; + return DocAction.STATUS_Invalid; + } + } + // FallBack: Create Transaction + mtrx = new MTransaction (getCtx(), sLine.getAD_Org_ID(), + MovementType, sLine.getM_Locator_ID(), + sLine.getM_Product_ID(), sLine.getM_AttributeSetInstance_ID(), + Qty, getMovementDate(), get_TrxName()); + mtrx.setM_InOutLine_ID(sLine.getM_InOutLine_ID()); + if (!mtrx.save()) + { + m_processMsg = "Could not create Material Transaction"; + return DocAction.STATUS_Invalid; + } + } + } // stock movement + + // Correct Order Line + if (product != null && oLine != null) // other in VMatch.createMatchRecord + oLine.setQtyReserved(oLine.getQtyReserved().subtract(sLine.getMovementQty())); + + // Update Sales Order Line + if (oLine != null) + { + if (isSOTrx() // PO is done by Matching + || sLine.getM_Product_ID() == 0) // PO Charges, empty lines + { + if (isSOTrx()) + oLine.setQtyDelivered(oLine.getQtyDelivered().subtract(Qty)); + else + oLine.setQtyDelivered(oLine.getQtyDelivered().add(Qty)); + oLine.setDateDelivered(getMovementDate()); // overwrite=last + } + if (!oLine.save()) + { + m_processMsg = "Could not update Order Line"; + return DocAction.STATUS_Invalid; + } + else + log.fine("OrderLine -> Reserved=" + oLine.getQtyReserved() + + ", Delivered=" + oLine.getQtyReserved()); + } + // Update RMA Line Qty Delivered + else if (rmaLine != null) + { + if (isSOTrx()) + { + rmaLine.setQtyDelivered(rmaLine.getQtyDelivered().add(Qty)); + } + else + { + rmaLine.setQtyDelivered(rmaLine.getQtyDelivered().subtract(Qty)); + } + if (!rmaLine.save()) + { + m_processMsg = "Could not update RMA Line"; + return DocAction.STATUS_Invalid; + } + } + + // Create Asset for SO + if (product != null + && isSOTrx() + && product.isCreateAsset() + && sLine.getMovementQty().signum() > 0 + && !isReversal()) + { + log.fine("Asset"); + info.append("@A_Asset_ID@: "); + int noAssets = sLine.getMovementQty().intValue(); + if (!product.isOneAssetPerUOM()) + noAssets = 1; + for (int i = 0; i < noAssets; i++) + { + if (i > 0) + info.append(" - "); + int deliveryCount = i+1; + if (!product.isOneAssetPerUOM()) + deliveryCount = 0; + MAsset asset = new MAsset (this, sLine, deliveryCount); + if (!asset.save(get_TrxName())) + { + m_processMsg = "Could not create Asset"; + return DocAction.STATUS_Invalid; + } + info.append(asset.getValue()); + } + } // Asset + + + // Matching + if (!isSOTrx() + && sLine.getM_Product_ID() != 0 + && !isReversal()) + { + BigDecimal matchQty = sLine.getMovementQty(); + // Invoice - Receipt Match (requires Product) + MInvoiceLine iLine = MInvoiceLine.getOfInOutLine (sLine); + if (iLine != null && iLine.getM_Product_ID() != 0) + { + if (matchQty.compareTo(iLine.getQtyInvoiced())>0) + matchQty = iLine.getQtyInvoiced(); + + MMatchInv[] matches = MMatchInv.get(getCtx(), + sLine.getM_InOutLine_ID(), iLine.getC_InvoiceLine_ID(), get_TrxName()); + if (matches == null || matches.length == 0) + { + MMatchInv inv = new MMatchInv (iLine, getMovementDate(), matchQty); + if (sLine.getM_AttributeSetInstance_ID() != iLine.getM_AttributeSetInstance_ID()) + { + iLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); + iLine.save(); // update matched invoice with ASI + inv.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); + } + if (!inv.save(get_TrxName())) + { + m_processMsg = "Could not create Inv Matching"; + return DocAction.STATUS_Invalid; + } + } + } + + // Link to Order + if (sLine.getC_OrderLine_ID() != 0) + { + log.fine("PO Matching"); + // Ship - PO + MMatchPO po = MMatchPO.create (null, sLine, getMovementDate(), matchQty); + if (!po.save(get_TrxName())) + { + m_processMsg = "Could not create PO Matching"; + return DocAction.STATUS_Invalid; + } + // Update PO with ASI + if ( oLine != null && oLine.getM_AttributeSetInstance_ID() == 0 + && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] + { + oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); + oLine.save(get_TrxName()); + } + } + else // No Order - Try finding links via Invoice + { + // Invoice has an Order Link + if (iLine != null && iLine.getC_OrderLine_ID() != 0) + { + // Invoice is created before Shipment + log.fine("PO(Inv) Matching"); + // Ship - Invoice + MMatchPO po = MMatchPO.create (iLine, sLine, + getMovementDate(), matchQty); + if (!po.save(get_TrxName())) + { + m_processMsg = "Could not create PO(Inv) Matching"; + return DocAction.STATUS_Invalid; + } + // Update PO with ASI + oLine = new MOrderLine (getCtx(), po.getC_OrderLine_ID(), get_TrxName()); + if ( oLine != null && oLine.getM_AttributeSetInstance_ID() == 0 + && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] + { + oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); + oLine.save(get_TrxName()); + } + } + } // No Order + } // PO Matching + + } // for all lines + + // Counter Documents + MInOut counter = createCounterDoc(); + if (counter != null) + info.append(" - @CounterDoc@: @M_InOut_ID@=").append(counter.getDocumentNo()); + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + + m_processMsg = info.toString(); + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Set the definite document number after completed + */ + private void setDefiniteDocumentNo() { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (dt.isOverwriteDateOnComplete()) { + setMovementDate(new Timestamp (System.currentTimeMillis())); + } + if (dt.isOverwriteSeqOnComplete()) { + String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); + if (value != null) + setDocumentNo(value); + } + } + + /** + * Check Material Policy + * Sets line ASI + */ + private void checkMaterialPolicy(MInOutLine line) + { + int no = MInOutLineMA.deleteInOutLineMA(line.getM_InOutLine_ID(), get_TrxName()); + if (no > 0) + log.config("Delete old #" + no); + + // Incoming Trx + String MovementType = getMovementType(); + boolean inTrx = MovementType.charAt(1) == '+'; // V+ Vendor Receipt + + + boolean needSave = false; + BigDecimal qtyASI = Env.ZERO ; + + MProduct product = line.getProduct(); + + // Need to have Location + if (product != null + && line.getM_Locator_ID() == 0) + { + //MWarehouse w = MWarehouse.get(getCtx(), getM_Warehouse_ID()); + line.setM_Warehouse_ID(getM_Warehouse_ID()); + line.setM_Locator_ID(inTrx ? Env.ZERO : line.getMovementQty()); // default Locator + needSave = true; + } + + // Attribute Set Instance + // Create an Attribute Set Instance to any receipt FIFO/LIFO + if (product != null && line.getM_AttributeSetInstance_ID() == 0) + { + //Validate Transaction + //if (inTrx) + if (getMovementType().compareTo(MInOut.MOVEMENTTYPE_CustomerReturns) == 0 || getMovementType().compareTo(MInOut.MOVEMENTTYPE_VendorReceipts) == 0 ) + { + MAttributeSetInstance asi = new MAttributeSetInstance(getCtx(), 0, get_TrxName()); + asi.setClientOrg(getAD_Client_ID(), 0); + asi.setM_AttributeSet_ID(product.getM_AttributeSet_ID()); + if (!asi.save()) + { + throw new IllegalStateException("Error try create ASI Reservation"); + } + if (asi.save()) + { + line.setM_AttributeSetInstance_ID(asi.getM_AttributeSetInstance_ID()); + log.config("New ASI=" + line); + needSave = true; + } + } + // Create consume the Attribute Set Instance using policy FIFO/LIFO + else if(getMovementType().compareTo(MInOut.MOVEMENTTYPE_VendorReturns) == 0 || getMovementType().compareTo(MInOut.MOVEMENTTYPE_CustomerShipment) == 0) + { + String MMPolicy = product.getMMPolicy(); + MStorage[] storages = MStorage.getAllWithASI(getCtx(), + line.getM_Product_ID(), line.getM_Locator_ID(), + MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName()); + BigDecimal qtyToDeliver = line.getMovementQty(); + /*for (int ii = 0; ii < storages.length; ii++) + { + MStorage storage = storages[ii]; + if (ii == 0) + { + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + { + line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID()); + needSave = true; + log.config("Direct - " + line); + qtyToDeliver = Env.ZERO; + } + else + { + log.config("Split - " + line); + MInOutLineMA ma = new MInOutLineMA (line, + storage.getM_AttributeSetInstance_ID(), + storage.getQtyOnHand()); + if (!ma.save()) + ; + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + log.fine("#" + ii + ": " + ma + ", QtyToDeliver=" + qtyToDeliver); + } + } + else // create addl material allocation + { + MInOutLineMA ma = new MInOutLineMA (line, + storage.getM_AttributeSetInstance_ID(), + qtyToDeliver); + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + qtyToDeliver = Env.ZERO; + else + { + ma.setMovementQty(storage.getQtyOnHand()); + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + } + if (!ma.save()) + ; + log.fine("#" + ii + ": " + ma + ", QtyToDeliver=" + qtyToDeliver); + } + if (qtyToDeliver.signum() == 0) + break; + } // for all storages + */ + + for (MStorage storage: storages) + { + //consume ASI Zero + if (storage.getM_AttributeSetInstance_ID() == 0) + { + qtyASI = qtyASI.add(storage.getQtyOnHand()); + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + continue; + } + + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + { + MInOutLineMA ma = new MInOutLineMA (line, + storage.getM_AttributeSetInstance_ID(), + qtyToDeliver); + if (!ma.save()) + { + throw new IllegalStateException("Error try create ASI Reservation"); + } + qtyToDeliver = Env.ZERO; + } + else + { + MInOutLineMA ma = new MInOutLineMA (line, + storage.getM_AttributeSetInstance_ID(), + storage.getQtyOnHand()); + if (!ma.save()) + { + throw new IllegalStateException("Error try create ASI Reservation"); + } + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + log.fine( ma + ", QtyToDeliver=" + qtyToDeliver); + } + } + + // No AttributeSetInstance found for remainder + if (qtyToDeliver.signum() != 0 || qtyASI.signum() != 0) + { + MInOutLineMA ma = new MInOutLineMA (line, 0, qtyToDeliver.add(qtyASI)); + if (!ma.save()) + ; + log.fine("##: " + ma); + } + } // outgoing Trx + } // attributeSetInstance + + if (needSave && !line.save()) + log.severe("NOT saved " + line); + } // checkMaterialPolicy + + + /************************************************************************** + * Create Counter Document + * @return InOut + */ + private MInOut createCounterDoc() + { + // Is this a counter doc ? + if (getRef_InOut_ID() != 0) + return null; + + // Org Must be linked to BPartner + MOrg org = MOrg.get(getCtx(), getAD_Org_ID()); + int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName()); + if (counterC_BPartner_ID == 0) + return null; + // Business Partner needs to be linked to Org + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int(); + if (counterAD_Org_ID == 0) + return null; + + MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, null); + MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID); + log.info("Counter BP=" + counterBP.getName()); + + // Document Type + int C_DocTypeTarget_ID = 0; + MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID()); + if (counterDT != null) + { + log.fine(counterDT.toString()); + if (!counterDT.isCreateCounter() || !counterDT.isValid()) + return null; + C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID(); + } + else // indirect + { + C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID()); + log.fine("Indirect C_DocTypeTarget_ID=" + C_DocTypeTarget_ID); + if (C_DocTypeTarget_ID <= 0) + return null; + } + + // Deep Copy + MInOut counter = copyFrom(this, getMovementDate(), + C_DocTypeTarget_ID, !isSOTrx(), true, get_TrxName(), true); + + // + counter.setAD_Org_ID(counterAD_Org_ID); + counter.setM_Warehouse_ID(counterOrgInfo.getM_Warehouse_ID()); + // + counter.setBPartner(counterBP); + // Refernces (Should not be required + counter.setSalesRep_ID(getSalesRep_ID()); + counter.save(get_TrxName()); + + String MovementType = counter.getMovementType(); + boolean inTrx = MovementType.charAt(1) == '+'; // V+ Vendor Receipt + + // Update copied lines + MInOutLine[] counterLines = counter.getLines(true); + for (int i = 0; i < counterLines.length; i++) + { + MInOutLine counterLine = counterLines[i]; + counterLine.setClientOrg(counter); + counterLine.setM_Warehouse_ID(counter.getM_Warehouse_ID()); + counterLine.setM_Locator_ID(0); + counterLine.setM_Locator_ID(inTrx ? Env.ZERO : counterLine.getMovementQty()); + // + counterLine.save(get_TrxName()); + } + + log.fine(counter.toString()); + + // Document Action + if (counterDT != null) + { + if (counterDT.getDocAction() != null) + { + counter.setDocAction(counterDT.getDocAction()); + counter.processIt(counterDT.getDocAction()); + counter.save(get_TrxName()); + } + } + return counter; + } // createCounterDoc + + /** + * Void Document. + * @return true if success + */ + public boolean voidIt() + { + log.info(toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + if (DOCSTATUS_Closed.equals(getDocStatus()) + || DOCSTATUS_Reversed.equals(getDocStatus()) + || DOCSTATUS_Voided.equals(getDocStatus())) + { + m_processMsg = "Document Closed: " + getDocStatus(); + return false; + } + + // Not Processed + if (DOCSTATUS_Drafted.equals(getDocStatus()) + || DOCSTATUS_Invalid.equals(getDocStatus()) + || DOCSTATUS_InProgress.equals(getDocStatus()) + || DOCSTATUS_Approved.equals(getDocStatus()) + || DOCSTATUS_NotApproved.equals(getDocStatus()) ) + { + // Set lines to 0 + MInOutLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MInOutLine line = lines[i]; + BigDecimal old = line.getMovementQty(); + if (old.signum() != 0) + { + line.setQty(Env.ZERO); + line.addDescription("Void (" + old + ")"); + line.save(get_TrxName()); + } + } + } + else + { + return reverseCorrectIt(); + } + + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // voidIt + + /** + * Close Document. + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // closeIt + + /** + * Reverse Correction - same date + * @return true if success + */ + public boolean reverseCorrectIt() + { + log.info(toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return false; + } + + // Reverse/Delete Matching + if (!isSOTrx()) + { + MMatchInv[] mInv = MMatchInv.getInOut(getCtx(), getM_InOut_ID(), get_TrxName()); + for (int i = 0; i < mInv.length; i++) + mInv[i].delete(true); + MMatchPO[] mPO = MMatchPO.getInOut(getCtx(), getM_InOut_ID(), get_TrxName()); + for (int i = 0; i < mPO.length; i++) + { + if (mPO[i].getC_InvoiceLine_ID() == 0) + mPO[i].delete(true); + else + { + mPO[i].setM_InOutLine_ID(0); + mPO[i].save(); + + } + } + } + + // Deep Copy + MInOut reversal = copyFrom (this, getMovementDate(), + getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true); + if (reversal == null) + { + m_processMsg = "Could not create Ship Reversal"; + return false; + } + reversal.setReversal(true); + + // Reverse Line Qty + MInOutLine[] sLines = getLines(false); + MInOutLine[] rLines = reversal.getLines(false); + for (int i = 0; i < rLines.length; i++) + { + MInOutLine rLine = rLines[i]; + rLine.setQtyEntered(rLine.getQtyEntered().negate()); + rLine.setMovementQty(rLine.getMovementQty().negate()); + rLine.setM_AttributeSetInstance_ID(sLines[i].getM_AttributeSetInstance_ID()); + if (!rLine.save(get_TrxName())) + { + m_processMsg = "Could not correct Ship Reversal Line"; + return false; + } + // We need to copy MA + if (rLine.getM_AttributeSetInstance_ID() == 0) + { + MInOutLineMA mas[] = MInOutLineMA.get(getCtx(), + sLines[i].getM_InOutLine_ID(), get_TrxName()); + for (int j = 0; j < mas.length; j++) + { + MInOutLineMA ma = new MInOutLineMA (rLine, + mas[j].getM_AttributeSetInstance_ID(), + mas[j].getMovementQty().negate()); + if (!ma.save()) + ; + } + } + // De-Activate Asset + MAsset asset = MAsset.getFromShipment(getCtx(), sLines[i].getM_InOutLine_ID(), get_TrxName()); + if (asset != null) + { + asset.setIsActive(false); + asset.addDescription("(" + reversal.getDocumentNo() + " #" + rLine.getLine() + "<-)"); + asset.save(); + } + } + reversal.setC_Order_ID(getC_Order_ID()); + // Set M_RMA_ID + reversal.setM_RMA_ID(getM_RMA_ID()); + reversal.addDescription("{->" + getDocumentNo() + ")"); + // + if (!reversal.processIt(DocAction.ACTION_Complete) + || !reversal.getDocStatus().equals(DocAction.STATUS_Completed)) + { + m_processMsg = "Reversal ERROR: " + reversal.getProcessMsg(); + return false; + } + reversal.closeIt(); + //FR1948157 + reversal.setReversal_ID(getM_InOut_ID()); + reversal.setProcessing (false); + reversal.setDocStatus(DOCSTATUS_Reversed); + reversal.setDocAction(DOCACTION_None); + reversal.save(get_TrxName()); + // + addDescription("(" + reversal.getDocumentNo() + "<-)"); + + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + + m_processMsg = reversal.getDocumentNo(); + //FR1948157 + this.setReversal_ID(reversal.getM_InOut_ID()); + setProcessed(true); + setDocStatus(DOCSTATUS_Reversed); // may come from void + setDocAction(DOCACTION_None); + return true; + } // reverseCorrectionIt + + /** + * Reverse Accrual - none + * @return false + */ + public boolean reverseAccrualIt() + { + log.info(toString()); + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return false; + } // reverseAccrualIt + + /** + * Re-activate + * @return false + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + return false; + } // reActivateIt + + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Total Lines = 123.00 (#1) + sb.append(":") + // .append(Msg.translate(getCtx(),"TotalLines")).append("=").append(getTotalLines()) + .append(" (#").append(getLines(false).length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID + */ + public int getDoc_User_ID() + { + return getSalesRep_ID(); + } // getDoc_User_ID + + /** + * Get Document Approval Amount + * @return amount + */ + public BigDecimal getApprovalAmt() + { + return Env.ZERO; + } // getApprovalAmt + + /** + * Get C_Currency_ID + * @return Accounting Currency + */ + public int getC_Currency_ID () + { + return Env.getContextAsInt(getCtx(),"$C_Currency_ID"); + } // getC_Currency_ID + + /** + * Document Status is Complete or Closed + * @return true if CO, CL or RE + */ + public boolean isComplete() + { + String ds = getDocStatus(); + return DOCSTATUS_Completed.equals(ds) + || DOCSTATUS_Closed.equals(ds) + || DOCSTATUS_Reversed.equals(ds); + } // isComplete + +} // MInOut diff --git a/base/src/org/compiere/model/MInventory.java b/base/src/org/compiere/model/MInventory.java new file mode 100644 index 0000000000..c2625e4c7f --- /dev/null +++ b/base/src/org/compiere/model/MInventory.java @@ -0,0 +1,1182 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.*; +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.process.*; +import org.compiere.util.*; + +/** + * Physical Inventory Model + * + * @author Jorg Janke + * @version $Id: MInventory.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $ + * @author victor.perez@e-evolution.com, e-Evolution + *
  • FR [ 1948157 ] Is necessary the reference for document reverse + * @see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962 + */ +public class MInventory extends X_M_Inventory implements DocAction +{ + /** + * Get Inventory from Cache + * @param ctx context + * @param M_Inventory_ID id + * @return MInventory + */ + public static MInventory get (Properties ctx, int M_Inventory_ID) + { + Integer key = new Integer (M_Inventory_ID); + MInventory retValue = (MInventory) s_cache.get (key); + if (retValue != null) + return retValue; + retValue = new MInventory (ctx, M_Inventory_ID, null); + if (retValue.get_ID () != 0) + s_cache.put (key, retValue); + return retValue; + } // get + + /** Cache */ + private static CCache s_cache = new CCache("M_Inventory", 5, 5); + + + /** + * Standard Constructor + * @param ctx context + * @param M_Inventory_ID id + * @param trxName transaction + */ + public MInventory (Properties ctx, int M_Inventory_ID, String trxName) + { + super (ctx, M_Inventory_ID, trxName); + if (M_Inventory_ID == 0) + { + // setName (null); + // setM_Warehouse_ID (0); // FK + setMovementDate (new Timestamp(System.currentTimeMillis())); + setDocAction (DOCACTION_Complete); // CO + setDocStatus (DOCSTATUS_Drafted); // DR + setIsApproved (false); + setMovementDate (new Timestamp(System.currentTimeMillis())); // @#Date@ + setPosted (false); + setProcessed (false); + } + } // MInventory + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MInventory (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MInventory + + /** + * Warehouse Constructor + * @param wh warehouse + */ + public MInventory (MWarehouse wh) + { + this (wh.getCtx(), 0, wh.get_TrxName()); + setClientOrg(wh); + setM_Warehouse_ID(wh.getM_Warehouse_ID()); + } // MInventory + + + /** Lines */ + private MInventoryLine[] m_lines = null; + + /** + * Get Lines + * @param requery requery + * @return array of lines + */ + public MInventoryLine[] getLines (boolean requery) + { + if (m_lines != null && !requery) { + set_TrxName(m_lines, get_TrxName()); + return m_lines; + } + // + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_InventoryLine WHERE M_Inventory_ID=? ORDER BY Line"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getM_Inventory_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new MInventoryLine (getCtx(), rs, get_TrxName())); + rs.close (); + pstmt.close (); + pstmt = null; + } catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } catch (Exception e) + { + pstmt = null; + } + + m_lines = new MInventoryLine[list.size ()]; + list.toArray (m_lines); + return m_lines; + } // getLines + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + /** + * Overwrite Client/Org - from Import. + * @param AD_Client_ID client + * @param AD_Org_ID org + */ + public void setClientOrg (int AD_Client_ID, int AD_Org_ID) + { + super.setClientOrg(AD_Client_ID, AD_Org_ID); + } // setClientOrg + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MInventory["); + sb.append (get_ID()) + .append ("-").append (getDocumentNo()) + .append (",M_Warehouse_ID=").append(getM_Warehouse_ID()) + .append ("]"); + return sb.toString (); + } // toString + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + return dt.getName() + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID()); + // if (re == null) + return null; + // return re.getPDF(file); + } // createPDF + + + /** + * Before Save + * @param newRecord new + * @return true + */ + protected boolean beforeSave (boolean newRecord) + { + if (getC_DocType_ID() == 0) + { + MDocType types[] = MDocType.getOfDocBaseType(getCtx(), MDocType.DOCBASETYPE_MaterialPhysicalInventory); + if (types.length > 0) // get first + setC_DocType_ID(types[0].getC_DocType_ID()); + else + { + log.saveError("Error", Msg.parseTranslation(getCtx(), "@NotFound@ @C_DocType_ID@")); + return false; + } + } + return true; + } // beforeSave + + + /** + * Set Processed. + * Propergate to Lines/Taxes + * @param processed processed + */ + public void setProcessed (boolean processed) + { + super.setProcessed (processed); + if (get_ID() == 0) + return; + String sql = "UPDATE M_InventoryLine SET Processed='" + + (processed ? "Y" : "N") + + "' WHERE M_Inventory_ID=" + getM_Inventory_ID(); + int noLine = DB.executeUpdate(sql, get_TrxName()); + m_lines = null; + log.fine("Processed=" + processed + " - Lines=" + noLine); + } // setProcessed + + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // processIt + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info(toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info(toString()); + setDocAction(DOCACTION_Prepare); + return true; + } // invalidateIt + + /** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getMovementDate(), MDocType.DOCBASETYPE_MaterialPhysicalInventory)) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + MInventoryLine[] lines = getLines(false); + if (lines.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + + // TODO: Add up Amounts + // setApprovalAmt(); + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + m_justPrepared = true; + if (!DOCACTION_Complete.equals(getDocAction())) + setDocAction(DOCACTION_Complete); + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info(toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info(toString()); + setIsApproved(false); + return true; + } // rejectIt + + /** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Implicit Approval + if (!isApproved()) + approveIt(); + log.info(toString()); + + //vpj-cd begin e-evolution recalculate the attribute instances and qty. + /*MInventoryLine[] linesup = getLines(false); + for (int i = 0; i < linesup.length; i++) + { + MInventoryLine line = linesup[i]; + + String sql1 = "Delete From M_InventoryLineMA " + + " WHERE M_InventoryLine_ID=" +line.getM_InventoryLine_ID(); + int no = DB.executeUpdate(sql1, get_TrxName()); + log.info("MA deleted " + no); + + StringBuffer sql = new StringBuffer( + "SELECT s.M_Product_ID, s.M_Locator_ID, s.M_AttributeSetInstance_ID," + + " s.QtyOnHand, p.M_AttributeSet_ID " + + "FROM M_Product p" + + " INNER JOIN M_Storage s ON (s.M_Product_ID=p.M_Product_ID)" + + " INNER JOIN M_Locator l ON (s.M_Locator_ID=l.M_Locator_ID) " + + "WHERE l.M_Warehouse_ID=?" + + " AND p.IsActive='Y' AND p.IsStocked='Y' and p.ProductType='I'" + + " AND s.M_Locator_ID=" +line.getM_Locator_ID() + + " AND s.M_Product_ID=" +line.getM_Product_ID() + + " AND s.QtyOnHand <> 0 " + ); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql.toString(), get_TrxName()); + int index = 1; + pstmt.setInt (index++, getM_Warehouse_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + { + MInventoryLineMA maup = new MInventoryLineMA (line, + rs.getInt(3), rs.getBigDecimal(4)); + + if (!maup.save()) + ; + } + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql.toString(), e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + }*/ + //vpj-cd e-evolution recalculate the attribute instances and qty END. + /* + // + MInventoryLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MInventoryLine line = lines[i]; + if (!line.isActive()) + continue; + + MTransaction trx = null; + if (line.getM_AttributeSetInstance_ID() == 0) + { + BigDecimal qtyDiff = line.getQtyInternalUse().negate(); + if (qtyDiff.signum() == 0) + qtyDiff = line.getQtyCount().subtract(line.getQtyBook()); + // + if (qtyDiff.signum() > 0) + { + // Storage + MStorage storage = MStorage.get(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), 0, get_TrxName()); + if (storage == null) + storage = MStorage.getCreate(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), 0, get_TrxName()); + BigDecimal qtyNew = storage.getQtyOnHand().add(qtyDiff); + log.fine("Diff=" + qtyDiff + + " - OnHand=" + storage.getQtyOnHand() + "->" + qtyNew); + storage.setQtyOnHand(qtyNew); + storage.setDateLastInventory(getMovementDate()); + if (!storage.save(get_TrxName())) + { + m_processMsg = "Storage not updated(1)"; + return DocAction.STATUS_Invalid; + } + log.fine(storage.toString()); + // Transaction + trx = new MTransaction (getCtx(), line.getAD_Org_ID(), + MTransaction.MOVEMENTTYPE_InventoryIn, + line.getM_Locator_ID(), line.getM_Product_ID(), 0, + qtyDiff, getMovementDate(), get_TrxName()); + trx.setM_InventoryLine_ID(line.getM_InventoryLine_ID()); + if (!trx.save()) + { + m_processMsg = "Transaction not inserted(1)"; + return DocAction.STATUS_Invalid; + } + } + else // negative qty + { + MInventoryLineMA mas[] = MInventoryLineMA.get(getCtx(), + line.getM_InventoryLine_ID(), get_TrxName()); + for (int j = 0; j < mas.length; j++) + { + MInventoryLineMA ma = mas[j]; + // Storage + MStorage storage = MStorage.get(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), get_TrxName()); + if (storage == null) + storage = MStorage.getCreate(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), get_TrxName()); + // + BigDecimal maxDiff = qtyDiff; + if (maxDiff.signum() < 0 + && ma.getMovementQty().compareTo(maxDiff.negate()) < 0) + maxDiff = ma.getMovementQty().negate(); + BigDecimal qtyNew = ma.getMovementQty().add(maxDiff); // Storage+Diff + log.fine("MA Qty=" + ma.getMovementQty() + + ",Diff=" + qtyDiff + "|" + maxDiff + + " - OnHand=" + storage.getQtyOnHand() + "->" + qtyNew + + " {" + ma.getM_AttributeSetInstance_ID() + "}"); + // + storage.setQtyOnHand(qtyNew); + storage.setDateLastInventory(getMovementDate()); + if (!storage.save(get_TrxName())) + { + m_processMsg = "Storage not updated (MA)"; + return DocAction.STATUS_Invalid; + } + log.fine(storage.toString()); + + // Transaction + trx = new MTransaction (getCtx(), line.getAD_Org_ID(), + MTransaction.MOVEMENTTYPE_InventoryIn, + line.getM_Locator_ID(), line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), + maxDiff, getMovementDate(), get_TrxName()); + trx.setM_InventoryLine_ID(line.getM_InventoryLine_ID()); + if (!trx.save()) + { + m_processMsg = "Transaction not inserted (MA)"; + return DocAction.STATUS_Invalid; + } + // + qtyDiff = qtyDiff.subtract(maxDiff); + if (qtyDiff.signum() == 0) + break; + } + } // negative qty + } + // Fallback + if (trx == null) + { + // Storage + MStorage storage = MStorage.get(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), get_TrxName()); + if (storage == null) + storage = MStorage.getCreate(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), get_TrxName()); + // + BigDecimal qtyDiff = line.getQtyInternalUse().negate(); + if (Env.ZERO.compareTo(qtyDiff) == 0) + qtyDiff = line.getQtyCount().subtract(line.getQtyBook()); + BigDecimal qtyNew = storage.getQtyOnHand().add(qtyDiff); + log.fine("Count=" + line.getQtyCount() + + ",Book=" + line.getQtyBook() + ", Difference=" + qtyDiff + + " - OnHand=" + storage.getQtyOnHand() + "->" + qtyNew); + // + storage.setQtyOnHand(qtyNew); + storage.setDateLastInventory(getMovementDate()); + if (!storage.save(get_TrxName())) + { + m_processMsg = "Storage not updated(2)"; + return DocAction.STATUS_Invalid; + } + log.fine(storage.toString()); + + // Transaction + trx = new MTransaction (getCtx(), line.getAD_Org_ID(), + MTransaction.MOVEMENTTYPE_InventoryIn, + line.getM_Locator_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), + qtyDiff, getMovementDate(), get_TrxName()); + trx.setM_InventoryLine_ID(line.getM_InventoryLine_ID()); + if (!trx.save()) + { + m_processMsg = "Transaction not inserted(2)"; + return DocAction.STATUS_Invalid; + } + } // Fallback + + */ + + + MInventoryLine[] lines = getLines(false); + for (MInventoryLine line : lines) + { + if (!line.isActive()) + continue; + + MProduct product = line.getProduct(); + + //Get Quantity to Inventory Inernal Use + BigDecimal qtyDiff = line.getQtyInternalUse().negate(); + //If Quantity to Inventory Internal Use = Zero Then is Physical Inventory Else is Inventory Internal Use + if (qtyDiff.signum() == 0) + qtyDiff = line.getQtyCount().subtract(line.getQtyBook()); + + //Ignore the Material Policy when is Reverse Correction + if(!isReversal()) + checkMaterialPolicy(line, qtyDiff); + + // Stock Movement - Counterpart MOrder.reserveStock + if (product != null + && product.isStocked() ) + { + log.fine("Material Transaction"); + MTransaction mtrx = null; + + //If AttributeSetInstance = Zero then create new AttributeSetInstance use Inventory Line MA else use current AttributeSetInstance + if (line.getM_AttributeSetInstance_ID() == 0 || qtyDiff.compareTo(Env.ZERO) == 0) + { + MInventoryLineMA mas[] = MInventoryLineMA.get(getCtx(), + line.getM_InventoryLine_ID(), get_TrxName()); + + for (int j = 0; j < mas.length; j++) + { + MInventoryLineMA ma = mas[j]; + BigDecimal QtyMA = ma.getMovementQty(); + BigDecimal QtyNew = QtyMA.add(qtyDiff); + log.fine("Diff=" + qtyDiff + + " - Instance OnHand=" + QtyMA + "->" + QtyNew); + + if (!MStorage.add(getCtx(), getM_Warehouse_ID(), + line.getM_Locator_ID(), + line.getM_Product_ID(), + ma.getM_AttributeSetInstance_ID(), 0, + QtyMA.negate(), Env.ZERO, Env.ZERO, get_TrxName())) + { + m_processMsg = "Cannot correct Inventory (MA)"; + return DocAction.STATUS_Invalid; + } + + // Only Update Date Last Inventory if is a Physical Inventory + if(line.getQtyInternalUse().compareTo(Env.ZERO) == 0) + { + MStorage storage = MStorage.get(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), get_TrxName()); + storage.setDateLastInventory(getMovementDate()); + if (!storage.save(get_TrxName())) + { + m_processMsg = "Storage not updated(2)"; + return DocAction.STATUS_Invalid; + } + } + + String m_MovementType =null; + if(QtyMA.negate().compareTo(Env.ZERO) > 0 ) + m_MovementType = MTransaction.MOVEMENTTYPE_InventoryIn; + else + m_MovementType = MTransaction.MOVEMENTTYPE_InventoryOut; + // Transaction + mtrx = new MTransaction (getCtx(), line.getAD_Org_ID(), m_MovementType, + line.getM_Locator_ID(), line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), + QtyMA.negate(), getMovementDate(), get_TrxName()); + mtrx.setM_InventoryLine_ID(line.getM_InventoryLine_ID()); + if (!mtrx.save()) + { + m_processMsg = "Transaction not inserted(2)"; + return DocAction.STATUS_Invalid; + } + qtyDiff = QtyNew; + } + } + + //sLine.getM_AttributeSetInstance_ID() != 0 + // Fallback + if (mtrx == null) + { + //Fallback: Update Storage - see also VMatch.createMatchRecord + if (!MStorage.add(getCtx(), getM_Warehouse_ID(), + line.getM_Locator_ID(), + line.getM_Product_ID(), + line.getM_AttributeSetInstance_ID(), 0, + qtyDiff, Env.ZERO, Env.ZERO, get_TrxName())) + { + m_processMsg = "Cannot correct Inventory (MA)"; + return DocAction.STATUS_Invalid; + } + + // Only Update Date Last Inventory if is a Physical Inventory + if(line.getQtyInternalUse().compareTo(Env.ZERO) == 0) + { + MStorage storage = MStorage.get(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), get_TrxName()); + + storage.setDateLastInventory(getMovementDate()); + if (!storage.save(get_TrxName())) + { + m_processMsg = "Storage not updated(2)"; + return DocAction.STATUS_Invalid; + } + } + + String m_MovementType =null; + if(qtyDiff.compareTo(Env.ZERO) > 0 ) + m_MovementType = MTransaction.MOVEMENTTYPE_InventoryIn; + else + m_MovementType = MTransaction.MOVEMENTTYPE_InventoryOut; + // Transaction + mtrx = new MTransaction (getCtx(), line.getAD_Org_ID(), m_MovementType, + line.getM_Locator_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), + qtyDiff, getMovementDate(), get_TrxName()); + mtrx.setM_InventoryLine_ID(line.getM_InventoryLine_ID()); + if (!mtrx.save()) + { + m_processMsg = "Transaction not inserted(2)"; + return DocAction.STATUS_Invalid; + } + } // Fallback + } // stock movement + + + } // for all lines + + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + + // + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Set the definite document number after completed + */ + private void setDefiniteDocumentNo() { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (dt.isOverwriteDateOnComplete()) { + setMovementDate(new Timestamp (System.currentTimeMillis())); + } + if (dt.isOverwriteSeqOnComplete()) { + String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); + if (value != null) + setDocumentNo(value); + } + } + + /** + * Check Material Policy. + * (NOT USED) + * Sets line ASI + */ + private void checkMaterialPolicy(MInventoryLine line, BigDecimal qtyDiff) + { + int no = MInventoryLineMA.deleteInventoryMA(line.getM_InventoryLine_ID(), get_TrxName()); + if (no > 0) + log.config("Delete old #" + no); + + + // Check Line + boolean needSave = false; + BigDecimal qtyASI = Env.ZERO ; + // Attribute Set Instance + if (line.getM_AttributeSetInstance_ID() == 0) + { + MProduct product = MProduct.get(getCtx(), line.getM_Product_ID()); + if (qtyDiff.signum() > 0) // Incoming Trx + { + MAttributeSetInstance asi = new MAttributeSetInstance(getCtx(), 0, get_TrxName()); + asi.setClientOrg(getAD_Client_ID(), 0); + asi.setM_AttributeSet_ID(product.getM_AttributeSet_ID()); + if (!asi.save()) + { + throw new IllegalStateException("Error try create ASI Reservation"); + } + if (asi.save()) + { + line.setM_AttributeSetInstance_ID(asi.getM_AttributeSetInstance_ID()); + needSave = true; + } + } + else // Outgoing Trx + { + String MMPolicy = product.getMMPolicy(); + MStorage[] storages = MStorage.getAllWithASI(getCtx(), + line.getM_Product_ID(), line.getM_Locator_ID(), + MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName()); + BigDecimal qtyToDeliver = qtyDiff.negate(); + + /*for (int ii = 0; ii < storages.length; ii++) + { + MStorage storage = storages[ii]; + if (ii == 0) + { + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + { + line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID()); + needSave = true; + log.config("Direct - " + line); + qtyToDeliver = Env.ZERO; + } + else + { + log.config("Split - " + line); + MInventoryLineMA ma = new MInventoryLineMA (line, + storage.getM_AttributeSetInstance_ID(), + storage.getQtyOnHand().negate()); + if (!ma.save()) + ; + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + log.fine("#" + ii + ": " + ma + ", QtyToDeliver=" + qtyToDeliver); + } + } + else // create addl material allocation + { + MInventoryLineMA ma = new MInventoryLineMA (line, + storage.getM_AttributeSetInstance_ID(), + qtyToDeliver.negate()); + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + qtyToDeliver = Env.ZERO; + else + { + ma.setMovementQty(storage.getQtyOnHand().negate()); + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + } + if (!ma.save()) + ; + log.fine("#" + ii + ": " + ma + ", QtyToDeliver=" + qtyToDeliver); + } + if (qtyToDeliver.signum() == 0) + break; + } // for all storages + */ + + for (MStorage storage: storages) + { + //cosume ASI Zero + if (storage.getM_AttributeSetInstance_ID() == 0) + { + qtyASI = qtyASI.add(storage.getQtyOnHand()); + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + continue; + } + + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + { + MInventoryLineMA ma = new MInventoryLineMA (line, + storage.getM_AttributeSetInstance_ID(), + qtyToDeliver); + if (!ma.save()) + { + throw new IllegalStateException("Error try create ASI Reservation"); + } + qtyToDeliver = Env.ZERO; + log.fine( ma + ", QtyToDeliver=" + qtyToDeliver); + //return; + } + else + { + MInventoryLineMA ma = new MInventoryLineMA (line, + storage.getM_AttributeSetInstance_ID(), + storage.getQtyOnHand()); + if (!ma.save()) + { + throw new IllegalStateException("Error try create ASI Reservation"); + } + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + log.fine( ma + ", QtyToDeliver=" + qtyToDeliver); + } + } + + // No AttributeSetInstance found for remainder + if (qtyToDeliver.signum() != 0 || qtyASI.signum() != 0) + { + MInventoryLineMA ma = new MInventoryLineMA (line, 0 , qtyToDeliver.add(qtyASI)); + + if (!ma.save()) + ; + log.fine("##: " + ma); + } + } // outgoing Trx + + if (needSave && !line.save()) + log.severe("NOT saved " + line); + } // for all lines + + } // checkMaterialPolicy + + /** + * Void Document. + * @return false + */ + public boolean voidIt() + { + log.info(toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + if (DOCSTATUS_Closed.equals(getDocStatus()) + || DOCSTATUS_Reversed.equals(getDocStatus()) + || DOCSTATUS_Voided.equals(getDocStatus())) + { + m_processMsg = "Document Closed: " + getDocStatus(); + return false; + } + + // Not Processed + if (DOCSTATUS_Drafted.equals(getDocStatus()) + || DOCSTATUS_Invalid.equals(getDocStatus()) + || DOCSTATUS_InProgress.equals(getDocStatus()) + || DOCSTATUS_Approved.equals(getDocStatus()) + || DOCSTATUS_NotApproved.equals(getDocStatus()) ) + { + // Set lines to 0 + MInventoryLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MInventoryLine line = lines[i]; + BigDecimal oldCount = line.getQtyCount(); + BigDecimal oldInternal = line.getQtyInternalUse(); + if (oldCount.compareTo(line.getQtyBook()) != 0 + || oldInternal.signum() != 0) + { + line.setQtyInternalUse(Env.ZERO); + line.setQtyCount(line.getQtyBook()); + line.addDescription("Void (" + oldCount + "/" + oldInternal + ")"); + line.save(get_TrxName()); + } + } + } + else + { + return reverseCorrectIt(); + } + + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // voidIt + + /** + * Close Document. + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + setDocAction(DOCACTION_None); + return true; + } // closeIt + + /** + * Reverse Correction + * @return false + */ + public boolean reverseCorrectIt() + { + log.info(toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (!MPeriod.isOpen(getCtx(), getMovementDate(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return false; + } + + // Deep Copy + MInventory reversal = new MInventory(getCtx(), 0, get_TrxName()); + copyValues(this, reversal, getAD_Client_ID(), getAD_Org_ID()); + reversal.setDocStatus(DOCSTATUS_Drafted); + reversal.setDocAction(DOCACTION_Complete); + reversal.setIsApproved (false); + reversal.setPosted(false); + reversal.setProcessed(false); + reversal.addDescription("{->" + getDocumentNo() + ")"); + //FR1948157 + reversal.setReversal_ID(getM_Inventory_ID()); + if (!reversal.save()) + { + m_processMsg = "Could not create Inventory Reversal"; + return false; + } + reversal.setReversal(true); + + // Reverse Line Qty + MInventoryLine[] oLines = getLines(true); + for (int i = 0; i < oLines.length; i++) + { + MInventoryLine oLine = oLines[i]; + MInventoryLine rLine = new MInventoryLine(getCtx(), 0, get_TrxName()); + copyValues(oLine, rLine, oLine.getAD_Client_ID(), oLine.getAD_Org_ID()); + rLine.setM_Inventory_ID(reversal.getM_Inventory_ID()); + rLine.setParent(reversal); + // + rLine.setQtyBook (oLine.getQtyCount()); // switch + rLine.setQtyCount (oLine.getQtyBook()); + rLine.setQtyInternalUse (oLine.getQtyInternalUse().negate()); + + if (!rLine.save()) + { + m_processMsg = "Could not create Inventory Reversal Line"; + return false; + } + + //We need to copy MA + if (rLine.getM_AttributeSetInstance_ID() == 0) + { + MInventoryLineMA mas[] = MInventoryLineMA.get(getCtx(), + oLines[i].getM_InventoryLine_ID(), get_TrxName()); + for (int j = 0; j < mas.length; j++) + { + MInventoryLineMA ma = new MInventoryLineMA (rLine, + mas[j].getM_AttributeSetInstance_ID(), + mas[j].getMovementQty().negate()); + if (!ma.save()) + ; + } + } + } + // + if (!reversal.processIt(DocAction.ACTION_Complete)) + { + m_processMsg = "Reversal ERROR: " + reversal.getProcessMsg(); + return false; + } + reversal.closeIt(); + reversal.setDocStatus(DOCSTATUS_Reversed); + reversal.setDocAction(DOCACTION_None); + reversal.save(); + m_processMsg = reversal.getDocumentNo(); + + // Update Reversed (this) + addDescription("(" + reversal.getDocumentNo() + "<-)"); + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + setProcessed(true); + //FR1948157 + setReversal_ID(reversal.getM_Inventory_ID()); + setDocStatus(DOCSTATUS_Reversed); // may come from void + setDocAction(DOCACTION_None); + + return true; + } // reverseCorrectionIt + + /** + * Reverse Accrual + * @return false + */ + public boolean reverseAccrualIt() + { + log.info(toString()); + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return false; + } // reverseAccrualIt + + /** + * Re-activate + * @return false + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + return false; + } // reActivateIt + + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Total Lines = 123.00 (#1) + sb.append(": ") + .append(Msg.translate(getCtx(),"ApprovalAmt")).append("=").append(getApprovalAmt()) + .append(" (#").append(getLines(false).length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID + */ + public int getDoc_User_ID() + { + return getUpdatedBy(); + } // getDoc_User_ID + + /** + * Get Document Currency + * @return C_Currency_ID + */ + public int getC_Currency_ID() + { + // MPriceList pl = MPriceList.get(getCtx(), getM_PriceList_ID()); + // return pl.getC_Currency_ID(); + return 0; + } // getC_Currency_ID + + /** Reversal Flag */ + private boolean m_reversal = false; + + /** + * Set Reversal + * @param reversal reversal + */ + private void setReversal(boolean reversal) + { + m_reversal = reversal; + } // setReversal + /** + * Is Reversal + * @return reversal + */ + private boolean isReversal() + { + return m_reversal; + } // isReversal + +} // MInventory diff --git a/base/src/org/compiere/model/MInventoryLine.java b/base/src/org/compiere/model/MInventoryLine.java new file mode 100644 index 0000000000..b0a299bdaa --- /dev/null +++ b/base/src/org/compiere/model/MInventoryLine.java @@ -0,0 +1,450 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; + +import org.compiere.util.*; + +/** + * Physical Inventory Line Model + * + * @author Jorg Janke + * @version $Id: MInventoryLine.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $ + * + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1817757 ] Error on saving MInventoryLine in a custom environment + */ +public class MInventoryLine extends X_M_InventoryLine +{ + /** + * Get Inventory Line with parameters + * @param inventory inventory + * @param M_Locator_ID locator + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID asi + * @return line or null + */ + public static MInventoryLine get (MInventory inventory, + int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID) + { + MInventoryLine retValue = null; + String sql = "SELECT * FROM M_InventoryLine " + + "WHERE M_Inventory_ID=? AND M_Locator_ID=?" + + " AND M_Product_ID=? AND M_AttributeSetInstance_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, inventory.get_TrxName()); + pstmt.setInt (1, inventory.getM_Inventory_ID()); + pstmt.setInt(2, M_Locator_ID); + pstmt.setInt(3, M_Product_ID); + pstmt.setInt(4, M_AttributeSetInstance_ID); + ResultSet rs = pstmt.executeQuery (); + if (rs.next ()) + retValue = new MInventoryLine (inventory.getCtx(), rs, inventory.get_TrxName()); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + s_log.log (Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + return retValue; + } // get + + + /** Logger */ + private static CLogger s_log = CLogger.getCLogger (MInventoryLine.class); + + + /************************************************************************** + * Default Constructor + * @param ctx context + * @param M_InventoryLine_ID line + * @param trxName transaction + */ + public MInventoryLine (Properties ctx, int M_InventoryLine_ID, String trxName) + { + super (ctx, M_InventoryLine_ID, trxName); + if (M_InventoryLine_ID == 0) + { + // setM_Inventory_ID (0); // Parent + // setM_InventoryLine_ID (0); // PK + // setM_Locator_ID (0); // FK + setLine(0); + // setM_Product_ID (0); // FK + setM_AttributeSetInstance_ID(0); // FK + setInventoryType (INVENTORYTYPE_InventoryDifference); + setQtyBook (Env.ZERO); + setQtyCount (Env.ZERO); + setProcessed(false); + } + } // MInventoryLine + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MInventoryLine (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MInventoryLine + + /** + * Detail Constructor. + * Locator/Product/AttributeSetInstance must be unique + * @param inventory parent + * @param M_Locator_ID locator + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID instance + * @param QtyBook book value + * @param QtyCount count value + */ + public MInventoryLine (MInventory inventory, + int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, + BigDecimal QtyBook, BigDecimal QtyCount) + { + this (inventory.getCtx(), 0, inventory.get_TrxName()); + if (inventory.get_ID() == 0) + throw new IllegalArgumentException("Header not saved"); + m_parent = inventory; + setM_Inventory_ID (inventory.getM_Inventory_ID()); // Parent + setClientOrg (inventory.getAD_Client_ID(), inventory.getAD_Org_ID()); + setM_Locator_ID (M_Locator_ID); // FK + setM_Product_ID (M_Product_ID); // FK + setM_AttributeSetInstance_ID (M_AttributeSetInstance_ID); + // + if (QtyBook != null) + setQtyBook (QtyBook); + if (QtyCount != null && QtyCount.signum() != 0) + setQtyCount (QtyCount); + m_isManualEntry = false; + } // MInventoryLine + + /** Manually created */ + private boolean m_isManualEntry = true; + /** Parent */ + private MInventory m_parent = null; + /** Product */ + private MProduct m_product = null; + + /** + * Get Qty Book + * @return Qty Book + */ + public BigDecimal getQtyBook () + { + BigDecimal bd = super.getQtyBook (); + if (bd == null) + bd = Env.ZERO; + return bd; + } // getQtyBook + + /** + * Get Qty Count + * @return Qty Count + */ + public BigDecimal getQtyCount () + { + BigDecimal bd = super.getQtyCount(); + if (bd == null) + bd = Env.ZERO; + return bd; + } // getQtyBook + + /** + * Get Product + * @return product or null if not defined + */ + public MProduct getProduct() + { + int M_Product_ID = getM_Product_ID(); + if (M_Product_ID == 0) + return null; + if (m_product != null && m_product.getM_Product_ID() != M_Product_ID) + m_product = null; // reset + if (m_product == null) + m_product = MProduct.get(getCtx(), M_Product_ID); + return m_product; + } // getProduct + + /** + * Set Count Qty - enforce UOM + * @param QtyCount qty + */ + public void setQtyCount (BigDecimal QtyCount) + { + if (QtyCount != null) + { + MProduct product = getProduct(); + if (product != null) + { + int precision = product.getUOMPrecision(); + QtyCount = QtyCount.setScale(precision, BigDecimal.ROUND_HALF_UP); + } + } + super.setQtyCount(QtyCount); + } // setQtyCount + + /** + * Set Internal Use Qty - enforce UOM + * @param QtyInternalUse qty + */ + public void setQtyInternalUse (BigDecimal QtyInternalUse) + { + if (QtyInternalUse != null) + { + MProduct product = getProduct(); + if (product != null) + { + int precision = product.getUOMPrecision(); + QtyInternalUse = QtyInternalUse.setScale(precision, BigDecimal.ROUND_HALF_UP); + } + } + super.setQtyInternalUse(QtyInternalUse); + } // setQtyInternalUse + + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + /** + * Get Parent + * @param parent parent + */ + protected void setParent(MInventory parent) + { + m_parent = parent; + } // setParent + + /** + * Get Parent + * @return parent + */ + public MInventory getParent() + { + if (m_parent == null) + m_parent = new MInventory (getCtx(), getM_Inventory_ID(), get_TrxName()); + return m_parent; + } // getParent + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MInventoryLine["); + sb.append (get_ID()) + .append("-M_Product_ID=").append (getM_Product_ID()) + .append(",QtyCount=").append(getQtyCount()) + .append(",QtyInternalUse=").append(getQtyInternalUse()) + .append(",QtyBook=").append(getQtyBook()) + .append(",M_AttributeSetInstance_ID=").append(getM_AttributeSetInstance_ID()) + .append("]"); + return sb.toString (); + } // toString + + /** + * Before Save + * @param newRecord new + * @return true if can be saved + */ + protected boolean beforeSave (boolean newRecord) + { + if (newRecord && m_isManualEntry) + { + // Product requires ASI + if (getM_AttributeSetInstance_ID() == 0) + { + MProduct product = MProduct.get(getCtx(), getM_Product_ID()); + if (product != null && product.isASIMandatory(isSOTrx())) + { + log.saveError("FillMandatory", Msg.getElement(getCtx(), COLUMNNAME_M_AttributeSetInstance_ID)); + return false; + } + } // No ASI + } // new or manual + + // Set Line No + if (getLine() == 0) + { + String sql = "SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM M_InventoryLine WHERE M_Inventory_ID=?"; + int ii = DB.getSQLValue (get_TrxName(), sql, getM_Inventory_ID()); + setLine (ii); + } + + // Enforce Qty UOM + if (newRecord || is_ValueChanged("QtyCount")) + setQtyCount(getQtyCount()); + if (newRecord || is_ValueChanged("QtyInternalUse")) + setQtyInternalUse(getQtyInternalUse()); + + // InternalUse Inventory + if (getQtyInternalUse().signum() != 0) + { + if (!INVENTORYTYPE_ChargeAccount.equals(getInventoryType())) + setInventoryType(INVENTORYTYPE_ChargeAccount); + // + if (getC_Charge_ID() == 0) + { + log.saveError("InternalUseNeedsCharge", ""); + return false; + } + } + else if (INVENTORYTYPE_ChargeAccount.equals(getInventoryType())) + { + if (getC_Charge_ID() == 0) + { + log.saveError("FillMandatory", Msg.getElement(getCtx(), "C_Charge_ID")); + return false; + } + } + else if (getC_Charge_ID() != 0) + setC_Charge_ID(0); + + // Set AD_Org to parent if not charge + if (getC_Charge_ID() == 0) + setAD_Org_ID(getParent().getAD_Org_ID()); + + return true; + } // beforeSave + + /** + * After Save + * @param newRecord new + * @param success success + * @return true + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + if (!success) + return false; + + // Create MA + //if (newRecord && success + // && m_isManualEntry && getM_AttributeSetInstance_ID() == 0) + // createMA(); + return true; + } // afterSave + + /** + * Create Material Allocations for new Instances + */ + private void createMA() + { + MStorage[] storages = MStorage.getAll(getCtx(), getM_Product_ID(), + getM_Locator_ID(), get_TrxName()); + boolean allZeroASI = true; + for (int i = 0; i < storages.length; i++) + { + if (storages[i].getM_AttributeSetInstance_ID() != 0) + { + allZeroASI = false; + break; + } + } + if (allZeroASI) + return; + + MInventoryLineMA ma = null; + BigDecimal sum = Env.ZERO; + for (int i = 0; i < storages.length; i++) + { + MStorage storage = storages[i]; + if (storage.getQtyOnHand().signum() == 0) + continue; + if (ma != null + && ma.getM_AttributeSetInstance_ID() == storage.getM_AttributeSetInstance_ID()) + ma.setMovementQty(ma.getMovementQty().add(storage.getQtyOnHand())); + else + ma = new MInventoryLineMA (this, + storage.getM_AttributeSetInstance_ID(), storage.getQtyOnHand()); + if (!ma.save()) + ; + sum = sum.add(storage.getQtyOnHand()); + } + if (sum.compareTo(getQtyBook()) != 0) + { + log.warning("QtyBook=" + getQtyBook() + " corrected to Sum of MA=" + sum); + setQtyBook(sum); + } + } // createMA + + /** + * Is Internal Use Inventory + * @return true if is internal use inventory + */ + public boolean isInternalUseInventory() { + /* TODO: need to add M_Inventory.IsInternalUseInventory flag + see FR [ 1879029 ] Added IsInternalUseInventory flag to M_Inventory table + MInventory parent = getParent(); + return parent != null && parent.isInternalUseInventory(); + */ + return getQtyInternalUse().signum() != 0; + } + + /** + * Get Movement Qty (absolute value) + *
  • negative value means outgoing trx + *
  • positive value means incoming trx + * @return movement qty + */ + public BigDecimal getMovementQty() { + if(isInternalUseInventory()) { + return getQtyInternalUse().negate(); + } + else { + return getQtyCount().subtract(getQtyBook()); + } + } + + /** + * @return true if is an outgoing transaction + */ + public boolean isSOTrx() { + return getMovementQty().signum() < 0; + } +} // MInventoryLine diff --git a/base/src/org/compiere/model/MInventoryLineMA.java b/base/src/org/compiere/model/MInventoryLineMA.java new file mode 100644 index 0000000000..f1d99218df --- /dev/null +++ b/base/src/org/compiere/model/MInventoryLineMA.java @@ -0,0 +1,149 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.util.*; + + +/** + * Inventory Material Allocation + * + * @author Jorg Janke + * @version $Id: MInventoryLineMA.java,v 1.3 2006/07/30 00:51:04 jjanke Exp $ + */ +public class MInventoryLineMA extends X_M_InventoryLineMA +{ + /** + * Get Material Allocations for Line + * @param ctx context + * @param M_InventoryLine_ID line + * @param trxName trx + * @return allocations + */ + public static MInventoryLineMA[] get (Properties ctx, int M_InventoryLine_ID, String trxName) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_InventoryLineMA WHERE M_InventoryLine_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, M_InventoryLine_ID); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new MInventoryLineMA (ctx, rs, trxName)); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + s_log.log (Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + MInventoryLineMA[] retValue = new MInventoryLineMA[list.size ()]; + list.toArray (retValue); + return retValue; + } // get + + /** + * Delete all Material Allocation for Inventory + * @param M_Inventory_ID inventory + * @param trxName transaction + * @return number of rows deleted or -1 for error + */ + public static int deleteInventoryMA (int M_InventoryLine_ID, String trxName) + { + String sql = "DELETE FROM M_InventoryLineMA ma WHERE EXISTS " + + "(SELECT * FROM M_InventoryLine l WHERE l.M_InventoryLine_ID=ma.M_InventoryLine_ID" + + " AND M_InventoryLine_ID=" + M_InventoryLine_ID + ")"; + return DB.executeUpdate(sql, trxName); + } // deleteInventoryMA + + /** Logger */ + private static CLogger s_log = CLogger.getCLogger (MInventoryLineMA.class); + + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param M_InventoryLineMA_ID ignored + * @param trxName trx + */ + public MInventoryLineMA (Properties ctx, int M_InventoryLineMA_ID, String trxName) + { + super (ctx, M_InventoryLineMA_ID, trxName); + if (M_InventoryLineMA_ID != 0) + throw new IllegalArgumentException("Multi-Key"); + } // MInventoryLineMA + + /** + * Load Cosntructor + * @param ctx context + * @param rs result set + * @param trxName trx + */ + public MInventoryLineMA (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } // MInventoryLineMA + + /** + * Parent Constructor + * @param parent parent + * @param M_AttributeSetInstance_ID asi + * @param MovementQty qty + */ + public MInventoryLineMA (MInventoryLine parent, int M_AttributeSetInstance_ID, BigDecimal MovementQty) + { + this (parent.getCtx(), 0, parent.get_TrxName()); + setClientOrg(parent); + setM_InventoryLine_ID(parent.getM_InventoryLine_ID()); + // + setM_AttributeSetInstance_ID(M_AttributeSetInstance_ID); + setMovementQty(MovementQty); + } // MInventoryLineMA + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MInventoryLineMA["); + sb.append("M_InventoryLine_ID=").append(getM_InventoryLine_ID()) + .append(",M_AttributeSetInstance_ID=").append(getM_AttributeSetInstance_ID()) + .append(", Qty=").append(getMovementQty()) + .append ("]"); + return sb.toString (); + } // toString + +} // MInventoryLineMA diff --git a/base/src/org/compiere/model/MInvoice.java b/base/src/org/compiere/model/MInvoice.java new file mode 100644 index 0000000000..02e6fa2d8e --- /dev/null +++ b/base/src/org/compiere/model/MInvoice.java @@ -0,0 +1,2399 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.*; +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.print.*; +import org.compiere.process.*; +import org.compiere.util.*; +import org.eevolution.model.MPPProductBOM; +import org.eevolution.model.MPPProductBOMLine; + + +/** + * Invoice Model. + * Please do not set DocStatus and C_DocType_ID directly. + * They are set in the process() method. + * Use DocAction and C_DocTypeTarget_ID instead. + * + * @author Jorg Janke + * @version $Id: MInvoice.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $ + * @author victor.perez@e-evolution.com + * @see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962 + * Modifications: Added RMA functionality (Ashley Ramdass) + */ +public class MInvoice extends X_C_Invoice implements DocAction +{ + /** + * Get Payments Of BPartner + * @param ctx context + * @param C_BPartner_ID id + * @param trxName transaction + * @return array + */ + public static MInvoice[] getOfBPartner (Properties ctx, int C_BPartner_ID, String trxName) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM C_Invoice WHERE C_BPartner_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, trxName); + pstmt.setInt(1, C_BPartner_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new MInvoice(ctx,rs, trxName)); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + // + MInvoice[] retValue = new MInvoice[list.size()]; + list.toArray(retValue); + return retValue; + } // getOfBPartner + + /** + * Create new Invoice by copying + * @param from invoice + * @param dateDoc date of the document date + * @param C_DocTypeTarget_ID target doc type + * @param isSOTrx sales order + * @param counter create counter links + * @param trxName trx + * @param setOrder set Order links + * @return Invoice + */ + public static MInvoice copyFrom (MInvoice from, Timestamp dateDoc, + int C_DocTypeTarget_ID, boolean isSOTrx, boolean counter, + String trxName, boolean setOrder) + { + MInvoice to = new MInvoice (from.getCtx(), 0, null); + to.set_TrxName(trxName); + PO.copyValues (from, to, from.getAD_Client_ID(), from.getAD_Org_ID()); + to.set_ValueNoCheck ("C_Invoice_ID", I_ZERO); + to.set_ValueNoCheck ("DocumentNo", null); + // + to.setDocStatus (DOCSTATUS_Drafted); // Draft + to.setDocAction(DOCACTION_Complete); + // + to.setC_DocType_ID(0); + to.setC_DocTypeTarget_ID (C_DocTypeTarget_ID); + to.setIsSOTrx(isSOTrx); + // + to.setDateInvoiced (dateDoc); + to.setDateAcct (dateDoc); + to.setDatePrinted(null); + to.setIsPrinted (false); + // + to.setIsApproved (false); + to.setC_Payment_ID(0); + to.setC_CashLine_ID(0); + to.setIsPaid (false); + to.setIsInDispute(false); + // + // Amounts are updated by trigger when adding lines + to.setGrandTotal(Env.ZERO); + to.setTotalLines(Env.ZERO); + // + to.setIsTransferred (false); + to.setPosted (false); + to.setProcessed (false); + //[ 1633721 ] Reverse Documents- Processing=Y + to.setProcessing(false); + // delete references + to.setIsSelfService(false); + if (!setOrder) + to.setC_Order_ID(0); + if (counter) + { + to.setRef_Invoice_ID(from.getC_Invoice_ID()); + // Try to find Order link + if (from.getC_Order_ID() != 0) + { + MOrder peer = new MOrder (from.getCtx(), from.getC_Order_ID(), from.get_TrxName()); + if (peer.getRef_Order_ID() != 0) + to.setC_Order_ID(peer.getRef_Order_ID()); + } + } + else + to.setRef_Invoice_ID(0); + + if (!to.save(trxName)) + throw new IllegalStateException("Could not create Invoice"); + if (counter) + from.setRef_Invoice_ID(to.getC_Invoice_ID()); + + // Lines + if (to.copyLinesFrom(from, counter, setOrder) == 0) + throw new IllegalStateException("Could not create Invoice Lines"); + + return to; + } // copyFrom + + /** + * Get PDF File Name + * @param documentDir directory + * @param C_Invoice_ID invoice + * @return file name + */ + public static String getPDFFileName (String documentDir, int C_Invoice_ID) + { + StringBuffer sb = new StringBuffer (documentDir); + if (sb.length() == 0) + sb.append("."); + if (!sb.toString().endsWith(File.separator)) + sb.append(File.separator); + sb.append("C_Invoice_ID_") + .append(C_Invoice_ID) + .append(".pdf"); + return sb.toString(); + } // getPDFFileName + + + /** + * Get MInvoice from Cache + * @param ctx context + * @param C_Invoice_ID id + * @return MInvoice + */ + public static MInvoice get (Properties ctx, int C_Invoice_ID) + { + Integer key = new Integer (C_Invoice_ID); + MInvoice retValue = (MInvoice) s_cache.get (key); + if (retValue != null) + return retValue; + retValue = new MInvoice (ctx, C_Invoice_ID, null); + if (retValue.get_ID () != 0) + s_cache.put (key, retValue); + return retValue; + } // get + + /** Cache */ + private static CCache s_cache = new CCache("C_Invoice", 20, 2); // 2 minutes + + + /************************************************************************** + * Invoice Constructor + * @param ctx context + * @param C_Invoice_ID invoice or 0 for new + * @param trxName trx name + */ + public MInvoice (Properties ctx, int C_Invoice_ID, String trxName) + { + super (ctx, C_Invoice_ID, trxName); + if (C_Invoice_ID == 0) + { + setDocStatus (DOCSTATUS_Drafted); // Draft + setDocAction (DOCACTION_Complete); + // + setPaymentRule(PAYMENTRULE_OnCredit); // Payment Terms + + setDateInvoiced (new Timestamp (System.currentTimeMillis ())); + setDateAcct (new Timestamp (System.currentTimeMillis ())); + // + setChargeAmt (Env.ZERO); + setTotalLines (Env.ZERO); + setGrandTotal (Env.ZERO); + // + setIsSOTrx (true); + setIsTaxIncluded (false); + setIsApproved (false); + setIsDiscountPrinted (false); + setIsPaid (false); + setSendEMail (false); + setIsPrinted (false); + setIsTransferred (false); + setIsSelfService(false); + setIsPayScheduleValid(false); + setIsInDispute(false); + setPosted(false); + super.setProcessed (false); + setProcessing(false); + } + } // MInvoice + + /** + * Load Constructor + * @param ctx context + * @param rs result set record + * @param trxName transaction + */ + public MInvoice (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MInvoice + + /** + * Create Invoice from Order + * @param order order + * @param C_DocTypeTarget_ID target document type + * @param invoiceDate date or null + */ + public MInvoice (MOrder order, int C_DocTypeTarget_ID, Timestamp invoiceDate) + { + this (order.getCtx(), 0, order.get_TrxName()); + setClientOrg(order); + setOrder(order); // set base settings + // + if (C_DocTypeTarget_ID == 0) + C_DocTypeTarget_ID = DB.getSQLValue(null, + "SELECT C_DocTypeInvoice_ID FROM C_DocType WHERE C_DocType_ID=?", + order.getC_DocType_ID()); + setC_DocTypeTarget_ID(C_DocTypeTarget_ID); + if (invoiceDate != null) + setDateInvoiced(invoiceDate); + setDateAcct(getDateInvoiced()); + // + setSalesRep_ID(order.getSalesRep_ID()); + // + setC_BPartner_ID(order.getBill_BPartner_ID()); + setC_BPartner_Location_ID(order.getBill_Location_ID()); + setAD_User_ID(order.getBill_User_ID()); + } // MInvoice + + /** + * Create Invoice from Shipment + * @param ship shipment + * @param invoiceDate date or null + */ + public MInvoice (MInOut ship, Timestamp invoiceDate) + { + this (ship.getCtx(), 0, ship.get_TrxName()); + setClientOrg(ship); + setShipment(ship); // set base settings + // + setC_DocTypeTarget_ID(); + if (invoiceDate != null) + setDateInvoiced(invoiceDate); + setDateAcct(getDateInvoiced()); + // + setSalesRep_ID(ship.getSalesRep_ID()); + setAD_User_ID(ship.getAD_User_ID()); + } // MInvoice + + /** + * Create Invoice from Batch Line + * @param batch batch + * @param line batch line + */ + public MInvoice (MInvoiceBatch batch, MInvoiceBatchLine line) + { + this (line.getCtx(), 0, line.get_TrxName()); + setClientOrg(line); + setDocumentNo(line.getDocumentNo()); + // + setIsSOTrx(batch.isSOTrx()); + MBPartner bp = new MBPartner (line.getCtx(), line.getC_BPartner_ID(), line.get_TrxName()); + setBPartner(bp); // defaults + // + setIsTaxIncluded(line.isTaxIncluded()); + // May conflict with default price list + setC_Currency_ID(batch.getC_Currency_ID()); + setC_ConversionType_ID(batch.getC_ConversionType_ID()); + // + // setPaymentRule(order.getPaymentRule()); + // setC_PaymentTerm_ID(order.getC_PaymentTerm_ID()); + // setPOReference(""); + setDescription(batch.getDescription()); + // setDateOrdered(order.getDateOrdered()); + // + setAD_OrgTrx_ID(line.getAD_OrgTrx_ID()); + setC_Project_ID(line.getC_Project_ID()); + // setC_Campaign_ID(line.getC_Campaign_ID()); + setC_Activity_ID(line.getC_Activity_ID()); + setUser1_ID(line.getUser1_ID()); + setUser2_ID(line.getUser2_ID()); + // + setC_DocTypeTarget_ID(line.getC_DocType_ID()); + setDateInvoiced(line.getDateInvoiced()); + setDateAcct(line.getDateAcct()); + // + setSalesRep_ID(batch.getSalesRep_ID()); + // + setC_BPartner_ID(line.getC_BPartner_ID()); + setC_BPartner_Location_ID(line.getC_BPartner_Location_ID()); + setAD_User_ID(line.getAD_User_ID()); + } // MInvoice + + /** Open Amount */ + private BigDecimal m_openAmt = null; + + /** Invoice Lines */ + private MInvoiceLine[] m_lines; + /** Invoice Taxes */ + private MInvoiceTax[] m_taxes; + /** Logger */ + private static CLogger s_log = CLogger.getCLogger(MInvoice.class); + + /** + * Overwrite Client/Org if required + * @param AD_Client_ID client + * @param AD_Org_ID org + */ + public void setClientOrg (int AD_Client_ID, int AD_Org_ID) + { + super.setClientOrg(AD_Client_ID, AD_Org_ID); + } // setClientOrg + + /** + * Set Business Partner Defaults & Details + * @param bp business partner + */ + public void setBPartner (MBPartner bp) + { + if (bp == null) + return; + + setC_BPartner_ID(bp.getC_BPartner_ID()); + // Set Defaults + int ii = 0; + if (isSOTrx()) + ii = bp.getC_PaymentTerm_ID(); + else + ii = bp.getPO_PaymentTerm_ID(); + if (ii != 0) + setC_PaymentTerm_ID(ii); + // + if (isSOTrx()) + ii = bp.getM_PriceList_ID(); + else + ii = bp.getPO_PriceList_ID(); + if (ii != 0) + setM_PriceList_ID(ii); + // + String ss = bp.getPaymentRule(); + if (ss != null) + setPaymentRule(ss); + + + // Set Locations + MBPartnerLocation[] locs = bp.getLocations(false); + if (locs != null) + { + for (int i = 0; i < locs.length; i++) + { + if ((locs[i].isBillTo() && isSOTrx()) + || (locs[i].isPayFrom() && !isSOTrx())) + setC_BPartner_Location_ID(locs[i].getC_BPartner_Location_ID()); + } + // set to first + if (getC_BPartner_Location_ID() == 0 && locs.length > 0) + setC_BPartner_Location_ID(locs[0].getC_BPartner_Location_ID()); + } + if (getC_BPartner_Location_ID() == 0) + log.log(Level.SEVERE, "Has no To Address: " + bp); + + // Set Contact + MUser[] contacts = bp.getContacts(false); + if (contacts != null && contacts.length > 0) // get first User + setAD_User_ID(contacts[0].getAD_User_ID()); + } // setBPartner + + /** + * Set Order References + * @param order order + */ + public void setOrder (MOrder order) + { + if (order == null) + return; + + setC_Order_ID(order.getC_Order_ID()); + setIsSOTrx(order.isSOTrx()); + setIsDiscountPrinted(order.isDiscountPrinted()); + setIsSelfService(order.isSelfService()); + setSendEMail(order.isSendEMail()); + // + setM_PriceList_ID(order.getM_PriceList_ID()); + setIsTaxIncluded(order.isTaxIncluded()); + setC_Currency_ID(order.getC_Currency_ID()); + setC_ConversionType_ID(order.getC_ConversionType_ID()); + // + setPaymentRule(order.getPaymentRule()); + setC_PaymentTerm_ID(order.getC_PaymentTerm_ID()); + setPOReference(order.getPOReference()); + setDescription(order.getDescription()); + setDateOrdered(order.getDateOrdered()); + // + setAD_OrgTrx_ID(order.getAD_OrgTrx_ID()); + setC_Project_ID(order.getC_Project_ID()); + setC_Campaign_ID(order.getC_Campaign_ID()); + setC_Activity_ID(order.getC_Activity_ID()); + setUser1_ID(order.getUser1_ID()); + setUser2_ID(order.getUser2_ID()); + } // setOrder + + /** + * Set Shipment References + * @param ship shipment + */ + public void setShipment (MInOut ship) + { + if (ship == null) + return; + + setIsSOTrx(ship.isSOTrx()); + // + MBPartner bp = new MBPartner (getCtx(), ship.getC_BPartner_ID(), null); + setBPartner (bp); + // + setSendEMail(ship.isSendEMail()); + // + setPOReference(ship.getPOReference()); + setDescription(ship.getDescription()); + setDateOrdered(ship.getDateOrdered()); + // + setAD_OrgTrx_ID(ship.getAD_OrgTrx_ID()); + setC_Project_ID(ship.getC_Project_ID()); + setC_Campaign_ID(ship.getC_Campaign_ID()); + setC_Activity_ID(ship.getC_Activity_ID()); + setUser1_ID(ship.getUser1_ID()); + setUser2_ID(ship.getUser2_ID()); + // + if (ship.getC_Order_ID() != 0) + { + setC_Order_ID(ship.getC_Order_ID()); + MOrder order = new MOrder (getCtx(), ship.getC_Order_ID(), get_TrxName()); + setIsDiscountPrinted(order.isDiscountPrinted()); + setM_PriceList_ID(order.getM_PriceList_ID()); + setIsTaxIncluded(order.isTaxIncluded()); + setC_Currency_ID(order.getC_Currency_ID()); + setC_ConversionType_ID(order.getC_ConversionType_ID()); + setPaymentRule(order.getPaymentRule()); + setC_PaymentTerm_ID(order.getC_PaymentTerm_ID()); + // + MDocType dt = MDocType.get(getCtx(), order.getC_DocType_ID()); + if (dt.getC_DocTypeInvoice_ID() != 0) + setC_DocTypeTarget_ID(dt.getC_DocTypeInvoice_ID()); + // Overwrite Invoice Address + setC_BPartner_Location_ID(order.getBill_Location_ID()); + } + // Check if Shipment/Receipt is based on RMA + if (ship.getM_RMA_ID() != 0) + { + MRMA rma = new MRMA(getCtx(), ship.getM_RMA_ID(), get_TrxName()); + MOrder rmaOrder = rma.getOriginalOrder(); + setM_RMA_ID(ship.getM_RMA_ID()); + setIsSOTrx(rma.isSOTrx()); + setM_PriceList_ID(rmaOrder.getM_PriceList_ID()); + setIsTaxIncluded(rmaOrder.isTaxIncluded()); + setC_Currency_ID(rmaOrder.getC_Currency_ID()); + setC_ConversionType_ID(rmaOrder.getC_ConversionType_ID()); + setPaymentRule(rmaOrder.getPaymentRule()); + setC_PaymentTerm_ID(rmaOrder.getC_PaymentTerm_ID()); + + // Retrieves the invoice DocType + MDocType dt = MDocType.get(getCtx(), rma.getC_DocType_ID()); + if (dt.getC_DocTypeInvoice_ID() != 0) + { + setC_DocTypeTarget_ID(dt.getC_DocTypeInvoice_ID()); + } + setC_BPartner_Location_ID(rmaOrder.getBill_Location_ID()); + } + + } // setShipment + + /** + * Set Target Document Type + * @param DocBaseType doc type MDocType.DOCBASETYPE_ + */ + public void setC_DocTypeTarget_ID (String DocBaseType) + { + String sql = "SELECT C_DocType_ID FROM C_DocType " + + "WHERE AD_Client_ID=? AND DocBaseType=?" + + " AND IsActive='Y' " + + "ORDER BY IsDefault DESC"; + int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID(), DocBaseType); + if (C_DocType_ID <= 0) + log.log(Level.SEVERE, "Not found for AC_Client_ID=" + + getAD_Client_ID() + " - " + DocBaseType); + else + { + log.fine(DocBaseType); + setC_DocTypeTarget_ID (C_DocType_ID); + boolean isSOTrx = MDocType.DOCBASETYPE_ARInvoice.equals(DocBaseType) + || MDocType.DOCBASETYPE_ARCreditMemo.equals(DocBaseType); + setIsSOTrx (isSOTrx); + } + } // setC_DocTypeTarget_ID + + /** + * Set Target Document Type. + * Based on SO flag AP/AP Invoice + */ + public void setC_DocTypeTarget_ID () + { + if (getC_DocTypeTarget_ID() > 0) + return; + if (isSOTrx()) + setC_DocTypeTarget_ID(MDocType.DOCBASETYPE_ARInvoice); + else + setC_DocTypeTarget_ID(MDocType.DOCBASETYPE_APInvoice); + } // setC_DocTypeTarget_ID + + + /** + * Get Grand Total + * @param creditMemoAdjusted adjusted for CM (negative) + * @return grand total + */ + public BigDecimal getGrandTotal (boolean creditMemoAdjusted) + { + if (!creditMemoAdjusted) + return super.getGrandTotal(); + // + BigDecimal amt = getGrandTotal(); + if (isCreditMemo()) + return amt.negate(); + return amt; + } // getGrandTotal + + + /** + * Get Invoice Lines of Invoice + * @param whereClause starting with AND + * @return lines + */ + private MInvoiceLine[] getLines (String whereClause) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM C_InvoiceLine WHERE C_Invoice_ID=? "; + if (whereClause != null) + sql += whereClause; + sql += " ORDER BY Line"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Invoice_ID()); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + MInvoiceLine il = new MInvoiceLine(getCtx(), rs, get_TrxName()); + il.setInvoice(this); + list.add(il); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, "getLines", e); + } + finally + { + try + { + if (pstmt != null) + pstmt.close (); + } + catch (Exception e) + {} + pstmt = null; + } + + // + MInvoiceLine[] lines = new MInvoiceLine[list.size()]; + list.toArray(lines); + return lines; + } // getLines + + /** + * Get Invoice Lines + * @param requery + * @return lines + */ + public MInvoiceLine[] getLines (boolean requery) + { + if (m_lines == null || m_lines.length == 0 || requery) + m_lines = getLines(null); + set_TrxName(m_lines, get_TrxName()); + return m_lines; + } // getLines + + /** + * Get Lines of Invoice + * @return lines + */ + public MInvoiceLine[] getLines() + { + return getLines(false); + } // getLines + + + /** + * Renumber Lines + * @param step start and step + */ + public void renumberLines (int step) + { + int number = step; + MInvoiceLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MInvoiceLine line = lines[i]; + line.setLine(number); + line.save(); + number += step; + } + m_lines = null; + } // renumberLines + + /** + * Copy Lines From other Invoice. + * @param otherInvoice invoice + * @param counter create counter links + * @param setOrder set order links + * @return number of lines copied + */ + public int copyLinesFrom (MInvoice otherInvoice, boolean counter, boolean setOrder) + { + if (isProcessed() || isPosted() || otherInvoice == null) + return 0; + MInvoiceLine[] fromLines = otherInvoice.getLines(false); + int count = 0; + for (int i = 0; i < fromLines.length; i++) + { + MInvoiceLine line = new MInvoiceLine (getCtx(), 0, get_TrxName()); + MInvoiceLine fromLine = fromLines[i]; + if (counter) // header + PO.copyValues (fromLine, line, getAD_Client_ID(), getAD_Org_ID()); + else + PO.copyValues (fromLine, line, fromLine.getAD_Client_ID(), fromLine.getAD_Org_ID()); + line.setC_Invoice_ID(getC_Invoice_ID()); + line.setInvoice(this); + line.set_ValueNoCheck ("C_InvoiceLine_ID", I_ZERO); // new + // Reset + if (!setOrder) + line.setC_OrderLine_ID(0); + line.setRef_InvoiceLine_ID(0); + line.setM_InOutLine_ID(0); + line.setA_Asset_ID(0); + line.setM_AttributeSetInstance_ID(0); + line.setS_ResourceAssignment_ID(0); + // New Tax + if (getC_BPartner_ID() != otherInvoice.getC_BPartner_ID()) + line.setTax(); // recalculate + // + if (counter) + { + line.setRef_InvoiceLine_ID(fromLine.getC_InvoiceLine_ID()); + if (fromLine.getC_OrderLine_ID() != 0) + { + MOrderLine peer = new MOrderLine (getCtx(), fromLine.getC_OrderLine_ID(), get_TrxName()); + if (peer.getRef_OrderLine_ID() != 0) + line.setC_OrderLine_ID(peer.getRef_OrderLine_ID()); + } + line.setM_InOutLine_ID(0); + if (fromLine.getM_InOutLine_ID() != 0) + { + MInOutLine peer = new MInOutLine (getCtx(), fromLine.getM_InOutLine_ID(), get_TrxName()); + if (peer.getRef_InOutLine_ID() != 0) + line.setM_InOutLine_ID(peer.getRef_InOutLine_ID()); + } + } + // + line.setProcessed(false); + if (line.save(get_TrxName())) + count++; + // Cross Link + if (counter) + { + fromLine.setRef_InvoiceLine_ID(line.getC_InvoiceLine_ID()); + fromLine.save(get_TrxName()); + } + + // MZ Goodwill + // copy the landed cost + line.copyLandedCostFrom(fromLine); + line.allocateLandedCosts(); + // end MZ + } + if (fromLines.length != count) + log.log(Level.SEVERE, "Line difference - From=" + fromLines.length + " <> Saved=" + count); + return count; + } // copyLinesFrom + + /** Reversal Flag */ + private boolean m_reversal = false; + + /** + * Set Reversal + * @param reversal reversal + */ + private void setReversal(boolean reversal) + { + m_reversal = reversal; + } // setReversal + /** + * Is Reversal + * @return reversal + */ + private boolean isReversal() + { + return m_reversal; + } // isReversal + + /** + * Get Taxes + * @param requery requery + * @return array of taxes + */ + public MInvoiceTax[] getTaxes (boolean requery) + { + if (m_taxes != null && !requery) + return m_taxes; + String sql = "SELECT * FROM C_InvoiceTax WHERE C_Invoice_ID=?"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getC_Invoice_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add(new MInvoiceTax(getCtx(), rs, get_TrxName())); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, "getTaxes", e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + m_taxes = new MInvoiceTax[list.size ()]; + list.toArray (m_taxes); + return m_taxes; + } // getTaxes + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + /** + * Is it a Credit Memo? + * @return true if CM + */ + public boolean isCreditMemo() + { + MDocType dt = MDocType.get(getCtx(), + getC_DocType_ID()==0 ? getC_DocTypeTarget_ID() : getC_DocType_ID()); + return MDocType.DOCBASETYPE_APCreditMemo.equals(dt.getDocBaseType()) + || MDocType.DOCBASETYPE_ARCreditMemo.equals(dt.getDocBaseType()); + } // isCreditMemo + + /** + * Set Processed. + * Propergate to Lines/Taxes + * @param processed processed + */ + public void setProcessed (boolean processed) + { + super.setProcessed (processed); + if (get_ID() == 0) + return; + String set = "SET Processed='" + + (processed ? "Y" : "N") + + "' WHERE C_Invoice_ID=" + getC_Invoice_ID(); + int noLine = DB.executeUpdate("UPDATE C_InvoiceLine " + set, get_TrxName()); + int noTax = DB.executeUpdate("UPDATE C_InvoiceTax " + set, get_TrxName()); + m_lines = null; + m_taxes = null; + log.fine(processed + " - Lines=" + noLine + ", Tax=" + noTax); + } // setProcessed + + /** + * Validate Invoice Pay Schedule + * @return pay schedule is valid + */ + public boolean validatePaySchedule() + { + MInvoicePaySchedule[] schedule = MInvoicePaySchedule.getInvoicePaySchedule + (getCtx(), getC_Invoice_ID(), 0, get_TrxName()); + log.fine("#" + schedule.length); + if (schedule.length == 0) + { + setIsPayScheduleValid(false); + return false; + } + // Add up due amounts + BigDecimal total = Env.ZERO; + for (int i = 0; i < schedule.length; i++) + { + schedule[i].setParent(this); + BigDecimal due = schedule[i].getDueAmt(); + if (due != null) + total = total.add(due); + } + boolean valid = getGrandTotal().compareTo(total) == 0; + setIsPayScheduleValid(valid); + + // Update Schedule Lines + for (int i = 0; i < schedule.length; i++) + { + if (schedule[i].isValid() != valid) + { + schedule[i].setIsValid(valid); + schedule[i].save(get_TrxName()); + } + } + return valid; + } // validatePaySchedule + + + /************************************************************************** + * Before Save + * @param newRecord new + * @return true + */ + protected boolean beforeSave (boolean newRecord) + { + log.fine(""); + // No Partner Info - set Template + if (getC_BPartner_ID() == 0) + setBPartner(MBPartner.getTemplate(getCtx(), getAD_Client_ID())); + if (getC_BPartner_Location_ID() == 0) + setBPartner(new MBPartner(getCtx(), getC_BPartner_ID(), null)); + + // Price List + if (getM_PriceList_ID() == 0) + { + int ii = Env.getContextAsInt(getCtx(), "#M_PriceList_ID"); + if (ii != 0) + setM_PriceList_ID(ii); + else + { + String sql = "SELECT M_PriceList_ID FROM M_PriceList WHERE AD_Client_ID=? AND IsDefault='Y'"; + ii = DB.getSQLValue (null, sql, getAD_Client_ID()); + if (ii != 0) + setM_PriceList_ID (ii); + } + } + + // Currency + if (getC_Currency_ID() == 0) + { + String sql = "SELECT C_Currency_ID FROM M_PriceList WHERE M_PriceList_ID=?"; + int ii = DB.getSQLValue (null, sql, getM_PriceList_ID()); + if (ii != 0) + setC_Currency_ID (ii); + else + setC_Currency_ID(Env.getContextAsInt(getCtx(), "#C_Currency_ID")); + } + + // Sales Rep + if (getSalesRep_ID() == 0) + { + int ii = Env.getContextAsInt(getCtx(), "#SalesRep_ID"); + if (ii != 0) + setSalesRep_ID (ii); + } + + // Document Type + if (getC_DocType_ID() == 0) + setC_DocType_ID (0); // make sure it's set to 0 + if (getC_DocTypeTarget_ID() == 0) + setC_DocTypeTarget_ID(isSOTrx() ? MDocType.DOCBASETYPE_ARInvoice : MDocType.DOCBASETYPE_APInvoice); + + // Payment Term + if (getC_PaymentTerm_ID() == 0) + { + int ii = Env.getContextAsInt(getCtx(), "#C_PaymentTerm_ID"); + if (ii != 0) + setC_PaymentTerm_ID (ii); + else + { + String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y'"; + ii = DB.getSQLValue(null, sql, getAD_Client_ID()); + if (ii != 0) + setC_PaymentTerm_ID (ii); + } + } + return true; + } // beforeSave + + /** + * Before Delete + * @return true if it can be deleted + */ + protected boolean beforeDelete () + { + if (getC_Order_ID() != 0) + { + log.saveError("Error", Msg.getMsg(getCtx(), "CannotDelete")); + return false; + } + return true; + } // beforeDelete + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MInvoice[") + .append(get_ID()).append("-").append(getDocumentNo()) + .append(",GrandTotal=").append(getGrandTotal()); + if (m_lines != null) + sb.append(" (#").append(m_lines.length).append(")"); + sb.append ("]"); + return sb.toString (); + } // toString + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + return dt.getName() + " " + getDocumentNo(); + } // getDocumentInfo + + + /** + * After Save + * @param newRecord new + * @param success success + * @return success + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + if (!success || newRecord) + return success; + + if (is_ValueChanged("AD_Org_ID")) + { + String sql = "UPDATE C_InvoiceLine ol" + + " SET AD_Org_ID =" + + "(SELECT AD_Org_ID" + + " FROM C_Invoice o WHERE ol.C_Invoice_ID=o.C_Invoice_ID) " + + "WHERE C_Invoice_ID=" + getC_Invoice_ID(); + int no = DB.executeUpdate(sql, get_TrxName()); + log.fine("Lines -> #" + no); + } + return true; + } // afterSave + + + /** + * Set Price List (and Currency) when valid + * @param M_PriceList_ID price list + */ + public void setM_PriceList_ID (int M_PriceList_ID) + { + String sql = "SELECT M_PriceList_ID, C_Currency_ID " + + "FROM M_PriceList WHERE M_PriceList_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, M_PriceList_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + super.setM_PriceList_ID (rs.getInt(1)); + setC_Currency_ID (rs.getInt(2)); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, "setM_PriceList_ID", e); + } + finally + { + try + { + if (pstmt != null) + pstmt.close (); + } + catch (Exception e) + {} + pstmt = null; + } + } // setM_PriceList_ID + + + /** + * Get Allocated Amt in Invoice Currency + * @return pos/neg amount or null + */ + public BigDecimal getAllocatedAmt () + { + BigDecimal retValue = null; + String sql = "SELECT SUM(currencyConvert(al.Amount+al.DiscountAmt+al.WriteOffAmt," + + "ah.C_Currency_ID, i.C_Currency_ID,ah.DateTrx,COALESCE(i.C_ConversionType_ID,0), al.AD_Client_ID,al.AD_Org_ID)) " + + "FROM C_AllocationLine al" + + " INNER JOIN C_AllocationHdr ah ON (al.C_AllocationHdr_ID=ah.C_AllocationHdr_ID)" + + " INNER JOIN C_Invoice i ON (al.C_Invoice_ID=i.C_Invoice_ID) " + + "WHERE al.C_Invoice_ID=?" + + " AND ah.IsActive='Y' AND al.IsActive='Y'"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Invoice_ID()); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + retValue = rs.getBigDecimal(1); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + // log.fine("getAllocatedAmt - " + retValue); + // ? ROUND(NVL(v_AllocatedAmt,0), 2); + return retValue; + } // getAllocatedAmt + + /** + * Test Allocation (and set paid flag) + * @return true if updated + */ + public boolean testAllocation() + { + boolean change = false; + + if ( isProcessed() ) { + BigDecimal alloc = getAllocatedAmt(); // absolute + if (alloc == null) + alloc = Env.ZERO; + BigDecimal total = getGrandTotal(); + if (!isSOTrx()) + total = total.negate(); + if (isCreditMemo()) + total = total.negate(); + boolean test = total.compareTo(alloc) == 0; + change = test != isPaid(); + if (change) + setIsPaid(test); + log.fine("Paid=" + test + + " (" + alloc + "=" + total + ")"); + } + + return change; + } // testAllocation + + /** + * Set Paid Flag for invoices + * @param ctx context + * @param C_BPartner_ID if 0 all + * @param trxName transaction + */ + public static void setIsPaid (Properties ctx, int C_BPartner_ID, String trxName) + { + int counter = 0; + String sql = "SELECT * FROM C_Invoice " + + "WHERE IsPaid='N' AND DocStatus IN ('CO','CL')"; + if (C_BPartner_ID > 1) + sql += " AND C_BPartner_ID=?"; + else + sql += " AND AD_Client_ID=" + Env.getAD_Client_ID(ctx); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + if (C_BPartner_ID > 1) + pstmt.setInt (1, C_BPartner_ID); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + { + MInvoice invoice = new MInvoice(ctx, rs, trxName); + if (invoice.testAllocation()) + if (invoice.save()) + counter++; + } + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + s_log.config("#" + counter); + /**/ + } // setIsPaid + + /** + * Get Open Amount. + * Used by web interface + * @return Open Amt + */ + public BigDecimal getOpenAmt () + { + return getOpenAmt (true, null); + } // getOpenAmt + + /** + * Get Open Amount + * @param creditMemoAdjusted adjusted for CM (negative) + * @param paymentDate ignored Payment Date + * @return Open Amt + */ + public BigDecimal getOpenAmt (boolean creditMemoAdjusted, Timestamp paymentDate) + { + if (isPaid()) + return Env.ZERO; + // + if (m_openAmt == null) + { + m_openAmt = getGrandTotal(); + if (paymentDate != null) + { + // Payment Discount + // Payment Schedule + } + BigDecimal allocated = getAllocatedAmt(); + if (allocated != null) + { + allocated = allocated.abs(); // is absolute + m_openAmt = m_openAmt.subtract(allocated); + } + } + // + if (!creditMemoAdjusted) + return m_openAmt; + if (isCreditMemo()) + return m_openAmt.negate(); + return m_openAmt; + } // getOpenAmt + + + /** + * Get Document Status + * @return Document Status Clear Text + */ + public String getDocStatusName() + { + return MRefList.getListName(getCtx(), 131, getDocStatus()); + } // getDocStatusName + + + /************************************************************************** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID(), get_TrxName()); + if (re == null) + return null; + return re.getPDF(file); + } // createPDF + + /** + * Get PDF File Name + * @param documentDir directory + * @return file name + */ + public String getPDFFileName (String documentDir) + { + return getPDFFileName (documentDir, getC_Invoice_ID()); + } // getPDFFileName + + /** + * Get ISO Code of Currency + * @return Currency ISO + */ + public String getCurrencyISO() + { + return MCurrency.getISO_Code (getCtx(), getC_Currency_ID()); + } // getCurrencyISO + + /** + * Get Currency Precision + * @return precision + */ + public int getPrecision() + { + return MCurrency.getStdPrecision(getCtx(), getC_Currency_ID()); + } // getPrecision + + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // process + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info("unlockIt - " + toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info("invalidateIt - " + toString()); + setDocAction(DOCACTION_Prepare); + return true; + } // invalidateIt + + /** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + MDocType dt = MDocType.get(getCtx(), getC_DocTypeTarget_ID()); + + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + // Lines + MInvoiceLine[] lines = getLines(true); + if (lines.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + // No Cash Book + if (PAYMENTRULE_Cash.equals(getPaymentRule()) + && MCashBook.get(getCtx(), getAD_Org_ID(), getC_Currency_ID()) == null) + { + m_processMsg = "@NoCashBook@"; + return DocAction.STATUS_Invalid; + } + + // Convert/Check DocType + if (getC_DocType_ID() != getC_DocTypeTarget_ID() ) + setC_DocType_ID(getC_DocTypeTarget_ID()); + if (getC_DocType_ID() == 0) + { + m_processMsg = "No Document Type"; + return DocAction.STATUS_Invalid; + } + + explodeBOM(); + if (!calculateTaxTotal()) // setTotals + { + m_processMsg = "Error calculating Tax"; + return DocAction.STATUS_Invalid; + } + + createPaySchedule(); + + // Credit Status + if (isSOTrx() && !isReversal()) + { + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), null); + if (MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + } + + // Landed Costs + if (!isSOTrx()) + { + for (int i = 0; i < lines.length; i++) + { + MInvoiceLine line = lines[i]; + String error = line.allocateLandedCosts(); + if (error != null && error.length() > 0) + { + m_processMsg = error; + return DocAction.STATUS_Invalid; + } + } + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Add up Amounts + m_justPrepared = true; + if (!DOCACTION_Complete.equals(getDocAction())) + setDocAction(DOCACTION_Complete); + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Explode non stocked BOM. + */ + private void explodeBOM () + { + String where = "AND IsActive='Y' AND EXISTS " + + "(SELECT * FROM M_Product p WHERE C_InvoiceLine.M_Product_ID=p.M_Product_ID" + + " AND p.IsBOM='Y' AND p.IsVerified='Y' AND p.IsStocked='N')"; + // + String sql = "SELECT COUNT(*) FROM C_InvoiceLine " + + "WHERE C_Invoice_ID=? " + where; + int count = DB.getSQLValue(get_TrxName(), sql, getC_Invoice_ID()); + while (count != 0) + { + renumberLines (100); + + // Order Lines with non-stocked BOMs + MInvoiceLine[] lines = getLines (where); + for (int i = 0; i < lines.length; i++) + { + MInvoiceLine line = lines[i]; + MProduct product = MProduct.get (getCtx(), line.getM_Product_ID()); + log.fine(product.getName()); + // New Lines + int lineNo = line.getLine (); + + //find default BOM with valid dates and to this product + MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDateInvoiced(), get_TrxName()); + if(bom != null) + { + MPPProductBOMLine[] bomlines = bom.getLines(getDateInvoiced()); + for (int j = 0; j < bomlines.length; j++) + { + MPPProductBOMLine bomline = bomlines[j]; + MInvoiceLine newLine = new MInvoiceLine (this); + newLine.setLine (++lineNo); + newLine.setM_Product_ID (bomline.getM_Product_ID ()); + newLine.setC_UOM_ID (bomline.getC_UOM_ID ()); + newLine.setQty (line.getQtyInvoiced().multiply( + bomline.getQtyBOM ())); // Invoiced/Entered + if (bomline.getDescription () != null) + newLine.setDescription (bomline.getDescription ()); + // + newLine.setPrice (); + newLine.save (get_TrxName()); + } + } + + /*MProductBOM[] boms = MProductBOM.getBOMLines (product); + for (int j = 0; j < boms.length; j++) + { + MProductBOM bom = boms[j]; + MInvoiceLine newLine = new MInvoiceLine (this); + newLine.setLine (++lineNo); + newLine.setM_Product_ID (bom.getProduct().getM_Product_ID(), + bom.getProduct().getC_UOM_ID()); + newLine.setQty (line.getQtyInvoiced().multiply( + bom.getBOMQty ())); // Invoiced/Entered + if (bom.getDescription () != null) + newLine.setDescription (bom.getDescription ()); + // + newLine.setPrice (); + newLine.save (get_TrxName()); + }*/ + + // Convert into Comment Line + line.setM_Product_ID (0); + line.setM_AttributeSetInstance_ID (0); + line.setPriceEntered (Env.ZERO); + line.setPriceActual (Env.ZERO); + line.setPriceLimit (Env.ZERO); + line.setPriceList (Env.ZERO); + line.setLineNetAmt (Env.ZERO); + // + String description = product.getName (); + if (product.getDescription () != null) + description += " " + product.getDescription (); + if (line.getDescription () != null) + description += " " + line.getDescription (); + line.setDescription (description); + line.save (get_TrxName()); + } // for all lines with BOM + + m_lines = null; + count = DB.getSQLValue (get_TrxName(), sql, getC_Invoice_ID ()); + renumberLines (10); + } // while count != 0 + } // explodeBOM + + /** + * Calculate Tax and Total + * @return true if calculated + */ + private boolean calculateTaxTotal() + { + log.fine(""); + // Delete Taxes + DB.executeUpdate("DELETE C_InvoiceTax WHERE C_Invoice_ID=" + getC_Invoice_ID(), get_TrxName()); + m_taxes = null; + + // Lines + BigDecimal totalLines = Env.ZERO; + ArrayList taxList = new ArrayList(); + MInvoiceLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MInvoiceLine line = lines[i]; + /** Sync ownership for SO + if (isSOTrx() && line.getAD_Org_ID() != getAD_Org_ID()) + { + line.setAD_Org_ID(getAD_Org_ID()); + line.save(); + } **/ + Integer taxID = new Integer(line.getC_Tax_ID()); + if (!taxList.contains(taxID)) + { + MInvoiceTax iTax = MInvoiceTax.get (line, getPrecision(), + false, get_TrxName()); // current Tax + if (iTax != null) + { + iTax.setIsTaxIncluded(isTaxIncluded()); + if (!iTax.calculateTaxFromLines()) + return false; + if (!iTax.save()) + return false; + taxList.add(taxID); + } + } + totalLines = totalLines.add(line.getLineNetAmt()); + } + + // Taxes + BigDecimal grandTotal = totalLines; + MInvoiceTax[] taxes = getTaxes(true); + for (int i = 0; i < taxes.length; i++) + { + MInvoiceTax iTax = taxes[i]; + MTax tax = iTax.getTax(); + if (tax.isSummary()) + { + MTax[] cTaxes = tax.getChildTaxes(false); // Multiple taxes + for (int j = 0; j < cTaxes.length; j++) + { + MTax cTax = cTaxes[j]; + BigDecimal taxAmt = cTax.calculateTax(iTax.getTaxBaseAmt(), isTaxIncluded(), getPrecision()); + // + MInvoiceTax newITax = new MInvoiceTax(getCtx(), 0, get_TrxName()); + newITax.setClientOrg(this); + newITax.setC_Invoice_ID(getC_Invoice_ID()); + newITax.setC_Tax_ID(cTax.getC_Tax_ID()); + newITax.setPrecision(getPrecision()); + newITax.setIsTaxIncluded(isTaxIncluded()); + newITax.setTaxBaseAmt(iTax.getTaxBaseAmt()); + newITax.setTaxAmt(taxAmt); + if (!newITax.save(get_TrxName())) + return false; + // + if (!isTaxIncluded()) + grandTotal = grandTotal.add(taxAmt); + } + if (!iTax.delete(true, get_TrxName())) + return false; + } + else + { + if (!isTaxIncluded()) + grandTotal = grandTotal.add(iTax.getTaxAmt()); + } + } + // + setTotalLines(totalLines); + setGrandTotal(grandTotal); + return true; + } // calculateTaxTotal + + + /** + * (Re) Create Pay Schedule + * @return true if valid schedule + */ + private boolean createPaySchedule() + { + if (getC_PaymentTerm_ID() == 0) + return false; + MPaymentTerm pt = new MPaymentTerm(getCtx(), getC_PaymentTerm_ID(), null); + log.fine(pt.toString()); + return pt.apply(this); // calls validate pay schedule + } // createPaySchedule + + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info(toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info(toString()); + setIsApproved(false); + return true; + } // rejectIt + + /** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Implicit Approval + if (!isApproved()) + approveIt(); + log.info(toString()); + StringBuffer info = new StringBuffer(); + + // Create Cash + if (PAYMENTRULE_Cash.equals(getPaymentRule())) + { + // Modifications for POSterita + /* + MCash cash = MCash.get (getCtx(), getAD_Org_ID(), + getDateInvoiced(), getC_Currency_ID(), get_TrxName()); + */ + + MCash cash; + + int posId = Env.getContextAsInt(getCtx(),Env.POS_ID); + + if (posId != 0) + { + MPOS pos = new MPOS(getCtx(),posId,get_TrxName()); + int cashBookId = pos.getC_CashBook_ID(); + cash = MCash.get(getCtx(),cashBookId,getDateInvoiced(),get_TrxName()); + } + else + { + cash = MCash.get (getCtx(), getAD_Org_ID(), + getDateInvoiced(), getC_Currency_ID(), get_TrxName()); + } + + // End Posterita Modifications + + if (cash == null || cash.get_ID() == 0) + { + m_processMsg = "@NoCashBook@"; + return DocAction.STATUS_Invalid; + } + MCashLine cl = new MCashLine (cash); + cl.setInvoice(this); + if (!cl.save(get_TrxName())) + { + m_processMsg = "Could not save Cash Journal Line"; + return DocAction.STATUS_Invalid; + } + info.append("@C_Cash_ID@: " + cash.getName() + " #" + cl.getLine()); + setC_CashLine_ID(cl.getC_CashLine_ID()); + } // CashBook + + // Update Order & Match + int matchInv = 0; + int matchPO = 0; + MInvoiceLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MInvoiceLine line = lines[i]; + + // Update Order Line + MOrderLine ol = null; + if (line.getC_OrderLine_ID() != 0) + { + if (isSOTrx() + || line.getM_Product_ID() == 0) + { + ol = new MOrderLine (getCtx(), line.getC_OrderLine_ID(), get_TrxName()); + if (line.getQtyInvoiced() != null) + ol.setQtyInvoiced(ol.getQtyInvoiced().add(line.getQtyInvoiced())); + if (!ol.save(get_TrxName())) + { + m_processMsg = "Could not update Order Line"; + return DocAction.STATUS_Invalid; + } + } + // Order Invoiced Qty updated via Matching Inv-PO + else if (!isSOTrx() + && line.getM_Product_ID() != 0 + && !isReversal()) + { + // MatchPO is created also from MInOut when Invoice exists before Shipment + BigDecimal matchQty = line.getQtyInvoiced(); + MMatchPO po = MMatchPO.create (line, null, + getDateInvoiced(), matchQty); + if (!po.save(get_TrxName())) + { + m_processMsg = "Could not create PO Matching"; + return DocAction.STATUS_Invalid; + } + else + matchPO++; + } + } + + // Matching - Inv-Shipment + if (!isSOTrx() + && line.getM_InOutLine_ID() != 0 + && line.getM_Product_ID() != 0 + && !isReversal()) + { + MInOutLine receiptLine = new MInOutLine (getCtx(),line.getM_InOutLine_ID(), get_TrxName()); + BigDecimal matchQty = line.getQtyInvoiced(); + + if (receiptLine.getMovementQty().compareTo(matchQty) < 0) + matchQty = receiptLine.getMovementQty(); + + MMatchInv inv = new MMatchInv(line, getDateInvoiced(), matchQty); + if (!inv.save(get_TrxName())) + { + m_processMsg = "Could not create Invoice Matching"; + return DocAction.STATUS_Invalid; + } + else + matchInv++; + } + } // for all lines + if (matchInv > 0) + info.append(" @M_MatchInv_ID@#").append(matchInv).append(" "); + if (matchPO > 0) + info.append(" @M_MatchPO_ID@#").append(matchPO).append(" "); + + + + // Update BP Statistics + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + // Update total revenue and balance / credit limit (reversed on AllocationLine.processIt) + BigDecimal invAmt = MConversionRate.convertBase(getCtx(), getGrandTotal(true), // CM adjusted + getC_Currency_ID(), getDateAcct(), 0, getAD_Client_ID(), getAD_Org_ID()); + if (invAmt == null) + { + m_processMsg = "Could not convert C_Currency_ID=" + getC_Currency_ID() + + " to base C_Currency_ID=" + MClient.get(Env.getCtx()).getC_Currency_ID(); + return DocAction.STATUS_Invalid; + } + // Total Balance + BigDecimal newBalance = bp.getTotalOpenBalance(false); + if (newBalance == null) + newBalance = Env.ZERO; + if (isSOTrx()) + { + newBalance = newBalance.add(invAmt); + // + if (bp.getFirstSale() == null) + bp.setFirstSale(getDateInvoiced()); + BigDecimal newLifeAmt = bp.getActualLifeTimeValue(); + if (newLifeAmt == null) + newLifeAmt = invAmt; + else + newLifeAmt = newLifeAmt.add(invAmt); + BigDecimal newCreditAmt = bp.getSO_CreditUsed(); + if (newCreditAmt == null) + newCreditAmt = invAmt; + else + newCreditAmt = newCreditAmt.add(invAmt); + // + log.fine("GrandTotal=" + getGrandTotal(true) + "(" + invAmt + + ") BP Life=" + bp.getActualLifeTimeValue() + "->" + newLifeAmt + + ", Credit=" + bp.getSO_CreditUsed() + "->" + newCreditAmt + + ", Balance=" + bp.getTotalOpenBalance(false) + " -> " + newBalance); + bp.setActualLifeTimeValue(newLifeAmt); + bp.setSO_CreditUsed(newCreditAmt); + } // SO + else + { + newBalance = newBalance.subtract(invAmt); + log.fine("GrandTotal=" + getGrandTotal(true) + "(" + invAmt + + ") Balance=" + bp.getTotalOpenBalance(false) + " -> " + newBalance); + } + bp.setTotalOpenBalance(newBalance); + bp.setSOCreditStatus(); + if (!bp.save(get_TrxName())) + { + m_processMsg = "Could not update Business Partner"; + return DocAction.STATUS_Invalid; + } + + // User - Last Result/Contact + if (getAD_User_ID() != 0) + { + MUser user = new MUser (getCtx(), getAD_User_ID(), get_TrxName()); + user.setLastContact(new Timestamp(System.currentTimeMillis())); + user.setLastResult(Msg.translate(getCtx(), "C_Invoice_ID") + ": " + getDocumentNo()); + if (!user.save(get_TrxName())) + { + m_processMsg = "Could not update Business Partner User"; + return DocAction.STATUS_Invalid; + } + } // user + + // Update Project + if (isSOTrx() && getC_Project_ID() != 0) + { + MProject project = new MProject (getCtx(), getC_Project_ID(), get_TrxName()); + BigDecimal amt = getGrandTotal(true); + int C_CurrencyTo_ID = project.getC_Currency_ID(); + if (C_CurrencyTo_ID != getC_Currency_ID()) + amt = MConversionRate.convert(getCtx(), amt, getC_Currency_ID(), C_CurrencyTo_ID, + getDateAcct(), 0, getAD_Client_ID(), getAD_Org_ID()); + if (amt == null) + { + m_processMsg = "Could not convert C_Currency_ID=" + getC_Currency_ID() + + " to Project C_Currency_ID=" + C_CurrencyTo_ID; + return DocAction.STATUS_Invalid; + } + BigDecimal newAmt = project.getInvoicedAmt(); + if (newAmt == null) + newAmt = amt; + else + newAmt = newAmt.add(amt); + log.fine("GrandTotal=" + getGrandTotal(true) + "(" + amt + + ") Project " + project.getName() + + " - Invoiced=" + project.getInvoicedAmt() + "->" + newAmt); + project.setInvoicedAmt(newAmt); + if (!project.save(get_TrxName())) + { + m_processMsg = "Could not update Project"; + return DocAction.STATUS_Invalid; + } + } // project + + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + + // Counter Documents + MInvoice counter = createCounterDoc(); + if (counter != null) + info.append(" - @CounterDoc@: @C_Invoice_ID@=").append(counter.getDocumentNo()); + + m_processMsg = info.toString().trim(); + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Set the definite document number after completed + */ + private void setDefiniteDocumentNo() { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (dt.isOverwriteDateOnComplete()) { + setDateInvoiced(new Timestamp (System.currentTimeMillis())); + } + if (dt.isOverwriteSeqOnComplete()) { + String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); + if (value != null) + setDocumentNo(value); + } + } + + /** + * Create Counter Document + * @return counter invoice + */ + private MInvoice createCounterDoc() + { + // Is this a counter doc ? + if (getRef_Invoice_ID() != 0) + return null; + + // Org Must be linked to BPartner + MOrg org = MOrg.get(getCtx(), getAD_Org_ID()); + int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName()); + if (counterC_BPartner_ID == 0) + return null; + // Business Partner needs to be linked to Org + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), null); + int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int(); + if (counterAD_Org_ID == 0) + return null; + + MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, null); + MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID); + log.info("Counter BP=" + counterBP.getName()); + + // Document Type + int C_DocTypeTarget_ID = 0; + MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID()); + if (counterDT != null) + { + log.fine(counterDT.toString()); + if (!counterDT.isCreateCounter() || !counterDT.isValid()) + return null; + C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID(); + } + else // indirect + { + C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID()); + log.fine("Indirect C_DocTypeTarget_ID=" + C_DocTypeTarget_ID); + if (C_DocTypeTarget_ID <= 0) + return null; + } + + // Deep Copy + MInvoice counter = copyFrom(this, getDateInvoiced(), + C_DocTypeTarget_ID, !isSOTrx(), true, get_TrxName(), true); + // + counter.setAD_Org_ID(counterAD_Org_ID); + // counter.setM_Warehouse_ID(counterOrgInfo.getM_Warehouse_ID()); + // + counter.setBPartner(counterBP); + // Refernces (Should not be required + counter.setSalesRep_ID(getSalesRep_ID()); + counter.save(get_TrxName()); + + // Update copied lines + MInvoiceLine[] counterLines = counter.getLines(true); + for (int i = 0; i < counterLines.length; i++) + { + MInvoiceLine counterLine = counterLines[i]; + counterLine.setClientOrg(counter); + counterLine.setInvoice(counter); // copies header values (BP, etc.) + counterLine.setPrice(); + counterLine.setTax(); + // + counterLine.save(get_TrxName()); + } + + log.fine(counter.toString()); + + // Document Action + if (counterDT != null) + { + if (counterDT.getDocAction() != null) + { + counter.setDocAction(counterDT.getDocAction()); + counter.processIt(counterDT.getDocAction()); + counter.save(get_TrxName()); + } + } + return counter; + } // createCounterDoc + + /** + * Void Document. + * @return true if success + */ + public boolean voidIt() + { + log.info(toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + if (DOCSTATUS_Closed.equals(getDocStatus()) + || DOCSTATUS_Reversed.equals(getDocStatus()) + || DOCSTATUS_Voided.equals(getDocStatus())) + { + m_processMsg = "Document Closed: " + getDocStatus(); + setDocAction(DOCACTION_None); + return false; + } + + // Not Processed + if (DOCSTATUS_Drafted.equals(getDocStatus()) + || DOCSTATUS_Invalid.equals(getDocStatus()) + || DOCSTATUS_InProgress.equals(getDocStatus()) + || DOCSTATUS_Approved.equals(getDocStatus()) + || DOCSTATUS_NotApproved.equals(getDocStatus()) ) + { + // Set lines to 0 + MInvoiceLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MInvoiceLine line = lines[i]; + BigDecimal old = line.getQtyInvoiced(); + if (old.compareTo(Env.ZERO) != 0) + { + line.setQty(Env.ZERO); + line.setTaxAmt(Env.ZERO); + line.setLineNetAmt(Env.ZERO); + line.setLineTotalAmt(Env.ZERO); + line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")"); + // Unlink Shipment + if (line.getM_InOutLine_ID() != 0) + { + MInOutLine ioLine = new MInOutLine(getCtx(), line.getM_InOutLine_ID(), get_TrxName()); + ioLine.setIsInvoiced(false); + ioLine.save(get_TrxName()); + line.setM_InOutLine_ID(0); + } + line.save(get_TrxName()); + } + } + addDescription(Msg.getMsg(getCtx(), "Voided")); + setIsPaid(true); + setC_Payment_ID(0); + } + else + { + return reverseCorrectIt(); + } + + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // voidIt + + /** + * Close Document. + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // closeIt + + /** + * Reverse Correction - same date + * @return true if success + */ + public boolean reverseCorrectIt() + { + log.info(toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return false; + } + // + MAllocationHdr[] allocations = MAllocationHdr.getOfInvoice(getCtx(), + getC_Invoice_ID(), get_TrxName()); + for (int i = 0; i < allocations.length; i++) + { + allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct); + allocations[i].reverseCorrectIt(); + allocations[i].save(get_TrxName()); + } + // Reverse/Delete Matching + if (!isSOTrx()) + { + MMatchInv[] mInv = MMatchInv.getInvoice(getCtx(), getC_Invoice_ID(), get_TrxName()); + for (int i = 0; i < mInv.length; i++) + mInv[i].delete(true); + MMatchPO[] mPO = MMatchPO.getInvoice(getCtx(), getC_Invoice_ID(), get_TrxName()); + for (int i = 0; i < mPO.length; i++) + { + if (mPO[i].getM_InOutLine_ID() == 0) + mPO[i].delete(true); + else + { + mPO[i].setC_InvoiceLine_ID(null); + mPO[i].save(get_TrxName()); + } + } + } + // + load(get_TrxName()); // reload allocation reversal info + + // Deep Copy + MInvoice reversal = copyFrom (this, getDateInvoiced(), + getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true); + if (reversal == null) + { + m_processMsg = "Could not create Invoice Reversal"; + return false; + } + reversal.setReversal(true); + + // Reverse Line Qty + MInvoiceLine[] rLines = reversal.getLines(false); + for (int i = 0; i < rLines.length; i++) + { + MInvoiceLine rLine = rLines[i]; + rLine.setQtyEntered(rLine.getQtyEntered().negate()); + rLine.setQtyInvoiced(rLine.getQtyInvoiced().negate()); + rLine.setLineNetAmt(rLine.getLineNetAmt().negate()); + if (rLine.getTaxAmt() != null && rLine.getTaxAmt().compareTo(Env.ZERO) != 0) + rLine.setTaxAmt(rLine.getTaxAmt().negate()); + if (rLine.getLineTotalAmt() != null && rLine.getLineTotalAmt().compareTo(Env.ZERO) != 0) + rLine.setLineTotalAmt(rLine.getLineTotalAmt().negate()); + if (!rLine.save(get_TrxName())) + { + m_processMsg = "Could not correct Invoice Reversal Line"; + return false; + } + } + reversal.setC_Order_ID(getC_Order_ID()); + reversal.addDescription("{->" + getDocumentNo() + ")"); + // + if (!reversal.processIt(DocAction.ACTION_Complete)) + { + m_processMsg = "Reversal ERROR: " + reversal.getProcessMsg(); + return false; + } + reversal.setC_Payment_ID(0); + //FR1948157 + reversal.setReversal_ID(getC_Invoice_ID()); + reversal.setIsPaid(true); + reversal.closeIt(); + reversal.setProcessing (false); + reversal.setDocStatus(DOCSTATUS_Reversed); + reversal.setDocAction(DOCACTION_None); + reversal.save(get_TrxName()); + m_processMsg = reversal.getDocumentNo(); + // + addDescription("(" + reversal.getDocumentNo() + "<-)"); + + // Clean up Reversed (this) + MInvoiceLine[] iLines = getLines(false); + for (int i = 0; i < iLines.length; i++) + { + MInvoiceLine iLine = iLines[i]; + if (iLine.getM_InOutLine_ID() != 0) + { + MInOutLine ioLine = new MInOutLine(getCtx(), iLine.getM_InOutLine_ID(), get_TrxName()); + ioLine.setIsInvoiced(false); + ioLine.save(get_TrxName()); + // Reconsiliation + iLine.setM_InOutLine_ID(0); + iLine.save(get_TrxName()); + } + } + setProcessed(true); + //FR1948157 + setReversal_ID(reversal.getC_Invoice_ID()); + setDocStatus(DOCSTATUS_Reversed); // may come from void + setDocAction(DOCACTION_None); + setC_Payment_ID(0); + setIsPaid(true); + + // Create Allocation + MAllocationHdr alloc = new MAllocationHdr(getCtx(), false, getDateAcct(), + getC_Currency_ID(), + Msg.translate(getCtx(), "C_Invoice_ID") + ": " + getDocumentNo() + "/" + reversal.getDocumentNo(), + get_TrxName()); + alloc.setAD_Org_ID(getAD_Org_ID()); + if (alloc.save()) + { + // Amount + BigDecimal gt = getGrandTotal(true); + if (!isSOTrx()) + gt = gt.negate(); + // Orig Line + MAllocationLine aLine = new MAllocationLine (alloc, gt, + Env.ZERO, Env.ZERO, Env.ZERO); + aLine.setC_Invoice_ID(getC_Invoice_ID()); + aLine.save(); + // Reversal Line + MAllocationLine rLine = new MAllocationLine (alloc, gt.negate(), + Env.ZERO, Env.ZERO, Env.ZERO); + rLine.setC_Invoice_ID(reversal.getC_Invoice_ID()); + rLine.save(); + // Process It + if (alloc.processIt(DocAction.ACTION_Complete)) + alloc.save(); + } + + //MZ Goodwill + if (!isSOTrx()) + { + // delete Matched Invoice Cost Detail + MInvoiceLine[] lines = getLines(); + for (int i = 0; i < lines.length; i++) + { + MCostDetail cd = MCostDetail.get (getCtx(), "C_InvoiceLine_ID=? AND M_AttributeSetInstance_ID=?", + lines[i].getC_InvoiceLine_ID(), lines[i].getM_AttributeSetInstance_ID(), get_TrxName()); + if (cd != null) + { + cd.setProcessed(false); + cd.delete(true); + } + } + } + //End MZ + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + + return true; + } // reverseCorrectIt + + /** + * Reverse Accrual - none + * @return false + */ + public boolean reverseAccrualIt() + { + log.info(toString()); + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return false; + } // reverseAccrualIt + + /** + * Re-activate + * @return false + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + + return false; + } // reActivateIt + + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Grand Total = 123.00 (#1) + sb.append(": "). + append(Msg.translate(getCtx(),"GrandTotal")).append("=").append(getGrandTotal()) + .append(" (#").append(getLines(false).length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID + */ + public int getDoc_User_ID() + { + return getSalesRep_ID(); + } // getDoc_User_ID + + /** + * Get Document Approval Amount + * @return amount + */ + public BigDecimal getApprovalAmt() + { + return getGrandTotal(); + } // getApprovalAmt + + /** + * + * @param rma + */ + public void setRMA(MRMA rma) + { + setM_RMA_ID(rma.getM_RMA_ID()); + setAD_Org_ID(rma.getAD_Org_ID()); + setDescription(rma.getDescription()); + setC_BPartner_ID(rma.getC_BPartner_ID()); + setSalesRep_ID(rma.getSalesRep_ID()); + + setGrandTotal(rma.getAmt()); + setIsSOTrx(rma.isSOTrx()); + setTotalLines(rma.getAmt()); + + MInvoice originalInvoice = rma.getOriginalInvoice(); + + if (originalInvoice == null) + { + throw new IllegalStateException("Not invoiced - RMA: " + rma.getDocumentNo()); + } + + setC_BPartner_Location_ID(originalInvoice.getC_BPartner_Location_ID()); + setAD_User_ID(originalInvoice.getAD_User_ID()); + setC_Currency_ID(originalInvoice.getC_Currency_ID()); + setIsTaxIncluded(originalInvoice.isTaxIncluded()); + setM_PriceList_ID(originalInvoice.getM_PriceList_ID()); + setC_Project_ID(originalInvoice.getC_Project_ID()); + setC_Activity_ID(originalInvoice.getC_Activity_ID()); + setC_Campaign_ID(originalInvoice.getC_Campaign_ID()); + setUser1_ID(originalInvoice.getUser1_ID()); + setUser2_ID(originalInvoice.getUser2_ID()); + } + +} // MInvoice diff --git a/base/src/org/compiere/model/MJournal.java b/base/src/org/compiere/model/MJournal.java new file mode 100644 index 0000000000..3c69700b69 --- /dev/null +++ b/base/src/org/compiere/model/MJournal.java @@ -0,0 +1,881 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.*; +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.process.*; +import org.compiere.util.*; + +/** + * GL Journal Model + * + * @author Jorg Janke + * @version $Id: MJournal.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ + * + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1619150 ] Usability/Consistency: reversed gl journal description + *
  • BF [ 1775358 ] GL Journal DateAcct/C_Period_ID issue + * @author victor.perez@e-evolution.com, e-Evolution + *
  • FR [ 1948157 ] Is necessary the reference for document reverse + * @see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962 + */ +public class MJournal extends X_GL_Journal implements DocAction +{ + /** + * Standard Constructor + * @param ctx context + * @param GL_Journal_ID id + * @param trxName transaction + */ + public MJournal (Properties ctx, int GL_Journal_ID, String trxName) + { + super (ctx, GL_Journal_ID, trxName); + if (GL_Journal_ID == 0) + { + // setGL_Journal_ID (0); // PK + // setC_AcctSchema_ID (0); + // setC_Currency_ID (0); + // setC_DocType_ID (0); + // setC_Period_ID (0); + // + setCurrencyRate (Env.ONE); + // setC_ConversionType_ID(0); + setDateAcct (new Timestamp(System.currentTimeMillis())); + setDateDoc (new Timestamp(System.currentTimeMillis())); + // setDescription (null); + setDocAction (DOCACTION_Complete); + setDocStatus (DOCSTATUS_Drafted); + // setDocumentNo (null); + // setGL_Category_ID (0); + setPostingType (POSTINGTYPE_Actual); + setTotalCr (Env.ZERO); + setTotalDr (Env.ZERO); + setIsApproved (false); + setIsPrinted (false); + setPosted (false); + setProcessed(false); + } + } // MJournal + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MJournal (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MJournal + + /** + * Parent Constructor. + * @param parent batch + */ + public MJournal (MJournalBatch parent) + { + this (parent.getCtx(), 0, parent.get_TrxName()); + setClientOrg(parent); + setGL_JournalBatch_ID(parent.getGL_JournalBatch_ID()); + setC_DocType_ID(parent.getC_DocType_ID()); + setPostingType(parent.getPostingType()); + // + setDateDoc(parent.getDateDoc()); + setC_Period_ID(parent.getC_Period_ID()); + setDateAcct(parent.getDateAcct()); + setC_Currency_ID(parent.getC_Currency_ID()); + } // MJournal + + /** + * Copy Constructor. + * Dos not copy: Dates/Period + * @param original original + */ + public MJournal (MJournal original) + { + this (original.getCtx(), 0, original.get_TrxName()); + setClientOrg(original); + setGL_JournalBatch_ID(original.getGL_JournalBatch_ID()); + // + setC_AcctSchema_ID(original.getC_AcctSchema_ID()); + setGL_Budget_ID(original.getGL_Budget_ID()); + setGL_Category_ID(original.getGL_Category_ID()); + setPostingType(original.getPostingType()); + setDescription(original.getDescription()); + setC_DocType_ID(original.getC_DocType_ID()); + setControlAmt(original.getControlAmt()); + // + setC_Currency_ID(original.getC_Currency_ID()); + setC_ConversionType_ID(original.getC_ConversionType_ID()); + setCurrencyRate(original.getCurrencyRate()); + + // setDateDoc(original.getDateDoc()); + // setDateAcct(original.getDateAcct()); + // setC_Period_ID(original.getC_Period_ID()); + } // MJournal + + + /** + * Overwrite Client/Org if required + * @param AD_Client_ID client + * @param AD_Org_ID org + */ + public void setClientOrg (int AD_Client_ID, int AD_Org_ID) + { + super.setClientOrg(AD_Client_ID, AD_Org_ID); + } // setClientOrg + + /** + * Set Accounting Date. + * Set also Period if not set earlier + * @param DateAcct date + */ + public void setDateAcct (Timestamp DateAcct) + { + super.setDateAcct(DateAcct); + if (DateAcct == null) + return; + if (getC_Period_ID() != 0) + return; + int C_Period_ID = MPeriod.getC_Period_ID(getCtx(), DateAcct); + if (C_Period_ID == 0) + log.warning("setDateAcct - Period not found"); + else + setC_Period_ID(C_Period_ID); + } // setDateAcct + + /** + * Set Currency Info + * @param C_Currency_ID currenct + * @param C_ConversionType_ID type + * @param CurrencyRate rate + */ + public void setCurrency (int C_Currency_ID, int C_ConversionType_ID, BigDecimal CurrencyRate) + { + if (C_Currency_ID != 0) + setC_Currency_ID(C_Currency_ID); + if (C_ConversionType_ID != 0) + setC_ConversionType_ID(C_ConversionType_ID); + if (CurrencyRate != null && CurrencyRate.compareTo(Env.ZERO) == 0) + setCurrencyRate(CurrencyRate); + } // setCurrency + + /** + * Add to Description + * @param description text + * @since 3.1.4 + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } + + /************************************************************************** + * Get Journal Lines + * @param requery requery + * @return Array of lines + */ + public MJournalLine[] getLines (boolean requery) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM GL_JournalLine WHERE GL_Journal_ID=? ORDER BY Line"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getGL_Journal_ID()); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new MJournalLine (getCtx(), rs, get_TrxName())); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (SQLException ex) + { + log.log(Level.SEVERE, "getLines", ex); + } + try + { + if (pstmt != null) + pstmt.close(); + } + catch (SQLException ex1) + { + } + pstmt = null; + // + MJournalLine[] retValue = new MJournalLine[list.size()]; + list.toArray(retValue); + return retValue; + } // getLines + + /** + * Copy Lines from other Journal + * @param fromJournal Journal + * @param dateAcct date used - if null original + * @param typeCR type of copying (C)orrect=negate - (R)everse=flip dr/cr - otherwise just copy + * @return number of lines copied + */ + public int copyLinesFrom (MJournal fromJournal, Timestamp dateAcct, char typeCR) + { + if (isProcessed() || fromJournal == null) + return 0; + int count = 0; + MJournalLine[] fromLines = fromJournal.getLines(false); + for (int i = 0; i < fromLines.length; i++) + { + MJournalLine toLine = new MJournalLine (getCtx(), 0, fromJournal.get_TrxName()); + PO.copyValues(fromLines[i], toLine, getAD_Client_ID(), getAD_Org_ID()); + toLine.setGL_Journal_ID(getGL_Journal_ID()); + // + if (dateAcct != null) + toLine.setDateAcct(dateAcct); + // Amounts + if (typeCR == 'C') // correct + { + toLine.setAmtSourceDr(fromLines[i].getAmtSourceDr().negate()); + toLine.setAmtSourceCr(fromLines[i].getAmtSourceCr().negate()); + } + else if (typeCR == 'R') // reverse + { + toLine.setAmtSourceDr(fromLines[i].getAmtSourceCr()); + toLine.setAmtSourceCr(fromLines[i].getAmtSourceDr()); + } + toLine.setIsGenerated(true); + toLine.setProcessed(false); + if (toLine.save()) + count++; + } + if (fromLines.length != count) + log.log(Level.SEVERE, "Line difference - JournalLines=" + fromLines.length + " <> Saved=" + count); + + return count; + } // copyLinesFrom + + /** + * Set Processed. + * Propergate to Lines/Taxes + * @param processed processed + */ + public void setProcessed (boolean processed) + { + super.setProcessed (processed); + if (get_ID() == 0) + return; + String sql = "UPDATE GL_JournalLine SET Processed='" + + (processed ? "Y" : "N") + + "' WHERE GL_Journal_ID=" + getGL_Journal_ID(); + int noLine = DB.executeUpdate(sql, get_TrxName()); + log.fine(processed + " - Lines=" + noLine); + } // setProcessed + + + /************************************************************************** + * Before Save + * @param newRecord new + * @return true + */ + protected boolean beforeSave (boolean newRecord) + { + // Imported Journals may not have date + if (getDateDoc() == null) + { + if (getDateAcct() == null) + setDateDoc(new Timestamp(System.currentTimeMillis())); + else + setDateDoc(getDateAcct()); + } + if (getDateAcct() == null) + setDateAcct(getDateDoc()); + + // Update DateAcct on lines - teo_sarca BF [ 1775358 ] + if (is_ValueChanged(COLUMNNAME_DateAcct)) { + int no = DB.executeUpdate( + "UPDATE GL_JournalLine SET "+MJournalLine.COLUMNNAME_DateAcct+"=? WHERE GL_Journal_ID=?", + new Object[]{getDateAcct(), getGL_Journal_ID()}, + false, get_TrxName()); + log.finest("Updated GL_JournalLine.DateAcct #" + no); + } + return true; + } // beforeSave + + + /** + * After Save. + * Update Batch Total + * @param newRecord true if new record + * @param success true if success + * @return success + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + if (!success) + return success; + return updateBatch(); + } // afterSave + + /** + * After Delete + * @param success true if deleted + * @return true if success + */ + protected boolean afterDelete (boolean success) + { + if (!success) + return success; + return updateBatch(); + } // afterDelete + + /** + * Update Batch total + * @return true if ok + */ + private boolean updateBatch() + { + String sql = "UPDATE GL_JournalBatch jb" + + " SET (TotalDr, TotalCr) = (SELECT COALESCE(SUM(TotalDr),0), COALESCE(SUM(TotalCr),0)" + + " FROM GL_Journal j WHERE j.IsActive='Y' AND jb.GL_JournalBatch_ID=j.GL_JournalBatch_ID) " + + "WHERE GL_JournalBatch_ID=" + getGL_JournalBatch_ID(); + int no = DB.executeUpdate(sql, get_TrxName()); + if (no != 1) + log.warning("afterSave - Update Batch #" + no); + return no == 1; + } // updateBatch + + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // process + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info(toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info(toString()); + return true; + } // invalidateIt + + /** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + + // Get Period + MPeriod period = MPeriod.get (getCtx(), getDateAcct()); + if (period == null) + { + log.warning("No Period for " + getDateAcct()); + m_processMsg = "@PeriodNotFound@"; + return DocAction.STATUS_Invalid; + } + // Standard Period + if (period.getC_Period_ID() != getC_Period_ID() + && period.isStandardPeriod()) + { + m_processMsg = "@PeriodNotValid@"; + return DocAction.STATUS_Invalid; + } + boolean open = period.isOpen(dt.getDocBaseType(), getDateAcct()); + if (!open) + { + log.warning(period.getName() + + ": Not open for " + dt.getDocBaseType() + " (" + getDateAcct() + ")"); + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + + // Lines + MJournalLine[] lines = getLines(true); + if (lines.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + + // Add up Amounts + BigDecimal AmtSourceDr = Env.ZERO; + BigDecimal AmtSourceCr = Env.ZERO; + for (int i = 0; i < lines.length; i++) + { + MJournalLine line = lines[i]; + if (!isActive()) + continue; + // + if (line.isDocControlled()) + { + m_processMsg = "@DocControlledError@ - @Line@=" + line.getLine() + + " - " + line.getAccountElementValue(); + return DocAction.STATUS_Invalid; + } + // + AmtSourceDr = AmtSourceDr.add(line.getAmtSourceDr()); + AmtSourceCr = AmtSourceCr.add(line.getAmtSourceCr()); + } + setTotalDr(AmtSourceDr); + setTotalCr(AmtSourceCr); + + // Control Amount + if (Env.ZERO.compareTo(getControlAmt()) != 0 + && getControlAmt().compareTo(getTotalDr()) != 0) + { + m_processMsg = "@ControlAmtError@"; + return DocAction.STATUS_Invalid; + } + + // Unbalanced Jornal & Not Suspense + if (AmtSourceDr.compareTo(AmtSourceCr) != 0) + { + MAcctSchemaGL gl = MAcctSchemaGL.get(getCtx(), getC_AcctSchema_ID()); + if (gl == null || !gl.isUseSuspenseBalancing()) + { + m_processMsg = "@UnbalancedJornal@"; + return DocAction.STATUS_Invalid; + } + } + + if (!DOCACTION_Complete.equals(getDocAction())) + setDocAction(DOCACTION_Complete); + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + m_justPrepared = true; + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info(toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info(toString()); + setIsApproved(false); + return true; + } // rejectIt + + /** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Implicit Approval + if (!isApproved()) + approveIt(); + log.info(toString()); + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + + // + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Set the definite document number after completed + */ + private void setDefiniteDocumentNo() { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (dt.isOverwriteDateOnComplete()) { + setDateDoc(new Timestamp (System.currentTimeMillis())); + } + if (dt.isOverwriteSeqOnComplete()) { + String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); + if (value != null) + setDocumentNo(value); + } + } + + /** + * Void Document. + * @return true if success + */ + public boolean voidIt() + { + log.info(toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + boolean ok_to_void = false; + if (DOCSTATUS_Drafted.equals(getDocStatus()) + || DOCSTATUS_Invalid.equals(getDocStatus())) + { + setProcessed(true); + setDocAction(DOCACTION_None); + ok_to_void = true; + } else { + return false; + } + + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + + return ok_to_void; + } // voidIt + + /** + * Close Document. + * Cancel not delivered Qunatities + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + + boolean ok_to_close = false; + if (DOCSTATUS_Completed.equals(getDocStatus())) + { + setProcessed(true); + setDocAction(DOCACTION_None); + ok_to_close = true; + } else { + return false; + } + + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + return ok_to_close; + } // closeIt + + /** + * Reverse Correction (in same batch). + * As if nothing happened - same date + * @return true if success + */ + public boolean reverseCorrectIt() + { + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + boolean ok_correct = (reverseCorrectIt(getGL_JournalBatch_ID()) != null); + + if (! ok_correct) + return false; + + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + + return ok_correct; + } // reverseCorrectIt + + /** + * Reverse Correction. + * As if nothing happened - same date + * @param GL_JournalBatch_ID reversal batch + * @return reversed Journal or null + */ + public MJournal reverseCorrectIt (int GL_JournalBatch_ID) + { + log.info(toString()); + // Journal + MJournal reverse = new MJournal (this); + reverse.setGL_JournalBatch_ID(GL_JournalBatch_ID); + reverse.setDateDoc(getDateDoc()); + reverse.setC_Period_ID(getC_Period_ID()); + reverse.setDateAcct(getDateAcct()); + // Reverse indicator + reverse.addDescription("(->" + getDocumentNo() + ")"); + //FR [ 1948157 ] + reverse.setReversal_ID(getGL_Journal_ID()); + if (!reverse.save()) + return null; + addDescription("(" + reverse.getDocumentNo() + "<-)"); + + // Lines + reverse.copyLinesFrom(this, null, 'C'); + // + setProcessed(true); + //FR [ 1948157 ] + setReversal_ID(reverse.getGL_Journal_ID()); + setDocAction(DOCACTION_None); + return reverse; + } // reverseCorrectionIt + + /** + * Reverse Accrual (sane batch). + * Flip Dr/Cr - Use Today's date + * @return true if success + */ + public boolean reverseAccrualIt() + { + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + boolean ok_reverse = (reverseAccrualIt (getGL_JournalBatch_ID()) != null); + + if (! ok_reverse) + return false; + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return ok_reverse; + } // reverseAccrualIt + + /** + * Reverse Accrual. + * Flip Dr/Cr - Use Today's date + * @param GL_JournalBatch_ID reversal batch + * @return reversed journal or null + */ + public MJournal reverseAccrualIt (int GL_JournalBatch_ID) + { + log.info(toString()); + // Journal + MJournal reverse = new MJournal (this); + reverse.setGL_JournalBatch_ID(GL_JournalBatch_ID); + reverse.setDateDoc(new Timestamp(System.currentTimeMillis())); + reverse.set_ValueNoCheck ("C_Period_ID", null); // reset + reverse.setDateAcct(reverse.getDateDoc()); + // Reverse indicator + String description = reverse.getDescription(); + if (description == null) + description = "** " + getDocumentNo() + " **"; + else + description += " ** " + getDocumentNo() + " **"; + reverse.setDescription(description); + if (!reverse.save()) + return null; + + // Lines + reverse.copyLinesFrom(this, reverse.getDateAcct(), 'R'); + // + setProcessed(true); + setDocAction(DOCACTION_None); + return reverse; + } // reverseAccrualIt + + /** + * Re-activate + * @return true if success + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + return false; + } // reActivateIt + + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Total Lines = 123.00 (#1) + sb.append(": ") + .append(Msg.translate(getCtx(),"TotalDr")).append("=").append(getTotalDr()) + .append(" ") + .append(Msg.translate(getCtx(),"TotalCR")).append("=").append(getTotalCr()) + .append(" (#").append(getLines(false).length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MJournal["); + sb.append(get_ID()).append(",").append(getDescription()) + .append(",DR=").append(getTotalDr()) + .append(",CR=").append(getTotalCr()) + .append ("]"); + return sb.toString (); + } // toString + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + return dt.getName() + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID()); + // if (re == null) + return null; + // return re.getPDF(file); + } // createPDF + + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID (Created) + */ + public int getDoc_User_ID() + { + return getCreatedBy(); + } // getDoc_User_ID + + /** + * Get Document Approval Amount + * @return DR amount + */ + public BigDecimal getApprovalAmt() + { + return getTotalDr(); + } // getApprovalAmt + +} // MJournal diff --git a/base/src/org/compiere/model/MJournalBatch.java b/base/src/org/compiere/model/MJournalBatch.java new file mode 100644 index 0000000000..9c1d08b2ad --- /dev/null +++ b/base/src/org/compiere/model/MJournalBatch.java @@ -0,0 +1,847 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.*; +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.process.*; +import org.compiere.util.*; + +/** + * Journal Batch Model + * + * @author Jorg Janke + * @author victor.perez@e-evolution.com, e-Evolution + *
  • FR [ 1948157 ] Is necessary the reference for document reverse + * @see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962 + * @version $Id: MJournalBatch.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ + */ +public class MJournalBatch extends X_GL_JournalBatch implements DocAction +{ + /** + * Create new Journal Batch by copying + * @param ctx context + * @param GL_JournalBatch_ID journal batch + * @param dateDoc date of the document date + * @param trxName transaction + * @return Journal Batch + */ + public static MJournalBatch copyFrom (Properties ctx, int GL_JournalBatch_ID, + Timestamp dateDoc, String trxName) + { + MJournalBatch from = new MJournalBatch (ctx, GL_JournalBatch_ID, trxName); + if (from.getGL_JournalBatch_ID() == 0) + throw new IllegalArgumentException ("From Journal Batch not found GL_JournalBatch_ID=" + GL_JournalBatch_ID); + // + MJournalBatch to = new MJournalBatch (ctx, 0, trxName); + PO.copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org_ID()); + to.set_ValueNoCheck ("DocumentNo", null); + to.set_ValueNoCheck ("C_Period_ID", null); + to.setDateAcct(dateDoc); + to.setDateDoc(dateDoc); + to.setDocStatus(DOCSTATUS_Drafted); + to.setDocAction(DOCACTION_Complete); + to.setIsApproved(false); + to.setProcessed (false); + // + if (!to.save()) + throw new IllegalStateException("Could not create Journal Batch"); + + if (to.copyDetailsFrom(from) == 0) + throw new IllegalStateException("Could not create Journal Batch Details"); + + return to; + } // copyFrom + + + /************************************************************************** + * Standard Construvtore + * @param ctx context + * @param GL_JournalBatch_ID id if 0 - create actual batch + * @param trxName transaction + */ + public MJournalBatch (Properties ctx, int GL_JournalBatch_ID, String trxName) + { + super (ctx, GL_JournalBatch_ID, trxName); + if (GL_JournalBatch_ID == 0) + { + // setGL_JournalBatch_ID (0); PK + // setDescription (null); + // setDocumentNo (null); + // setC_DocType_ID (0); + setPostingType (POSTINGTYPE_Actual); + setDocAction (DOCACTION_Complete); + setDocStatus (DOCSTATUS_Drafted); + setTotalCr (Env.ZERO); + setTotalDr (Env.ZERO); + setProcessed (false); + setProcessing (false); + setIsApproved(false); + } + } // MJournalBatch + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MJournalBatch (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MJournalBatch + + /** + * Copy Constructor. + * Dos not copy: Dates/Period + * @param original original + */ + public MJournalBatch (MJournalBatch original) + { + this (original.getCtx(), 0, original.get_TrxName()); + setClientOrg(original); + setGL_JournalBatch_ID(original.getGL_JournalBatch_ID()); + // + // setC_AcctSchema_ID(original.getC_AcctSchema_ID()); + // setGL_Budget_ID(original.getGL_Budget_ID()); + setGL_Category_ID(original.getGL_Category_ID()); + setPostingType(original.getPostingType()); + setDescription(original.getDescription()); + setC_DocType_ID(original.getC_DocType_ID()); + setControlAmt(original.getControlAmt()); + // + setC_Currency_ID(original.getC_Currency_ID()); + // setC_ConversionType_ID(original.getC_ConversionType_ID()); + // setCurrencyRate(original.getCurrencyRate()); + + // setDateDoc(original.getDateDoc()); + // setDateAcct(original.getDateAcct()); + // setC_Period_ID(original.getC_Period_ID()); + } // MJournal + + + + /** + * Overwrite Client/Org if required + * @param AD_Client_ID client + * @param AD_Org_ID org + */ + public void setClientOrg (int AD_Client_ID, int AD_Org_ID) + { + super.setClientOrg(AD_Client_ID, AD_Org_ID); + } // setClientOrg + + /** + * Set Accounting Date. + * Set also Period if not set earlier + * @param DateAcct date + */ + public void setDateAcct (Timestamp DateAcct) + { + super.setDateAcct(DateAcct); + if (DateAcct == null) + return; + if (getC_Period_ID() != 0) + return; + int C_Period_ID = MPeriod.getC_Period_ID(getCtx(), DateAcct); + if (C_Period_ID == 0) + log.warning("Period not found"); + else + setC_Period_ID(C_Period_ID); + } // setDateAcct + + /** + * Get Journal Lines + * @param requery requery + * @return Array of lines + */ + public MJournal[] getJournals (boolean requery) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM GL_Journal WHERE GL_JournalBatch_ID=? ORDER BY DocumentNo"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getGL_JournalBatch_ID()); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new MJournal (getCtx(), rs, get_TrxName())); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (SQLException ex) + { + log.log(Level.SEVERE, sql, ex); + } + try + { + if (pstmt != null) + pstmt.close(); + } + catch (SQLException ex1) + { + } + pstmt = null; + // + MJournal[] retValue = new MJournal[list.size()]; + list.toArray(retValue); + return retValue; + } // getJournals + + /** + * Copy Journal/Lines from other Journal Batch + * @param jb Journal Batch + * @return number of journals + lines copied + */ + public int copyDetailsFrom (MJournalBatch jb) + { + if (isProcessed() || jb == null) + return 0; + int count = 0; + int lineCount = 0; + MJournal[] fromJournals = jb.getJournals(false); + for (int i = 0; i < fromJournals.length; i++) + { + MJournal toJournal = new MJournal (getCtx(), 0, jb.get_TrxName()); + PO.copyValues(fromJournals[i], toJournal, getAD_Client_ID(), getAD_Org_ID()); + toJournal.setGL_JournalBatch_ID(getGL_JournalBatch_ID()); + toJournal.set_ValueNoCheck ("DocumentNo", null); // create new + toJournal.set_ValueNoCheck ("C_Period_ID", null); + toJournal.setDateDoc(getDateDoc()); // dates from this Batch + toJournal.setDateAcct(getDateAcct()); + toJournal.setDocStatus(MJournal.DOCSTATUS_Drafted); + toJournal.setDocAction(MJournal.DOCACTION_Complete); + toJournal.setTotalCr(Env.ZERO); + toJournal.setTotalDr(Env.ZERO); + toJournal.setIsApproved(false); + toJournal.setIsPrinted(false); + toJournal.setPosted(false); + toJournal.setProcessed(false); + if (toJournal.save()) + { + count++; + lineCount += toJournal.copyLinesFrom(fromJournals[i], getDateAcct(), 'x'); + } + } + if (fromJournals.length != count) + log.log(Level.SEVERE, "Line difference - Journals=" + fromJournals.length + " <> Saved=" + count); + + return count + lineCount; + } // copyLinesFrom + + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // process + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info("unlockIt - " + toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info("invalidateIt - " + toString()); + return true; + } // invalidateIt + + /** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + + // Add up Amounts & prepare them + MJournal[] journals = getJournals(false); + if (journals.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + + BigDecimal TotalDr = Env.ZERO; + BigDecimal TotalCr = Env.ZERO; + for (int i = 0; i < journals.length; i++) + { + MJournal journal = journals[i]; + if (!journal.isActive()) + continue; + // Prepare if not closed + if (DOCSTATUS_Closed.equals(journal.getDocStatus()) + || DOCSTATUS_Voided.equals(journal.getDocStatus()) + || DOCSTATUS_Reversed.equals(journal.getDocStatus()) + || DOCSTATUS_Completed.equals(journal.getDocStatus())) + ; + else + { + String status = journal.prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + { + journal.setDocStatus(status); + journal.save(); + m_processMsg = journal.getProcessMsg(); + return status; + } + journal.setDocStatus(DOCSTATUS_InProgress); + journal.save(); + } + // + TotalDr = TotalDr.add(journal.getTotalDr()); + TotalCr = TotalCr.add(journal.getTotalCr()); + } + setTotalDr(TotalDr); + setTotalCr(TotalCr); + + // Control Amount + if (Env.ZERO.compareTo(getControlAmt()) != 0 + && getControlAmt().compareTo(getTotalDr()) != 0) + { + m_processMsg = "@ControlAmtError@"; + return DocAction.STATUS_Invalid; + } + +// Bug 1353695 Currency Rate and COnbversion Type should get copied from journal to lines + for (int i = 0; i < journals.length; i++) + { + MJournal journal = journals[i]; + MJournalLine[] lines = journal.getLines(true); + if (journal.getCurrencyRate() != null && journal.getCurrencyRate().compareTo(Env.ZERO) != 0) + { + for (int j = 0; j < lines.length; j++) + { + MJournalLine line = lines[j]; + line.setCurrencyRate(journal.getCurrencyRate()); + line.save(); + } + } + if (journal.getC_ConversionType_ID() > 0) + { + for (int j = 0; j < lines.length; j++) + { + MJournalLine line = lines[j]; + line.setC_ConversionType_ID(journal.getC_ConversionType_ID()); + line.save(); + } + } + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Add up Amounts + m_justPrepared = true; + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info("approveIt - " + toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info("rejectIt - " + toString()); + setIsApproved(false); + return true; + } // rejectIt + + /** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + log.info("completeIt - " + toString()); + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Implicit Approval + approveIt(); + + // Add up Amounts & complete them + MJournal[] journals = getJournals(true); + BigDecimal TotalDr = Env.ZERO; + BigDecimal TotalCr = Env.ZERO; + for (int i = 0; i < journals.length; i++) + { + MJournal journal = journals[i]; + if (!journal.isActive()) + { + journal.setProcessed(true); + journal.setDocStatus(DOCSTATUS_Voided); + journal.setDocAction(DOCACTION_None); + journal.save(); + continue; + } + // Complete if not closed + if (DOCSTATUS_Closed.equals(journal.getDocStatus()) + || DOCSTATUS_Voided.equals(journal.getDocStatus()) + || DOCSTATUS_Reversed.equals(journal.getDocStatus()) + || DOCSTATUS_Completed.equals(journal.getDocStatus())) + ; + else + { + String status = journal.completeIt(); + if (!DocAction.STATUS_Completed.equals(status)) + { + journal.setDocStatus(status); + journal.save(); + m_processMsg = journal.getProcessMsg(); + return status; + } + journal.setDocStatus(DOCSTATUS_Completed); + journal.save(); + } + // + TotalDr = TotalDr.add(journal.getTotalDr()); + TotalCr = TotalCr.add(journal.getTotalCr()); + } + setTotalDr(TotalDr); + setTotalCr(TotalCr); + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + + // + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Set the definite document number after completed + */ + private void setDefiniteDocumentNo() { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (dt.isOverwriteDateOnComplete()) { + setDateDoc(new Timestamp (System.currentTimeMillis())); + } + if (dt.isOverwriteSeqOnComplete()) { + String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); + if (value != null) + setDocumentNo(value); + } + } + + /** + * Void Document. + * @return false + */ + public boolean voidIt() + { + log.info("voidIt - " + toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + + return false; + } // voidIt + + /** + * Close Document. + * @return true if success + */ + public boolean closeIt() + { + log.info("closeIt - " + toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + + MJournal[] journals = getJournals(true); + for (int i = 0; i < journals.length; i++) + { + MJournal journal = journals[i]; + if (!journal.isActive() && !journal.isProcessed()) + { + journal.setProcessed(true); + journal.setDocStatus(DOCSTATUS_Voided); + journal.setDocAction(DOCACTION_None); + journal.save(); + continue; + } + if (DOCSTATUS_Drafted.equals(journal.getDocStatus()) + || DOCSTATUS_InProgress.equals(journal.getDocStatus()) + || DOCSTATUS_Invalid.equals(journal.getDocStatus())) + { + m_processMsg = "Journal not Completed: " + journal.getSummary(); + return false; + } + + // Close if not closed + if (DOCSTATUS_Closed.equals(journal.getDocStatus()) + || DOCSTATUS_Voided.equals(journal.getDocStatus()) + || DOCSTATUS_Reversed.equals(journal.getDocStatus())) + ; + else + { + if (!journal.closeIt()) + { + m_processMsg = "Cannot close: " + journal.getSummary(); + return false; + } + journal.save(); + } + } + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + return true; + } // closeIt + + /** + * Reverse Correction. + * As if nothing happened - same date + * @return true if success + */ + public boolean reverseCorrectIt() + { + log.info("reverseCorrectIt - " + toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + MJournal[] journals = getJournals(true); + // check prerequisites + for (int i = 0; i < journals.length; i++) + { + MJournal journal = journals[i]; + if (!journal.isActive()) + continue; + // All need to be closed/Completed + if (DOCSTATUS_Completed.equals(journal.getDocStatus())) + ; + else + { + m_processMsg = "All Journals need to be Completed: " + journal.getSummary(); + return false; + } + } + + // Reverse it + MJournalBatch reverse = new MJournalBatch (this); + reverse.setDateDoc(getDateDoc()); + reverse.setC_Period_ID(getC_Period_ID()); + reverse.setDateAcct(getDateAcct()); + // Reverse indicator + String description = reverse.getDescription(); + if (description == null) + description = "** " + getDocumentNo() + " **"; + else + description += " ** " + getDocumentNo() + " **"; + reverse.setDescription(description); + //[ 1948157 ] + reverse.setReversal_ID(getGL_JournalBatch_ID()); + reverse.save(); + // + + // Reverse Journals + for (int i = 0; i < journals.length; i++) + { + MJournal journal = journals[i]; + if (!journal.isActive()) + continue; + if (journal.reverseCorrectIt(reverse.getGL_JournalBatch_ID()) == null) + { + m_processMsg = "Could not reverse " + journal; + return false; + } + journal.save(); + } + + //[ 1948157 ] + setReversal_ID(reverse.getGL_JournalBatch_ID()); + save(); + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + + return true; + } // reverseCorrectionIt + + /** + * Reverse Accrual. + * Flip Dr/Cr - Use Today's date + * @return true if success + */ + public boolean reverseAccrualIt() + { + log.info("reverseAccrualIt - " + toString()); + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + MJournal[] journals = getJournals(true); + // check prerequisites + for (int i = 0; i < journals.length; i++) + { + MJournal journal = journals[i]; + if (!journal.isActive()) + continue; + // All need to be closed/Completed + if (DOCSTATUS_Completed.equals(journal.getDocStatus())) + ; + else + { + m_processMsg = "All Journals need to be Completed: " + journal.getSummary(); + return false; + } + } + // Reverse it + MJournalBatch reverse = new MJournalBatch (this); + reverse.setC_Period_ID(0); + reverse.setDateDoc(new Timestamp(System.currentTimeMillis())); + reverse.setDateAcct(reverse.getDateDoc()); + // Reverse indicator + String description = reverse.getDescription(); + if (description == null) + description = "** " + getDocumentNo() + " **"; + else + description += " ** " + getDocumentNo() + " **"; + reverse.setDescription(description); + reverse.save(); + + // Reverse Journals + for (int i = 0; i < journals.length; i++) + { + MJournal journal = journals[i]; + if (!journal.isActive()) + continue; + if (journal.reverseAccrualIt(reverse.getGL_JournalBatch_ID()) == null) + { + m_processMsg = "Could not reverse " + journal; + return false; + } + journal.save(); + } + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return true; + } // reverseAccrualIt + + /** + * Re-activate - same as reverse correct + * @return true if success + */ + public boolean reActivateIt() + { + log.info("reActivateIt - " + toString()); + + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + // setProcessed(false); + if (! reverseCorrectIt()) + return false; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + return true; + } // reActivateIt + + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Total Lines = 123.00 (#1) + sb.append(": ") + .append(Msg.translate(getCtx(),"TotalDr")).append("=").append(getTotalDr()) + .append(" ") + .append(Msg.translate(getCtx(),"TotalCR")).append("=").append(getTotalCr()) + .append(" (#").append(getJournals(false).length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MJournalBatch["); + sb.append(get_ID()).append(",").append(getDescription()) + .append(",DR=").append(getTotalDr()) + .append(",CR=").append(getTotalCr()) + .append ("]"); + return sb.toString (); + } // toString + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + return dt.getName() + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID()); + // if (re == null) + return null; + // return re.getPDF(file); + } // createPDF + + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID (Created By) + */ + public int getDoc_User_ID() + { + return getCreatedBy(); + } // getDoc_User_ID + + /** + * Get Document Approval Amount + * @return DR amount + */ + public BigDecimal getApprovalAmt() + { + return getTotalDr(); + } // getApprovalAmt + +} // MJournalBatch diff --git a/base/src/org/compiere/model/MLocator.java b/base/src/org/compiere/model/MLocator.java new file mode 100644 index 0000000000..421b003f84 --- /dev/null +++ b/base/src/org/compiere/model/MLocator.java @@ -0,0 +1,343 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.util.*; + +/** + * Warehouse Locator Object + * + * @author Jorg Janke + * @author victor.perez@e-evolution.com + * @see [ 1966333 ] New Method to get the Default Locator based in Warehouse http://sourceforge.net/tracker/index.php?func=detail&aid=1966333&group_id=176962&atid=879335 + * @version $Id: MLocator.java,v 1.3 2006/07/30 00:58:37 jjanke Exp $ + */ +public class MLocator extends X_M_Locator +{ + /** + * Get oldest Default Locator of warehouse with locator + * @param ctx context + * @param M_Locator_ID locator + * @return locator or null + */ + public static MLocator getDefault (Properties ctx, int M_Locator_ID) + { + String trxName = null; + MLocator retValue = null; + String sql = "SELECT * FROM M_Locator l " + + "WHERE IsActive = 'Y' AND IsDefault='Y'" + + " AND EXISTS (SELECT * FROM M_Locator lx " + + "WHERE l.M_Warehouse_ID=lx.M_Warehouse_ID AND lx.M_Locator_ID=?) " + + "ORDER BY Created"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, M_Locator_ID); + rs = pstmt.executeQuery (); + while (rs.next ()) + retValue = new MLocator (ctx, rs, trxName); + } + catch (Exception e) + { + s_log.log (Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + + return retValue; + } // getDefault + + /** + * FR [ 1966333 ] + * Get oldest Default Locator of warehouse with locator + * @param ctx context + * @param M_Locator_ID locator + * @return locator or null + */ + public static MLocator getDefault (MWarehouse warehouse) + { + String trxName = null; + MLocator retValue = null; + String sql = "SELECT * FROM M_Locator l " + + "WHERE IsActive = 'Y' AND IsDefault='Y' AND l.M_Warehouse_ID=? " + + "ORDER BY PriorityNo"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, warehouse.getM_Warehouse_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + retValue = new MLocator (warehouse.getCtx(), rs, trxName); + } + catch (Exception e) + { + s_log.log (Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + + return retValue; + } // getDefault + + + /** + * Get the Locator with the combination or create new one + * @param ctx Context + * @param M_Warehouse_ID warehouse + * @param Value value + * @param X x + * @param Y y + * @param Z z + * @return locator + */ + public static MLocator get (Properties ctx, int M_Warehouse_ID, String Value, + String X, String Y, String Z) + { + MLocator retValue = null; + String sql = "SELECT * FROM M_Locator WHERE IsActive = 'Y' AND M_Warehouse_ID=? AND X=? AND Y=? AND Z=?"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, M_Warehouse_ID); + pstmt.setString(2, X); + pstmt.setString(3, Y); + pstmt.setString(4, Z); + rs = pstmt.executeQuery(); + if (rs.next()) + retValue = new MLocator (ctx, rs, null); + } + catch (SQLException ex) + { + s_log.log(Level.SEVERE, "get", ex); + } + finally { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + // + if (retValue == null) + { + MWarehouse wh = MWarehouse.get (ctx, M_Warehouse_ID); + retValue = new MLocator (wh, Value); + retValue.setXYZ(X, Y, Z); + retValue.save(); + } + return retValue; + } // get + + /** + * Get Locator from Cache + * @param ctx context + * @param M_Locator_ID id + * @return MLocator + */ + public static MLocator get (Properties ctx, int M_Locator_ID) + { + if (s_cache == null) + s_cache = new CCache("M_Locator", 20); + Integer key = new Integer (M_Locator_ID); + MLocator retValue = (MLocator) s_cache.get (key); + if (retValue != null) + return retValue; + retValue = new MLocator (ctx, M_Locator_ID, null); + if (retValue.get_ID () != 0) + s_cache.put (key, retValue); + return retValue; + } // get + + /** Cache */ + private static CCache s_cache; + + /** Logger */ + private static CLogger s_log = CLogger.getCLogger (MLocator.class); + + + /************************************************************************** + * Standard Locator Constructor + * @param ctx Context + * @param M_Locator_ID id + * @param trxName transaction + */ + public MLocator (Properties ctx, int M_Locator_ID, String trxName) + { + super (ctx, M_Locator_ID, trxName); + if (M_Locator_ID == 0) + { + // setM_Locator_ID (0); // PK + // setM_Warehouse_ID (0); // Parent + setIsDefault (false); + setPriorityNo (50); + // setValue (null); + // setX (null); + // setY (null); + // setZ (null); + } + } // MLocator + + /** + * New Locator Constructor with XYZ=000 + * @param warehouse parent + * @param Value value + */ + public MLocator (MWarehouse warehouse, String Value) + { + this (warehouse.getCtx(), 0, warehouse.get_TrxName()); + setClientOrg(warehouse); + setM_Warehouse_ID (warehouse.getM_Warehouse_ID()); // Parent + setValue (Value); + setXYZ("0","0","0"); + } // MLocator + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MLocator (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MLocator + + /** + * Get String Representation + * @return Value + */ + public String toString() + { + return getValue(); + } // getValue + + /** + * Set Location + * @param X x + * @param Y y + * @param Z z + */ + public void setXYZ (String X, String Y, String Z) + { + setX (X); + setY (Y); + setZ (Z); + } // setXYZ + + + /** + * Get Warehouse Name + * @return name + */ + public String getWarehouseName() + { + MWarehouse wh = MWarehouse.get(getCtx(), getM_Warehouse_ID()); + if (wh.get_ID() == 0) + return "<" + getM_Warehouse_ID() + ">"; + return wh.getName(); + } // getWarehouseName + + /** + * Can Locator Store Product + * @param M_Product_ID id + * @return true if can be stored + */ + public boolean isCanStoreProduct (int M_Product_ID) + { + // BF [ 1759245 ] Locator field cleared in Physical Inventory + // CarlosRuiz - globalqss comments: + // The algorithm to search if a product can be stored is wrong, it looks for: + // * M_Storage to see if the product is already in the locator + // * If the product has this locator defined as default + // This implies that every time you create a new product you must create initial inventory zero for all locators where the product can be stored. + // A good enhancement could be a new table to indicate when a locator is exclusive for some products, but I consider current approach not working. + return true; + + /* + // Default Locator + if (M_Product_ID == 0 || isDefault()) + return true; + + int count = 0; + PreparedStatement pstmt = null; + // Already Stored + String sql = "SELECT COUNT(*) FROM M_Storage s WHERE s.M_Locator_ID=? AND s.M_Product_ID=?"; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setInt (1, getM_Locator_ID()); + pstmt.setInt (2, M_Product_ID); + ResultSet rs = pstmt.executeQuery (); + if (rs.next ()) + count = rs.getInt(1); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log (Level.SEVERE, sql, e); + } + // Default Product Locator + if (count == 0) + { + sql = "SELECT COUNT(*) FROM M_Product s WHERE s.M_Locator_ID=? AND s.M_Product_ID=?"; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setInt (1, getM_Locator_ID()); + pstmt.setInt (2, M_Product_ID); + ResultSet rs = pstmt.executeQuery (); + if (rs.next ()) + count = rs.getInt(1); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log (Level.SEVERE, sql, e); + } + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + return count != 0; + */ + } // isCanStoreProduct + +} // MLocator diff --git a/base/src/org/compiere/model/MMenu.java b/base/src/org/compiere/model/MMenu.java new file mode 100644 index 0000000000..5182996f01 --- /dev/null +++ b/base/src/org/compiere/model/MMenu.java @@ -0,0 +1,203 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.sql.*; +import java.util.*; +import java.util.logging.*; + +import org.compiere.util.*; + +/** + * Menu Model + * + * @author Jorg Janke + * @author victor.perez@e-evolution.com + * @see FR [ 1966326 ] Is necessary create method to get ID menu use menu Name http://sourceforge.net/tracker/index.php?func=detail&aid=1966326&group_id=176962&atid=879335 + * @version $Id: MMenu.java,v 1.3 2006/07/30 00:58:18 jjanke Exp $ + */ +public class MMenu extends X_AD_Menu +{ + + /** + * Get menues with where clause + * @param ctx context + * @param whereClause where clause w/o the actual WHERE + * @return MMenu + * @deprecated + */ + public static MMenu[] get (Properties ctx, String whereClause) + { + return get(ctx, whereClause, null); + } + + /** + * Get menues with where clause + * @param ctx context + * @param whereClause where clause w/o the actual WHERE + * @param trxName transaction + * @return MMenu + */ + public static MMenu[] get (Properties ctx, String whereClause, String trxName) + { + String sql = "SELECT * FROM AD_Menu"; + if (whereClause != null && whereClause.length() > 0) + sql += " WHERE " + whereClause; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new MMenu (ctx, rs, trxName)); + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + finally { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + MMenu[] retValue = new MMenu[list.size()]; + list.toArray (retValue); + return retValue; + } // get + + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MMenu.class); + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param AD_Menu_ID id + * @param trxName transaction + */ + public MMenu (Properties ctx, int AD_Menu_ID, String trxName) + { + super (ctx, AD_Menu_ID, trxName); + if (AD_Menu_ID == 0) + { + setEntityType (ENTITYTYPE_UserMaintained); // U + setIsReadOnly (false); // N + setIsSOTrx (false); + setIsSummary (false); + // setName (null); + } + } // MMenu + + /** + * Load Contrusctor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MMenu (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MMenu + + /** + * Before Save + * @param newRecord new + * @return true + */ + protected boolean beforeSave (boolean newRecord) + { + // Reset info + if (isSummary() && getAction() != null) + setAction(null); + String action = getAction(); + if (action == null) + action = ""; + // Clean up references + if (getAD_Window_ID() != 0 && !action.equals(ACTION_Window)) + setAD_Window_ID(0); + if (getAD_Form_ID() != 0 && !action.equals(ACTION_Form)) + setAD_Form_ID(0); + if (getAD_Workflow_ID() != 0 && !action.equals(ACTION_WorkFlow)) + setAD_Workflow_ID(0); + if (getAD_Workbench_ID() != 0 && !action.equals(ACTION_Workbench)) + setAD_Workbench_ID(0); + if (getAD_Task_ID() != 0 && !action.equals(ACTION_Task)) + setAD_Task_ID(0); + if (getAD_Process_ID() != 0 + && !(action.equals(ACTION_Process) || action.equals(ACTION_Report))) + setAD_Process_ID(0); + return true; + } // beforeSave + + + /** + * After Save + * @param newRecord new + * @param success success + * @return success + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + if (newRecord) + insert_Tree(MTree_Base.TREETYPE_Menu); + return success; + } // afterSave + + /** + * After Delete + * @param success + * @return deleted + */ + protected boolean afterDelete (boolean success) + { + if (success) + delete_Tree(MTree_Base.TREETYPE_Menu); + return success; + } // afterDelete + + /** + * FR [ 1966326 ] + * get Menu ID + * @param String Menu Name + * @return int retValue + */ + public static int getMenu_ID(String menuName) { + int retValue = 0; + String SQL = "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = ?"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(SQL, null); + pstmt.setString(1, menuName); + rs = pstmt.executeQuery(); + if (rs.next()) + retValue = rs.getInt(1); + } + catch (SQLException e) + { + s_log.log(Level.SEVERE, SQL, e); + retValue = -1; + } + finally + { + DB.close(rs, pstmt); + } + return retValue; + } + +} // MMenu diff --git a/base/src/org/compiere/model/MMovement.java b/base/src/org/compiere/model/MMovement.java new file mode 100644 index 0000000000..7bbdd21a46 --- /dev/null +++ b/base/src/org/compiere/model/MMovement.java @@ -0,0 +1,1084 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.*; +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.process.*; +import org.compiere.util.*; + +import org.eevolution.model.*; +/** + * Inventory Movement Model + * + * @author Jorg Janke + * @author victor.perez@e-evolution.com, e-Evolution + *
  • FR [ 1948157 ] Is necessary the reference for document reverse + * @see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962 + * @version $Id: MMovement.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ + */ +public class MMovement extends X_M_Movement implements DocAction +{ + /** + * Standard Constructor + * @param ctx context + * @param M_Movement_ID id + * @param trxName transaction + */ + public MMovement (Properties ctx, int M_Movement_ID, String trxName) + { + super (ctx, M_Movement_ID, trxName); + if (M_Movement_ID == 0) + { + // setC_DocType_ID (0); + setDocAction (DOCACTION_Complete); // CO + setDocStatus (DOCSTATUS_Drafted); // DR + setIsApproved (false); + setIsInTransit (false); + setMovementDate (new Timestamp(System.currentTimeMillis())); // @#Date@ + setPosted (false); + super.setProcessed (false); + } + } // MMovement + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MMovement (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MMovement + + /** Lines */ + private MMovementLine[] m_lines = null; + /** Confirmations */ + private MMovementConfirm[] m_confirms = null; + + /** + * Get Lines + * @param requery requery + * @return array of lines + */ + public MMovementLine[] getLines (boolean requery) + { + if (m_lines != null && !requery) { + set_TrxName(m_lines, get_TrxName()); + return m_lines; + } + // + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_MovementLine WHERE M_Movement_ID=? ORDER BY Line"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getM_Movement_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + { + list.add (new MMovementLine (getCtx(), rs, get_TrxName())); + } + rs.close (); + pstmt.close (); + pstmt = null; + } catch (Exception e) + { + log.log(Level.SEVERE, "getLines", e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } catch (Exception e) + { + pstmt = null; + } + + m_lines = new MMovementLine[list.size ()]; + list.toArray (m_lines); + return m_lines; + } // getLines + + /** + * Get Confirmations + * @param requery requery + * @return array of Confirmations + */ + public MMovementConfirm[] getConfirmations(boolean requery) + { + if (m_confirms != null && !requery) + return m_confirms; + + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_MovementConfirm WHERE M_Movement_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getM_Movement_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add(new MMovementConfirm(getCtx(), rs, get_TrxName())); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, "getConfirmations", e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + m_confirms = new MMovementConfirm[list.size ()]; + list.toArray (m_confirms); + return m_confirms; + } // getConfirmations + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + return dt.getName() + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID()); + // if (re == null) + return null; + // return re.getPDF(file); + } // createPDF + + + /** + * Before Save + * @param newRecord new + * @return true + */ + protected boolean beforeSave (boolean newRecord) + { + if (getC_DocType_ID() == 0) + { + MDocType types[] = MDocType.getOfDocBaseType(getCtx(), MDocType.DOCBASETYPE_MaterialMovement); + if (types.length > 0) // get first + setC_DocType_ID(types[0].getC_DocType_ID()); + else + { + log.saveError("Error", Msg.parseTranslation(getCtx(), "@NotFound@ @C_DocType_ID@")); + return false; + } + } + return true; + } // beforeSave + + /** + * Set Processed. + * Propergate to Lines/Taxes + * @param processed processed + */ + public void setProcessed (boolean processed) + { + super.setProcessed (processed); + if (get_ID() == 0) + return; + String sql = "UPDATE M_MovementLine SET Processed='" + + (processed ? "Y" : "N") + + "' WHERE M_Movement_ID=" + getM_Movement_ID(); + int noLine = DB.executeUpdate(sql, get_TrxName()); + m_lines = null; + log.fine("Processed=" + processed + " - Lines=" + noLine); + } // setProcessed + + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // processIt + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info(toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info(toString()); + setDocAction(DOCACTION_Prepare); + return true; + } // invalidateIt + + /** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getMovementDate(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + MMovementLine[] lines = getLines(false); + if (lines.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + // Add up Amounts + + + //checkMaterialPolicy(); + + // Confirmation + if (dt.isInTransit()) + createConfirmation(); + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + m_justPrepared = true; + if (!DOCACTION_Complete.equals(getDocAction())) + setDocAction(DOCACTION_Complete); + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Create Movement Confirmation + */ + private void createConfirmation() + { + MMovementConfirm[] confirmations = getConfirmations(false); + if (confirmations.length > 0) + return; + + // Create Confirmation + MMovementConfirm.create (this, false); + } // createConfirmation + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info(toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info(toString()); + setIsApproved(false); + return true; + } // rejectIt + + /** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Outstanding (not processed) Incoming Confirmations ? + MMovementConfirm[] confirmations = getConfirmations(true); + for (int i = 0; i < confirmations.length; i++) + { + MMovementConfirm confirm = confirmations[i]; + if (!confirm.isProcessed()) + { + m_processMsg = "Open: @M_MovementConfirm_ID@ - " + + confirm.getDocumentNo(); + return DocAction.STATUS_InProgress; + } + } + + // Implicit Approval + if (!isApproved()) + approveIt(); + log.info(toString()); + + // + MMovementLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MMovementLine line = lines[i]; + MTransaction trxFrom = null; + + //Stock Movement - Counterpart MOrder.reserveStock + MProduct product = line.getProduct(); + if (product != null + && product.isStocked() ) + { + //Ignore the Material Policy when is Reverse Correction + if(!isReversal()) + checkMaterialPolicy(line); + + if (line.getM_AttributeSetInstance_ID() == 0) + { + MMovementLineMA mas[] = MMovementLineMA.get(getCtx(), + line.getM_MovementLine_ID(), get_TrxName()); + for (int j = 0; j < mas.length; j++) + { + MMovementLineMA ma = mas[j]; + // + /*MStorage storageFrom = MStorage.get(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), get_TrxName()); + if (storageFrom == null) + storageFrom = MStorage.getCreate(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), get_TrxName()); + //*/ + MLocator locator = new MLocator (getCtx(), line.getM_Locator_ID(), get_TrxName()); + //Update Storage + if (!MStorage.add(getCtx(),locator.getM_Warehouse_ID(), + line.getM_Locator_ID(), + line.getM_Product_ID(), + ma.getM_AttributeSetInstance_ID(), 0, + ma.getMovementQty().negate(), Env.ZERO , Env.ZERO , get_TrxName())) + { + m_processMsg = "Cannot correct Inventory (MA)"; + return DocAction.STATUS_Invalid; + } + + /*MStorage storageTo = MStorage.get(getCtx(), line.getM_LocatorTo_ID(), + line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), get_TrxName()); + if (storageTo == null) + storageTo = MStorage.getCreate(getCtx(), line.getM_LocatorTo_ID(), + line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), get_TrxName()); + //*/ + + MLocator locatorTo = new MLocator (getCtx(), line.getM_LocatorTo_ID(), get_TrxName()); + //Update Storage + if (!MStorage.add(getCtx(),locator.getM_Warehouse_ID(), + line.getM_LocatorTo_ID(), + line.getM_Product_ID(), + ma.getM_AttributeSetInstance_ID(), 0, + ma.getMovementQty(), Env.ZERO , Env.ZERO , get_TrxName())) + { + m_processMsg = "Cannot correct Inventory (MA)"; + return DocAction.STATUS_Invalid; + } + + /*storageFrom.setQtyOnHand(storageFrom.getQtyOnHand().subtract(ma.getMovementQty())); + if (!storageFrom.save(get_TrxName())) + { + m_processMsg = "Storage From not updated (MA)"; + return DocAction.STATUS_Invalid; + } + // + storageTo.setQtyOnHand(storageTo.getQtyOnHand().add(ma.getMovementQty())); + if (!storageTo.save(get_TrxName())) + { + m_processMsg = "Storage To not updated (MA)"; + return DocAction.STATUS_Invalid; + }*/ + + // + trxFrom = new MTransaction (getCtx(), line.getAD_Org_ID(), + MTransaction.MOVEMENTTYPE_MovementFrom, + line.getM_Locator_ID(), line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), + ma.getMovementQty().negate(), getMovementDate(), get_TrxName()); + trxFrom.setM_MovementLine_ID(line.getM_MovementLine_ID()); + if (!trxFrom.save()) + { + m_processMsg = "Transaction From not inserted (MA)"; + return DocAction.STATUS_Invalid; + } + // + MTransaction trxTo = new MTransaction (getCtx(), line.getAD_Org_ID(), + MTransaction.MOVEMENTTYPE_MovementTo, + line.getM_LocatorTo_ID(), line.getM_Product_ID(), ma.getM_AttributeSetInstance_ID(), + ma.getMovementQty(), getMovementDate(), get_TrxName()); + trxTo.setM_MovementLine_ID(line.getM_MovementLine_ID()); + if (!trxTo.save()) + { + m_processMsg = "Transaction To not inserted (MA)"; + return DocAction.STATUS_Invalid; + } + } + } + // Fallback - We have ASI + if (trxFrom == null) + { + /*MStorage storageFrom = MStorage.get(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), get_TrxName()); + if (storageFrom == null) + storageFrom = MStorage.getCreate(getCtx(), line.getM_Locator_ID(), + line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), get_TrxName()); + // + MStorage storageTo = MStorage.get(getCtx(), line.getM_LocatorTo_ID(), + line.getM_Product_ID(), line.getM_AttributeSetInstanceTo_ID(), get_TrxName()); + if (storageTo == null) + storageTo = MStorage.getCreate(getCtx(), line.getM_LocatorTo_ID(), + line.getM_Product_ID(), line.getM_AttributeSetInstanceTo_ID(), get_TrxName()); + // + storageFrom.setQtyOnHand(storageFrom.getQtyOnHand().subtract(line.getMovementQty())); + if (!storageFrom.save(get_TrxName())) + { + m_processMsg = "Storage From not updated"; + return DocAction.STATUS_Invalid; + } + // + storageTo.setQtyOnHand(storageTo.getQtyOnHand().add(line.getMovementQty())); + if (!storageTo.save(get_TrxName())) + { + m_processMsg = "Storage To not updated"; + return DocAction.STATUS_Invalid; + }*/ + + MLocator locator = new MLocator (getCtx(), line.getM_Locator_ID(), get_TrxName()); + //Update Storage + if (!MStorage.add(getCtx(),locator.getM_Warehouse_ID(), + line.getM_Locator_ID(), + line.getM_Product_ID(), + line.getM_AttributeSetInstance_ID(), 0, + line.getMovementQty().negate(), Env.ZERO , Env.ZERO , get_TrxName())) + { + m_processMsg = "Cannot correct Inventory (MA)"; + return DocAction.STATUS_Invalid; + } + + MLocator locatorTo = new MLocator (getCtx(), line.getM_LocatorTo_ID(), get_TrxName()); + //Update Storage + if (!MStorage.add(getCtx(),locator.getM_Warehouse_ID(), + line.getM_LocatorTo_ID(), + line.getM_Product_ID(), + line.getM_AttributeSetInstance_ID(), 0, + line.getMovementQty(), Env.ZERO , Env.ZERO , get_TrxName())) + { + m_processMsg = "Cannot correct Inventory (MA)"; + return DocAction.STATUS_Invalid; + } + + // + trxFrom = new MTransaction (getCtx(), line.getAD_Org_ID(), + MTransaction.MOVEMENTTYPE_MovementFrom, + line.getM_Locator_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), + line.getMovementQty().negate(), getMovementDate(), get_TrxName()); + trxFrom.setM_MovementLine_ID(line.getM_MovementLine_ID()); + if (!trxFrom.save()) + { + m_processMsg = "Transaction From not inserted"; + return DocAction.STATUS_Invalid; + } + // + MTransaction trxTo = new MTransaction (getCtx(), line.getAD_Org_ID(), + MTransaction.MOVEMENTTYPE_MovementTo, + line.getM_LocatorTo_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstanceTo_ID(), + line.getMovementQty(), getMovementDate(), get_TrxName()); + trxTo.setM_MovementLine_ID(line.getM_MovementLine_ID()); + if (!trxTo.save()) + { + m_processMsg = "Transaction To not inserted"; + return DocAction.STATUS_Invalid; + } + } // Fallback + } // product stock + } // for all lines + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + + // + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Set the definite document number after completed + */ + private void setDefiniteDocumentNo() { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (dt.isOverwriteDateOnComplete()) { + setMovementDate(new Timestamp (System.currentTimeMillis())); + } + if (dt.isOverwriteSeqOnComplete()) { + String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); + if (value != null) + setDocumentNo(value); + } + } + + /** + * Check Material Policy + * Sets line ASI + */ + private void checkMaterialPolicy(MMovementLine line) + { + int no = MMovementLineMA.deleteMovementMA(getM_Movement_ID(), get_TrxName()); + if (no > 0) + log.config("Delete old #" + no); + //MMovementLine[] lines = getLines(false); + + // Check Lines + //for (int i = 0; i < lines.length; i++) + //{ + // MMovementLine line = lines[i]; + boolean needSave = false; + BigDecimal qtyASI = Env.ZERO ; + + // Attribute Set Instance + if (line.getM_AttributeSetInstance_ID() == 0) + { + MProduct product = MProduct.get(getCtx(), line.getM_Product_ID()); + String MMPolicy = product.getMMPolicy(); + MStorage[] storages = MStorage.getAllWithASI(getCtx(), + line.getM_Product_ID(), line.getM_Locator_ID(), + MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName()); + BigDecimal qtyToDeliver = line.getMovementQty(); + + /*for (int ii = 0; ii < storages.length; ii++) + { + MStorage storage = storages[ii]; + if (ii == 0) + { + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + { + line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID()); + needSave = true; + log.config("Direct - " + line); + qtyToDeliver = Env.ZERO; + } + else + { + log.config("Split - " + line); + MMovementLineMA ma = new MMovementLineMA (line, + storage.getM_AttributeSetInstance_ID(), + storage.getQtyOnHand()); + if (!ma.save()) + ; + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + log.fine("#" + ii + ": " + ma + ", QtyToDeliver=" + qtyToDeliver); + } + } + else // create addl material allocation + { + MMovementLineMA ma = new MMovementLineMA (line, + storage.getM_AttributeSetInstance_ID(), + qtyToDeliver); + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + qtyToDeliver = Env.ZERO; + else + { + ma.setMovementQty(storage.getQtyOnHand()); + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + } + if (!ma.save()) + ; + log.fine("#" + ii + ": " + ma + ", QtyToDeliver=" + qtyToDeliver); + } + if (qtyToDeliver.signum() == 0) + break; + } // for all storages + + // No AttributeSetInstance found for remainder + if (qtyToDeliver.signum() != 0) + { + MMovementLineMA ma = new MMovementLineMA (line, + 0, qtyToDeliver); + if (!ma.save()) + ; + log.fine("##: " + ma); + }*/ + for (MStorage storage: storages) + { + //consume ASI Zero + if (storage.getM_AttributeSetInstance_ID() == 0) + { + qtyASI = qtyASI.add(storage.getQtyOnHand()); + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + continue; + } + + if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0) + { + MMovementLineMA ma = new MMovementLineMA (line, + storage.getM_AttributeSetInstance_ID(), + qtyToDeliver); + if (!ma.save()) + { + throw new IllegalStateException("Error try create ASI Reservation"); + } + qtyToDeliver = Env.ZERO; + log.fine( ma + ", QtyToDeliver=" + qtyToDeliver); + //return; + } + else + { + MMovementLineMA ma = new MMovementLineMA (line, + storage.getM_AttributeSetInstance_ID(), + storage.getQtyOnHand()); + if (!ma.save()) + { + throw new IllegalStateException("Error try create ASI Reservation"); + } + qtyToDeliver = qtyToDeliver.subtract(storage.getQtyOnHand()); + log.fine( ma + ", QtyToDeliver=" + qtyToDeliver); + } + } + + // No AttributeSetInstance found for remainder + if (qtyToDeliver.signum() != 0 || qtyASI.signum() != 0) + { + MMovementLineMA ma = new MMovementLineMA (line, 0 , qtyToDeliver.add(qtyASI)); + + if (!ma.save()) + ; + log.fine("##: " + ma); + } + } // attributeSetInstance + + if (needSave && !line.save()) + log.severe("NOT saved " + line); + //} // for all lines + + } // checkMaterialPolicy + + /** + * Void Document. + * @return true if success + */ + public boolean voidIt() + { + log.info(toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + if (DOCSTATUS_Closed.equals(getDocStatus()) + || DOCSTATUS_Reversed.equals(getDocStatus()) + || DOCSTATUS_Voided.equals(getDocStatus())) + { + m_processMsg = "Document Closed: " + getDocStatus(); + return false; + } + + // Not Processed + if (DOCSTATUS_Drafted.equals(getDocStatus()) + || DOCSTATUS_Invalid.equals(getDocStatus()) + || DOCSTATUS_InProgress.equals(getDocStatus()) + || DOCSTATUS_Approved.equals(getDocStatus()) + || DOCSTATUS_NotApproved.equals(getDocStatus()) ) + { + // Set lines to 0 + MMovementLine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MMovementLine line = lines[i]; + BigDecimal old = line.getMovementQty(); + if (old.compareTo(Env.ZERO) != 0) + { + line.setMovementQty(Env.ZERO); + line.addDescription("Void (" + old + ")"); + line.save(get_TrxName()); + } + } + } + else + { + return reverseCorrectIt(); + } + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // voidIt + + /** + * Close Document. + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + // Close Not delivered Qty + setDocAction(DOCACTION_None); + return true; + } // closeIt + + /** + * Reverse Correction + * @return false + */ + public boolean reverseCorrectIt() + { + log.info(toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (!MPeriod.isOpen(getCtx(), getMovementDate(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return false; + } + + // Deep Copy + MMovement reversal = new MMovement(getCtx(), 0, get_TrxName()); + copyValues(this, reversal, getAD_Client_ID(), getAD_Org_ID()); + reversal.setDocStatus(DOCSTATUS_Drafted); + reversal.setDocAction(DOCACTION_Complete); + reversal.setIsApproved (false); + reversal.setIsInTransit (false); + reversal.setPosted(false); + reversal.setProcessed(false); + reversal.addDescription("{->" + getDocumentNo() + ")"); + //FR [ 1948157 ] + reversal.setReversal_ID(getM_Movement_ID()); + if (!reversal.save()) + { + m_processMsg = "Could not create Movement Reversal"; + return false; + } + reversal.setReversal(true); + // Reverse Line Qty + MMovementLine[] oLines = getLines(true); + for (int i = 0; i < oLines.length; i++) + { + MMovementLine oLine = oLines[i]; + MMovementLine rLine = new MMovementLine(getCtx(), 0, get_TrxName()); + copyValues(oLine, rLine, oLine.getAD_Client_ID(), oLine.getAD_Org_ID()); + rLine.setM_Movement_ID(reversal.getM_Movement_ID()); + // + rLine.setMovementQty(rLine.getMovementQty().negate()); + rLine.setTargetQty(Env.ZERO); + rLine.setScrappedQty(Env.ZERO); + rLine.setConfirmedQty(Env.ZERO); + rLine.setProcessed(false); + if (!rLine.save()) + { + m_processMsg = "Could not create Movement Reversal Line"; + return false; + } + } + // + if (!reversal.processIt(DocAction.ACTION_Complete)) + { + m_processMsg = "Reversal ERROR: " + reversal.getProcessMsg(); + return false; + } + reversal.closeIt(); + reversal.setDocStatus(DOCSTATUS_Reversed); + reversal.setDocAction(DOCACTION_None); + reversal.save(); + m_processMsg = reversal.getDocumentNo(); + + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + + // Update Reversed (this) + addDescription("(" + reversal.getDocumentNo() + "<-)"); + //FR [ 1948157 ] + setReversal_ID(reversal.getM_Movement_ID()); + setProcessed(true); + setDocStatus(DOCSTATUS_Reversed); // may come from void + setDocAction(DOCACTION_None); + + return true; + } // reverseCorrectionIt + + /** + * Reverse Accrual - none + * @return false + */ + public boolean reverseAccrualIt() + { + log.info(toString()); + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return false; + } // reverseAccrualIt + + /** + * Re-activate + * @return false + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + return false; + } // reActivateIt + + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Total Lines = 123.00 (#1) + sb.append(": ") + .append(Msg.translate(getCtx(),"ApprovalAmt")).append("=").append(getApprovalAmt()) + .append(" (#").append(getLines(false).length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID + */ + public int getDoc_User_ID() + { + return getCreatedBy(); + } // getDoc_User_ID + + /** + * Get Document Currency + * @return C_Currency_ID + */ + public int getC_Currency_ID() + { + // MPriceList pl = MPriceList.get(getCtx(), getM_PriceList_ID()); + // return pl.getC_Currency_ID(); + return 0; + } // getC_Currency_ID + + /** + * Order Constructor - create header only + * @param order order + * @param movementDate optional movement date (default today) + * @param C_DocType_ID document type or 0 + */ + public MMovement (MDDOrder order, int C_DocType_ID, Timestamp movementDate) + { + this (order.getCtx(), 0, order.get_TrxName()); + setClientOrg(order); + setC_BPartner_ID (order.getC_BPartner_ID()); + setC_BPartner_Location_ID (order.getC_BPartner_Location_ID()); // shipment address + setAD_User_ID(order.getAD_User_ID()); + // + //setM_Warehouse_ID (order.getM_Warehouse_ID()); + //setIsSOTrx (order.isSOTrx()); + //setMovementType (order.isSOTrx() ? MOVEMENTTYPE_CustomerShipment : MOVEMENTTYPE_VendorReceipts); + if (C_DocType_ID == 0) + C_DocType_ID = DB.getSQLValue(null, + "SELECT C_DocType_ID FROM C_DocType WHERE C_DocType_ID=?", + order.getC_DocType_ID()); + setC_DocType_ID (C_DocType_ID); + + // Default - Today + if (movementDate != null) + setMovementDate (movementDate); + + //setDateAcct (getMovementDate()); + + // Copy from Order + setDD_Order_ID(order.getC_Order_ID()); + setDeliveryRule (order.getDeliveryRule()); + setDeliveryViaRule (order.getDeliveryViaRule()); + setM_Shipper_ID(order.getM_Shipper_ID()); + setFreightCostRule (order.getFreightCostRule()); + setFreightAmt(order.getFreightAmt()); + setSalesRep_ID(order.getSalesRep_ID()); + // + setC_Activity_ID(order.getC_Activity_ID()); + setC_Campaign_ID(order.getC_Campaign_ID()); + setC_Charge_ID(order.getC_Charge_ID()); + setChargeAmt(order.getChargeAmt()); + // + setC_Project_ID(order.getC_Project_ID()); + //setDateOrdered(order.getDateOrdered()); + setDescription(order.getDescription()); + //setPOReference(order.getPOReference()); + setSalesRep_ID(order.getSalesRep_ID()); + setAD_OrgTrx_ID(order.getAD_OrgTrx_ID()); + setUser1_ID(order.getUser1_ID()); + setUser2_ID(order.getUser2_ID()); + setPriorityRule(order.getPriorityRule()); + } // MMovement + + /** Reversal Flag */ + private boolean m_reversal = false; + + /** + * Set Reversal + * @param reversal reversal + */ + private void setReversal(boolean reversal) + { + m_reversal = reversal; + } // setReversal + /** + * Is Reversal + * @return reversal + */ + private boolean isReversal() + { + return m_reversal; + } // isReversal + +} // MMovement + diff --git a/base/src/org/compiere/model/MMovementLine.java b/base/src/org/compiere/model/MMovementLine.java new file mode 100644 index 0000000000..1d98958a60 --- /dev/null +++ b/base/src/org/compiere/model/MMovementLine.java @@ -0,0 +1,322 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.Level; +import org.compiere.util.*; +import org.eevolution.model.*; + +/** + * Inventory Move Line Model + * + * @author Jorg Janke + * @version $Id: MMovementLine.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ + */ +public class MMovementLine extends X_M_MovementLine +{ + /** + * Standard Cosntructor + * @param ctx context + * @param M_MovementLine_ID id + * @param trxName transaction + */ + public MMovementLine (Properties ctx, int M_MovementLine_ID, String trxName) + { + super (ctx, M_MovementLine_ID, trxName); + if (M_MovementLine_ID == 0) + { + // setM_LocatorTo_ID (0); // @M_LocatorTo_ID@ + // setM_Locator_ID (0); // @M_Locator_ID@ + // setM_MovementLine_ID (0); + // setLine (0); + // setM_Product_ID (0); + setM_AttributeSetInstance_ID(0); // ID + setMovementQty (Env.ZERO); // 1 + setTargetQty (Env.ZERO); // 0 + setScrappedQty(Env.ZERO); + setConfirmedQty(Env.ZERO); + setProcessed (false); + } + } // MMovementLine + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MMovementLine.class); + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MMovementLine (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MMovementLine + + /** + * Parent constructor + * @param parent parent + */ + public MMovementLine (MMovement parent) + { + this (parent.getCtx(), 0, parent.get_TrxName()); + setClientOrg(parent); + setM_Movement_ID(parent.getM_Movement_ID()); + } // MMovementLine + + /** + * Get AttributeSetInstance To + * @return ASI + */ + public int getM_AttributeSetInstanceTo_ID () + { + int M_AttributeSetInstanceTo_ID = super.getM_AttributeSetInstanceTo_ID(); + if (M_AttributeSetInstanceTo_ID == 0) + M_AttributeSetInstanceTo_ID = super.getM_AttributeSetInstance_ID(); + return M_AttributeSetInstanceTo_ID; + } // getM_AttributeSetInstanceTo_ID + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + /** + * Get Product + * @return product or null if not defined + */ + public MProduct getProduct() + { + if (getM_Product_ID() != 0) + return MProduct.get(getCtx(), getM_Product_ID()); + return null; + } // getProduct + + /** + * Set Movement Qty - enforce UOM + * @param MovementQty qty + */ + public void setMovementQty (BigDecimal MovementQty) + { + if (MovementQty != null) + { + MProduct product = getProduct(); + if (product != null) + { + int precision = product.getUOMPrecision(); + MovementQty = MovementQty.setScale(precision, BigDecimal.ROUND_HALF_UP); + } + } + super.setMovementQty(MovementQty); + } // setMovementQty + + /** Parent */ + private MMovement m_parent = null; + + /** + * get Parent + * @return Parent Movement + */ + public MMovement getParent() + { + if (m_parent == null) + m_parent = new MMovement (getCtx(), getM_Movement_ID(), get_TrxName()); + return m_parent; + } // getParent + + + /** + * Before Save + * @param newRecord new + * @return true + */ + protected boolean beforeSave (boolean newRecord) + { + // Set Line No + if (getLine() == 0) + { + String sql = "SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM M_MovementLine WHERE M_Movement_ID=?"; + int ii = DB.getSQLValue (get_TrxName(), sql, getM_Movement_ID()); + setLine (ii); + } + + if (getM_Locator_ID() == getM_LocatorTo_ID()) + { + log.saveError("Error", Msg.parseTranslation(getCtx(), "@M_Locator_ID@ == @M_LocatorTo_ID@")); + return false; + } + + if (getMovementQty().signum() == 0) + { + log.saveError("FillMandatory", Msg.getElement(getCtx(), "MovementQty")); + return false; + } + + // Qty Precision + if (newRecord || is_ValueChanged(COLUMNNAME_MovementQty)) + setMovementQty(getMovementQty()); + + // Mandatory Instance + MProduct product = getProduct(); + if (getM_AttributeSetInstance_ID() == 0) { + if (product != null && product.isASIMandatory(false)) { + log.saveError("FillMandatory", Msg.getElement(getCtx(), COLUMNNAME_M_AttributeSetInstance_ID)); + return false; + } + } + if (getM_AttributeSetInstanceTo_ID() == 0) + { + if (getM_AttributeSetInstance_ID() != 0) // set to from + setM_AttributeSetInstanceTo_ID(getM_AttributeSetInstance_ID()); + else + { + if (product != null && product.isASIMandatory(true)) + { + log.saveError("FillMandatory", Msg.getElement(getCtx(), COLUMNNAME_M_AttributeSetInstanceTo_ID)); + return false; + } + } + } // ASI + + return true; + } // beforeSave + /** + * Set Distribution Order Line. + * Does not set Quantity! + * @param oLine order line + * @param M_Locator_ID locator + * @param Qty used only to find suitable locator + */ + public void setOrderLine (MDDOrderLine oLine, int M_Locator_ID, BigDecimal Qty) + { + setDD_OrderLine_ID(oLine.getDD_OrderLine_ID()); + setLine(oLine.getLine()); + //setC_UOM_ID(oLine.getC_UOM_ID()); + MProduct product = oLine.getProduct(); + if (product == null) + { + set_ValueNoCheck("M_Product_ID", null); + set_ValueNoCheck("M_AttributeSetInstance_ID", null); + set_ValueNoCheck("M_Locator_ID", null); + } + else + { + setM_Product_ID(oLine.getM_Product_ID()); + setM_AttributeSetInstance_ID(oLine.getM_AttributeSetInstance_ID()); + // + if (product.isItem()) + { + setM_Locator_ID(M_Locator_ID); + } + else + set_ValueNoCheck("M_Locator_ID", null); + } + //setC_Charge_ID(oLine.getC_Charge_ID()); + setDescription(oLine.getDescription()); + //setIsDescription(oLine.isDescription()); + // + //setC_Project_ID(oLine.getC_Project_ID()); + //setC_ProjectPhase_ID(oLine.getC_ProjectPhase_ID()); + //setC_ProjectTask_ID(oLine.getC_ProjectTask_ID()); + //setC_Activity_ID(oLine.getC_Activity_ID()); + //setC_Campaign_ID(oLine.getC_Campaign_ID()); + //setAD_OrgTrx_ID(oLine.getAD_OrgTrx_ID()); + //setUser1_ID(oLine.getUser1_ID()); + //setUser2_ID(oLine.getUser2_ID()); + } // setOrderLine + + /** + * Set M_Locator_ID + * @param M_Locator_ID id + */ + public void setM_Locator_ID (int M_Locator_ID) + { + if (M_Locator_ID < 0) + throw new IllegalArgumentException ("M_Locator_ID is mandatory."); + // set to 0 explicitly to reset + set_Value ("M_Locator_ID", new Integer(M_Locator_ID)); + } // setM_Locator_ID + + /** + * Set M_Locator_ID + * @param M_Locator_ID id + */ + public void setM_LocatorTo_ID (int M_Locator_ID) + { + if (M_Locator_ID < 0) + throw new IllegalArgumentException ("M_LocatorTo_ID is mandatory."); + // set to 0 explicitly to reset + set_Value ("M_Locator_ID", new Integer(M_Locator_ID)); + } // setM_Locator_ID + + /** + * Get Movement lines Of Distribution Order Line + * @param ctx context + * @param DD_OrderLine_ID line + * @param where optional addition where clause + * @param trxName transaction + * @return array of receipt lines + */ + public static MMovementLine[] getOfOrderLine (Properties ctx, + int DD_OrderLine_ID, String where, String trxName) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_MovementLine WHERE DD_OrderLine_ID=?"; + if (where != null && where.length() > 0) + sql += " AND " + where; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, DD_OrderLine_ID); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add(new MMovementLine(ctx, rs, trxName)); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + MMovementLine[] retValue = new MMovementLine[list.size ()]; + list.toArray (retValue); + return retValue; + } // getOfOrderLine + +} // MMovementLine diff --git a/base/src/org/compiere/model/MOrder.java b/base/src/org/compiere/model/MOrder.java new file mode 100644 index 0000000000..bd8a543a32 --- /dev/null +++ b/base/src/org/compiere/model/MOrder.java @@ -0,0 +1,2414 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.File; +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; +import java.util.regex.Pattern; + +import org.compiere.print.ReportEngine; +import org.compiere.process.DocAction; +import org.compiere.process.DocumentEngine; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Msg; +import org.eevolution.model.MPPProductBOMLine; +import org.eevolution.model.MPPProductBOM; + + +/** + * Order Model. + * Please do not set DocStatus and C_DocType_ID directly. + * They are set in the process() method. + * Use DocAction and C_DocTypeTarget_ID instead. + * + * @author Jorg Janke + * @version $Id: MOrder.java,v 1.5 2006/10/06 00:42:24 jjanke Exp $ + */ +public class MOrder extends X_C_Order implements DocAction +{ + /** + * Create new Order by copying + * @param from order + * @param dateDoc date of the document date + * @param C_DocTypeTarget_ID target document type + * @param isSOTrx sales order + * @param counter create counter links + * @param copyASI copy line attributes Attribute Set Instance, Resaouce Assignment + * @param trxName trx + * @return Order + */ + public static MOrder copyFrom (MOrder from, Timestamp dateDoc, + int C_DocTypeTarget_ID, boolean isSOTrx, boolean counter, boolean copyASI, + String trxName) + { + MOrder to = new MOrder (from.getCtx(), 0, trxName); + to.set_TrxName(trxName); + PO.copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org_ID()); + to.set_ValueNoCheck ("C_Order_ID", I_ZERO); + to.set_ValueNoCheck ("DocumentNo", null); + // + to.setDocStatus (DOCSTATUS_Drafted); // Draft + to.setDocAction(DOCACTION_Complete); + // + to.setC_DocType_ID(0); + to.setC_DocTypeTarget_ID (C_DocTypeTarget_ID); + to.setIsSOTrx(isSOTrx); + // + to.setIsSelected (false); + to.setDateOrdered (dateDoc); + to.setDateAcct (dateDoc); + to.setDatePromised (dateDoc); // assumption + to.setDatePrinted(null); + to.setIsPrinted (false); + // + to.setIsApproved (false); + to.setIsCreditApproved(false); + to.setC_Payment_ID(0); + to.setC_CashLine_ID(0); + // Amounts are updated when adding lines + to.setGrandTotal(Env.ZERO); + to.setTotalLines(Env.ZERO); + // + to.setIsDelivered(false); + to.setIsInvoiced(false); + to.setIsSelfService(false); + to.setIsTransferred (false); + to.setPosted (false); + to.setProcessed (false); + if (counter) + to.setRef_Order_ID(from.getC_Order_ID()); + else + to.setRef_Order_ID(0); + // + if (!to.save(trxName)) + throw new IllegalStateException("Could not create Order"); + if (counter) + from.setRef_Order_ID(to.getC_Order_ID()); + + if (to.copyLinesFrom(from, counter, copyASI) == 0) + throw new IllegalStateException("Could not create Order Lines"); + + return to; + } // copyFrom + + + /************************************************************************** + * Default Constructor + * @param ctx context + * @param C_Order_ID order to load, (0 create new order) + * @param trxName trx name + */ + public MOrder(Properties ctx, int C_Order_ID, String trxName) + { + super (ctx, C_Order_ID, trxName); + // New + if (C_Order_ID == 0) + { + setDocStatus(DOCSTATUS_Drafted); + setDocAction (DOCACTION_Prepare); + // + setDeliveryRule (DELIVERYRULE_Availability); + setFreightCostRule (FREIGHTCOSTRULE_FreightIncluded); + setInvoiceRule (INVOICERULE_Immediate); + setPaymentRule(PAYMENTRULE_OnCredit); + setPriorityRule (PRIORITYRULE_Medium); + setDeliveryViaRule (DELIVERYVIARULE_Pickup); + // + setIsDiscountPrinted (false); + setIsSelected (false); + setIsTaxIncluded (false); + setIsSOTrx (true); + setIsDropShip(false); + setSendEMail (false); + // + setIsApproved(false); + setIsPrinted(false); + setIsCreditApproved(false); + setIsDelivered(false); + setIsInvoiced(false); + setIsTransferred(false); + setIsSelfService(false); + // + super.setProcessed(false); + setProcessing(false); + setPosted(false); + + setDateAcct (new Timestamp(System.currentTimeMillis())); + setDatePromised (new Timestamp(System.currentTimeMillis())); + setDateOrdered (new Timestamp(System.currentTimeMillis())); + + setFreightAmt (Env.ZERO); + setChargeAmt (Env.ZERO); + setTotalLines (Env.ZERO); + setGrandTotal (Env.ZERO); + } + } // MOrder + + /************************************************************************** + * Project Constructor + * @param project Project to create Order from + * @param IsSOTrx sales order + * @param DocSubTypeSO if SO DocType Target (default DocSubTypeSO_OnCredit) + */ + public MOrder (MProject project, boolean IsSOTrx, String DocSubTypeSO) + { + this (project.getCtx(), 0, project.get_TrxName()); + setAD_Client_ID(project.getAD_Client_ID()); + setAD_Org_ID(project.getAD_Org_ID()); + setC_Campaign_ID(project.getC_Campaign_ID()); + setSalesRep_ID(project.getSalesRep_ID()); + // + setC_Project_ID(project.getC_Project_ID()); + setDescription(project.getName()); + Timestamp ts = project.getDateContract(); + if (ts != null) + setDateOrdered (ts); + ts = project.getDateFinish(); + if (ts != null) + setDatePromised (ts); + // + setC_BPartner_ID(project.getC_BPartner_ID()); + setC_BPartner_Location_ID(project.getC_BPartner_Location_ID()); + setAD_User_ID(project.getAD_User_ID()); + // + setM_Warehouse_ID(project.getM_Warehouse_ID()); + setM_PriceList_ID(project.getM_PriceList_ID()); + setC_PaymentTerm_ID(project.getC_PaymentTerm_ID()); + // + setIsSOTrx(IsSOTrx); + if (IsSOTrx) + { + if (DocSubTypeSO == null || DocSubTypeSO.length() == 0) + setC_DocTypeTarget_ID(DocSubTypeSO_OnCredit); + else + setC_DocTypeTarget_ID(DocSubTypeSO); + } + else + setC_DocTypeTarget_ID(); + } // MOrder + + /** + * Load Constructor + * @param ctx context + * @param rs result set record + * @param trxName transaction + */ + public MOrder (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MOrder + + /** Order Lines */ + private MOrderLine[] m_lines = null; + /** Tax Lines */ + private MOrderTax[] m_taxes = null; + /** Force Creation of order */ + private boolean m_forceCreation = false; + + /** + * Overwrite Client/Org if required + * @param AD_Client_ID client + * @param AD_Org_ID org + */ + public void setClientOrg (int AD_Client_ID, int AD_Org_ID) + { + super.setClientOrg(AD_Client_ID, AD_Org_ID); + } // setClientOrg + + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + /** + * Set Business Partner (Ship+Bill) + * @param C_BPartner_ID bpartner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + super.setC_BPartner_ID (C_BPartner_ID); + super.setBill_BPartner_ID (C_BPartner_ID); + } // setC_BPartner_ID + + /** + * Set Business Partner Location (Ship+Bill) + * @param C_BPartner_Location_ID bp location + */ + public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) + { + super.setC_BPartner_Location_ID (C_BPartner_Location_ID); + super.setBill_Location_ID(C_BPartner_Location_ID); + } // setC_BPartner_Location_ID + + /** + * Set Business Partner Contact (Ship+Bill) + * @param AD_User_ID user + */ + public void setAD_User_ID (int AD_User_ID) + { + super.setAD_User_ID (AD_User_ID); + super.setBill_User_ID (AD_User_ID); + } // setAD_User_ID + + /** + * Set Ship Business Partner + * @param C_BPartner_ID bpartner + */ + public void setShip_BPartner_ID (int C_BPartner_ID) + { + super.setC_BPartner_ID (C_BPartner_ID); + } // setShip_BPartner_ID + + /** + * Set Ship Business Partner Location + * @param C_BPartner_Location_ID bp location + */ + public void setShip_Location_ID (int C_BPartner_Location_ID) + { + super.setC_BPartner_Location_ID (C_BPartner_Location_ID); + } // setShip_Location_ID + + /** + * Set Ship Business Partner Contact + * @param AD_User_ID user + */ + public void setShip_User_ID (int AD_User_ID) + { + super.setAD_User_ID (AD_User_ID); + } // setShip_User_ID + + + /** + * Set Warehouse + * @param M_Warehouse_ID warehouse + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + super.setM_Warehouse_ID (M_Warehouse_ID); + } // setM_Warehouse_ID + + /** + * Set Drop Ship + * @param IsDropShip drop ship + */ + public void setIsDropShip (boolean IsDropShip) + { + super.setIsDropShip (IsDropShip); + } // setIsDropShip + + /*************************************************************************/ + + /** Sales Order Sub Type - SO */ + public static final String DocSubTypeSO_Standard = "SO"; + /** Sales Order Sub Type - OB */ + public static final String DocSubTypeSO_Quotation = "OB"; + /** Sales Order Sub Type - ON */ + public static final String DocSubTypeSO_Proposal = "ON"; + /** Sales Order Sub Type - PR */ + public static final String DocSubTypeSO_Prepay = "PR"; + /** Sales Order Sub Type - WR */ + public static final String DocSubTypeSO_POS = "WR"; + /** Sales Order Sub Type - WP */ + public static final String DocSubTypeSO_Warehouse = "WP"; + /** Sales Order Sub Type - WI */ + public static final String DocSubTypeSO_OnCredit = "WI"; + /** Sales Order Sub Type - RM */ + public static final String DocSubTypeSO_RMA = "RM"; + + /** + * Set Target Sales Document Type + * @param DocSubTypeSO_x SO sub type - see DocSubTypeSO_* + */ + public void setC_DocTypeTarget_ID (String DocSubTypeSO_x) + { + String sql = "SELECT C_DocType_ID FROM C_DocType " + + "WHERE AD_Client_ID=? AND AD_Org_ID IN (0," + getAD_Org_ID() + + ") AND DocSubTypeSO=? " + + "ORDER BY AD_Org_ID DESC, IsDefault DESC"; + int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID(), DocSubTypeSO_x); + if (C_DocType_ID <= 0) + log.severe ("Not found for AD_Client_ID=" + getAD_Client_ID () + ", SubType=" + DocSubTypeSO_x); + else + { + log.fine("(SO) - " + DocSubTypeSO_x); + setC_DocTypeTarget_ID (C_DocType_ID); + setIsSOTrx(true); + } + } // setC_DocTypeTarget_ID + + /** + * Set Target Document Type. + * Standard Order or PO + */ + public void setC_DocTypeTarget_ID () + { + if (isSOTrx()) // SO = Std Order + { + setC_DocTypeTarget_ID(DocSubTypeSO_Standard); + return; + } + // PO + String sql = "SELECT C_DocType_ID FROM C_DocType " + + "WHERE AD_Client_ID=? AND AD_Org_ID IN (0," + getAD_Org_ID() + + ") AND DocBaseType='POO' " + + "ORDER BY AD_Org_ID DESC, IsDefault DESC"; + int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID()); + if (C_DocType_ID <= 0) + log.severe ("No POO found for AD_Client_ID=" + getAD_Client_ID ()); + else + { + log.fine("(PO) - " + C_DocType_ID); + setC_DocTypeTarget_ID (C_DocType_ID); + } + } // setC_DocTypeTarget_ID + + + /** + * Set Business Partner Defaults & Details. + * SOTrx should be set. + * @param bp business partner + */ + public void setBPartner (MBPartner bp) + { + if (bp == null) + return; + + setC_BPartner_ID(bp.getC_BPartner_ID()); + // Defaults Payment Term + int ii = 0; + if (isSOTrx()) + ii = bp.getC_PaymentTerm_ID(); + else + ii = bp.getPO_PaymentTerm_ID(); + if (ii != 0) + setC_PaymentTerm_ID(ii); + // Default Price List + if (isSOTrx()) + ii = bp.getM_PriceList_ID(); + else + ii = bp.getPO_PriceList_ID(); + if (ii != 0) + setM_PriceList_ID(ii); + // Default Delivery/Via Rule + String ss = bp.getDeliveryRule(); + if (ss != null) + setDeliveryRule(ss); + ss = bp.getDeliveryViaRule(); + if (ss != null) + setDeliveryViaRule(ss); + // Default Invoice/Payment Rule + ss = bp.getInvoiceRule(); + if (ss != null) + setInvoiceRule(ss); + ss = bp.getPaymentRule(); + if (ss != null) + setPaymentRule(ss); + // Sales Rep + ii = bp.getSalesRep_ID(); + if (ii != 0) + setSalesRep_ID(ii); + + + // Set Locations + MBPartnerLocation[] locs = bp.getLocations(false); + if (locs != null) + { + for (int i = 0; i < locs.length; i++) + { + if (locs[i].isShipTo()) + super.setC_BPartner_Location_ID(locs[i].getC_BPartner_Location_ID()); + if (locs[i].isBillTo()) + setBill_Location_ID(locs[i].getC_BPartner_Location_ID()); + } + // set to first + if (getC_BPartner_Location_ID() == 0 && locs.length > 0) + super.setC_BPartner_Location_ID(locs[0].getC_BPartner_Location_ID()); + if (getBill_Location_ID() == 0 && locs.length > 0) + setBill_Location_ID(locs[0].getC_BPartner_Location_ID()); + } + if (getC_BPartner_Location_ID() == 0) + log.log(Level.SEVERE, "MOrder.setBPartner - Has no Ship To Address: " + bp); + if (getBill_Location_ID() == 0) + log.log(Level.SEVERE, "MOrder.setBPartner - Has no Bill To Address: " + bp); + + // Set Contact + MUser[] contacts = bp.getContacts(false); + if (contacts != null && contacts.length == 1) + setAD_User_ID(contacts[0].getAD_User_ID()); + } // setBPartner + + + /** + * Copy Lines From other Order + * @param otherOrder order + * @param counter set counter info + * @param copyASI copy line attributes Attribute Set Instance, Resaouce Assignment + * @return number of lines copied + */ + public int copyLinesFrom (MOrder otherOrder, boolean counter, boolean copyASI) + { + if (isProcessed() || isPosted() || otherOrder == null) + return 0; + MOrderLine[] fromLines = otherOrder.getLines(false, null); + int count = 0; + for (int i = 0; i < fromLines.length; i++) + { + MOrderLine line = new MOrderLine (this); + PO.copyValues(fromLines[i], line, getAD_Client_ID(), getAD_Org_ID()); + line.setC_Order_ID(getC_Order_ID()); + line.setOrder(this); + line.set_ValueNoCheck ("C_OrderLine_ID", I_ZERO); // new + // References + if (!copyASI) + { + line.setM_AttributeSetInstance_ID(0); + line.setS_ResourceAssignment_ID(0); + } + if (counter) + line.setRef_OrderLine_ID(fromLines[i].getC_OrderLine_ID()); + else + line.setRef_OrderLine_ID(0); + // + line.setQtyDelivered(Env.ZERO); + line.setQtyInvoiced(Env.ZERO); + line.setQtyReserved(Env.ZERO); + line.setDateDelivered(null); + line.setDateInvoiced(null); + // Tax + if (getC_BPartner_ID() != otherOrder.getC_BPartner_ID()) + line.setTax(); // recalculate + // + // + line.setProcessed(false); + if (line.save(get_TrxName())) + count++; + // Cross Link + if (counter) + { + fromLines[i].setRef_OrderLine_ID(line.getC_OrderLine_ID()); + fromLines[i].save(get_TrxName()); + } + } + if (fromLines.length != count) + log.log(Level.SEVERE, "Line difference - From=" + fromLines.length + " <> Saved=" + count); + return count; + } // copyLinesFrom + + + /************************************************************************** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MOrder[") + .append(get_ID()).append("-").append(getDocumentNo()) + .append(",IsSOTrx=").append(isSOTrx()) + .append(",C_DocType_ID=").append(getC_DocType_ID()) + .append(", GrandTotal=").append(getGrandTotal()) + .append ("]"); + return sb.toString (); + } // toString + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + return dt.getName() + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.ORDER, getC_Order_ID(), get_TrxName()); + if (re == null) + return null; + return re.getPDF(file); + } // createPDF + + /** + * Set Price List (and Currency, TaxIncluded) when valid + * @param M_PriceList_ID price list + */ + public void setM_PriceList_ID (int M_PriceList_ID) + { + MPriceList pl = MPriceList.get(getCtx(), M_PriceList_ID, null); + if (pl.get_ID() == M_PriceList_ID) + { + super.setM_PriceList_ID(M_PriceList_ID); + setC_Currency_ID(pl.getC_Currency_ID()); + setIsTaxIncluded(pl.isTaxIncluded()); + } + } // setM_PriceList_ID + + + /************************************************************************** + * Get Lines of Order + * @param whereClause where clause or null (starting with AND) + * @param orderClause order clause + * @return lines + */ + public MOrderLine[] getLines (String whereClause, String orderClause) + { + ArrayList list = new ArrayList (); + StringBuffer sql = new StringBuffer("SELECT * FROM C_OrderLine WHERE C_Order_ID=? "); + if (whereClause != null) + sql.append(whereClause); + if (orderClause != null) + sql.append(" ").append(orderClause); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql.toString(), get_TrxName()); + pstmt.setInt(1, getC_Order_ID()); + rs = pstmt.executeQuery(); + while (rs.next()) + { + MOrderLine ol = new MOrderLine(getCtx(), rs, get_TrxName()); + ol.setHeaderInfo (this); + list.add(ol); + } + } + catch (Exception e) + { + log.log(Level.SEVERE, sql.toString(), e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + // + MOrderLine[] lines = new MOrderLine[list.size ()]; + list.toArray (lines); + return lines; + } // getLines + + /** + * Get Lines of Order + * @param requery requery + * @param orderBy optional order by column + * @return lines + */ + public MOrderLine[] getLines (boolean requery, String orderBy) + { + if (m_lines != null && !requery) { + set_TrxName(m_lines, get_TrxName()); + return m_lines; + } + // + String orderClause = "ORDER BY "; + if (orderBy != null && orderBy.length() > 0) + orderClause += orderBy; + else + orderClause += "Line"; + m_lines = getLines(null, orderClause); + return m_lines; + } // getLines + + /** + * Get Lines of Order. + * (useb by web store) + * @return lines + */ + public MOrderLine[] getLines() + { + return getLines(false, null); + } // getLines + + /** + * Renumber Lines + * @param step start and step + */ + public void renumberLines (int step) + { + int number = step; + MOrderLine[] lines = getLines(true, null); // Line is default + for (int i = 0; i < lines.length; i++) + { + MOrderLine line = lines[i]; + line.setLine(number); + line.save(get_TrxName()); + number += step; + } + m_lines = null; + } // renumberLines + + /** + * Does the Order Line belong to this Order + * @param C_OrderLine_ID line + * @return true if part of the order + */ + public boolean isOrderLine(int C_OrderLine_ID) + { + if (m_lines == null) + getLines(); + for (int i = 0; i < m_lines.length; i++) + if (m_lines[i].getC_OrderLine_ID() == C_OrderLine_ID) + return true; + return false; + } // isOrderLine + + /** + * Get Taxes of Order + * @param requery requery + * @return array of taxes + */ + public MOrderTax[] getTaxes(boolean requery) + { + if (m_taxes != null && !requery) + return m_taxes; + // + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM C_OrderTax WHERE C_Order_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Order_ID()); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new MOrderTax(getCtx(), rs, get_TrxName())); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, "getTaxes", e); + } + finally + { + try + { + if (pstmt != null) + pstmt.close (); + } + catch (Exception e) + {} + pstmt = null; + } + // + m_taxes = new MOrderTax[list.size ()]; + list.toArray (m_taxes); + return m_taxes; + } // getTaxes + + + /** + * Get Invoices of Order + * @return invoices + */ + public MInvoice[] getInvoices() + { + ArrayList list = new ArrayList(); + String sql = " SELECT DISTINCT i.* FROM C_InvoiceLine il " + + "INNER JOIN C_OrderLine ol ON (ol.C_OrderLine_ID = il.C_OrderLine_ID) " + + "INNER JOIN C_Order o ON (o.C_Order_ID = ol.C_Order_ID) " + + "INNER JOIN C_Invoice i ON (i.C_Invoice_ID = il.C_Invoice_ID) " + + "WHERE o.C_Order_ID=? " + + "ORDER BY i.Created DESC"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Order_ID()); + rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new MInvoice(getCtx(), rs, get_TrxName())); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + // + MInvoice[] retValue = new MInvoice[list.size()]; + list.toArray(retValue); + return retValue; + } // getInvoices + + /** + * Get latest Invoice of Order + * @return invoice id or 0 + */ + public int getC_Invoice_ID() + { + int C_Invoice_ID = 0; + String sql = "SELECT C_Invoice_ID FROM C_Invoice " + + "WHERE C_Order_ID=? AND DocStatus IN ('CO','CL') " + + "ORDER BY Created DESC"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Order_ID()); + rs = pstmt.executeQuery(); + if (rs.next()) + C_Invoice_ID = rs.getInt(1); + } + catch (Exception e) + { + log.log(Level.SEVERE, "getC_Invoice_ID", e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + return C_Invoice_ID; + } // getC_Invoice_ID + + + /** + * Get Shipments of Order + * @return shipments + */ + public MInOut[] getShipments() + { + ArrayList list = new ArrayList(); + String sql = "SELECT DISTINCT io.* FROM M_InOutLine iol " + + "INNER JOIN M_InOut io ON (io.M_InOut_ID = iol.M_InOut_ID) " + + "INNER JOIN C_ORDERLINE ol ON (ol.C_ORDERLINE_ID=iol.C_ORDERLINE_ID) " + + "INNER JOIN C_ORDER o ON (o.C_ORDER_ID=ol.C_ORDER_ID) " + + "WHERE o.C_ORDER_ID=? " + + "ORDER BY io.Created DESC"; + + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Order_ID()); + rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new MInOut(getCtx(), rs, get_TrxName())); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + // + MInOut[] retValue = new MInOut[list.size()]; + list.toArray(retValue); + return retValue; + } // getShipments + + /** + * Get ISO Code of Currency + * @return Currency ISO + */ + public String getCurrencyISO() + { + return MCurrency.getISO_Code (getCtx(), getC_Currency_ID()); + } // getCurrencyISO + + /** + * Get Currency Precision + * @return precision + */ + public int getPrecision() + { + return MCurrency.getStdPrecision(getCtx(), getC_Currency_ID()); + } // getPrecision + + /** + * Get Document Status + * @return Document Status Clear Text + */ + public String getDocStatusName() + { + return MRefList.getListName(getCtx(), 131, getDocStatus()); + } // getDocStatusName + + /** + * Set DocAction + * @param DocAction doc action + */ + public void setDocAction (String DocAction) + { + setDocAction (DocAction, false); + } // setDocAction + + /** + * Set DocAction + * @param DocAction doc oction + * @param forceCreation force creation + */ + public void setDocAction (String DocAction, boolean forceCreation) + { + super.setDocAction (DocAction); + m_forceCreation = forceCreation; + } // setDocAction + + /** + * Set Processed. + * Propergate to Lines/Taxes + * @param processed processed + */ + public void setProcessed (boolean processed) + { + super.setProcessed (processed); + if (get_ID() == 0) + return; + String set = "SET Processed='" + + (processed ? "Y" : "N") + + "' WHERE C_Order_ID=" + getC_Order_ID(); + int noLine = DB.executeUpdate("UPDATE C_OrderLine " + set, get_TrxName()); + int noTax = DB.executeUpdate("UPDATE C_OrderTax " + set, get_TrxName()); + m_lines = null; + m_taxes = null; + log.fine("setProcessed - " + processed + " - Lines=" + noLine + ", Tax=" + noTax); + } // setProcessed + + + + /************************************************************************** + * Before Save + * @param newRecord new + * @return save + */ + protected boolean beforeSave (boolean newRecord) + { + // Client/Org Check + if (getAD_Org_ID() == 0) + { + int context_AD_Org_ID = Env.getAD_Org_ID(getCtx()); + if (context_AD_Org_ID != 0) + { + setAD_Org_ID(context_AD_Org_ID); + log.warning("Changed Org to Context=" + context_AD_Org_ID); + } + } + if (getAD_Client_ID() == 0) + { + m_processMsg = "AD_Client_ID = 0"; + return false; + } + + // New Record Doc Type - make sure DocType set to 0 + if (newRecord && getC_DocType_ID() == 0) + setC_DocType_ID (0); + + // Default Warehouse + if (getM_Warehouse_ID() == 0) + { + int ii = Env.getContextAsInt(getCtx(), "#M_Warehouse_ID"); + if (ii != 0) + setM_Warehouse_ID(ii); + else + { + log.saveError("FillMandatory", Msg.getElement(getCtx(), "M_Warehouse_ID")); + return false; + } + } + // Warehouse Org + if (newRecord + || is_ValueChanged("AD_Org_ID") || is_ValueChanged("M_Warehouse_ID")) + { + MWarehouse wh = MWarehouse.get(getCtx(), getM_Warehouse_ID()); + if (wh.getAD_Org_ID() != getAD_Org_ID()) + log.saveWarning("WarehouseOrgConflict", ""); + } + // Reservations in Warehouse + if (!newRecord && is_ValueChanged("M_Warehouse_ID")) + { + MOrderLine[] lines = getLines(false,null); + for (int i = 0; i < lines.length; i++) + { + if (!lines[i].canChangeWarehouse()) + return false; + } + } + + // No Partner Info - set Template + if (getC_BPartner_ID() == 0) + setBPartner(MBPartner.getTemplate(getCtx(), getAD_Client_ID())); + if (getC_BPartner_Location_ID() == 0) + setBPartner(new MBPartner(getCtx(), getC_BPartner_ID(), null)); + // No Bill - get from Ship + if (getBill_BPartner_ID() == 0) + { + setBill_BPartner_ID(getC_BPartner_ID()); + setBill_Location_ID(getC_BPartner_Location_ID()); + } + if (getBill_Location_ID() == 0) + setBill_Location_ID(getC_BPartner_Location_ID()); + + // Default Price List + if (getM_PriceList_ID() == 0) + { + int ii = DB.getSQLValue(null, + "SELECT M_PriceList_ID FROM M_PriceList " + + "WHERE AD_Client_ID=? AND IsSOPriceList=? " + + "ORDER BY IsDefault DESC", getAD_Client_ID(), isSOTrx() ? "Y" : "N"); + if (ii != 0) + setM_PriceList_ID (ii); + } + // Default Currency + if (getC_Currency_ID() == 0) + { + String sql = "SELECT C_Currency_ID FROM M_PriceList WHERE M_PriceList_ID=?"; + int ii = DB.getSQLValue (null, sql, getM_PriceList_ID()); + if (ii != 0) + setC_Currency_ID (ii); + else + setC_Currency_ID(Env.getContextAsInt(getCtx(), "#C_Currency_ID")); + } + + // Default Sales Rep + if (getSalesRep_ID() == 0) + { + int ii = Env.getContextAsInt(getCtx(), "#SalesRep_ID"); + if (ii != 0) + setSalesRep_ID (ii); + } + + // Default Document Type + if (getC_DocTypeTarget_ID() == 0) + setC_DocTypeTarget_ID(DocSubTypeSO_Standard); + + // Default Payment Term + if (getC_PaymentTerm_ID() == 0) + { + int ii = Env.getContextAsInt(getCtx(), "#C_PaymentTerm_ID"); + if (ii != 0) + setC_PaymentTerm_ID(ii); + else + { + String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y'"; + ii = DB.getSQLValue(null, sql, getAD_Client_ID()); + if (ii != 0) + setC_PaymentTerm_ID (ii); + } + } + + return true; + } // beforeSave + + + /** + * After Save + * @param newRecord new + * @param success success + * @return true if can be saved + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + if (!success || newRecord) + return success; + + // Propagate Description changes + if (is_ValueChanged("Description") || is_ValueChanged("POReference")) + { + String sql = "UPDATE C_Invoice i" + + " SET (Description,POReference)=" + + "(SELECT Description,POReference " + + "FROM C_Order o WHERE i.C_Order_ID=o.C_Order_ID) " + + "WHERE DocStatus NOT IN ('RE','CL') AND C_Order_ID=" + getC_Order_ID(); + int no = DB.executeUpdate(sql, get_TrxName()); + log.fine("Description -> #" + no); + } + + // Propagate Changes of Payment Info to existing (not reversed/closed) invoices + if (is_ValueChanged("PaymentRule") || is_ValueChanged("C_PaymentTerm_ID") + || is_ValueChanged("DateAcct") || is_ValueChanged("C_Payment_ID") + || is_ValueChanged("C_CashLine_ID")) + { + String sql = "UPDATE C_Invoice i " + + "SET (PaymentRule,C_PaymentTerm_ID,DateAcct,C_Payment_ID,C_CashLine_ID)=" + + "(SELECT PaymentRule,C_PaymentTerm_ID,DateAcct,C_Payment_ID,C_CashLine_ID " + + "FROM C_Order o WHERE i.C_Order_ID=o.C_Order_ID)" + + "WHERE DocStatus NOT IN ('RE','CL') AND C_Order_ID=" + getC_Order_ID(); + // Don't touch Closed/Reversed entries + int no = DB.executeUpdate(sql, get_TrxName()); + log.fine("Payment -> #" + no); + } + + // Sync Lines + afterSaveSync("AD_Org_ID"); + afterSaveSync("C_BPartner_ID"); + afterSaveSync("C_BPartner_Location_ID"); + afterSaveSync("DateOrdered"); + afterSaveSync("DatePromised"); + afterSaveSync("M_Warehouse_ID"); + afterSaveSync("M_Shipper_ID"); + afterSaveSync("C_Currency_ID"); + // + return true; + } // afterSave + + private void afterSaveSync (String columnName) + { + if (is_ValueChanged(columnName)) + { + String sql = "UPDATE C_OrderLine ol" + + " SET " + columnName + " =" + + "(SELECT " + columnName + + " FROM C_Order o WHERE ol.C_Order_ID=o.C_Order_ID) " + + "WHERE C_Order_ID=" + getC_Order_ID(); + int no = DB.executeUpdate(sql, get_TrxName()); + log.fine(columnName + " Lines -> #" + no); + } + } // afterSaveSync + + /** + * Before Delete + * @return true of it can be deleted + */ + protected boolean beforeDelete () + { + if (isProcessed()) + return false; + + getLines(); + for (int i = 0; i < m_lines.length; i++) + { + if (!m_lines[i].beforeDelete()) + return false; + } + return true; + } // beforeDelete + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // processIt + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info("unlockIt - " + toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info(toString()); + setDocAction(DOCACTION_Prepare); + return true; + } // invalidateIt + + + /************************************************************************** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + MDocType dt = MDocType.get(getCtx(), getC_DocTypeTarget_ID()); + + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType())) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + + // Lines + MOrderLine[] lines = getLines(true, "M_Product_ID"); + if (lines.length == 0) + { + m_processMsg = "@NoLines@"; + return DocAction.STATUS_Invalid; + } + + // Bug 1564431 + if (getDeliveryRule() != null && getDeliveryRule().equals(MOrder.DELIVERYRULE_CompleteOrder)) + { + for (int i = 0; i < lines.length; i++) + { + MOrderLine line = lines[i]; + MProduct product = line.getProduct(); + if (product != null && product.isExcludeAutoDelivery()) + { + m_processMsg = "@M_Product_ID@ "+product.getValue()+" @IsExcludeAutoDelivery@"; + return DocAction.STATUS_Invalid; + } + } + } + + // Convert DocType to Target + if (getC_DocType_ID() != getC_DocTypeTarget_ID() ) + { + // Cannot change Std to anything else if different warehouses + if (getC_DocType_ID() != 0) + { + MDocType dtOld = MDocType.get(getCtx(), getC_DocType_ID()); + if (MDocType.DOCSUBTYPESO_StandardOrder.equals(dtOld.getDocSubTypeSO()) // From SO + && !MDocType.DOCSUBTYPESO_StandardOrder.equals(dt.getDocSubTypeSO())) // To !SO + { + for (int i = 0; i < lines.length; i++) + { + if (lines[i].getM_Warehouse_ID() != getM_Warehouse_ID()) + { + log.warning("different Warehouse " + lines[i]); + m_processMsg = "@CannotChangeDocType@"; + return DocAction.STATUS_Invalid; + } + } + } + } + + // New or in Progress/Invalid + if (DOCSTATUS_Drafted.equals(getDocStatus()) + || DOCSTATUS_InProgress.equals(getDocStatus()) + || DOCSTATUS_Invalid.equals(getDocStatus()) + || getC_DocType_ID() == 0) + { + setC_DocType_ID(getC_DocTypeTarget_ID()); + } + else // convert only if offer + { + if (dt.isOffer()) + setC_DocType_ID(getC_DocTypeTarget_ID()); + else + { + m_processMsg = "@CannotChangeDocType@"; + return DocAction.STATUS_Invalid; + } + } + } // convert DocType + + // Mandatory Product Attribute Set Instance + String mandatoryType = "='Y'"; // IN ('Y','S') + String sql = "SELECT COUNT(*) " + + "FROM C_OrderLine ol" + + " INNER JOIN M_Product p ON (ol.M_Product_ID=p.M_Product_ID)" + + " INNER JOIN M_AttributeSet pas ON (p.M_AttributeSet_ID=pas.M_AttributeSet_ID) " + + "WHERE pas.MandatoryType" + mandatoryType + + " AND ol.M_AttributeSetInstance_ID IS NULL" + + " AND ol.C_Order_ID=?"; + int no = DB.getSQLValue(get_TrxName(), sql, getC_Order_ID()); + if (no != 0) + { + m_processMsg = "@LinesWithoutProductAttribute@ (" + no + ")"; + return DocAction.STATUS_Invalid; + } + + // Lines + if (explodeBOM()) + lines = getLines(true, "M_Product_ID"); + if (!reserveStock(dt, lines)) + { + m_processMsg = "Cannot reserve Stock"; + return DocAction.STATUS_Invalid; + } + if (!calculateTaxTotal()) + { + m_processMsg = "Error calculating tax"; + return DocAction.STATUS_Invalid; + } + + // Credit Check + if (isSOTrx()) + { + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + if (MBPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditHold@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + BigDecimal grandTotal = MConversionRate.convertBase(getCtx(), + getGrandTotal(), getC_Currency_ID(), getDateOrdered(), + getC_ConversionType_ID(), getAD_Client_ID(), getAD_Org_ID()); + if (MBPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus(grandTotal))) + { + m_processMsg = "@BPartnerOverOCreditHold@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + ", @GrandTotal@=" + grandTotal + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + m_justPrepared = true; + // if (!DOCACTION_Complete.equals(getDocAction())) don't set for just prepare + // setDocAction(DOCACTION_Complete); + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Explode non stocked BOM. + * @return true if bom exploded + */ + private boolean explodeBOM() + { + boolean retValue = false; + String where = "AND IsActive='Y' AND EXISTS " + + "(SELECT * FROM M_Product p WHERE C_OrderLine.M_Product_ID=p.M_Product_ID" + + " AND p.IsBOM='Y' AND p.IsVerified='Y' AND p.IsStocked='N')"; + // + String sql = "SELECT COUNT(*) FROM C_OrderLine " + + "WHERE C_Order_ID=? " + where; + int count = DB.getSQLValue(get_TrxName(), sql, getC_Order_ID()); + while (count != 0) + { + retValue = true; + renumberLines (1000); // max 999 bom items + + // Order Lines with non-stocked BOMs + MOrderLine[] lines = getLines (where, "ORDER BY Line"); + for (int i = 0; i < lines.length; i++) + { + MOrderLine line = lines[i]; + MProduct product = MProduct.get (getCtx(), line.getM_Product_ID()); + log.fine(product.getName()); + // New Lines + int lineNo = line.getLine (); + //find default BOM with valid dates and to this product + MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDatePromised(), get_TrxName()); + if(bom != null) + { + MPPProductBOMLine[] bomlines = bom.getLines(getDatePromised()); + for (int j = 0; j < bomlines.length; j++) + { + MPPProductBOMLine bomline = bomlines[j]; + MOrderLine newLine = new MOrderLine (this); + newLine.setLine (++lineNo); + newLine.setM_Product_ID (bomline.getM_Product_ID ()); + newLine.setC_UOM_ID (bomline.getC_UOM_ID ()); + newLine.setQty (line.getQtyOrdered ().multiply ( + bomline.getQtyBOM())); + if (bomline.getDescription () != null) + newLine.setDescription (bomline.getDescription ()); + // + newLine.setPrice (); + newLine.save (get_TrxName()); + } + } + + /*MProductBOM[] boms = MProductBOM.getBOMLines (product); + for (int j = 0; j < boms.length; j++) + { + //MProductBOM bom = boms[j]; + MPPProductBOMLine bom = boms[j]; + MOrderLine newLine = new MOrderLine (this); + newLine.setLine (++lineNo); + //newLine.setM_Product_ID (bom.getProduct () + // .getM_Product_ID ()); + newLine.setM_Product_ID (bom.getM_Product_ID ()); + //newLine.setC_UOM_ID (bom.getProduct ().getC_UOM_ID ()); + newLine.setC_UOM_ID (bom.getC_UOM_ID ()); + //newLine.setQty (line.getQtyOrdered ().multiply ( + // bom.getBOMQty ())); + newLine.setQty (line.getQtyOrdered ().multiply ( + bom.getQtyBOM())); + if (bom.getDescription () != null) + newLine.setDescription (bom.getDescription ()); + // + newLine.setPrice (); + newLine.save (get_TrxName()); + }*/ + + // Convert into Comment Line + line.setM_Product_ID (0); + line.setM_AttributeSetInstance_ID (0); + line.setPrice (Env.ZERO); + line.setPriceLimit (Env.ZERO); + line.setPriceList (Env.ZERO); + line.setLineNetAmt (Env.ZERO); + line.setFreightAmt (Env.ZERO); + // + String description = product.getName (); + if (product.getDescription () != null) + description += " " + product.getDescription (); + if (line.getDescription () != null) + description += " " + line.getDescription (); + line.setDescription (description); + line.save (get_TrxName()); + } // for all lines with BOM + + m_lines = null; // force requery + count = DB.getSQLValue (get_TrxName(), sql, getC_Invoice_ID ()); + renumberLines (10); + } // while count != 0 + return retValue; + } // explodeBOM + + + /** + * Reserve Inventory. + * Counterpart: MInOut.completeIt() + * @param dt document type or null + * @param lines order lines (ordered by M_Product_ID for deadlock prevention) + * @return true if (un) reserved + */ + private boolean reserveStock (MDocType dt, MOrderLine[] lines) + { + if (dt == null) + dt = MDocType.get(getCtx(), getC_DocType_ID()); + + // Binding + boolean binding = !dt.isProposal(); + // Not binding - i.e. Target=0 + if (DOCACTION_Void.equals(getDocAction()) + // Closing Binding Quotation + || (MDocType.DOCSUBTYPESO_Quotation.equals(dt.getDocSubTypeSO()) + && DOCACTION_Close.equals(getDocAction())) + || isDropShip() ) + binding = false; + boolean isSOTrx = isSOTrx(); + log.fine("Binding=" + binding + " - IsSOTrx=" + isSOTrx); + // Force same WH for all but SO/PO + int header_M_Warehouse_ID = getM_Warehouse_ID(); + if (MDocType.DOCSUBTYPESO_StandardOrder.equals(dt.getDocSubTypeSO()) + || MDocType.DOCBASETYPE_PurchaseOrder.equals(dt.getDocBaseType())) + header_M_Warehouse_ID = 0; // don't enforce + + BigDecimal Volume = Env.ZERO; + BigDecimal Weight = Env.ZERO; + + // Always check and (un) Reserve Inventory + for (int i = 0; i < lines.length; i++) + { + MOrderLine line = lines[i]; + // Check/set WH/Org + if (header_M_Warehouse_ID != 0) // enforce WH + { + if (header_M_Warehouse_ID != line.getM_Warehouse_ID()) + line.setM_Warehouse_ID(header_M_Warehouse_ID); + if (getAD_Org_ID() != line.getAD_Org_ID()) + line.setAD_Org_ID(getAD_Org_ID()); + } + // Binding + BigDecimal target = binding ? line.getQtyOrdered() : Env.ZERO; + BigDecimal difference = target + .subtract(line.getQtyReserved()) + .subtract(line.getQtyDelivered()); + if (difference.signum() == 0) + { + MProduct product = line.getProduct(); + if (product != null) + { + Volume = Volume.add(product.getVolume().multiply(line.getQtyOrdered())); + Weight = Weight.add(product.getWeight().multiply(line.getQtyOrdered())); + } + continue; + } + + log.fine("Line=" + line.getLine() + + " - Target=" + target + ",Difference=" + difference + + " - Ordered=" + line.getQtyOrdered() + + ",Reserved=" + line.getQtyReserved() + ",Delivered=" + line.getQtyDelivered()); + + // Check Product - Stocked and Item + MProduct product = line.getProduct(); + if (product != null) + { + if (product.isStocked()) + { + BigDecimal ordered = isSOTrx ? Env.ZERO : difference; + BigDecimal reserved = isSOTrx ? difference : Env.ZERO; + int M_Locator_ID = 0; + // Get Locator to reserve + if (line.getM_AttributeSetInstance_ID() != 0) // Get existing Location + M_Locator_ID = MStorage.getM_Locator_ID (line.getM_Warehouse_ID(), + line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), + ordered, get_TrxName()); + // Get default Location + if (M_Locator_ID == 0) + { + // try to take default locator for product first + // if it is from the selected warehouse + MWarehouse wh = MWarehouse.get(getCtx(), line.getM_Warehouse_ID()); + M_Locator_ID = product.getM_Locator_ID(); + if (M_Locator_ID!=0) { + MLocator locator = new MLocator(getCtx(), product.getM_Locator_ID(), get_TrxName()); + //product has default locator defined but is not from the order warehouse + if(locator.getM_Warehouse_ID()!=wh.get_ID()) { + M_Locator_ID = wh.getDefaultLocator().getM_Locator_ID(); + } + } else { + M_Locator_ID = wh.getDefaultLocator().getM_Locator_ID(); + } + } + // Update Storage + if (!MStorage.add(getCtx(), line.getM_Warehouse_ID(), M_Locator_ID, + line.getM_Product_ID(), + line.getM_AttributeSetInstance_ID(), line.getM_AttributeSetInstance_ID(), + Env.ZERO, reserved, ordered, get_TrxName())) + return false; + } // stockec + // update line + line.setQtyReserved(line.getQtyReserved().add(difference)); + if (!line.save(get_TrxName())) + return false; + // + Volume = Volume.add(product.getVolume().multiply(line.getQtyOrdered())); + Weight = Weight.add(product.getWeight().multiply(line.getQtyOrdered())); + } // product + } // reverse inventory + + setVolume(Volume); + setWeight(Weight); + return true; + } // reserveStock + + /** + * Calculate Tax and Total + * @return true if tax total calculated + */ + public boolean calculateTaxTotal() + { + log.fine(""); + // Delete Taxes + DB.executeUpdate("DELETE C_OrderTax WHERE C_Order_ID=" + getC_Order_ID(), get_TrxName()); + m_taxes = null; + + // Lines + BigDecimal totalLines = Env.ZERO; + ArrayList taxList = new ArrayList(); + MOrderLine[] lines = getLines(); + for (int i = 0; i < lines.length; i++) + { + MOrderLine line = lines[i]; + Integer taxID = new Integer(line.getC_Tax_ID()); + if (!taxList.contains(taxID)) + { + MOrderTax oTax = MOrderTax.get (line, getPrecision(), + false, get_TrxName()); // current Tax + oTax.setIsTaxIncluded(isTaxIncluded()); + if (!oTax.calculateTaxFromLines()) + return false; + if (!oTax.save(get_TrxName())) + return false; + taxList.add(taxID); + } + totalLines = totalLines.add(line.getLineNetAmt()); + } + + // Taxes + BigDecimal grandTotal = totalLines; + MOrderTax[] taxes = getTaxes(true); + for (int i = 0; i < taxes.length; i++) + { + MOrderTax oTax = taxes[i]; + MTax tax = oTax.getTax(); + if (tax.isSummary()) + { + MTax[] cTaxes = tax.getChildTaxes(false); + for (int j = 0; j < cTaxes.length; j++) + { + MTax cTax = cTaxes[j]; + BigDecimal taxAmt = cTax.calculateTax(oTax.getTaxBaseAmt(), isTaxIncluded(), getPrecision()); + // + MOrderTax newOTax = new MOrderTax(getCtx(), 0, get_TrxName()); + newOTax.setClientOrg(this); + newOTax.setC_Order_ID(getC_Order_ID()); + newOTax.setC_Tax_ID(cTax.getC_Tax_ID()); + newOTax.setPrecision(getPrecision()); + newOTax.setIsTaxIncluded(isTaxIncluded()); + newOTax.setTaxBaseAmt(oTax.getTaxBaseAmt()); + newOTax.setTaxAmt(taxAmt); + if (!newOTax.save(get_TrxName())) + return false; + // + if (!isTaxIncluded()) + grandTotal = grandTotal.add(taxAmt); + } + if (!oTax.delete(true, get_TrxName())) + return false; + if (!oTax.save(get_TrxName())) + return false; + } + else + { + if (!isTaxIncluded()) + grandTotal = grandTotal.add(oTax.getTaxAmt()); + } + } + // + setTotalLines(totalLines); + setGrandTotal(grandTotal); + return true; + } // calculateTaxTotal + + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info("approveIt - " + toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info("rejectIt - " + toString()); + setIsApproved(false); + return true; + } // rejectIt + + + /************************************************************************** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + String DocSubTypeSO = dt.getDocSubTypeSO(); + + // Just prepare + if (DOCACTION_Prepare.equals(getDocAction())) + { + setProcessed(false); + return DocAction.STATUS_InProgress; + } + // Offers + if (MDocType.DOCSUBTYPESO_Proposal.equals(DocSubTypeSO) + || MDocType.DOCSUBTYPESO_Quotation.equals(DocSubTypeSO)) + { + // Binding + if (MDocType.DOCSUBTYPESO_Quotation.equals(DocSubTypeSO)) + reserveStock(dt, getLines(true, "M_Product_ID")); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + setProcessed(true); + return DocAction.STATUS_Completed; + } + // Waiting Payment - until we have a payment + if (!m_forceCreation + && MDocType.DOCSUBTYPESO_PrepayOrder.equals(DocSubTypeSO) + && getC_Payment_ID() == 0 && getC_CashLine_ID() == 0) + { + setProcessed(true); + return DocAction.STATUS_WaitingPayment; + } + + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Implicit Approval + if (!isApproved()) + approveIt(); + getLines(true,null); + log.info(toString()); + StringBuffer info = new StringBuffer(); + + boolean realTimePOS = false; + + // Create SO Shipment - Force Shipment + MInOut shipment = null; + if (MDocType.DOCSUBTYPESO_OnCreditOrder.equals(DocSubTypeSO) // (W)illCall(I)nvoice + || MDocType.DOCSUBTYPESO_WarehouseOrder.equals(DocSubTypeSO) // (W)illCall(P)ickup + || MDocType.DOCSUBTYPESO_POSOrder.equals(DocSubTypeSO) // (W)alkIn(R)eceipt + || MDocType.DOCSUBTYPESO_PrepayOrder.equals(DocSubTypeSO)) + { + if (!DELIVERYRULE_Force.equals(getDeliveryRule())) + setDeliveryRule(DELIVERYRULE_Force); + // + shipment = createShipment (dt, realTimePOS ? null : getDateOrdered()); + if (shipment == null) + return DocAction.STATUS_Invalid; + info.append("@M_InOut_ID@: ").append(shipment.getDocumentNo()); + String msg = shipment.getProcessMsg(); + if (msg != null && msg.length() > 0) + info.append(" (").append(msg).append(")"); + } // Shipment + + + // Create SO Invoice - Always invoice complete Order + if ( MDocType.DOCSUBTYPESO_POSOrder.equals(DocSubTypeSO) + || MDocType.DOCSUBTYPESO_OnCreditOrder.equals(DocSubTypeSO) + || MDocType.DOCSUBTYPESO_PrepayOrder.equals(DocSubTypeSO)) + { + MInvoice invoice = createInvoice (dt, shipment, realTimePOS ? null : getDateOrdered()); + if (invoice == null) + return DocAction.STATUS_Invalid; + info.append(" - @C_Invoice_ID@: ").append(invoice.getDocumentNo()); + String msg = invoice.getProcessMsg(); + if (msg != null && msg.length() > 0) + info.append(" (").append(msg).append(")"); + } // Invoice + + // Counter Documents + MOrder counter = createCounterDoc(); + if (counter != null) + info.append(" - @CounterDoc@: @Order@=").append(counter.getDocumentNo()); + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + if (info.length() > 0) + info.append(" - "); + info.append(valid); + m_processMsg = info.toString(); + return DocAction.STATUS_Invalid; + } + + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + + setProcessed(true); + m_processMsg = info.toString(); + // + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Set the definite document number after completed + */ + private void setDefiniteDocumentNo() { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (dt.isOverwriteDateOnComplete()) { + setDateOrdered(new Timestamp (System.currentTimeMillis())); + } + if (dt.isOverwriteSeqOnComplete()) { + String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); + if (value != null) + setDocumentNo(value); + } + } + + /** + * Create Shipment + * @param dt order document type + * @param movementDate optional movement date (default today) + * @return shipment or null + */ + private MInOut createShipment(MDocType dt, Timestamp movementDate) + { + log.info("For " + dt); + MInOut shipment = new MInOut (this, dt.getC_DocTypeShipment_ID(), movementDate); + // shipment.setDateAcct(getDateAcct()); + if (!shipment.save(get_TrxName())) + { + m_processMsg = "Could not create Shipment"; + return null; + } + // + MOrderLine[] oLines = getLines(true, null); + for (int i = 0; i < oLines.length; i++) + { + MOrderLine oLine = oLines[i]; + // + MInOutLine ioLine = new MInOutLine(shipment); + // Qty = Ordered - Delivered + BigDecimal MovementQty = oLine.getQtyOrdered().subtract(oLine.getQtyDelivered()); + // Location + int M_Locator_ID = MStorage.getM_Locator_ID (oLine.getM_Warehouse_ID(), + oLine.getM_Product_ID(), oLine.getM_AttributeSetInstance_ID(), + MovementQty, get_TrxName()); + if (M_Locator_ID == 0) // Get default Location + { + MWarehouse wh = MWarehouse.get(getCtx(), oLine.getM_Warehouse_ID()); + M_Locator_ID = wh.getDefaultLocator().getM_Locator_ID(); + } + // + ioLine.setOrderLine(oLine, M_Locator_ID, MovementQty); + ioLine.setQty(MovementQty); + if (oLine.getQtyEntered().compareTo(oLine.getQtyOrdered()) != 0) + ioLine.setQtyEntered(MovementQty + .multiply(oLine.getQtyEntered()) + .divide(oLine.getQtyOrdered(), 6, BigDecimal.ROUND_HALF_UP)); + if (!ioLine.save(get_TrxName())) + { + m_processMsg = "Could not create Shipment Line"; + return null; + } + } + // Manually Process Shipment + String status = shipment.completeIt(); + shipment.setDocStatus(status); + shipment.save(get_TrxName()); + if (!DOCSTATUS_Completed.equals(status)) + { + m_processMsg = "@M_InOut_ID@: " + shipment.getProcessMsg(); + return null; + } + return shipment; + } // createShipment + + /** + * Create Invoice + * @param dt order document type + * @param shipment optional shipment + * @param invoiceDate invoice date + * @return invoice or null + */ + private MInvoice createInvoice (MDocType dt, MInOut shipment, Timestamp invoiceDate) + { + log.info(dt.toString()); + MInvoice invoice = new MInvoice (this, dt.getC_DocTypeInvoice_ID(), invoiceDate); + if (!invoice.save(get_TrxName())) + { + m_processMsg = "Could not create Invoice"; + return null; + } + + // If we have a Shipment - use that as a base + if (shipment != null) + { + if (!INVOICERULE_AfterDelivery.equals(getInvoiceRule())) + setInvoiceRule(INVOICERULE_AfterDelivery); + // + MInOutLine[] sLines = shipment.getLines(false); + for (int i = 0; i < sLines.length; i++) + { + MInOutLine sLine = sLines[i]; + // + MInvoiceLine iLine = new MInvoiceLine(invoice); + iLine.setShipLine(sLine); + // Qty = Delivered + iLine.setQtyEntered(sLine.getQtyEntered()); + iLine.setQtyInvoiced(sLine.getMovementQty()); + if (!iLine.save(get_TrxName())) + { + m_processMsg = "Could not create Invoice Line from Shipment Line"; + return null; + } + // + sLine.setIsInvoiced(true); + if (!sLine.save(get_TrxName())) + { + log.warning("Could not update Shipment line: " + sLine); + } + } + } + else // Create Invoice from Order + { + if (!INVOICERULE_Immediate.equals(getInvoiceRule())) + setInvoiceRule(INVOICERULE_Immediate); + // + MOrderLine[] oLines = getLines(); + for (int i = 0; i < oLines.length; i++) + { + MOrderLine oLine = oLines[i]; + // + MInvoiceLine iLine = new MInvoiceLine(invoice); + iLine.setOrderLine(oLine); + // Qty = Ordered - Invoiced + iLine.setQtyInvoiced(oLine.getQtyOrdered().subtract(oLine.getQtyInvoiced())); + if (oLine.getQtyOrdered().compareTo(oLine.getQtyEntered()) == 0) + iLine.setQtyEntered(iLine.getQtyInvoiced()); + else + iLine.setQtyEntered(iLine.getQtyInvoiced().multiply(oLine.getQtyEntered()) + .divide(oLine.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP)); + if (!iLine.save(get_TrxName())) + { + m_processMsg = "Could not create Invoice Line from Order Line"; + return null; + } + } + } + // Manually Process Invoice + String status = invoice.completeIt(); + invoice.setDocStatus(status); + invoice.save(get_TrxName()); + setC_CashLine_ID(invoice.getC_CashLine_ID()); + if (!DOCSTATUS_Completed.equals(status)) + { + m_processMsg = "@C_Invoice_ID@: " + invoice.getProcessMsg(); + return null; + } + return invoice; + } // createInvoice + + /** + * Create Counter Document + * @return counter order + */ + private MOrder createCounterDoc() + { + // Is this itself a counter doc ? + if (getRef_Order_ID() != 0) + return null; + + // Org Must be linked to BPartner + MOrg org = MOrg.get(getCtx(), getAD_Org_ID()); + int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName()); + if (counterC_BPartner_ID == 0) + return null; + // Business Partner needs to be linked to Org + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int(); + if (counterAD_Org_ID == 0) + return null; + + MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, null); + MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID); + log.info("Counter BP=" + counterBP.getName()); + + // Document Type + int C_DocTypeTarget_ID = 0; + MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID()); + if (counterDT != null) + { + log.fine(counterDT.toString()); + if (!counterDT.isCreateCounter() || !counterDT.isValid()) + return null; + C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID(); + } + else // indirect + { + C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID()); + log.fine("Indirect C_DocTypeTarget_ID=" + C_DocTypeTarget_ID); + if (C_DocTypeTarget_ID <= 0) + return null; + } + // Deep Copy + MOrder counter = copyFrom (this, getDateOrdered(), + C_DocTypeTarget_ID, !isSOTrx(), true, false, get_TrxName()); + // + counter.setAD_Org_ID(counterAD_Org_ID); + counter.setM_Warehouse_ID(counterOrgInfo.getM_Warehouse_ID()); + // + counter.setBPartner(counterBP); + counter.setDatePromised(getDatePromised()); // default is date ordered + // Refernces (Should not be required + counter.setSalesRep_ID(getSalesRep_ID()); + counter.save(get_TrxName()); + + // Update copied lines + MOrderLine[] counterLines = counter.getLines(true, null); + for (int i = 0; i < counterLines.length; i++) + { + MOrderLine counterLine = counterLines[i]; + counterLine.setOrder(counter); // copies header values (BP, etc.) + counterLine.setPrice(); + counterLine.setTax(); + counterLine.save(get_TrxName()); + } + log.fine(counter.toString()); + + // Document Action + if (counterDT != null) + { + if (counterDT.getDocAction() != null) + { + counter.setDocAction(counterDT.getDocAction()); + counter.processIt(counterDT.getDocAction()); + counter.save(get_TrxName()); + } + } + return counter; + } // createCounterDoc + + /** + * Void Document. + * Set Qtys to 0 - Sales: reverse all documents + * @return true if success + */ + public boolean voidIt() + { + log.info(toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + MOrderLine[] lines = getLines(true, "M_Product_ID"); + for (int i = 0; i < lines.length; i++) + { + MOrderLine line = lines[i]; + BigDecimal old = line.getQtyOrdered(); + if (old.signum() != 0) + { + line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")"); + line.setQty(Env.ZERO); + line.setLineNetAmt(Env.ZERO); + line.save(get_TrxName()); + } + } + addDescription(Msg.getMsg(getCtx(), "Voided")); + // Clear Reservations + if (!reserveStock(null, lines)) + { + m_processMsg = "Cannot unreserve Stock (void)"; + return false; + } + + if (!createReversals()) + return false; + + //MZ Goodwill + if (!isSOTrx()) + { + // delete Matched PO Cost Detail + MOrderLine[] linesMZ = getLines(); + for (int i = 0; i < lines.length; i++) + { + MMatchPO[] mPO = MMatchPO.getOrderLine(getCtx(), linesMZ[i].getC_OrderLine_ID(), get_TrxName()); + // delete Cost Detail if the Matched PO has been deleted + if (mPO.length == 0) + { + MCostDetail cd = MCostDetail.get(getCtx(), "C_OrderLine_ID=? AND M_AttributeSetInstance_ID=?", + linesMZ[i].getC_OrderLine_ID(), linesMZ[i].getM_AttributeSetInstance_ID(), get_TrxName()); + if (cd != null) + { + cd.setProcessed(false); + cd.delete(true); + } + } + } + } + //End MZ + + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // voidIt + + /** + * Create Shipment/Invoice Reversals + * @return true if success + */ + private boolean createReversals() + { + // Cancel only Sales + if (!isSOTrx()) + return true; + + log.info("createReversals"); + StringBuffer info = new StringBuffer(); + + // Reverse All *Shipments* + info.append("@M_InOut_ID@:"); + MInOut[] shipments = getShipments(); + for (int i = 0; i < shipments.length; i++) + { + MInOut ship = shipments[i]; + // if closed - ignore + if (MInOut.DOCSTATUS_Closed.equals(ship.getDocStatus()) + || MInOut.DOCSTATUS_Reversed.equals(ship.getDocStatus()) + || MInOut.DOCSTATUS_Voided.equals(ship.getDocStatus()) ) + continue; + ship.set_TrxName(get_TrxName()); + + // If not completed - void - otherwise reverse it + if (!MInOut.DOCSTATUS_Completed.equals(ship.getDocStatus())) + { + if (ship.voidIt()) + ship.setDocStatus(MInOut.DOCSTATUS_Voided); + } + else if (ship.reverseCorrectIt()) // completed shipment + { + ship.setDocStatus(MInOut.DOCSTATUS_Reversed); + info.append(" ").append(ship.getDocumentNo()); + } + else + { + m_processMsg = "Could not reverse Shipment " + ship; + return false; + } + ship.setDocAction(MInOut.DOCACTION_None); + ship.save(get_TrxName()); + } // for all shipments + + // Reverse All *Invoices* + info.append(" - @C_Invoice_ID@:"); + MInvoice[] invoices = getInvoices(); + for (int i = 0; i < invoices.length; i++) + { + MInvoice invoice = invoices[i]; + // if closed - ignore + if (MInvoice.DOCSTATUS_Closed.equals(invoice.getDocStatus()) + || MInvoice.DOCSTATUS_Reversed.equals(invoice.getDocStatus()) + || MInvoice.DOCSTATUS_Voided.equals(invoice.getDocStatus()) ) + continue; + invoice.set_TrxName(get_TrxName()); + + // If not completed - void - otherwise reverse it + if (!MInvoice.DOCSTATUS_Completed.equals(invoice.getDocStatus())) + { + if (invoice.voidIt()) + invoice.setDocStatus(MInvoice.DOCSTATUS_Voided); + } + else if (invoice.reverseCorrectIt()) // completed invoice + { + invoice.setDocStatus(MInvoice.DOCSTATUS_Reversed); + info.append(" ").append(invoice.getDocumentNo()); + } + else + { + m_processMsg = "Could not reverse Invoice " + invoice; + return false; + } + invoice.setDocAction(MInvoice.DOCACTION_None); + invoice.save(get_TrxName()); + } // for all shipments + + m_processMsg = info.toString(); + return true; + } // createReversals + + + /** + * Close Document. + * Cancel not delivered Qunatities + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + + // Close Not delivered Qty - SO/PO + MOrderLine[] lines = getLines(true, "M_Product_ID"); + for (int i = 0; i < lines.length; i++) + { + MOrderLine line = lines[i]; + BigDecimal old = line.getQtyOrdered(); + if (old.compareTo(line.getQtyDelivered()) != 0) + { + line.setQtyLostSales(line.getQtyOrdered().subtract(line.getQtyDelivered())); + line.setQtyOrdered(line.getQtyDelivered()); + // QtyEntered unchanged + line.addDescription("Close (" + old + ")"); + line.save(get_TrxName()); + } + } + // Clear Reservations + if (!reserveStock(null, lines)) + { + m_processMsg = "Cannot unreserve Stock (close)"; + return false; + } + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // closeIt + + /** + * @author: phib + * re-open a closed order + * (reverse steps of close()) + */ + public String reopenIt() { + log.info(toString()); + if (!MOrder.DOCSTATUS_Closed.equals(getDocStatus())) + { + return "Not closed - can't reopen"; + } + + // + MOrderLine[] lines = getLines(true, "M_Product_ID"); + for (int i = 0; i < lines.length; i++) + { + MOrderLine line = lines[i]; + if (Env.ZERO.compareTo(line.getQtyLostSales()) != 0) + { + line.setQtyOrdered(line.getQtyLostSales().add(line.getQtyDelivered())); + line.setQtyLostSales(Env.ZERO); + // QtyEntered unchanged + + // Strip Close() tags from description + String desc = line.getDescription(); + if (desc == null) + desc = ""; + Pattern pattern = Pattern.compile("( \\| )?Close \\(.*\\)"); + String[] parts = pattern.split(desc); + desc = ""; + for (String s : parts) { + desc = desc.concat(s); + } + line.setDescription(desc); + if (!line.save(get_TrxName())) + return "Couldn't save orderline"; + } + } + // Clear Reservations + if (!reserveStock(null, lines)) + { + m_processMsg = "Cannot unreserve Stock (close)"; + return "Failed to update reservations"; + } + + setDocStatus(MOrder.DOCSTATUS_Completed); + setDocAction(DOCACTION_Close); + if (!this.save(get_TrxName())) + return "Couldn't save reopened order"; + else + return ""; + } // reopenIt + /** + * Reverse Correction - same void + * @return true if success + */ + public boolean reverseCorrectIt() + { + log.info(toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + + return voidIt(); + } // reverseCorrectionIt + + /** + * Reverse Accrual - none + * @return false + */ + public boolean reverseAccrualIt() + { + log.info(toString()); + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return false; + } // reverseAccrualIt + + /** + * Re-activate. + * @return true if success + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + + + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + String DocSubTypeSO = dt.getDocSubTypeSO(); + + // Replace Prepay with POS to revert all doc + if (MDocType.DOCSUBTYPESO_PrepayOrder.equals (DocSubTypeSO)) + { + MDocType newDT = null; + MDocType[] dts = MDocType.getOfClient (getCtx()); + for (int i = 0; i < dts.length; i++) + { + MDocType type = dts[i]; + if (MDocType.DOCSUBTYPESO_PrepayOrder.equals(type.getDocSubTypeSO())) + { + if (type.isDefault() || newDT == null) + newDT = type; + } + } + if (newDT == null) + return false; + else + setC_DocType_ID (newDT.getC_DocType_ID()); + } + + // PO - just re-open + if (!isSOTrx()) + log.info("Existing documents not modified - " + dt); + // Reverse Direct Documents + else if (MDocType.DOCSUBTYPESO_OnCreditOrder.equals(DocSubTypeSO) // (W)illCall(I)nvoice + || MDocType.DOCSUBTYPESO_WarehouseOrder.equals(DocSubTypeSO) // (W)illCall(P)ickup + || MDocType.DOCSUBTYPESO_POSOrder.equals(DocSubTypeSO)) // (W)alkIn(R)eceipt + { + if (!createReversals()) + return false; + } + else + { + log.info("Existing documents not modified - SubType=" + DocSubTypeSO); + } + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + setDocAction(DOCACTION_Complete); + setProcessed(false); + return true; + } // reActivateIt + + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Grand Total = 123.00 (#1) + sb.append(": "). + append(Msg.translate(getCtx(),"GrandTotal")).append("=").append(getGrandTotal()); + if (m_lines != null) + sb.append(" (#").append(m_lines.length).append(")"); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID + */ + public int getDoc_User_ID() + { + return getSalesRep_ID(); + } // getDoc_User_ID + + /** + * Get Document Approval Amount + * @return amount + */ + public BigDecimal getApprovalAmt() + { + return getGrandTotal(); + } // getApprovalAmt + +} // MOrder diff --git a/base/src/org/compiere/model/MPayment.java b/base/src/org/compiere/model/MPayment.java new file mode 100644 index 0000000000..31146aa12f --- /dev/null +++ b/base/src/org/compiere/model/MPayment.java @@ -0,0 +1,2408 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.*; +import java.math.*; +import java.rmi.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; + +import org.compiere.db.*; +import org.compiere.interfaces.*; +import org.compiere.process.*; +import org.compiere.util.*; + +/** + * Payment Model. + * - retrieve and create payments for invoice + *
    + *  Event chain
    + *  - Payment inserted
    + *      C_Payment_Trg fires
    + *          update DocumentNo with payment summary
    + *  - Payment posted (C_Payment_Post)
    + *      create allocation line
    + *          C_Allocation_Trg fires
    + *              Update C_BPartner Open Item Amount
    + *      update invoice (IsPaid)
    + *      link invoice-payment if batch
    + *
    + *  Lifeline:
    + *  -   Created by VPayment or directly
    + *  -   When changed in VPayment
    + *      - old payment is reversed
    + *      - new payment created
    + *
    + *  When Payment is posed, the Allocation is made
    + *  
    + * @author Jorg Janke + * @author victor.perez@e-evolution.com, e-Evolution + *
  • FR [ 1948157 ] Is necessary the reference for document reverse + * @see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962 + * @version $Id: MPayment.java,v 1.4 2006/10/02 05:18:39 jjanke Exp $ + * @author victor.perez@e-evolution.com www.e-evolution.com FR [ 1866214 ] http://sourceforge.net/tracker/index.php?func=detail&aid=1866214&group_id=176962&atid=879335 + */ +public final class MPayment extends X_C_Payment + implements DocAction, ProcessCall +{ + /** + * Get Payments Of BPartner + * @param ctx context + * @param C_BPartner_ID id + * @param trxName transaction + * @return array + */ + public static MPayment[] getOfBPartner (Properties ctx, int C_BPartner_ID, String trxName) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM C_Payment WHERE C_BPartner_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, trxName); + pstmt.setInt(1, C_BPartner_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new MPayment(ctx,rs, trxName)); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + // + MPayment[] retValue = new MPayment[list.size()]; + list.toArray(retValue); + return retValue; + } // getOfBPartner + + + /************************************************************************** + * Default Constructor + * @param ctx context + * @param C_Payment_ID payment to load, (0 create new payment) + * @param trxName trx name + */ + public MPayment (Properties ctx, int C_Payment_ID, String trxName) + { + super (ctx, C_Payment_ID, trxName); + // New + if (C_Payment_ID == 0) + { + setDocAction(DOCACTION_Complete); + setDocStatus(DOCSTATUS_Drafted); + setTrxType(TRXTYPE_Sales); + // + setR_AvsAddr (R_AVSZIP_Unavailable); + setR_AvsZip (R_AVSZIP_Unavailable); + // + setIsReceipt (true); + setIsApproved (false); + setIsReconciled (false); + setIsAllocated(false); + setIsOnline (false); + setIsSelfService(false); + setIsDelayedCapture (false); + setIsPrepayment(false); + setProcessed(false); + setProcessing(false); + setPosted (false); + // + setPayAmt(Env.ZERO); + setDiscountAmt(Env.ZERO); + setTaxAmt(Env.ZERO); + setWriteOffAmt(Env.ZERO); + setIsOverUnderPayment (false); + setOverUnderAmt(Env.ZERO); + // + setDateTrx (new Timestamp(System.currentTimeMillis())); + setDateAcct (getDateTrx()); + setTenderType(TENDERTYPE_Check); + } + } // MPayment + + /** + * Load Constructor + * @param ctx context + * @param rs result set record + * @param trxName transaction + */ + public MPayment (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MPayment + + /** Temporary Payment Processors */ + private MPaymentProcessor[] m_mPaymentProcessors = null; + /** Temporary Payment Processor */ + private MPaymentProcessor m_mPaymentProcessor = null; + /** Logger */ + private static CLogger s_log = CLogger.getCLogger (MPayment.class); + /** Error Message */ + private String m_errorMessage = null; + + /** Reversal Indicator */ + public static String REVERSE_INDICATOR = "^"; + + /** + * Reset Payment to new status + */ + public void resetNew() + { + setC_Payment_ID(0); // forces new Record + set_ValueNoCheck ("DocumentNo", null); + setDocAction(DOCACTION_Prepare); + setDocStatus(DOCSTATUS_Drafted); + setProcessed(false); + setPosted (false); + setIsReconciled (false); + setIsAllocated(false); + setIsOnline(false); + setIsDelayedCapture (false); + // setC_BPartner_ID(0); + setC_Invoice_ID(0); + setC_Order_ID(0); + setC_Charge_ID(0); + setC_Project_ID(0); + setIsPrepayment(false); + } // resetNew + + /** + * Is Cashbook Transfer Trx + * @return true if Cash Trx + */ + public boolean isCashTrx() + { + return "X".equals(getTenderType()); + } // isCashTrx + + /************************************************************************** + * Set Credit Card. + * Need to set PatmentProcessor after Amount/Currency Set + * + * @param TrxType Transaction Type see TRX_ + * @param creditCardType CC type + * @param creditCardNumber CC number + * @param creditCardVV CC verification + * @param creditCardExpMM CC Exp MM + * @param creditCardExpYY CC Exp YY + * @return true if valid + */ + public boolean setCreditCard (String TrxType, String creditCardType, String creditCardNumber, + String creditCardVV, int creditCardExpMM, int creditCardExpYY) + { + setTenderType(TENDERTYPE_CreditCard); + setTrxType(TrxType); + // + setCreditCardType (creditCardType); + setCreditCardNumber (creditCardNumber); + setCreditCardVV (creditCardVV); + setCreditCardExpMM (creditCardExpMM); + setCreditCardExpYY (creditCardExpYY); + // + int check = MPaymentValidate.validateCreditCardNumber(creditCardNumber, creditCardType).length() + + MPaymentValidate.validateCreditCardExp(creditCardExpMM, creditCardExpYY).length(); + if (creditCardVV.length() > 0) + check += MPaymentValidate.validateCreditCardVV(creditCardVV, creditCardType).length(); + return check == 0; + } // setCreditCard + + /** + * Set Credit Card - Exp. + * Need to set PatmentProcessor after Amount/Currency Set + * + * @param TrxType Transaction Type see TRX_ + * @param creditCardType CC type + * @param creditCardNumber CC number + * @param creditCardVV CC verification + * @param creditCardExp CC Exp + * @return true if valid + */ + public boolean setCreditCard (String TrxType, String creditCardType, String creditCardNumber, + String creditCardVV, String creditCardExp) + { + return setCreditCard(TrxType, creditCardType, creditCardNumber, + creditCardVV, MPaymentValidate.getCreditCardExpMM(creditCardExp), + MPaymentValidate.getCreditCardExpYY(creditCardExp)); + } // setCreditCard + + /** + * Set ACH BankAccount Info + * + * @param C_BankAccount_ID bank account + * @param isReceipt true if receipt + * @return true if valid + */ + public boolean setBankACH (MPaySelectionCheck preparedPayment) + { + // Our Bank + setC_BankAccount_ID(preparedPayment.getParent().getC_BankAccount_ID()); + // Target Bank + int C_BP_BankAccount_ID = preparedPayment.getC_BP_BankAccount_ID(); + MBPBankAccount ba = new MBPBankAccount (preparedPayment.getCtx(), C_BP_BankAccount_ID, null); + setRoutingNo(ba.getRoutingNo()); + setAccountNo(ba.getAccountNo()); + setIsReceipt (X_C_Order.PAYMENTRULE_DirectDebit.equals // AR only + (preparedPayment.getPaymentRule())); + // + int check = MPaymentValidate.validateRoutingNo(getRoutingNo()).length() + + MPaymentValidate.validateAccountNo(getAccountNo()).length(); + return check == 0; + } // setBankACH + + /** + * Set ACH BankAccount Info + * + * @param C_BankAccount_ID bank account + * @param isReceipt true if receipt + * @param tenderType - Direct Debit or Direct Deposit + * @param routingNo routing + * @param accountNo account + * @return true if valid + */ + public boolean setBankACH (int C_BankAccount_ID, boolean isReceipt, String tenderType, + String routingNo, String accountNo) + { + setTenderType (tenderType); + setIsReceipt (isReceipt); + // + if (C_BankAccount_ID > 0 + && (routingNo == null || routingNo.length() == 0 || accountNo == null || accountNo.length() == 0)) + setBankAccountDetails(C_BankAccount_ID); + else + { + setC_BankAccount_ID(C_BankAccount_ID); + setRoutingNo (routingNo); + setAccountNo (accountNo); + } + setCheckNo (""); + // + int check = MPaymentValidate.validateRoutingNo(routingNo).length() + + MPaymentValidate.validateAccountNo(accountNo).length(); + return check == 0; + } // setBankACH + + /** + * Set Check BankAccount Info + * + * @param C_BankAccount_ID bank account + * @param isReceipt true if receipt + * @param checkNo chack no + * @return true if valid + */ + public boolean setBankCheck (int C_BankAccount_ID, boolean isReceipt, String checkNo) + { + return setBankCheck (C_BankAccount_ID, isReceipt, null, null, checkNo); + } // setBankCheck + + /** + * Set Check BankAccount Info + * + * @param C_BankAccount_ID bank account + * @param isReceipt true if receipt + * @param routingNo routing no + * @param accountNo account no + * @param checkNo chack no + * @return true if valid + */ + public boolean setBankCheck (int C_BankAccount_ID, boolean isReceipt, + String routingNo, String accountNo, String checkNo) + { + setTenderType (TENDERTYPE_Check); + setIsReceipt (isReceipt); + // + if (C_BankAccount_ID > 0 + && (routingNo == null || routingNo.length() == 0 + || accountNo == null || accountNo.length() == 0)) + setBankAccountDetails(C_BankAccount_ID); + else + { + setC_BankAccount_ID(C_BankAccount_ID); + setRoutingNo (routingNo); + setAccountNo (accountNo); + } + setCheckNo (checkNo); + // + int check = MPaymentValidate.validateRoutingNo(routingNo).length() + + MPaymentValidate.validateAccountNo(accountNo).length() + + MPaymentValidate.validateCheckNo(checkNo).length(); + return check == 0; // no error message + } // setBankCheck + + /** + * Set Bank Account Details. + * Look up Routing No & Bank Acct No + * @param C_BankAccount_ID bank account + */ + public void setBankAccountDetails (int C_BankAccount_ID) + { + if (C_BankAccount_ID == 0) + return; + setC_BankAccount_ID(C_BankAccount_ID); + // + String sql = "SELECT b.RoutingNo, ba.AccountNo " + + "FROM C_BankAccount ba" + + " INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID) " + + "WHERE C_BankAccount_ID=?"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, C_BankAccount_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + setRoutingNo (rs.getString(1)); + setAccountNo (rs.getString(2)); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + } // setBankAccountDetails + + /** + * Set Account Address + * + * @param name name + * @param street street + * @param city city + * @param state state + * @param zip zip + * @param country country + */ + public void setAccountAddress (String name, String street, + String city, String state, String zip, String country) + { + setA_Name (name); + setA_Street (street); + setA_City (city); + setA_State (state); + setA_Zip (zip); + setA_Country(country); + } // setAccountAddress + + + /************************************************************************** + * Process Payment + * @return true if approved + */ + public boolean processOnline() + { + log.info ("Amt=" + getPayAmt()); + // + setIsOnline(true); + setErrorMessage(null); + // prevent charging twice + if (isApproved()) + { + log.info("Already processed - " + getR_Result() + " - " + getR_RespMsg()); + setErrorMessage("Payment already Processed"); + return true; + } + + if (m_mPaymentProcessor == null) + setPaymentProcessor(); + if (m_mPaymentProcessor == null) + { + log.log(Level.WARNING, "No Payment Processor Model"); + setErrorMessage("No Payment Processor Model"); + return false; + } + + boolean approved = false; + /** Process Payment on Server */ + if (DB.isRemoteObjects()) + { + Server server = CConnection.get().getServer(); + try + { + if (server != null) + { // See ServerBean + String trxName = null; // unconditionally save + save(trxName); // server reads from disk + approved = server.paymentOnline (getCtx(), getC_Payment_ID(), + m_mPaymentProcessor.getC_PaymentProcessor_ID(), trxName); + if (CLogMgt.isLevelFinest()) + s_log.fine("server => " + approved); + load(trxName); // server saves to disk + setIsApproved(approved); + return approved; + } + log.log(Level.WARNING, "AppsServer not found"); + } + catch (RemoteException ex) + { + log.log(Level.SEVERE, "AppsServer error", ex); + } + } + /** **/ + + // Try locally + try + { + PaymentProcessor pp = PaymentProcessor.create(m_mPaymentProcessor, this); + if (pp == null) + setErrorMessage("No Payment Processor"); + else + { + approved = pp.processCC (); + if (approved) + setErrorMessage(null); + else + setErrorMessage("From " + getCreditCardName() + ": " + getR_RespMsg()); + } + } + catch (Exception e) + { + log.log(Level.SEVERE, "processOnline", e); + setErrorMessage("Payment Processor Error"); + } + setIsApproved(approved); + return approved; + } // processOnline + + /** + * Process Online Payment. + * implements ProcessCall after standard constructor + * Called when pressing the Process_Online button in C_Payment + * + * @param ctx Context + * @param pi Process Info + * @param trx transaction + * @return true if the next process should be performed + */ + public boolean startProcess (Properties ctx, ProcessInfo pi, Trx trx) + { + log.info("startProcess - " + pi.getRecord_ID()); + boolean retValue = false; + // + if (pi.getRecord_ID() != get_ID()) + { + log.log(Level.SEVERE, "startProcess - Not same Payment - " + pi.getRecord_ID()); + return false; + } + // Process it + retValue = processOnline(); + save(); + return retValue; // Payment processed + } // startProcess + + + /** + * Before Save + * @param newRecord new + * @return save + */ + protected boolean beforeSave (boolean newRecord) + { + // We have a charge + if (getC_Charge_ID() != 0) + { + if (newRecord || is_ValueChanged("C_Charge_ID")) + { + setC_Order_ID(0); + setC_Invoice_ID(0); + setWriteOffAmt(Env.ZERO); + setDiscountAmt(Env.ZERO); + setIsOverUnderPayment(false); + setOverUnderAmt(Env.ZERO); + setIsPrepayment(false); + } + } + // We need a BPartner + else if (getC_BPartner_ID() == 0 && !isCashTrx()) + { + if (getC_Invoice_ID() != 0) + ; + else if (getC_Order_ID() != 0) + ; + else + { + log.saveError("Error", Msg.parseTranslation(getCtx(), "@NotFound@: @C_BPartner_ID@")); + return false; + } + } + // Prepayment: No charge and order or project (not as acct dimension) + if (newRecord + || is_ValueChanged("C_Charge_ID") || is_ValueChanged("C_Invoice_ID") + || is_ValueChanged("C_Order_ID") || is_ValueChanged("C_Project_ID")) + setIsPrepayment (getC_Charge_ID() == 0 + && getC_BPartner_ID() != 0 + && (getC_Order_ID() != 0 + || (getC_Project_ID() != 0 && getC_Invoice_ID() == 0))); + if (isPrepayment()) + { + if (newRecord + || is_ValueChanged("C_Order_ID") || is_ValueChanged("C_Project_ID")) + { + setWriteOffAmt(Env.ZERO); + setDiscountAmt(Env.ZERO); + setIsOverUnderPayment(false); + setOverUnderAmt(Env.ZERO); + } + } + + // Document Type/Receipt + if (getC_DocType_ID() == 0) + setC_DocType_ID(); + else + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + setIsReceipt(dt.isSOTrx()); + } + setDocumentNo(); + // + if (getDateAcct() == null) + setDateAcct(getDateTrx()); + // + if (!isOverUnderPayment()) + setOverUnderAmt(Env.ZERO); + + // Organization + if ((newRecord || is_ValueChanged("C_BankAccount_ID")) + && getC_Charge_ID() == 0) // allow different org for charge + { + MBankAccount ba = MBankAccount.get(getCtx(), getC_BankAccount_ID()); + if (ba.getAD_Org_ID() != 0) + setAD_Org_ID(ba.getAD_Org_ID()); + } + + // [ adempiere-Bugs-1885417 ] Validate BP on Payment Prepare or BeforeSave + // there is bp and (invoice or order) + if (getC_BPartner_ID() != 0 && (getC_Invoice_ID() != 0 || getC_Order_ID() != 0)) { + if (getC_Invoice_ID() != 0) { + MInvoice inv = new MInvoice(getCtx(), getC_Invoice_ID(), get_TrxName()); + if (inv.getC_BPartner_ID() != getC_BPartner_ID()) { + log.saveError("Error", Msg.parseTranslation(getCtx(), "BP different from BP Invoice")); + return false; + } + } + if (getC_Order_ID() != 0) { + MOrder ord = new MOrder(getCtx(), getC_Order_ID(), get_TrxName()); + if (ord.getC_BPartner_ID() != getC_BPartner_ID()) { + log.saveError("Error", Msg.parseTranslation(getCtx(), "BP different from BP Order")); + return false; + } + } + } + + return true; + } // beforeSave + + /** + * Get Allocated Amt in Payment Currency + * @return amount or null + */ + public BigDecimal getAllocatedAmt () + { + BigDecimal retValue = null; + if (getC_Charge_ID() != 0) + return getPayAmt(); + // + String sql = "SELECT SUM(currencyConvert(al.Amount," + + "ah.C_Currency_ID, p.C_Currency_ID,ah.DateTrx,p.C_ConversionType_ID, al.AD_Client_ID,al.AD_Org_ID)) " + + "FROM C_AllocationLine al" + + " INNER JOIN C_AllocationHdr ah ON (al.C_AllocationHdr_ID=ah.C_AllocationHdr_ID) " + + " INNER JOIN C_Payment p ON (al.C_Payment_ID=p.C_Payment_ID) " + + "WHERE al.C_Payment_ID=?" + + " AND ah.IsActive='Y' AND al.IsActive='Y'"; + // + " AND al.C_Invoice_ID IS NOT NULL"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Payment_ID()); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + retValue = rs.getBigDecimal(1); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, "getAllocatedAmt", e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + // log.fine("getAllocatedAmt - " + retValue); + // ? ROUND(NVL(v_AllocatedAmt,0), 2); + return retValue; + } // getAllocatedAmt + + /** + * Test Allocation (and set allocated flag) + * @return true if updated + */ + public boolean testAllocation() + { + // Cash Trx always allocated + if (isCashTrx()) + { + if (!isAllocated()) + { + setIsAllocated(true); + return true; + } + return false; + } + // + BigDecimal alloc = getAllocatedAmt(); + if (alloc == null) + alloc = Env.ZERO; + BigDecimal total = getPayAmt(); + if (!isReceipt()) + total = total.negate(); + boolean test = total.compareTo(alloc) == 0; + boolean change = test != isAllocated(); + if (change) + setIsAllocated(test); + log.fine("Allocated=" + test + + " (" + alloc + "=" + total + ")"); + return change; + } // testAllocation + + /** + * Set Allocated Flag for payments + * @param ctx context + * @param C_BPartner_ID if 0 all + * @param trxName trx + */ + public static void setIsAllocated (Properties ctx, int C_BPartner_ID, String trxName) + { + int counter = 0; + String sql = "SELECT * FROM C_Payment " + + "WHERE IsAllocated='N' AND DocStatus IN ('CO','CL')"; + if (C_BPartner_ID > 1) + sql += " AND C_BPartner_ID=?"; + else + sql += " AND AD_Client_ID=" + Env.getAD_Client_ID(ctx); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + if (C_BPartner_ID > 1) + pstmt.setInt (1, C_BPartner_ID); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + { + MPayment pay = new MPayment (ctx, rs, trxName); + if (pay.testAllocation()) + if (pay.save()) + counter++; + } + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + s_log.config("#" + counter); + } // setIsAllocated + + /************************************************************************** + * Set Error Message + * @param errorMessage error message + */ + public void setErrorMessage(String errorMessage) + { + m_errorMessage = errorMessage; + } // setErrorMessage + + /** + * Get Error Message + * @return error message + */ + public String getErrorMessage() + { + return m_errorMessage; + } // getErrorMessage + + + /** + * Set Bank Account for Payment. + * @param C_BankAccount_ID C_BankAccount_ID + */ + public void setC_BankAccount_ID (int C_BankAccount_ID) + { + if (C_BankAccount_ID == 0) + { + setPaymentProcessor(); + if (getC_BankAccount_ID() == 0) + throw new IllegalArgumentException("Can't find Bank Account"); + } + else + super.setC_BankAccount_ID(C_BankAccount_ID); + } // setC_BankAccount_ID + + /** + * Set BankAccount and PaymentProcessor + * @return true if found + */ + public boolean setPaymentProcessor () + { + return setPaymentProcessor (getTenderType(), getCreditCardType()); + } // setPaymentProcessor + + /** + * Set BankAccount and PaymentProcessor + * @param tender TenderType see TENDER_ + * @param CCType CC Type see CC_ + * @return true if found + */ + public boolean setPaymentProcessor (String tender, String CCType) + { + m_mPaymentProcessor = null; + // Get Processor List + if (m_mPaymentProcessors == null || m_mPaymentProcessors.length == 0) + m_mPaymentProcessors = MPaymentProcessor.find (getCtx(), tender, CCType, getAD_Client_ID(), + getC_Currency_ID(), getPayAmt(), get_TrxName()); + // Relax Amount + if (m_mPaymentProcessors == null || m_mPaymentProcessors.length == 0) + m_mPaymentProcessors = MPaymentProcessor.find (getCtx(), tender, CCType, getAD_Client_ID(), + getC_Currency_ID(), Env.ZERO, get_TrxName()); + if (m_mPaymentProcessors == null || m_mPaymentProcessors.length == 0) + return false; + + // Find the first right one + for (int i = 0; i < m_mPaymentProcessors.length; i++) + { + if (m_mPaymentProcessors[i].accepts (tender, CCType)) + { + m_mPaymentProcessor = m_mPaymentProcessors[i]; + } + } + if (m_mPaymentProcessor != null) + setC_BankAccount_ID (m_mPaymentProcessor.getC_BankAccount_ID()); + // + return m_mPaymentProcessor != null; + } // setPaymentProcessor + + + /** + * Get Accepted Credit Cards for PayAmt (default 0) + * @return credit cards + */ + public ValueNamePair[] getCreditCards () + { + return getCreditCards(getPayAmt()); + } // getCreditCards + + + /** + * Get Accepted Credit Cards for amount + * @param amt trx amount + * @return credit cards + */ + public ValueNamePair[] getCreditCards (BigDecimal amt) + { + try + { + if (m_mPaymentProcessors == null || m_mPaymentProcessors.length == 0) + m_mPaymentProcessors = MPaymentProcessor.find (getCtx (), null, null, + getAD_Client_ID (), getC_Currency_ID (), amt, get_TrxName()); + // + HashMap map = new HashMap(); // to eliminate duplicates + for (int i = 0; i < m_mPaymentProcessors.length; i++) + { + if (m_mPaymentProcessors[i].isAcceptAMEX ()) + map.put (CREDITCARDTYPE_Amex, getCreditCardPair (CREDITCARDTYPE_Amex)); + if (m_mPaymentProcessors[i].isAcceptDiners ()) + map.put (CREDITCARDTYPE_Diners, getCreditCardPair (CREDITCARDTYPE_Diners)); + if (m_mPaymentProcessors[i].isAcceptDiscover ()) + map.put (CREDITCARDTYPE_Discover, getCreditCardPair (CREDITCARDTYPE_Discover)); + if (m_mPaymentProcessors[i].isAcceptMC ()) + map.put (CREDITCARDTYPE_MasterCard, getCreditCardPair (CREDITCARDTYPE_MasterCard)); + if (m_mPaymentProcessors[i].isAcceptCorporate ()) + map.put (CREDITCARDTYPE_PurchaseCard, getCreditCardPair (CREDITCARDTYPE_PurchaseCard)); + if (m_mPaymentProcessors[i].isAcceptVisa ()) + map.put (CREDITCARDTYPE_Visa, getCreditCardPair (CREDITCARDTYPE_Visa)); + } // for all payment processors + // + ValueNamePair[] retValue = new ValueNamePair[map.size ()]; + map.values ().toArray (retValue); + log.fine("getCreditCards - #" + retValue.length + " - Processors=" + m_mPaymentProcessors.length); + return retValue; + } + catch (Exception ex) + { + ex.printStackTrace(); + return null; + } + } // getCreditCards + + /** + * Get Type and name pair + * @param CreditCardType credit card Type + * @return pair + */ + private ValueNamePair getCreditCardPair (String CreditCardType) + { + return new ValueNamePair (CreditCardType, getCreditCardName(CreditCardType)); + } // getCreditCardPair + + + /************************************************************************** + * Credit Card Number + * @param CreditCardNumber CreditCard Number + */ + public void setCreditCardNumber (String CreditCardNumber) + { + super.setCreditCardNumber (MPaymentValidate.checkNumeric(CreditCardNumber)); + } // setCreditCardNumber + + /** + * Verification Code + * @param newCreditCardVV CC verification + */ + public void setCreditCardVV(String newCreditCardVV) + { + super.setCreditCardVV (MPaymentValidate.checkNumeric(newCreditCardVV)); + } // setCreditCardVV + + /** + * Two Digit CreditCard MM + * @param CreditCardExpMM Exp month + */ + public void setCreditCardExpMM (int CreditCardExpMM) + { + if (CreditCardExpMM < 1 || CreditCardExpMM > 12) + ; + else + super.setCreditCardExpMM (CreditCardExpMM); + } // setCreditCardExpMM + + /** + * Two digit CreditCard YY (til 2020) + * @param newCreditCardExpYY 2 or 4 digit year + */ + public void setCreditCardExpYY (int newCreditCardExpYY) + { + int CreditCardExpYY = newCreditCardExpYY; + if (newCreditCardExpYY > 1999) + CreditCardExpYY = newCreditCardExpYY-2000; + super.setCreditCardExpYY(CreditCardExpYY); + } // setCreditCardExpYY + + /** + * CreditCard Exp MMYY + * @param mmyy Exp in form of mmyy + * @return true if valid + */ + public boolean setCreditCardExp (String mmyy) + { + if (MPaymentValidate.validateCreditCardExp(mmyy).length() != 0) + return false; + // + String exp = MPaymentValidate.checkNumeric(mmyy); + String mmStr = exp.substring(0,2); + String yyStr = exp.substring(2,4); + setCreditCardExpMM (Integer.parseInt(mmStr)); + setCreditCardExpYY (Integer.parseInt(yyStr)); + return true; + } // setCreditCardExp + + + /** + * CreditCard Exp MMYY + * @param delimiter / - or null + * @return Exp + */ + public String getCreditCardExp(String delimiter) + { + String mm = String.valueOf(getCreditCardExpMM()); + String yy = String.valueOf(getCreditCardExpYY()); + + StringBuffer retValue = new StringBuffer(); + if (mm.length() == 1) + retValue.append("0"); + retValue.append(mm); + // + if (delimiter != null) + retValue.append(delimiter); + // + if (yy.length() == 1) + retValue.append("0"); + retValue.append(yy); + // + return (retValue.toString()); + } // getCreditCardExp + + /** + * MICR + * @param MICR MICR + */ + public void setMicr (String MICR) + { + super.setMicr (MPaymentValidate.checkNumeric(MICR)); + } // setBankMICR + + /** + * Routing No + * @param RoutingNo Routing No + */ + public void setRoutingNo(String RoutingNo) + { + super.setRoutingNo (MPaymentValidate.checkNumeric(RoutingNo)); + } // setBankRoutingNo + + + /** + * Bank Account No + * @param AccountNo AccountNo + */ + public void setAccountNo (String AccountNo) + { + super.setAccountNo (MPaymentValidate.checkNumeric(AccountNo)); + } // setBankAccountNo + + + /** + * Check No + * @param CheckNo Check No + */ + public void setCheckNo(String CheckNo) + { + super.setCheckNo(MPaymentValidate.checkNumeric(CheckNo)); + } // setBankCheckNo + + + /** + * Set DocumentNo to Payment info. + * If there is a R_PnRef that is set automatically + */ + private void setDocumentNo() + { + // Cash Transfer + if ("X".equals(getTenderType())) + return; + // Current Document No + String documentNo = getDocumentNo(); + // Existing reversal + if (documentNo != null + && documentNo.indexOf(REVERSE_INDICATOR) >= 0) + return; + + // If external number exists - enforce it + if (getR_PnRef() != null && getR_PnRef().length() > 0) + { + if (!getR_PnRef().equals(documentNo)) + setDocumentNo(getR_PnRef()); + return; + } + + documentNo = ""; + // globalqss - read configuration to assign credit card or check number number for Payments + // Credit Card + if (TENDERTYPE_CreditCard.equals(getTenderType())) + { + if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD", true, getAD_Client_ID())) { + documentNo = getCreditCardType() + + " " + Obscure.obscure(getCreditCardNumber()) + + " " + getCreditCardExpMM() + + "/" + getCreditCardExpYY(); + } + } + // Own Check No + else if (TENDERTYPE_Check.equals(getTenderType()) + && !isReceipt() + && getCheckNo() != null && getCheckNo().length() > 0) + { + if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT", true, getAD_Client_ID())) { + documentNo = getCheckNo(); + } + } + // Customer Check: Routing: Account #Check + else if (TENDERTYPE_Check.equals(getTenderType()) + && isReceipt()) + { + if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT", true, getAD_Client_ID())) { + if (getRoutingNo() != null) + documentNo = getRoutingNo() + ": "; + if (getAccountNo() != null) + documentNo += getAccountNo(); + if (getCheckNo() != null) + { + if (documentNo.length() > 0) + documentNo += " "; + documentNo += "#" + getCheckNo(); + } + } + } + + // Set Document No + documentNo = documentNo.trim(); + if (documentNo.length() > 0) + setDocumentNo(documentNo); + } // setDocumentNo + + /** + * Set Refernce No (and Document No) + * @param R_PnRef reference + */ + public void setR_PnRef (String R_PnRef) + { + super.setR_PnRef (R_PnRef); + if (R_PnRef != null) + setDocumentNo (R_PnRef); + } // setR_PnRef + + // --------------- + + /** + * Set Payment Amount + * @param PayAmt Pay Amt + */ + public void setPayAmt (BigDecimal PayAmt) + { + super.setPayAmt(PayAmt == null ? Env.ZERO : PayAmt); + } // setPayAmt + + /** + * Set Payment Amount + * + * @param C_Currency_ID currency + * @param payAmt amount + */ + public void setAmount (int C_Currency_ID, BigDecimal payAmt) + { + if (C_Currency_ID == 0) + C_Currency_ID = MClient.get(getCtx()).getC_Currency_ID(); + setC_Currency_ID(C_Currency_ID); + setPayAmt(payAmt); + } // setAmount + + /** + * Discount Amt + * @param DiscountAmt Discount + */ + public void setDiscountAmt (BigDecimal DiscountAmt) + { + super.setDiscountAmt (DiscountAmt == null ? Env.ZERO : DiscountAmt); + } // setDiscountAmt + + /** + * WriteOff Amt + * @param WriteOffAmt WriteOff + */ + public void setWriteOffAmt (BigDecimal WriteOffAmt) + { + super.setWriteOffAmt (WriteOffAmt == null ? Env.ZERO : WriteOffAmt); + } // setWriteOffAmt + + /** + * OverUnder Amt + * @param OverUnderAmt OverUnder + */ + public void setOverUnderAmt (BigDecimal OverUnderAmt) + { + super.setOverUnderAmt (OverUnderAmt == null ? Env.ZERO : OverUnderAmt); + setIsOverUnderPayment(getOverUnderAmt().compareTo(Env.ZERO) != 0); + } // setOverUnderAmt + + /** + * Tax Amt + * @param TaxAmt Tax + */ + public void setTaxAmt (BigDecimal TaxAmt) + { + super.setTaxAmt (TaxAmt == null ? Env.ZERO : TaxAmt); + } // setTaxAmt + + /** + * Set Info from BP Bank Account + * @param ba BP bank account + */ + public void setBP_BankAccount (MBPBankAccount ba) + { + log.fine("" + ba); + if (ba == null) + return; + setC_BPartner_ID(ba.getC_BPartner_ID()); + setAccountAddress(ba.getA_Name(), ba.getA_Street(), ba.getA_City(), + ba.getA_State(), ba.getA_Zip(), ba.getA_Country()); + setA_EMail(ba.getA_EMail()); + setA_Ident_DL(ba.getA_Ident_DL()); + setA_Ident_SSN(ba.getA_Ident_SSN()); + // CC + if (ba.getCreditCardType() != null) + setCreditCardType(ba.getCreditCardType()); + if (ba.getCreditCardNumber() != null) + setCreditCardNumber(ba.getCreditCardNumber()); + if (ba.getCreditCardExpMM() != 0) + setCreditCardExpMM(ba.getCreditCardExpMM()); + if (ba.getCreditCardExpYY() != 0) + setCreditCardExpYY(ba.getCreditCardExpYY()); + if (ba.getCreditCardVV() != null) + setCreditCardVV(ba.getCreditCardVV()); + // Bank + if (ba.getAccountNo() != null) + setAccountNo(ba.getAccountNo()); + if (ba.getRoutingNo() != null) + setRoutingNo(ba.getRoutingNo()); + } // setBP_BankAccount + + /** + * Save Info from BP Bank Account + * @param ba BP bank account + * @return true if saved + */ + public boolean saveToBP_BankAccount (MBPBankAccount ba) + { + if (ba == null) + return false; + ba.setA_Name(getA_Name()); + ba.setA_Street(getA_Street()); + ba.setA_City(getA_City()); + ba.setA_State(getA_State()); + ba.setA_Zip(getA_Zip()); + ba.setA_Country(getA_Country()); + ba.setA_EMail(getA_EMail()); + ba.setA_Ident_DL(getA_Ident_DL()); + ba.setA_Ident_SSN(getA_Ident_SSN()); + // CC + ba.setCreditCardType(getCreditCardType()); + ba.setCreditCardNumber(getCreditCardNumber()); + ba.setCreditCardExpMM(getCreditCardExpMM()); + ba.setCreditCardExpYY(getCreditCardExpYY()); + ba.setCreditCardVV(getCreditCardVV()); + // Bank + if (getAccountNo() != null) + ba.setAccountNo(getAccountNo()); + if (getRoutingNo() != null) + ba.setRoutingNo(getRoutingNo()); + // Trx + ba.setR_AvsAddr(getR_AvsAddr()); + ba.setR_AvsZip(getR_AvsZip()); + // + boolean ok = ba.save(get_TrxName()); + log.fine("saveToBP_BankAccount - " + ba); + return ok; + } // setBP_BankAccount + + /** + * Set Doc Type bases on IsReceipt + */ + private void setC_DocType_ID () + { + setC_DocType_ID(isReceipt()); + } // setC_DocType_ID + + /** + * Set Doc Type + * @param isReceipt is receipt + */ + public void setC_DocType_ID (boolean isReceipt) + { + setIsReceipt(isReceipt); + String sql = "SELECT C_DocType_ID FROM C_DocType WHERE AD_Client_ID=? AND DocBaseType=? ORDER BY IsDefault DESC"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getAD_Client_ID()); + if (isReceipt) + pstmt.setString(2, X_C_DocType.DOCBASETYPE_ARReceipt); + else + pstmt.setString(2, X_C_DocType.DOCBASETYPE_APPayment); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + setC_DocType_ID(rs.getInt(1)); + else + log.warning ("setDocType - NOT found - isReceipt=" + isReceipt); + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + } // setC_DocType_ID + + + /** + * Set Document Type + * @param C_DocType_ID doc type + */ + public void setC_DocType_ID (int C_DocType_ID) + { + // if (getDocumentNo() != null && getC_DocType_ID() != C_DocType_ID) + // setDocumentNo(null); + super.setC_DocType_ID(C_DocType_ID); + } // setC_DocType_ID + + /** + * Verify Document Type with Invoice + * @return true if ok + */ + private boolean verifyDocType() + { + if (getC_DocType_ID() == 0) + return false; + // + Boolean invoiceSO = null; + // Check Invoice First + if (getC_Invoice_ID() > 0) + { + String sql = "SELECT idt.IsSOTrx " + + "FROM C_Invoice i" + + " INNER JOIN C_DocType idt ON (i.C_DocType_ID=idt.C_DocType_ID) " + + "WHERE i.C_Invoice_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Invoice_ID()); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + invoiceSO = new Boolean ("Y".equals(rs.getString(1))); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + } // Invoice + + // DocumentType + Boolean paymentSO = null; + PreparedStatement pstmt = null; + String sql = "SELECT IsSOTrx " + + "FROM C_DocType " + + "WHERE C_DocType_ID=?"; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_DocType_ID()); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + paymentSO = new Boolean ("Y".equals(rs.getString(1))); + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + // No Payment info + if (paymentSO == null) + return false; + setIsReceipt(paymentSO.booleanValue()); + + // We have an Invoice .. and it does not match + if (invoiceSO != null + && invoiceSO.booleanValue() != paymentSO.booleanValue()) + return false; + // OK + return true; + } // verifyDocType + + + /** + * Get ISO Code of Currency + * @return Currency ISO + */ + public String getCurrencyISO() + { + return MCurrency.getISO_Code (getCtx(), getC_Currency_ID()); + } // getCurrencyISO + + /** + * Get Document Status + * @return Document Status Clear Text + */ + public String getDocStatusName() + { + return MRefList.getListName(getCtx(), 131, getDocStatus()); + } // getDocStatusName + + /** + * Get Name of Credit Card + * @return Name + */ + public String getCreditCardName() + { + return getCreditCardName(getCreditCardType()); + } // getCreditCardName + + /** + * Get Name of Credit Card + * @param CreditCardType credit card type + * @return Name + */ + public String getCreditCardName(String CreditCardType) + { + if (CreditCardType == null) + return "--"; + else if (CREDITCARDTYPE_MasterCard.equals(CreditCardType)) + return "MasterCard"; + else if (CREDITCARDTYPE_Visa.equals(CreditCardType)) + return "Visa"; + else if (CREDITCARDTYPE_Amex.equals(CreditCardType)) + return "Amex"; + else if (CREDITCARDTYPE_ATM.equals(CreditCardType)) + return "ATM"; + else if (CREDITCARDTYPE_Diners.equals(CreditCardType)) + return "Diners"; + else if (CREDITCARDTYPE_Discover.equals(CreditCardType)) + return "Discover"; + else if (CREDITCARDTYPE_PurchaseCard.equals(CreditCardType)) + return "PurchaseCard"; + return "?" + CreditCardType + "?"; + } // getCreditCardName + + /** + * Add to Description + * @param description text + */ + public void addDescription (String description) + { + String desc = getDescription(); + if (desc == null) + setDescription(description); + else + setDescription(desc + " | " + description); + } // addDescription + + + /** + * Get Pay Amt + * @param absolute if true the absolute amount (i.e. negative if payment) + * @return amount + */ + public BigDecimal getPayAmt (boolean absolute) + { + if (isReceipt()) + return super.getPayAmt(); + return super.getPayAmt().negate(); + } // getPayAmt + + /** + * Get Pay Amt in cents + * @return amount in cents + */ + public int getPayAmtInCents () + { + BigDecimal bd = super.getPayAmt().multiply(Env.ONEHUNDRED); + return bd.intValue(); + } // getPayAmtInCents + + /************************************************************************** + * Process document + * @param processAction document action + * @return true if performed + */ + public boolean processIt (String processAction) + { + m_processMsg = null; + DocumentEngine engine = new DocumentEngine (this, getDocStatus()); + return engine.processIt (processAction, getDocAction()); + } // process + + /** Process Message */ + private String m_processMsg = null; + /** Just Prepared Flag */ + private boolean m_justPrepared = false; + + /** + * Unlock Document. + * @return true if success + */ + public boolean unlockIt() + { + log.info(toString()); + setProcessing(false); + return true; + } // unlockIt + + /** + * Invalidate Document + * @return true if success + */ + public boolean invalidateIt() + { + log.info(toString()); + setDocAction(DOCACTION_Prepare); + return true; + } // invalidateIt + + + /************************************************************************** + * Prepare Document + * @return new status (In Progress or Invalid) + */ + public String prepareIt() + { + log.info(toString()); + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Std Period open? + if (!MPeriod.isOpen(getCtx(), getDateAcct(), + isReceipt() ? X_C_DocType.DOCBASETYPE_ARReceipt : X_C_DocType.DOCBASETYPE_APPayment)) + { + m_processMsg = "@PeriodClosed@"; + return DocAction.STATUS_Invalid; + } + + // Unsuccessful Online Payment + if (isOnline() && !isApproved()) + { + if (getR_Result() != null) + m_processMsg = "@OnlinePaymentFailed@"; + else + m_processMsg = "@PaymentNotProcessed@"; + return DocAction.STATUS_Invalid; + } + + // Waiting Payment - Need to create Invoice & Shipment + if (getC_Order_ID() != 0 && getC_Invoice_ID() == 0) + { // see WebOrder.process + MOrder order = new MOrder (getCtx(), getC_Order_ID(), get_TrxName()); + if (DOCSTATUS_WaitingPayment.equals(order.getDocStatus())) + { + order.setC_Payment_ID(getC_Payment_ID()); + order.setDocAction(X_C_Order.DOCACTION_WaitComplete); + order.set_TrxName(get_TrxName()); + // boolean ok = + order.processIt (X_C_Order.DOCACTION_WaitComplete); + m_processMsg = order.getProcessMsg(); + order.save(get_TrxName()); + // Set Invoice + MInvoice[] invoices = order.getInvoices(); + int length = invoices.length; + if (length > 0) // get last invoice + setC_Invoice_ID (invoices[length-1].getC_Invoice_ID()); + // + if (getC_Invoice_ID() == 0) + { + m_processMsg = "@NotFound@ @C_Invoice_ID@"; + return DocAction.STATUS_Invalid; + } + } // WaitingPayment + } + + // Consistency of Invoice / Document Type and IsReceipt + if (!verifyDocType()) + { + m_processMsg = "@PaymentDocTypeInvoiceInconsistent@"; + return DocAction.STATUS_Invalid; + } + + // Do not pay when Credit Stop/Hold + if (!isReceipt()) + { + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + if (X_C_BPartner.SOCREDITSTATUS_CreditStop.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditStop@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + if (X_C_BPartner.SOCREDITSTATUS_CreditHold.equals(bp.getSOCreditStatus())) + { + m_processMsg = "@BPartnerCreditHold@ - @TotalOpenBalance@=" + + bp.getTotalOpenBalance() + + ", @SO_CreditLimit@=" + bp.getSO_CreditLimit(); + return DocAction.STATUS_Invalid; + } + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + m_justPrepared = true; + if (!DOCACTION_Complete.equals(getDocAction())) + setDocAction(DOCACTION_Complete); + return DocAction.STATUS_InProgress; + } // prepareIt + + /** + * Approve Document + * @return true if success + */ + public boolean approveIt() + { + log.info(toString()); + setIsApproved(true); + return true; + } // approveIt + + /** + * Reject Approval + * @return true if success + */ + public boolean rejectIt() + { + log.info(toString()); + setIsApproved(false); + return true; + } // rejectIt + + + /************************************************************************** + * Complete Document + * @return new status (Complete, In Progress, Invalid, Waiting ..) + */ + public String completeIt() + { + // Re-Check + if (!m_justPrepared) + { + String status = prepareIt(); + if (!DocAction.STATUS_InProgress.equals(status)) + return status; + } + + m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE); + if (m_processMsg != null) + return DocAction.STATUS_Invalid; + + // Implicit Approval + if (!isApproved()) + approveIt(); + log.info(toString()); + + // Charge Handling + if (getC_Charge_ID() != 0) + { + setIsAllocated(true); + } + else + { + allocateIt(); // Create Allocation Records + testAllocation(); + } + + // Project update + if (getC_Project_ID() != 0) + { + // MProject project = new MProject(getCtx(), getC_Project_ID()); + } + // Update BP for Prepayments + if (getC_BPartner_ID() != 0 && getC_Invoice_ID() == 0) + { + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + bp.setTotalOpenBalance(); + bp.save(); + } + + // Counter Doc + MPayment counter = createCounterDoc(); + if (counter != null) + m_processMsg += " @CounterDoc@: @C_Payment_ID@=" + counter.getDocumentNo(); + + // User Validation + String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); + if (valid != null) + { + m_processMsg = valid; + return DocAction.STATUS_Invalid; + } + + // Set the definite document number after completed (if needed) + setDefiniteDocumentNo(); + + // + setProcessed(true); + setDocAction(DOCACTION_Close); + return DocAction.STATUS_Completed; + } // completeIt + + /** + * Set the definite document number after completed + */ + private void setDefiniteDocumentNo() { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + if (dt.isOverwriteDateOnComplete()) { + setDateTrx(new Timestamp (System.currentTimeMillis())); + } + if (dt.isOverwriteSeqOnComplete()) { + String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); + if (value != null) + setDocumentNo(value); + } + } + + /** + * Create Counter Document + * @return payment + */ + private MPayment createCounterDoc() + { + // Is this a counter doc ? + if (getRef_Payment_ID() != 0) + return null; + + // Org Must be linked to BPartner + MOrg org = MOrg.get(getCtx(), getAD_Org_ID()); + int counterC_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName()); + if (counterC_BPartner_ID == 0) + return null; + // Business Partner needs to be linked to Org + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int(); + if (counterAD_Org_ID == 0) + return null; + + MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, get_TrxName()); + // MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID); + log.info("Counter BP=" + counterBP.getName()); + + // Document Type + int C_DocTypeTarget_ID = 0; + MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID()); + if (counterDT != null) + { + log.fine(counterDT.toString()); + if (!counterDT.isCreateCounter() || !counterDT.isValid()) + return null; + C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID(); + } + else // indirect + { + C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID()); + log.fine("Indirect C_DocTypeTarget_ID=" + C_DocTypeTarget_ID); + if (C_DocTypeTarget_ID <= 0) + return null; + } + + // Deep Copy + MPayment counter = new MPayment (getCtx(), 0, get_TrxName()); + counter.setAD_Org_ID(counterAD_Org_ID); + counter.setC_BPartner_ID(counterBP.getC_BPartner_ID()); + counter.setIsReceipt(!isReceipt()); + counter.setC_DocType_ID(C_DocTypeTarget_ID); + counter.setTrxType(getTrxType()); + counter.setTenderType(getTenderType()); + // + counter.setPayAmt(getPayAmt()); + counter.setDiscountAmt(getDiscountAmt()); + counter.setTaxAmt(getTaxAmt()); + counter.setWriteOffAmt(getWriteOffAmt()); + counter.setIsOverUnderPayment (isOverUnderPayment()); + counter.setOverUnderAmt(getOverUnderAmt()); + counter.setC_Currency_ID(getC_Currency_ID()); + counter.setC_ConversionType_ID(getC_ConversionType_ID()); + // + counter.setDateTrx (getDateTrx()); + counter.setDateAcct (getDateAcct()); + counter.setRef_Payment_ID(getC_Payment_ID()); + // + String sql = "SELECT C_BankAccount_ID FROM C_BankAccount " + + "WHERE C_Currency_ID=? AND AD_Org_ID IN (0,?) AND IsActive='Y' " + + "ORDER BY IsDefault DESC"; + int C_BankAccount_ID = DB.getSQLValue(get_TrxName(), sql, getC_Currency_ID(), counterAD_Org_ID); + counter.setC_BankAccount_ID(C_BankAccount_ID); + + // Refernces + counter.setC_Activity_ID(getC_Activity_ID()); + counter.setC_Campaign_ID(getC_Campaign_ID()); + counter.setC_Project_ID(getC_Project_ID()); + counter.setUser1_ID(getUser1_ID()); + counter.setUser2_ID(getUser2_ID()); + counter.save(get_TrxName()); + log.fine(counter.toString()); + setRef_Payment_ID(counter.getC_Payment_ID()); + + // Document Action + if (counterDT != null) + { + if (counterDT.getDocAction() != null) + { + counter.setDocAction(counterDT.getDocAction()); + counter.processIt(counterDT.getDocAction()); + counter.save(get_TrxName()); + } + } + return counter; + } // createCounterDoc + + /** + * Allocate It. + * Only call when there is NO allocation as it will create duplicates. + * If an invoice exists, it allocates that + * otherwise it allocates Payment Selection. + * @return true if allocated + */ + public boolean allocateIt() + { + // Create invoice Allocation - See also MCash.completeIt + if (getC_Invoice_ID() != 0) + return allocateInvoice(); + // Invoices of a AP Payment Selection + if (allocatePaySelection()) + return true; + + if (getC_Order_ID() != 0) + return false; + + // Allocate to multiple Payments based on entry + MPaymentAllocate[] pAllocs = MPaymentAllocate.get(this); + if (pAllocs.length == 0) + return false; + + MAllocationHdr alloc = new MAllocationHdr(getCtx(), false, + getDateTrx(), getC_Currency_ID(), + Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo(), + get_TrxName()); + alloc.setAD_Org_ID(getAD_Org_ID()); + if (!alloc.save()) + { + log.severe("P.Allocations not created"); + return false; + } + // Lines + for (int i = 0; i < pAllocs.length; i++) + { + MPaymentAllocate pa = pAllocs[i]; + MAllocationLine aLine = null; + if (isReceipt()) + aLine = new MAllocationLine (alloc, pa.getAmount(), + pa.getDiscountAmt(), pa.getWriteOffAmt(), pa.getOverUnderAmt()); + else + aLine = new MAllocationLine (alloc, pa.getAmount().negate(), + pa.getDiscountAmt().negate(), pa.getWriteOffAmt().negate(), pa.getOverUnderAmt().negate()); + aLine.setDocInfo(pa.getC_BPartner_ID(), 0, pa.getC_Invoice_ID()); + aLine.setPaymentInfo(getC_Payment_ID(), 0); + if (!aLine.save(get_TrxName())) + log.warning("P.Allocations - line not saved"); + else + { + pa.setC_AllocationLine_ID(aLine.getC_AllocationLine_ID()); + pa.save(); + } + } + // Should start WF + alloc.processIt(DocAction.ACTION_Complete); + m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo(); + return alloc.save(get_TrxName()); + } // allocateIt + + /** + * Allocate single AP/AR Invoice + * @return true if allocated + */ + private boolean allocateInvoice() + { + // calculate actual allocation + BigDecimal allocationAmt = getPayAmt(); // underpayment + if (getOverUnderAmt().signum() < 0 && getPayAmt().signum() > 0) + allocationAmt = allocationAmt.add(getOverUnderAmt()); // overpayment (negative) + + MAllocationHdr alloc = new MAllocationHdr(getCtx(), false, + getDateTrx(), getC_Currency_ID(), + Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [1]", get_TrxName()); + alloc.setAD_Org_ID(getAD_Org_ID()); + if (!alloc.save()) + { + log.log(Level.SEVERE, "Could not create Allocation Hdr"); + return false; + } + MAllocationLine aLine = null; + if (isReceipt()) + aLine = new MAllocationLine (alloc, allocationAmt, + getDiscountAmt(), getWriteOffAmt(), getOverUnderAmt()); + else + aLine = new MAllocationLine (alloc, allocationAmt.negate(), + getDiscountAmt().negate(), getWriteOffAmt().negate(), getOverUnderAmt().negate()); + aLine.setDocInfo(getC_BPartner_ID(), 0, getC_Invoice_ID()); + aLine.setC_Payment_ID(getC_Payment_ID()); + if (!aLine.save(get_TrxName())) + { + log.log(Level.SEVERE, "Could not create Allocation Line"); + return false; + } + // Should start WF + alloc.processIt(DocAction.ACTION_Complete); + alloc.save(get_TrxName()); + m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo(); + + // Get Project from Invoice + int C_Project_ID = DB.getSQLValue(get_TrxName(), + "SELECT MAX(C_Project_ID) FROM C_Invoice WHERE C_Invoice_ID=?", getC_Invoice_ID()); + if (C_Project_ID > 0 && getC_Project_ID() == 0) + setC_Project_ID(C_Project_ID); + else if (C_Project_ID > 0 && getC_Project_ID() > 0 && C_Project_ID != getC_Project_ID()) + log.warning("Invoice C_Project_ID=" + C_Project_ID + + " <> Payment C_Project_ID=" + getC_Project_ID()); + return true; + } // allocateInvoice + + /** + * Allocate Payment Selection + * @return true if allocated + */ + private boolean allocatePaySelection() + { + MAllocationHdr alloc = new MAllocationHdr(getCtx(), false, + getDateTrx(), getC_Currency_ID(), + Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [n]", get_TrxName()); + alloc.setAD_Org_ID(getAD_Org_ID()); + + String sql = "SELECT psc.C_BPartner_ID, psl.C_Invoice_ID, psl.IsSOTrx, " // 1..3 + + " psl.PayAmt, psl.DiscountAmt, psl.DifferenceAmt, psl.OpenAmt " + + "FROM C_PaySelectionLine psl" + + " INNER JOIN C_PaySelectionCheck psc ON (psl.C_PaySelectionCheck_ID=psc.C_PaySelectionCheck_ID) " + + "WHERE psc.C_Payment_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql, get_TrxName()); + pstmt.setInt(1, getC_Payment_ID()); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + int C_BPartner_ID = rs.getInt(1); + int C_Invoice_ID = rs.getInt(2); + if (C_BPartner_ID == 0 && C_Invoice_ID == 0) + continue; + boolean isSOTrx = "Y".equals(rs.getString(3)); + BigDecimal PayAmt = rs.getBigDecimal(4); + BigDecimal DiscountAmt = rs.getBigDecimal(5); + BigDecimal WriteOffAmt = rs.getBigDecimal(6); + BigDecimal OpenAmt = rs.getBigDecimal(7); + BigDecimal OverUnderAmt = OpenAmt.subtract(PayAmt) + .subtract(DiscountAmt).subtract(WriteOffAmt); + // + if (alloc.get_ID() == 0 && !alloc.save(get_TrxName())) + { + log.log(Level.SEVERE, "Could not create Allocation Hdr"); + rs.close(); + pstmt.close(); + return false; + } + MAllocationLine aLine = null; + if (isSOTrx) + aLine = new MAllocationLine (alloc, PayAmt, + DiscountAmt, WriteOffAmt, OverUnderAmt); + else + aLine = new MAllocationLine (alloc, PayAmt.negate(), + DiscountAmt.negate(), WriteOffAmt.negate(), OverUnderAmt.negate()); + aLine.setDocInfo(C_BPartner_ID, 0, C_Invoice_ID); + aLine.setC_Payment_ID(getC_Payment_ID()); + if (!aLine.save(get_TrxName())) + log.log(Level.SEVERE, "Could not create Allocation Line"); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, "allocatePaySelection", e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + + // Should start WF + boolean ok = true; + if (alloc.get_ID() == 0) + { + log.fine("No Allocation created - C_Payment_ID=" + + getC_Payment_ID()); + ok = false; + } + else + { + alloc.processIt(DocAction.ACTION_Complete); + ok = alloc.save(get_TrxName()); + m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo(); + } + return ok; + } // allocatePaySelection + + /** + * De-allocate Payment. + * Unkink Invoices and Orders and delete Allocations + */ + private void deAllocate() + { + if (getC_Order_ID() != 0) + setC_Order_ID(0); + // if (getC_Invoice_ID() == 0) + // return; + // De-Allocate all + MAllocationHdr[] allocations = MAllocationHdr.getOfPayment(getCtx(), + getC_Payment_ID(), get_TrxName()); + log.fine("#" + allocations.length); + for (int i = 0; i < allocations.length; i++) + { + allocations[i].set_TrxName(get_TrxName()); + allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct); + allocations[i].processIt(DocAction.ACTION_Reverse_Correct); + allocations[i].save(); + } + + // Unlink (in case allocation did not get it) + if (getC_Invoice_ID() != 0) + { + // Invoice + String sql = "UPDATE C_Invoice " + + "SET C_Payment_ID = NULL, IsPaid='N' " + + "WHERE C_Invoice_ID=" + getC_Invoice_ID() + + " AND C_Payment_ID=" + getC_Payment_ID(); + int no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Unlink Invoice #" + no); + // Order + sql = "UPDATE C_Order o " + + "SET C_Payment_ID = NULL " + + "WHERE EXISTS (SELECT * FROM C_Invoice i " + + "WHERE o.C_Order_ID=i.C_Order_ID AND i.C_Invoice_ID=" + getC_Invoice_ID() + ")" + + " AND C_Payment_ID=" + getC_Payment_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Unlink Order #" + no); + } + // + setC_Invoice_ID(0); + setIsAllocated(false); + } // deallocate + + /** + * Void Document. + * @return true if success + */ + public boolean voidIt() + { + log.info(toString()); + // Before Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); + if (m_processMsg != null) + return false; + + if (DOCSTATUS_Closed.equals(getDocStatus()) + || DOCSTATUS_Reversed.equals(getDocStatus()) + || DOCSTATUS_Voided.equals(getDocStatus())) + { + m_processMsg = "Document Closed: " + getDocStatus(); + setDocAction(DOCACTION_None); + return false; + } + // If on Bank Statement, don't void it - reverse it + if (getC_BankStatementLine_ID() > 0) + return reverseCorrectIt(); + + // Not Processed + if (DOCSTATUS_Drafted.equals(getDocStatus()) + || DOCSTATUS_Invalid.equals(getDocStatus()) + || DOCSTATUS_InProgress.equals(getDocStatus()) + || DOCSTATUS_Approved.equals(getDocStatus()) + || DOCSTATUS_NotApproved.equals(getDocStatus()) ) + { + addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + getPayAmt() + ")"); + setPayAmt(Env.ZERO); + setDiscountAmt(Env.ZERO); + setWriteOffAmt(Env.ZERO); + setOverUnderAmt(Env.ZERO); + setIsAllocated(false); + // Unlink & De-Allocate + deAllocate(); + } + else + return reverseCorrectIt(); + + // + // After Void + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); + if (m_processMsg != null) + return false; + + setProcessed(true); + setDocAction(DOCACTION_None); + return true; + } // voidIt + + /** + * Close Document. + * @return true if success + */ + public boolean closeIt() + { + log.info(toString()); + // Before Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); + if (m_processMsg != null) + return false; + // After Close + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE); + if (m_processMsg != null) + return false; + setDocAction(DOCACTION_None); + return true; + } // closeIt + + /** + * Reverse Correction + * @return true if success + */ + public boolean reverseCorrectIt() + { + log.info(toString()); + // Before reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); + if (m_processMsg != null) + return false; + + // Std Period open? + Timestamp dateAcct = getDateAcct(); + if (!MPeriod.isOpen(getCtx(), dateAcct, + isReceipt() ? X_C_DocType.DOCBASETYPE_ARReceipt : X_C_DocType.DOCBASETYPE_APPayment)) + dateAcct = new Timestamp(System.currentTimeMillis()); + + // Auto Reconcile if not on Bank Statement + boolean reconciled = getC_BankStatementLine_ID() == 0; //AZ Goodwill + + // Create Reversal + MPayment reversal = new MPayment (getCtx(), 0, get_TrxName()); + copyValues(this, reversal); + reversal.setClientOrg(this); + reversal.setC_Order_ID(0); + reversal.setC_Invoice_ID(0); + reversal.setDateAcct(dateAcct); + // + reversal.setDocumentNo(getDocumentNo() + REVERSE_INDICATOR); // indicate reversals + reversal.setDocStatus(DOCSTATUS_Drafted); + reversal.setDocAction(DOCACTION_Complete); + // + reversal.setPayAmt(getPayAmt().negate()); + reversal.setDiscountAmt(getDiscountAmt().negate()); + reversal.setWriteOffAmt(getWriteOffAmt().negate()); + reversal.setOverUnderAmt(getOverUnderAmt().negate()); + // + reversal.setIsAllocated(true); + reversal.setIsReconciled(reconciled); // to put on bank statement + reversal.setIsOnline(false); + reversal.setIsApproved(true); + reversal.setR_PnRef(null); + reversal.setR_Result(null); + reversal.setR_RespMsg(null); + reversal.setR_AuthCode(null); + reversal.setR_Info(null); + reversal.setProcessing(false); + reversal.setOProcessing("N"); + reversal.setProcessed(false); + reversal.setPosted(false); + reversal.setDescription(getDescription()); + reversal.addDescription("{->" + getDocumentNo() + ")"); + //FR [ 1948157 ] + reversal.setReversal_ID(getC_Payment_ID()); + reversal.save(get_TrxName()); + // Post Reversal + if (!reversal.processIt(DocAction.ACTION_Complete)) + { + m_processMsg = "Reversal ERROR: " + reversal.getProcessMsg(); + return false; + } + reversal.closeIt(); + reversal.setDocStatus(DOCSTATUS_Reversed); + reversal.setDocAction(DOCACTION_None); + reversal.save(get_TrxName()); + + // Unlink & De-Allocate + deAllocate(); + setIsReconciled (reconciled); + setIsAllocated (true); // the allocation below is overwritten + // Set Status + addDescription("(" + reversal.getDocumentNo() + "<-)"); + setDocStatus(DOCSTATUS_Reversed); + setDocAction(DOCACTION_None); + setProcessed(true); + //FR [ 1948157 ] + setReversal_ID(reversal.getC_Payment_ID()); + + // Create automatic Allocation + MAllocationHdr alloc = new MAllocationHdr (getCtx(), false, + getDateTrx(), getC_Currency_ID(), + Msg.translate(getCtx(), "C_Payment_ID") + ": " + reversal.getDocumentNo(), get_TrxName()); + alloc.setAD_Org_ID(getAD_Org_ID()); + if (!alloc.save()) + log.warning("Automatic allocation - hdr not saved"); + else + { + // Original Allocation + MAllocationLine aLine = new MAllocationLine (alloc, getPayAmt(true), + Env.ZERO, Env.ZERO, Env.ZERO); + aLine.setDocInfo(getC_BPartner_ID(), 0, 0); + aLine.setPaymentInfo(getC_Payment_ID(), 0); + if (!aLine.save(get_TrxName())) + log.warning("Automatic allocation - line not saved"); + // Reversal Allocation + aLine = new MAllocationLine (alloc, reversal.getPayAmt(true), + Env.ZERO, Env.ZERO, Env.ZERO); + aLine.setDocInfo(reversal.getC_BPartner_ID(), 0, 0); + aLine.setPaymentInfo(reversal.getC_Payment_ID(), 0); + if (!aLine.save(get_TrxName())) + log.warning("Automatic allocation - reversal line not saved"); + } + alloc.processIt(DocAction.ACTION_Complete); + alloc.save(get_TrxName()); + // + StringBuffer info = new StringBuffer (reversal.getDocumentNo()); + info.append(" - @C_AllocationHdr_ID@: ").append(alloc.getDocumentNo()); + + // Update BPartner + if (getC_BPartner_ID() != 0) + { + MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); + bp.setTotalOpenBalance(); + bp.save(get_TrxName()); + } + // After reverseCorrect + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); + if (m_processMsg != null) + return false; + + m_processMsg = info.toString(); + return true; + } // reverseCorrectionIt + + /** + * Get Bank Statement Line of payment or 0 + * @return id or 0 + */ + private int getC_BankStatementLine_ID() + { + String sql = "SELECT C_BankStatementLine_ID FROM C_BankStatementLine WHERE C_Payment_ID=?"; + int id = DB.getSQLValue(get_TrxName(), sql, getC_Payment_ID()); + if (id < 0) + return 0; + return id; + } // getC_BankStatementLine_ID + + /** + * Reverse Accrual - none + * @return true if success + */ + public boolean reverseAccrualIt() + { + log.info(toString()); + + // Before reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + // After reverseAccrual + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL); + if (m_processMsg != null) + return false; + + return false; + } // reverseAccrualIt + + /** + * Re-activate + * @return true if success + */ + public boolean reActivateIt() + { + log.info(toString()); + // Before reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); + if (m_processMsg != null) + return false; + + if (! reverseCorrectIt()) + return false; + + // After reActivate + m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE); + if (m_processMsg != null) + return false; + + return true; + } // reActivateIt + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MPayment["); + sb.append(get_ID()).append("-").append(getDocumentNo()) + .append(",Receipt=").append(isReceipt()) + .append(",PayAmt=").append(getPayAmt()) + .append(",Discount=").append(getDiscountAmt()) + .append(",WriteOff=").append(getWriteOffAmt()) + .append(",OverUnder=").append(getOverUnderAmt()); + return sb.toString (); + } // toString + + /** + * Get Document Info + * @return document info (untranslated) + */ + public String getDocumentInfo() + { + MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); + return dt.getName() + " " + getDocumentNo(); + } // getDocumentInfo + + /** + * Create PDF + * @return File or null + */ + public File createPDF () + { + try + { + File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); + return createPDF (temp); + } + catch (Exception e) + { + log.severe("Could not create PDF - " + e.getMessage()); + } + return null; + } // getPDF + + /** + * Create PDF file + * @param file output file + * @return file if success + */ + public File createPDF (File file) + { + // ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.PAYMENT, getC_Payment_ID()); + // if (re == null) + return null; + // return re.getPDF(file); + } // createPDF + + + /************************************************************************* + * Get Summary + * @return Summary of Document + */ + public String getSummary() + { + StringBuffer sb = new StringBuffer(); + sb.append(getDocumentNo()); + // : Total Lines = 123.00 (#1) + sb.append(": ") + .append(Msg.translate(getCtx(),"PayAmt")).append("=").append(getPayAmt()) + .append(",").append(Msg.translate(getCtx(),"WriteOffAmt")).append("=").append(getWriteOffAmt()); + // - Description + if (getDescription() != null && getDescription().length() > 0) + sb.append(" - ").append(getDescription()); + return sb.toString(); + } // getSummary + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg() + { + return m_processMsg; + } // getProcessMsg + + /** + * Get Document Owner (Responsible) + * @return AD_User_ID + */ + public int getDoc_User_ID() + { + return getCreatedBy(); + } // getDoc_User_ID + + /** + * Get Document Approval Amount + * @return amount payment(AP) or write-off(AR) + */ + public BigDecimal getApprovalAmt() + { + if (isReceipt()) + return getWriteOffAmt(); + return getPayAmt(); + } // getApprovalAmt + +} // MPayment diff --git a/base/src/org/compiere/model/MStorage.java b/base/src/org/compiere/model/MStorage.java new file mode 100644 index 0000000000..fdaa69a837 --- /dev/null +++ b/base/src/org/compiere/model/MStorage.java @@ -0,0 +1,653 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.math.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.util.*; + +/** + * Inventory Storage Model + * + * @author Jorg Janke + * @version $Id: MStorage.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $ + */ +public class MStorage extends X_M_Storage +{ + /** + * Get Storage Info + * @param ctx context + * @param M_Locator_ID locator + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID instance + * @param trxName transaction + * @return existing or null + */ + public static MStorage get (Properties ctx, int M_Locator_ID, + int M_Product_ID, int M_AttributeSetInstance_ID, String trxName) + { + MStorage retValue = null; + String sql = "SELECT * FROM M_Storage " + + "WHERE M_Locator_ID=? AND M_Product_ID=? AND "; + if (M_AttributeSetInstance_ID == 0) + sql += "(M_AttributeSetInstance_ID=? OR M_AttributeSetInstance_ID IS NULL)"; + else + sql += "M_AttributeSetInstance_ID=?"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, M_Locator_ID); + pstmt.setInt (2, M_Product_ID); + pstmt.setInt (3, M_AttributeSetInstance_ID); + rs = pstmt.executeQuery (); + if (rs.next ()) + retValue = new MStorage (ctx, rs, trxName); + } + catch (SQLException ex) + { + s_log.log(Level.SEVERE, sql, ex); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + pstmt = null; + if (retValue == null) + s_log.fine("Not Found - M_Locator_ID=" + M_Locator_ID + + ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID); + else + s_log.fine("M_Locator_ID=" + M_Locator_ID + + ", M_Product_ID=" + M_Product_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID); + return retValue; + } // get + + /** + * Get all Storages for Product with ASI and QtyOnHand > 0 + * @param ctx context + * @param M_Product_ID product + * @param M_Locator_ID locator + * @param FiFo first in-first-out + * @param trxName transaction + * @return existing or null + */ + public static MStorage[] getAllWithASI (Properties ctx, int M_Product_ID, int M_Locator_ID, + boolean FiFo, String trxName) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_Storage " + + "WHERE M_Product_ID=? AND M_Locator_ID=?" + // Remove for management rightly FIFO/LIFO now you can consume a layer with ASI ID = zero and Qty onhand in negative + // + " AND M_AttributeSetInstance_ID > 0" + // + " AND QtyOnHand > 0 " + + " AND QtyOnHand <> 0 " + + "ORDER BY M_AttributeSetInstance_ID"; + if (!FiFo) + sql += " DESC"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, M_Product_ID); + pstmt.setInt (2, M_Locator_ID); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add(new MStorage (ctx, rs, trxName)); + } + catch (SQLException ex) + { + s_log.log(Level.SEVERE, sql, ex); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + pstmt = null; + MStorage[] retValue = new MStorage[list.size()]; + list.toArray(retValue); + return retValue; + } // getAllWithASI + + /** + * Get all Storages for Product + * @param ctx context + * @param M_Product_ID product + * @param M_Locator_ID locator + * @param trxName transaction + * @return existing or null + */ + public static MStorage[] getAll (Properties ctx, + int M_Product_ID, int M_Locator_ID, String trxName) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_Storage " + + "WHERE M_Product_ID=? AND M_Locator_ID=?" + + " AND QtyOnHand <> 0 " + + "ORDER BY M_AttributeSetInstance_ID"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, M_Product_ID); + pstmt.setInt (2, M_Locator_ID); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add(new MStorage (ctx, rs, trxName)); + } + catch (SQLException ex) + { + s_log.log(Level.SEVERE, sql, ex); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + pstmt = null; + MStorage[] retValue = new MStorage[list.size()]; + list.toArray(retValue); + return retValue; + } // getAll + + + /** + * Get Storage Info for Product across warehouses + * @param ctx context + * @param M_Product_ID product + * @param trxName transaction + * @return existing or null + */ + public static MStorage[] getOfProduct (Properties ctx, int M_Product_ID, String trxName) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_Storage " + + "WHERE M_Product_ID=?"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, M_Product_ID); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add(new MStorage (ctx, rs, trxName)); + } + catch (SQLException ex) + { + s_log.log(Level.SEVERE, sql, ex); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + MStorage[] retValue = new MStorage[list.size()]; + list.toArray(retValue); + return retValue; + } // getOfProduct + + /** + * Get Storage Info for Warehouse + * @param ctx context + * @param M_Warehouse_ID + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID instance + * @param M_AttributeSet_ID attribute set + * @param allAttributeInstances if true, all attribute set instances + * @param minGuaranteeDate optional minimum guarantee date if all attribute instances + * @param FiFo first in-first-out + * @param trxName transaction + * @return existing - ordered by location priority (desc) and/or guarantee date + */ + public static MStorage[] getWarehouse (Properties ctx, int M_Warehouse_ID, + int M_Product_ID, int M_AttributeSetInstance_ID, int M_AttributeSet_ID, + boolean allAttributeInstances, Timestamp minGuaranteeDate, + boolean FiFo, String trxName) + { + if (M_Warehouse_ID == 0 || M_Product_ID == 0) + return new MStorage[0]; + + if (M_AttributeSet_ID == 0) + allAttributeInstances = true; + else + { + MAttributeSet mas = MAttributeSet.get(ctx, M_AttributeSet_ID); + if (!mas.isInstanceAttribute()) + allAttributeInstances = true; + } + + ArrayList list = new ArrayList(); + // Specific Attribute Set Instance + String sql = "SELECT s.M_Product_ID,s.M_Locator_ID,s.M_AttributeSetInstance_ID," + + "s.AD_Client_ID,s.AD_Org_ID,s.IsActive,s.Created,s.CreatedBy,s.Updated,s.UpdatedBy," + + "s.QtyOnHand,s.QtyReserved,s.QtyOrdered,s.DateLastInventory " + + "FROM M_Storage s" + + " INNER JOIN M_Locator l ON (l.M_Locator_ID=s.M_Locator_ID) " + + "WHERE l.M_Warehouse_ID=?" + + " AND s.M_Product_ID=?" + + " AND COALESCE(s.M_AttributeSetInstance_ID,0)=? " + + "ORDER BY l.PriorityNo DESC, M_AttributeSetInstance_ID"; + if (!FiFo) + sql += " DESC"; + // All Attribute Set Instances + if (allAttributeInstances) + { + sql = "SELECT s.M_Product_ID,s.M_Locator_ID,s.M_AttributeSetInstance_ID," + + "s.AD_Client_ID,s.AD_Org_ID,s.IsActive,s.Created,s.CreatedBy,s.Updated,s.UpdatedBy," + + "s.QtyOnHand,s.QtyReserved,s.QtyOrdered,s.DateLastInventory " + + "FROM M_Storage s" + + " INNER JOIN M_Locator l ON (l.M_Locator_ID=s.M_Locator_ID)" + + " LEFT OUTER JOIN M_AttributeSetInstance asi ON (s.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) " + + "WHERE l.M_Warehouse_ID=?" + + " AND s.M_Product_ID=? "; + if (minGuaranteeDate != null) + { + sql += "AND (asi.GuaranteeDate IS NULL OR asi.GuaranteeDate>?) " + + "ORDER BY asi.GuaranteeDate, M_AttributeSetInstance_ID"; + if (!FiFo) + sql += " DESC"; + sql += ", l.PriorityNo DESC, s.QtyOnHand DESC"; + } + else + { + sql += "ORDER BY l.PriorityNo DESC, l.M_Locator_ID, s.M_AttributeSetInstance_ID"; + if (!FiFo) + sql += " DESC"; + sql += ", s.QtyOnHand DESC"; + } + } + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, trxName); + pstmt.setInt(1, M_Warehouse_ID); + pstmt.setInt(2, M_Product_ID); + if (!allAttributeInstances) + pstmt.setInt(3, M_AttributeSetInstance_ID); + else if (minGuaranteeDate != null) + pstmt.setTimestamp(3, minGuaranteeDate); + rs = pstmt.executeQuery(); + while (rs.next()) + list.add (new MStorage (ctx, rs, trxName)); + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + MStorage[] retValue = new MStorage[list.size()]; + list.toArray(retValue); + return retValue; + } // getWarehouse + + + /** + * Create or Get Storage Info + * @param ctx context + * @param M_Locator_ID locator + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID instance + * @param trxName transaction + * @return existing/new or null + */ + public static MStorage getCreate (Properties ctx, int M_Locator_ID, + int M_Product_ID, int M_AttributeSetInstance_ID, String trxName) + { + if (M_Locator_ID == 0) + throw new IllegalArgumentException("M_Locator_ID=0"); + if (M_Product_ID == 0) + throw new IllegalArgumentException("M_Product_ID=0"); + MStorage retValue = get(ctx, M_Locator_ID, M_Product_ID, M_AttributeSetInstance_ID, trxName); + if (retValue != null) + return retValue; + + // Insert row based on locator + MLocator locator = new MLocator (ctx, M_Locator_ID, trxName); + if (locator.get_ID() != M_Locator_ID) + throw new IllegalArgumentException("Not found M_Locator_ID=" + M_Locator_ID); + // + retValue = new MStorage (locator, M_Product_ID, M_AttributeSetInstance_ID); + retValue.save(trxName); + s_log.fine("New " + retValue); + return retValue; + } // getCreate + + + /** + * Update Storage Info add. + * Called from MProjectIssue + * @param ctx context + * @param M_Warehouse_ID warehouse + * @param M_Locator_ID locator + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID AS Instance + * @param reservationAttributeSetInstance_ID reservation AS Instance + * @param diffQtyOnHand add on hand + * @param diffQtyReserved add reserved + * @param diffQtyOrdered add order + * @param trxName transaction + * @return true if updated + */ + public static boolean add (Properties ctx, int M_Warehouse_ID, int M_Locator_ID, + int M_Product_ID, int M_AttributeSetInstance_ID, int reservationAttributeSetInstance_ID, + BigDecimal diffQtyOnHand, + BigDecimal diffQtyReserved, BigDecimal diffQtyOrdered, String trxName) + { + MStorage storage = null; + StringBuffer diffText = new StringBuffer("("); + + // Get Storage + if (storage == null) + storage = getCreate (ctx, M_Locator_ID, + M_Product_ID, M_AttributeSetInstance_ID, trxName); + // Verify + if (storage.getM_Locator_ID() != M_Locator_ID + && storage.getM_Product_ID() != M_Product_ID + && storage.getM_AttributeSetInstance_ID() != M_AttributeSetInstance_ID) + { + s_log.severe ("No Storage found - M_Locator_ID=" + M_Locator_ID + + ",M_Product_ID=" + M_Product_ID + ",ASI=" + M_AttributeSetInstance_ID); + return false; + } + + // CarlosRuiz - globalqss - Fix [ 1725383 ] QtyOrdered wrongly updated + MProduct prd = new MProduct(ctx, M_Product_ID, trxName); + if (prd.getM_AttributeSet_ID() == 0) { + // Product doesn't manage attribute set, always reserved with 0 + reservationAttributeSetInstance_ID = 0; + } + // + + MStorage storage0 = null; + if (M_AttributeSetInstance_ID != reservationAttributeSetInstance_ID) + { + storage0 = get(ctx, M_Locator_ID, + M_Product_ID, reservationAttributeSetInstance_ID, trxName); + if (storage0 == null) // create if not existing - should not happen + { + MWarehouse wh = MWarehouse.get(ctx, M_Warehouse_ID); + int xM_Locator_ID = wh.getDefaultLocator().getM_Locator_ID(); + storage0 = getCreate (ctx, xM_Locator_ID, + M_Product_ID, reservationAttributeSetInstance_ID, trxName); + } + } + boolean changed = false; + if (diffQtyOnHand != null && diffQtyOnHand.signum() != 0) + { + storage.setQtyOnHand (storage.getQtyOnHand().add (diffQtyOnHand)); + diffText.append("OnHand=").append(diffQtyOnHand); + changed = true; + } + if (diffQtyReserved != null && diffQtyReserved.signum() != 0) + { + if (storage0 == null) + storage.setQtyReserved (storage.getQtyReserved().add (diffQtyReserved)); + else + storage0.setQtyReserved (storage0.getQtyReserved().add (diffQtyReserved)); + diffText.append(" Reserved=").append(diffQtyReserved); + changed = true; + } + if (diffQtyOrdered != null && diffQtyOrdered.signum() != 0) + { + if (storage0 == null) + storage.setQtyOrdered (storage.getQtyOrdered().add (diffQtyOrdered)); + else + storage0.setQtyOrdered (storage0.getQtyOrdered().add (diffQtyOrdered)); + diffText.append(" Ordered=").append(diffQtyOrdered); + changed = true; + } + if (changed) + { + diffText.append(") -> ").append(storage.toString()); + s_log.fine(diffText.toString()); + if (storage0 != null) + storage0.save(trxName); // No AttributeSetInstance (reserved/ordered) + return storage.save (trxName); + } + + return true; + } // add + + + /************************************************************************** + * Get Location with highest Locator Priority and a sufficient OnHand Qty + * @param M_Warehouse_ID warehouse + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID asi + * @param Qty qty + * @param trxName transaction + * @return id + */ + public static int getM_Locator_ID (int M_Warehouse_ID, + int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal Qty, + String trxName) + { + int M_Locator_ID = 0; + int firstM_Locator_ID = 0; + String sql = "SELECT s.M_Locator_ID, s.QtyOnHand " + + "FROM M_Storage s" + + " INNER JOIN M_Locator l ON (s.M_Locator_ID=l.M_Locator_ID)" + + " INNER JOIN M_Product p ON (s.M_Product_ID=p.M_Product_ID)" + + " LEFT OUTER JOIN M_AttributeSet mas ON (p.M_AttributeSet_ID=mas.M_AttributeSet_ID) " + + "WHERE l.M_Warehouse_ID=?" + + " AND s.M_Product_ID=?" + + " AND (mas.IsInstanceAttribute IS NULL OR mas.IsInstanceAttribute='N' OR s.M_AttributeSetInstance_ID=?)" + + " AND l.IsActive='Y' " + + "ORDER BY l.PriorityNo DESC, s.QtyOnHand DESC"; + + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, trxName); + pstmt.setInt(1, M_Warehouse_ID); + pstmt.setInt(2, M_Product_ID); + pstmt.setInt(3, M_AttributeSetInstance_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + { + BigDecimal QtyOnHand = rs.getBigDecimal(2); + if (QtyOnHand != null && Qty.compareTo(QtyOnHand) <= 0) + { + M_Locator_ID = rs.getInt(1); + break; + } + if (firstM_Locator_ID == 0) + firstM_Locator_ID = rs.getInt(1); + } + } + catch (SQLException ex) + { + s_log.log(Level.SEVERE, sql, ex); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + if (M_Locator_ID != 0) + return M_Locator_ID; + return firstM_Locator_ID; + } // getM_Locator_ID + + /** + * Get Available Qty. + * The call is accurate only if there is a storage record + * and assumes that the product is stocked + * @param M_Warehouse_ID wh + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID masi + * @param trxName transaction + * @return qty available (QtyOnHand-QtyReserved) or null + * @deprecated Since 331b. Please use {@link #getQtyAvailable(int, int, int, int, String)}. + */ + public static BigDecimal getQtyAvailable (int M_Warehouse_ID, + int M_Product_ID, int M_AttributeSetInstance_ID, String trxName) + { + return getQtyAvailable(M_Warehouse_ID, 0, M_Product_ID, M_AttributeSetInstance_ID, trxName); + } + + /** + * Get Warehouse/Locator Available Qty. + * The call is accurate only if there is a storage record + * and assumes that the product is stocked + * @param M_Warehouse_ID wh (if the M_Locator_ID!=0 then M_Warehouse_ID is ignored) + * @param M_Locator_ID locator (if 0, the whole warehouse will be evaluated) + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID masi + * @param trxName transaction + * @return qty available (QtyOnHand-QtyReserved) or null if error + */ + public static BigDecimal getQtyAvailable (int M_Warehouse_ID, int M_Locator_ID, + int M_Product_ID, int M_AttributeSetInstance_ID, String trxName) + { + ArrayList params = new ArrayList(); + StringBuffer sql = new StringBuffer("SELECT COALESCE(SUM(s.QtyOnHand-s.QtyReserved),0)") + .append(" FROM M_Storage s") + .append(" WHERE s.M_Product_ID=?"); + params.add(M_Product_ID); + // Warehouse level + if (M_Locator_ID == 0) { + sql.append(" AND EXISTS (SELECT 1 FROM M_Locator l WHERE s.M_Locator_ID=l.M_Locator_ID AND l.M_Warehouse_ID=?)"); + params.add(M_Warehouse_ID); + } + // Locator level + else { + sql.append(" AND s.M_Locator_ID=?"); + params.add(M_Locator_ID); + } + // With ASI + if (M_AttributeSetInstance_ID != 0) { + sql.append(" AND s.M_AttributeSetInstance_ID=?"); + params.add(M_AttributeSetInstance_ID); + } + // + BigDecimal retValue = DB.getSQLValueBD(trxName, sql.toString(), params); + if (CLogMgt.isLevelFine()) + s_log.fine("M_Warehouse_ID=" + M_Warehouse_ID + ", M_Locator_ID=" + M_Locator_ID + + ",M_Product_ID=" + M_Product_ID + " = " + retValue); + return retValue; + } // getQtyAvailable + + + /************************************************************************** + * Persistency Constructor + * @param ctx context + * @param ignored ignored + * @param trxName transaction + */ + public MStorage (Properties ctx, int ignored, String trxName) + { + super(ctx, 0, trxName); + if (ignored != 0) + throw new IllegalArgumentException("Multi-Key"); + // + setQtyOnHand (Env.ZERO); + setQtyOrdered (Env.ZERO); + setQtyReserved (Env.ZERO); + } // MStorage + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MStorage (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MStorage + + /** + * Full NEW Constructor + * @param locator (parent) locator + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID attribute + */ + private MStorage (MLocator locator, int M_Product_ID, int M_AttributeSetInstance_ID) + { + this (locator.getCtx(), 0, locator.get_TrxName()); + setClientOrg(locator); + setM_Locator_ID (locator.getM_Locator_ID()); + setM_Product_ID (M_Product_ID); + setM_AttributeSetInstance_ID (M_AttributeSetInstance_ID); + } // MStorage + + /** Log */ + private static CLogger s_log = CLogger.getCLogger (MStorage.class); + /** Warehouse */ + private int m_M_Warehouse_ID = 0; + + /** + * Change Qty OnHand + * @param qty quantity + * @param add add if true + */ + public void changeQtyOnHand (BigDecimal qty, boolean add) + { + if (qty == null || qty.signum() == 0) + return; + if (add) + setQtyOnHand(getQtyOnHand().add(qty)); + else + setQtyOnHand(getQtyOnHand().subtract(qty)); + } // changeQtyOnHand + + /** + * Get M_Warehouse_ID of Locator + * @return warehouse + */ + public int getM_Warehouse_ID() + { + if (m_M_Warehouse_ID == 0) + { + MLocator loc = MLocator.get(getCtx(), getM_Locator_ID()); + m_M_Warehouse_ID = loc.getM_Warehouse_ID(); + } + return m_M_Warehouse_ID; + } // getM_Warehouse_ID + + /** + * String Representation + * @return info + */ + public String toString() + { + StringBuffer sb = new StringBuffer("MStorage[") + .append("M_Locator_ID=").append(getM_Locator_ID()) + .append(",M_Product_ID=").append(getM_Product_ID()) + .append(",M_AttributeSetInstance_ID=").append(getM_AttributeSetInstance_ID()) + .append(": OnHand=").append(getQtyOnHand()) + .append(",Reserved=").append(getQtyReserved()) + .append(",Ordered=").append(getQtyOrdered()) + .append("]"); + return sb.toString(); + } // toString + +} // MStorage diff --git a/base/src/org/compiere/model/MWarehouse.java b/base/src/org/compiere/model/MWarehouse.java new file mode 100644 index 0000000000..9c3c1f61c4 --- /dev/null +++ b/base/src/org/compiere/model/MWarehouse.java @@ -0,0 +1,279 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.util.*; + +/** + * Warehouse Model + * + * @author Jorg Janke + * @author victor.perez@e-evolution.com + * @see FR [ 1966337 ] New Method to get the Transit Warehouse based in ID Org http://sourceforge.net/tracker/index.php?func=detail&aid=1966337&group_id=176962&atid=879335 + * @version $Id: MWarehouse.java,v 1.3 2006/07/30 00:58:05 jjanke Exp $ + */ +public class MWarehouse extends X_M_Warehouse +{ + /** + * Get from Cache + * @param ctx context + * @param M_Warehouse_ID id + * @return warehouse + */ + public static MWarehouse get (Properties ctx, int M_Warehouse_ID) + { + Integer key = new Integer(M_Warehouse_ID); + MWarehouse retValue = (MWarehouse)s_cache.get(key); + if (retValue != null) + return retValue; + // + retValue = new MWarehouse (ctx, M_Warehouse_ID, null); + s_cache.put (key, retValue); + return retValue; + } // get + + /** + * Get Warehouses for Org + * @param ctx context + * @param AD_Org_ID id + * @return warehouse + */ + public static MWarehouse[] getForOrg (Properties ctx, int AD_Org_ID) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_Warehouse WHERE IsActive = 'Y' AND AD_Org_ID=? ORDER BY Created"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setInt (1, AD_Org_ID); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new MWarehouse (ctx, rs, null)); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + MWarehouse[] retValue = new MWarehouse[list.size ()]; + list.toArray (retValue); + return retValue; + } // get + + /** + * FR [ 1966337 ] + * Get Warehouses Transit for Org + * @param ctx context + * @param AD_Org_ID id + * @return warehouse + */ + public static MWarehouse[] getInTransitForOrg (Properties ctx, int AD_Org_ID) + { + ArrayList list = new ArrayList(); + String sql = "SELECT * FROM M_Warehouse WHERE IsActive = 'Y' AND IsInTransit = 'Y' AND AD_Org_ID=? ORDER BY Created"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setInt (1, AD_Org_ID); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new MWarehouse (ctx, rs, null)); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + MWarehouse[] retValue = new MWarehouse[list.size ()]; + list.toArray (retValue); + return retValue; + } // get + + /** Cache */ + private static CCache s_cache = new CCache("M_Warehouse", 5); + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MWarehouse.class); + + /** + * Standard Constructor + * @param ctx context + * @param M_Warehouse_ID id + * @param trxName transaction + */ + public MWarehouse (Properties ctx, int M_Warehouse_ID, String trxName) + { + super(ctx, M_Warehouse_ID, trxName); + if (M_Warehouse_ID == 0) + { + // setValue (null); + // setName (null); + // setC_Location_ID (0); + setSeparator ("*"); // * + } + } // MWarehouse + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MWarehouse (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MWarehouse + + /** + * Organization Constructor + * @param org parent + */ + public MWarehouse (MOrg org) + { + this (org.getCtx(), 0, org.get_TrxName()); + setClientOrg(org); + setValue (org.getValue()); + setName (org.getName()); + if (org.getInfo() != null) + setC_Location_ID (org.getInfo().getC_Location_ID()); + } // MWarehouse + + /** Warehouse Locators */ + private MLocator[] m_locators = null; + + /** + * Get Locators + * @param reload if true reload + * @return array of locators + */ + public MLocator[] getLocators(boolean reload) + { + if (!reload && m_locators != null) + return m_locators; + // + String sql = "SELECT * FROM M_Locator WHERE IsActive = 'Y' AND M_Warehouse_ID=? ORDER BY X,Y,Z"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setInt (1, getM_Warehouse_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add(new MLocator (getCtx(), rs, null)); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + // + m_locators = new MLocator[list.size()]; + list.toArray (m_locators); + return m_locators; + } // getLocators + + /** + * Get Default Locator + * @return (first) default locator + */ + public MLocator getDefaultLocator() + { + MLocator[] locators = getLocators(false); + for (int i = 0; i < locators.length; i++) + { + if (locators[i].isDefault() && locators[i].isActive()) + return locators[i]; + } + // No Default - first one + if (locators.length > 0) + { + log.warning("No default locator for " + getName()); + return locators[0]; + } + // No Locator - create one + MLocator loc = new MLocator (this, "Standard"); + loc.setIsDefault(true); + loc.save(); + log.info("Created default locator for " + getName()); + return loc; + } // getLocators + + /** + * After Save + * @param newRecord new + * @param success success + * @return success + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + if (newRecord && success) + insert_Accounting("M_Warehouse_Acct", "C_AcctSchema_Default", null); + + return success; + } // afterSave + + /** + * Before Delete + * @return true + */ + protected boolean beforeDelete () + { + return delete_Accounting("M_Warehouse_Acct"); + } // beforeDelete + +} // MWarehouse diff --git a/base/src/org/compiere/model/ModelValidator.java b/base/src/org/compiere/model/ModelValidator.java new file mode 100644 index 0000000000..a3a555d8c9 --- /dev/null +++ b/base/src/org/compiere/model/ModelValidator.java @@ -0,0 +1,168 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + * Contributor(s) : Layda Salas - globalqss * + *****************************************************************************/ +package org.compiere.model; + +/** + * Model Validator + * + * @author Jorg Janke + * @version $Id: ModelValidator.java,v 1.2 2006/07/30 00:58:18 jjanke Exp $ + * + * 2007/02/26 laydasalasc - globalqss - Add new timings for all before/after events on documents + */ +public interface ModelValidator +{ + /** Model Change Type New */ + public static final int TYPE_BEFORE_NEW = 1; // teo_sarca [ 1675490 ] + public static final int TYPE_NEW = 1; + public static final int CHANGETYPE_NEW = 1; // Compatibility with Compiere 260c + public static final int TYPE_AFTER_NEW = 4; // teo_sarca [ 1675490 ] + public static final int TYPE_AFTER_NEW_REPLICATION = 7; // @Trifon + /** Model Change Type Change */ + public static final int TYPE_BEFORE_CHANGE = 2; // teo_sarca [ 1675490 ] + public static final int TYPE_CHANGE = 2; + public static final int CHANGETYPE_CHANGE = 2; // Compatibility with Compiere 260c + public static final int TYPE_AFTER_CHANGE = 5; // teo_sarca [ 1675490 ] + public static final int TYPE_AFTER_CHANGE_REPLICATION = 8; // @Trifon + /** Model Change Type Delete */ + public static final int TYPE_BEFORE_DELETE = 3; // teo_sarca [ 1675490 ] + public static final int TYPE_DELETE = 3; + public static final int CHANGETYPE_DELETE = 3; // Compatibility with Compiere 260c + public static final int TYPE_AFTER_DELETE = 6; // teo_sarca [ 1675490 ] + public static final int TYPE_BEFORE_DELETE_REPLICATION = 9; // @Trifon + + // Correlation between constant events and list of event script model validators + public static String[] tableEventValidators = new String[] { + "", // 0 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableBeforeNew, // TYPE_BEFORE_NEW = 1 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableBeforeChange, // TYPE_BEFORE_CHANGE = 2 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableBeforeDelete, // TYPE_BEFORE_DELETE = 3 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableAfterNew, // TYPE_AFTER_NEW = 4 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableAfterChange, // TYPE_AFTER_CHANGE = 5 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableAfterDelete, // TYPE_AFTER_DELETE = 6 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableAfterNewReplication, // TYPE_AFTER_NEW_REPLICATION = 7 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableAfterChangeReplication, // TYPE_AFTER_CHANGE_REPLICATION = 8 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_TableBeforeDeleteReplication // TYPE_BEFORE_DELETE_REPLICATION = 9 + }; + + /** Called before document is prepared */ + public static final int TIMING_BEFORE_PREPARE = 1; + public static final int DOCTIMING_BEFORE_PREPARE = 1; // Compatibility with Compiere 260c + /** Called before document is void */ + public static final int TIMING_BEFORE_VOID = 2; + /** Called before document is close */ + public static final int TIMING_BEFORE_CLOSE = 3; + /** Called before document is reactivate */ + public static final int TIMING_BEFORE_REACTIVATE = 4; + /** Called before document is reversecorrect */ + public static final int TIMING_BEFORE_REVERSECORRECT = 5; + /** Called before document is reverseaccrual */ + public static final int TIMING_BEFORE_REVERSEACCRUAL = 6; + /** Called before document is completed */ + public static final int TIMING_BEFORE_COMPLETE = 7; + /** Called after document is prepared */ + public static final int TIMING_AFTER_PREPARE = 8; + /** Called after document is completed */ + public static final int TIMING_AFTER_COMPLETE = 9; + public static final int DOCTIMING_AFTER_COMPLETE = 9; // Compatibility with Compiere 260c + /** Called after document is void */ + public static final int TIMING_AFTER_VOID = 10; + /** Called after document is closed */ + public static final int TIMING_AFTER_CLOSE = 11; + /** Called after document is reactivated */ + public static final int TIMING_AFTER_REACTIVATE = 12; + /** Called after document is reversecorrect */ + public static final int TIMING_AFTER_REVERSECORRECT = 13; + /** Called after document is reverseaccrual */ + public static final int TIMING_AFTER_REVERSEACCRUAL = 14; + /** Called before document is posted */ + public static final int TIMING_BEFORE_POST = 15; + /** Called after document is posted */ + public static final int TIMING_AFTER_POST = 16; + + // Correlation between constant events and list of event script model validators + public static String[] documentEventValidators = new String[] { + "", // 0 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentBeforePrepare, // TIMING_BEFORE_PREPARE = 1 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentBeforeVoid, // TIMING_BEFORE_VOID = 2 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentBeforeClose, // TIMING_BEFORE_CLOSE = 3 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentBeforeReactivate, // TIMING_BEFORE_REACTIVATE = 4 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentBeforeReverseCorrect, // TIMING_BEFORE_REVERSECORRECT = 5 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentBeforeReverseAccrual, // TIMING_BEFORE_REVERSEACCRUAL = 6 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentBeforeComplete, // TIMING_BEFORE_COMPLETE = 7 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentAfterPrepare, // TIMING_AFTER_PREPARE = 8 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentAfterComplete, // TIMING_AFTER_COMPLETE = 9 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentAfterVoid, // TIMING_AFTER_VOID = 10 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentAfterClose, // TIMING_AFTER_CLOSE = 11 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentAfterReactivate, // TIMING_AFTER_REACTIVATE = 12 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentAfterReverseCorrect, // TIMING_AFTER_REVERSECORRECT = 13 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentAfterReverseAccrual, // TIMING_AFTER_REVERSEACCRUAL = 14 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentBeforePost, // TIMING_BEFORE_POST = 15 + X_AD_Table_ScriptValidator.EVENTMODELVALIDATOR_DocumentAfterPost // TIMING_AFTER_POST = 16 + }; + + /** + * Initialize Validation + * @param engine validation engine + * @param client client + */ + public void initialize (ModelValidationEngine engine, MClient client); + + /** + * Get Client to be monitored + * @return AD_Client_ID + */ + public int getAD_Client_ID(); + + /** + * User logged in + * Called before preferences are set + * @param AD_Org_ID org + * @param AD_Role_ID role + * @param AD_User_ID user + * @return error message or null + */ + public String login (int AD_Org_ID, int AD_Role_ID, int AD_User_ID); + + + /** + * Model Change of a monitored Table. + * Called after PO.beforeSave/PO.beforeDelete + * when you called addModelChange for the table + * @param po persistent object + * @param type TYPE_ + * @return error message or null + * @exception Exception if the recipient wishes the change to be not accept. + */ + public String modelChange (PO po, int type) throws Exception; + + + /** + * Validate Document. + * Called as first step of DocAction.prepareIt + * or at the end of DocAction.completeIt + * when you called addDocValidate for the table. + * Note that totals, etc. may not be correct before the prepare stage. + * @param po persistent object + * @param timing see TIMING_ constants + * @return error message or null - + * if not null, the pocument will be marked as Invalid. + */ + public String docValidate (PO po, int timing); + +} // ModelValidator diff --git a/base/src/org/compiere/model/PO.java b/base/src/org/compiere/model/PO.java new file mode 100644 index 0000000000..9ecd41e832 --- /dev/null +++ b/base/src/org/compiere/model/PO.java @@ -0,0 +1,3667 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.model; + +import java.io.Serializable; +import java.io.StringWriter; +import java.math.BigDecimal; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Properties; +import java.util.logging.Level; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.compiere.Adempiere; +import org.compiere.acct.Doc; +import org.compiere.util.CLogMgt; +import org.compiere.util.CLogger; +import org.compiere.util.CacheMgt; +import org.compiere.util.DB; +import org.compiere.util.DBException; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.Evaluatee; +import org.compiere.util.Msg; +import org.compiere.util.SecureEngine; +import org.compiere.util.Trace; +import org.compiere.util.Trx; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +/** + * Persistent Object. + * Superclass for actual implementations + * + * @author Jorg Janke + * @version $Id: PO.java,v 1.12 2006/08/09 16:38:47 jjanke Exp $ + * + * @author Teo Sarca - FR [ 1675490 ], BF [ 1704828 ] + */ +public abstract class PO + implements Serializable, Comparator, Evaluatee +{ + /** + * Set Document Value Workflow Manager + * @param docWFMgr mgr + */ + public static void setDocWorkflowMgr (DocWorkflowMgr docWFMgr) + { + s_docWFMgr = docWFMgr; + s_log.config (s_docWFMgr.toString()); + } // setDocWorkflowMgr + + /** Document Value Workflow Manager */ + private static DocWorkflowMgr s_docWFMgr = null; + + /** User Maintained Entity Type */ + static protected final String ENTITYTYPE_UserMaintained = "U"; + /** Dictionary Maintained Entity Type */ + static protected final String ENTITYTYPE_Dictionary = "D"; + + /************************************************************************** + * Create New Persisent Object + * @param ctx context + */ + public PO (Properties ctx) + { + this (ctx, 0, null, null); + } // PO + + /** + * Create & Load existing Persistent Object + * @param ID The unique ID of the object + * @param ctx context + * @param trxName transaction name + */ + public PO (Properties ctx, int ID, String trxName) + { + this (ctx, ID, trxName, null); + } // PO + + /** + * Create & Load existing Persistent Object. + * @param ctx context + * @param rs optional - load from current result set position (no navigation, not closed) + * if null, a new record is created. + * @param trxName transaction name + */ + public PO (Properties ctx, ResultSet rs, String trxName) + { + this (ctx, 0, trxName, rs); + } // PO + + /** + * Create & Load existing Persistent Object. + *
    +	 *  You load
    +	 * 		- an existing single key record with 	new PO (ctx, Record_ID)
    +	 * 			or									new PO (ctx, Record_ID, trxName)
    +	 * 			or									new PO (ctx, rs, get_TrxName())
    +	 * 		- a new single key record with			new PO (ctx, 0)
    +	 * 		- an existing multi key record with		new PO (ctx, rs, get_TrxName())
    +	 * 		- a new multi key record with			new PO (ctx, null)
    +	 *  The ID for new single key records is created automatically,
    +	 *  you need to set the IDs for multi-key records explicitly.
    +	 *	
    + * @param ctx context + * @param ID the ID if 0, the record defaults are applied - ignored if re exists + * @param trxName transaction name + * @param rs optional - load from current result set position (no navigation, not closed) + */ + public PO (Properties ctx, int ID, String trxName, ResultSet rs) + { + if (ctx == null) + throw new IllegalArgumentException ("No Context"); + p_ctx = ctx; + m_trxName = trxName; + + p_info = initPO(ctx); + if (p_info == null || p_info.getTableName() == null) + throw new IllegalArgumentException ("Invalid PO Info - " + p_info); + // + int size = p_info.getColumnCount(); + m_oldValues = new Object[size]; + m_newValues = new Object[size]; + + if (rs != null) + load(rs); // will not have virtual columns + else + load(ID, trxName); + } // PO + + /** + * Create New PO by Copying existing (key not copied). + * @param ctx context + * @param source souce object + * @param AD_Client_ID client + * @param AD_Org_ID org + */ + public PO (Properties ctx, PO source, int AD_Client_ID, int AD_Org_ID) + { + this (ctx, 0, null, null); // create new + // + if (source != null) + copyValues (source, this); + setAD_Client_ID(AD_Client_ID); + setAD_Org_ID(AD_Org_ID); + } // PO + + + /** Logger */ + protected transient CLogger log = CLogger.getCLogger (getClass()); + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (PO.class); + + /** Context */ + protected Properties p_ctx; + /** Model Info */ + protected volatile POInfo p_info = null; + + /** Original Values */ + private Object[] m_oldValues = null; + /** New Valies */ + private Object[] m_newValues = null; + + /** Record_IDs */ + private Object[] m_IDs = new Object[] {I_ZERO}; + /** Key Columns */ + private String[] m_KeyColumns = null; + /** Create New for Multi Key */ + private boolean m_createNew = false; + /** Attachment with entriess */ + private MAttachment m_attachment = null; + /** Deleted ID */ + private int m_idOld = 0; + /** Custom Columns */ + private HashMap m_custom = null; + + /** Zero Integer */ + protected static final Integer I_ZERO = new Integer(0); + /** Accounting Columns */ + private ArrayList s_acctColumns = null; + + /** TODO - Trifon */ + private boolean m_isReplication = false; + + /** Access Level S__ 100 4 System info */ + public static final int ACCESSLEVEL_SYSTEM = 4; + /** Access Level _C_ 010 2 Client info */ + public static final int ACCESSLEVEL_CLIENT = 2; + /** Access Level __O 001 1 Organization info */ + public static final int ACCESSLEVEL_ORG = 1; + /** Access Level SCO 111 7 System shared info */ + public static final int ACCESSLEVEL_ALL = 7; + /** Access Level SC_ 110 6 System/Client info */ + public static final int ACCESSLEVEL_SYSTEMCLIENT = 6; + /** Access Level _CO 011 3 Client shared info */ + public static final int ACCESSLEVEL_CLIENTORG = 3; + + + /** + * Initialize and return PO_Info + * @param ctx context + * @return POInfo + */ + abstract protected POInfo initPO (Properties ctx); + + /** + * Get Table Access Level + * @return Access Level + */ + abstract protected int get_AccessLevel(); + + /** + * String representation + * @return String representation + */ + public String toString() + { + StringBuffer sb = new StringBuffer("PO[") + .append(get_WhereClause(true)).append("]"); + return sb.toString(); + } // toString + + /** + * Equals based on ID + * @param cmp comperator + * @return true if ID the same + */ + public boolean equals (Object cmp) + { + if (cmp == null) + return false; + if (!(cmp instanceof PO)) + return false; + if (cmp.getClass().equals(this.getClass())) + // if both ID's are zero they can't be compared by ID + if (((PO)cmp).get_ID() == 0 && get_ID() == 0) + return super.equals(cmp); + else + return ((PO)cmp).get_ID() == get_ID(); + return super.equals(cmp); + } // equals + + /** + * Compare based on DocumentNo, Value, Name, Description + * @param o1 Object 1 + * @param o2 Object 2 + * @return -1 if o1 < o2 + */ + public int compare (Object o1, Object o2) + { + if (o1 == null) + return -1; + else if (o2 == null) + return 1; + if (!(o1 instanceof PO)) + throw new ClassCastException ("Not PO -1- " + o1); + if (!(o2 instanceof PO)) + throw new ClassCastException ("Not PO -2- " + o2); + // same class + if (o1.getClass().equals(o2.getClass())) + { + int index = get_ColumnIndex("DocumentNo"); + if (index == -1) + index = get_ColumnIndex("Value"); + if (index == -1) + index = get_ColumnIndex("Name"); + if (index == -1) + index = get_ColumnIndex("Description"); + if (index != -1) + { + PO po1 = (PO)o1; + Object comp1 = po1.get_Value(index); + PO po2 = (PO)o2; + Object comp2 = po2.get_Value(index); + if (comp1 == null) + return -1; + else if (comp2 == null) + return 1; + return comp1.toString().compareTo(comp2.toString()); + } + } + return o1.toString().compareTo(o2.toString()); + } // compare + + /** + * Get TableName. + * @return table name + */ + public String get_TableName() + { + return p_info.getTableName(); + } // get_TableName + + /** + * Get Key Columns. + * @return table name + */ + public String[] get_KeyColumns() + { + return m_KeyColumns; + } // get_KeyColumns + + /** + * Get Table ID. + * @return table id + */ + public int get_Table_ID() + { + return p_info.getAD_Table_ID(); + } // get_TableID + + /** + * Return Single Key Record ID + * @return ID or 0 + */ + public int get_ID() + { + Object oo = m_IDs[0]; + if (oo != null && oo instanceof Integer) + return ((Integer)oo).intValue(); + return 0; + } // getID + + /** + * Return Deleted Single Key Record ID + * @return ID or 0 + */ + public int get_IDOld() + { + return m_idOld; + } // getID + + /** + * Get Context + * @return context + */ + public Properties getCtx() + { + return p_ctx; + } // getCtx + + /** + * Get Logger + * @return logger + */ + public CLogger get_Logger() + { + return log; + } // getLogger + + /************************************************************************** + * Get Value + * @param index index + * @return value + */ + public final Object get_Value (int index) + { + if (index < 0 || index >= get_ColumnCount()) + { + log.log(Level.WARNING, "Index invalid - " + index); + return null; + } + if (m_newValues[index] != null) + { + if (m_newValues[index].equals(Null.NULL)) + return null; + return m_newValues[index]; + } + return m_oldValues[index]; + } // get_Value + + /** + * Get Value as int + * @param index index + * @return int value or 0 + */ + protected int get_ValueAsInt (int index) + { + Object value = get_Value(index); + if (value == null) + return 0; + if (value instanceof Integer) + return ((Integer)value).intValue(); + try + { + return Integer.parseInt(value.toString()); + } + catch (NumberFormatException ex) + { + log.warning(p_info.getColumnName(index) + " - " + ex.getMessage()); + return 0; + } + } // get_ValueAsInt + + /** + * Get Value + * @param columnName column name + * @return value or null + */ + public final Object get_Value (String columnName) + { + int index = get_ColumnIndex(columnName); + if (index < 0) + { + log.log(Level.WARNING, "Column not found - " + columnName); + Trace.printStack(); + return null; + } + return get_Value (index); + } // get_Value + + /** + * Get Encrypted Value + * @param columnName column name + * @return value or null + */ + protected final Object get_ValueE (String columnName) + { + return get_Value (columnName); + } // get_ValueE + + /** + * Get Column Value + * @param variableName name + * @return value or "" + */ + public String get_ValueAsString (String variableName) + { + Object value = get_Value (variableName); + if (value == null) + return ""; + return value.toString(); + } // get_ValueAsString + + /** + * Get Value of Column + * @param AD_Column_ID column + * @return value or null + */ + public final Object get_ValueOfColumn (int AD_Column_ID) + { + int index = p_info.getColumnIndex(AD_Column_ID); + if (index < 0) + { + log.log(Level.WARNING, "Not found - AD_Column_ID=" + AD_Column_ID); + return null; + } + return get_Value (index); + } // get_ValueOfColumn + + /** + * Get Old Value + * @param index index + * @return value + */ + public final Object get_ValueOld (int index) + { + if (index < 0 || index >= get_ColumnCount()) + { + log.log(Level.WARNING, "Index invalid - " + index); + return null; + } + return m_oldValues[index]; + } // get_ValueOld + + /** + * Get Old Value + * @param columnName column name + * @return value or null + */ + public final Object get_ValueOld (String columnName) + { + int index = get_ColumnIndex(columnName); + if (index < 0) + { + log.log(Level.WARNING, "Column not found - " + columnName); + return null; + } + return get_ValueOld (index); + } // get_ValueOld + + /** + * Get Old Value as int + * @param columnName column name + * @return int value or 0 + */ + protected int get_ValueOldAsInt (String columnName) + { + Object value = get_ValueOld(columnName); + if (value == null) + return 0; + if (value instanceof Integer) + return ((Integer)value).intValue(); + try + { + return Integer.parseInt(value.toString()); + } + catch (NumberFormatException ex) + { + log.warning(columnName + " - " + ex.getMessage()); + return 0; + } + } // get_ValueOldAsInt + + /** + * Is Value Changed + * @param index index + * @return true if changed + */ + public final boolean is_ValueChanged (int index) + { + if (index < 0 || index >= get_ColumnCount()) + { + log.log(Level.WARNING, "Index invalid - " + index); + return false; + } + if (m_newValues[index] == null) + return false; + return !m_newValues[index].equals(m_oldValues[index]); + } // is_ValueChanged + + /** + * Is Value Changed + * @param columnName column name + * @return true if changed + */ + public final boolean is_ValueChanged (String columnName) + { + int index = get_ColumnIndex(columnName); + if (index < 0) + { + log.log(Level.WARNING, "Column not found - " + columnName); + return false; + } + return is_ValueChanged (index); + } // is_ValueChanged + + /** + * Return new - old. + * - New Value if Old Valus is null + * - New Value - Old Value if Number + * - otherwise null + * @param index index + * @return new - old or null if not appropiate or not changed + */ + public final Object get_ValueDifference (int index) + { + if (index < 0 || index >= get_ColumnCount()) + { + log.log(Level.WARNING, "Index invalid - " + index); + return null; + } + Object nValue = m_newValues[index]; + // No new Value or NULL + if (nValue == null || nValue == Null.NULL) + return null; + // + Object oValue = m_oldValues[index]; + if (oValue == null || oValue == Null.NULL) + return nValue; + if (nValue instanceof BigDecimal) + { + BigDecimal obd = (BigDecimal)oValue; + return ((BigDecimal)nValue).subtract(obd); + } + else if (nValue instanceof Integer) + { + int result = ((Integer)nValue).intValue(); + result -= ((Integer)oValue).intValue(); + return new Integer(result); + } + // + log.warning("Invalid type - New=" + nValue); + return null; + } // get_ValueDifference + + /** + * Return new - old. + * - New Value if Old Valus is null + * - New Value - Old Value if Number + * - otherwise null + * @param columnName column name + * @return new - old or null if not appropiate or not changed + */ + public final Object get_ValueDifference (String columnName) + { + int index = get_ColumnIndex(columnName); + if (index < 0) + { + log.log(Level.WARNING, "Column not found - " + columnName); + return null; + } + return get_ValueDifference (index); + } // get_ValueDifference + + + /************************************************************************** + * Set Value + * @param ColumnName column name + * @param value value + * @return true if value set + */ + protected final boolean set_Value (String ColumnName, Object value) + { + if (value instanceof String && ColumnName.equals("WhereClause") + && value.toString().toUpperCase().indexOf("=NULL") != -1) + log.warning("Invalid Null Value - " + ColumnName + "=" + value); + + int index = get_ColumnIndex(ColumnName); + if (index < 0) + { + log.log(Level.SEVERE, "Column not found - " + ColumnName); + return false; + } + if (ColumnName.endsWith("_ID") && value instanceof String ) + { + log.severe("Invalid Data Type for " + ColumnName + "=" + value); + value = Integer.parseInt((String)value); + } + + return set_Value (index, value); + } // setValue + + /** + * Set Encrypted Value + * @param ColumnName column name + * @param value value + * @return true if value set + */ + protected final boolean set_ValueE (String ColumnName, Object value) + { + return set_Value (ColumnName, value); + } // setValueE + + /** + * Set Value if updateable and correct class. + * (and to NULL if not mandatory) + * @param index index + * @param value value + * @return true if value set + */ + protected final boolean set_Value (int index, Object value) + { + if (index < 0 || index >= get_ColumnCount()) + { + log.log(Level.WARNING, "Index invalid - " + index); + return false; + } + String ColumnName = p_info.getColumnName(index); + String colInfo = " - " + ColumnName; + // + if (p_info.isVirtualColumn(index)) + { + log.log(Level.WARNING, "Virtual Column" + colInfo); + return false; + } + // + // globalqss -- Bug 1618469 - is throwing not updateable even on new records + // if (!p_info.isColumnUpdateable(index)) + if ( ( ! p_info.isColumnUpdateable(index) ) && ( ! is_new() ) ) + { + colInfo += " - NewValue=" + value + " - OldValue=" + get_Value(index); + log.log(Level.WARNING, "Column not updateable" + colInfo); + return false; + } + // + if (value == null) + { + if (p_info.isColumnMandatory(index)) + { + log.log(Level.WARNING, "Cannot set mandatory column to null " + colInfo); + // Trace.printStack(); + return false; + } + m_newValues[index] = Null.NULL; // correct + log.finer(ColumnName + " = null"); + } + else + { + // matching class or generic object + if (value.getClass().equals(p_info.getColumnClass(index)) + || p_info.getColumnClass(index) == Object.class) + m_newValues[index] = value; // correct + // Integer can be set as BigDecimal + else if (value.getClass() == BigDecimal.class + && p_info.getColumnClass(index) == Integer.class) + m_newValues[index] = new Integer (((BigDecimal)value).intValue()); + // Set Boolean + else if (p_info.getColumnClass(index) == Boolean.class + && ("Y".equals(value) || "N".equals(value)) ) + m_newValues[index] = new Boolean("Y".equals(value)); + // added by vpj-cd + // To solve BUG [ 1618423 ] Set Project Type button in Project window throws warning + // generated because C_Project.C_Project_Type_ID is defined as button in dictionary + // although is ID (integer) in database + else if (value.getClass() == Integer.class + && p_info.getColumnClass(index) == String.class) + m_newValues[index] = value; + else if (value.getClass() == String.class + && p_info.getColumnClass(index) == Integer.class) + try + { + m_newValues[index] = new Integer((String)value); + } + catch (NumberFormatException e) + { + log.log(Level.SEVERE, ColumnName + + " - Class invalid: " + value.getClass().toString() + + ", Should be " + p_info.getColumnClass(index).toString() + ": " + value); + return false; + } + else + { + log.log(Level.SEVERE, ColumnName + + " - Class invalid: " + value.getClass().toString() + + ", Should be " + p_info.getColumnClass(index).toString() + ": " + value); + return false; + } + // Validate (Min/Max) + String error = p_info.validate(index, value); + if (error != null) + { + log.log(Level.WARNING, ColumnName + "=" + value + " - " + error); + return false; + } + // Length for String + if (p_info.getColumnClass(index) == String.class) + { + String stringValue = value.toString(); + int length = p_info.getFieldLength(index); + if (stringValue.length() > length && length > 0) + { + log.warning(ColumnName + " - Value too long - truncated to length=" + length); + m_newValues[index] = stringValue.substring(0,length-1); + } + } + log.finest(ColumnName + " = " + m_newValues[index]); + } + set_Keys (ColumnName, m_newValues[index]); + return true; + } // setValue + + /** + * Set Value w/o check (update, r/o, ..). + * Used when Column is R/O + * Required for key and parent values + * @param ColumnName column name + * @param value value + * @return true if value set + */ + protected final boolean set_ValueNoCheck (String ColumnName, Object value) + { + int index = get_ColumnIndex(ColumnName); + if (index < 0) + { + log.log(Level.SEVERE, "Column not found - " + ColumnName); + return false; + } + if (value == null) + m_newValues[index] = Null.NULL; // write direct + else + { + // matching class or generic object + if (value.getClass().equals(p_info.getColumnClass(index)) + || p_info.getColumnClass(index) == Object.class) + m_newValues[index] = value; // correct + // Integer can be set as BigDecimal + else if (value.getClass() == BigDecimal.class + && p_info.getColumnClass(index) == Integer.class) + m_newValues[index] = new Integer (((BigDecimal)value).intValue()); + // Set Boolean + else if (p_info.getColumnClass(index) == Boolean.class + && ("Y".equals(value) || "N".equals(value)) ) + m_newValues[index] = new Boolean("Y".equals(value)); + else if (p_info.getColumnClass(index) == Integer.class + && value.getClass() == String.class) + { + try + { + int intValue = Integer.parseInt((String)value); + m_newValues[index] = Integer.valueOf(intValue); + } + catch (Exception e) + { + log.warning (ColumnName + + " - Class invalid: " + value.getClass().toString() + + ", Should be " + p_info.getColumnClass(index).toString() + ": " + value); + m_newValues[index] = null; + } + } + else + { + log.warning (ColumnName + + " - Class invalid: " + value.getClass().toString() + + ", Should be " + p_info.getColumnClass(index).toString() + ": " + value); + m_newValues[index] = value; // correct + } + // Validate (Min/Max) + String error = p_info.validate(index, value); + if (error != null) + log.warning(ColumnName + "=" + value + " - " + error); + // length for String + if (p_info.getColumnClass(index) == String.class) + { + String stringValue = value.toString(); + int length = p_info.getFieldLength(index); + if (stringValue.length() > length && length > 0) + { + log.warning(ColumnName + " - Value too long - truncated to length=" + length); + m_newValues[index] = stringValue.substring(0,length-1); + } + } + } + log.finest(ColumnName + " = " + m_newValues[index] + + " (" + (m_newValues[index]==null ? "-" : m_newValues[index].getClass().getName()) + ")"); + set_Keys (ColumnName, m_newValues[index]); + return true; + } // set_ValueNoCheck + + /** + * Set Encrypted Value w/o check (update, r/o, ..). + * Used when Column is R/O + * Required for key and parent values + * @param ColumnName column name + * @param value value + * @return true if value set + */ + protected final boolean set_ValueNoCheckE (String ColumnName, Object value) + { + return set_ValueNoCheckE (ColumnName, value); + } // set_ValueNoCheckE + + /** + * Set value of Column + * @param columnName + * @param value + */ + public final void set_ValueOfColumn(String columnName, Object value) + { + int AD_Column_ID = p_info.getAD_Column_ID(columnName); + if (AD_Column_ID > 0) + { + set_ValueOfColumn(AD_Column_ID, value); + } + } + + /** + * Set Value of Column + * @param AD_Column_ID column + * @param value value + */ + public final void set_ValueOfColumn (int AD_Column_ID, Object value) + { + int index = p_info.getColumnIndex(AD_Column_ID); + if (index < 0) + log.log(Level.SEVERE, "Not found - AD_Column_ID=" + AD_Column_ID); + String ColumnName = p_info.getColumnName(index); + if (ColumnName.equals("IsApproved")) + set_ValueNoCheck(ColumnName, value); + else + set_Value (index, value); + } // setValueOfColumn + + + /** + * Set Custom Column + * @param columnName column + * @param value value + */ + public final void set_CustomColumn (String columnName, Object value) + { + // [ 1845793 ] PO.set_CustomColumn not updating correctly m_newValues + // this is for columns not in PO - verify and call proper method if exists + int poIndex = get_ColumnIndex(columnName); + if (poIndex > 0) { + // is not custom column - it exists in the PO + set_Value(columnName, value); + return; + } + if (m_custom == null) + m_custom = new HashMap(); + String valueString = "NULL"; + if (value == null) + ; + else if (value instanceof Number) + valueString = value.toString(); + else if (value instanceof Boolean) + valueString = ((Boolean)value).booleanValue() ? "'Y'" : "'N'"; + else if (value instanceof Timestamp) + valueString = DB.TO_DATE((Timestamp)value, false); + else // if (value instanceof String) + valueString = DB.TO_STRING(value.toString()); + // Save it + log.log(Level.INFO, columnName + "=" + valueString); + m_custom.put(columnName, valueString); + } // set_CustomColumn + + + /** + * Set (numeric) Key Value + * @param ColumnName column name + * @param value value + */ + private void set_Keys (String ColumnName, Object value) + { + // Update if KeyColumn + for (int i = 0; i < m_IDs.length; i++) + { + if (ColumnName.equals (m_KeyColumns[i])) + { + m_IDs[i] = value; + } + } // for all key columns + } // setKeys + + + /************************************************************************** + * Get Column Count + * @return column count + */ + protected int get_ColumnCount() + { + return p_info.getColumnCount(); + } // getColumnCount + + /** + * Get Column Name + * @param index index + * @return ColumnName + */ + protected String get_ColumnName (int index) + { + return p_info.getColumnName (index); + } // getColumnName + + /** + * Get Column Label + * @param index index + * @return Column Label + */ + protected String get_ColumnLabel (int index) + { + return p_info.getColumnLabel (index); + } // getColumnLabel + + /** + * Get Column Description + * @param index index + * @return column description + */ + protected String get_ColumnDescription (int index) + { + return p_info.getColumnDescription (index); + } // getColumnDescription + + /** + * Is Column Mandatory + * @param index index + * @return true if column mandatory + */ + protected boolean isColumnMandatory (int index) + { + return p_info.isColumnMandatory(index); + } // isColumnNandatory + + /** + * Is Column Updateable + * @param index index + * @return true if column updateable + */ + protected boolean isColumnUpdateable (int index) + { + return p_info.isColumnUpdateable(index); + } // isColumnUpdateable + + /** + * Set Column Updateable + * @param index index + * @param updateable column updateable + */ + protected void set_ColumnUpdateable (int index, boolean updateable) + { + p_info.setColumnUpdateable(index, updateable); + } // setColumnUpdateable + + /** + * Set all columns updateable + * @param updateable updateable + */ + protected void setUpdateable (boolean updateable) + { + p_info.setUpdateable (updateable); + } // setUpdateable + + /** + * Get Column DisplayType + * @param index index + * @return display type + */ + protected int get_ColumnDisplayType (int index) + { + return p_info.getColumnDisplayType(index); + } // getColumnDisplayType + + /** + * Get Lookup + * @param index index + * @return Lookup or null + */ + protected Lookup get_ColumnLookup(int index) + { + return p_info.getColumnLookup(index); + } // getColumnLookup + + /** + * Get Column Index + * @param columnName column name + * @return index of column with ColumnName or -1 if not found + */ + public final int get_ColumnIndex (String columnName) + { + return p_info.getColumnIndex(columnName); + } // getColumnIndex + + /** + * Get Display Value of value + * @param columnName columnName + * @param currentValue current value + * @return String value with "./." as null + */ + protected String get_DisplayValue(String columnName, boolean currentValue) + { + Object value = currentValue ? get_Value(columnName) : get_ValueOld(columnName); + if (value == null) + return "./."; + String retValue = value.toString(); + int index = get_ColumnIndex(columnName); + if (index < 0) + return retValue; + int dt = get_ColumnDisplayType(index); + if (DisplayType.isText(dt) || DisplayType.YesNo == dt) + return retValue; + // Lookup + Lookup lookup = get_ColumnLookup(index); + if (lookup != null) + return lookup.getDisplay(value); + // Other + return retValue; + } // get_DisplayValue + + + /** + * Copy old values of From to new values of To. + * Does not copy Keys + * @param from old, existing & unchanged PO + * @param to new, not saved PO + * @param AD_Client_ID client + * @param AD_Org_ID org + */ + protected static void copyValues (PO from, PO to, int AD_Client_ID, int AD_Org_ID) + { + copyValues (from, to); + to.setAD_Client_ID(AD_Client_ID); + to.setAD_Org_ID(AD_Org_ID); + } // copyValues + + /** + * Copy old values of From to new values of To. + * Does not copy Keys and AD_Client_ID/AD_Org_ID + * @param from old, existing & unchanged PO + * @param to new, not saved PO + */ + public static void copyValues (PO from, PO to) + { + s_log.fine("From ID=" + from.get_ID() + " - To ID=" + to.get_ID()); + // Different Classes + if (from.getClass() != to.getClass()) + { + for (int i1 = 0; i1 < from.m_oldValues.length; i1++) + { + if (from.p_info.isVirtualColumn(i1) + || from.p_info.isKey(i1)) // KeyColumn + continue; + String colName = from.p_info.getColumnName(i1); + // Ignore Standard Values + if (colName.startsWith("Created") + || colName.startsWith("Updated") + || colName.equals("IsActive") + || colName.equals("AD_Client_ID") + || colName.equals("AD_Org_ID") + || colName.equals("Processing") + ) + ; // ignore + else + { + for (int i2 = 0; i2 < to.m_oldValues.length; i2++) + { + if (to.p_info.getColumnName(i2).equals(colName)) + { + to.m_newValues[i2] = from.m_oldValues[i1]; + break; + } + } + } + } // from loop + } + else // same class + { + for (int i = 0; i < from.m_oldValues.length; i++) + { + if (from.p_info.isVirtualColumn(i) + || from.p_info.isKey(i)) // KeyColumn + continue; + String colName = from.p_info.getColumnName(i); + // Ignore Standard Values + if (colName.startsWith("Created") + || colName.startsWith("Updated") + || colName.equals("IsActive") + || colName.equals("AD_Client_ID") + || colName.equals("AD_Org_ID") + || colName.equals("Processing") + ) + ; // ignore + else + to.m_newValues[i] = from.m_oldValues[i]; + } + } // same class + } // copy + + + /************************************************************************** + * Load record with ID + * @param ID ID + * @param trxName transaction name + */ + protected void load (int ID, String trxName) + { + log.finest("ID=" + ID); + if (ID > 0) + { + m_IDs = new Object[] {new Integer(ID)}; + m_KeyColumns = new String[] {p_info.getTableName() + "_ID"}; + load(trxName); + } + else // new + { + loadDefaults(); + m_createNew = true; + setKeyInfo(); // sets m_IDs + loadComplete(true); + } + } // load + + + /** + * (re)Load record with m_ID[*] + * @param trxName transaction + * @return true if loaded + */ + public boolean load (String trxName) + { + m_trxName = trxName; + boolean success = true; + StringBuffer sql = new StringBuffer("SELECT "); + int size = get_ColumnCount(); + for (int i = 0; i < size; i++) + { + if (i != 0) + sql.append(","); + sql.append(p_info.getColumnSQL(i)); // Normal and Virtual Column + } + sql.append(" FROM ").append(p_info.getTableName()) + .append(" WHERE ") + .append(get_WhereClause(false)); + + // + // int index = -1; + if (CLogMgt.isLevelFinest()) + log.finest(get_WhereClause(true)); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql.toString(), m_trxName); // local trx only + for (int i = 0; i < m_IDs.length; i++) + { + Object oo = m_IDs[i]; + if (oo instanceof Integer) + pstmt.setInt(i+1, ((Integer)m_IDs[i]).intValue()); + else + pstmt.setString(i+1, m_IDs[i].toString()); + } + rs = pstmt.executeQuery(); + if (rs.next()) + { + success = load(rs); + } + else + { + log.log(Level.SEVERE, "NO Data found for " + get_WhereClause(true), new Exception()); + m_IDs = new Object[] {I_ZERO}; + success = false; + // throw new DBException("NO Data found for " + get_WhereClause(true)); + } + m_createNew = false; + // reset new values + m_newValues = new Object[size]; + } + catch (Exception e) + { + String msg = ""; + if (m_trxName != null) + msg = "[" + m_trxName + "] - "; + msg += get_WhereClause(true) + // + ", Index=" + index + // + ", Column=" + get_ColumnName(index) + // + ", " + p_info.toString(index) + + ", SQL=" + sql.toString(); + success = false; + m_IDs = new Object[] {I_ZERO}; + log.log(Level.SEVERE, msg, e); + // throw new DBException(e); + } + // Finish + finally { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + loadComplete(success); + return success; + } // load + + + /** + * Load from the current position of a ResultSet + * @param rs result set + * @return true if loaded + */ + protected boolean load (ResultSet rs) + { + int size = get_ColumnCount(); + boolean success = true; + int index = 0; + log.finest("(rs)"); + // load column values + for (index = 0; index < size; index++) + { + String columnName = p_info.getColumnName(index); + Class clazz = p_info.getColumnClass(index); + int dt = p_info.getColumnDisplayType(index); + try + { + if (clazz == Integer.class) + m_oldValues[index] = decrypt(index, new Integer(rs.getInt(columnName))); + else if (clazz == BigDecimal.class) + m_oldValues[index] = decrypt(index, rs.getBigDecimal(columnName)); + else if (clazz == Boolean.class) + m_oldValues[index] = new Boolean ("Y".equals(decrypt(index, rs.getString(columnName)))); + else if (clazz == Timestamp.class) + m_oldValues[index] = decrypt(index, rs.getTimestamp(columnName)); + else if (DisplayType.isLOB(dt)) + m_oldValues[index] = get_LOB (rs.getObject(columnName)); + else if (clazz == String.class) + m_oldValues[index] = decrypt(index, rs.getString(columnName)); + else + m_oldValues[index] = loadSpecial(rs, index); + // NULL + if (rs.wasNull() && m_oldValues[index] != null) + m_oldValues[index] = null; + // + if (CLogMgt.isLevelAll()) + log.finest(String.valueOf(index) + ": " + p_info.getColumnName(index) + + "(" + p_info.getColumnClass(index) + ") = " + m_oldValues[index]); + } + catch (SQLException e) + { + if (p_info.isVirtualColumn(index)) // if rs constructor used + log.log(Level.FINER, "Virtual Column not loaded: " + columnName); + else + { + log.log(Level.SEVERE, "(rs) - " + String.valueOf(index) + + ": " + p_info.getTableName() + "." + p_info.getColumnName(index) + + " (" + p_info.getColumnClass(index) + ") - " + e); + success = false; + } + } + } + m_createNew = false; + setKeyInfo(); + loadComplete(success); + return success; + } // load + + /** + * Load from HashMap + * @param hmIn hash map + * @return true if loaded + */ + protected boolean load (HashMap hmIn) + { + int size = get_ColumnCount(); + boolean success = true; + int index = 0; + log.finest("(hm)"); + // load column values + for (index = 0; index < size; index++) + { + String columnName = p_info.getColumnName(index); + String value = (String)hmIn.get(columnName); + if (value == null) + continue; + Class clazz = p_info.getColumnClass(index); + int dt = p_info.getColumnDisplayType(index); + try + { + if (clazz == Integer.class) + m_oldValues[index] = new Integer(value); + else if (clazz == BigDecimal.class) + m_oldValues[index] = new BigDecimal(value); + else if (clazz == Boolean.class) + m_oldValues[index] = new Boolean ("Y".equals(value)); + else if (clazz == Timestamp.class) + m_oldValues[index] = Timestamp.valueOf(value); + else if (DisplayType.isLOB(dt)) + m_oldValues[index] = null; // get_LOB (rs.getObject(columnName)); + else if (clazz == String.class) + m_oldValues[index] = value; + else + m_oldValues[index] = null; // loadSpecial(rs, index); + // + if (CLogMgt.isLevelAll()) + log.finest(String.valueOf(index) + ": " + p_info.getColumnName(index) + + "(" + p_info.getColumnClass(index) + ") = " + m_oldValues[index]); + } + catch (Exception e) + { + if (p_info.isVirtualColumn(index)) // if rs constructor used + log.log(Level.FINER, "Virtual Column not loaded: " + columnName); + else + { + log.log(Level.SEVERE, "(ht) - " + String.valueOf(index) + + ": " + p_info.getTableName() + "." + p_info.getColumnName(index) + + " (" + p_info.getColumnClass(index) + ") - " + e); + success = false; + } + } + } + m_createNew = false; + // Overwrite + setStandardDefaults(); + setKeyInfo(); + loadComplete(success); + return success; + } // load + + /** + * Create Hashmap with data as Strings + * @return HashMap + */ + protected HashMap get_HashMap() + { + HashMap hmOut = new HashMap(); + int size = get_ColumnCount(); + for (int i = 0; i < size; i++) + { + Object value = get_Value(i); + // Don't insert NULL values (allows Database defaults) + if (value == null + || p_info.isVirtualColumn(i)) + continue; + // Display Type + int dt = p_info.getColumnDisplayType(i); + // Based on class of definition, not class of value + Class c = p_info.getColumnClass(i); + String stringValue = null; + if (c == Object.class) + ; // saveNewSpecial (value, i)); + else if (value == null || value.equals (Null.NULL)) + ; + else if (value instanceof Integer || value instanceof BigDecimal) + stringValue = value.toString(); + else if (c == Boolean.class) + { + boolean bValue = false; + if (value instanceof Boolean) + bValue = ((Boolean)value).booleanValue(); + else + bValue = "Y".equals(value); + stringValue = bValue ? "Y" : "N"; + } + else if (value instanceof Timestamp) + stringValue = value.toString(); + else if (c == String.class) + stringValue = (String)value; + else if (DisplayType.isLOB(dt)) + ; + else + ; // saveNewSpecial (value, i)); + // + if (stringValue != null) + hmOut.put(p_info.getColumnName(i), stringValue); + } + // Custom Columns + if (m_custom != null) + { + Iterator it = m_custom.keySet().iterator(); + while (it.hasNext()) + { + String column = (String)it.next(); +// int index = p_info.getColumnIndex(column); + String value = (String)m_custom.get(column); + if (value != null) + hmOut.put(column, value); + } + m_custom = null; + } + return hmOut; + } // get_HashMap + + /** + * Load Special data (images, ..). + * To be extended by sub-classes + * @param rs result set + * @param index zero based index + * @return value value + * @throws SQLException + */ + protected Object loadSpecial (ResultSet rs, int index) throws SQLException + { + log.finest("(NOP) - " + p_info.getColumnName(index)); + return null; + } // loadSpecial + + /** + * Load is complete + * @param success success + * To be extended by sub-classes + */ + protected void loadComplete (boolean success) + { + } // loadComplete + + + /** + * Load Defaults + */ + protected void loadDefaults() + { + setStandardDefaults(); + // + /** @todo defaults from Field */ + // MField.getDefault(p_info.getDefaultLogic(i)); + } // loadDefaults + + /** + * Set Default values. + * Client, Org, Created/Updated, *By, IsActive + */ + protected void setStandardDefaults() + { + int size = get_ColumnCount(); + for (int i = 0; i < size; i++) + { + if (p_info.isVirtualColumn(i)) + continue; + String colName = p_info.getColumnName(i); + // Set Standard Values + if (colName.endsWith("tedBy")) + m_newValues[i] = new Integer (Env.getContextAsInt(p_ctx, "#AD_User_ID")); + else if (colName.equals("Created") || colName.equals("Updated")) + m_newValues[i] = new Timestamp (System.currentTimeMillis()); + else if (colName.equals(p_info.getTableName() + "_ID")) // KeyColumn + m_newValues[i] = I_ZERO; + else if (colName.equals("IsActive")) + m_newValues[i] = new Boolean(true); + else if (colName.equals("AD_Client_ID")) + m_newValues[i] = new Integer(Env.getAD_Client_ID(p_ctx)); + else if (colName.equals("AD_Org_ID")) + m_newValues[i] = new Integer(Env.getAD_Org_ID(p_ctx)); + else if (colName.equals("Processed")) + m_newValues[i] = new Boolean(false); + else if (colName.equals("Processing")) + m_newValues[i] = new Boolean(false); + else if (colName.equals("Posted")) + m_newValues[i] = new Boolean(false); + } + } // setDefaults + + /** + * Set Key Info (IDs and KeyColumns). + */ + private void setKeyInfo() + { + // Search for Primary Key + for (int i = 0; i < p_info.getColumnCount(); i++) + { + if (p_info.isKey(i)) + { + String ColumnName = p_info.getColumnName(i); + m_KeyColumns = new String[] {ColumnName}; + if (p_info.getColumnName(i).endsWith("_ID")) + { + Integer ii = (Integer)get_Value(i); + if (ii == null) + m_IDs = new Object[] {I_ZERO}; + else + m_IDs = new Object[] {ii}; + log.finest("(PK) " + ColumnName + "=" + ii); + } + else + { + Object oo = get_Value(i); + if (oo == null) + m_IDs = new Object[] {null}; + else + m_IDs = new Object[] {oo}; + log.finest("(PK) " + ColumnName + "=" + oo); + } + return; + } + } // primary key search + + // Search for Parents + ArrayList columnNames = new ArrayList(); + for (int i = 0; i < p_info.getColumnCount(); i++) + { + if (p_info.isColumnParent(i)) + columnNames.add(p_info.getColumnName(i)); + } + // Set FKs + int size = columnNames.size(); + if (size == 0) + throw new IllegalStateException("No PK nor FK - " + p_info.getTableName()); + m_IDs = new Object[size]; + m_KeyColumns = new String[size]; + for (int i = 0; i < size; i++) + { + m_KeyColumns[i] = (String)columnNames.get(i); + if (m_KeyColumns[i].endsWith("_ID")) + { + Integer ii = null; + try + { + ii = (Integer)get_Value(m_KeyColumns[i]); + } + catch (Exception e) + { + log.log(Level.SEVERE, "", e); + } + if (ii != null) + m_IDs[i] = ii; + } + else + m_IDs[i] = get_Value(m_KeyColumns[i]); + log.finest("(FK) " + m_KeyColumns[i] + "=" + m_IDs[i]); + } + } // setKeyInfo + + + /************************************************************************** + * Are all mandatory Fields filled (i.e. can we save)?. + * Stops at first null mandatory field + * @return true if all mandatory fields are ok + */ + protected boolean isMandatoryOK() + { + int size = get_ColumnCount(); + for (int i = 0; i < size; i++) + { + if (p_info.isColumnMandatory(i)) + { + if (p_info.isVirtualColumn(i)) + continue; + if (get_Value(i) == null || get_Value(i).equals(Null.NULL)) + { + log.info(p_info.getColumnName(i)); + return false; + } + } + } + return true; + } // isMandatoryOK + + + /************************************************************************** + * Set AD_Client + * @param AD_Client_ID client + */ + final protected void setAD_Client_ID (int AD_Client_ID) + { + set_ValueNoCheck ("AD_Client_ID", new Integer(AD_Client_ID)); + } // setAD_Client_ID + + /** + * Get AD_Client + * @return AD_Client_ID + */ + public final int getAD_Client_ID() + { + Integer ii = (Integer)get_Value("AD_Client_ID"); + if (ii == null) + return 0; + return ii.intValue(); + } // getAD_Client_ID + + /** + * Set AD_Org + * @param AD_Org_ID org + */ + final public void setAD_Org_ID (int AD_Org_ID) + { + set_ValueNoCheck ("AD_Org_ID", new Integer(AD_Org_ID)); + } // setAD_Org_ID + + /** + * Get AD_Org + * @return AD_Org_ID + */ + public int getAD_Org_ID() + { + Integer ii = (Integer)get_Value("AD_Org_ID"); + if (ii == null) + return 0; + return ii.intValue(); + } // getAD_Org_ID + + /** + * Overwrite Client Org if different + * @param AD_Client_ID client + * @param AD_Org_ID org + */ + protected void setClientOrg (int AD_Client_ID, int AD_Org_ID) + { + if (AD_Client_ID != getAD_Client_ID()) + setAD_Client_ID(AD_Client_ID); + if (AD_Org_ID != getAD_Org_ID()) + setAD_Org_ID(AD_Org_ID); + } // setClientOrg + + /** + * Overwrite Client Org if different + * @param po persistent object + */ + protected void setClientOrg (PO po) + { + setClientOrg(po.getAD_Client_ID(), po.getAD_Org_ID()); + } // setClientOrg + + /** + * Set Active + * @param active active + */ + public final void setIsActive (boolean active) + { + set_Value("IsActive", new Boolean(active)); + } // setActive + + /** + * Is Active + * @return is active + */ + public final boolean isActive() + { + Boolean bb = (Boolean)get_Value("IsActive"); + if (bb != null) + return bb.booleanValue(); + return false; + } // isActive + + /** + * Get Created + * @return created + */ + final public Timestamp getCreated() + { + return (Timestamp)get_Value("Created"); + } // getCreated + + /** + * Get Updated + * @return updated + */ + final public Timestamp getUpdated() + { + return (Timestamp)get_Value("Updated"); + } // getUpdated + + /** + * Get CreatedBy + * @return AD_User_ID + */ + final public int getCreatedBy() + { + Integer ii = (Integer)get_Value("CreatedBy"); + if (ii == null) + return 0; + return ii.intValue(); + } // getCreateddBy + + /** + * Get UpdatedBy + * @return AD_User_ID + */ + final public int getUpdatedBy() + { + Integer ii = (Integer)get_Value("UpdatedBy"); + if (ii == null) + return 0; + return ii.intValue(); + } // getUpdatedBy + + /** + * Set UpdatedBy + * @param AD_User_ID user + */ + final protected void setUpdatedBy (int AD_User_ID) + { + set_ValueNoCheck ("UpdatedBy", new Integer(AD_User_ID)); + } // setAD_User_ID + + /** + * Get Translation of column + * @param columnName + * @param AD_Language + * @return translation or null if not found + */ + protected String get_Translation (String columnName, String AD_Language) + { + if (columnName == null || AD_Language == null + || m_IDs.length > 1 || m_IDs[0].equals(I_ZERO) + || !(m_IDs[0] instanceof Integer)) + { + log.severe ("Invalid Argument: ColumnName" + columnName + + ", AD_Language=" + AD_Language + + ", ID.length=" + m_IDs.length + ", ID=" + m_IDs[0]); + return null; + } + int ID = ((Integer)m_IDs[0]).intValue(); + String retValue = null; + StringBuffer sql = new StringBuffer ("SELECT ").append(columnName) + .append(" FROM ").append(p_info.getTableName()).append("_Trl WHERE ") + .append(m_KeyColumns[0]).append("=?") + .append(" AND AD_Language=?"); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql.toString(), get_TrxName()); + pstmt.setInt (1, ID); + pstmt.setString (2, AD_Language); + rs = pstmt.executeQuery (); + if (rs.next ()) + retValue = rs.getString(1); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql.toString(), e); + } + finally { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + return retValue; + } // get_Translation + + /** + * Is new record + * @return true if new + */ + public boolean is_new() + { + if (m_createNew) + return true; + // + for (int i = 0; i < m_IDs.length; i++) + { + if (m_IDs[i].equals(I_ZERO)) + continue; + return false; // one value is non-zero + } + return true; + } // is_new + + /* + * Classes which override save() method: + * org.compiere.process.DocActionTemplate + * org.compiere.model.MClient + * org.compiere.model.MClientInfo + * org.compiere.model.MSystem + */ + /************************************************************************** + * Update Value or create new record. + * To reload call load() - not updated + * @return true if saved + */ + public boolean save() + { + CLogger.resetLast(); + boolean newRecord = is_new(); // save locally as load resets + if (!newRecord && !is_Changed()) + { + log.fine("Nothing changed - " + p_info.getTableName()); + return true; + } + + // Organization Check + if (getAD_Org_ID() == 0 + && (get_AccessLevel() == ACCESSLEVEL_ORG + || (get_AccessLevel() == ACCESSLEVEL_CLIENTORG + && MClientShare.isOrgLevelOnly(getAD_Client_ID(), get_Table_ID())))) + { + log.saveError("FillMandatory", Msg.getElement(getCtx(), "AD_Org_ID")); + return false; + } + // Should be Org 0 + if (getAD_Org_ID() != 0) + { + boolean reset = get_AccessLevel() == ACCESSLEVEL_SYSTEM; + if (!reset && MClientShare.isClientLevelOnly(getAD_Client_ID(), get_Table_ID())) + { + reset = get_AccessLevel() == ACCESSLEVEL_CLIENT + || get_AccessLevel() == ACCESSLEVEL_SYSTEMCLIENT + || get_AccessLevel() == ACCESSLEVEL_CLIENTORG; + } + if (reset) + { + log.warning("Set Org to 0"); + setAD_Org_ID(0); + } + } + + Trx localTrx = null; + if (m_trxName == null) { + m_trxName = Trx.createTrxName("POSave"); + localTrx = Trx.get(m_trxName, true); + } + + // Before Save + try + { + if (!beforeSave(newRecord)) + { + log.warning("beforeSave failed - " + toString()); + if (localTrx != null) { + localTrx.rollback(); + localTrx.close(); + m_trxName = null; + } + return false; + } + } + catch (Exception e) + { + log.log(Level.WARNING, "beforeSave - " + toString(), e); + log.saveError("Error", e.toString(), false); + if (localTrx != null) { + localTrx.rollback(); + localTrx.close(); + m_trxName = null; + } + return false; + } + + try { + // Call ModelValidators TYPE_NEW/TYPE_CHANGE + String errorMsg = ModelValidationEngine.get().fireModelChange + (this, newRecord ? ModelValidator.TYPE_NEW : ModelValidator.TYPE_CHANGE); + if (errorMsg != null) + { + log.warning("Validation failed - " + errorMsg); + log.saveError("Error", errorMsg); + if (localTrx != null) { + localTrx.rollback(); + m_trxName = null; + } + return false; + } + // Save + if (newRecord) + { + boolean b = saveNew(); + if (b) + { + if (localTrx != null) + return localTrx.commit(); + else + return b; + } + else + { + if (localTrx != null) + localTrx.rollback(); + return b; + } + } + else + { + boolean b = saveUpdate(); + if (b) + { + if (localTrx != null) + return localTrx.commit(); + else + return b; + } + else + { + if (localTrx != null) + localTrx.rollback(); + return b; + } + } + } finally { + if (localTrx != null) + { + localTrx.close(); + m_trxName = null; + } + } + } // save + + /** + * Finish Save Process + * @param newRecord new + * @param success success + * @return true if saved + */ + private boolean saveFinish (boolean newRecord, boolean success) + { + // Translations + if (success) + { + if (newRecord) + insertTranslations(); + else + updateTranslations(); + } + // + try + { + success = afterSave (newRecord, success); + } + catch (Exception e) + { + log.log(Level.WARNING, "afterSave", e); + log.saveError("Error", e.toString(), false); + success = false; + // throw new DBException(e); + } + // Call ModelValidators TYPE_AFTER_NEW/TYPE_AFTER_CHANGE - teo_sarca [ 1675490 ] + if (success) { + String errorMsg = ModelValidationEngine.get().fireModelChange + (this, newRecord ? + (isReplication() ? ModelValidator.TYPE_AFTER_NEW_REPLICATION : ModelValidator.TYPE_AFTER_NEW) + : + (isReplication() ? ModelValidator.TYPE_AFTER_CHANGE_REPLICATION : ModelValidator.TYPE_AFTER_CHANGE) + ); + setReplication(false); + if (errorMsg != null) { + log.saveError("Error", errorMsg); + success = false; + } + } + // OK + if (success) + { + if (s_docWFMgr == null) + { + try + { + Class.forName("org.compiere.wf.DocWorkflowManager"); + } + catch (Exception e) + { + } + } + if (s_docWFMgr != null) + s_docWFMgr.process (this, p_info.getAD_Table_ID()); + + // Copy to Old values + int size = p_info.getColumnCount(); + for (int i = 0; i < size; i++) + { + if (m_newValues[i] != null) + { + if (m_newValues[i] == Null.NULL) + m_oldValues[i] = null; + else + m_oldValues[i] = m_newValues[i]; + } + } + m_newValues = new Object[size]; + } + m_createNew = false; + if (!newRecord) + CacheMgt.get().reset(p_info.getTableName()); + return success; + } // saveFinish + + /** + * Update Value or create new record. + * To reload call load() - not updated + * @param trxName transaction + * @return true if saved + */ + public boolean save (String trxName) + { + set_TrxName(trxName); + return save(); + } // save + + public boolean saveReplica (boolean isFromReplication) + { + setReplication(isFromReplication); + return save(); + } + + /** + * Is there a Change to be saved? + * @return true if record changed + */ + public boolean is_Changed() + { + int size = get_ColumnCount(); + for (int i = 0; i < size; i++) + { + // Test if the column has changed - teo_sarca [ 1704828 ] + if (is_ValueChanged(i)) + return true; + } + if (m_custom != null && m_custom.size() > 0) + return true; // there are custom columns modified + return false; + } // is_Change + + /** + * Called before Save for Pre-Save Operation + * @param newRecord new record + * @return true if record can be saved + */ + protected boolean beforeSave(boolean newRecord) + { + /** Prevents saving + log.saveError("Error", Msg.parseTranslation(getCtx(), "@C_Currency_ID@ = @C_Currency_ID@")); + log.saveError("FillMandatory", Msg.getElement(getCtx(), "PriceEntered")); + /** Issues message + log.saveWarning(AD_Message, message); + log.saveInfo (AD_Message, message); + **/ + return true; + } // beforeSave + + /** + * Called after Save for Post-Save Operation + * @param newRecord new record + * @param success true if save operation was success + * @return if save was a success + */ + protected boolean afterSave (boolean newRecord, boolean success) + { + return success; + } // afterSave + + /** + * Update Record directly + * @return true if updated + */ + protected boolean saveUpdate() + { + String where = get_WhereClause(true); + // + boolean changes = false; + StringBuffer sql = new StringBuffer ("UPDATE "); + sql.append(p_info.getTableName()).append( " SET "); + boolean updated = false; + boolean updatedBy = false; + lobReset(); + + // Change Log + MSession session = MSession.get (p_ctx, false); + if (session == null) + log.fine("No Session found"); + int AD_ChangeLog_ID = 0; + + int size = get_ColumnCount(); + for (int i = 0; i < size; i++) + { + Object value = m_newValues[i]; + if (value == null + || p_info.isVirtualColumn(i)) + continue; + // we have a change + Class c = p_info.getColumnClass(i); + int dt = p_info.getColumnDisplayType(i); + String columnName = p_info.getColumnName(i); + // + // updated/by + if (columnName.equals("UpdatedBy")) + { + if (updatedBy) // explicit + continue; + updatedBy = true; + } + else if (columnName.equals("Updated")) + { + if (updated) + continue; + updated = true; + } + if (DisplayType.isLOB(dt)) + { + lobAdd (value, i, dt); + // If no changes set UpdatedBy explicitly to ensure commit of lob + if (!changes && !updatedBy) + { + int AD_User_ID = Env.getContextAsInt(p_ctx, "#AD_User_ID"); + set_ValueNoCheck("UpdatedBy", new Integer(AD_User_ID)); + sql.append("UpdatedBy=").append(AD_User_ID); + changes = true; + updatedBy = true; + } + continue; + } + // Update Document No + if (columnName.equals("DocumentNo")) + { + String strValue = (String)value; + if (strValue.startsWith("<") && strValue.endsWith(">")) + { + value = null; + int AD_Client_ID = getAD_Client_ID(); + int index = p_info.getColumnIndex("C_DocTypeTarget_ID"); + if (index == -1) + index = p_info.getColumnIndex("C_DocType_ID"); + if (index != -1) // get based on Doc Type (might return null) + value = DB.getDocumentNo(get_ValueAsInt(index), m_trxName, false, this); + if (value == null) // not overwritten by DocType and not manually entered + value = DB.getDocumentNo(AD_Client_ID, p_info.getTableName(), m_trxName, this); + } + else + log.warning("DocumentNo updated: " + m_oldValues[i] + " -> " + value); + } + + if (changes) + sql.append(", "); + changes = true; + sql.append(columnName).append("="); + + // values + if (value == Null.NULL) + sql.append("NULL"); + else if (value instanceof Integer || value instanceof BigDecimal) + sql.append(encrypt(i,value)); + else if (c == Boolean.class) + { + boolean bValue = false; + if (value instanceof Boolean) + bValue = ((Boolean)value).booleanValue(); + else + bValue = "Y".equals(value); + sql.append(encrypt(i,bValue ? "'Y'" : "'N'")); + } + else if (value instanceof Timestamp) + sql.append(DB.TO_DATE((Timestamp)encrypt(i,value),p_info.getColumnDisplayType(i) == DisplayType.Date)); + else { + if (value.toString().length() == 0) { + // [ 1722057 ] Encrypted columns throw error if saved as null + // don't encrypt NULL + sql.append(DB.TO_STRING(value.toString())); + } else { + sql.append(encrypt(i,DB.TO_STRING(value.toString()))); + } + } + + // Change Log - Only + if (session != null + && m_IDs.length == 1 + && !p_info.isEncrypted(i) // not encrypted + && !p_info.isVirtualColumn(i) // no virtual column + && !"Password".equals(columnName) + ) + { + Object oldV = m_oldValues[i]; + Object newV = value; + if (oldV != null && oldV == Null.NULL) + oldV = null; + if (newV != null && newV == Null.NULL) + newV = null; + // change log on update + MChangeLog cLog = session.changeLog ( + m_trxName, AD_ChangeLog_ID, + p_info.getAD_Table_ID(), p_info.getColumn(i).AD_Column_ID, + get_ID(), getAD_Client_ID(), getAD_Org_ID(), oldV, newV, MChangeLog.EVENTCHANGELOG_Update); + if (cLog != null) + AD_ChangeLog_ID = cLog.getAD_ChangeLog_ID(); + } + } // for all fields + + // Custom Columns (cannot be logged as no column) + if (m_custom != null) + { + Iterator it = m_custom.keySet().iterator(); + while (it.hasNext()) + { + if (changes) + sql.append(", "); + changes = true; + // + String column = (String)it.next(); + String value = (String)m_custom.get(column); + int index = p_info.getColumnIndex(column); + sql.append(column).append("=").append(encrypt(index,value)); + } + m_custom = null; + } + + // Something changed + if (changes) + { + if (m_trxName == null) + log.fine(p_info.getTableName() + "." + where); + else + log.fine("[" + m_trxName + "] - " + p_info.getTableName() + "." + where); + if (!updated) // Updated not explicitly set + { + Timestamp now = new Timestamp(System.currentTimeMillis()); + set_ValueNoCheck("Updated", now); + sql.append(",Updated=").append(DB.TO_DATE(now, false)); + } + if (!updatedBy) // UpdatedBy not explicitly set + { + int AD_User_ID = Env.getContextAsInt(p_ctx, "#AD_User_ID"); + set_ValueNoCheck("UpdatedBy", new Integer(AD_User_ID)); + sql.append(",UpdatedBy=").append(AD_User_ID); + } + sql.append(" WHERE ").append(where); + /** @todo status locking goes here */ + + log.finest(sql.toString()); + int no = DB.executeUpdate(sql.toString(), m_trxName); + boolean ok = no == 1; + if (ok) + ok = lobSave(); + else + { + if (m_trxName == null) + log.log(Level.WARNING, "#" + no + + " - " + p_info.getTableName() + "." + where); + else + log.log(Level.WARNING, "#" + no + + " - [" + m_trxName + "] - " + p_info.getTableName() + "." + where); + } + return saveFinish (false, ok); + } + + // nothing changed, so OK + return saveFinish (false, true); + } // saveUpdate + + /** + * Create New Record + * @return true if new record inserted + */ + private boolean saveNew() + { + // Set ID for single key - Multi-Key values need explicitly be set previously + if (m_IDs.length == 1 && p_info.hasKeyColumn() + && m_KeyColumns[0].endsWith("_ID")) // AD_Language, EntityType + { + int no = saveNew_getID(); + if (no <= 0) + no = DB.getNextID(getAD_Client_ID(), p_info.getTableName(), m_trxName); + if (no <= 0) + { + log.severe("No NextID (" + no + ")"); + return saveFinish (true, false); + } + m_IDs[0] = new Integer(no); + set_ValueNoCheck(m_KeyColumns[0], m_IDs[0]); + } + if (m_trxName == null) + log.fine(p_info.getTableName() + " - " + get_WhereClause(true)); + else + log.fine("[" + m_trxName + "] - " + p_info.getTableName() + " - " + get_WhereClause(true)); + + // Set new DocumentNo + String columnName = "DocumentNo"; + int index = p_info.getColumnIndex(columnName); + if (index != -1) + { + String value = (String)get_Value(index); + if (value != null && value.startsWith("<") && value.endsWith(">")) + value = null; + if (value == null || value.length() == 0) + { + int dt = p_info.getColumnIndex("C_DocTypeTarget_ID"); + if (dt == -1) + dt = p_info.getColumnIndex("C_DocType_ID"); + if (dt != -1) // get based on Doc Type (might return null) + value = DB.getDocumentNo(get_ValueAsInt(dt), m_trxName, false, this); + if (value == null) // not overwritten by DocType and not manually entered + value = DB.getDocumentNo(getAD_Client_ID(), p_info.getTableName(), m_trxName, this); + set_ValueNoCheck(columnName, value); + } + } + // Set empty Value + columnName = "Value"; + index = p_info.getColumnIndex(columnName); + if (index != -1) + { + String value = (String)get_Value(index); + if (value == null || value.length() == 0) + { + value = DB.getDocumentNo (getAD_Client_ID(), p_info.getTableName(), m_trxName, this); + set_ValueNoCheck(columnName, value); + } + } + + lobReset(); + + // Change Log + MSession session = MSession.get (p_ctx, false); + if (session == null) + log.fine("No Session found"); + int AD_ChangeLog_ID = 0; + + // SQL + StringBuffer sqlInsert = new StringBuffer("INSERT INTO "); + sqlInsert.append(p_info.getTableName()).append(" ("); + StringBuffer sqlValues = new StringBuffer(") VALUES ("); + int size = get_ColumnCount(); + boolean doComma = false; + for (int i = 0; i < size; i++) + { + Object value = get_Value(i); + // Don't insert NULL values (allows Database defaults) + if (value == null + || p_info.isVirtualColumn(i)) + continue; + + // Display Type + int dt = p_info.getColumnDisplayType(i); + if (DisplayType.isLOB(dt)) + { + lobAdd (value, i, dt); + continue; + } + + // ** add column ** + if (doComma) + { + sqlInsert.append(","); + sqlValues.append(","); + } + else + doComma = true; + sqlInsert.append(p_info.getColumnName(i)); + // + // Based on class of definition, not class of value + Class c = p_info.getColumnClass(i); + try + { + if (c == Object.class) // may have need to deal with null values differently + sqlValues.append (saveNewSpecial (value, i)); + else if (value == null || value.equals (Null.NULL)) + sqlValues.append ("NULL"); + else if (value instanceof Integer || value instanceof BigDecimal) + sqlValues.append (encrypt(i,value)); + else if (c == Boolean.class) + { + boolean bValue = false; + if (value instanceof Boolean) + bValue = ((Boolean)value).booleanValue(); + else + bValue = "Y".equals(value); + sqlValues.append (encrypt(i,bValue ? "'Y'" : "'N'")); + } + else if (value instanceof Timestamp) + sqlValues.append (DB.TO_DATE ((Timestamp)encrypt(i,value), p_info.getColumnDisplayType (i) == DisplayType.Date)); + else if (c == String.class) + sqlValues.append (encrypt(i,DB.TO_STRING ((String)value))); + else if (DisplayType.isLOB(dt)) + sqlValues.append("null"); // no db dependent stuff here + else + sqlValues.append (saveNewSpecial (value, i)); + } + catch (Exception e) + { + String msg = ""; + if (m_trxName != null) + msg = "[" + m_trxName + "] - "; + msg += p_info.toString(i) + + " - Value=" + value + + "(" + (value==null ? "null" : value.getClass().getName()) + ")"; + log.log(Level.SEVERE, msg, e); + throw new DBException(e); // fini + } + + // Change Log - Only + String insertLog = MSysConfig.getValue("SYSTEM_INSERT_CHANGELOG", "Y", getAD_Client_ID()); + if ( session != null + && m_IDs.length == 1 + && !p_info.isEncrypted(i) // not encrypted + && !p_info.isVirtualColumn(i) // no virtual column + && !"Password".equals(columnName) + && (insertLog.equalsIgnoreCase("Y") + || (insertLog.equalsIgnoreCase("K") && p_info.getColumn(i).IsKey)) + ) + { + // change log on new + MChangeLog cLog = session.changeLog ( + m_trxName, AD_ChangeLog_ID, + p_info.getAD_Table_ID(), p_info.getColumn(i).AD_Column_ID, + get_ID(), getAD_Client_ID(), getAD_Org_ID(), null, value, MChangeLog.EVENTCHANGELOG_Insert); + if (cLog != null) + AD_ChangeLog_ID = cLog.getAD_ChangeLog_ID(); + } + + } + // Custom Columns + if (m_custom != null) + { + Iterator it = m_custom.keySet().iterator(); + while (it.hasNext()) + { + String column = (String)it.next(); + index = p_info.getColumnIndex(column); + String value = (String)m_custom.get(column); + if (doComma) + { + sqlInsert.append(","); + sqlValues.append(","); + } + else + doComma = true; + sqlInsert.append(column); + //jz for ad_issue, some value may include ' in a string??? + sqlValues.append(encrypt(index, value)); + } + m_custom = null; + } + sqlInsert.append(sqlValues) + .append(")"); + // + int no = DB.executeUpdate(sqlInsert.toString(), m_trxName); + boolean ok = no == 1; + if (ok) + { + ok = lobSave(); + if (!load(m_trxName)) // re-read Info + { + if (m_trxName == null) + log.log(Level.SEVERE, "reloading"); + else + log.log(Level.SEVERE, "[" + m_trxName + "] - reloading"); + ok = false;; + } + } + else + { + String msg = "Not inserted - "; + if (CLogMgt.isLevelFiner()) + msg += sqlInsert.toString(); + else + msg += get_TableName(); + if (m_trxName == null) + log.log(Level.WARNING, msg); + else + log.log(Level.WARNING, "[" + m_trxName + "]" + msg); + } + return saveFinish (true, ok); + } // saveNew + + /** + * Get ID for new record during save. + * You can overwite this to explicitly set the ID + * @return ID to be used or 0 for fedault logic + */ + protected int saveNew_getID() + { + return 0; + } // saveNew_getID + + + /** + * Create Single/Multi Key Where Clause + * @param withValues if true uses actual values otherwise ? + * @return where clause + */ + public String get_WhereClause (boolean withValues) + { + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < m_IDs.length; i++) + { + if (i != 0) + sb.append(" AND "); + sb.append(m_KeyColumns[i]).append("="); + if (withValues) + { + if (m_KeyColumns[i].endsWith("_ID")) + sb.append(m_IDs[i]); + else + sb.append("'").append(m_IDs[i]).append("'"); + } + else + sb.append("?"); + } + return sb.toString(); + } // getWhereClause + + + /** + * Save Special Data. + * To be extended by sub-classes + * @param value value + * @param index index + * @return SQL code for INSERT VALUES clause + */ + protected String saveNewSpecial (Object value, int index) + { + String colName = p_info.getColumnName(index); + String colClass = p_info.getColumnClass(index).toString(); + String colValue = value == null ? "null" : value.getClass().toString(); +// int dt = p_info.getColumnDisplayType(index); + + log.log(Level.SEVERE, "Unknown class for column " + colName + + " (" + colClass + ") - Value=" + colValue); + + if (value == null) + return "NULL"; + return value.toString(); + } // saveNewSpecial + + /** + * Encrypt data. + * Not: LOB, special values/Obkects + * @param index index + * @param xx data + * @return xx + */ + private Object encrypt (int index, Object xx) + { + if (xx == null) + return null; + if (index != -1 && p_info.isEncrypted(index)) + return SecureEngine.encrypt(xx); + return xx; + } // encrypt + + /** + * Decrypt data + * @param index index + * @param yy data + * @return yy + */ + private Object decrypt (int index, Object yy) + { + if (yy == null) + return null; + if (index != -1 && p_info.isEncrypted(index)) + return SecureEngine.decrypt(yy); + return yy; + } // decrypt + + /************************************************************************** + * Delete Current Record + * @param force delete also processed records + * @return true if deleted + */ + public boolean delete (boolean force) + { + CLogger.resetLast(); + if (is_new()) + return true; + + int AD_Table_ID = p_info.getAD_Table_ID(); + int Record_ID = get_ID(); + + if (!force) + { + int iProcessed = get_ColumnIndex("Processed"); + if (iProcessed != -1) + { + Boolean processed = (Boolean)get_Value(iProcessed); + if (processed != null && processed.booleanValue()) + { + log.warning("Record processed"); // CannotDeleteTrx + log.saveError("Processed", "Processed", false); + return false; + } + } // processed + } // force + + Trx localTrx = null; + boolean success = false; + try + { + + String localTrxName = m_trxName; + if (localTrxName == null) + { + localTrxName = Trx.createTrxName("POdel"); + localTrx = Trx.get(localTrxName, true); + m_trxName = localTrxName; + } + + try + { + if (!beforeDelete()) + { + log.warning("beforeDelete failed"); + return false; + } + } + catch (Exception e) + { + log.log(Level.WARNING, "beforeDelete", e); + log.saveError("Error", e.toString(), false); + // throw new DBException(e); + return false; + } + // Delete Restrict AD_Table_ID/Record_ID (Requests, ..) + String errorMsg = PO_Record.exists(AD_Table_ID, Record_ID, m_trxName); + if (errorMsg != null) + { + log.saveError("CannotDelete", errorMsg); + return false; + } + // Call ModelValidators TYPE_DELETE + errorMsg = ModelValidationEngine.get().fireModelChange + (this, isReplication() ? ModelValidator.TYPE_BEFORE_DELETE_REPLICATION : ModelValidator.TYPE_DELETE); + setReplication(false); // @Trifon + if (errorMsg != null) + { + log.saveError("Error", errorMsg); + return false; + } + + // + deleteTranslations(localTrxName); + // Delete Cascade AD_Table_ID/Record_ID (Attachments, ..) + PO_Record.deleteCascade(AD_Table_ID, Record_ID, localTrxName); + + // The Delete Statement + StringBuffer sql = new StringBuffer ("DELETE FROM ") //jz why no FROM?? + .append(p_info.getTableName()) + .append(" WHERE ") + .append(get_WhereClause(true)); + int no = DB.executeUpdate(sql.toString(), localTrxName); + success = no == 1; + + // Save ID + m_idOld = get_ID(); + // + if (!success) + { + log.warning("Not deleted"); + if (localTrx != null) + localTrx.rollback(); + } + else + { + if (success) + { + // Change Log + MSession session = MSession.get (p_ctx, false); + if (session == null) + log.fine("No Session found"); + else if (m_IDs.length == 1) + { + int AD_ChangeLog_ID = 0; + int size = get_ColumnCount(); + for (int i = 0; i < size; i++) + { + Object value = m_oldValues[i]; + if (value != null + && !p_info.isEncrypted(i) // not encrypted + && !p_info.isVirtualColumn(i) // no virtual column + && !"Password".equals(p_info.getColumnName(i)) + ) + { + // change log on delete + MChangeLog cLog = session.changeLog ( + m_trxName != null ? m_trxName : localTrxName, AD_ChangeLog_ID, + AD_Table_ID, p_info.getColumn(i).AD_Column_ID, + Record_ID, getAD_Client_ID(), getAD_Org_ID(), value, null, MChangeLog.EVENTCHANGELOG_Delete); + if (cLog != null) + AD_ChangeLog_ID = cLog.getAD_ChangeLog_ID(); + } + } // for all fields + } + + // Housekeeping + m_IDs[0] = I_ZERO; + if (m_trxName == null) + log.fine("complete"); + else + log.fine("[" + m_trxName + "] - complete"); + m_attachment = null; + } + else + { + log.warning("Not deleted"); + } + } + + try + { + success = afterDelete (success); + } + catch (Exception e) + { + log.log(Level.WARNING, "afterDelete", e); + log.saveError("Error", e.toString(), false); + success = false; + // throw new DBException(e); + } + + // Call ModelValidators TYPE_AFTER_DELETE - teo_sarca [ 1675490 ] + if (success) { + errorMsg = ModelValidationEngine.get().fireModelChange(this, ModelValidator.TYPE_AFTER_DELETE); + if (errorMsg != null) { + log.saveError("Error", errorMsg); + success = false; + } + } + + if (!success) + { + if (localTrx != null) + localTrx.rollback(); + } + else + { + if (localTrx != null) + { + try { + localTrx.commit(true); + } catch (SQLException e) { + log.saveError("Error", e); + success = false; + } + } + } + + // Reset + if (success) + { + m_idOld = 0; + int size = p_info.getColumnCount(); + m_oldValues = new Object[size]; + m_newValues = new Object[size]; + CacheMgt.get().reset(p_info.getTableName()); + } + } + finally + { + if (localTrx != null) + { + localTrx.close(); + m_trxName = null; + } + } + // log.info("" + success); + return success; + } // delete + + /** + * Delete Current Record + * @param force delete also processed records + * @param trxName transaction + * @return true if deleted + */ + public boolean delete (boolean force, String trxName) + { + set_TrxName(trxName); + return delete (force); + } // delete + + /** + * Executed before Delete operation. + * @return true if record can be deleted + */ + protected boolean beforeDelete () + { + // log.saveError("Error", Msg.getMsg(getCtx(), "CannotDelete")); + return true; + } // beforeDelete + + /** + * Executed after Delete operation. + * @param success true if record deleted + * @return true if delete is a success + */ + protected boolean afterDelete (boolean success) + { + return success; + } // afterDelete + + + /** + * Insert (missing) Translation Records + * @return false if error (true if no translation or success) + */ + private boolean insertTranslations() + { + // Not a translation table + if (m_IDs.length > 1 + || m_IDs[0].equals(I_ZERO) + || !p_info.isTranslated() + || !(m_IDs[0] instanceof Integer)) + return true; + // + StringBuffer iColumns = new StringBuffer(); + StringBuffer sColumns = new StringBuffer(); + for (int i = 0; i < p_info.getColumnCount(); i++) + { + if (p_info.isColumnTranslated(i)) + { + iColumns.append(p_info.getColumnName(i)) + .append(","); + sColumns.append("t.") + .append(p_info.getColumnName(i)) + .append(","); + } + } + if (iColumns.length() == 0) + return true; + + String tableName = p_info.getTableName(); + String keyColumn = m_KeyColumns[0]; + StringBuffer sql = new StringBuffer ("INSERT INTO ") + .append(tableName).append("_Trl (AD_Language,") + .append(keyColumn).append(", ") + .append(iColumns) + .append(" IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) ") + .append("SELECT l.AD_Language,t.") + .append(keyColumn).append(", ") + .append(sColumns) + .append(" 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy ") + .append("FROM AD_Language l, ").append(tableName).append(" t ") + .append("WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.") + .append(keyColumn).append("=").append(get_ID()) + /*jz since derby bug, rewrite the sql + .append(" AND NOT EXISTS (SELECT * FROM ").append(tableName) + .append("_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.") + .append(keyColumn).append("=t.").append(keyColumn).append(")"); + */ + .append(" AND EXISTS (SELECT * FROM ").append(tableName) + .append("_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.") + .append(keyColumn).append("!=t.").append(keyColumn).append(")"); + int no = DB.executeUpdate(sql.toString(), m_trxName); + log.fine("#" + no); + return no > 0; + } // insertTranslations + + /** + * Update Translations. + * @return false if error (true if no translation or success) + */ + private boolean updateTranslations() + { + // Not a translation table + if (m_IDs.length > 1 + || m_IDs[0].equals(I_ZERO) + || !p_info.isTranslated() + || !(m_IDs[0] instanceof Integer)) + return true; + // + boolean trlColumnChanged = false; + for (int i = 0; i < p_info.getColumnCount(); i++) + { + if (p_info.isColumnTranslated(i) + && is_ValueChanged(p_info.getColumnName(i))) + { + trlColumnChanged = true; + break; + } + } + if (!trlColumnChanged) + return true; + // + MClient client = MClient.get(getCtx()); + // + String tableName = p_info.getTableName(); + String keyColumn = m_KeyColumns[0]; + StringBuffer sql = new StringBuffer ("UPDATE ") + .append(tableName).append("_Trl SET "); + // + if (client.isAutoUpdateTrl(tableName)) + { + for (int i = 0; i < p_info.getColumnCount(); i++) + { + if (p_info.isColumnTranslated(i)) + { + String columnName = p_info.getColumnName(i); + sql.append(columnName).append("="); + Object value = get_Value(columnName); + if (value == null) + sql.append("NULL"); + else if (value instanceof String) + sql.append(DB.TO_STRING((String)value)); + else if (value instanceof Boolean) + sql.append(((Boolean)value).booleanValue() ? "'Y'" : "'N'"); + else if (value instanceof Timestamp) + sql.append(DB.TO_DATE((Timestamp)value)); + else + sql.append(value.toString()); + sql.append(","); + } + } + sql.append("IsTranslated='Y'"); + } + else + sql.append("IsTranslated='N'"); + // + sql.append(" WHERE ") + .append(keyColumn).append("=").append(get_ID()); + int no = DB.executeUpdate(sql.toString(), m_trxName); + log.fine("#" + no); + return no >= 0; + } // updateTranslations + + /** + * Delete Translation Records + * @param trxName transaction + * @return false if error (true if no translation or success) + */ + private boolean deleteTranslations(String trxName) + { + // Not a translation table + if (m_IDs.length > 1 + || m_IDs[0].equals(I_ZERO) + || !p_info.isTranslated() + || !(m_IDs[0] instanceof Integer)) + return true; + // + String tableName = p_info.getTableName(); + String keyColumn = m_KeyColumns[0]; + StringBuffer sql = new StringBuffer ("DELETE FROM ") + .append(tableName).append("_Trl WHERE ") + .append(keyColumn).append("=").append(get_ID()); + int no = DB.executeUpdate(sql.toString(), trxName); + log.fine("#" + no); + return no >= 0; + } // deleteTranslations + + /** + * Insert Accounting Records + * @param acctTable accounting sub table + * @param acctBaseTable acct table to get data from + * @param whereClause optional where clause with alisa "p" for acctBaseTable + * @return true if records inserted + */ + protected boolean insert_Accounting (String acctTable, + String acctBaseTable, String whereClause) + { + if (s_acctColumns == null // cannot cache C_BP_*_Acct as there are 3 + || acctTable.startsWith("C_BP_")) + { + s_acctColumns = new ArrayList(); + String sql = "SELECT c.ColumnName " + + "FROM AD_Column c INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID) " + + "WHERE t.TableName=? AND c.IsActive='Y' AND c.AD_Reference_ID=25 ORDER BY 1"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setString (1, acctTable); + rs = pstmt.executeQuery (); + while (rs.next ()) + s_acctColumns.add (rs.getString(1)); + } + catch (Exception e) + { + log.log(Level.SEVERE, acctTable, e); + } + finally { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + if (s_acctColumns.size() == 0) + { + log.severe ("No Columns for " + acctTable); + return false; + } + } + + // Create SQL Statement - INSERT + StringBuffer sb = new StringBuffer("INSERT INTO ") + .append(acctTable) + .append(" (").append(get_TableName()) + .append("_ID, C_AcctSchema_ID, AD_Client_ID,AD_Org_ID,IsActive, Created,CreatedBy,Updated,UpdatedBy "); + for (int i = 0; i < s_acctColumns.size(); i++) + sb.append(",").append(s_acctColumns.get(i)); + // .. SELECT + sb.append(") SELECT ").append(get_ID()) + .append(", p.C_AcctSchema_ID, p.AD_Client_ID,0,'Y', SysDate,") + .append(getUpdatedBy()).append(",SysDate,").append(getUpdatedBy()); + for (int i = 0; i < s_acctColumns.size(); i++) + sb.append(",p.").append(s_acctColumns.get(i)); + // .. FROM + sb.append(" FROM ").append(acctBaseTable) + .append(" p WHERE p.AD_Client_ID=").append(getAD_Client_ID()); + if (whereClause != null && whereClause.length() > 0) + sb.append (" AND ").append(whereClause); + sb.append(" AND NOT EXISTS (SELECT * FROM ").append(acctTable) + .append(" e WHERE e.C_AcctSchema_ID=p.C_AcctSchema_ID AND e.") + .append(get_TableName()).append("_ID=").append(get_ID()).append(")"); + // + int no = DB.executeUpdate(sb.toString(), get_TrxName()); + if (no > 0) + log.fine("#" + no); + else + log.warning("#" + no + + " - Table=" + acctTable + " from " + acctBaseTable); + return no > 0; + } // insert_Accounting + + /** + * Delete Accounting records. + * NOP - done by database constraints + * @param acctTable accounting sub table + * @return true + */ + protected boolean delete_Accounting(String acctTable) + { + return true; + } // delete_Accounting + + + /** + * Insert id data into Tree + * @param treeType MTree TREETYPE_* + * @return true if inserted + */ + protected boolean insert_Tree (String treeType) + { + return insert_Tree (treeType, 0); + } // insert_Tree + + /** + * Insert id data into Tree + * @param treeType MTree TREETYPE_* + * @param C_Element_ID element for accounting element values + * @return true if inserted + */ + protected boolean insert_Tree (String treeType, int C_Element_ID) + { + StringBuffer sb = new StringBuffer ("INSERT INTO ") + .append(MTree_Base.getNodeTableName(treeType)) + .append(" (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, " + + "AD_Tree_ID, Node_ID, Parent_ID, SeqNo) " + + "SELECT t.AD_Client_ID,0, 'Y', SysDate, 0, SysDate, 0," + + "t.AD_Tree_ID, ").append(get_ID()).append(", 0, 999 " + + "FROM AD_Tree t " + + "WHERE t.AD_Client_ID=").append(getAD_Client_ID()).append(" AND t.IsActive='Y'"); + // Account Element Value handling + if (C_Element_ID != 0) + sb.append(" AND EXISTS (SELECT * FROM C_Element ae WHERE ae.C_Element_ID=") + .append(C_Element_ID).append(" AND t.AD_Tree_ID=ae.AD_Tree_ID)"); + else // std trees + sb.append(" AND t.IsAllNodes='Y' AND t.TreeType='").append(treeType).append("'"); + // Duplicate Check + sb.append(" AND NOT EXISTS (SELECT * FROM " + MTree_Base.getNodeTableName(treeType) + " e " + + "WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=").append(get_ID()).append(")"); + int no = DB.executeUpdate(sb.toString(), get_TrxName()); + if (no > 0) + log.fine("#" + no + " - TreeType=" + treeType); + else + log.warning("#" + no + " - TreeType=" + treeType); + return no > 0; + } // insert_Tree + + /** + * Delete ID Tree Nodes + * @param treeType MTree TREETYPE_* + * @return true if deleted + */ + protected boolean delete_Tree (String treeType) + { + int id = get_ID(); + if (id == 0) + id = get_IDOld(); + StringBuffer sb = new StringBuffer ("DELETE FROM ") + .append(MTree_Base.getNodeTableName(treeType)) + .append(" n WHERE Node_ID=").append(id) + .append(" AND EXISTS (SELECT * FROM AD_Tree t " + + "WHERE t.AD_Tree_ID=n.AD_Tree_ID AND t.TreeType='") + .append(treeType).append("')"); + int no = DB.executeUpdate(sb.toString(), get_TrxName()); + if (no > 0) + log.fine("#" + no + " - TreeType=" + treeType); + else + log.warning("#" + no + " - TreeType=" + treeType); + return no > 0; + } // delete_Tree + + /************************************************************************** + * Lock it. + * @return true if locked + */ + public boolean lock() + { + int index = get_ProcessingIndex(); + if (index != -1) + { + m_newValues[index] = Boolean.TRUE; // direct + String sql = "UPDATE " + p_info.getTableName() + + " SET Processing='Y' WHERE (Processing='N' OR Processing IS NULL) AND " + + get_WhereClause(true); + boolean success = DB.executeUpdate(sql, null) == 1; // outside trx + if (success) + log.fine("success"); + else + log.log(Level.WARNING, "failed"); + return success; + } + return false; + } // lock + + /** + * Get the Column Processing index + * @return index or -1 + */ + private int get_ProcessingIndex() + { + return p_info.getColumnIndex("Processing"); + } // getProcessingIndex + + /** + * UnLock it + * @param trxName transaction + * @return true if unlocked (false only if unlock fails) + */ + public boolean unlock (String trxName) + { + // log.warning(trxName); + int index = get_ProcessingIndex(); + if (index != -1) + { + m_newValues[index] = Boolean.FALSE; // direct + String sql = "UPDATE " + p_info.getTableName() + + " SET Processing='N' WHERE " + get_WhereClause(true); + boolean success = DB.executeUpdate(sql, trxName) == 1; + if (success) + log.fine("success" + (trxName == null ? "" : "[" + trxName + "]")); + else + log.log(Level.WARNING, "failed" + (trxName == null ? "" : " [" + trxName + "]")); + return success; + } + return true; + } // unlock + + /** Optional Transaction */ + private String m_trxName = null; + + /** + * Set Trx + * @param trxName transaction + */ + public void set_TrxName (String trxName) + { + m_trxName = trxName; + } // setTrx + + /** + * Get Trx + * @return transaction + */ + public String get_TrxName() + { + return m_trxName; + } // getTrx + + + /************************************************************************** + * Get Attachments. + * An attachment may have multiple entries + * @return Attachment or null + */ + public MAttachment getAttachment () + { + return getAttachment(false); + } // getAttachment + + /** + * Get Attachments + * @param requery requery + * @return Attachment or null + */ + public MAttachment getAttachment (boolean requery) + { + if (m_attachment == null || requery) + m_attachment = MAttachment.get (getCtx(), p_info.getAD_Table_ID(), get_ID()); + return m_attachment; + } // getAttachment + + /** + * Create/return Attachment for PO. + * If not exist, create new + * @return attachment + */ + public MAttachment createAttachment() + { + getAttachment (false); + if (m_attachment == null) + m_attachment = new MAttachment (getCtx(), p_info.getAD_Table_ID(), get_ID(), null); + return m_attachment; + } // createAttachment + + + /** + * Do we have a Attachment of type + * @param extension extension e.g. .pdf + * @return true if there is a attachment of type + */ + public boolean isAttachment (String extension) + { + getAttachment (false); + if (m_attachment == null) + return false; + for (int i = 0; i < m_attachment.getEntryCount(); i++) + { + if (m_attachment.getEntryName(i).endsWith(extension)) + { + log.fine("#" + i + ": " + m_attachment.getEntryName(i)); + return true; + } + } + return false; + } // isAttachment + + /** + * Get Attachment Data of type + * @param extension extension e.g. .pdf + * @return data or null + */ + public byte[] getAttachmentData (String extension) + { + getAttachment(false); + if (m_attachment == null) + return null; + for (int i = 0; i < m_attachment.getEntryCount(); i++) + { + if (m_attachment.getEntryName(i).endsWith(extension)) + { + log.fine("#" + i + ": " + m_attachment.getEntryName(i)); + return m_attachment.getEntryData(i); + } + } + return null; + } // getAttachmentData + + /** + * Do we have a PDF Attachment + * @return true if there is a PDF attachment + */ + public boolean isPdfAttachment() + { + return isAttachment(".pdf"); + } // isPdfAttachment + + /** + * Get PDF Attachment Data + * @return data or null + */ + public byte[] getPdfAttachment() + { + return getAttachmentData(".pdf"); + } // getPDFAttachment + + + /************************************************************************** + * Dump Record + */ + public void dump () + { + if (CLogMgt.isLevelFinest()) + { + log.finer(get_WhereClause (true)); + for (int i = 0; i < get_ColumnCount (); i++) + dump (i); + } + } // dump + + /** + * Dump column + * @param index index + */ + public void dump (int index) + { + StringBuffer sb = new StringBuffer(" ").append(index); + if (index < 0 || index >= get_ColumnCount()) + { + log.finest(sb.append(": invalid").toString()); + return; + } + sb.append(": ").append(get_ColumnName(index)) + .append(" = ").append(m_oldValues[index]) + .append(" (").append(m_newValues[index]).append(")"); + log.finest(sb.toString()); + } // dump + + + /************************************************************************* + * Get All IDs of Table. + * Used for listing all Entities + * + int[] IDs = PO.getAllIDs ("AD_PrintFont", null); + for (int i = 0; i < IDs.length; i++) + { + pf = new MPrintFont(Env.getCtx(), IDs[i]); + System.out.println(IDs[i] + " = " + pf.getFont()); + } + * + * @param TableName table name (key column with _ID) + * @param WhereClause optional where clause + * @return array of IDs or null + * @param trxName transaction + */ + public static int[] getAllIDs (String TableName, String WhereClause, String trxName) + { + ArrayList list = new ArrayList(); + StringBuffer sql = new StringBuffer("SELECT "); + sql.append(TableName).append("_ID FROM ").append(TableName); + if (WhereClause != null && WhereClause.length() > 0) + sql.append(" WHERE ").append(WhereClause); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql.toString(), trxName); + rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new Integer(rs.getInt(1))); + } + catch (SQLException e) + { + s_log.log(Level.SEVERE, sql.toString(), e); + return null; + } + finally { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + // Convert to array + int[] retValue = new int[list.size()]; + for (int i = 0; i < retValue.length; i++) + retValue[i] = ((Integer)list.get(i)).intValue(); + return retValue; + } // getAllIDs + + + /** + * Get Find parameter. + * Convert to upper case and add % at the end + * @param query in string + * @return out string + */ + protected static String getFindParameter (String query) + { + if (query == null) + return null; + if (query.length() == 0 || query.equals("%")) + return null; + if (!query.endsWith("%")) + query += "%"; + return query.toUpperCase(); + } // getFindParameter + + + /************************************************************************** + * Load LOB + * @param value LOB + * @return object + */ + private Object get_LOB (Object value) + { + log.fine("Value=" + value); + if (value == null) + return null; + // + Object retValue = null; + + long length = -99; + try + { + //[ 1643996 ] Chat not working in postgres port + if (value instanceof String || + value instanceof byte[]) + retValue = value; + else if (value instanceof Clob) // returns String + { + Clob clob = (Clob)value; + length = clob.length(); + retValue = clob.getSubString(1, (int)length); + } + else if (value instanceof Blob) // returns byte[] + { + Blob blob = (Blob)value; + length = blob.length(); + int index = 1; // correct + if (blob.getClass().getName().equals("oracle.jdbc.rowset.OracleSerialBlob")) + index = 0; // Oracle Bug Invalid Arguments + // at oracle.jdbc.rowset.OracleSerialBlob.getBytes(OracleSerialBlob.java:130) + retValue = blob.getBytes(index, (int)length); + } + else + log.log(Level.SEVERE, "Unknown: " + value); + } + catch (Exception e) + { + log.log(Level.SEVERE, "Length=" + length, e); + } + return retValue; + } // getLOB + + /** LOB Info */ + private ArrayList m_lobInfo = null; + + /** + * Reset LOB info + */ + private void lobReset() + { + m_lobInfo = null; + } // resetLOB + + /** + * Prepare LOB save + * @param value value + * @param index index + * @param displayType display type + */ + private void lobAdd (Object value, int index, int displayType) + { + log.finest("Value=" + value); + PO_LOB lob = new PO_LOB (p_info.getTableName(), get_ColumnName(index), + get_WhereClause(true), displayType, value); + if (m_lobInfo == null) + m_lobInfo = new ArrayList(); + m_lobInfo.add(lob); + } // lobAdd + + /** + * Save LOB + * @return true if saved or ok + */ + private boolean lobSave () + { + if (m_lobInfo == null) + return true; + boolean retValue = true; + for (int i = 0; i < m_lobInfo.size(); i++) + { + PO_LOB lob = (PO_LOB)m_lobInfo.get(i); + if (!lob.save(get_TrxName())) + { + retValue = false; + break; + } + } // for all LOBs + lobReset(); + return retValue; + } // saveLOB + + /** + * Get Object xml representation as string + * @param xml optional string buffer + * @return updated/new string buffer header is only added once + */ + public StringBuffer get_xmlString (StringBuffer xml) + { + if (xml == null) + xml = new StringBuffer(); + else + xml.append(Env.NL); + // + try + { + StringWriter writer = new StringWriter(); + StreamResult result = new StreamResult(writer); + DOMSource source = new DOMSource(get_xmlDocument(xml.length()!=0)); + TransformerFactory tFactory = TransformerFactory.newInstance(); + Transformer transformer = tFactory.newTransformer(); + transformer.setOutputProperty(javax.xml.transform.OutputKeys.INDENT, "yes"); + transformer.transform (source, result); + StringBuffer newXML = writer.getBuffer(); + // + if (xml.length() != 0) + { // // + int tagIndex = newXML.indexOf("?>"); + if (tagIndex != -1) + xml.append(newXML.substring(tagIndex+2)); + else + xml.append(newXML); + } + else + xml.append(newXML); + } + catch (Exception e) + { + log.log(Level.SEVERE, "", e); + } + return xml; + } // get_xmlString + + /** Table ID Attribute */ + protected final static String XML_ATTRIBUTE_AD_Table_ID = "AD_Table_ID"; + /** Record ID Attribute */ + protected final static String XML_ATTRIBUTE_Record_ID = "Record_ID"; + + /** + * Get XML Document representation + * @param noComment do not add comment + * @return XML document + */ + public Document get_xmlDocument(boolean noComment) + { + Document document = null; + try + { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = factory.newDocumentBuilder(); + document = builder.newDocument(); + if (!noComment) + document.appendChild(document.createComment(Adempiere.getSummaryAscii())); + } + catch (Exception e) + { + log.log(Level.SEVERE, "", e); + } + // Root + Element root = document.createElement(get_TableName()); + root.setAttribute(XML_ATTRIBUTE_AD_Table_ID, String.valueOf(get_Table_ID())); + root.setAttribute(XML_ATTRIBUTE_Record_ID, String.valueOf(get_ID())); + document.appendChild(root); + // Columns + int size = get_ColumnCount(); + for (int i = 0; i < size; i++) + { + if (p_info.isVirtualColumn(i)) + continue; + + Element col = document.createElement(p_info.getColumnName(i)); + // + Object value = get_Value(i); + // Display Type + int dt = p_info.getColumnDisplayType(i); + // Based on class of definition, not class of value + Class c = p_info.getColumnClass(i); + if (value == null || value.equals (Null.NULL)) + ; + else if (c == Object.class) + col.appendChild(document.createCDATASection(value.toString())); + else if (value instanceof Integer || value instanceof BigDecimal) + col.appendChild(document.createTextNode(value.toString())); + else if (c == Boolean.class) + { + boolean bValue = false; + if (value instanceof Boolean) + bValue = ((Boolean)value).booleanValue(); + else + bValue = "Y".equals(value); + col.appendChild(document.createTextNode(bValue ? "Y" : "N")); + } + else if (value instanceof Timestamp) + col.appendChild(document.createTextNode(value.toString())); + else if (c == String.class) + col.appendChild(document.createCDATASection((String)value)); + else if (DisplayType.isLOB(dt)) + col.appendChild(document.createCDATASection(value.toString())); + else + col.appendChild(document.createCDATASection(value.toString())); + // + root.appendChild(col); + } + // Custom Columns + if (m_custom != null) + { + Iterator it = m_custom.keySet().iterator(); + while (it.hasNext()) + { + String columnName = (String)it.next(); +// int index = p_info.getColumnIndex(columnName); + String value = (String)m_custom.get(columnName); + // + Element col = document.createElement(columnName); + if (value != null) + col.appendChild(document.createTextNode(value)); + root.appendChild(col); + } + m_custom = null; + } + return document; + } // getDocument + + /* Doc - To be used on ModelValidator to get the corresponding Doc from the PO */ + private Doc m_doc; + + /** + * Set the accounting document associated to the PO - for use in POST ModelValidator + * @param doc Document + */ + public void setDoc(Doc doc) { + m_doc = doc; + } + + public void setReplication(boolean isFromReplication) + { + m_isReplication = isFromReplication; + } + + public boolean isReplication() + { + return m_isReplication; + } + + /** + * Set the accounting document associated to the PO - for use in POST ModelValidator + * @return Doc Document + */ + public Doc getDoc() { + return m_doc; + } + + /** + * PO.setTrxName - set given trxName to an array of POs + * As suggested by teo in [ 1854603 ] + */ + public static void set_TrxName(PO[] lines, String trxName) { + for (PO line : lines) + line.set_TrxName(trxName); + } + +} // PO diff --git a/base/src/org/compiere/model/X_AD_AccessLog.java b/base/src/org/compiere/model/X_AD_AccessLog.java index 77951dac98..224de0ecd2 100644 --- a/base/src/org/compiere/model/X_AD_AccessLog.java +++ b/base/src/org/compiere/model/X_AD_AccessLog.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_AccessLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_AccessLog extends PO implements I_AD_AccessLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Alert.java b/base/src/org/compiere/model/X_AD_Alert.java index 105ab78eee..c3d77f7035 100644 --- a/base/src/org/compiere/model/X_AD_Alert.java +++ b/base/src/org/compiere/model/X_AD_Alert.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Alert * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Alert extends PO implements I_AD_Alert, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_AlertProcessor.java b/base/src/org/compiere/model/X_AD_AlertProcessor.java index ee9386612d..177ce30cd7 100644 --- a/base/src/org/compiere/model/X_AD_AlertProcessor.java +++ b/base/src/org/compiere/model/X_AD_AlertProcessor.java @@ -24,7 +24,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_AlertProcessor * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_AlertProcessor extends PO implements I_AD_AlertProcessor, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_AlertProcessorLog.java b/base/src/org/compiere/model/X_AD_AlertProcessorLog.java index 7c0cfca97b..50863a1643 100644 --- a/base/src/org/compiere/model/X_AD_AlertProcessorLog.java +++ b/base/src/org/compiere/model/X_AD_AlertProcessorLog.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_AlertProcessorLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_AlertProcessorLog extends PO implements I_AD_AlertProcessorLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_AlertRecipient.java b/base/src/org/compiere/model/X_AD_AlertRecipient.java index c85b344c49..99407bf08f 100644 --- a/base/src/org/compiere/model/X_AD_AlertRecipient.java +++ b/base/src/org/compiere/model/X_AD_AlertRecipient.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_AlertRecipient * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_AlertRecipient extends PO implements I_AD_AlertRecipient, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_AlertRule.java b/base/src/org/compiere/model/X_AD_AlertRule.java index e809e0dd88..1d46b92216 100644 --- a/base/src/org/compiere/model/X_AD_AlertRule.java +++ b/base/src/org/compiere/model/X_AD_AlertRule.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_AlertRule * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_AlertRule extends PO implements I_AD_AlertRule, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Archive.java b/base/src/org/compiere/model/X_AD_Archive.java index a65ef448d3..a4d46d6540 100644 --- a/base/src/org/compiere/model/X_AD_Archive.java +++ b/base/src/org/compiere/model/X_AD_Archive.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Archive * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Archive extends PO implements I_AD_Archive, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Attachment.java b/base/src/org/compiere/model/X_AD_Attachment.java index 23d3217d63..09c17a3640 100644 --- a/base/src/org/compiere/model/X_AD_Attachment.java +++ b/base/src/org/compiere/model/X_AD_Attachment.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Attachment * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Attachment extends PO implements I_AD_Attachment, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_AttachmentNote.java b/base/src/org/compiere/model/X_AD_AttachmentNote.java index a1352a11f6..2965ccd3f0 100644 --- a/base/src/org/compiere/model/X_AD_AttachmentNote.java +++ b/base/src/org/compiere/model/X_AD_AttachmentNote.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_AttachmentNote * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_AttachmentNote extends PO implements I_AD_AttachmentNote, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Attribute.java b/base/src/org/compiere/model/X_AD_Attribute.java index 31d22a1f3a..1234fefe30 100644 --- a/base/src/org/compiere/model/X_AD_Attribute.java +++ b/base/src/org/compiere/model/X_AD_Attribute.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Attribute * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Attribute extends PO implements I_AD_Attribute, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Attribute_Value.java b/base/src/org/compiere/model/X_AD_Attribute_Value.java index 746085d55b..514e5e58ac 100644 --- a/base/src/org/compiere/model/X_AD_Attribute_Value.java +++ b/base/src/org/compiere/model/X_AD_Attribute_Value.java @@ -23,7 +23,7 @@ import java.util.Properties; /** Generated Model for AD_Attribute_Value * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Attribute_Value extends PO implements I_AD_Attribute_Value, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_ChangeLog.java b/base/src/org/compiere/model/X_AD_ChangeLog.java index a508d63fc0..1459f9e2f9 100644 --- a/base/src/org/compiere/model/X_AD_ChangeLog.java +++ b/base/src/org/compiere/model/X_AD_ChangeLog.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_ChangeLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ChangeLog extends PO implements I_AD_ChangeLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Client.java b/base/src/org/compiere/model/X_AD_Client.java deleted file mode 100644 index 7b557f8d86..0000000000 --- a/base/src/org/compiere/model/X_AD_Client.java +++ /dev/null @@ -1,732 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.KeyNamePair; - -/** Generated Model for AD_Client - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_AD_Client extends PO implements I_AD_Client, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_AD_Client (Properties ctx, int AD_Client_ID, String trxName) - { - super (ctx, AD_Client_ID, trxName); - /** if (AD_Client_ID == 0) - { - setAutoArchive (null); -// N - setIsCostImmediate (false); -// N - setIsMultiLingualDocument (false); - setIsPostImmediate (false); -// N - setIsServerEMail (false); - setIsSmtpAuthorization (false); -// N - setIsUseASP (false); -// N - setIsUseBetaFunctions (true); -// Y - setMMPolicy (null); -// F - setName (null); - setStoreArchiveOnFileSystem (false); - setStoreAttachmentsOnFileSystem (false); - setValue (null); - } */ - } - - /** Load Constructor */ - public X_AD_Client (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 6 - System - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_AD_Client[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_Language AD_Reference_ID=327 */ - public static final int AD_LANGUAGE_AD_Reference_ID=327; - /** Set Language. - @param AD_Language - Language for this entity - */ - public void setAD_Language (String AD_Language) - { - - if (AD_Language != null && AD_Language.length() > 6) - { - log.warning("Length > 6 - truncated"); - AD_Language = AD_Language.substring(0, 6); - } - set_Value (COLUMNNAME_AD_Language, AD_Language); - } - - /** Get Language. - @return Language for this entity - */ - public String getAD_Language () - { - return (String)get_Value(COLUMNNAME_AD_Language); - } - - /** AutoArchive AD_Reference_ID=334 */ - public static final int AUTOARCHIVE_AD_Reference_ID=334; - /** None = N */ - public static final String AUTOARCHIVE_None = "N"; - /** All (Reports, Documents) = 1 */ - public static final String AUTOARCHIVE_AllReportsDocuments = "1"; - /** Documents = 2 */ - public static final String AUTOARCHIVE_Documents = "2"; - /** External Documents = 3 */ - public static final String AUTOARCHIVE_ExternalDocuments = "3"; - /** Set Auto Archive. - @param AutoArchive - Enable and level of automatic Archive of documents - */ - public void setAutoArchive (String AutoArchive) - { - if (AutoArchive == null) throw new IllegalArgumentException ("AutoArchive is mandatory"); - if (AutoArchive.equals("N") || AutoArchive.equals("1") || AutoArchive.equals("2") || AutoArchive.equals("3")); else throw new IllegalArgumentException ("AutoArchive Invalid value - " + AutoArchive + " - Reference_ID=334 - N - 1 - 2 - 3"); - if (AutoArchive.length() > 1) - { - log.warning("Length > 1 - truncated"); - AutoArchive = AutoArchive.substring(0, 1); - } - set_Value (COLUMNNAME_AutoArchive, AutoArchive); - } - - /** Get Auto Archive. - @return Enable and level of automatic Archive of documents - */ - public String getAutoArchive () - { - return (String)get_Value(COLUMNNAME_AutoArchive); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Document Directory. - @param DocumentDir - Directory for documents from the application server - */ - public void setDocumentDir (String DocumentDir) - { - - if (DocumentDir != null && DocumentDir.length() > 60) - { - log.warning("Length > 60 - truncated"); - DocumentDir = DocumentDir.substring(0, 60); - } - set_Value (COLUMNNAME_DocumentDir, DocumentDir); - } - - /** Get Document Directory. - @return Directory for documents from the application server - */ - public String getDocumentDir () - { - return (String)get_Value(COLUMNNAME_DocumentDir); - } - - /** Set EMail Test. - @param EMailTest - Test EMail - */ - public void setEMailTest (String EMailTest) - { - - if (EMailTest != null && EMailTest.length() > 1) - { - log.warning("Length > 1 - truncated"); - EMailTest = EMailTest.substring(0, 1); - } - set_Value (COLUMNNAME_EMailTest, EMailTest); - } - - /** Get EMail Test. - @return Test EMail - */ - public String getEMailTest () - { - return (String)get_Value(COLUMNNAME_EMailTest); - } - - /** Set Cost Immediately. - @param IsCostImmediate - Update Costs immediately for testing - */ - public void setIsCostImmediate (boolean IsCostImmediate) - { - set_Value (COLUMNNAME_IsCostImmediate, Boolean.valueOf(IsCostImmediate)); - } - - /** Get Cost Immediately. - @return Update Costs immediately for testing - */ - public boolean isCostImmediate () - { - Object oo = get_Value(COLUMNNAME_IsCostImmediate); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Multi Lingual Documents. - @param IsMultiLingualDocument - Documents are Multi Lingual - */ - public void setIsMultiLingualDocument (boolean IsMultiLingualDocument) - { - set_Value (COLUMNNAME_IsMultiLingualDocument, Boolean.valueOf(IsMultiLingualDocument)); - } - - /** Get Multi Lingual Documents. - @return Documents are Multi Lingual - */ - public boolean isMultiLingualDocument () - { - Object oo = get_Value(COLUMNNAME_IsMultiLingualDocument); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Post Immediately. - @param IsPostImmediate - Post the accounting immediately for testing - */ - public void setIsPostImmediate (boolean IsPostImmediate) - { - set_Value (COLUMNNAME_IsPostImmediate, Boolean.valueOf(IsPostImmediate)); - } - - /** Get Post Immediately. - @return Post the accounting immediately for testing - */ - public boolean isPostImmediate () - { - Object oo = get_Value(COLUMNNAME_IsPostImmediate); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Server EMail. - @param IsServerEMail - Send EMail from Server - */ - public void setIsServerEMail (boolean IsServerEMail) - { - set_Value (COLUMNNAME_IsServerEMail, Boolean.valueOf(IsServerEMail)); - } - - /** Get Server EMail. - @return Send EMail from Server - */ - public boolean isServerEMail () - { - Object oo = get_Value(COLUMNNAME_IsServerEMail); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set SMTP Authentication. - @param IsSmtpAuthorization - Your mail server requires Authentication - */ - public void setIsSmtpAuthorization (boolean IsSmtpAuthorization) - { - set_Value (COLUMNNAME_IsSmtpAuthorization, Boolean.valueOf(IsSmtpAuthorization)); - } - - /** Get SMTP Authentication. - @return Your mail server requires Authentication - */ - public boolean isSmtpAuthorization () - { - Object oo = get_Value(COLUMNNAME_IsSmtpAuthorization); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set IsUseASP. - @param IsUseASP IsUseASP */ - public void setIsUseASP (boolean IsUseASP) - { - set_Value (COLUMNNAME_IsUseASP, Boolean.valueOf(IsUseASP)); - } - - /** Get IsUseASP. - @return IsUseASP */ - public boolean isUseASP () - { - Object oo = get_Value(COLUMNNAME_IsUseASP); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Use Beta Functions. - @param IsUseBetaFunctions - Enable the use of Beta Functionality - */ - public void setIsUseBetaFunctions (boolean IsUseBetaFunctions) - { - set_Value (COLUMNNAME_IsUseBetaFunctions, Boolean.valueOf(IsUseBetaFunctions)); - } - - /** Get Use Beta Functions. - @return Enable the use of Beta Functionality - */ - public boolean isUseBetaFunctions () - { - Object oo = get_Value(COLUMNNAME_IsUseBetaFunctions); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** MMPolicy AD_Reference_ID=335 */ - public static final int MMPOLICY_AD_Reference_ID=335; - /** LiFo = L */ - public static final String MMPOLICY_LiFo = "L"; - /** FiFo = F */ - public static final String MMPOLICY_FiFo = "F"; - /** Set Material Policy. - @param MMPolicy - Material Movement Policy - */ - public void setMMPolicy (String MMPolicy) - { - if (MMPolicy == null) throw new IllegalArgumentException ("MMPolicy is mandatory"); - if (MMPolicy.equals("L") || MMPolicy.equals("F")); else throw new IllegalArgumentException ("MMPolicy Invalid value - " + MMPolicy + " - Reference_ID=335 - L - F"); - if (MMPolicy.length() > 1) - { - log.warning("Length > 1 - truncated"); - MMPolicy = MMPolicy.substring(0, 1); - } - set_Value (COLUMNNAME_MMPolicy, MMPolicy); - } - - /** Get Material Policy. - @return Material Movement Policy - */ - public String getMMPolicy () - { - return (String)get_Value(COLUMNNAME_MMPolicy); - } - - /** Set Model Validation Classes. - @param ModelValidationClasses - List of data model validation classes separated by ; - */ - public void setModelValidationClasses (String ModelValidationClasses) - { - - if (ModelValidationClasses != null && ModelValidationClasses.length() > 255) - { - log.warning("Length > 255 - truncated"); - ModelValidationClasses = ModelValidationClasses.substring(0, 255); - } - set_Value (COLUMNNAME_ModelValidationClasses, ModelValidationClasses); - } - - /** Get Model Validation Classes. - @return List of data model validation classes separated by ; - */ - public String getModelValidationClasses () - { - return (String)get_Value(COLUMNNAME_ModelValidationClasses); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Request EMail. - @param RequestEMail - EMail address to send automated mails from or receive mails for automated processing (fully qualified) - */ - public void setRequestEMail (String RequestEMail) - { - - if (RequestEMail != null && RequestEMail.length() > 60) - { - log.warning("Length > 60 - truncated"); - RequestEMail = RequestEMail.substring(0, 60); - } - set_Value (COLUMNNAME_RequestEMail, RequestEMail); - } - - /** Get Request EMail. - @return EMail address to send automated mails from or receive mails for automated processing (fully qualified) - */ - public String getRequestEMail () - { - return (String)get_Value(COLUMNNAME_RequestEMail); - } - - /** Set Request Folder. - @param RequestFolder - EMail folder to process incoming emails; if empty INBOX is used - */ - public void setRequestFolder (String RequestFolder) - { - - if (RequestFolder != null && RequestFolder.length() > 20) - { - log.warning("Length > 20 - truncated"); - RequestFolder = RequestFolder.substring(0, 20); - } - set_Value (COLUMNNAME_RequestFolder, RequestFolder); - } - - /** Get Request Folder. - @return EMail folder to process incoming emails; if empty INBOX is used - */ - public String getRequestFolder () - { - return (String)get_Value(COLUMNNAME_RequestFolder); - } - - /** Set Request User. - @param RequestUser - User Name (ID) of the email owner - */ - public void setRequestUser (String RequestUser) - { - - if (RequestUser != null && RequestUser.length() > 60) - { - log.warning("Length > 60 - truncated"); - RequestUser = RequestUser.substring(0, 60); - } - set_Value (COLUMNNAME_RequestUser, RequestUser); - } - - /** Get Request User. - @return User Name (ID) of the email owner - */ - public String getRequestUser () - { - return (String)get_Value(COLUMNNAME_RequestUser); - } - - /** Set Request User Password. - @param RequestUserPW - Password of the user name (ID) for mail processing - */ - public void setRequestUserPW (String RequestUserPW) - { - - if (RequestUserPW != null && RequestUserPW.length() > 20) - { - log.warning("Length > 20 - truncated"); - RequestUserPW = RequestUserPW.substring(0, 20); - } - set_Value (COLUMNNAME_RequestUserPW, RequestUserPW); - } - - /** Get Request User Password. - @return Password of the user name (ID) for mail processing - */ - public String getRequestUserPW () - { - return (String)get_Value(COLUMNNAME_RequestUserPW); - } - - /** Set Mail Host. - @param SMTPHost - Hostname of Mail Server for SMTP and IMAP - */ - public void setSMTPHost (String SMTPHost) - { - - if (SMTPHost != null && SMTPHost.length() > 60) - { - log.warning("Length > 60 - truncated"); - SMTPHost = SMTPHost.substring(0, 60); - } - set_Value (COLUMNNAME_SMTPHost, SMTPHost); - } - - /** Get Mail Host. - @return Hostname of Mail Server for SMTP and IMAP - */ - public String getSMTPHost () - { - return (String)get_Value(COLUMNNAME_SMTPHost); - } - - /** Set Store Archive On File System. - @param StoreArchiveOnFileSystem Store Archive On File System */ - public void setStoreArchiveOnFileSystem (boolean StoreArchiveOnFileSystem) - { - set_Value (COLUMNNAME_StoreArchiveOnFileSystem, Boolean.valueOf(StoreArchiveOnFileSystem)); - } - - /** Get Store Archive On File System. - @return Store Archive On File System */ - public boolean isStoreArchiveOnFileSystem () - { - Object oo = get_Value(COLUMNNAME_StoreArchiveOnFileSystem); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Store Attachments On File System. - @param StoreAttachmentsOnFileSystem Store Attachments On File System */ - public void setStoreAttachmentsOnFileSystem (boolean StoreAttachmentsOnFileSystem) - { - set_Value (COLUMNNAME_StoreAttachmentsOnFileSystem, Boolean.valueOf(StoreAttachmentsOnFileSystem)); - } - - /** Get Store Attachments On File System. - @return Store Attachments On File System */ - public boolean isStoreAttachmentsOnFileSystem () - { - Object oo = get_Value(COLUMNNAME_StoreAttachmentsOnFileSystem); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Unix Archive Path. - @param UnixArchivePath Unix Archive Path */ - public void setUnixArchivePath (String UnixArchivePath) - { - - if (UnixArchivePath != null && UnixArchivePath.length() > 255) - { - log.warning("Length > 255 - truncated"); - UnixArchivePath = UnixArchivePath.substring(0, 255); - } - set_Value (COLUMNNAME_UnixArchivePath, UnixArchivePath); - } - - /** Get Unix Archive Path. - @return Unix Archive Path */ - public String getUnixArchivePath () - { - return (String)get_Value(COLUMNNAME_UnixArchivePath); - } - - /** Set Unix Attachment Path. - @param UnixAttachmentPath Unix Attachment Path */ - public void setUnixAttachmentPath (String UnixAttachmentPath) - { - - if (UnixAttachmentPath != null && UnixAttachmentPath.length() > 255) - { - log.warning("Length > 255 - truncated"); - UnixAttachmentPath = UnixAttachmentPath.substring(0, 255); - } - set_Value (COLUMNNAME_UnixAttachmentPath, UnixAttachmentPath); - } - - /** Get Unix Attachment Path. - @return Unix Attachment Path */ - public String getUnixAttachmentPath () - { - return (String)get_Value(COLUMNNAME_UnixAttachmentPath); - } - - /** Set Search Key. - @param Value - Search key for the record in the format required - must be unique - */ - public void setValue (String Value) - { - if (Value == null) - throw new IllegalArgumentException ("Value is mandatory."); - - if (Value.length() > 40) - { - log.warning("Length > 40 - truncated"); - Value = Value.substring(0, 40); - } - set_Value (COLUMNNAME_Value, Value); - } - - /** Get Search Key. - @return Search key for the record in the format required - must be unique - */ - public String getValue () - { - return (String)get_Value(COLUMNNAME_Value); - } - - /** Set Windows Archive Path. - @param WindowsArchivePath Windows Archive Path */ - public void setWindowsArchivePath (String WindowsArchivePath) - { - - if (WindowsArchivePath != null && WindowsArchivePath.length() > 255) - { - log.warning("Length > 255 - truncated"); - WindowsArchivePath = WindowsArchivePath.substring(0, 255); - } - set_Value (COLUMNNAME_WindowsArchivePath, WindowsArchivePath); - } - - /** Get Windows Archive Path. - @return Windows Archive Path */ - public String getWindowsArchivePath () - { - return (String)get_Value(COLUMNNAME_WindowsArchivePath); - } - - /** Set Windows Attachment Path. - @param WindowsAttachmentPath Windows Attachment Path */ - public void setWindowsAttachmentPath (String WindowsAttachmentPath) - { - - if (WindowsAttachmentPath != null && WindowsAttachmentPath.length() > 255) - { - log.warning("Length > 255 - truncated"); - WindowsAttachmentPath = WindowsAttachmentPath.substring(0, 255); - } - set_Value (COLUMNNAME_WindowsAttachmentPath, WindowsAttachmentPath); - } - - /** Get Windows Attachment Path. - @return Windows Attachment Path */ - public String getWindowsAttachmentPath () - { - return (String)get_Value(COLUMNNAME_WindowsAttachmentPath); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_ClientInfo.java b/base/src/org/compiere/model/X_AD_ClientInfo.java index 90c2497075..5ebed884b0 100644 --- a/base/src/org/compiere/model/X_AD_ClientInfo.java +++ b/base/src/org/compiere/model/X_AD_ClientInfo.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_ClientInfo * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ClientInfo extends PO implements I_AD_ClientInfo, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_ClientShare.java b/base/src/org/compiere/model/X_AD_ClientShare.java index 7e5cf8a72e..1741e53d25 100644 --- a/base/src/org/compiere/model/X_AD_ClientShare.java +++ b/base/src/org/compiere/model/X_AD_ClientShare.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_ClientShare * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ClientShare extends PO implements I_AD_ClientShare, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Color.java b/base/src/org/compiere/model/X_AD_Color.java index 1d79028b7b..2398ceccf4 100644 --- a/base/src/org/compiere/model/X_AD_Color.java +++ b/base/src/org/compiere/model/X_AD_Color.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Color * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Color extends PO implements I_AD_Color, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Column.java b/base/src/org/compiere/model/X_AD_Column.java index 629c97addf..43196a1f44 100644 --- a/base/src/org/compiere/model/X_AD_Column.java +++ b/base/src/org/compiere/model/X_AD_Column.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Column * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Column extends PO implements I_AD_Column, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Column_Access.java b/base/src/org/compiere/model/X_AD_Column_Access.java index 261e3de1e3..3be9f5862e 100644 --- a/base/src/org/compiere/model/X_AD_Column_Access.java +++ b/base/src/org/compiere/model/X_AD_Column_Access.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Column_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Column_Access extends PO implements I_AD_Column_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Desktop.java b/base/src/org/compiere/model/X_AD_Desktop.java index dc835749a2..16a92e8af3 100644 --- a/base/src/org/compiere/model/X_AD_Desktop.java +++ b/base/src/org/compiere/model/X_AD_Desktop.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Desktop * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Desktop extends PO implements I_AD_Desktop, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_DesktopWorkbench.java b/base/src/org/compiere/model/X_AD_DesktopWorkbench.java index 5bf9bf8a21..fd4562b458 100644 --- a/base/src/org/compiere/model/X_AD_DesktopWorkbench.java +++ b/base/src/org/compiere/model/X_AD_DesktopWorkbench.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_DesktopWorkbench * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_DesktopWorkbench extends PO implements I_AD_DesktopWorkbench, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Document_Action_Access.java b/base/src/org/compiere/model/X_AD_Document_Action_Access.java index 786a18cbe4..c54a70fe89 100644 --- a/base/src/org/compiere/model/X_AD_Document_Action_Access.java +++ b/base/src/org/compiere/model/X_AD_Document_Action_Access.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Document_Action_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Document_Action_Access extends PO implements I_AD_Document_Action_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Element.java b/base/src/org/compiere/model/X_AD_Element.java index a9d58e3683..d94b85debf 100644 --- a/base/src/org/compiere/model/X_AD_Element.java +++ b/base/src/org/compiere/model/X_AD_Element.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Element * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Element extends PO implements I_AD_Element, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_EntityType.java b/base/src/org/compiere/model/X_AD_EntityType.java index 442f663668..ad91e1d63e 100644 --- a/base/src/org/compiere/model/X_AD_EntityType.java +++ b/base/src/org/compiere/model/X_AD_EntityType.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_EntityType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_EntityType extends PO implements I_AD_EntityType, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Error.java b/base/src/org/compiere/model/X_AD_Error.java index 19f6fb6b38..b96a34074e 100644 --- a/base/src/org/compiere/model/X_AD_Error.java +++ b/base/src/org/compiere/model/X_AD_Error.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Error * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Error extends PO implements I_AD_Error, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Field.java b/base/src/org/compiere/model/X_AD_Field.java index be6d418f8d..f9e7a34645 100644 --- a/base/src/org/compiere/model/X_AD_Field.java +++ b/base/src/org/compiere/model/X_AD_Field.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Field * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Field extends PO implements I_AD_Field, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_FieldGroup.java b/base/src/org/compiere/model/X_AD_FieldGroup.java index 5727ed5304..09c2f09937 100644 --- a/base/src/org/compiere/model/X_AD_FieldGroup.java +++ b/base/src/org/compiere/model/X_AD_FieldGroup.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_FieldGroup * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_FieldGroup extends PO implements I_AD_FieldGroup, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Find.java b/base/src/org/compiere/model/X_AD_Find.java index 417c72a5b6..c2a109973f 100644 --- a/base/src/org/compiere/model/X_AD_Find.java +++ b/base/src/org/compiere/model/X_AD_Find.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Find * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Find extends PO implements I_AD_Find, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Form.java b/base/src/org/compiere/model/X_AD_Form.java index fd670f11ed..bec09ad4d1 100644 --- a/base/src/org/compiere/model/X_AD_Form.java +++ b/base/src/org/compiere/model/X_AD_Form.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Form * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Form extends PO implements I_AD_Form, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Form_Access.java b/base/src/org/compiere/model/X_AD_Form_Access.java index 07ab82180a..925712c689 100644 --- a/base/src/org/compiere/model/X_AD_Form_Access.java +++ b/base/src/org/compiere/model/X_AD_Form_Access.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Form_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Form_Access extends PO implements I_AD_Form_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Image.java b/base/src/org/compiere/model/X_AD_Image.java index 3543bc1d7c..690e0302d2 100644 --- a/base/src/org/compiere/model/X_AD_Image.java +++ b/base/src/org/compiere/model/X_AD_Image.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Image * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Image extends PO implements I_AD_Image, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_ImpFormat.java b/base/src/org/compiere/model/X_AD_ImpFormat.java index c76b71426f..dcc4beaedb 100644 --- a/base/src/org/compiere/model/X_AD_ImpFormat.java +++ b/base/src/org/compiere/model/X_AD_ImpFormat.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_ImpFormat * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ImpFormat extends PO implements I_AD_ImpFormat, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_ImpFormat_Row.java b/base/src/org/compiere/model/X_AD_ImpFormat_Row.java index 92d3bf573d..c695e86059 100644 --- a/base/src/org/compiere/model/X_AD_ImpFormat_Row.java +++ b/base/src/org/compiere/model/X_AD_ImpFormat_Row.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_ImpFormat_Row * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ImpFormat_Row extends PO implements I_AD_ImpFormat_Row, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_InfoColumn.java b/base/src/org/compiere/model/X_AD_InfoColumn.java index ebce1d4dfa..0b2876c55e 100644 --- a/base/src/org/compiere/model/X_AD_InfoColumn.java +++ b/base/src/org/compiere/model/X_AD_InfoColumn.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_InfoColumn * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_InfoWindow.java b/base/src/org/compiere/model/X_AD_InfoWindow.java index d3adc03e5f..eb83e84782 100644 --- a/base/src/org/compiere/model/X_AD_InfoWindow.java +++ b/base/src/org/compiere/model/X_AD_InfoWindow.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_InfoWindow * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Issue.java b/base/src/org/compiere/model/X_AD_Issue.java index ff81aab3be..96191740fc 100644 --- a/base/src/org/compiere/model/X_AD_Issue.java +++ b/base/src/org/compiere/model/X_AD_Issue.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Issue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Issue extends PO implements I_AD_Issue, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_LabelPrinter.java b/base/src/org/compiere/model/X_AD_LabelPrinter.java index 961be9d2b6..994d877c5d 100644 --- a/base/src/org/compiere/model/X_AD_LabelPrinter.java +++ b/base/src/org/compiere/model/X_AD_LabelPrinter.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_LabelPrinter * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_LabelPrinter extends PO implements I_AD_LabelPrinter, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_LabelPrinterFunction.java b/base/src/org/compiere/model/X_AD_LabelPrinterFunction.java index 21a95ff75d..8fe32d3eb1 100644 --- a/base/src/org/compiere/model/X_AD_LabelPrinterFunction.java +++ b/base/src/org/compiere/model/X_AD_LabelPrinterFunction.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_LabelPrinterFunction * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_LabelPrinterFunction extends PO implements I_AD_LabelPrinterFunction, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Language.java b/base/src/org/compiere/model/X_AD_Language.java index c066b563db..6891c0ff6a 100644 --- a/base/src/org/compiere/model/X_AD_Language.java +++ b/base/src/org/compiere/model/X_AD_Language.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Language * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Language extends PO implements I_AD_Language, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_LdapAccess.java b/base/src/org/compiere/model/X_AD_LdapAccess.java index 9edc002c70..f07b9611a0 100755 --- a/base/src/org/compiere/model/X_AD_LdapAccess.java +++ b/base/src/org/compiere/model/X_AD_LdapAccess.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_LdapAccess * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_LdapAccess extends PO implements I_AD_LdapAccess, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_LdapProcessor.java b/base/src/org/compiere/model/X_AD_LdapProcessor.java index 963aa64d46..b236ee3dc5 100755 --- a/base/src/org/compiere/model/X_AD_LdapProcessor.java +++ b/base/src/org/compiere/model/X_AD_LdapProcessor.java @@ -24,7 +24,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_LdapProcessor * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_LdapProcessor extends PO implements I_AD_LdapProcessor, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_LdapProcessorLog.java b/base/src/org/compiere/model/X_AD_LdapProcessorLog.java index 8b50d8e3e4..83a5082f6f 100755 --- a/base/src/org/compiere/model/X_AD_LdapProcessorLog.java +++ b/base/src/org/compiere/model/X_AD_LdapProcessorLog.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_LdapProcessorLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_LdapProcessorLog extends PO implements I_AD_LdapProcessorLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Menu.java b/base/src/org/compiere/model/X_AD_Menu.java index 95539d0b9a..5db4b01504 100644 --- a/base/src/org/compiere/model/X_AD_Menu.java +++ b/base/src/org/compiere/model/X_AD_Menu.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Menu * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Menu extends PO implements I_AD_Menu, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Message.java b/base/src/org/compiere/model/X_AD_Message.java index 570436752e..87c8102d1a 100644 --- a/base/src/org/compiere/model/X_AD_Message.java +++ b/base/src/org/compiere/model/X_AD_Message.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Message * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Message extends PO implements I_AD_Message, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_MigrationScript.java b/base/src/org/compiere/model/X_AD_MigrationScript.java new file mode 100644 index 0000000000..da07cffd6f --- /dev/null +++ b/base/src/org/compiere/model/X_AD_MigrationScript.java @@ -0,0 +1,384 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for AD_MigrationScript + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_AD_MigrationScript extends PO implements I_AD_MigrationScript, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_AD_MigrationScript (Properties ctx, int AD_MigrationScript_ID, String trxName) + { + super (ctx, AD_MigrationScript_ID, trxName); + /** if (AD_MigrationScript_ID == 0) + { + setAD_MigrationScript_ID (0); + setFileName (null); + setName (null); + setProjectName (null); + setReleaseNo (null); + setStatus (null); + setisApply (false); + } */ + } + + /** Load Constructor */ + public X_AD_MigrationScript (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 4 - System + */ + 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() + { + StringBuffer sb = new StringBuffer ("X_AD_MigrationScript[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Migration Script. + @param AD_MigrationScript_ID Migration Script */ + public void setAD_MigrationScript_ID (int AD_MigrationScript_ID) + { + if (AD_MigrationScript_ID < 1) + throw new IllegalArgumentException ("AD_MigrationScript_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_AD_MigrationScript_ID, Integer.valueOf(AD_MigrationScript_ID)); + } + + /** Get Migration Script. + @return Migration Script */ + public int getAD_MigrationScript_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_MigrationScript_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Description = Description.substring(0, 2000); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Developer Name. + @param DeveloperName Developer Name */ + public void setDeveloperName (String DeveloperName) + { + + if (DeveloperName != null && DeveloperName.length() > 60) + { + log.warning("Length > 60 - truncated"); + DeveloperName = DeveloperName.substring(0, 60); + } + set_Value (COLUMNNAME_DeveloperName, DeveloperName); + } + + /** Get Developer Name. + @return Developer Name */ + public String getDeveloperName () + { + return (String)get_Value(COLUMNNAME_DeveloperName); + } + + /** Set File Name. + @param FileName + Name of the local file or URL + */ + public void setFileName (String FileName) + { + if (FileName == null) + throw new IllegalArgumentException ("FileName is mandatory."); + + if (FileName.length() > 500) + { + log.warning("Length > 500 - truncated"); + FileName = FileName.substring(0, 500); + } + set_Value (COLUMNNAME_FileName, FileName); + } + + /** Get File Name. + @return Name of the local file or URL + */ + public String getFileName () + { + return (String)get_Value(COLUMNNAME_FileName); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Project. + @param ProjectName + Name of the Project + */ + public void setProjectName (String ProjectName) + { + if (ProjectName == null) + throw new IllegalArgumentException ("ProjectName is mandatory."); + + if (ProjectName.length() > 60) + { + log.warning("Length > 60 - truncated"); + ProjectName = ProjectName.substring(0, 60); + } + set_Value (COLUMNNAME_ProjectName, ProjectName); + } + + /** Get Project. + @return Name of the Project + */ + public String getProjectName () + { + return (String)get_Value(COLUMNNAME_ProjectName); + } + + /** Set Reference. + @param Reference + Reference for this record + */ + public void setReference (String Reference) + { + + if (Reference != null && Reference.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Reference = Reference.substring(0, 2000); + } + set_Value (COLUMNNAME_Reference, Reference); + } + + /** Get Reference. + @return Reference for this record + */ + public String getReference () + { + return (String)get_Value(COLUMNNAME_Reference); + } + + /** Set Release No. + @param ReleaseNo + Internal Release Number + */ + public void setReleaseNo (String ReleaseNo) + { + if (ReleaseNo == null) + throw new IllegalArgumentException ("ReleaseNo is mandatory."); + + if (ReleaseNo.length() > 4) + { + log.warning("Length > 4 - truncated"); + ReleaseNo = ReleaseNo.substring(0, 4); + } + set_Value (COLUMNNAME_ReleaseNo, ReleaseNo); + } + + /** Get Release No. + @return Internal Release Number + */ + public String getReleaseNo () + { + return (String)get_Value(COLUMNNAME_ReleaseNo); + } + + /** Set Script. + @param Script + Dynamic Java Language Script to calculate result + */ + public void setScript (byte[] Script) + { + set_ValueNoCheck (COLUMNNAME_Script, Script); + } + + /** Get Script. + @return Dynamic Java Language Script to calculate result + */ + public byte[] getScript () + { + return (byte[])get_Value(COLUMNNAME_Script); + } + + /** Set Roll the Script. + @param ScriptRoll Roll the Script */ + public void setScriptRoll (String ScriptRoll) + { + + if (ScriptRoll != null && ScriptRoll.length() > 1) + { + log.warning("Length > 1 - truncated"); + ScriptRoll = ScriptRoll.substring(0, 1); + } + set_Value (COLUMNNAME_ScriptRoll, ScriptRoll); + } + + /** Get Roll the Script. + @return Roll the Script */ + public String getScriptRoll () + { + return (String)get_Value(COLUMNNAME_ScriptRoll); + } + + /** Status AD_Reference_ID=53239 */ + public static final int STATUS_AD_Reference_ID=53239; + /** In Progress = IP */ + public static final String STATUS_InProgress = "IP"; + /** Completed = CO */ + public static final String STATUS_Completed = "CO"; + /** Error = ER */ + public static final String STATUS_Error = "ER"; + /** Set Status. + @param Status + Status of the currently running check + */ + public void setStatus (String Status) + { + if (Status == null) throw new IllegalArgumentException ("Status is mandatory"); + if (Status.equals("IP") || Status.equals("CO") || Status.equals("ER")); else throw new IllegalArgumentException ("Status Invalid value - " + Status + " - Reference_ID=53239 - IP - CO - ER"); + if (Status.length() > 2) + { + log.warning("Length > 2 - truncated"); + Status = Status.substring(0, 2); + } + set_ValueNoCheck (COLUMNNAME_Status, Status); + } + + /** Get Status. + @return Status of the currently running check + */ + public String getStatus () + { + return (String)get_Value(COLUMNNAME_Status); + } + + /** Set URL. + @param URL + Full URL address - e.g. http://www.adempiere.org + */ + public void setURL (String URL) + { + + if (URL != null && URL.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + URL = URL.substring(0, 2000); + } + set_Value (COLUMNNAME_URL, URL); + } + + /** Get URL. + @return Full URL address - e.g. http://www.adempiere.org + */ + public String getURL () + { + return (String)get_Value(COLUMNNAME_URL); + } + + /** Set Apply Script. + @param isApply Apply Script */ + public void setisApply (boolean isApply) + { + set_Value (COLUMNNAME_isApply, Boolean.valueOf(isApply)); + } + + /** Get Apply Script. + @return Apply Script */ + public boolean isApply () + { + Object oo = get_Value(COLUMNNAME_isApply); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_ModelValidator.java b/base/src/org/compiere/model/X_AD_ModelValidator.java index 17f4d5fe84..249c07a86a 100644 --- a/base/src/org/compiere/model/X_AD_ModelValidator.java +++ b/base/src/org/compiere/model/X_AD_ModelValidator.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_ModelValidator * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ModelValidator extends PO implements I_AD_ModelValidator, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Modification.java b/base/src/org/compiere/model/X_AD_Modification.java index d6eeb9e20d..51e6128786 100644 --- a/base/src/org/compiere/model/X_AD_Modification.java +++ b/base/src/org/compiere/model/X_AD_Modification.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Modification * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Modification extends PO implements I_AD_Modification, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Note.java b/base/src/org/compiere/model/X_AD_Note.java index cdc80eda2a..5df116ed59 100644 --- a/base/src/org/compiere/model/X_AD_Note.java +++ b/base/src/org/compiere/model/X_AD_Note.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Note * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Note extends PO implements I_AD_Note, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Org.java b/base/src/org/compiere/model/X_AD_Org.java index 163dd57478..88de7be425 100644 --- a/base/src/org/compiere/model/X_AD_Org.java +++ b/base/src/org/compiere/model/X_AD_Org.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Org * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Org extends PO implements I_AD_Org, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_OrgInfo.java b/base/src/org/compiere/model/X_AD_OrgInfo.java index e1dbff864d..f6f0a16f92 100644 --- a/base/src/org/compiere/model/X_AD_OrgInfo.java +++ b/base/src/org/compiere/model/X_AD_OrgInfo.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_OrgInfo * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_OrgType.java b/base/src/org/compiere/model/X_AD_OrgType.java index 81ed8bfa3b..48eb15fddc 100644 --- a/base/src/org/compiere/model/X_AD_OrgType.java +++ b/base/src/org/compiere/model/X_AD_OrgType.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_OrgType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_OrgType extends PO implements I_AD_OrgType, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PInstance.java b/base/src/org/compiere/model/X_AD_PInstance.java index fffef35293..fd2e31a206 100644 --- a/base/src/org/compiere/model/X_AD_PInstance.java +++ b/base/src/org/compiere/model/X_AD_PInstance.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PInstance * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PInstance extends PO implements I_AD_PInstance, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PInstance_Log.java b/base/src/org/compiere/model/X_AD_PInstance_Log.java index 70f2ddd8e7..63660caae5 100644 --- a/base/src/org/compiere/model/X_AD_PInstance_Log.java +++ b/base/src/org/compiere/model/X_AD_PInstance_Log.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for AD_PInstance_Log * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PInstance_Log extends PO implements I_AD_PInstance_Log, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PInstance_Para.java b/base/src/org/compiere/model/X_AD_PInstance_Para.java index 0c347fe137..d81a39055d 100644 --- a/base/src/org/compiere/model/X_AD_PInstance_Para.java +++ b/base/src/org/compiere/model/X_AD_PInstance_Para.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PInstance_Para * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PInstance_Para extends PO implements I_AD_PInstance_Para, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Package_Exp.java b/base/src/org/compiere/model/X_AD_Package_Exp.java index c0d40c54e9..a413d5944e 100644 --- a/base/src/org/compiere/model/X_AD_Package_Exp.java +++ b/base/src/org/compiere/model/X_AD_Package_Exp.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Package_Exp * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Package_Exp extends PO implements I_AD_Package_Exp, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Package_Exp_Common.java b/base/src/org/compiere/model/X_AD_Package_Exp_Common.java index 5c8383d9d1..913ae21b7f 100644 --- a/base/src/org/compiere/model/X_AD_Package_Exp_Common.java +++ b/base/src/org/compiere/model/X_AD_Package_Exp_Common.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Package_Exp_Common * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Package_Exp_Common extends PO implements I_AD_Package_Exp_Common, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Package_Exp_Detail.java b/base/src/org/compiere/model/X_AD_Package_Exp_Detail.java index a927513d56..68073c4861 100644 --- a/base/src/org/compiere/model/X_AD_Package_Exp_Detail.java +++ b/base/src/org/compiere/model/X_AD_Package_Exp_Detail.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Package_Exp_Detail * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Package_Exp_Detail extends PO implements I_AD_Package_Exp_Detail, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Package_Imp.java b/base/src/org/compiere/model/X_AD_Package_Imp.java index 1a9261a35d..f92d9cf95f 100644 --- a/base/src/org/compiere/model/X_AD_Package_Imp.java +++ b/base/src/org/compiere/model/X_AD_Package_Imp.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Package_Imp * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Package_Imp extends PO implements I_AD_Package_Imp, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Package_Imp_Backup.java b/base/src/org/compiere/model/X_AD_Package_Imp_Backup.java index 4a6c60664d..2e9fce3452 100644 --- a/base/src/org/compiere/model/X_AD_Package_Imp_Backup.java +++ b/base/src/org/compiere/model/X_AD_Package_Imp_Backup.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Package_Imp_Backup * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Package_Imp_Backup extends PO implements I_AD_Package_Imp_Backup, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Package_Imp_Detail.java b/base/src/org/compiere/model/X_AD_Package_Imp_Detail.java index 34c620dfd1..e8f12e1687 100644 --- a/base/src/org/compiere/model/X_AD_Package_Imp_Detail.java +++ b/base/src/org/compiere/model/X_AD_Package_Imp_Detail.java @@ -22,7 +22,7 @@ import java.util.Properties; /** Generated Model for AD_Package_Imp_Detail * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Package_Imp_Detail extends PO implements I_AD_Package_Imp_Detail, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Package_Imp_Inst.java b/base/src/org/compiere/model/X_AD_Package_Imp_Inst.java index 5a71395d1f..dd406f027c 100644 --- a/base/src/org/compiere/model/X_AD_Package_Imp_Inst.java +++ b/base/src/org/compiere/model/X_AD_Package_Imp_Inst.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Package_Imp_Inst * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Package_Imp_Inst extends PO implements I_AD_Package_Imp_Inst, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Package_Imp_Proc.java b/base/src/org/compiere/model/X_AD_Package_Imp_Proc.java index 17d41188b5..52bd1ceeb7 100644 --- a/base/src/org/compiere/model/X_AD_Package_Imp_Proc.java +++ b/base/src/org/compiere/model/X_AD_Package_Imp_Proc.java @@ -22,7 +22,7 @@ import java.util.Properties; /** Generated Model for AD_Package_Imp_Proc * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Package_Imp_Proc extends PO implements I_AD_Package_Imp_Proc, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Preference.java b/base/src/org/compiere/model/X_AD_Preference.java index b116825f44..64b68063fa 100644 --- a/base/src/org/compiere/model/X_AD_Preference.java +++ b/base/src/org/compiere/model/X_AD_Preference.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Preference * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Preference extends PO implements I_AD_Preference, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintColor.java b/base/src/org/compiere/model/X_AD_PrintColor.java index f6b286955a..f7ff5dcba5 100644 --- a/base/src/org/compiere/model/X_AD_PrintColor.java +++ b/base/src/org/compiere/model/X_AD_PrintColor.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintColor * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintColor extends PO implements I_AD_PrintColor, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintFont.java b/base/src/org/compiere/model/X_AD_PrintFont.java index f0c2fe3de1..cd7a7b4147 100644 --- a/base/src/org/compiere/model/X_AD_PrintFont.java +++ b/base/src/org/compiere/model/X_AD_PrintFont.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintFont * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintFont extends PO implements I_AD_PrintFont, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintForm.java b/base/src/org/compiere/model/X_AD_PrintForm.java index a32a541a6c..695a12f448 100644 --- a/base/src/org/compiere/model/X_AD_PrintForm.java +++ b/base/src/org/compiere/model/X_AD_PrintForm.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintForm * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintForm extends PO implements I_AD_PrintForm, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintFormat.java b/base/src/org/compiere/model/X_AD_PrintFormat.java index 59cf6ecb8b..84a5a9c9ed 100644 --- a/base/src/org/compiere/model/X_AD_PrintFormat.java +++ b/base/src/org/compiere/model/X_AD_PrintFormat.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintFormat * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintFormat extends PO implements I_AD_PrintFormat, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintFormatItem.java b/base/src/org/compiere/model/X_AD_PrintFormatItem.java index 81238bbe8f..c269e7f59c 100644 --- a/base/src/org/compiere/model/X_AD_PrintFormatItem.java +++ b/base/src/org/compiere/model/X_AD_PrintFormatItem.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintFormatItem * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintFormatItem extends PO implements I_AD_PrintFormatItem, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintGraph.java b/base/src/org/compiere/model/X_AD_PrintGraph.java index 93c6cad607..a5716fd3a8 100644 --- a/base/src/org/compiere/model/X_AD_PrintGraph.java +++ b/base/src/org/compiere/model/X_AD_PrintGraph.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintGraph * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintGraph extends PO implements I_AD_PrintGraph, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintLabel.java b/base/src/org/compiere/model/X_AD_PrintLabel.java index 6aa55bb98a..db05e32feb 100644 --- a/base/src/org/compiere/model/X_AD_PrintLabel.java +++ b/base/src/org/compiere/model/X_AD_PrintLabel.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintLabel * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintLabel extends PO implements I_AD_PrintLabel, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintLabelLine.java b/base/src/org/compiere/model/X_AD_PrintLabelLine.java index c318799b51..fb05b933f2 100644 --- a/base/src/org/compiere/model/X_AD_PrintLabelLine.java +++ b/base/src/org/compiere/model/X_AD_PrintLabelLine.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintLabelLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintLabelLine extends PO implements I_AD_PrintLabelLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintPaper.java b/base/src/org/compiere/model/X_AD_PrintPaper.java index c69d02fcf1..6d0efc4558 100644 --- a/base/src/org/compiere/model/X_AD_PrintPaper.java +++ b/base/src/org/compiere/model/X_AD_PrintPaper.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintPaper * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintPaper extends PO implements I_AD_PrintPaper, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_PrintTableFormat.java b/base/src/org/compiere/model/X_AD_PrintTableFormat.java index 8bbfa48448..913e321a8a 100644 --- a/base/src/org/compiere/model/X_AD_PrintTableFormat.java +++ b/base/src/org/compiere/model/X_AD_PrintTableFormat.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_PrintTableFormat * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_PrintTableFormat extends PO implements I_AD_PrintTableFormat, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Private_Access.java b/base/src/org/compiere/model/X_AD_Private_Access.java index b6c8638662..451d1cdb80 100644 --- a/base/src/org/compiere/model/X_AD_Private_Access.java +++ b/base/src/org/compiere/model/X_AD_Private_Access.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Private_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Private_Access extends PO implements I_AD_Private_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Process.java b/base/src/org/compiere/model/X_AD_Process.java index 032f519d53..ddfbf3825b 100644 --- a/base/src/org/compiere/model/X_AD_Process.java +++ b/base/src/org/compiere/model/X_AD_Process.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Process * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Process_Access.java b/base/src/org/compiere/model/X_AD_Process_Access.java index d1ad6d0223..03e31f7a18 100644 --- a/base/src/org/compiere/model/X_AD_Process_Access.java +++ b/base/src/org/compiere/model/X_AD_Process_Access.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Process_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Process_Access extends PO implements I_AD_Process_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Process_Para.java b/base/src/org/compiere/model/X_AD_Process_Para.java index fb71a755b2..5077eab0e6 100644 --- a/base/src/org/compiere/model/X_AD_Process_Para.java +++ b/base/src/org/compiere/model/X_AD_Process_Para.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Process_Para * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Process_Para extends PO implements I_AD_Process_Para, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Record_Access.java b/base/src/org/compiere/model/X_AD_Record_Access.java index 4c25fcebc3..53ae1a9224 100644 --- a/base/src/org/compiere/model/X_AD_Record_Access.java +++ b/base/src/org/compiere/model/X_AD_Record_Access.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Record_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Record_Access extends PO implements I_AD_Record_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Ref_List.java b/base/src/org/compiere/model/X_AD_Ref_List.java index 5ff1fb7857..754ee1bbbe 100644 --- a/base/src/org/compiere/model/X_AD_Ref_List.java +++ b/base/src/org/compiere/model/X_AD_Ref_List.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Ref_List * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Ref_List extends PO implements I_AD_Ref_List, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Ref_Table.java b/base/src/org/compiere/model/X_AD_Ref_Table.java index c4e1c62096..f2f5865566 100644 --- a/base/src/org/compiere/model/X_AD_Ref_Table.java +++ b/base/src/org/compiere/model/X_AD_Ref_Table.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Ref_Table * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Ref_Table extends PO implements I_AD_Ref_Table, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Reference.java b/base/src/org/compiere/model/X_AD_Reference.java index bf4ae10f3a..3255045a28 100644 --- a/base/src/org/compiere/model/X_AD_Reference.java +++ b/base/src/org/compiere/model/X_AD_Reference.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Reference * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Reference extends PO implements I_AD_Reference, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Registration.java b/base/src/org/compiere/model/X_AD_Registration.java index bc936899d9..299b3c62e9 100644 --- a/base/src/org/compiere/model/X_AD_Registration.java +++ b/base/src/org/compiere/model/X_AD_Registration.java @@ -25,7 +25,7 @@ import java.util.logging.Level; /** Generated Model for AD_Registration * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Registration extends PO implements I_AD_Registration, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Replication.java b/base/src/org/compiere/model/X_AD_Replication.java index 5f2aad186a..2856c31f55 100644 --- a/base/src/org/compiere/model/X_AD_Replication.java +++ b/base/src/org/compiere/model/X_AD_Replication.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Replication * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Replication extends PO implements I_AD_Replication, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_ReplicationDocument.java b/base/src/org/compiere/model/X_AD_ReplicationDocument.java new file mode 100644 index 0000000000..88fa342ebe --- /dev/null +++ b/base/src/org/compiere/model/X_AD_ReplicationDocument.java @@ -0,0 +1,249 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.compiere.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; + +/** Generated Model for AD_ReplicationDocument + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_AD_ReplicationDocument extends PO implements I_AD_ReplicationDocument, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_AD_ReplicationDocument (Properties ctx, int AD_ReplicationDocument_ID, String trxName) + { + super (ctx, AD_ReplicationDocument_ID, trxName); + /** if (AD_ReplicationDocument_ID == 0) + { + setAD_ReplicationDocument_ID (0); + setAD_ReplicationStrategy_ID (0); + setAD_Table_ID (0); + setC_DocType_ID (0); + setReplicationType (null); + } */ + } + + /** Load Constructor */ + public X_AD_ReplicationDocument (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() + { + StringBuffer sb = new StringBuffer ("X_AD_ReplicationDocument[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set AD_ReplicationDocument_ID. + @param AD_ReplicationDocument_ID AD_ReplicationDocument_ID */ + public void setAD_ReplicationDocument_ID (int AD_ReplicationDocument_ID) + { + if (AD_ReplicationDocument_ID < 1) + throw new IllegalArgumentException ("AD_ReplicationDocument_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_AD_ReplicationDocument_ID, Integer.valueOf(AD_ReplicationDocument_ID)); + } + + /** Get AD_ReplicationDocument_ID. + @return AD_ReplicationDocument_ID */ + public int getAD_ReplicationDocument_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_ReplicationDocument_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Replication Strategy. + @param AD_ReplicationStrategy_ID + Data Replication Strategy + */ + public void setAD_ReplicationStrategy_ID (int AD_ReplicationStrategy_ID) + { + if (AD_ReplicationStrategy_ID < 1) + throw new IllegalArgumentException ("AD_ReplicationStrategy_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_AD_ReplicationStrategy_ID, Integer.valueOf(AD_ReplicationStrategy_ID)); + } + + /** Get Replication Strategy. + @return Data Replication Strategy + */ + public int getAD_ReplicationStrategy_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_ReplicationStrategy_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_AD_Table getAD_Table() throws Exception + { + Class clazz = MTable.getClass(I_AD_Table.Table_Name); + I_AD_Table result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Table)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Table_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Table. + @param AD_Table_ID + Database Table information + */ + public void setAD_Table_ID (int AD_Table_ID) + { + if (AD_Table_ID < 1) + throw new IllegalArgumentException ("AD_Table_ID is mandatory."); + set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID)); + } + + /** Get Table. + @return Database Table information + */ + public int getAD_Table_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_DocType getC_DocType() throws Exception + { + Class clazz = MTable.getClass(I_C_DocType.Table_Name); + I_C_DocType result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Document Type. + @param C_DocType_ID + Document type or rules + */ + public void setC_DocType_ID (int C_DocType_ID) + { + if (C_DocType_ID < 0) + throw new IllegalArgumentException ("C_DocType_ID is mandatory."); + set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); + } + + /** Get Document Type. + @return Document type or rules + */ + public int getC_DocType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** ReplicationType AD_Reference_ID=126 */ + public static final int REPLICATIONTYPE_AD_Reference_ID=126; + /** Local = L */ + public static final String REPLICATIONTYPE_Local = "L"; + /** Merge = M */ + public static final String REPLICATIONTYPE_Merge = "M"; + /** Reference = R */ + public static final String REPLICATIONTYPE_Reference = "R"; + /** Set Replication Type. + @param ReplicationType + Type of Data Replication + */ + public void setReplicationType (String ReplicationType) + { + if (ReplicationType == null) throw new IllegalArgumentException ("ReplicationType is mandatory"); + if (ReplicationType.equals("L") || ReplicationType.equals("M") || ReplicationType.equals("R")); else throw new IllegalArgumentException ("ReplicationType Invalid value - " + ReplicationType + " - Reference_ID=126 - L - M - R"); + if (ReplicationType.length() > 1) + { + log.warning("Length > 1 - truncated"); + ReplicationType = ReplicationType.substring(0, 1); + } + set_Value (COLUMNNAME_ReplicationType, ReplicationType); + } + + /** Get Replication Type. + @return Type of Data Replication + */ + public String getReplicationType () + { + return (String)get_Value(COLUMNNAME_ReplicationType); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_ReplicationTable.java b/base/src/org/compiere/model/X_AD_ReplicationTable.java index 2b01b14185..833f7b5d90 100644 --- a/base/src/org/compiere/model/X_AD_ReplicationTable.java +++ b/base/src/org/compiere/model/X_AD_ReplicationTable.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_ReplicationTable * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ReplicationTable extends PO implements I_AD_ReplicationTable, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Replication_Log.java b/base/src/org/compiere/model/X_AD_Replication_Log.java index 153e6a66db..571b318271 100644 --- a/base/src/org/compiere/model/X_AD_Replication_Log.java +++ b/base/src/org/compiere/model/X_AD_Replication_Log.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Replication_Log * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Replication_Log extends PO implements I_AD_Replication_Log, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Replication_Run.java b/base/src/org/compiere/model/X_AD_Replication_Run.java index cf666f1d36..a4ddd526f5 100644 --- a/base/src/org/compiere/model/X_AD_Replication_Run.java +++ b/base/src/org/compiere/model/X_AD_Replication_Run.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Replication_Run * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Replication_Run extends PO implements I_AD_Replication_Run, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_ReportView.java b/base/src/org/compiere/model/X_AD_ReportView.java index 5a9b5af6eb..3c7555fc3a 100644 --- a/base/src/org/compiere/model/X_AD_ReportView.java +++ b/base/src/org/compiere/model/X_AD_ReportView.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_ReportView * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ReportView extends PO implements I_AD_ReportView, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_ReportView_Col.java b/base/src/org/compiere/model/X_AD_ReportView_Col.java index 38328ec09c..616d742bf1 100644 --- a/base/src/org/compiere/model/X_AD_ReportView_Col.java +++ b/base/src/org/compiere/model/X_AD_ReportView_Col.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_ReportView_Col * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_ReportView_Col extends PO implements I_AD_ReportView_Col, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Role.java b/base/src/org/compiere/model/X_AD_Role.java deleted file mode 100644 index e1ea111b90..0000000000 --- a/base/src/org/compiere/model/X_AD_Role.java +++ /dev/null @@ -1,971 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for AD_Role - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_AD_Role extends PO implements I_AD_Role, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_AD_Role (Properties ctx, int AD_Role_ID, String trxName) - { - super (ctx, AD_Role_ID, trxName); - /** if (AD_Role_ID == 0) - { - setAD_Role_ID (0); - setConfirmQueryRecords (0); -// 0 - setIsAccessAllOrgs (false); -// N - setIsCanApproveOwnDoc (false); - setIsCanExport (true); -// Y - setIsCanReport (true); -// Y - setIsChangeLog (false); -// N - setIsManual (false); - setIsPersonalAccess (false); -// N - setIsPersonalLock (false); -// N - setIsShowAcct (false); -// N - setIsUseUserOrgAccess (false); -// N - setMaxQueryRecords (0); -// 0 - setName (null); - setOverwritePriceLimit (false); -// N - setPreferenceType (null); -// O - setUserLevel (null); -// O - } */ - } - - /** Load Constructor */ - public X_AD_Role (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 6 - System - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_AD_Role[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Role. - @param AD_Role_ID - Responsibility Role - */ - public void setAD_Role_ID (int AD_Role_ID) - { - if (AD_Role_ID < 0) - throw new IllegalArgumentException ("AD_Role_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID)); - } - - /** Get Role. - @return Responsibility Role - */ - public int getAD_Role_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** AD_Tree_Menu_ID AD_Reference_ID=184 */ - public static final int AD_TREE_MENU_ID_AD_Reference_ID=184; - /** Set Menu Tree. - @param AD_Tree_Menu_ID - Tree of the menu - */ - public void setAD_Tree_Menu_ID (int AD_Tree_Menu_ID) - { - if (AD_Tree_Menu_ID < 1) - set_Value (COLUMNNAME_AD_Tree_Menu_ID, null); - else - set_Value (COLUMNNAME_AD_Tree_Menu_ID, Integer.valueOf(AD_Tree_Menu_ID)); - } - - /** Get Menu Tree. - @return Tree of the menu - */ - public int getAD_Tree_Menu_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tree_Menu_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** AD_Tree_Org_ID AD_Reference_ID=184 */ - public static final int AD_TREE_ORG_ID_AD_Reference_ID=184; - /** Set Organization Tree. - @param AD_Tree_Org_ID - Tree to determine organizational hierarchy - */ - public void setAD_Tree_Org_ID (int AD_Tree_Org_ID) - { - if (AD_Tree_Org_ID < 1) - set_Value (COLUMNNAME_AD_Tree_Org_ID, null); - else - set_Value (COLUMNNAME_AD_Tree_Org_ID, Integer.valueOf(AD_Tree_Org_ID)); - } - - /** Get Organization Tree. - @return Tree to determine organizational hierarchy - */ - public int getAD_Tree_Org_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tree_Org_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Allow Info Account. - @param Allow_Info_Account Allow Info Account */ - public void setAllow_Info_Account (boolean Allow_Info_Account) - { - set_Value (COLUMNNAME_Allow_Info_Account, Boolean.valueOf(Allow_Info_Account)); - } - - /** Get Allow Info Account. - @return Allow Info Account */ - public boolean isAllow_Info_Account () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_Account); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info Asset. - @param Allow_Info_Asset Allow Info Asset */ - public void setAllow_Info_Asset (boolean Allow_Info_Asset) - { - set_Value (COLUMNNAME_Allow_Info_Asset, Boolean.valueOf(Allow_Info_Asset)); - } - - /** Get Allow Info Asset. - @return Allow Info Asset */ - public boolean isAllow_Info_Asset () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_Asset); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info BPartner. - @param Allow_Info_BPartner Allow Info BPartner */ - public void setAllow_Info_BPartner (boolean Allow_Info_BPartner) - { - set_Value (COLUMNNAME_Allow_Info_BPartner, Boolean.valueOf(Allow_Info_BPartner)); - } - - /** Get Allow Info BPartner. - @return Allow Info BPartner */ - public boolean isAllow_Info_BPartner () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_BPartner); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info CashJournal. - @param Allow_Info_CashJournal Allow Info CashJournal */ - public void setAllow_Info_CashJournal (boolean Allow_Info_CashJournal) - { - set_Value (COLUMNNAME_Allow_Info_CashJournal, Boolean.valueOf(Allow_Info_CashJournal)); - } - - /** Get Allow Info CashJournal. - @return Allow Info CashJournal */ - public boolean isAllow_Info_CashJournal () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_CashJournal); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info InOut. - @param Allow_Info_InOut Allow Info InOut */ - public void setAllow_Info_InOut (boolean Allow_Info_InOut) - { - set_Value (COLUMNNAME_Allow_Info_InOut, Boolean.valueOf(Allow_Info_InOut)); - } - - /** Get Allow Info InOut. - @return Allow Info InOut */ - public boolean isAllow_Info_InOut () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_InOut); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info Invoice. - @param Allow_Info_Invoice Allow Info Invoice */ - public void setAllow_Info_Invoice (boolean Allow_Info_Invoice) - { - set_Value (COLUMNNAME_Allow_Info_Invoice, Boolean.valueOf(Allow_Info_Invoice)); - } - - /** Get Allow Info Invoice. - @return Allow Info Invoice */ - public boolean isAllow_Info_Invoice () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_Invoice); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info Order. - @param Allow_Info_Order Allow Info Order */ - public void setAllow_Info_Order (boolean Allow_Info_Order) - { - set_Value (COLUMNNAME_Allow_Info_Order, Boolean.valueOf(Allow_Info_Order)); - } - - /** Get Allow Info Order. - @return Allow Info Order */ - public boolean isAllow_Info_Order () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_Order); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info Payment. - @param Allow_Info_Payment Allow Info Payment */ - public void setAllow_Info_Payment (boolean Allow_Info_Payment) - { - set_Value (COLUMNNAME_Allow_Info_Payment, Boolean.valueOf(Allow_Info_Payment)); - } - - /** Get Allow Info Payment. - @return Allow Info Payment */ - public boolean isAllow_Info_Payment () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_Payment); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info Product. - @param Allow_Info_Product Allow Info Product */ - public void setAllow_Info_Product (boolean Allow_Info_Product) - { - set_Value (COLUMNNAME_Allow_Info_Product, Boolean.valueOf(Allow_Info_Product)); - } - - /** Get Allow Info Product. - @return Allow Info Product */ - public boolean isAllow_Info_Product () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_Product); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info Resource. - @param Allow_Info_Resource Allow Info Resource */ - public void setAllow_Info_Resource (boolean Allow_Info_Resource) - { - set_Value (COLUMNNAME_Allow_Info_Resource, Boolean.valueOf(Allow_Info_Resource)); - } - - /** Get Allow Info Resource. - @return Allow Info Resource */ - public boolean isAllow_Info_Resource () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_Resource); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Info Schedule. - @param Allow_Info_Schedule Allow Info Schedule */ - public void setAllow_Info_Schedule (boolean Allow_Info_Schedule) - { - set_Value (COLUMNNAME_Allow_Info_Schedule, Boolean.valueOf(Allow_Info_Schedule)); - } - - /** Get Allow Info Schedule. - @return Allow Info Schedule */ - public boolean isAllow_Info_Schedule () - { - Object oo = get_Value(COLUMNNAME_Allow_Info_Schedule); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Approval Amount. - @param AmtApproval - The approval amount limit for this role - */ - public void setAmtApproval (BigDecimal AmtApproval) - { - set_Value (COLUMNNAME_AmtApproval, AmtApproval); - } - - /** Get Approval Amount. - @return The approval amount limit for this role - */ - public BigDecimal getAmtApproval () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AmtApproval); - if (bd == null) - return Env.ZERO; - return bd; - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - set_Value (COLUMNNAME_C_Currency_ID, null); - else - set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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(); - } - - /** Set Confirm Query Records. - @param ConfirmQueryRecords - Require Confirmation if more records will be returned by the query (If not defined 500) - */ - public void setConfirmQueryRecords (int ConfirmQueryRecords) - { - set_Value (COLUMNNAME_ConfirmQueryRecords, Integer.valueOf(ConfirmQueryRecords)); - } - - /** Get Confirm Query Records. - @return Require Confirmation if more records will be returned by the query (If not defined 500) - */ - public int getConfirmQueryRecords () - { - Integer ii = (Integer)get_Value(COLUMNNAME_ConfirmQueryRecords); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** ConnectionProfile AD_Reference_ID=364 */ - public static final int CONNECTIONPROFILE_AD_Reference_ID=364; - /** LAN = L */ - public static final String CONNECTIONPROFILE_LAN = "L"; - /** Terminal Server = T */ - public static final String CONNECTIONPROFILE_TerminalServer = "T"; - /** VPN = V */ - public static final String CONNECTIONPROFILE_VPN = "V"; - /** WAN = W */ - public static final String CONNECTIONPROFILE_WAN = "W"; - /** Set Connection Profile. - @param ConnectionProfile - How a Java Client connects to the server(s) - */ - public void setConnectionProfile (String ConnectionProfile) - { - - if (ConnectionProfile == null || ConnectionProfile.equals("L") || ConnectionProfile.equals("T") || ConnectionProfile.equals("V") || ConnectionProfile.equals("W")); else throw new IllegalArgumentException ("ConnectionProfile Invalid value - " + ConnectionProfile + " - Reference_ID=364 - L - T - V - W"); - if (ConnectionProfile != null && ConnectionProfile.length() > 1) - { - log.warning("Length > 1 - truncated"); - ConnectionProfile = ConnectionProfile.substring(0, 1); - } - set_Value (COLUMNNAME_ConnectionProfile, ConnectionProfile); - } - - /** Get Connection Profile. - @return How a Java Client connects to the server(s) - */ - public String getConnectionProfile () - { - return (String)get_Value(COLUMNNAME_ConnectionProfile); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Access all Orgs. - @param IsAccessAllOrgs - Access all Organizations (no org access control) of the client - */ - public void setIsAccessAllOrgs (boolean IsAccessAllOrgs) - { - set_Value (COLUMNNAME_IsAccessAllOrgs, Boolean.valueOf(IsAccessAllOrgs)); - } - - /** Get Access all Orgs. - @return Access all Organizations (no org access control) of the client - */ - public boolean isAccessAllOrgs () - { - Object oo = get_Value(COLUMNNAME_IsAccessAllOrgs); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Approve own Documents. - @param IsCanApproveOwnDoc - Users with this role can approve their own documents - */ - public void setIsCanApproveOwnDoc (boolean IsCanApproveOwnDoc) - { - set_Value (COLUMNNAME_IsCanApproveOwnDoc, Boolean.valueOf(IsCanApproveOwnDoc)); - } - - /** Get Approve own Documents. - @return Users with this role can approve their own documents - */ - public boolean isCanApproveOwnDoc () - { - Object oo = get_Value(COLUMNNAME_IsCanApproveOwnDoc); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Can Export. - @param IsCanExport - Users with this role can export data - */ - public void setIsCanExport (boolean IsCanExport) - { - set_Value (COLUMNNAME_IsCanExport, Boolean.valueOf(IsCanExport)); - } - - /** Get Can Export. - @return Users with this role can export data - */ - public boolean isCanExport () - { - Object oo = get_Value(COLUMNNAME_IsCanExport); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Can Report. - @param IsCanReport - Users with this role can create reports - */ - public void setIsCanReport (boolean IsCanReport) - { - set_Value (COLUMNNAME_IsCanReport, Boolean.valueOf(IsCanReport)); - } - - /** Get Can Report. - @return Users with this role can create reports - */ - public boolean isCanReport () - { - Object oo = get_Value(COLUMNNAME_IsCanReport); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Maintain Change Log. - @param IsChangeLog - Maintain a log of changes - */ - public void setIsChangeLog (boolean IsChangeLog) - { - set_Value (COLUMNNAME_IsChangeLog, Boolean.valueOf(IsChangeLog)); - } - - /** Get Maintain Change Log. - @return Maintain a log of changes - */ - public boolean isChangeLog () - { - Object oo = get_Value(COLUMNNAME_IsChangeLog); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Manual. - @param IsManual - This is a manual process - */ - public void setIsManual (boolean IsManual) - { - set_Value (COLUMNNAME_IsManual, Boolean.valueOf(IsManual)); - } - - /** Get Manual. - @return This is a manual process - */ - public boolean isManual () - { - Object oo = get_Value(COLUMNNAME_IsManual); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Personal Access. - @param IsPersonalAccess - Allow access to all personal records - */ - public void setIsPersonalAccess (boolean IsPersonalAccess) - { - set_Value (COLUMNNAME_IsPersonalAccess, Boolean.valueOf(IsPersonalAccess)); - } - - /** Get Personal Access. - @return Allow access to all personal records - */ - public boolean isPersonalAccess () - { - Object oo = get_Value(COLUMNNAME_IsPersonalAccess); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Personal Lock. - @param IsPersonalLock - Allow users with role to lock access to personal records - */ - public void setIsPersonalLock (boolean IsPersonalLock) - { - set_Value (COLUMNNAME_IsPersonalLock, Boolean.valueOf(IsPersonalLock)); - } - - /** Get Personal Lock. - @return Allow users with role to lock access to personal records - */ - public boolean isPersonalLock () - { - Object oo = get_Value(COLUMNNAME_IsPersonalLock); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Show Accounting. - @param IsShowAcct - Users with this role can see accounting information - */ - public void setIsShowAcct (boolean IsShowAcct) - { - set_Value (COLUMNNAME_IsShowAcct, Boolean.valueOf(IsShowAcct)); - } - - /** Get Show Accounting. - @return Users with this role can see accounting information - */ - public boolean isShowAcct () - { - Object oo = get_Value(COLUMNNAME_IsShowAcct); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Use User Org Access. - @param IsUseUserOrgAccess - Use Org Access defined by user instead of Role Org Access - */ - public void setIsUseUserOrgAccess (boolean IsUseUserOrgAccess) - { - set_Value (COLUMNNAME_IsUseUserOrgAccess, Boolean.valueOf(IsUseUserOrgAccess)); - } - - /** Get Use User Org Access. - @return Use Org Access defined by user instead of Role Org Access - */ - public boolean isUseUserOrgAccess () - { - Object oo = get_Value(COLUMNNAME_IsUseUserOrgAccess); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Max Query Records. - @param MaxQueryRecords - If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records - */ - public void setMaxQueryRecords (int MaxQueryRecords) - { - set_Value (COLUMNNAME_MaxQueryRecords, Integer.valueOf(MaxQueryRecords)); - } - - /** Get Max Query Records. - @return If defined, you cannot query more records as defined - the query criteria needs to be changed to query less records - */ - public int getMaxQueryRecords () - { - Integer ii = (Integer)get_Value(COLUMNNAME_MaxQueryRecords); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Overwrite Price Limit. - @param OverwritePriceLimit - Overwrite Price Limit if the Price List enforces the Price Limit - */ - public void setOverwritePriceLimit (boolean OverwritePriceLimit) - { - set_Value (COLUMNNAME_OverwritePriceLimit, Boolean.valueOf(OverwritePriceLimit)); - } - - /** Get Overwrite Price Limit. - @return Overwrite Price Limit if the Price List enforces the Price Limit - */ - public boolean isOverwritePriceLimit () - { - Object oo = get_Value(COLUMNNAME_OverwritePriceLimit); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** PreferenceType AD_Reference_ID=330 */ - public static final int PREFERENCETYPE_AD_Reference_ID=330; - /** Client = C */ - public static final String PREFERENCETYPE_Client = "C"; - /** Organization = O */ - public static final String PREFERENCETYPE_Organization = "O"; - /** User = U */ - public static final String PREFERENCETYPE_User = "U"; - /** None = N */ - public static final String PREFERENCETYPE_None = "N"; - /** Set Preference Level. - @param PreferenceType - Determines what preferences the user can set - */ - public void setPreferenceType (String PreferenceType) - { - if (PreferenceType == null) throw new IllegalArgumentException ("PreferenceType is mandatory"); - if (PreferenceType.equals("C") || PreferenceType.equals("O") || PreferenceType.equals("U") || PreferenceType.equals("N")); else throw new IllegalArgumentException ("PreferenceType Invalid value - " + PreferenceType + " - Reference_ID=330 - C - O - U - N"); - if (PreferenceType.length() > 1) - { - log.warning("Length > 1 - truncated"); - PreferenceType = PreferenceType.substring(0, 1); - } - set_Value (COLUMNNAME_PreferenceType, PreferenceType); - } - - /** Get Preference Level. - @return Determines what preferences the user can set - */ - public String getPreferenceType () - { - return (String)get_Value(COLUMNNAME_PreferenceType); - } - - /** Supervisor_ID AD_Reference_ID=286 */ - public static final int SUPERVISOR_ID_AD_Reference_ID=286; - /** Set Supervisor. - @param Supervisor_ID - Supervisor for this user/organization - used for escalation and approval - */ - public void setSupervisor_ID (int Supervisor_ID) - { - if (Supervisor_ID < 1) - set_Value (COLUMNNAME_Supervisor_ID, null); - else - set_Value (COLUMNNAME_Supervisor_ID, Integer.valueOf(Supervisor_ID)); - } - - /** Get Supervisor. - @return Supervisor for this user/organization - used for escalation and approval - */ - public int getSupervisor_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Supervisor_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set UserDiscount. - @param UserDiscount UserDiscount */ - public void setUserDiscount (BigDecimal UserDiscount) - { - set_Value (COLUMNNAME_UserDiscount, UserDiscount); - } - - /** Get UserDiscount. - @return UserDiscount */ - public BigDecimal getUserDiscount () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_UserDiscount); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** UserLevel AD_Reference_ID=226 */ - public static final int USERLEVEL_AD_Reference_ID=226; - /** System = S */ - public static final String USERLEVEL_System = "S "; - /** Client = C */ - public static final String USERLEVEL_Client = " C "; - /** Organization = O */ - public static final String USERLEVEL_Organization = " O"; - /** Client+Organization = CO */ - public static final String USERLEVEL_ClientPlusOrganization = " CO"; - /** Set User Level. - @param UserLevel - System Client Organization - */ - public void setUserLevel (String UserLevel) - { - if (UserLevel == null) throw new IllegalArgumentException ("UserLevel is mandatory"); - if (UserLevel.equals("S ") || UserLevel.equals(" C ") || UserLevel.equals(" O") || UserLevel.equals(" CO")); else throw new IllegalArgumentException ("UserLevel Invalid value - " + UserLevel + " - Reference_ID=226 - S - C - O - CO"); - if (UserLevel.length() > 3) - { - log.warning("Length > 3 - truncated"); - UserLevel = UserLevel.substring(0, 3); - } - set_Value (COLUMNNAME_UserLevel, UserLevel); - } - - /** Get User Level. - @return System Client Organization - */ - public String getUserLevel () - { - return (String)get_Value(COLUMNNAME_UserLevel); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_Role_OrgAccess.java b/base/src/org/compiere/model/X_AD_Role_OrgAccess.java index 0638fe6e27..82d0fc3728 100644 --- a/base/src/org/compiere/model/X_AD_Role_OrgAccess.java +++ b/base/src/org/compiere/model/X_AD_Role_OrgAccess.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Role_OrgAccess * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Role_OrgAccess extends PO implements I_AD_Role_OrgAccess, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Rule.java b/base/src/org/compiere/model/X_AD_Rule.java index c5e04990b3..8dddf76501 100644 --- a/base/src/org/compiere/model/X_AD_Rule.java +++ b/base/src/org/compiere/model/X_AD_Rule.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Rule * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Rule extends PO implements I_AD_Rule, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Scheduler.java b/base/src/org/compiere/model/X_AD_Scheduler.java index 5fe4e880d1..156a15f716 100644 --- a/base/src/org/compiere/model/X_AD_Scheduler.java +++ b/base/src/org/compiere/model/X_AD_Scheduler.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Scheduler * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_SchedulerLog.java b/base/src/org/compiere/model/X_AD_SchedulerLog.java index 581d9214c1..da2e1ad8fc 100644 --- a/base/src/org/compiere/model/X_AD_SchedulerLog.java +++ b/base/src/org/compiere/model/X_AD_SchedulerLog.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_SchedulerLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_SchedulerLog extends PO implements I_AD_SchedulerLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_SchedulerRecipient.java b/base/src/org/compiere/model/X_AD_SchedulerRecipient.java index fe5fd0e2c6..0aac1c7d71 100644 --- a/base/src/org/compiere/model/X_AD_SchedulerRecipient.java +++ b/base/src/org/compiere/model/X_AD_SchedulerRecipient.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_SchedulerRecipient * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_SchedulerRecipient extends PO implements I_AD_SchedulerRecipient, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Scheduler_Para.java b/base/src/org/compiere/model/X_AD_Scheduler_Para.java index f7bc4a9f2a..2566e8eb83 100644 --- a/base/src/org/compiere/model/X_AD_Scheduler_Para.java +++ b/base/src/org/compiere/model/X_AD_Scheduler_Para.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Scheduler_Para * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Scheduler_Para extends PO implements I_AD_Scheduler_Para, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Sequence.java b/base/src/org/compiere/model/X_AD_Sequence.java index 8f457f7083..763eadabe3 100644 --- a/base/src/org/compiere/model/X_AD_Sequence.java +++ b/base/src/org/compiere/model/X_AD_Sequence.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Sequence * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Sequence extends PO implements I_AD_Sequence, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Sequence_Audit.java b/base/src/org/compiere/model/X_AD_Sequence_Audit.java index 2b296d17f5..c3c2c33424 100644 --- a/base/src/org/compiere/model/X_AD_Sequence_Audit.java +++ b/base/src/org/compiere/model/X_AD_Sequence_Audit.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Sequence_Audit * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Sequence_Audit extends PO implements I_AD_Sequence_Audit, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Sequence_No.java b/base/src/org/compiere/model/X_AD_Sequence_No.java index c8a5e51fed..26627d81c1 100644 --- a/base/src/org/compiere/model/X_AD_Sequence_No.java +++ b/base/src/org/compiere/model/X_AD_Sequence_No.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Sequence_No * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Sequence_No extends PO implements I_AD_Sequence_No, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Session.java b/base/src/org/compiere/model/X_AD_Session.java index 3833a8c4f7..92c304e8ee 100644 --- a/base/src/org/compiere/model/X_AD_Session.java +++ b/base/src/org/compiere/model/X_AD_Session.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Session * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Session extends PO implements I_AD_Session, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_System.java b/base/src/org/compiere/model/X_AD_System.java index 6298705f87..5087e680d2 100644 --- a/base/src/org/compiere/model/X_AD_System.java +++ b/base/src/org/compiere/model/X_AD_System.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_System * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_System extends PO implements I_AD_System, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Tab.java b/base/src/org/compiere/model/X_AD_Tab.java index fc05d799db..9016708820 100644 --- a/base/src/org/compiere/model/X_AD_Tab.java +++ b/base/src/org/compiere/model/X_AD_Tab.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Tab * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Tab extends PO implements I_AD_Tab, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Table.java b/base/src/org/compiere/model/X_AD_Table.java index 7abd296617..e1e03030ae 100644 --- a/base/src/org/compiere/model/X_AD_Table.java +++ b/base/src/org/compiere/model/X_AD_Table.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Table * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Table extends PO implements I_AD_Table, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Table_Access.java b/base/src/org/compiere/model/X_AD_Table_Access.java index c24687891d..f1b47f41e7 100644 --- a/base/src/org/compiere/model/X_AD_Table_Access.java +++ b/base/src/org/compiere/model/X_AD_Table_Access.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Table_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Table_Access extends PO implements I_AD_Table_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Table_ScriptValidator.java b/base/src/org/compiere/model/X_AD_Table_ScriptValidator.java deleted file mode 100644 index 1297a16674..0000000000 --- a/base/src/org/compiere/model/X_AD_Table_ScriptValidator.java +++ /dev/null @@ -1,266 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.KeyNamePair; - -/** Generated Model for AD_Table_ScriptValidator - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_AD_Table_ScriptValidator extends PO implements I_AD_Table_ScriptValidator, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_AD_Table_ScriptValidator (Properties ctx, int AD_Table_ScriptValidator_ID, String trxName) - { - super (ctx, AD_Table_ScriptValidator_ID, trxName); - /** if (AD_Table_ScriptValidator_ID == 0) - { - setAD_Rule_ID (0); - setAD_Table_ID (0); - setAD_Table_ScriptValidator_ID (0); - setEventModelValidator (null); - setSeqNo (0); -// 0 - } */ - } - - /** Load Constructor */ - public X_AD_Table_ScriptValidator (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 4 - System - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_AD_Table_ScriptValidator[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_AD_Rule getAD_Rule() throws Exception - { - Class clazz = MTable.getClass(I_AD_Rule.Table_Name); - I_AD_Rule result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_Rule)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Rule_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Rule. - @param AD_Rule_ID Rule */ - public void setAD_Rule_ID (int AD_Rule_ID) - { - if (AD_Rule_ID < 1) - throw new IllegalArgumentException ("AD_Rule_ID is mandatory."); - set_Value (COLUMNNAME_AD_Rule_ID, Integer.valueOf(AD_Rule_ID)); - } - - /** Get Rule. - @return Rule */ - public int getAD_Rule_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_Rule_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_AD_Table getAD_Table() throws Exception - { - Class clazz = MTable.getClass(I_AD_Table.Table_Name); - I_AD_Table result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_Table)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Table_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Table. - @param AD_Table_ID - Database Table information - */ - public void setAD_Table_ID (int AD_Table_ID) - { - if (AD_Table_ID < 1) - throw new IllegalArgumentException ("AD_Table_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID)); - } - - /** Get Table. - @return Database Table information - */ - public int getAD_Table_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Table Script Validator. - @param AD_Table_ScriptValidator_ID Table Script Validator */ - public void setAD_Table_ScriptValidator_ID (int AD_Table_ScriptValidator_ID) - { - if (AD_Table_ScriptValidator_ID < 1) - throw new IllegalArgumentException ("AD_Table_ScriptValidator_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_Table_ScriptValidator_ID, Integer.valueOf(AD_Table_ScriptValidator_ID)); - } - - /** Get Table Script Validator. - @return Table Script Validator */ - public int getAD_Table_ScriptValidator_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ScriptValidator_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** EventModelValidator AD_Reference_ID=53237 */ - public static final int EVENTMODELVALIDATOR_AD_Reference_ID=53237; - /** Table Before New = TBN */ - public static final String EVENTMODELVALIDATOR_TableBeforeNew = "TBN"; - /** Table Before Change = TBC */ - public static final String EVENTMODELVALIDATOR_TableBeforeChange = "TBC"; - /** Table Before Delete = TBD */ - public static final String EVENTMODELVALIDATOR_TableBeforeDelete = "TBD"; - /** Table After New = TAN */ - public static final String EVENTMODELVALIDATOR_TableAfterNew = "TAN"; - /** Table After Change = TAC */ - public static final String EVENTMODELVALIDATOR_TableAfterChange = "TAC"; - /** Table After Delete = TAD */ - public static final String EVENTMODELVALIDATOR_TableAfterDelete = "TAD"; - /** Document Before Prepare = DBPR */ - public static final String EVENTMODELVALIDATOR_DocumentBeforePrepare = "DBPR"; - /** Document Before Void = DBVO */ - public static final String EVENTMODELVALIDATOR_DocumentBeforeVoid = "DBVO"; - /** Document Before Close = DBCL */ - public static final String EVENTMODELVALIDATOR_DocumentBeforeClose = "DBCL"; - /** Document Before Reactivate = DBAC */ - public static final String EVENTMODELVALIDATOR_DocumentBeforeReactivate = "DBAC"; - /** Document Before Reverse Correct = DBRC */ - public static final String EVENTMODELVALIDATOR_DocumentBeforeReverseCorrect = "DBRC"; - /** Document Before Reverse Accrual = DBRA */ - public static final String EVENTMODELVALIDATOR_DocumentBeforeReverseAccrual = "DBRA"; - /** Document Before Complete = DBCO */ - public static final String EVENTMODELVALIDATOR_DocumentBeforeComplete = "DBCO"; - /** Document Before Post = DBPO */ - public static final String EVENTMODELVALIDATOR_DocumentBeforePost = "DBPO"; - /** Document After Prepare = DAPR */ - public static final String EVENTMODELVALIDATOR_DocumentAfterPrepare = "DAPR"; - /** Document After Void = DAVO */ - public static final String EVENTMODELVALIDATOR_DocumentAfterVoid = "DAVO"; - /** Document After Close = DACL */ - public static final String EVENTMODELVALIDATOR_DocumentAfterClose = "DACL"; - /** Document After Reactivate = DAAC */ - public static final String EVENTMODELVALIDATOR_DocumentAfterReactivate = "DAAC"; - /** Document After Reverse Correct = DARC */ - public static final String EVENTMODELVALIDATOR_DocumentAfterReverseCorrect = "DARC"; - /** Document After Reverse Accrual = DARA */ - public static final String EVENTMODELVALIDATOR_DocumentAfterReverseAccrual = "DARA"; - /** Document After Complete = DACO */ - public static final String EVENTMODELVALIDATOR_DocumentAfterComplete = "DACO"; - /** Document After Post = DAPO */ - public static final String EVENTMODELVALIDATOR_DocumentAfterPost = "DAPO"; - /** Set Event Model Validator. - @param EventModelValidator Event Model Validator */ - public void setEventModelValidator (String EventModelValidator) - { - if (EventModelValidator == null) throw new IllegalArgumentException ("EventModelValidator is mandatory"); - if (EventModelValidator.equals("TBN") || EventModelValidator.equals("TBC") || EventModelValidator.equals("TBD") || EventModelValidator.equals("TAN") || EventModelValidator.equals("TAC") || EventModelValidator.equals("TAD") || EventModelValidator.equals("DBPR") || EventModelValidator.equals("DBVO") || EventModelValidator.equals("DBCL") || EventModelValidator.equals("DBAC") || EventModelValidator.equals("DBRC") || EventModelValidator.equals("DBRA") || EventModelValidator.equals("DBCO") || EventModelValidator.equals("DBPO") || EventModelValidator.equals("DAPR") || EventModelValidator.equals("DAVO") || EventModelValidator.equals("DACL") || EventModelValidator.equals("DAAC") || EventModelValidator.equals("DARC") || EventModelValidator.equals("DARA") || EventModelValidator.equals("DACO") || EventModelValidator.equals("DAPO")); else throw new IllegalArgumentException ("EventModelValidator Invalid value - " + EventModelValidator + " - Reference_ID=53237 - TBN - TBC - TBD - TAN - TAC - TAD - DBPR - DBVO - DBCL - DBAC - DBRC - DBRA - DBCO - DBPO - DAPR - DAVO - DACL - DAAC - DARC - DARA - DACO - DAPO"); - if (EventModelValidator.length() > 4) - { - log.warning("Length > 4 - truncated"); - EventModelValidator = EventModelValidator.substring(0, 4); - } - set_Value (COLUMNNAME_EventModelValidator, EventModelValidator); - } - - /** Get Event Model Validator. - @return Event Model Validator */ - public String getEventModelValidator () - { - return (String)get_Value(COLUMNNAME_EventModelValidator); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getEventModelValidator())); - } - - /** Set Sequence. - @param SeqNo - Method of ordering records; lowest number comes first - */ - public void setSeqNo (int SeqNo) - { - set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); - } - - /** Get Sequence. - @return Method of ordering records; lowest number comes first - */ - public int getSeqNo () - { - Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); - if (ii == null) - return 0; - return ii.intValue(); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_Task.java b/base/src/org/compiere/model/X_AD_Task.java index f6b65626fe..a834491d71 100644 --- a/base/src/org/compiere/model/X_AD_Task.java +++ b/base/src/org/compiere/model/X_AD_Task.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Task * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Task extends PO implements I_AD_Task, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TaskInstance.java b/base/src/org/compiere/model/X_AD_TaskInstance.java index a2d2770b54..e8c2891c99 100644 --- a/base/src/org/compiere/model/X_AD_TaskInstance.java +++ b/base/src/org/compiere/model/X_AD_TaskInstance.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_TaskInstance * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TaskInstance extends PO implements I_AD_TaskInstance, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Task_Access.java b/base/src/org/compiere/model/X_AD_Task_Access.java index 93c47f07e6..bc35aeb23a 100644 --- a/base/src/org/compiere/model/X_AD_Task_Access.java +++ b/base/src/org/compiere/model/X_AD_Task_Access.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Task_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Task_Access extends PO implements I_AD_Task_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Tree.java b/base/src/org/compiere/model/X_AD_Tree.java index b8958adcd0..bb03b741ef 100644 --- a/base/src/org/compiere/model/X_AD_Tree.java +++ b/base/src/org/compiere/model/X_AD_Tree.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Tree * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Tree extends PO implements I_AD_Tree, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeBar.java b/base/src/org/compiere/model/X_AD_TreeBar.java index a4fae01b06..a986ab2263 100644 --- a/base/src/org/compiere/model/X_AD_TreeBar.java +++ b/base/src/org/compiere/model/X_AD_TreeBar.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_TreeBar * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeBar extends PO implements I_AD_TreeBar, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNode.java b/base/src/org/compiere/model/X_AD_TreeNode.java index fd77adae57..a8b665bd3f 100644 --- a/base/src/org/compiere/model/X_AD_TreeNode.java +++ b/base/src/org/compiere/model/X_AD_TreeNode.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNode * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNode extends PO implements I_AD_TreeNode, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeBP.java b/base/src/org/compiere/model/X_AD_TreeNodeBP.java index 758234a4d7..4c76ae43ac 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeBP.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeBP.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeBP * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeBP extends PO implements I_AD_TreeNodeBP, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeCMC.java b/base/src/org/compiere/model/X_AD_TreeNodeCMC.java index a475b92a00..7f2d517920 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeCMC.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeCMC.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeCMC * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeCMC extends PO implements I_AD_TreeNodeCMC, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeCMM.java b/base/src/org/compiere/model/X_AD_TreeNodeCMM.java index 8a4d56f1b0..412da0e92c 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeCMM.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeCMM.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeCMM * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeCMM extends PO implements I_AD_TreeNodeCMM, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeCMS.java b/base/src/org/compiere/model/X_AD_TreeNodeCMS.java index c6ec93b471..51ce1d06f3 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeCMS.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeCMS.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeCMS * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeCMS extends PO implements I_AD_TreeNodeCMS, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeCMT.java b/base/src/org/compiere/model/X_AD_TreeNodeCMT.java index 028882bc11..bb88e48ce8 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeCMT.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeCMT.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeCMT * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeCMT extends PO implements I_AD_TreeNodeCMT, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeMM.java b/base/src/org/compiere/model/X_AD_TreeNodeMM.java index 1ec4ccf8c2..03c0b10423 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeMM.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeMM.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeMM * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeMM extends PO implements I_AD_TreeNodeMM, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodePR.java b/base/src/org/compiere/model/X_AD_TreeNodePR.java index 11b11fda6f..adf81a1c11 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodePR.java +++ b/base/src/org/compiere/model/X_AD_TreeNodePR.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodePR * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodePR extends PO implements I_AD_TreeNodePR, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeU1.java b/base/src/org/compiere/model/X_AD_TreeNodeU1.java index 7db431ef51..2f35ecea23 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeU1.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeU1.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeU1 * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeU1 extends PO implements I_AD_TreeNodeU1, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeU2.java b/base/src/org/compiere/model/X_AD_TreeNodeU2.java index d5c825166d..fcb4d22946 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeU2.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeU2.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeU2 * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeU2 extends PO implements I_AD_TreeNodeU2, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeU3.java b/base/src/org/compiere/model/X_AD_TreeNodeU3.java index d2447de43c..a3ffb27171 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeU3.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeU3.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeU3 * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeU3 extends PO implements I_AD_TreeNodeU3, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_TreeNodeU4.java b/base/src/org/compiere/model/X_AD_TreeNodeU4.java index 57b753f78c..cd434e6ac2 100644 --- a/base/src/org/compiere/model/X_AD_TreeNodeU4.java +++ b/base/src/org/compiere/model/X_AD_TreeNodeU4.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_TreeNodeU4 * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_TreeNodeU4 extends PO implements I_AD_TreeNodeU4, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_User.java b/base/src/org/compiere/model/X_AD_User.java index a9c262e37d..365fcfea72 100644 --- a/base/src/org/compiere/model/X_AD_User.java +++ b/base/src/org/compiere/model/X_AD_User.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_User * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_User extends PO implements I_AD_User, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_UserBPAccess.java b/base/src/org/compiere/model/X_AD_UserBPAccess.java deleted file mode 100644 index 552a07cbb1..0000000000 --- a/base/src/org/compiere/model/X_AD_UserBPAccess.java +++ /dev/null @@ -1,278 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; - -/** Generated Model for AD_UserBPAccess - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_AD_UserBPAccess extends PO implements I_AD_UserBPAccess, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_AD_UserBPAccess (Properties ctx, int AD_UserBPAccess_ID, String trxName) - { - super (ctx, AD_UserBPAccess_ID, trxName); - /** if (AD_UserBPAccess_ID == 0) - { - setAD_UserBPAccess_ID (0); - setAD_User_ID (0); - setBPAccessType (null); - } */ - } - - /** Load Constructor */ - public X_AD_UserBPAccess (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_AD_UserBPAccess[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set User BP Access. - @param AD_UserBPAccess_ID - User/concat access to Business Partner information and resources - */ - public void setAD_UserBPAccess_ID (int AD_UserBPAccess_ID) - { - if (AD_UserBPAccess_ID < 1) - throw new IllegalArgumentException ("AD_UserBPAccess_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_UserBPAccess_ID, Integer.valueOf(AD_UserBPAccess_ID)); - } - - /** Get User BP Access. - @return User/concat access to Business Partner information and resources - */ - public int getAD_UserBPAccess_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_UserBPAccess_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_AD_User getAD_User() throws Exception - { - Class clazz = MTable.getClass(I_AD_User.Table_Name); - I_AD_User result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID < 1) - throw new IllegalArgumentException ("AD_User_ID is mandatory."); - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** BPAccessType AD_Reference_ID=358 */ - public static final int BPACCESSTYPE_AD_Reference_ID=358; - /** Business Documents = B */ - public static final String BPACCESSTYPE_BusinessDocuments = "B"; - /** Requests = R */ - public static final String BPACCESSTYPE_Requests = "R"; - /** Assets, Download = A */ - public static final String BPACCESSTYPE_AssetsDownload = "A"; - /** Set Access Type. - @param BPAccessType - Type of Access of the user/contact to Business Partner information and resources - */ - public void setBPAccessType (String BPAccessType) - { - if (BPAccessType == null) throw new IllegalArgumentException ("BPAccessType is mandatory"); - if (BPAccessType.equals("B") || BPAccessType.equals("R") || BPAccessType.equals("A")); else throw new IllegalArgumentException ("BPAccessType Invalid value - " + BPAccessType + " - Reference_ID=358 - B - R - A"); - if (BPAccessType.length() > 1) - { - log.warning("Length > 1 - truncated"); - BPAccessType = BPAccessType.substring(0, 1); - } - set_Value (COLUMNNAME_BPAccessType, BPAccessType); - } - - /** Get Access Type. - @return Type of Access of the user/contact to Business Partner information and resources - */ - public String getBPAccessType () - { - return (String)get_Value(COLUMNNAME_BPAccessType); - } - - /** DocBaseType AD_Reference_ID=183 */ - public static final int DOCBASETYPE_AD_Reference_ID=183; - /** GL Journal = GLJ */ - public static final String DOCBASETYPE_GLJournal = "GLJ"; - /** GL Document = GLD */ - public static final String DOCBASETYPE_GLDocument = "GLD"; - /** AP Invoice = API */ - public static final String DOCBASETYPE_APInvoice = "API"; - /** AP Payment = APP */ - public static final String DOCBASETYPE_APPayment = "APP"; - /** AR Invoice = ARI */ - public static final String DOCBASETYPE_ARInvoice = "ARI"; - /** AR Receipt = ARR */ - public static final String DOCBASETYPE_ARReceipt = "ARR"; - /** Sales Order = SOO */ - public static final String DOCBASETYPE_SalesOrder = "SOO"; - /** AR Pro Forma Invoice = ARF */ - public static final String DOCBASETYPE_ARProFormaInvoice = "ARF"; - /** Material Delivery = MMS */ - public static final String DOCBASETYPE_MaterialDelivery = "MMS"; - /** Material Receipt = MMR */ - public static final String DOCBASETYPE_MaterialReceipt = "MMR"; - /** Material Movement = MMM */ - public static final String DOCBASETYPE_MaterialMovement = "MMM"; - /** Purchase Order = POO */ - public static final String DOCBASETYPE_PurchaseOrder = "POO"; - /** Purchase Requisition = POR */ - public static final String DOCBASETYPE_PurchaseRequisition = "POR"; - /** Material Physical Inventory = MMI */ - public static final String DOCBASETYPE_MaterialPhysicalInventory = "MMI"; - /** AP Credit Memo = APC */ - public static final String DOCBASETYPE_APCreditMemo = "APC"; - /** AR Credit Memo = ARC */ - public static final String DOCBASETYPE_ARCreditMemo = "ARC"; - /** Bank Statement = CMB */ - public static final String DOCBASETYPE_BankStatement = "CMB"; - /** Cash Journal = CMC */ - public static final String DOCBASETYPE_CashJournal = "CMC"; - /** Payment Allocation = CMA */ - public static final String DOCBASETYPE_PaymentAllocation = "CMA"; - /** Material Production = MMP */ - public static final String DOCBASETYPE_MaterialProduction = "MMP"; - /** Match Invoice = MXI */ - public static final String DOCBASETYPE_MatchInvoice = "MXI"; - /** Match PO = MXP */ - public static final String DOCBASETYPE_MatchPO = "MXP"; - /** Project Issue = PJI */ - public static final String DOCBASETYPE_ProjectIssue = "PJI"; - /** Set Document BaseType. - @param DocBaseType - Logical type of document - */ - public void setDocBaseType (String DocBaseType) - { - - if (DocBaseType == null || DocBaseType.equals("GLJ") || DocBaseType.equals("GLD") || DocBaseType.equals("API") || DocBaseType.equals("APP") || DocBaseType.equals("ARI") || DocBaseType.equals("ARR") || DocBaseType.equals("SOO") || DocBaseType.equals("ARF") || DocBaseType.equals("MMS") || DocBaseType.equals("MMR") || DocBaseType.equals("MMM") || DocBaseType.equals("POO") || DocBaseType.equals("POR") || DocBaseType.equals("MMI") || DocBaseType.equals("APC") || DocBaseType.equals("ARC") || DocBaseType.equals("CMB") || DocBaseType.equals("CMC") || DocBaseType.equals("CMA") || DocBaseType.equals("MMP") || DocBaseType.equals("MXI") || DocBaseType.equals("MXP") || DocBaseType.equals("PJI")); else throw new IllegalArgumentException ("DocBaseType Invalid value - " + DocBaseType + " - Reference_ID=183 - GLJ - GLD - API - APP - ARI - ARR - SOO - ARF - MMS - MMR - MMM - POO - POR - MMI - APC - ARC - CMB - CMC - CMA - MMP - MXI - MXP - PJI"); - if (DocBaseType != null && DocBaseType.length() > 10) - { - log.warning("Length > 10 - truncated"); - DocBaseType = DocBaseType.substring(0, 10); - } - set_Value (COLUMNNAME_DocBaseType, DocBaseType); - } - - /** Get Document BaseType. - @return Logical type of document - */ - public String getDocBaseType () - { - return (String)get_Value(COLUMNNAME_DocBaseType); - } - - public I_R_RequestType getR_RequestType() throws Exception - { - Class clazz = MTable.getClass(I_R_RequestType.Table_Name); - I_R_RequestType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_RequestType)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_RequestType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Request Type. - @param R_RequestType_ID - Type of request (e.g. Inquiry, Complaint, ..) - */ - public void setR_RequestType_ID (int R_RequestType_ID) - { - if (R_RequestType_ID < 1) - set_Value (COLUMNNAME_R_RequestType_ID, null); - else - set_Value (COLUMNNAME_R_RequestType_ID, Integer.valueOf(R_RequestType_ID)); - } - - /** Get Request Type. - @return Type of request (e.g. Inquiry, Complaint, ..) - */ - public int getR_RequestType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_RequestType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_UserDef_Field.java b/base/src/org/compiere/model/X_AD_UserDef_Field.java index 5be0751309..f5a9961efd 100644 --- a/base/src/org/compiere/model/X_AD_UserDef_Field.java +++ b/base/src/org/compiere/model/X_AD_UserDef_Field.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_UserDef_Field * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_UserDef_Tab.java b/base/src/org/compiere/model/X_AD_UserDef_Tab.java index d623a94dfd..786befc1ce 100644 --- a/base/src/org/compiere/model/X_AD_UserDef_Tab.java +++ b/base/src/org/compiere/model/X_AD_UserDef_Tab.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_UserDef_Tab * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_UserDef_Tab extends PO implements I_AD_UserDef_Tab, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_UserDef_Win.java b/base/src/org/compiere/model/X_AD_UserDef_Win.java index 88346200c4..4428811967 100644 --- a/base/src/org/compiere/model/X_AD_UserDef_Win.java +++ b/base/src/org/compiere/model/X_AD_UserDef_Win.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_UserDef_Win * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_UserDef_Win extends PO implements I_AD_UserDef_Win, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_UserMail.java b/base/src/org/compiere/model/X_AD_UserMail.java index bec3ab7cbc..2d71074a93 100644 --- a/base/src/org/compiere/model/X_AD_UserMail.java +++ b/base/src/org/compiere/model/X_AD_UserMail.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_UserMail * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_UserMail extends PO implements I_AD_UserMail, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_UserQuery.java b/base/src/org/compiere/model/X_AD_UserQuery.java index 55aca86b2f..c499d7a546 100644 --- a/base/src/org/compiere/model/X_AD_UserQuery.java +++ b/base/src/org/compiere/model/X_AD_UserQuery.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_UserQuery * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_UserQuery extends PO implements I_AD_UserQuery, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_User_OrgAccess.java b/base/src/org/compiere/model/X_AD_User_OrgAccess.java index 1c96e61a34..f5a3cec588 100644 --- a/base/src/org/compiere/model/X_AD_User_OrgAccess.java +++ b/base/src/org/compiere/model/X_AD_User_OrgAccess.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_User_OrgAccess * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_User_OrgAccess extends PO implements I_AD_User_OrgAccess, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_User_Roles.java b/base/src/org/compiere/model/X_AD_User_Roles.java index baec49aec4..9dad71ee52 100644 --- a/base/src/org/compiere/model/X_AD_User_Roles.java +++ b/base/src/org/compiere/model/X_AD_User_Roles.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_User_Roles * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_User_Roles extends PO implements I_AD_User_Roles, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_User_Substitute.java b/base/src/org/compiere/model/X_AD_User_Substitute.java index bdfdd80ad5..a735524b80 100644 --- a/base/src/org/compiere/model/X_AD_User_Substitute.java +++ b/base/src/org/compiere/model/X_AD_User_Substitute.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_User_Substitute * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_User_Substitute extends PO implements I_AD_User_Substitute, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Val_Rule.java b/base/src/org/compiere/model/X_AD_Val_Rule.java index 559638996b..016c4e9341 100644 --- a/base/src/org/compiere/model/X_AD_Val_Rule.java +++ b/base/src/org/compiere/model/X_AD_Val_Rule.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Val_Rule * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Val_Rule extends PO implements I_AD_Val_Rule, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_Activity.java b/base/src/org/compiere/model/X_AD_WF_Activity.java index 81e2700af2..b2a5ef7123 100644 --- a/base/src/org/compiere/model/X_AD_WF_Activity.java +++ b/base/src/org/compiere/model/X_AD_WF_Activity.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_Activity * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_Activity extends PO implements I_AD_WF_Activity, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_ActivityResult.java b/base/src/org/compiere/model/X_AD_WF_ActivityResult.java index 23c507ffb7..7d1dd6af92 100644 --- a/base/src/org/compiere/model/X_AD_WF_ActivityResult.java +++ b/base/src/org/compiere/model/X_AD_WF_ActivityResult.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_ActivityResult * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_ActivityResult extends PO implements I_AD_WF_ActivityResult, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_Block.java b/base/src/org/compiere/model/X_AD_WF_Block.java index c33ef8e6f6..e35466ad43 100644 --- a/base/src/org/compiere/model/X_AD_WF_Block.java +++ b/base/src/org/compiere/model/X_AD_WF_Block.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_Block * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_Block extends PO implements I_AD_WF_Block, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_EventAudit.java b/base/src/org/compiere/model/X_AD_WF_EventAudit.java index 50f27d269e..e51375c76c 100644 --- a/base/src/org/compiere/model/X_AD_WF_EventAudit.java +++ b/base/src/org/compiere/model/X_AD_WF_EventAudit.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_EventAudit * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_EventAudit extends PO implements I_AD_WF_EventAudit, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_NextCondition.java b/base/src/org/compiere/model/X_AD_WF_NextCondition.java index 9af935f6ab..bfd051f341 100644 --- a/base/src/org/compiere/model/X_AD_WF_NextCondition.java +++ b/base/src/org/compiere/model/X_AD_WF_NextCondition.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_NextCondition * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_NextCondition extends PO implements I_AD_WF_NextCondition, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_NodeNext.java b/base/src/org/compiere/model/X_AD_WF_NodeNext.java index ee78834e31..23b020065c 100644 --- a/base/src/org/compiere/model/X_AD_WF_NodeNext.java +++ b/base/src/org/compiere/model/X_AD_WF_NodeNext.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_NodeNext * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_NodeNext extends PO implements I_AD_WF_NodeNext, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_Node_Para.java b/base/src/org/compiere/model/X_AD_WF_Node_Para.java index 323bd7beca..c5e30d2b23 100644 --- a/base/src/org/compiere/model/X_AD_WF_Node_Para.java +++ b/base/src/org/compiere/model/X_AD_WF_Node_Para.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_Node_Para * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_Node_Para extends PO implements I_AD_WF_Node_Para, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_Process.java b/base/src/org/compiere/model/X_AD_WF_Process.java index 7f4aabd312..ee3587085c 100644 --- a/base/src/org/compiere/model/X_AD_WF_Process.java +++ b/base/src/org/compiere/model/X_AD_WF_Process.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_Process * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_Process extends PO implements I_AD_WF_Process, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_ProcessData.java b/base/src/org/compiere/model/X_AD_WF_ProcessData.java index e8aa8f2a40..ae62d25ec9 100644 --- a/base/src/org/compiere/model/X_AD_WF_ProcessData.java +++ b/base/src/org/compiere/model/X_AD_WF_ProcessData.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_ProcessData * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_ProcessData extends PO implements I_AD_WF_ProcessData, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WF_Responsible.java b/base/src/org/compiere/model/X_AD_WF_Responsible.java index 38701c9a32..1b9f2b0e2d 100644 --- a/base/src/org/compiere/model/X_AD_WF_Responsible.java +++ b/base/src/org/compiere/model/X_AD_WF_Responsible.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WF_Responsible * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WF_Responsible extends PO implements I_AD_WF_Responsible, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Window.java b/base/src/org/compiere/model/X_AD_Window.java index f4dac48a7a..6c31786419 100644 --- a/base/src/org/compiere/model/X_AD_Window.java +++ b/base/src/org/compiere/model/X_AD_Window.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Window * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Window extends PO implements I_AD_Window, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Window_Access.java b/base/src/org/compiere/model/X_AD_Window_Access.java index 42cc76a199..39b2394a19 100644 --- a/base/src/org/compiere/model/X_AD_Window_Access.java +++ b/base/src/org/compiere/model/X_AD_Window_Access.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Window_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Window_Access extends PO implements I_AD_Window_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Workbench.java b/base/src/org/compiere/model/X_AD_Workbench.java index d8ea72d17e..5ed4b6037f 100644 --- a/base/src/org/compiere/model/X_AD_Workbench.java +++ b/base/src/org/compiere/model/X_AD_Workbench.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_Workbench * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Workbench extends PO implements I_AD_Workbench, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WorkbenchWindow.java b/base/src/org/compiere/model/X_AD_WorkbenchWindow.java index 03e0c89258..d82fa7043f 100644 --- a/base/src/org/compiere/model/X_AD_WorkbenchWindow.java +++ b/base/src/org/compiere/model/X_AD_WorkbenchWindow.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WorkbenchWindow * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WorkbenchWindow extends PO implements I_AD_WorkbenchWindow, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WorkflowProcessor.java b/base/src/org/compiere/model/X_AD_WorkflowProcessor.java index 7b8ae9ed37..b698d10f05 100644 --- a/base/src/org/compiere/model/X_AD_WorkflowProcessor.java +++ b/base/src/org/compiere/model/X_AD_WorkflowProcessor.java @@ -24,7 +24,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for AD_WorkflowProcessor * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WorkflowProcessor extends PO implements I_AD_WorkflowProcessor, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_WorkflowProcessorLog.java b/base/src/org/compiere/model/X_AD_WorkflowProcessorLog.java index 0bc4383186..c896054e58 100644 --- a/base/src/org/compiere/model/X_AD_WorkflowProcessorLog.java +++ b/base/src/org/compiere/model/X_AD_WorkflowProcessorLog.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_WorkflowProcessorLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_WorkflowProcessorLog extends PO implements I_AD_WorkflowProcessorLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_AD_Workflow_Access.java b/base/src/org/compiere/model/X_AD_Workflow_Access.java index 40f7676190..39fe528791 100644 --- a/base/src/org/compiere/model/X_AD_Workflow_Access.java +++ b/base/src/org/compiere/model/X_AD_Workflow_Access.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for AD_Workflow_Access * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_AD_Workflow_Access extends PO implements I_AD_Workflow_Access, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_ClientException.java b/base/src/org/compiere/model/X_ASP_ClientException.java index add27d3494..28e6ea63a1 100644 --- a/base/src/org/compiere/model/X_ASP_ClientException.java +++ b/base/src/org/compiere/model/X_ASP_ClientException.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_ClientException * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_ClientException extends PO implements I_ASP_ClientException, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_ClientLevel.java b/base/src/org/compiere/model/X_ASP_ClientLevel.java index 03904e3e6b..3d4f1011bd 100644 --- a/base/src/org/compiere/model/X_ASP_ClientLevel.java +++ b/base/src/org/compiere/model/X_ASP_ClientLevel.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_ClientLevel * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_ClientLevel extends PO implements I_ASP_ClientLevel, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Field.java b/base/src/org/compiere/model/X_ASP_Field.java index 3ae65335b3..e29c5d62fa 100644 --- a/base/src/org/compiere/model/X_ASP_Field.java +++ b/base/src/org/compiere/model/X_ASP_Field.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_Field * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Field extends PO implements I_ASP_Field, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Form.java b/base/src/org/compiere/model/X_ASP_Form.java index 0b9ddeef0c..425b517170 100644 --- a/base/src/org/compiere/model/X_ASP_Form.java +++ b/base/src/org/compiere/model/X_ASP_Form.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_Form * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Form extends PO implements I_ASP_Form, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Level.java b/base/src/org/compiere/model/X_ASP_Level.java index 042ad57165..71e0b1764c 100644 --- a/base/src/org/compiere/model/X_ASP_Level.java +++ b/base/src/org/compiere/model/X_ASP_Level.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for ASP_Level * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Level extends PO implements I_ASP_Level, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Module.java b/base/src/org/compiere/model/X_ASP_Module.java index 0449674f77..f329ad0e40 100644 --- a/base/src/org/compiere/model/X_ASP_Module.java +++ b/base/src/org/compiere/model/X_ASP_Module.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for ASP_Module * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Module extends PO implements I_ASP_Module, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Process.java b/base/src/org/compiere/model/X_ASP_Process.java index 47b0150866..90eb96a775 100644 --- a/base/src/org/compiere/model/X_ASP_Process.java +++ b/base/src/org/compiere/model/X_ASP_Process.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_Process * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Process extends PO implements I_ASP_Process, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Process_Para.java b/base/src/org/compiere/model/X_ASP_Process_Para.java index 150d481ab6..fc5a5612ab 100644 --- a/base/src/org/compiere/model/X_ASP_Process_Para.java +++ b/base/src/org/compiere/model/X_ASP_Process_Para.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_Process_Para * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Process_Para extends PO implements I_ASP_Process_Para, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Tab.java b/base/src/org/compiere/model/X_ASP_Tab.java index 7305204620..4812a431ac 100644 --- a/base/src/org/compiere/model/X_ASP_Tab.java +++ b/base/src/org/compiere/model/X_ASP_Tab.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_Tab * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Tab extends PO implements I_ASP_Tab, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Task.java b/base/src/org/compiere/model/X_ASP_Task.java index cf3095928f..81c14ec92a 100644 --- a/base/src/org/compiere/model/X_ASP_Task.java +++ b/base/src/org/compiere/model/X_ASP_Task.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_Task * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Task extends PO implements I_ASP_Task, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Window.java b/base/src/org/compiere/model/X_ASP_Window.java index c5aaaaf571..13e5a1db3c 100644 --- a/base/src/org/compiere/model/X_ASP_Window.java +++ b/base/src/org/compiere/model/X_ASP_Window.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_Window * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Window extends PO implements I_ASP_Window, I_Persistent { diff --git a/base/src/org/compiere/model/X_ASP_Workflow.java b/base/src/org/compiere/model/X_ASP_Workflow.java index 623ea7d8cf..86134a9093 100644 --- a/base/src/org/compiere/model/X_ASP_Workflow.java +++ b/base/src/org/compiere/model/X_ASP_Workflow.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for ASP_Workflow * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_ASP_Workflow extends PO implements I_ASP_Workflow, I_Persistent { diff --git a/base/src/org/compiere/model/X_A_Asset.java b/base/src/org/compiere/model/X_A_Asset.java index 5a8a4bcfae..d620225d6f 100644 --- a/base/src/org/compiere/model/X_A_Asset.java +++ b/base/src/org/compiere/model/X_A_Asset.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for A_Asset * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_A_Asset extends PO implements I_A_Asset, I_Persistent { diff --git a/base/src/org/compiere/model/X_A_Asset_Delivery.java b/base/src/org/compiere/model/X_A_Asset_Delivery.java index 2489e27a7c..ece3ecdc25 100644 --- a/base/src/org/compiere/model/X_A_Asset_Delivery.java +++ b/base/src/org/compiere/model/X_A_Asset_Delivery.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for A_Asset_Delivery * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_A_Asset_Delivery extends PO implements I_A_Asset_Delivery, I_Persistent { diff --git a/base/src/org/compiere/model/X_A_Asset_Group.java b/base/src/org/compiere/model/X_A_Asset_Group.java index 616c552902..a0e196a283 100644 --- a/base/src/org/compiere/model/X_A_Asset_Group.java +++ b/base/src/org/compiere/model/X_A_Asset_Group.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for A_Asset_Group * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_A_Asset_Group extends PO implements I_A_Asset_Group, I_Persistent { diff --git a/base/src/org/compiere/model/X_A_Asset_Retirement.java b/base/src/org/compiere/model/X_A_Asset_Retirement.java index c3fb425a96..1a8a4dba5c 100644 --- a/base/src/org/compiere/model/X_A_Asset_Retirement.java +++ b/base/src/org/compiere/model/X_A_Asset_Retirement.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for A_Asset_Retirement * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_A_Asset_Retirement extends PO implements I_A_Asset_Retirement, I_Persistent { diff --git a/base/src/org/compiere/model/X_A_Registration.java b/base/src/org/compiere/model/X_A_Registration.java index ab9a064920..302d373735 100644 --- a/base/src/org/compiere/model/X_A_Registration.java +++ b/base/src/org/compiere/model/X_A_Registration.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for A_Registration * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_A_Registration extends PO implements I_A_Registration, I_Persistent { diff --git a/base/src/org/compiere/model/X_A_RegistrationAttribute.java b/base/src/org/compiere/model/X_A_RegistrationAttribute.java index 9ec81907e8..17584f6dac 100644 --- a/base/src/org/compiere/model/X_A_RegistrationAttribute.java +++ b/base/src/org/compiere/model/X_A_RegistrationAttribute.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for A_RegistrationAttribute * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_A_RegistrationAttribute extends PO implements I_A_RegistrationAttribute, I_Persistent { diff --git a/base/src/org/compiere/model/X_A_RegistrationProduct.java b/base/src/org/compiere/model/X_A_RegistrationProduct.java index 90441742ae..052ef59005 100644 --- a/base/src/org/compiere/model/X_A_RegistrationProduct.java +++ b/base/src/org/compiere/model/X_A_RegistrationProduct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for A_RegistrationProduct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_A_RegistrationProduct extends PO implements I_A_RegistrationProduct, I_Persistent { diff --git a/base/src/org/compiere/model/X_A_RegistrationValue.java b/base/src/org/compiere/model/X_A_RegistrationValue.java index 373ac24db7..7d0c60ea8d 100644 --- a/base/src/org/compiere/model/X_A_RegistrationValue.java +++ b/base/src/org/compiere/model/X_A_RegistrationValue.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for A_RegistrationValue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_A_RegistrationValue extends PO implements I_A_RegistrationValue, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_Bid.java b/base/src/org/compiere/model/X_B_Bid.java index 62d96bc4f7..23ecb95a08 100644 --- a/base/src/org/compiere/model/X_B_Bid.java +++ b/base/src/org/compiere/model/X_B_Bid.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_Bid * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_Bid extends PO implements I_B_Bid, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_BidComment.java b/base/src/org/compiere/model/X_B_BidComment.java index d281a14bfc..1ef0c665bd 100644 --- a/base/src/org/compiere/model/X_B_BidComment.java +++ b/base/src/org/compiere/model/X_B_BidComment.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for B_BidComment * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_BidComment extends PO implements I_B_BidComment, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_Buyer.java b/base/src/org/compiere/model/X_B_Buyer.java index 5b03cd54db..f9afc640e8 100644 --- a/base/src/org/compiere/model/X_B_Buyer.java +++ b/base/src/org/compiere/model/X_B_Buyer.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_Buyer * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_Buyer extends PO implements I_B_Buyer, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_BuyerFunds.java b/base/src/org/compiere/model/X_B_BuyerFunds.java index 4e602b0277..820a4c3df4 100644 --- a/base/src/org/compiere/model/X_B_BuyerFunds.java +++ b/base/src/org/compiere/model/X_B_BuyerFunds.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_BuyerFunds * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_BuyerFunds extends PO implements I_B_BuyerFunds, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_Offer.java b/base/src/org/compiere/model/X_B_Offer.java index 0cfcd67665..83d54aed52 100644 --- a/base/src/org/compiere/model/X_B_Offer.java +++ b/base/src/org/compiere/model/X_B_Offer.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_Offer * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_Offer extends PO implements I_B_Offer, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_Seller.java b/base/src/org/compiere/model/X_B_Seller.java index 9712b527d2..6391517f76 100644 --- a/base/src/org/compiere/model/X_B_Seller.java +++ b/base/src/org/compiere/model/X_B_Seller.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_Seller * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_Seller extends PO implements I_B_Seller, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_SellerFunds.java b/base/src/org/compiere/model/X_B_SellerFunds.java index 58b86249a9..d5b40b3631 100644 --- a/base/src/org/compiere/model/X_B_SellerFunds.java +++ b/base/src/org/compiere/model/X_B_SellerFunds.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_SellerFunds * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_SellerFunds extends PO implements I_B_SellerFunds, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_Topic.java b/base/src/org/compiere/model/X_B_Topic.java index d29797deed..de51bb3017 100644 --- a/base/src/org/compiere/model/X_B_Topic.java +++ b/base/src/org/compiere/model/X_B_Topic.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_Topic * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_Topic extends PO implements I_B_Topic, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_TopicCategory.java b/base/src/org/compiere/model/X_B_TopicCategory.java index 2816e1e5cd..3ecbe8c9c6 100644 --- a/base/src/org/compiere/model/X_B_TopicCategory.java +++ b/base/src/org/compiere/model/X_B_TopicCategory.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_TopicCategory * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_TopicCategory extends PO implements I_B_TopicCategory, I_Persistent { diff --git a/base/src/org/compiere/model/X_B_TopicType.java b/base/src/org/compiere/model/X_B_TopicType.java index 60ac00ac20..3594c9f579 100644 --- a/base/src/org/compiere/model/X_B_TopicType.java +++ b/base/src/org/compiere/model/X_B_TopicType.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for B_TopicType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_B_TopicType extends PO implements I_B_TopicType, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_AccessContainer.java b/base/src/org/compiere/model/X_CM_AccessContainer.java index 1e35711d1a..ef29e2dd79 100644 --- a/base/src/org/compiere/model/X_CM_AccessContainer.java +++ b/base/src/org/compiere/model/X_CM_AccessContainer.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for CM_AccessContainer * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_AccessContainer extends PO implements I_CM_AccessContainer, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_AccessListBPGroup.java b/base/src/org/compiere/model/X_CM_AccessListBPGroup.java index 83b21dce0d..2c6b684592 100644 --- a/base/src/org/compiere/model/X_CM_AccessListBPGroup.java +++ b/base/src/org/compiere/model/X_CM_AccessListBPGroup.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for CM_AccessListBPGroup * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_AccessListBPGroup extends PO implements I_CM_AccessListBPGroup, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_AccessListRole.java b/base/src/org/compiere/model/X_CM_AccessListRole.java index 26418a3ac8..28c5a235ca 100644 --- a/base/src/org/compiere/model/X_CM_AccessListRole.java +++ b/base/src/org/compiere/model/X_CM_AccessListRole.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for CM_AccessListRole * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_AccessListRole extends PO implements I_CM_AccessListRole, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_AccessMedia.java b/base/src/org/compiere/model/X_CM_AccessMedia.java index 957a1f2df1..36fe7131e7 100644 --- a/base/src/org/compiere/model/X_CM_AccessMedia.java +++ b/base/src/org/compiere/model/X_CM_AccessMedia.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for CM_AccessMedia * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_AccessMedia extends PO implements I_CM_AccessMedia, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_AccessNewsChannel.java b/base/src/org/compiere/model/X_CM_AccessNewsChannel.java index 1100a90214..b3de765135 100644 --- a/base/src/org/compiere/model/X_CM_AccessNewsChannel.java +++ b/base/src/org/compiere/model/X_CM_AccessNewsChannel.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for CM_AccessNewsChannel * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_AccessNewsChannel extends PO implements I_CM_AccessNewsChannel, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_AccessProfile.java b/base/src/org/compiere/model/X_CM_AccessProfile.java index 76435123ad..089306eb7b 100644 --- a/base/src/org/compiere/model/X_CM_AccessProfile.java +++ b/base/src/org/compiere/model/X_CM_AccessProfile.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_AccessProfile * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_AccessProfile extends PO implements I_CM_AccessProfile, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_AccessStage.java b/base/src/org/compiere/model/X_CM_AccessStage.java index d86218791c..f389cd9c25 100644 --- a/base/src/org/compiere/model/X_CM_AccessStage.java +++ b/base/src/org/compiere/model/X_CM_AccessStage.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for CM_AccessStage * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_AccessStage extends PO implements I_CM_AccessStage, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Ad.java b/base/src/org/compiere/model/X_CM_Ad.java index f860a4fe7b..324163fa1f 100644 --- a/base/src/org/compiere/model/X_CM_Ad.java +++ b/base/src/org/compiere/model/X_CM_Ad.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Ad * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Ad extends PO implements I_CM_Ad, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Ad_Cat.java b/base/src/org/compiere/model/X_CM_Ad_Cat.java index db8c73c6be..727b701a77 100644 --- a/base/src/org/compiere/model/X_CM_Ad_Cat.java +++ b/base/src/org/compiere/model/X_CM_Ad_Cat.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Ad_Cat * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Ad_Cat extends PO implements I_CM_Ad_Cat, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_BroadcastServer.java b/base/src/org/compiere/model/X_CM_BroadcastServer.java index 2fe61e26a6..11d8f1088a 100644 --- a/base/src/org/compiere/model/X_CM_BroadcastServer.java +++ b/base/src/org/compiere/model/X_CM_BroadcastServer.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_BroadcastServer * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_BroadcastServer extends PO implements I_CM_BroadcastServer, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_CStage.java b/base/src/org/compiere/model/X_CM_CStage.java index a2341bef7b..64bc7b2cb9 100644 --- a/base/src/org/compiere/model/X_CM_CStage.java +++ b/base/src/org/compiere/model/X_CM_CStage.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_CStage * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_CStage extends PO implements I_CM_CStage, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_CStageTTable.java b/base/src/org/compiere/model/X_CM_CStageTTable.java index 0d00dd9d46..631342f899 100644 --- a/base/src/org/compiere/model/X_CM_CStageTTable.java +++ b/base/src/org/compiere/model/X_CM_CStageTTable.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_CStageTTable * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_CStageTTable extends PO implements I_CM_CStageTTable, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_CStage_Element.java b/base/src/org/compiere/model/X_CM_CStage_Element.java index 19dfa8289c..eb2f79a2ee 100644 --- a/base/src/org/compiere/model/X_CM_CStage_Element.java +++ b/base/src/org/compiere/model/X_CM_CStage_Element.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_CStage_Element * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_CStage_Element extends PO implements I_CM_CStage_Element, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Chat.java b/base/src/org/compiere/model/X_CM_Chat.java index a9b44f7072..c441d3f496 100644 --- a/base/src/org/compiere/model/X_CM_Chat.java +++ b/base/src/org/compiere/model/X_CM_Chat.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Chat * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Chat extends PO implements I_CM_Chat, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_ChatEntry.java b/base/src/org/compiere/model/X_CM_ChatEntry.java index 75038afe4b..2999a9f244 100644 --- a/base/src/org/compiere/model/X_CM_ChatEntry.java +++ b/base/src/org/compiere/model/X_CM_ChatEntry.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_ChatEntry * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_ChatEntry extends PO implements I_CM_ChatEntry, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_ChatType.java b/base/src/org/compiere/model/X_CM_ChatType.java index 6ff9c4e448..e22eeef18d 100644 --- a/base/src/org/compiere/model/X_CM_ChatType.java +++ b/base/src/org/compiere/model/X_CM_ChatType.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_ChatType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_ChatType extends PO implements I_CM_ChatType, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_ChatTypeUpdate.java b/base/src/org/compiere/model/X_CM_ChatTypeUpdate.java index 52fd17b103..41bd961f24 100644 --- a/base/src/org/compiere/model/X_CM_ChatTypeUpdate.java +++ b/base/src/org/compiere/model/X_CM_ChatTypeUpdate.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for CM_ChatTypeUpdate * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_ChatTypeUpdate extends PO implements I_CM_ChatTypeUpdate, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_ChatUpdate.java b/base/src/org/compiere/model/X_CM_ChatUpdate.java index 6bdadf921d..1970fe523a 100644 --- a/base/src/org/compiere/model/X_CM_ChatUpdate.java +++ b/base/src/org/compiere/model/X_CM_ChatUpdate.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for CM_ChatUpdate * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_ChatUpdate extends PO implements I_CM_ChatUpdate, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Container.java b/base/src/org/compiere/model/X_CM_Container.java index 3ebbd76f47..a439def462 100644 --- a/base/src/org/compiere/model/X_CM_Container.java +++ b/base/src/org/compiere/model/X_CM_Container.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Container * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Container extends PO implements I_CM_Container, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_ContainerTTable.java b/base/src/org/compiere/model/X_CM_ContainerTTable.java index 3e6773eacf..b2ad7c96a5 100644 --- a/base/src/org/compiere/model/X_CM_ContainerTTable.java +++ b/base/src/org/compiere/model/X_CM_ContainerTTable.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_ContainerTTable * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_ContainerTTable extends PO implements I_CM_ContainerTTable, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Container_Element.java b/base/src/org/compiere/model/X_CM_Container_Element.java index 6762eed452..4e583d7d48 100644 --- a/base/src/org/compiere/model/X_CM_Container_Element.java +++ b/base/src/org/compiere/model/X_CM_Container_Element.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Container_Element * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Container_Element extends PO implements I_CM_Container_Element, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Container_URL.java b/base/src/org/compiere/model/X_CM_Container_URL.java index ad067e0a56..93ca6628de 100644 --- a/base/src/org/compiere/model/X_CM_Container_URL.java +++ b/base/src/org/compiere/model/X_CM_Container_URL.java @@ -25,7 +25,7 @@ import java.util.logging.Level; /** Generated Model for CM_Container_URL * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Container_URL extends PO implements I_CM_Container_URL, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Media.java b/base/src/org/compiere/model/X_CM_Media.java index dc5a538716..ea4a82e540 100644 --- a/base/src/org/compiere/model/X_CM_Media.java +++ b/base/src/org/compiere/model/X_CM_Media.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Media * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Media extends PO implements I_CM_Media, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_MediaDeploy.java b/base/src/org/compiere/model/X_CM_MediaDeploy.java index 9fa0fa6816..0f86154075 100644 --- a/base/src/org/compiere/model/X_CM_MediaDeploy.java +++ b/base/src/org/compiere/model/X_CM_MediaDeploy.java @@ -25,7 +25,7 @@ import java.util.logging.Level; /** Generated Model for CM_MediaDeploy * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_MediaDeploy extends PO implements I_CM_MediaDeploy, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Media_Server.java b/base/src/org/compiere/model/X_CM_Media_Server.java index 6a3026ec79..000191eccb 100644 --- a/base/src/org/compiere/model/X_CM_Media_Server.java +++ b/base/src/org/compiere/model/X_CM_Media_Server.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Media_Server * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Media_Server extends PO implements I_CM_Media_Server, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_NewsChannel.java b/base/src/org/compiere/model/X_CM_NewsChannel.java index 196c34d1fa..7b00be1c75 100644 --- a/base/src/org/compiere/model/X_CM_NewsChannel.java +++ b/base/src/org/compiere/model/X_CM_NewsChannel.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_NewsChannel * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_NewsChannel extends PO implements I_CM_NewsChannel, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_NewsItem.java b/base/src/org/compiere/model/X_CM_NewsItem.java index fe65bf25c6..b7f8f1fb17 100644 --- a/base/src/org/compiere/model/X_CM_NewsItem.java +++ b/base/src/org/compiere/model/X_CM_NewsItem.java @@ -25,7 +25,7 @@ import java.util.logging.Level; /** Generated Model for CM_NewsItem * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_NewsItem extends PO implements I_CM_NewsItem, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Template.java b/base/src/org/compiere/model/X_CM_Template.java index 7e3fe429d1..fc361544d6 100644 --- a/base/src/org/compiere/model/X_CM_Template.java +++ b/base/src/org/compiere/model/X_CM_Template.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Template * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Template extends PO implements I_CM_Template, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_TemplateTable.java b/base/src/org/compiere/model/X_CM_TemplateTable.java index 04711f3d46..13b1a8bfbb 100644 --- a/base/src/org/compiere/model/X_CM_TemplateTable.java +++ b/base/src/org/compiere/model/X_CM_TemplateTable.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_TemplateTable * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_TemplateTable extends PO implements I_CM_TemplateTable, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_Template_Ad_Cat.java b/base/src/org/compiere/model/X_CM_Template_Ad_Cat.java index 9317b67712..15743d19a2 100644 --- a/base/src/org/compiere/model/X_CM_Template_Ad_Cat.java +++ b/base/src/org/compiere/model/X_CM_Template_Ad_Cat.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_Template_Ad_Cat * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_Template_Ad_Cat extends PO implements I_CM_Template_Ad_Cat, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_WebAccessLog.java b/base/src/org/compiere/model/X_CM_WebAccessLog.java index 1e723845a7..4d2919ac17 100644 --- a/base/src/org/compiere/model/X_CM_WebAccessLog.java +++ b/base/src/org/compiere/model/X_CM_WebAccessLog.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for CM_WebAccessLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_WebAccessLog extends PO implements I_CM_WebAccessLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_WebProject.java b/base/src/org/compiere/model/X_CM_WebProject.java index f2e08069d7..09431d15f5 100644 --- a/base/src/org/compiere/model/X_CM_WebProject.java +++ b/base/src/org/compiere/model/X_CM_WebProject.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_WebProject * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_WebProject extends PO implements I_CM_WebProject, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_WebProject_Domain.java b/base/src/org/compiere/model/X_CM_WebProject_Domain.java index 314027345e..c21a80581f 100644 --- a/base/src/org/compiere/model/X_CM_WebProject_Domain.java +++ b/base/src/org/compiere/model/X_CM_WebProject_Domain.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_WebProject_Domain * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_WebProject_Domain extends PO implements I_CM_WebProject_Domain, I_Persistent { diff --git a/base/src/org/compiere/model/X_CM_WikiToken.java b/base/src/org/compiere/model/X_CM_WikiToken.java index 250b04b134..a5a1666841 100755 --- a/base/src/org/compiere/model/X_CM_WikiToken.java +++ b/base/src/org/compiere/model/X_CM_WikiToken.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for CM_WikiToken * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_CM_WikiToken extends PO implements I_CM_WikiToken, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_AcctProcessor.java b/base/src/org/compiere/model/X_C_AcctProcessor.java index 4c75005151..3cc9bf6c30 100644 --- a/base/src/org/compiere/model/X_C_AcctProcessor.java +++ b/base/src/org/compiere/model/X_C_AcctProcessor.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_AcctProcessor * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_AcctProcessor extends PO implements I_C_AcctProcessor, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_AcctProcessorLog.java b/base/src/org/compiere/model/X_C_AcctProcessorLog.java index 6c477a7469..e0990e3d53 100644 --- a/base/src/org/compiere/model/X_C_AcctProcessorLog.java +++ b/base/src/org/compiere/model/X_C_AcctProcessorLog.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_AcctProcessorLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_AcctProcessorLog extends PO implements I_C_AcctProcessorLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_AcctSchema.java b/base/src/org/compiere/model/X_C_AcctSchema.java deleted file mode 100644 index 9298430df1..0000000000 --- a/base/src/org/compiere/model/X_C_AcctSchema.java +++ /dev/null @@ -1,851 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_AcctSchema - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_AcctSchema extends PO implements I_C_AcctSchema, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_AcctSchema (Properties ctx, int C_AcctSchema_ID, String trxName) - { - super (ctx, C_AcctSchema_ID, trxName); - /** if (C_AcctSchema_ID == 0) - { - setAutoPeriodControl (false); - setC_AcctSchema_ID (0); - setC_Currency_ID (0); - setCommitmentType (null); -// N - setCostingLevel (null); -// C - setCostingMethod (null); -// S - setGAAP (null); - setHasAlias (false); - setHasCombination (false); - setIsAccrual (true); -// Y - setIsAdjustCOGS (false); - setIsDiscountCorrectsTax (false); - setIsExplicitCostAdjustment (false); -// N - setIsPostServices (false); -// N - setIsTradeDiscountPosted (false); - setM_CostType_ID (0); - setName (null); - setSeparator (null); -// - - setTaxCorrectionType (null); - } */ - } - - /** Load Constructor */ - public X_C_AcctSchema (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_C_AcctSchema[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_OrgOnly_ID AD_Reference_ID=322 */ - public static final int AD_ORGONLY_ID_AD_Reference_ID=322; - /** Set Only Organization. - @param AD_OrgOnly_ID - Create posting entries only for this organization - */ - public void setAD_OrgOnly_ID (int AD_OrgOnly_ID) - { - if (AD_OrgOnly_ID < 1) - set_Value (COLUMNNAME_AD_OrgOnly_ID, null); - else - set_Value (COLUMNNAME_AD_OrgOnly_ID, Integer.valueOf(AD_OrgOnly_ID)); - } - - /** Get Only Organization. - @return Create posting entries only for this organization - */ - public int getAD_OrgOnly_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgOnly_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Automatic Period Control. - @param AutoPeriodControl - If selected, the periods are automatically opened and closed - */ - public void setAutoPeriodControl (boolean AutoPeriodControl) - { - set_Value (COLUMNNAME_AutoPeriodControl, Boolean.valueOf(AutoPeriodControl)); - } - - /** Get Automatic Period Control. - @return If selected, the periods are automatically opened and closed - */ - public boolean isAutoPeriodControl () - { - Object oo = get_Value(COLUMNNAME_AutoPeriodControl); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Accounting Schema. - @param C_AcctSchema_ID - Rules for accounting - */ - public void setC_AcctSchema_ID (int C_AcctSchema_ID) - { - if (C_AcctSchema_ID < 1) - throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID)); - } - - /** Get Accounting Schema. - @return Rules for accounting - */ - public int getC_AcctSchema_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - throw new IllegalArgumentException ("C_Currency_ID is mandatory."); - set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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 I_C_Period getC_Period() throws Exception - { - Class clazz = MTable.getClass(I_C_Period.Table_Name); - I_C_Period result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Period)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Period_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Period. - @param C_Period_ID - Period of the Calendar - */ - public void setC_Period_ID (int C_Period_ID) - { - if (C_Period_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_Period_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID)); - } - - /** Get Period. - @return Period of the Calendar - */ - public int getC_Period_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** CommitmentType AD_Reference_ID=359 */ - public static final int COMMITMENTTYPE_AD_Reference_ID=359; - /** PO Commitment only = C */ - public static final String COMMITMENTTYPE_POCommitmentOnly = "C"; - /** PO Commitment & Reservation = B */ - public static final String COMMITMENTTYPE_POCommitmentReservation = "B"; - /** None = N */ - public static final String COMMITMENTTYPE_None = "N"; - /** PO/SO Commitment & Reservation = A */ - public static final String COMMITMENTTYPE_POSOCommitmentReservation = "A"; - /** SO Commitment only = S */ - public static final String COMMITMENTTYPE_SOCommitmentOnly = "S"; - /** PO/SO Commitment = O */ - public static final String COMMITMENTTYPE_POSOCommitment = "O"; - /** Set Commitment Type. - @param CommitmentType - Create Commitment and/or Reservations for Budget Control - */ - public void setCommitmentType (String CommitmentType) - { - if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType is mandatory"); - if (CommitmentType.equals("C") || CommitmentType.equals("B") || CommitmentType.equals("N") || CommitmentType.equals("A") || CommitmentType.equals("S") || CommitmentType.equals("O")); else throw new IllegalArgumentException ("CommitmentType Invalid value - " + CommitmentType + " - Reference_ID=359 - C - B - N - A - S - O"); - if (CommitmentType.length() > 1) - { - log.warning("Length > 1 - truncated"); - CommitmentType = CommitmentType.substring(0, 1); - } - set_Value (COLUMNNAME_CommitmentType, CommitmentType); - } - - /** Get Commitment Type. - @return Create Commitment and/or Reservations for Budget Control - */ - public String getCommitmentType () - { - return (String)get_Value(COLUMNNAME_CommitmentType); - } - - /** CostingLevel AD_Reference_ID=355 */ - public static final int COSTINGLEVEL_AD_Reference_ID=355; - /** Client = C */ - public static final String COSTINGLEVEL_Client = "C"; - /** Organization = O */ - public static final String COSTINGLEVEL_Organization = "O"; - /** Batch/Lot = B */ - public static final String COSTINGLEVEL_BatchLot = "B"; - /** Set Costing Level. - @param CostingLevel - The lowest level to accumulate Costing Information - */ - public void setCostingLevel (String CostingLevel) - { - if (CostingLevel == null) throw new IllegalArgumentException ("CostingLevel is mandatory"); - if (CostingLevel.equals("C") || CostingLevel.equals("O") || CostingLevel.equals("B")); else throw new IllegalArgumentException ("CostingLevel Invalid value - " + CostingLevel + " - Reference_ID=355 - C - O - B"); - if (CostingLevel.length() > 1) - { - log.warning("Length > 1 - truncated"); - CostingLevel = CostingLevel.substring(0, 1); - } - set_Value (COLUMNNAME_CostingLevel, CostingLevel); - } - - /** Get Costing Level. - @return The lowest level to accumulate Costing Information - */ - public String getCostingLevel () - { - return (String)get_Value(COLUMNNAME_CostingLevel); - } - - /** CostingMethod AD_Reference_ID=122 */ - public static final int COSTINGMETHOD_AD_Reference_ID=122; - /** Standard Costing = S */ - public static final String COSTINGMETHOD_StandardCosting = "S"; - /** Average PO = A */ - public static final String COSTINGMETHOD_AveragePO = "A"; - /** Lifo = L */ - public static final String COSTINGMETHOD_Lifo = "L"; - /** Fifo = F */ - public static final String COSTINGMETHOD_Fifo = "F"; - /** Last PO Price = p */ - public static final String COSTINGMETHOD_LastPOPrice = "p"; - /** Average Invoice = I */ - public static final String COSTINGMETHOD_AverageInvoice = "I"; - /** Last Invoice = i */ - public static final String COSTINGMETHOD_LastInvoice = "i"; - /** User Defined = U */ - public static final String COSTINGMETHOD_UserDefined = "U"; - /** _ = x */ - public static final String COSTINGMETHOD__ = "x"; - /** Set Costing Method. - @param CostingMethod - Indicates how Costs will be calculated - */ - public void setCostingMethod (String CostingMethod) - { - if (CostingMethod == null) throw new IllegalArgumentException ("CostingMethod is mandatory"); - if (CostingMethod.equals("S") || CostingMethod.equals("A") || CostingMethod.equals("L") || CostingMethod.equals("F") || CostingMethod.equals("p") || CostingMethod.equals("I") || CostingMethod.equals("i") || CostingMethod.equals("U") || CostingMethod.equals("x")); else throw new IllegalArgumentException ("CostingMethod Invalid value - " + CostingMethod + " - Reference_ID=122 - S - A - L - F - p - I - i - U - x"); - if (CostingMethod.length() > 1) - { - log.warning("Length > 1 - truncated"); - CostingMethod = CostingMethod.substring(0, 1); - } - set_Value (COLUMNNAME_CostingMethod, CostingMethod); - } - - /** Get Costing Method. - @return Indicates how Costs will be calculated - */ - public String getCostingMethod () - { - return (String)get_Value(COLUMNNAME_CostingMethod); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** GAAP AD_Reference_ID=123 */ - public static final int GAAP_AD_Reference_ID=123; - /** International GAAP = UN */ - public static final String GAAP_InternationalGAAP = "UN"; - /** US GAAP = US */ - public static final String GAAP_USGAAP = "US"; - /** German HGB = DE */ - public static final String GAAP_GermanHGB = "DE"; - /** French Accounting Standard = FR */ - public static final String GAAP_FrenchAccountingStandard = "FR"; - /** Custom Accounting Rules = XX */ - public static final String GAAP_CustomAccountingRules = "XX"; - /** Set GAAP. - @param GAAP - Generally Accepted Accounting Principles - */ - public void setGAAP (String GAAP) - { - if (GAAP == null) throw new IllegalArgumentException ("GAAP is mandatory"); - if (GAAP.equals("UN") || GAAP.equals("US") || GAAP.equals("DE") || GAAP.equals("FR") || GAAP.equals("XX")); else throw new IllegalArgumentException ("GAAP Invalid value - " + GAAP + " - Reference_ID=123 - UN - US - DE - FR - XX"); - if (GAAP.length() > 2) - { - log.warning("Length > 2 - truncated"); - GAAP = GAAP.substring(0, 2); - } - set_Value (COLUMNNAME_GAAP, GAAP); - } - - /** Get GAAP. - @return Generally Accepted Accounting Principles - */ - public String getGAAP () - { - return (String)get_Value(COLUMNNAME_GAAP); - } - - /** Set Use Account Alias. - @param HasAlias - Ability to select (partial) account combinations by an Alias - */ - public void setHasAlias (boolean HasAlias) - { - set_Value (COLUMNNAME_HasAlias, Boolean.valueOf(HasAlias)); - } - - /** Get Use Account Alias. - @return Ability to select (partial) account combinations by an Alias - */ - public boolean isHasAlias () - { - Object oo = get_Value(COLUMNNAME_HasAlias); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Use Account Combination Control. - @param HasCombination - Combination of account elements are checked - */ - public void setHasCombination (boolean HasCombination) - { - set_Value (COLUMNNAME_HasCombination, Boolean.valueOf(HasCombination)); - } - - /** Get Use Account Combination Control. - @return Combination of account elements are checked - */ - public boolean isHasCombination () - { - Object oo = get_Value(COLUMNNAME_HasCombination); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Accrual. - @param IsAccrual - Indicates if Accrual or Cash Based accounting will be used - */ - public void setIsAccrual (boolean IsAccrual) - { - set_Value (COLUMNNAME_IsAccrual, Boolean.valueOf(IsAccrual)); - } - - /** Get Accrual. - @return Indicates if Accrual or Cash Based accounting will be used - */ - public boolean isAccrual () - { - Object oo = get_Value(COLUMNNAME_IsAccrual); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Adjust COGS. - @param IsAdjustCOGS - Adjust Cost of Good Sold - */ - public void setIsAdjustCOGS (boolean IsAdjustCOGS) - { - set_Value (COLUMNNAME_IsAdjustCOGS, Boolean.valueOf(IsAdjustCOGS)); - } - - /** Get Adjust COGS. - @return Adjust Cost of Good Sold - */ - public boolean isAdjustCOGS () - { - Object oo = get_Value(COLUMNNAME_IsAdjustCOGS); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Allow Negative Posting. - @param IsAllowNegativePosting - Allow to post negative accounting values - */ - public void setIsAllowNegativePosting (boolean IsAllowNegativePosting) - { - set_Value (COLUMNNAME_IsAllowNegativePosting, Boolean.valueOf(IsAllowNegativePosting)); - } - - /** Get Allow Negative Posting. - @return Allow to post negative accounting values - */ - public boolean isAllowNegativePosting () - { - Object oo = get_Value(COLUMNNAME_IsAllowNegativePosting); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Correct tax for Discounts/Charges. - @param IsDiscountCorrectsTax - Correct the tax for payment discount and charges - */ - public void setIsDiscountCorrectsTax (boolean IsDiscountCorrectsTax) - { - set_Value (COLUMNNAME_IsDiscountCorrectsTax, Boolean.valueOf(IsDiscountCorrectsTax)); - } - - /** Get Correct tax for Discounts/Charges. - @return Correct the tax for payment discount and charges - */ - public boolean isDiscountCorrectsTax () - { - Object oo = get_Value(COLUMNNAME_IsDiscountCorrectsTax); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Explicit Cost Adjustment. - @param IsExplicitCostAdjustment - Post the cost adjustment explicitly - */ - public void setIsExplicitCostAdjustment (boolean IsExplicitCostAdjustment) - { - set_Value (COLUMNNAME_IsExplicitCostAdjustment, Boolean.valueOf(IsExplicitCostAdjustment)); - } - - /** Get Explicit Cost Adjustment. - @return Post the cost adjustment explicitly - */ - public boolean isExplicitCostAdjustment () - { - Object oo = get_Value(COLUMNNAME_IsExplicitCostAdjustment); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Post if Clearing Equal. - @param IsPostIfClearingEqual - This flag controls if Adempiere must post when clearing (transit) and final accounts are the same - */ - public void setIsPostIfClearingEqual (boolean IsPostIfClearingEqual) - { - set_Value (COLUMNNAME_IsPostIfClearingEqual, Boolean.valueOf(IsPostIfClearingEqual)); - } - - /** Get Post if Clearing Equal. - @return This flag controls if Adempiere must post when clearing (transit) and final accounts are the same - */ - public boolean isPostIfClearingEqual () - { - Object oo = get_Value(COLUMNNAME_IsPostIfClearingEqual); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Post Services Separately. - @param IsPostServices - Differentiate between Services and Product Receivable/Payables - */ - public void setIsPostServices (boolean IsPostServices) - { - set_Value (COLUMNNAME_IsPostServices, Boolean.valueOf(IsPostServices)); - } - - /** Get Post Services Separately. - @return Differentiate between Services and Product Receivable/Payables - */ - public boolean isPostServices () - { - Object oo = get_Value(COLUMNNAME_IsPostServices); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Post Trade Discount. - @param IsTradeDiscountPosted - Generate postings for trade discounts - */ - public void setIsTradeDiscountPosted (boolean IsTradeDiscountPosted) - { - set_Value (COLUMNNAME_IsTradeDiscountPosted, Boolean.valueOf(IsTradeDiscountPosted)); - } - - /** Get Post Trade Discount. - @return Generate postings for trade discounts - */ - public boolean isTradeDiscountPosted () - { - Object oo = get_Value(COLUMNNAME_IsTradeDiscountPosted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - public I_M_CostType getM_CostType() throws Exception - { - Class clazz = MTable.getClass(I_M_CostType.Table_Name); - I_M_CostType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_CostType)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_CostType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Cost Type. - @param M_CostType_ID - Type of Cost (e.g. Current, Plan, Future) - */ - public void setM_CostType_ID (int M_CostType_ID) - { - if (M_CostType_ID < 1) - throw new IllegalArgumentException ("M_CostType_ID is mandatory."); - set_Value (COLUMNNAME_M_CostType_ID, Integer.valueOf(M_CostType_ID)); - } - - /** Get Cost Type. - @return Type of Cost (e.g. Current, Plan, Future) - */ - public int getM_CostType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_CostType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Future Days. - @param Period_OpenFuture - Number of days to be able to post to a future date (based on system date) - */ - public void setPeriod_OpenFuture (int Period_OpenFuture) - { - set_Value (COLUMNNAME_Period_OpenFuture, Integer.valueOf(Period_OpenFuture)); - } - - /** Get Future Days. - @return Number of days to be able to post to a future date (based on system date) - */ - public int getPeriod_OpenFuture () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Period_OpenFuture); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set History Days. - @param Period_OpenHistory - Number of days to be able to post in the past (based on system date) - */ - public void setPeriod_OpenHistory (int Period_OpenHistory) - { - set_Value (COLUMNNAME_Period_OpenHistory, Integer.valueOf(Period_OpenHistory)); - } - - /** Get History Days. - @return Number of days to be able to post in the past (based on system date) - */ - public int getPeriod_OpenHistory () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Period_OpenHistory); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** 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; - } - - /** Set Element Separator. - @param Separator - Element Separator - */ - public void setSeparator (String Separator) - { - if (Separator == null) - throw new IllegalArgumentException ("Separator is mandatory."); - - if (Separator.length() > 1) - { - log.warning("Length > 1 - truncated"); - Separator = Separator.substring(0, 1); - } - set_Value (COLUMNNAME_Separator, Separator); - } - - /** Get Element Separator. - @return Element Separator - */ - public String getSeparator () - { - return (String)get_Value(COLUMNNAME_Separator); - } - - /** TaxCorrectionType AD_Reference_ID=392 */ - public static final int TAXCORRECTIONTYPE_AD_Reference_ID=392; - /** None = N */ - public static final String TAXCORRECTIONTYPE_None = "N"; - /** Write-off only = W */ - public static final String TAXCORRECTIONTYPE_Write_OffOnly = "W"; - /** Discount only = D */ - public static final String TAXCORRECTIONTYPE_DiscountOnly = "D"; - /** Write-off and Discount = B */ - public static final String TAXCORRECTIONTYPE_Write_OffAndDiscount = "B"; - /** Set Tax Correction. - @param TaxCorrectionType - Type of Tax Correction - */ - public void setTaxCorrectionType (String TaxCorrectionType) - { - if (TaxCorrectionType == null) throw new IllegalArgumentException ("TaxCorrectionType is mandatory"); - if (TaxCorrectionType.equals("N") || TaxCorrectionType.equals("W") || TaxCorrectionType.equals("D") || TaxCorrectionType.equals("B")); else throw new IllegalArgumentException ("TaxCorrectionType Invalid value - " + TaxCorrectionType + " - Reference_ID=392 - N - W - D - B"); - if (TaxCorrectionType.length() > 1) - { - log.warning("Length > 1 - truncated"); - TaxCorrectionType = TaxCorrectionType.substring(0, 1); - } - set_Value (COLUMNNAME_TaxCorrectionType, TaxCorrectionType); - } - - /** Get Tax Correction. - @return Type of Tax Correction - */ - public String getTaxCorrectionType () - { - return (String)get_Value(COLUMNNAME_TaxCorrectionType); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_AcctSchema_Default.java b/base/src/org/compiere/model/X_C_AcctSchema_Default.java index aaf5bd95a0..b312c87328 100644 --- a/base/src/org/compiere/model/X_C_AcctSchema_Default.java +++ b/base/src/org/compiere/model/X_C_AcctSchema_Default.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_AcctSchema_Default * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_AcctSchema_Element.java b/base/src/org/compiere/model/X_C_AcctSchema_Element.java index bbc93fe23e..5ecb14b1ba 100644 --- a/base/src/org/compiere/model/X_C_AcctSchema_Element.java +++ b/base/src/org/compiere/model/X_C_AcctSchema_Element.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_AcctSchema_Element * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_AcctSchema_Element extends PO implements I_C_AcctSchema_Element, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_AcctSchema_GL.java b/base/src/org/compiere/model/X_C_AcctSchema_GL.java index e1505766f2..1407734cf1 100644 --- a/base/src/org/compiere/model/X_C_AcctSchema_GL.java +++ b/base/src/org/compiere/model/X_C_AcctSchema_GL.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_AcctSchema_GL * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_AcctSchema_GL extends PO implements I_C_AcctSchema_GL, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Activity.java b/base/src/org/compiere/model/X_C_Activity.java index 8448cd7d95..4ef2317ac8 100644 --- a/base/src/org/compiere/model/X_C_Activity.java +++ b/base/src/org/compiere/model/X_C_Activity.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Activity * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Activity extends PO implements I_C_Activity, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_AllocationHdr.java b/base/src/org/compiere/model/X_C_AllocationHdr.java index b267851e5a..da1ff7e924 100644 --- a/base/src/org/compiere/model/X_C_AllocationHdr.java +++ b/base/src/org/compiere/model/X_C_AllocationHdr.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_AllocationHdr * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_AllocationHdr extends PO implements I_C_AllocationHdr, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_AllocationLine.java b/base/src/org/compiere/model/X_C_AllocationLine.java index 094670e02a..a52dd9fc56 100644 --- a/base/src/org/compiere/model/X_C_AllocationLine.java +++ b/base/src/org/compiere/model/X_C_AllocationLine.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_AllocationLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_AllocationLine extends PO implements I_C_AllocationLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BP_BankAccount.java b/base/src/org/compiere/model/X_C_BP_BankAccount.java index d5651ee156..adf4605a8d 100644 --- a/base/src/org/compiere/model/X_C_BP_BankAccount.java +++ b/base/src/org/compiere/model/X_C_BP_BankAccount.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BP_BankAccount * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_BankAccount extends PO implements I_C_BP_BankAccount, I_Persistent { @@ -254,6 +254,14 @@ public class X_C_BP_BankAccount extends PO implements I_C_BP_BankAccount, I_Pers return (String)get_Value(COLUMNNAME_A_Name); } + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getA_Name()); + } + /** Set Account State. @param A_State State of the Credit Card or Account holder @@ -509,14 +517,6 @@ public class X_C_BP_BankAccount extends PO implements I_C_BP_BankAccount, I_Pers return ii.intValue(); } - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getC_Bank_ID())); - } - /** Set Exp. Month. @param CreditCardExpMM Expiry Month diff --git a/base/src/org/compiere/model/X_C_BP_Customer_Acct.java b/base/src/org/compiere/model/X_C_BP_Customer_Acct.java index de0bc7fe08..e2a265ce97 100644 --- a/base/src/org/compiere/model/X_C_BP_Customer_Acct.java +++ b/base/src/org/compiere/model/X_C_BP_Customer_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_BP_Customer_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_Customer_Acct extends PO implements I_C_BP_Customer_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BP_EDI.java b/base/src/org/compiere/model/X_C_BP_EDI.java index 1e8b21e0e8..1cf06a9d91 100644 --- a/base/src/org/compiere/model/X_C_BP_EDI.java +++ b/base/src/org/compiere/model/X_C_BP_EDI.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BP_EDI * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_EDI extends PO implements I_C_BP_EDI, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BP_Employee_Acct.java b/base/src/org/compiere/model/X_C_BP_Employee_Acct.java index 8f07d591d5..303223dc01 100644 --- a/base/src/org/compiere/model/X_C_BP_Employee_Acct.java +++ b/base/src/org/compiere/model/X_C_BP_Employee_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_BP_Employee_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_Employee_Acct extends PO implements I_C_BP_Employee_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BP_Group.java b/base/src/org/compiere/model/X_C_BP_Group.java index 7ccaeb4956..f7affd0d73 100644 --- a/base/src/org/compiere/model/X_C_BP_Group.java +++ b/base/src/org/compiere/model/X_C_BP_Group.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BP_Group * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_Group extends PO implements I_C_BP_Group, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BP_Group_Acct.java b/base/src/org/compiere/model/X_C_BP_Group_Acct.java index b4caf54478..9a4abd608e 100644 --- a/base/src/org/compiere/model/X_C_BP_Group_Acct.java +++ b/base/src/org/compiere/model/X_C_BP_Group_Acct.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BP_Group_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_Group_Acct extends PO implements I_C_BP_Group_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BP_Relation.java b/base/src/org/compiere/model/X_C_BP_Relation.java index ac747e1f2c..2acdfae1d6 100644 --- a/base/src/org/compiere/model/X_C_BP_Relation.java +++ b/base/src/org/compiere/model/X_C_BP_Relation.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BP_Relation * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_Relation extends PO implements I_C_BP_Relation, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BP_Vendor_Acct.java b/base/src/org/compiere/model/X_C_BP_Vendor_Acct.java index 9ba65b07fe..f1b0d1c8fc 100644 --- a/base/src/org/compiere/model/X_C_BP_Vendor_Acct.java +++ b/base/src/org/compiere/model/X_C_BP_Vendor_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_BP_Vendor_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_Vendor_Acct extends PO implements I_C_BP_Vendor_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BP_Withholding.java b/base/src/org/compiere/model/X_C_BP_Withholding.java index ec3c3f7375..adca816622 100644 --- a/base/src/org/compiere/model/X_C_BP_Withholding.java +++ b/base/src/org/compiere/model/X_C_BP_Withholding.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_BP_Withholding * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BP_Withholding extends PO implements I_C_BP_Withholding, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BPartner.java b/base/src/org/compiere/model/X_C_BPartner.java deleted file mode 100644 index cd7e57313f..0000000000 --- a/base/src/org/compiere/model/X_C_BPartner.java +++ /dev/null @@ -1,1616 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_BPartner - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_BPartner extends PO implements I_C_BPartner, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_BPartner (Properties ctx, int C_BPartner_ID, String trxName) - { - super (ctx, C_BPartner_ID, trxName); - /** if (C_BPartner_ID == 0) - { - setC_BP_Group_ID (0); - setC_BPartner_ID (0); - setIsCustomer (false); - setIsEmployee (false); - setIsOneTime (false); - setIsProspect (false); - setIsSalesRep (false); - setIsSummary (false); - setIsVendor (false); - setName (null); - setSO_CreditLimit (Env.ZERO); - setSO_CreditUsed (Env.ZERO); - setSendEMail (false); - setValue (null); - } */ - } - - /** Load Constructor */ - public X_C_BPartner (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() - { - StringBuffer sb = new StringBuffer ("X_C_BPartner[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_Language AD_Reference_ID=327 */ - public static final int AD_LANGUAGE_AD_Reference_ID=327; - /** Set Language. - @param AD_Language - Language for this entity - */ - public void setAD_Language (String AD_Language) - { - - if (AD_Language != null && AD_Language.length() > 6) - { - log.warning("Length > 6 - truncated"); - AD_Language = AD_Language.substring(0, 6); - } - set_Value (COLUMNNAME_AD_Language, AD_Language); - } - - /** Get Language. - @return Language for this entity - */ - public String getAD_Language () - { - return (String)get_Value(COLUMNNAME_AD_Language); - } - - /** Set Linked Organization. - @param AD_OrgBP_ID - The Business Partner is another Organization for explicit Inter-Org transactions - */ - public void setAD_OrgBP_ID (String AD_OrgBP_ID) - { - - if (AD_OrgBP_ID != null && AD_OrgBP_ID.length() > 22) - { - log.warning("Length > 22 - truncated"); - AD_OrgBP_ID = AD_OrgBP_ID.substring(0, 22); - } - set_Value (COLUMNNAME_AD_OrgBP_ID, AD_OrgBP_ID); - } - - /** Get Linked Organization. - @return The Business Partner is another Organization for explicit Inter-Org transactions - */ - public String getAD_OrgBP_ID () - { - return (String)get_Value(COLUMNNAME_AD_OrgBP_ID); - } - - /** Set Acquisition Cost. - @param AcqusitionCost - The cost of gaining the prospect as a customer - */ - public void setAcqusitionCost (BigDecimal AcqusitionCost) - { - set_Value (COLUMNNAME_AcqusitionCost, AcqusitionCost); - } - - /** Get Acquisition Cost. - @return The cost of gaining the prospect as a customer - */ - public BigDecimal getAcqusitionCost () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AcqusitionCost); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Actual Life Time Value. - @param ActualLifeTimeValue - Actual Life Time Revenue - */ - public void setActualLifeTimeValue (BigDecimal ActualLifeTimeValue) - { - set_Value (COLUMNNAME_ActualLifeTimeValue, ActualLifeTimeValue); - } - - /** Get Actual Life Time Value. - @return Actual Life Time Revenue - */ - public BigDecimal getActualLifeTimeValue () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ActualLifeTimeValue); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Partner Parent. - @param BPartner_Parent_ID - Business Partner Parent - */ - public void setBPartner_Parent_ID (int BPartner_Parent_ID) - { - if (BPartner_Parent_ID < 1) - set_Value (COLUMNNAME_BPartner_Parent_ID, null); - else - set_Value (COLUMNNAME_BPartner_Parent_ID, Integer.valueOf(BPartner_Parent_ID)); - } - - /** Get Partner Parent. - @return Business Partner Parent - */ - public int getBPartner_Parent_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_BPartner_Parent_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BP_Group getC_BP_Group() throws Exception - { - Class clazz = MTable.getClass(I_C_BP_Group.Table_Name); - I_C_BP_Group result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BP_Group)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BP_Group_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner Group. - @param C_BP_Group_ID - Business Partner Group - */ - public void setC_BP_Group_ID (int C_BP_Group_ID) - { - if (C_BP_Group_ID < 1) - throw new IllegalArgumentException ("C_BP_Group_ID is mandatory."); - set_Value (COLUMNNAME_C_BP_Group_ID, Integer.valueOf(C_BP_Group_ID)); - } - - /** Get Business Partner Group. - @return Business Partner Group - */ - public int getC_BP_Group_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_Group_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - throw new IllegalArgumentException ("C_BPartner_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_Dunning getC_Dunning() throws Exception - { - Class clazz = MTable.getClass(I_C_Dunning.Table_Name); - I_C_Dunning result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Dunning)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Dunning_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Dunning. - @param C_Dunning_ID - Dunning Rules for overdue invoices - */ - public void setC_Dunning_ID (int C_Dunning_ID) - { - if (C_Dunning_ID < 1) - set_Value (COLUMNNAME_C_Dunning_ID, null); - else - set_Value (COLUMNNAME_C_Dunning_ID, Integer.valueOf(C_Dunning_ID)); - } - - /** Get Dunning. - @return Dunning Rules for overdue invoices - */ - public int getC_Dunning_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Dunning_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Greeting getC_Greeting() throws Exception - { - Class clazz = MTable.getClass(I_C_Greeting.Table_Name); - I_C_Greeting result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Greeting)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Greeting_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Greeting. - @param C_Greeting_ID - Greeting to print on correspondence - */ - public void setC_Greeting_ID (int C_Greeting_ID) - { - if (C_Greeting_ID < 1) - set_Value (COLUMNNAME_C_Greeting_ID, null); - else - set_Value (COLUMNNAME_C_Greeting_ID, Integer.valueOf(C_Greeting_ID)); - } - - /** Get Greeting. - @return Greeting to print on correspondence - */ - public int getC_Greeting_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Greeting_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_InvoiceSchedule getC_InvoiceSchedule() throws Exception - { - Class clazz = MTable.getClass(I_C_InvoiceSchedule.Table_Name); - I_C_InvoiceSchedule result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_InvoiceSchedule)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_InvoiceSchedule_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Invoice Schedule. - @param C_InvoiceSchedule_ID - Schedule for generating Invoices - */ - public void setC_InvoiceSchedule_ID (int C_InvoiceSchedule_ID) - { - if (C_InvoiceSchedule_ID < 1) - set_Value (COLUMNNAME_C_InvoiceSchedule_ID, null); - else - set_Value (COLUMNNAME_C_InvoiceSchedule_ID, Integer.valueOf(C_InvoiceSchedule_ID)); - } - - /** Get Invoice Schedule. - @return Schedule for generating Invoices - */ - public int getC_InvoiceSchedule_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_InvoiceSchedule_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_PaymentTerm getC_PaymentTerm() throws Exception - { - Class clazz = MTable.getClass(I_C_PaymentTerm.Table_Name); - I_C_PaymentTerm result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment Term. - @param C_PaymentTerm_ID - The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) - { - if (C_PaymentTerm_ID < 1) - set_Value (COLUMNNAME_C_PaymentTerm_ID, null); - else - set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID)); - } - - /** Get Payment Term. - @return The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set D-U-N-S. - @param DUNS - Dun & Bradstreet Number - */ - public void setDUNS (String DUNS) - { - - if (DUNS != null && DUNS.length() > 11) - { - log.warning("Length > 11 - truncated"); - DUNS = DUNS.substring(0, 11); - } - set_Value (COLUMNNAME_DUNS, DUNS); - } - - /** Get D-U-N-S. - @return Dun & Bradstreet Number - */ - public String getDUNS () - { - return (String)get_Value(COLUMNNAME_DUNS); - } - - /** DeliveryRule AD_Reference_ID=151 */ - public static final int DELIVERYRULE_AD_Reference_ID=151; - /** After Receipt = R */ - public static final String DELIVERYRULE_AfterReceipt = "R"; - /** Availability = A */ - public static final String DELIVERYRULE_Availability = "A"; - /** Complete Line = L */ - public static final String DELIVERYRULE_CompleteLine = "L"; - /** Complete Order = O */ - public static final String DELIVERYRULE_CompleteOrder = "O"; - /** Force = F */ - public static final String DELIVERYRULE_Force = "F"; - /** Manual = M */ - public static final String DELIVERYRULE_Manual = "M"; - /** Set Delivery Rule. - @param DeliveryRule - Defines the timing of Delivery - */ - public void setDeliveryRule (String DeliveryRule) - { - - if (DeliveryRule == null || DeliveryRule.equals("R") || DeliveryRule.equals("A") || DeliveryRule.equals("L") || DeliveryRule.equals("O") || DeliveryRule.equals("F") || DeliveryRule.equals("M")); else throw new IllegalArgumentException ("DeliveryRule Invalid value - " + DeliveryRule + " - Reference_ID=151 - R - A - L - O - F - M"); - if (DeliveryRule != null && DeliveryRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - DeliveryRule = DeliveryRule.substring(0, 1); - } - set_Value (COLUMNNAME_DeliveryRule, DeliveryRule); - } - - /** Get Delivery Rule. - @return Defines the timing of Delivery - */ - public String getDeliveryRule () - { - return (String)get_Value(COLUMNNAME_DeliveryRule); - } - - /** DeliveryViaRule AD_Reference_ID=152 */ - public static final int DELIVERYVIARULE_AD_Reference_ID=152; - /** Pickup = P */ - public static final String DELIVERYVIARULE_Pickup = "P"; - /** Delivery = D */ - public static final String DELIVERYVIARULE_Delivery = "D"; - /** Shipper = S */ - public static final String DELIVERYVIARULE_Shipper = "S"; - /** Set Delivery Via. - @param DeliveryViaRule - How the order will be delivered - */ - public void setDeliveryViaRule (String DeliveryViaRule) - { - - if (DeliveryViaRule == null || DeliveryViaRule.equals("P") || DeliveryViaRule.equals("D") || DeliveryViaRule.equals("S")); else throw new IllegalArgumentException ("DeliveryViaRule Invalid value - " + DeliveryViaRule + " - Reference_ID=152 - P - D - S"); - if (DeliveryViaRule != null && DeliveryViaRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - DeliveryViaRule = DeliveryViaRule.substring(0, 1); - } - set_Value (COLUMNNAME_DeliveryViaRule, DeliveryViaRule); - } - - /** Get Delivery Via. - @return How the order will be delivered - */ - public String getDeliveryViaRule () - { - return (String)get_Value(COLUMNNAME_DeliveryViaRule); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Document Copies. - @param DocumentCopies - Number of copies to be printed - */ - public void setDocumentCopies (int DocumentCopies) - { - set_Value (COLUMNNAME_DocumentCopies, Integer.valueOf(DocumentCopies)); - } - - /** Get Document Copies. - @return Number of copies to be printed - */ - public int getDocumentCopies () - { - Integer ii = (Integer)get_Value(COLUMNNAME_DocumentCopies); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Dunning Grace. - @param DunningGrace Dunning Grace */ - public void setDunningGrace (Timestamp DunningGrace) - { - set_Value (COLUMNNAME_DunningGrace, DunningGrace); - } - - /** Get Dunning Grace. - @return Dunning Grace */ - public Timestamp getDunningGrace () - { - return (Timestamp)get_Value(COLUMNNAME_DunningGrace); - } - - /** Set First Sale. - @param FirstSale - Date of First Sale - */ - public void setFirstSale (Timestamp FirstSale) - { - set_Value (COLUMNNAME_FirstSale, FirstSale); - } - - /** Get First Sale. - @return Date of First Sale - */ - public Timestamp getFirstSale () - { - return (Timestamp)get_Value(COLUMNNAME_FirstSale); - } - - /** Set Flat Discount %. - @param FlatDiscount - Flat discount percentage - */ - public void setFlatDiscount (BigDecimal FlatDiscount) - { - set_Value (COLUMNNAME_FlatDiscount, FlatDiscount); - } - - /** Get Flat Discount %. - @return Flat discount percentage - */ - public BigDecimal getFlatDiscount () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FlatDiscount); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** FreightCostRule AD_Reference_ID=153 */ - public static final int FREIGHTCOSTRULE_AD_Reference_ID=153; - /** Freight included = I */ - public static final String FREIGHTCOSTRULE_FreightIncluded = "I"; - /** Fix price = F */ - public static final String FREIGHTCOSTRULE_FixPrice = "F"; - /** Calculated = C */ - public static final String FREIGHTCOSTRULE_Calculated = "C"; - /** Line = L */ - public static final String FREIGHTCOSTRULE_Line = "L"; - /** Set Freight Cost Rule. - @param FreightCostRule - Method for charging Freight - */ - public void setFreightCostRule (String FreightCostRule) - { - - if (FreightCostRule == null || FreightCostRule.equals("I") || FreightCostRule.equals("F") || FreightCostRule.equals("C") || FreightCostRule.equals("L")); else throw new IllegalArgumentException ("FreightCostRule Invalid value - " + FreightCostRule + " - Reference_ID=153 - I - F - C - L"); - if (FreightCostRule != null && FreightCostRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - FreightCostRule = FreightCostRule.substring(0, 1); - } - set_Value (COLUMNNAME_FreightCostRule, FreightCostRule); - } - - /** Get Freight Cost Rule. - @return Method for charging Freight - */ - public String getFreightCostRule () - { - return (String)get_Value(COLUMNNAME_FreightCostRule); - } - - /** InvoiceRule AD_Reference_ID=150 */ - public static final int INVOICERULE_AD_Reference_ID=150; - /** After Order delivered = O */ - public static final String INVOICERULE_AfterOrderDelivered = "O"; - /** After Delivery = D */ - public static final String INVOICERULE_AfterDelivery = "D"; - /** Customer Schedule after Delivery = S */ - public static final String INVOICERULE_CustomerScheduleAfterDelivery = "S"; - /** Immediate = I */ - public static final String INVOICERULE_Immediate = "I"; - /** Set Invoice Rule. - @param InvoiceRule - Frequency and method of invoicing - */ - public void setInvoiceRule (String InvoiceRule) - { - - if (InvoiceRule == null || InvoiceRule.equals("O") || InvoiceRule.equals("D") || InvoiceRule.equals("S") || InvoiceRule.equals("I")); else throw new IllegalArgumentException ("InvoiceRule Invalid value - " + InvoiceRule + " - Reference_ID=150 - O - D - S - I"); - if (InvoiceRule != null && InvoiceRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - InvoiceRule = InvoiceRule.substring(0, 1); - } - set_Value (COLUMNNAME_InvoiceRule, InvoiceRule); - } - - /** Get Invoice Rule. - @return Frequency and method of invoicing - */ - public String getInvoiceRule () - { - return (String)get_Value(COLUMNNAME_InvoiceRule); - } - - /** Invoice_PrintFormat_ID AD_Reference_ID=261 */ - public static final int INVOICE_PRINTFORMAT_ID_AD_Reference_ID=261; - /** Set Invoice Print Format. - @param Invoice_PrintFormat_ID - Print Format for printing Invoices - */ - public void setInvoice_PrintFormat_ID (int Invoice_PrintFormat_ID) - { - if (Invoice_PrintFormat_ID < 1) - set_Value (COLUMNNAME_Invoice_PrintFormat_ID, null); - else - set_Value (COLUMNNAME_Invoice_PrintFormat_ID, Integer.valueOf(Invoice_PrintFormat_ID)); - } - - /** Get Invoice Print Format. - @return Print Format for printing Invoices - */ - public int getInvoice_PrintFormat_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Invoice_PrintFormat_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Customer. - @param IsCustomer - Indicates if this Business Partner is a Customer - */ - public void setIsCustomer (boolean IsCustomer) - { - set_Value (COLUMNNAME_IsCustomer, Boolean.valueOf(IsCustomer)); - } - - /** Get Customer. - @return Indicates if this Business Partner is a Customer - */ - public boolean isCustomer () - { - Object oo = get_Value(COLUMNNAME_IsCustomer); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Discount Printed. - @param IsDiscountPrinted - Print Discount on Invoice and Order - */ - public void setIsDiscountPrinted (boolean IsDiscountPrinted) - { - set_Value (COLUMNNAME_IsDiscountPrinted, Boolean.valueOf(IsDiscountPrinted)); - } - - /** Get Discount Printed. - @return Print Discount on Invoice and Order - */ - public boolean isDiscountPrinted () - { - Object oo = get_Value(COLUMNNAME_IsDiscountPrinted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Employee. - @param IsEmployee - Indicates if this Business Partner is an employee - */ - public void setIsEmployee (boolean IsEmployee) - { - set_Value (COLUMNNAME_IsEmployee, Boolean.valueOf(IsEmployee)); - } - - /** Get Employee. - @return Indicates if this Business Partner is an employee - */ - public boolean isEmployee () - { - Object oo = get_Value(COLUMNNAME_IsEmployee); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set One time transaction. - @param IsOneTime One time transaction */ - public void setIsOneTime (boolean IsOneTime) - { - set_Value (COLUMNNAME_IsOneTime, Boolean.valueOf(IsOneTime)); - } - - /** Get One time transaction. - @return One time transaction */ - public boolean isOneTime () - { - Object oo = get_Value(COLUMNNAME_IsOneTime); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Prospect. - @param IsProspect - Indicates this is a Prospect - */ - public void setIsProspect (boolean IsProspect) - { - set_Value (COLUMNNAME_IsProspect, Boolean.valueOf(IsProspect)); - } - - /** Get Prospect. - @return Indicates this is a Prospect - */ - public boolean isProspect () - { - Object oo = get_Value(COLUMNNAME_IsProspect); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Sales Representative. - @param IsSalesRep - Indicates if the business partner is a sales representative or company agent - */ - public void setIsSalesRep (boolean IsSalesRep) - { - set_Value (COLUMNNAME_IsSalesRep, Boolean.valueOf(IsSalesRep)); - } - - /** Get Sales Representative. - @return Indicates if the business partner is a sales representative or company agent - */ - public boolean isSalesRep () - { - Object oo = get_Value(COLUMNNAME_IsSalesRep); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Summary Level. - @param IsSummary - This is a summary entity - */ - public void setIsSummary (boolean IsSummary) - { - set_Value (COLUMNNAME_IsSummary, Boolean.valueOf(IsSummary)); - } - - /** Get Summary Level. - @return This is a summary entity - */ - public boolean isSummary () - { - Object oo = get_Value(COLUMNNAME_IsSummary); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Tax exempt. - @param IsTaxExempt - Business partner is exempt from tax - */ - public void setIsTaxExempt (boolean IsTaxExempt) - { - set_Value (COLUMNNAME_IsTaxExempt, Boolean.valueOf(IsTaxExempt)); - } - - /** Get Tax exempt. - @return Business partner is exempt from tax - */ - public boolean isTaxExempt () - { - Object oo = get_Value(COLUMNNAME_IsTaxExempt); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Vendor. - @param IsVendor - Indicates if this Business Partner is a Vendor - */ - public void setIsVendor (boolean IsVendor) - { - set_Value (COLUMNNAME_IsVendor, Boolean.valueOf(IsVendor)); - } - - /** Get Vendor. - @return Indicates if this Business Partner is a Vendor - */ - public boolean isVendor () - { - Object oo = get_Value(COLUMNNAME_IsVendor); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** M_DiscountSchema_ID AD_Reference_ID=325 */ - public static final int M_DISCOUNTSCHEMA_ID_AD_Reference_ID=325; - /** Set Discount Schema. - @param M_DiscountSchema_ID - Schema to calculate the trade discount percentage - */ - public void setM_DiscountSchema_ID (int M_DiscountSchema_ID) - { - if (M_DiscountSchema_ID < 1) - set_Value (COLUMNNAME_M_DiscountSchema_ID, null); - else - set_Value (COLUMNNAME_M_DiscountSchema_ID, Integer.valueOf(M_DiscountSchema_ID)); - } - - /** Get Discount Schema. - @return Schema to calculate the trade discount percentage - */ - public int getM_DiscountSchema_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_DiscountSchema_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_PriceList getM_PriceList() throws Exception - { - Class clazz = MTable.getClass(I_M_PriceList.Table_Name); - I_M_PriceList result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_PriceList)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PriceList_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Price List. - @param M_PriceList_ID - Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID) - { - if (M_PriceList_ID < 1) - set_Value (COLUMNNAME_M_PriceList_ID, null); - else - set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID)); - } - - /** 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(); - } - - /** Set NAICS/SIC. - @param NAICS - Standard Industry Code or its successor NAIC - http://www.osha.gov/oshstats/sicser.html - */ - public void setNAICS (String NAICS) - { - - if (NAICS != null && NAICS.length() > 6) - { - log.warning("Length > 6 - truncated"); - NAICS = NAICS.substring(0, 6); - } - set_Value (COLUMNNAME_NAICS, NAICS); - } - - /** Get NAICS/SIC. - @return Standard Industry Code or its successor NAIC - http://www.osha.gov/oshstats/sicser.html - */ - public String getNAICS () - { - return (String)get_Value(COLUMNNAME_NAICS); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Name 2. - @param Name2 - Additional Name - */ - public void setName2 (String Name2) - { - - if (Name2 != null && Name2.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name2 = Name2.substring(0, 60); - } - set_Value (COLUMNNAME_Name2, Name2); - } - - /** Get Name 2. - @return Additional Name - */ - public String getName2 () - { - return (String)get_Value(COLUMNNAME_Name2); - } - - /** Set Employees. - @param NumberEmployees - Number of employees - */ - public void setNumberEmployees (int NumberEmployees) - { - set_Value (COLUMNNAME_NumberEmployees, Integer.valueOf(NumberEmployees)); - } - - /** Get Employees. - @return Number of employees - */ - public int getNumberEmployees () - { - Integer ii = (Integer)get_Value(COLUMNNAME_NumberEmployees); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Order Reference. - @param POReference - Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public void setPOReference (String POReference) - { - - if (POReference != null && POReference.length() > 20) - { - log.warning("Length > 20 - truncated"); - POReference = POReference.substring(0, 20); - } - set_Value (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); - } - - /** PO_DiscountSchema_ID AD_Reference_ID=325 */ - public static final int PO_DISCOUNTSCHEMA_ID_AD_Reference_ID=325; - /** Set PO Discount Schema. - @param PO_DiscountSchema_ID - Schema to calculate the purchase trade discount percentage - */ - public void setPO_DiscountSchema_ID (int PO_DiscountSchema_ID) - { - if (PO_DiscountSchema_ID < 1) - set_Value (COLUMNNAME_PO_DiscountSchema_ID, null); - else - set_Value (COLUMNNAME_PO_DiscountSchema_ID, Integer.valueOf(PO_DiscountSchema_ID)); - } - - /** Get PO Discount Schema. - @return Schema to calculate the purchase trade discount percentage - */ - public int getPO_DiscountSchema_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_PO_DiscountSchema_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** PO_PaymentTerm_ID AD_Reference_ID=227 */ - public static final int PO_PAYMENTTERM_ID_AD_Reference_ID=227; - /** Set PO Payment Term. - @param PO_PaymentTerm_ID - Payment rules for a purchase order - */ - public void setPO_PaymentTerm_ID (int PO_PaymentTerm_ID) - { - if (PO_PaymentTerm_ID < 1) - set_Value (COLUMNNAME_PO_PaymentTerm_ID, null); - else - set_Value (COLUMNNAME_PO_PaymentTerm_ID, Integer.valueOf(PO_PaymentTerm_ID)); - } - - /** Get PO Payment Term. - @return Payment rules for a purchase order - */ - public int getPO_PaymentTerm_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_PO_PaymentTerm_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** PO_PriceList_ID AD_Reference_ID=166 */ - public static final int PO_PRICELIST_ID_AD_Reference_ID=166; - /** Set Purchase Pricelist. - @param PO_PriceList_ID - Price List used by this Business Partner - */ - public void setPO_PriceList_ID (int PO_PriceList_ID) - { - if (PO_PriceList_ID < 1) - set_Value (COLUMNNAME_PO_PriceList_ID, null); - else - set_Value (COLUMNNAME_PO_PriceList_ID, Integer.valueOf(PO_PriceList_ID)); - } - - /** Get Purchase Pricelist. - @return Price List used by this Business Partner - */ - public int getPO_PriceList_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_PO_PriceList_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** PaymentRule AD_Reference_ID=195 */ - public static final int PAYMENTRULE_AD_Reference_ID=195; - /** Cash = B */ - public static final String PAYMENTRULE_Cash = "B"; - /** Credit Card = K */ - public static final String PAYMENTRULE_CreditCard = "K"; - /** Direct Deposit = T */ - public static final String PAYMENTRULE_DirectDeposit = "T"; - /** Check = S */ - public static final String PAYMENTRULE_Check = "S"; - /** On Credit = P */ - public static final String PAYMENTRULE_OnCredit = "P"; - /** Direct Debit = D */ - public static final String PAYMENTRULE_DirectDebit = "D"; - /** Set Payment Rule. - @param PaymentRule - How you pay the invoice - */ - public void setPaymentRule (String PaymentRule) - { - - if (PaymentRule == null || PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P") || PaymentRule.equals("D")); else throw new IllegalArgumentException ("PaymentRule Invalid value - " + PaymentRule + " - Reference_ID=195 - B - K - T - S - P - D"); - if (PaymentRule != null && PaymentRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - PaymentRule = PaymentRule.substring(0, 1); - } - set_Value (COLUMNNAME_PaymentRule, PaymentRule); - } - - /** Get Payment Rule. - @return How you pay the invoice - */ - public String getPaymentRule () - { - return (String)get_Value(COLUMNNAME_PaymentRule); - } - - /** PaymentRulePO AD_Reference_ID=195 */ - public static final int PAYMENTRULEPO_AD_Reference_ID=195; - /** Cash = B */ - public static final String PAYMENTRULEPO_Cash = "B"; - /** Credit Card = K */ - public static final String PAYMENTRULEPO_CreditCard = "K"; - /** Direct Deposit = T */ - public static final String PAYMENTRULEPO_DirectDeposit = "T"; - /** Check = S */ - public static final String PAYMENTRULEPO_Check = "S"; - /** On Credit = P */ - public static final String PAYMENTRULEPO_OnCredit = "P"; - /** Direct Debit = D */ - public static final String PAYMENTRULEPO_DirectDebit = "D"; - /** Set Payment Rule. - @param PaymentRulePO - Purchase payment option - */ - public void setPaymentRulePO (String PaymentRulePO) - { - - if (PaymentRulePO == null || PaymentRulePO.equals("B") || PaymentRulePO.equals("K") || PaymentRulePO.equals("T") || PaymentRulePO.equals("S") || PaymentRulePO.equals("P") || PaymentRulePO.equals("D")); else throw new IllegalArgumentException ("PaymentRulePO Invalid value - " + PaymentRulePO + " - Reference_ID=195 - B - K - T - S - P - D"); - if (PaymentRulePO != null && PaymentRulePO.length() > 1) - { - log.warning("Length > 1 - truncated"); - PaymentRulePO = PaymentRulePO.substring(0, 1); - } - set_Value (COLUMNNAME_PaymentRulePO, PaymentRulePO); - } - - /** Get Payment Rule. - @return Purchase payment option - */ - public String getPaymentRulePO () - { - return (String)get_Value(COLUMNNAME_PaymentRulePO); - } - - /** Set Potential Life Time Value. - @param PotentialLifeTimeValue - Total Revenue expected - */ - public void setPotentialLifeTimeValue (BigDecimal PotentialLifeTimeValue) - { - set_Value (COLUMNNAME_PotentialLifeTimeValue, PotentialLifeTimeValue); - } - - /** Get Potential Life Time Value. - @return Total Revenue expected - */ - public BigDecimal getPotentialLifeTimeValue () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PotentialLifeTimeValue); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Rating. - @param Rating - Classification or Importance - */ - public void setRating (String Rating) - { - - if (Rating != null && Rating.length() > 1) - { - log.warning("Length > 1 - truncated"); - Rating = Rating.substring(0, 1); - } - set_Value (COLUMNNAME_Rating, Rating); - } - - /** Get Rating. - @return Classification or Importance - */ - public String getRating () - { - return (String)get_Value(COLUMNNAME_Rating); - } - - /** Set Reference No. - @param ReferenceNo - Your customer or vendor number at the Business Partner's site - */ - public void setReferenceNo (String ReferenceNo) - { - - if (ReferenceNo != null && ReferenceNo.length() > 40) - { - log.warning("Length > 40 - truncated"); - ReferenceNo = ReferenceNo.substring(0, 40); - } - set_Value (COLUMNNAME_ReferenceNo, ReferenceNo); - } - - /** Get Reference No. - @return Your customer or vendor number at the Business Partner's site - */ - public String getReferenceNo () - { - return (String)get_Value(COLUMNNAME_ReferenceNo); - } - - /** SOCreditStatus AD_Reference_ID=289 */ - public static final int SOCREDITSTATUS_AD_Reference_ID=289; - /** Credit Stop = S */ - public static final String SOCREDITSTATUS_CreditStop = "S"; - /** Credit Hold = H */ - public static final String SOCREDITSTATUS_CreditHold = "H"; - /** Credit Watch = W */ - public static final String SOCREDITSTATUS_CreditWatch = "W"; - /** No Credit Check = X */ - public static final String SOCREDITSTATUS_NoCreditCheck = "X"; - /** Credit OK = O */ - public static final String SOCREDITSTATUS_CreditOK = "O"; - /** Set Credit Status. - @param SOCreditStatus - Business Partner Credit Status - */ - public void setSOCreditStatus (String SOCreditStatus) - { - - if (SOCreditStatus == null || SOCreditStatus.equals("S") || SOCreditStatus.equals("H") || SOCreditStatus.equals("W") || SOCreditStatus.equals("X") || SOCreditStatus.equals("O")); else throw new IllegalArgumentException ("SOCreditStatus Invalid value - " + SOCreditStatus + " - Reference_ID=289 - S - H - W - X - O"); - if (SOCreditStatus != null && SOCreditStatus.length() > 1) - { - log.warning("Length > 1 - truncated"); - SOCreditStatus = SOCreditStatus.substring(0, 1); - } - set_Value (COLUMNNAME_SOCreditStatus, SOCreditStatus); - } - - /** Get Credit Status. - @return Business Partner Credit Status - */ - public String getSOCreditStatus () - { - return (String)get_Value(COLUMNNAME_SOCreditStatus); - } - - /** Set Credit Limit. - @param SO_CreditLimit - Total outstanding invoice amounts allowed - */ - public void setSO_CreditLimit (BigDecimal SO_CreditLimit) - { - if (SO_CreditLimit == null) - throw new IllegalArgumentException ("SO_CreditLimit is mandatory."); - set_Value (COLUMNNAME_SO_CreditLimit, SO_CreditLimit); - } - - /** Get Credit Limit. - @return Total outstanding invoice amounts allowed - */ - public BigDecimal getSO_CreditLimit () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SO_CreditLimit); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Credit Used. - @param SO_CreditUsed - Current open balance - */ - public void setSO_CreditUsed (BigDecimal SO_CreditUsed) - { - if (SO_CreditUsed == null) - throw new IllegalArgumentException ("SO_CreditUsed is mandatory."); - set_ValueNoCheck (COLUMNNAME_SO_CreditUsed, SO_CreditUsed); - } - - /** Get Credit Used. - @return Current open balance - */ - public BigDecimal getSO_CreditUsed () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SO_CreditUsed); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Order Description. - @param SO_Description - Description to be used on orders - */ - public void setSO_Description (String SO_Description) - { - - if (SO_Description != null && SO_Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - SO_Description = SO_Description.substring(0, 255); - } - set_Value (COLUMNNAME_SO_Description, SO_Description); - } - - /** Get Order Description. - @return Description to be used on orders - */ - public String getSO_Description () - { - return (String)get_Value(COLUMNNAME_SO_Description); - } - - /** SalesRep_ID AD_Reference_ID=190 */ - public static final int SALESREP_ID_AD_Reference_ID=190; - /** Set Sales Representative. - @param SalesRep_ID - Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID) - { - if (SalesRep_ID < 1) - set_Value (COLUMNNAME_SalesRep_ID, null); - else - set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_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(); - } - - /** Set Sales Volume in 1.000. - @param SalesVolume - Total Volume of Sales in Thousands of Currency - */ - public void setSalesVolume (int SalesVolume) - { - set_Value (COLUMNNAME_SalesVolume, Integer.valueOf(SalesVolume)); - } - - /** Get Sales Volume in 1.000. - @return Total Volume of Sales in Thousands of Currency - */ - public int getSalesVolume () - { - Integer ii = (Integer)get_Value(COLUMNNAME_SalesVolume); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Send EMail. - @param SendEMail - Enable sending Document EMail - */ - public void setSendEMail (boolean SendEMail) - { - set_Value (COLUMNNAME_SendEMail, Boolean.valueOf(SendEMail)); - } - - /** Get Send EMail. - @return Enable sending Document EMail - */ - public boolean isSendEMail () - { - Object oo = get_Value(COLUMNNAME_SendEMail); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Share. - @param ShareOfCustomer - Share of Customer's business as a percentage - */ - public void setShareOfCustomer (int ShareOfCustomer) - { - set_Value (COLUMNNAME_ShareOfCustomer, Integer.valueOf(ShareOfCustomer)); - } - - /** Get Share. - @return Share of Customer's business as a percentage - */ - public int getShareOfCustomer () - { - Integer ii = (Integer)get_Value(COLUMNNAME_ShareOfCustomer); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Min Shelf Life %. - @param ShelfLifeMinPct - Minimum Shelf Life in percent based on Product Instance Guarantee Date - */ - public void setShelfLifeMinPct (int ShelfLifeMinPct) - { - set_Value (COLUMNNAME_ShelfLifeMinPct, Integer.valueOf(ShelfLifeMinPct)); - } - - /** Get Min Shelf Life %. - @return Minimum Shelf Life in percent based on Product Instance Guarantee Date - */ - public int getShelfLifeMinPct () - { - Integer ii = (Integer)get_Value(COLUMNNAME_ShelfLifeMinPct); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Tax ID. - @param TaxID - Tax Identification - */ - public void setTaxID (String TaxID) - { - - if (TaxID != null && TaxID.length() > 20) - { - log.warning("Length > 20 - truncated"); - TaxID = TaxID.substring(0, 20); - } - set_Value (COLUMNNAME_TaxID, TaxID); - } - - /** Get Tax ID. - @return Tax Identification - */ - public String getTaxID () - { - return (String)get_Value(COLUMNNAME_TaxID); - } - - /** Set Open Balance. - @param TotalOpenBalance - Total Open Balance Amount in primary Accounting Currency - */ - public void setTotalOpenBalance (BigDecimal TotalOpenBalance) - { - set_Value (COLUMNNAME_TotalOpenBalance, TotalOpenBalance); - } - - /** Get Open Balance. - @return Total Open Balance Amount in primary Accounting Currency - */ - public BigDecimal getTotalOpenBalance () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalOpenBalance); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set URL. - @param URL - Full URL address - e.g. http://www.adempiere.org - */ - public void setURL (String URL) - { - - if (URL != null && URL.length() > 120) - { - log.warning("Length > 120 - truncated"); - URL = URL.substring(0, 120); - } - set_Value (COLUMNNAME_URL, URL); - } - - /** Get URL. - @return Full URL address - e.g. http://www.adempiere.org - */ - public String getURL () - { - return (String)get_Value(COLUMNNAME_URL); - } - - /** Set Search Key. - @param Value - Search key for the record in the format required - must be unique - */ - public void setValue (String Value) - { - if (Value == null) - throw new IllegalArgumentException ("Value is mandatory."); - - if (Value.length() > 40) - { - log.warning("Length > 40 - truncated"); - Value = Value.substring(0, 40); - } - set_Value (COLUMNNAME_Value, Value); - } - - /** Get Search Key. - @return Search key for the record in the format required - must be unique - */ - public String getValue () - { - return (String)get_Value(COLUMNNAME_Value); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_BPartner_Location.java b/base/src/org/compiere/model/X_C_BPartner_Location.java index 58992f8b8d..97bb7f2a0b 100644 --- a/base/src/org/compiere/model/X_C_BPartner_Location.java +++ b/base/src/org/compiere/model/X_C_BPartner_Location.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BPartner_Location * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BPartner_Location extends PO implements I_C_BPartner_Location, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BPartner_Product.java b/base/src/org/compiere/model/X_C_BPartner_Product.java index c375ae3cea..f518ad8a15 100644 --- a/base/src/org/compiere/model/X_C_BPartner_Product.java +++ b/base/src/org/compiere/model/X_C_BPartner_Product.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for C_BPartner_Product * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BPartner_Product extends PO implements I_C_BPartner_Product, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Bank.java b/base/src/org/compiere/model/X_C_Bank.java index da66f43641..ee423cfaf5 100644 --- a/base/src/org/compiere/model/X_C_Bank.java +++ b/base/src/org/compiere/model/X_C_Bank.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Bank * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Bank extends PO implements I_C_Bank, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BankAccount.java b/base/src/org/compiere/model/X_C_BankAccount.java index a2d66d115c..a33632ff39 100644 --- a/base/src/org/compiere/model/X_C_BankAccount.java +++ b/base/src/org/compiere/model/X_C_BankAccount.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BankAccount * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BankAccount extends PO implements I_C_BankAccount, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BankAccountDoc.java b/base/src/org/compiere/model/X_C_BankAccountDoc.java index f9629c8612..48eeac7dba 100644 --- a/base/src/org/compiere/model/X_C_BankAccountDoc.java +++ b/base/src/org/compiere/model/X_C_BankAccountDoc.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BankAccountDoc * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BankAccountDoc extends PO implements I_C_BankAccountDoc, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BankAccount_Acct.java b/base/src/org/compiere/model/X_C_BankAccount_Acct.java index c49fc3e391..05c7f9cc5d 100644 --- a/base/src/org/compiere/model/X_C_BankAccount_Acct.java +++ b/base/src/org/compiere/model/X_C_BankAccount_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_BankAccount_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BankAccount_Acct extends PO implements I_C_BankAccount_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BankStatement.java b/base/src/org/compiere/model/X_C_BankStatement.java index fe0916d416..2b5297cfa7 100644 --- a/base/src/org/compiere/model/X_C_BankStatement.java +++ b/base/src/org/compiere/model/X_C_BankStatement.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BankStatement * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BankStatement extends PO implements I_C_BankStatement, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BankStatementLine.java b/base/src/org/compiere/model/X_C_BankStatementLine.java index b97923af27..dee71ab8ce 100644 --- a/base/src/org/compiere/model/X_C_BankStatementLine.java +++ b/base/src/org/compiere/model/X_C_BankStatementLine.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BankStatementLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BankStatementLine extends PO implements I_C_BankStatementLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BankStatementLoader.java b/base/src/org/compiere/model/X_C_BankStatementLoader.java index f5128fe94a..f801c563f2 100644 --- a/base/src/org/compiere/model/X_C_BankStatementLoader.java +++ b/base/src/org/compiere/model/X_C_BankStatementLoader.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BankStatementLoader * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BankStatementLoader extends PO implements I_C_BankStatementLoader, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_BankStatementMatcher.java b/base/src/org/compiere/model/X_C_BankStatementMatcher.java index 03fe938fb7..e83fa09f8e 100644 --- a/base/src/org/compiere/model/X_C_BankStatementMatcher.java +++ b/base/src/org/compiere/model/X_C_BankStatementMatcher.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_BankStatementMatcher * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_BankStatementMatcher extends PO implements I_C_BankStatementMatcher, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Calendar.java b/base/src/org/compiere/model/X_C_Calendar.java index 58d8bfd50b..7a5bc7aa54 100644 --- a/base/src/org/compiere/model/X_C_Calendar.java +++ b/base/src/org/compiere/model/X_C_Calendar.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Calendar * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Calendar extends PO implements I_C_Calendar, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Campaign.java b/base/src/org/compiere/model/X_C_Campaign.java index 7750a16ce7..8105b83d0a 100644 --- a/base/src/org/compiere/model/X_C_Campaign.java +++ b/base/src/org/compiere/model/X_C_Campaign.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Campaign * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Campaign extends PO implements I_C_Campaign, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Cash.java b/base/src/org/compiere/model/X_C_Cash.java index f12e185901..97252424aa 100644 --- a/base/src/org/compiere/model/X_C_Cash.java +++ b/base/src/org/compiere/model/X_C_Cash.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Cash * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Cash extends PO implements I_C_Cash, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_CashBook.java b/base/src/org/compiere/model/X_C_CashBook.java index 9f40f6c89b..0463805e31 100644 --- a/base/src/org/compiere/model/X_C_CashBook.java +++ b/base/src/org/compiere/model/X_C_CashBook.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_CashBook * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_CashBook extends PO implements I_C_CashBook, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_CashBook_Acct.java b/base/src/org/compiere/model/X_C_CashBook_Acct.java index aec85b8d02..60c5aefdcb 100644 --- a/base/src/org/compiere/model/X_C_CashBook_Acct.java +++ b/base/src/org/compiere/model/X_C_CashBook_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_CashBook_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_CashBook_Acct extends PO implements I_C_CashBook_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_CashLine.java b/base/src/org/compiere/model/X_C_CashLine.java deleted file mode 100644 index 75a7e93a79..0000000000 --- a/base/src/org/compiere/model/X_C_CashLine.java +++ /dev/null @@ -1,498 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_CashLine - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_CashLine extends PO implements I_C_CashLine, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_CashLine (Properties ctx, int C_CashLine_ID, String trxName) - { - super (ctx, C_CashLine_ID, trxName); - /** if (C_CashLine_ID == 0) - { - setAmount (Env.ZERO); - setC_CashLine_ID (0); - setC_Cash_ID (0); - setCashType (null); -// E - setLine (0); -// @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM C_CashLine WHERE C_Cash_ID=@C_Cash_ID@ - setProcessed (false); - } */ - } - - /** Load Constructor */ - public X_C_CashLine (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() - { - StringBuffer sb = new StringBuffer ("X_C_CashLine[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Amount. - @param Amount - Amount in a defined currency - */ - public void setAmount (BigDecimal Amount) - { - if (Amount == null) - throw new IllegalArgumentException ("Amount is mandatory."); - set_Value (COLUMNNAME_Amount, Amount); - } - - /** Get Amount. - @return Amount in a defined currency - */ - public BigDecimal getAmount () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amount); - if (bd == null) - return Env.ZERO; - return bd; - } - - public I_C_BankAccount getC_BankAccount() throws Exception - { - Class clazz = MTable.getClass(I_C_BankAccount.Table_Name); - I_C_BankAccount result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BankAccount)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BankAccount_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Bank Account. - @param C_BankAccount_ID - Account at the Bank - */ - public void setC_BankAccount_ID (int C_BankAccount_ID) - { - if (C_BankAccount_ID < 1) - set_Value (COLUMNNAME_C_BankAccount_ID, null); - else - set_Value (COLUMNNAME_C_BankAccount_ID, Integer.valueOf(C_BankAccount_ID)); - } - - /** Get Bank Account. - @return Account at the Bank - */ - public int getC_BankAccount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BankAccount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Cash Journal Line. - @param C_CashLine_ID - Cash Journal Line - */ - public void setC_CashLine_ID (int C_CashLine_ID) - { - if (C_CashLine_ID < 1) - throw new IllegalArgumentException ("C_CashLine_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_CashLine_ID, Integer.valueOf(C_CashLine_ID)); - } - - /** Get Cash Journal Line. - @return Cash Journal Line - */ - public int getC_CashLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_CashLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Cash getC_Cash() throws Exception - { - Class clazz = MTable.getClass(I_C_Cash.Table_Name); - I_C_Cash result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Cash)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Cash_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Cash Journal. - @param C_Cash_ID - Cash Journal - */ - public void setC_Cash_ID (int C_Cash_ID) - { - if (C_Cash_ID < 1) - throw new IllegalArgumentException ("C_Cash_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Cash_ID, Integer.valueOf(C_Cash_ID)); - } - - /** Get Cash Journal. - @return Cash Journal - */ - public int getC_Cash_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Cash_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getC_Cash_ID())); - } - - public I_C_Charge getC_Charge() throws Exception - { - Class clazz = MTable.getClass(I_C_Charge.Table_Name); - I_C_Charge result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Charge. - @param C_Charge_ID - Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID) - { - if (C_Charge_ID < 1) - set_Value (COLUMNNAME_C_Charge_ID, null); - else - set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); - } - - /** Get Charge. - @return Additional document charges - */ - public int getC_Charge_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_Currency_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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 I_C_Invoice getC_Invoice() throws Exception - { - Class clazz = MTable.getClass(I_C_Invoice.Table_Name); - I_C_Invoice result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Invoice)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Invoice_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Invoice. - @param C_Invoice_ID - Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID) - { - if (C_Invoice_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID)); - } - - /** Get Invoice. - @return Invoice Identifier - */ - public int getC_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** CashType AD_Reference_ID=217 */ - public static final int CASHTYPE_AD_Reference_ID=217; - /** Bank Account Transfer = T */ - public static final String CASHTYPE_BankAccountTransfer = "T"; - /** Invoice = I */ - public static final String CASHTYPE_Invoice = "I"; - /** General Expense = E */ - public static final String CASHTYPE_GeneralExpense = "E"; - /** General Receipts = R */ - public static final String CASHTYPE_GeneralReceipts = "R"; - /** Charge = C */ - public static final String CASHTYPE_Charge = "C"; - /** Difference = D */ - public static final String CASHTYPE_Difference = "D"; - /** Set Cash Type. - @param CashType - Source of Cash - */ - public void setCashType (String CashType) - { - if (CashType == null) throw new IllegalArgumentException ("CashType is mandatory"); - if (CashType.equals("T") || CashType.equals("I") || CashType.equals("E") || CashType.equals("R") || CashType.equals("C") || CashType.equals("D")); else throw new IllegalArgumentException ("CashType Invalid value - " + CashType + " - Reference_ID=217 - T - I - E - R - C - D"); - if (CashType.length() > 1) - { - log.warning("Length > 1 - truncated"); - CashType = CashType.substring(0, 1); - } - set_ValueNoCheck (COLUMNNAME_CashType, CashType); - } - - /** Get Cash Type. - @return Source of Cash - */ - public String getCashType () - { - return (String)get_Value(COLUMNNAME_CashType); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Discount Amount. - @param DiscountAmt - Calculated amount of discount - */ - public void setDiscountAmt (BigDecimal DiscountAmt) - { - set_Value (COLUMNNAME_DiscountAmt, DiscountAmt); - } - - /** Get Discount Amount. - @return Calculated amount of discount - */ - public BigDecimal getDiscountAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DiscountAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Generated. - @param IsGenerated - This Line is generated - */ - public void setIsGenerated (boolean IsGenerated) - { - set_ValueNoCheck (COLUMNNAME_IsGenerated, Boolean.valueOf(IsGenerated)); - } - - /** Get Generated. - @return This Line is generated - */ - public boolean isGenerated () - { - Object oo = get_Value(COLUMNNAME_IsGenerated); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Line No. - @param Line - Unique line for this document - */ - public void setLine (int Line) - { - set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); - } - - /** Get Line No. - @return Unique line for this document - */ - public int getLine () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Line); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Write-off Amount. - @param WriteOffAmt - Amount to write-off - */ - public void setWriteOffAmt (BigDecimal WriteOffAmt) - { - set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt); - } - - /** Get Write-off Amount. - @return Amount to write-off - */ - public BigDecimal getWriteOffAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt); - if (bd == null) - return Env.ZERO; - return bd; - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_Channel.java b/base/src/org/compiere/model/X_C_Channel.java index 71f217c5ce..394bd1d348 100644 --- a/base/src/org/compiere/model/X_C_Channel.java +++ b/base/src/org/compiere/model/X_C_Channel.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Channel * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Channel extends PO implements I_C_Channel, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Charge.java b/base/src/org/compiere/model/X_C_Charge.java index c8cddb22f6..7dda7f8fbd 100644 --- a/base/src/org/compiere/model/X_C_Charge.java +++ b/base/src/org/compiere/model/X_C_Charge.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Charge * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Charge extends PO implements I_C_Charge, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Charge_Acct.java b/base/src/org/compiere/model/X_C_Charge_Acct.java index 0a6800eca2..ab26fd75ff 100644 --- a/base/src/org/compiere/model/X_C_Charge_Acct.java +++ b/base/src/org/compiere/model/X_C_Charge_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_Charge_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Charge_Acct extends PO implements I_C_Charge_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_City.java b/base/src/org/compiere/model/X_C_City.java index 33ead9ebe8..16b6f20e9c 100644 --- a/base/src/org/compiere/model/X_C_City.java +++ b/base/src/org/compiere/model/X_C_City.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_City * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_City extends PO implements I_C_City, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Commission.java b/base/src/org/compiere/model/X_C_Commission.java index 3a045f9e1e..ce474c9be3 100644 --- a/base/src/org/compiere/model/X_C_Commission.java +++ b/base/src/org/compiere/model/X_C_Commission.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Commission * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Commission extends PO implements I_C_Commission, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_CommissionAmt.java b/base/src/org/compiere/model/X_C_CommissionAmt.java index f528da8121..abd3c217b3 100644 --- a/base/src/org/compiere/model/X_C_CommissionAmt.java +++ b/base/src/org/compiere/model/X_C_CommissionAmt.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_CommissionAmt * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_CommissionAmt extends PO implements I_C_CommissionAmt, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_CommissionDetail.java b/base/src/org/compiere/model/X_C_CommissionDetail.java index 98564f65d3..059fed56a3 100644 --- a/base/src/org/compiere/model/X_C_CommissionDetail.java +++ b/base/src/org/compiere/model/X_C_CommissionDetail.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_CommissionDetail * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_CommissionDetail extends PO implements I_C_CommissionDetail, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_CommissionLine.java b/base/src/org/compiere/model/X_C_CommissionLine.java index c18841d5be..1aaff7268b 100644 --- a/base/src/org/compiere/model/X_C_CommissionLine.java +++ b/base/src/org/compiere/model/X_C_CommissionLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_CommissionLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_CommissionLine extends PO implements I_C_CommissionLine, I_Persistent { @@ -506,6 +506,44 @@ public class X_C_CommissionLine extends PO implements I_C_CommissionLine, I_Pers return ii.intValue(); } + /** PaymentRule AD_Reference_ID=195 */ + public static final int PAYMENTRULE_AD_Reference_ID=195; + /** Cash = B */ + public static final String PAYMENTRULE_Cash = "B"; + /** Credit Card = K */ + public static final String PAYMENTRULE_CreditCard = "K"; + /** Direct Deposit = T */ + public static final String PAYMENTRULE_DirectDeposit = "T"; + /** Check = S */ + public static final String PAYMENTRULE_Check = "S"; + /** On Credit = P */ + public static final String PAYMENTRULE_OnCredit = "P"; + /** Direct Debit = D */ + public static final String PAYMENTRULE_DirectDebit = "D"; + /** Set Payment Rule. + @param PaymentRule + How you pay the invoice + */ + public void setPaymentRule (String PaymentRule) + { + + if (PaymentRule == null || PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P") || PaymentRule.equals("D")); else throw new IllegalArgumentException ("PaymentRule Invalid value - " + PaymentRule + " - Reference_ID=195 - B - K - T - S - P - D"); + if (PaymentRule != null && PaymentRule.length() > 1) + { + log.warning("Length > 1 - truncated"); + PaymentRule = PaymentRule.substring(0, 1); + } + set_Value (COLUMNNAME_PaymentRule, PaymentRule); + } + + /** Get Payment Rule. + @return How you pay the invoice + */ + public String getPaymentRule () + { + return (String)get_Value(COLUMNNAME_PaymentRule); + } + /** Set Multiplier Quantity. @param QtyMultiplier Value to multiply quantities by for generating commissions. diff --git a/base/src/org/compiere/model/X_C_CommissionRun.java b/base/src/org/compiere/model/X_C_CommissionRun.java index fcb71b1940..97a3484277 100644 --- a/base/src/org/compiere/model/X_C_CommissionRun.java +++ b/base/src/org/compiere/model/X_C_CommissionRun.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_CommissionRun * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_CommissionRun extends PO implements I_C_CommissionRun, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ConversionType.java b/base/src/org/compiere/model/X_C_ConversionType.java index 542b941c00..49f6d7da4e 100644 --- a/base/src/org/compiere/model/X_C_ConversionType.java +++ b/base/src/org/compiere/model/X_C_ConversionType.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ConversionType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ConversionType extends PO implements I_C_ConversionType, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Conversion_Rate.java b/base/src/org/compiere/model/X_C_Conversion_Rate.java index 1c4e61e700..f59b3a9cbb 100644 --- a/base/src/org/compiere/model/X_C_Conversion_Rate.java +++ b/base/src/org/compiere/model/X_C_Conversion_Rate.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Conversion_Rate * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Conversion_Rate extends PO implements I_C_Conversion_Rate, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Country.java b/base/src/org/compiere/model/X_C_Country.java index a81075a495..0a6d3b7841 100644 --- a/base/src/org/compiere/model/X_C_Country.java +++ b/base/src/org/compiere/model/X_C_Country.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Country * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Country extends PO implements I_C_Country, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Currency.java b/base/src/org/compiere/model/X_C_Currency.java index ea51de4d5c..962654b75b 100644 --- a/base/src/org/compiere/model/X_C_Currency.java +++ b/base/src/org/compiere/model/X_C_Currency.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Currency * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Currency extends PO implements I_C_Currency, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Currency_Acct.java b/base/src/org/compiere/model/X_C_Currency_Acct.java index 52cbd12cd7..7fffb6b720 100644 --- a/base/src/org/compiere/model/X_C_Currency_Acct.java +++ b/base/src/org/compiere/model/X_C_Currency_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_Currency_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Currency_Acct extends PO implements I_C_Currency_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Cycle.java b/base/src/org/compiere/model/X_C_Cycle.java index c82a7c1c41..2b0f709eb7 100644 --- a/base/src/org/compiere/model/X_C_Cycle.java +++ b/base/src/org/compiere/model/X_C_Cycle.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Cycle * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Cycle extends PO implements I_C_Cycle, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_CyclePhase.java b/base/src/org/compiere/model/X_C_CyclePhase.java index e928686968..0ec2d97405 100644 --- a/base/src/org/compiere/model/X_C_CyclePhase.java +++ b/base/src/org/compiere/model/X_C_CyclePhase.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_CyclePhase * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_CyclePhase extends PO implements I_C_CyclePhase, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_CycleStep.java b/base/src/org/compiere/model/X_C_CycleStep.java index 36b7ffbe0a..c4ee1f8c28 100644 --- a/base/src/org/compiere/model/X_C_CycleStep.java +++ b/base/src/org/compiere/model/X_C_CycleStep.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_CycleStep * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_CycleStep extends PO implements I_C_CycleStep, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_DocType.java b/base/src/org/compiere/model/X_C_DocType.java deleted file mode 100644 index e079d8c35e..0000000000 --- a/base/src/org/compiere/model/X_C_DocType.java +++ /dev/null @@ -1,908 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_DocType - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_DocType extends PO implements I_C_DocType, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_DocType (Properties ctx, int C_DocType_ID, String trxName) - { - super (ctx, C_DocType_ID, trxName); - /** if (C_DocType_ID == 0) - { - setC_DocType_ID (0); - setDocBaseType (null); - setDocumentCopies (0); -// 1 - setGL_Category_ID (0); - setHasCharges (false); - setIsCreateCounter (true); -// Y - setIsDefault (false); - setIsDefaultCounterDoc (false); - setIsDocNoControlled (true); -// Y - setIsInTransit (false); - setIsIndexed (false); - setIsPickQAConfirm (false); - setIsSOTrx (false); - setIsShipConfirm (false); - setIsSplitWhenDifference (false); -// N - setName (null); - setPrintName (null); - } */ - } - - /** Load Constructor */ - public X_C_DocType (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 6 - System - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_C_DocType[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_AD_PrintFormat getAD_PrintFormat() throws Exception - { - Class clazz = MTable.getClass(I_AD_PrintFormat.Table_Name); - I_AD_PrintFormat result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_PrintFormat)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_PrintFormat_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Print Format. - @param AD_PrintFormat_ID - Data Print Format - */ - public void setAD_PrintFormat_ID (int AD_PrintFormat_ID) - { - if (AD_PrintFormat_ID < 1) - set_Value (COLUMNNAME_AD_PrintFormat_ID, null); - else - set_Value (COLUMNNAME_AD_PrintFormat_ID, Integer.valueOf(AD_PrintFormat_ID)); - } - - /** Get Print Format. - @return Data Print Format - */ - public int getAD_PrintFormat_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_PrintFormat_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_DocTypeDifference_ID AD_Reference_ID=170 */ - public static final int C_DOCTYPEDIFFERENCE_ID_AD_Reference_ID=170; - /** Set Difference Document. - @param C_DocTypeDifference_ID - Document type for generating in dispute Shipments - */ - public void setC_DocTypeDifference_ID (int C_DocTypeDifference_ID) - { - if (C_DocTypeDifference_ID < 1) - set_Value (COLUMNNAME_C_DocTypeDifference_ID, null); - else - set_Value (COLUMNNAME_C_DocTypeDifference_ID, Integer.valueOf(C_DocTypeDifference_ID)); - } - - /** Get Difference Document. - @return Document type for generating in dispute Shipments - */ - public int getC_DocTypeDifference_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeDifference_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_DocTypeInvoice_ID AD_Reference_ID=170 */ - public static final int C_DOCTYPEINVOICE_ID_AD_Reference_ID=170; - /** Set Document Type for Invoice. - @param C_DocTypeInvoice_ID - Document type used for invoices generated from this sales document - */ - public void setC_DocTypeInvoice_ID (int C_DocTypeInvoice_ID) - { - if (C_DocTypeInvoice_ID < 1) - set_Value (COLUMNNAME_C_DocTypeInvoice_ID, null); - else - set_Value (COLUMNNAME_C_DocTypeInvoice_ID, Integer.valueOf(C_DocTypeInvoice_ID)); - } - - /** Get Document Type for Invoice. - @return Document type used for invoices generated from this sales document - */ - public int getC_DocTypeInvoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeInvoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_DocTypeProforma_ID AD_Reference_ID=170 */ - public static final int C_DOCTYPEPROFORMA_ID_AD_Reference_ID=170; - /** Set Document Type for ProForma. - @param C_DocTypeProforma_ID - Document type used for pro forma invoices generated from this sales document - */ - public void setC_DocTypeProforma_ID (int C_DocTypeProforma_ID) - { - if (C_DocTypeProforma_ID < 1) - set_Value (COLUMNNAME_C_DocTypeProforma_ID, null); - else - set_Value (COLUMNNAME_C_DocTypeProforma_ID, Integer.valueOf(C_DocTypeProforma_ID)); - } - - /** Get Document Type for ProForma. - @return Document type used for pro forma invoices generated from this sales document - */ - public int getC_DocTypeProforma_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeProforma_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_DocTypeShipment_ID AD_Reference_ID=170 */ - public static final int C_DOCTYPESHIPMENT_ID_AD_Reference_ID=170; - /** Set Document Type for Shipment. - @param C_DocTypeShipment_ID - Document type used for shipments generated from this sales document - */ - public void setC_DocTypeShipment_ID (int C_DocTypeShipment_ID) - { - if (C_DocTypeShipment_ID < 1) - set_Value (COLUMNNAME_C_DocTypeShipment_ID, null); - else - set_Value (COLUMNNAME_C_DocTypeShipment_ID, Integer.valueOf(C_DocTypeShipment_ID)); - } - - /** Get Document Type for Shipment. - @return Document type used for shipments generated from this sales document - */ - public int getC_DocTypeShipment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeShipment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 0) - throw new IllegalArgumentException ("C_DocType_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** DefiniteSequence_ID AD_Reference_ID=128 */ - public static final int DEFINITESEQUENCE_ID_AD_Reference_ID=128; - /** Set Definite Sequence. - @param DefiniteSequence_ID Definite Sequence */ - public void setDefiniteSequence_ID (int DefiniteSequence_ID) - { - if (DefiniteSequence_ID < 1) - set_Value (COLUMNNAME_DefiniteSequence_ID, null); - else - set_Value (COLUMNNAME_DefiniteSequence_ID, Integer.valueOf(DefiniteSequence_ID)); - } - - /** Get Definite Sequence. - @return Definite Sequence */ - public int getDefiniteSequence_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_DefiniteSequence_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** DocBaseType AD_Reference_ID=183 */ - public static final int DOCBASETYPE_AD_Reference_ID=183; - /** GL Journal = GLJ */ - public static final String DOCBASETYPE_GLJournal = "GLJ"; - /** GL Document = GLD */ - public static final String DOCBASETYPE_GLDocument = "GLD"; - /** AP Invoice = API */ - public static final String DOCBASETYPE_APInvoice = "API"; - /** AP Payment = APP */ - public static final String DOCBASETYPE_APPayment = "APP"; - /** AR Invoice = ARI */ - public static final String DOCBASETYPE_ARInvoice = "ARI"; - /** AR Receipt = ARR */ - public static final String DOCBASETYPE_ARReceipt = "ARR"; - /** Sales Order = SOO */ - public static final String DOCBASETYPE_SalesOrder = "SOO"; - /** AR Pro Forma Invoice = ARF */ - public static final String DOCBASETYPE_ARProFormaInvoice = "ARF"; - /** Material Delivery = MMS */ - public static final String DOCBASETYPE_MaterialDelivery = "MMS"; - /** Material Receipt = MMR */ - public static final String DOCBASETYPE_MaterialReceipt = "MMR"; - /** Material Movement = MMM */ - public static final String DOCBASETYPE_MaterialMovement = "MMM"; - /** Purchase Order = POO */ - public static final String DOCBASETYPE_PurchaseOrder = "POO"; - /** Purchase Requisition = POR */ - public static final String DOCBASETYPE_PurchaseRequisition = "POR"; - /** Material Physical Inventory = MMI */ - public static final String DOCBASETYPE_MaterialPhysicalInventory = "MMI"; - /** AP Credit Memo = APC */ - public static final String DOCBASETYPE_APCreditMemo = "APC"; - /** AR Credit Memo = ARC */ - public static final String DOCBASETYPE_ARCreditMemo = "ARC"; - /** Bank Statement = CMB */ - public static final String DOCBASETYPE_BankStatement = "CMB"; - /** Cash Journal = CMC */ - public static final String DOCBASETYPE_CashJournal = "CMC"; - /** Payment Allocation = CMA */ - public static final String DOCBASETYPE_PaymentAllocation = "CMA"; - /** Material Production = MMP */ - public static final String DOCBASETYPE_MaterialProduction = "MMP"; - /** Match Invoice = MXI */ - public static final String DOCBASETYPE_MatchInvoice = "MXI"; - /** Match PO = MXP */ - public static final String DOCBASETYPE_MatchPO = "MXP"; - /** Project Issue = PJI */ - public static final String DOCBASETYPE_ProjectIssue = "PJI"; - /** Set Document BaseType. - @param DocBaseType - Logical type of document - */ - public void setDocBaseType (String DocBaseType) - { - if (DocBaseType == null) throw new IllegalArgumentException ("DocBaseType is mandatory"); - if (DocBaseType.equals("GLJ") || DocBaseType.equals("GLD") || DocBaseType.equals("API") || DocBaseType.equals("APP") || DocBaseType.equals("ARI") || DocBaseType.equals("ARR") || DocBaseType.equals("SOO") || DocBaseType.equals("ARF") || DocBaseType.equals("MMS") || DocBaseType.equals("MMR") || DocBaseType.equals("MMM") || DocBaseType.equals("POO") || DocBaseType.equals("POR") || DocBaseType.equals("MMI") || DocBaseType.equals("APC") || DocBaseType.equals("ARC") || DocBaseType.equals("CMB") || DocBaseType.equals("CMC") || DocBaseType.equals("CMA") || DocBaseType.equals("MMP") || DocBaseType.equals("MXI") || DocBaseType.equals("MXP") || DocBaseType.equals("PJI")); else throw new IllegalArgumentException ("DocBaseType Invalid value - " + DocBaseType + " - Reference_ID=183 - GLJ - GLD - API - APP - ARI - ARR - SOO - ARF - MMS - MMR - MMM - POO - POR - MMI - APC - ARC - CMB - CMC - CMA - MMP - MXI - MXP - PJI"); - if (DocBaseType.length() > 3) - { - log.warning("Length > 3 - truncated"); - DocBaseType = DocBaseType.substring(0, 3); - } - set_Value (COLUMNNAME_DocBaseType, DocBaseType); - } - - /** Get Document BaseType. - @return Logical type of document - */ - public String getDocBaseType () - { - return (String)get_Value(COLUMNNAME_DocBaseType); - } - - /** DocNoSequence_ID AD_Reference_ID=128 */ - public static final int DOCNOSEQUENCE_ID_AD_Reference_ID=128; - /** Set Document Sequence. - @param DocNoSequence_ID - Document sequence determines the numbering of documents - */ - public void setDocNoSequence_ID (int DocNoSequence_ID) - { - if (DocNoSequence_ID < 1) - set_Value (COLUMNNAME_DocNoSequence_ID, null); - else - set_Value (COLUMNNAME_DocNoSequence_ID, Integer.valueOf(DocNoSequence_ID)); - } - - /** Get Document Sequence. - @return Document sequence determines the numbering of documents - */ - public int getDocNoSequence_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_DocNoSequence_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** DocSubTypeSO AD_Reference_ID=148 */ - public static final int DOCSUBTYPESO_AD_Reference_ID=148; - /** On Credit Order = WI */ - public static final String DOCSUBTYPESO_OnCreditOrder = "WI"; - /** POS Order = WR */ - public static final String DOCSUBTYPESO_POSOrder = "WR"; - /** Warehouse Order = WP */ - public static final String DOCSUBTYPESO_WarehouseOrder = "WP"; - /** Standard Order = SO */ - public static final String DOCSUBTYPESO_StandardOrder = "SO"; - /** Proposal = ON */ - public static final String DOCSUBTYPESO_Proposal = "ON"; - /** Quotation = OB */ - public static final String DOCSUBTYPESO_Quotation = "OB"; - /** Return Material = RM */ - public static final String DOCSUBTYPESO_ReturnMaterial = "RM"; - /** Prepay Order = PR */ - public static final String DOCSUBTYPESO_PrepayOrder = "PR"; - /** Set SO Sub Type. - @param DocSubTypeSO - Sales Order Sub Type - */ - public void setDocSubTypeSO (String DocSubTypeSO) - { - - if (DocSubTypeSO == null || DocSubTypeSO.equals("WI") || DocSubTypeSO.equals("WR") || DocSubTypeSO.equals("WP") || DocSubTypeSO.equals("SO") || DocSubTypeSO.equals("ON") || DocSubTypeSO.equals("OB") || DocSubTypeSO.equals("RM") || DocSubTypeSO.equals("PR")); else throw new IllegalArgumentException ("DocSubTypeSO Invalid value - " + DocSubTypeSO + " - Reference_ID=148 - WI - WR - WP - SO - ON - OB - RM - PR"); - if (DocSubTypeSO != null && DocSubTypeSO.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocSubTypeSO = DocSubTypeSO.substring(0, 2); - } - set_Value (COLUMNNAME_DocSubTypeSO, DocSubTypeSO); - } - - /** Get SO Sub Type. - @return Sales Order Sub Type - */ - public String getDocSubTypeSO () - { - return (String)get_Value(COLUMNNAME_DocSubTypeSO); - } - - /** Set Document Copies. - @param DocumentCopies - Number of copies to be printed - */ - public void setDocumentCopies (int DocumentCopies) - { - set_Value (COLUMNNAME_DocumentCopies, Integer.valueOf(DocumentCopies)); - } - - /** Get Document Copies. - @return Number of copies to be printed - */ - public int getDocumentCopies () - { - Integer ii = (Integer)get_Value(COLUMNNAME_DocumentCopies); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Document Note. - @param DocumentNote - Additional information for a Document - */ - public void setDocumentNote (String DocumentNote) - { - - if (DocumentNote != null && DocumentNote.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - DocumentNote = DocumentNote.substring(0, 2000); - } - set_Value (COLUMNNAME_DocumentNote, DocumentNote); - } - - /** Get Document Note. - @return Additional information for a Document - */ - public String getDocumentNote () - { - return (String)get_Value(COLUMNNAME_DocumentNote); - } - - public I_GL_Category getGL_Category() throws Exception - { - Class clazz = MTable.getClass(I_GL_Category.Table_Name); - I_GL_Category result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_GL_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Category_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set GL Category. - @param GL_Category_ID - General Ledger Category - */ - public void setGL_Category_ID (int GL_Category_ID) - { - if (GL_Category_ID < 1) - throw new IllegalArgumentException ("GL_Category_ID is mandatory."); - set_Value (COLUMNNAME_GL_Category_ID, Integer.valueOf(GL_Category_ID)); - } - - /** Get GL Category. - @return General Ledger Category - */ - public int getGL_Category_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_Category_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Charges. - @param HasCharges - Charges can be added to the document - */ - public void setHasCharges (boolean HasCharges) - { - set_Value (COLUMNNAME_HasCharges, Boolean.valueOf(HasCharges)); - } - - /** Get Charges. - @return Charges can be added to the document - */ - public boolean isHasCharges () - { - Object oo = get_Value(COLUMNNAME_HasCharges); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Pro forma Invoice. - @param HasProforma - Indicates if Pro Forma Invoices can be generated from this document - */ - public void setHasProforma (boolean HasProforma) - { - set_Value (COLUMNNAME_HasProforma, Boolean.valueOf(HasProforma)); - } - - /** Get Pro forma Invoice. - @return Indicates if Pro Forma Invoices can be generated from this document - */ - public boolean isHasProforma () - { - Object oo = get_Value(COLUMNNAME_HasProforma); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Create Counter Document. - @param IsCreateCounter - Create Counter Document - */ - public void setIsCreateCounter (boolean IsCreateCounter) - { - set_Value (COLUMNNAME_IsCreateCounter, Boolean.valueOf(IsCreateCounter)); - } - - /** Get Create Counter Document. - @return Create Counter Document - */ - public boolean isCreateCounter () - { - Object oo = get_Value(COLUMNNAME_IsCreateCounter); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Default. - @param IsDefault - Default value - */ - public void setIsDefault (boolean IsDefault) - { - set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); - } - - /** Get Default. - @return Default value - */ - public boolean isDefault () - { - Object oo = get_Value(COLUMNNAME_IsDefault); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Default Counter Document. - @param IsDefaultCounterDoc - The document type is the default counter document type - */ - public void setIsDefaultCounterDoc (boolean IsDefaultCounterDoc) - { - set_Value (COLUMNNAME_IsDefaultCounterDoc, Boolean.valueOf(IsDefaultCounterDoc)); - } - - /** Get Default Counter Document. - @return The document type is the default counter document type - */ - public boolean isDefaultCounterDoc () - { - Object oo = get_Value(COLUMNNAME_IsDefaultCounterDoc); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Document is Number Controlled. - @param IsDocNoControlled - The document has a document sequence - */ - public void setIsDocNoControlled (boolean IsDocNoControlled) - { - set_Value (COLUMNNAME_IsDocNoControlled, Boolean.valueOf(IsDocNoControlled)); - } - - /** Get Document is Number Controlled. - @return The document has a document sequence - */ - public boolean isDocNoControlled () - { - Object oo = get_Value(COLUMNNAME_IsDocNoControlled); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set In Transit. - @param IsInTransit - Movement is in transit - */ - public void setIsInTransit (boolean IsInTransit) - { - set_Value (COLUMNNAME_IsInTransit, Boolean.valueOf(IsInTransit)); - } - - /** Get In Transit. - @return Movement is in transit - */ - public boolean isInTransit () - { - Object oo = get_Value(COLUMNNAME_IsInTransit); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Indexed. - @param IsIndexed - Index the document for the internal search engine - */ - public void setIsIndexed (boolean IsIndexed) - { - set_Value (COLUMNNAME_IsIndexed, Boolean.valueOf(IsIndexed)); - } - - /** Get Indexed. - @return Index the document for the internal search engine - */ - public boolean isIndexed () - { - Object oo = get_Value(COLUMNNAME_IsIndexed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Overwrite Date on Complete. - @param IsOverwriteDateOnComplete Overwrite Date on Complete */ - public void setIsOverwriteDateOnComplete (boolean IsOverwriteDateOnComplete) - { - set_Value (COLUMNNAME_IsOverwriteDateOnComplete, Boolean.valueOf(IsOverwriteDateOnComplete)); - } - - /** Get Overwrite Date on Complete. - @return Overwrite Date on Complete */ - public boolean isOverwriteDateOnComplete () - { - Object oo = get_Value(COLUMNNAME_IsOverwriteDateOnComplete); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Overwrite Sequence on Complete. - @param IsOverwriteSeqOnComplete Overwrite Sequence on Complete */ - public void setIsOverwriteSeqOnComplete (boolean IsOverwriteSeqOnComplete) - { - set_Value (COLUMNNAME_IsOverwriteSeqOnComplete, Boolean.valueOf(IsOverwriteSeqOnComplete)); - } - - /** Get Overwrite Sequence on Complete. - @return Overwrite Sequence on Complete */ - public boolean isOverwriteSeqOnComplete () - { - Object oo = get_Value(COLUMNNAME_IsOverwriteSeqOnComplete); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Pick/QA Confirmation. - @param IsPickQAConfirm - Require Pick or QA Confirmation before processing - */ - public void setIsPickQAConfirm (boolean IsPickQAConfirm) - { - set_Value (COLUMNNAME_IsPickQAConfirm, Boolean.valueOf(IsPickQAConfirm)); - } - - /** Get Pick/QA Confirmation. - @return Require Pick or QA Confirmation before processing - */ - public boolean isPickQAConfirm () - { - Object oo = get_Value(COLUMNNAME_IsPickQAConfirm); - 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_Value (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 Ship/Receipt Confirmation. - @param IsShipConfirm - Require Ship or Receipt Confirmation before processing - */ - public void setIsShipConfirm (boolean IsShipConfirm) - { - set_Value (COLUMNNAME_IsShipConfirm, Boolean.valueOf(IsShipConfirm)); - } - - /** Get Ship/Receipt Confirmation. - @return Require Ship or Receipt Confirmation before processing - */ - public boolean isShipConfirm () - { - Object oo = get_Value(COLUMNNAME_IsShipConfirm); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Split when Difference. - @param IsSplitWhenDifference - Split document when there is a difference - */ - public void setIsSplitWhenDifference (boolean IsSplitWhenDifference) - { - set_Value (COLUMNNAME_IsSplitWhenDifference, Boolean.valueOf(IsSplitWhenDifference)); - } - - /** Get Split when Difference. - @return Split document when there is a difference - */ - public boolean isSplitWhenDifference () - { - Object oo = get_Value(COLUMNNAME_IsSplitWhenDifference); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Print Text. - @param PrintName - The label text to be printed on a document or correspondence. - */ - public void setPrintName (String PrintName) - { - if (PrintName == null) - throw new IllegalArgumentException ("PrintName is mandatory."); - - if (PrintName.length() > 60) - { - log.warning("Length > 60 - truncated"); - PrintName = PrintName.substring(0, 60); - } - set_Value (COLUMNNAME_PrintName, PrintName); - } - - /** Get Print Text. - @return The label text to be printed on a document or correspondence. - */ - public String getPrintName () - { - return (String)get_Value(COLUMNNAME_PrintName); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_DocTypeCounter.java b/base/src/org/compiere/model/X_C_DocTypeCounter.java index 2819c44d0e..c7e9ddbeec 100644 --- a/base/src/org/compiere/model/X_C_DocTypeCounter.java +++ b/base/src/org/compiere/model/X_C_DocTypeCounter.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_DocTypeCounter * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_DocTypeCounter extends PO implements I_C_DocTypeCounter, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Dunning.java b/base/src/org/compiere/model/X_C_Dunning.java index c7acae705b..fd30a0c331 100644 --- a/base/src/org/compiere/model/X_C_Dunning.java +++ b/base/src/org/compiere/model/X_C_Dunning.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Dunning * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Dunning extends PO implements I_C_Dunning, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_DunningLevel.java b/base/src/org/compiere/model/X_C_DunningLevel.java index b7b879252c..4ba8722050 100644 --- a/base/src/org/compiere/model/X_C_DunningLevel.java +++ b/base/src/org/compiere/model/X_C_DunningLevel.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_DunningLevel * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_DunningLevel extends PO implements I_C_DunningLevel, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_DunningRun.java b/base/src/org/compiere/model/X_C_DunningRun.java index 1b0c7162e7..3031d5ef9d 100644 --- a/base/src/org/compiere/model/X_C_DunningRun.java +++ b/base/src/org/compiere/model/X_C_DunningRun.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_DunningRun * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_DunningRun extends PO implements I_C_DunningRun, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_DunningRunEntry.java b/base/src/org/compiere/model/X_C_DunningRunEntry.java index 4f742612ee..dc17c8c042 100644 --- a/base/src/org/compiere/model/X_C_DunningRunEntry.java +++ b/base/src/org/compiere/model/X_C_DunningRunEntry.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_DunningRunEntry * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_DunningRunEntry extends PO implements I_C_DunningRunEntry, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_DunningRunLine.java b/base/src/org/compiere/model/X_C_DunningRunLine.java index 17ae99d8b8..86f8a9fc9b 100644 --- a/base/src/org/compiere/model/X_C_DunningRunLine.java +++ b/base/src/org/compiere/model/X_C_DunningRunLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_DunningRunLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_DunningRunLine extends PO implements I_C_DunningRunLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Element.java b/base/src/org/compiere/model/X_C_Element.java index c57cd8af26..0da1d0a58f 100644 --- a/base/src/org/compiere/model/X_C_Element.java +++ b/base/src/org/compiere/model/X_C_Element.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Element * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Element extends PO implements I_C_Element, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ElementValue.java b/base/src/org/compiere/model/X_C_ElementValue.java index 3845ea0959..64c979ed46 100644 --- a/base/src/org/compiere/model/X_C_ElementValue.java +++ b/base/src/org/compiere/model/X_C_ElementValue.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ElementValue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ElementValue extends PO implements I_C_ElementValue, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Greeting.java b/base/src/org/compiere/model/X_C_Greeting.java index 321a2e8d77..d0161d90a2 100644 --- a/base/src/org/compiere/model/X_C_Greeting.java +++ b/base/src/org/compiere/model/X_C_Greeting.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Greeting * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Greeting extends PO implements I_C_Greeting, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_InterOrg_Acct.java b/base/src/org/compiere/model/X_C_InterOrg_Acct.java index 0b0876602c..86bf788a5f 100644 --- a/base/src/org/compiere/model/X_C_InterOrg_Acct.java +++ b/base/src/org/compiere/model/X_C_InterOrg_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_InterOrg_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_InterOrg_Acct extends PO implements I_C_InterOrg_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Invoice.java b/base/src/org/compiere/model/X_C_Invoice.java deleted file mode 100644 index 8438576dae..0000000000 --- a/base/src/org/compiere/model/X_C_Invoice.java +++ /dev/null @@ -1,1729 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_Invoice - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_Invoice extends PO implements I_C_Invoice, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_Invoice (Properties ctx, int C_Invoice_ID, String trxName) - { - super (ctx, C_Invoice_ID, trxName); - /** if (C_Invoice_ID == 0) - { - setC_BPartner_ID (0); - setC_BPartner_Location_ID (0); - setC_Currency_ID (0); -// @C_Currency_ID@ - setC_DocTypeTarget_ID (0); - setC_DocType_ID (0); -// 0 - setC_Invoice_ID (0); - setC_PaymentTerm_ID (0); - setDateAcct (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setDateInvoiced (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setDocAction (null); -// CO - setDocStatus (null); -// DR - setDocumentNo (null); - setGrandTotal (Env.ZERO); - setIsApproved (false); -// @IsApproved@ - setIsDiscountPrinted (false); - setIsInDispute (false); -// N - setIsPaid (false); - setIsPayScheduleValid (false); - setIsPrinted (false); - setIsSOTrx (false); -// @IsSOTrx@ - setIsSelfService (false); - setIsTaxIncluded (false); - setIsTransferred (false); - setM_PriceList_ID (0); - setPaymentRule (null); -// P - setPosted (false); -// N - setProcessed (false); - setSendEMail (false); - setTotalLines (Env.ZERO); - } */ - } - - /** Load Constructor */ - public X_C_Invoice (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_C_Invoice[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_OrgTrx_ID AD_Reference_ID=130 */ - public static final int AD_ORGTRX_ID_AD_Reference_ID=130; - /** Set Trx Organization. - @param AD_OrgTrx_ID - Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) - { - if (AD_OrgTrx_ID < 1) - set_Value (COLUMNNAME_AD_OrgTrx_ID, null); - else - set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); - } - - /** Get Trx Organization. - @return Performing or initiating organization - */ - public int getAD_OrgTrx_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_AD_User getAD_User() throws Exception - { - Class clazz = MTable.getClass(I_AD_User.Table_Name); - I_AD_User result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID < 1) - set_Value (COLUMNNAME_AD_User_ID, null); - else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Activity getC_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID < 1) - set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - throw new IllegalArgumentException ("C_BPartner_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_BPartner_Location getC_BPartner_Location() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner_Location.Table_Name); - I_C_BPartner_Location result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner_Location)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_Location_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Partner Location. - @param C_BPartner_Location_ID - Identifies the (ship to) address for this Business Partner - */ - public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) - { - if (C_BPartner_Location_ID < 1) - throw new IllegalArgumentException ("C_BPartner_Location_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID)); - } - - /** Get Partner Location. - @return Identifies the (ship to) address for this Business Partner - */ - public int getC_BPartner_Location_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Location_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Campaign getC_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID < 1) - set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_CashLine getC_CashLine() throws Exception - { - Class clazz = MTable.getClass(I_C_CashLine.Table_Name); - I_C_CashLine result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_CashLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_CashLine_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Cash Journal Line. - @param C_CashLine_ID - Cash Journal Line - */ - public void setC_CashLine_ID (int C_CashLine_ID) - { - if (C_CashLine_ID < 1) - set_Value (COLUMNNAME_C_CashLine_ID, null); - else - set_Value (COLUMNNAME_C_CashLine_ID, Integer.valueOf(C_CashLine_ID)); - } - - /** Get Cash Journal Line. - @return Cash Journal Line - */ - public int getC_CashLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_CashLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_Charge_ID AD_Reference_ID=200 */ - public static final int C_CHARGE_ID_AD_Reference_ID=200; - /** Set Charge. - @param C_Charge_ID - Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID) - { - if (C_Charge_ID < 1) - set_Value (COLUMNNAME_C_Charge_ID, null); - else - set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); - } - - /** Get Charge. - @return Additional document charges - */ - public int getC_Charge_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_ConversionType getC_ConversionType() throws Exception - { - Class clazz = MTable.getClass(I_C_ConversionType.Table_Name); - I_C_ConversionType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_ConversionType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ConversionType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency Type. - @param C_ConversionType_ID - Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID) - { - if (C_ConversionType_ID < 1) - set_Value (COLUMNNAME_C_ConversionType_ID, null); - else - set_Value (COLUMNNAME_C_ConversionType_ID, Integer.valueOf(C_ConversionType_ID)); - } - - /** Get Currency Type. - @return Currency Conversion Rate Type - */ - public int getC_ConversionType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - throw new IllegalArgumentException ("C_Currency_ID is mandatory."); - set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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(); - } - - /** C_DocTypeTarget_ID AD_Reference_ID=170 */ - public static final int C_DOCTYPETARGET_ID_AD_Reference_ID=170; - /** Set Target Document Type. - @param C_DocTypeTarget_ID - Target document type for conversing documents - */ - public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID) - { - if (C_DocTypeTarget_ID < 1) - throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory."); - set_Value (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID)); - } - - /** 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 I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 0) - throw new IllegalArgumentException ("C_DocType_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_DunningLevel getC_DunningLevel() throws Exception - { - Class clazz = MTable.getClass(I_C_DunningLevel.Table_Name); - I_C_DunningLevel result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DunningLevel)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DunningLevel_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Dunning Level. - @param C_DunningLevel_ID Dunning Level */ - public void setC_DunningLevel_ID (int C_DunningLevel_ID) - { - if (C_DunningLevel_ID < 1) - set_Value (COLUMNNAME_C_DunningLevel_ID, null); - else - set_Value (COLUMNNAME_C_DunningLevel_ID, Integer.valueOf(C_DunningLevel_ID)); - } - - /** Get Dunning Level. - @return Dunning Level */ - public int getC_DunningLevel_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DunningLevel_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Invoice. - @param C_Invoice_ID - Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID) - { - if (C_Invoice_ID < 1) - throw new IllegalArgumentException ("C_Invoice_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID)); - } - - /** Get Invoice. - @return Invoice Identifier - */ - public int getC_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Order getC_Order() throws Exception - { - Class clazz = MTable.getClass(I_C_Order.Table_Name); - I_C_Order result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Order_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Order. - @param C_Order_ID - Order - */ - public void setC_Order_ID (int C_Order_ID) - { - if (C_Order_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_Order_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID)); - } - - /** 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(); - } - - public I_C_PaymentTerm getC_PaymentTerm() throws Exception - { - Class clazz = MTable.getClass(I_C_PaymentTerm.Table_Name); - I_C_PaymentTerm result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment Term. - @param C_PaymentTerm_ID - The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) - { - if (C_PaymentTerm_ID < 1) - throw new IllegalArgumentException ("C_PaymentTerm_ID is mandatory."); - set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID)); - } - - /** Get Payment Term. - @return The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Payment getC_Payment() throws Exception - { - Class clazz = MTable.getClass(I_C_Payment.Table_Name); - I_C_Payment result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment. - @param C_Payment_ID - Payment identifier - */ - public void setC_Payment_ID (int C_Payment_ID) - { - if (C_Payment_ID < 1) - set_Value (COLUMNNAME_C_Payment_ID, null); - else - set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID)); - } - - /** Get Payment. - @return Payment identifier - */ - public int getC_Payment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Project getC_Project() throws Exception - { - Class clazz = MTable.getClass(I_C_Project.Table_Name); - I_C_Project result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID < 1) - set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Charge amount. - @param ChargeAmt - Charge Amount - */ - public void setChargeAmt (BigDecimal ChargeAmt) - { - set_Value (COLUMNNAME_ChargeAmt, ChargeAmt); - } - - /** Get Charge amount. - @return Charge Amount - */ - public BigDecimal getChargeAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Copy From. - @param CopyFrom - Copy From Record - */ - public void setCopyFrom (String CopyFrom) - { - - if (CopyFrom != null && CopyFrom.length() > 1) - { - log.warning("Length > 1 - truncated"); - CopyFrom = CopyFrom.substring(0, 1); - } - set_Value (COLUMNNAME_CopyFrom, CopyFrom); - } - - /** Get Copy From. - @return Copy From Record - */ - public String getCopyFrom () - { - return (String)get_Value(COLUMNNAME_CopyFrom); - } - - /** Set Create lines from. - @param CreateFrom - Process which will generate a new document lines based on an existing document - */ - public void setCreateFrom (String CreateFrom) - { - - if (CreateFrom != null && CreateFrom.length() > 1) - { - log.warning("Length > 1 - truncated"); - CreateFrom = CreateFrom.substring(0, 1); - } - set_Value (COLUMNNAME_CreateFrom, CreateFrom); - } - - /** Get Create lines from. - @return Process which will generate a new document lines based on an existing document - */ - public String getCreateFrom () - { - return (String)get_Value(COLUMNNAME_CreateFrom); - } - - /** Set Account Date. - @param DateAcct - Accounting Date - */ - public void setDateAcct (Timestamp DateAcct) - { - if (DateAcct == null) - throw new IllegalArgumentException ("DateAcct is mandatory."); - set_Value (COLUMNNAME_DateAcct, DateAcct); - } - - /** Get Account Date. - @return Accounting Date - */ - public Timestamp getDateAcct () - { - return (Timestamp)get_Value(COLUMNNAME_DateAcct); - } - - /** Set Date Invoiced. - @param DateInvoiced - Date printed on Invoice - */ - public void setDateInvoiced (Timestamp DateInvoiced) - { - if (DateInvoiced == null) - throw new IllegalArgumentException ("DateInvoiced is mandatory."); - set_Value (COLUMNNAME_DateInvoiced, DateInvoiced); - } - - /** Get Date Invoiced. - @return Date printed on Invoice - */ - public Timestamp getDateInvoiced () - { - return (Timestamp)get_Value(COLUMNNAME_DateInvoiced); - } - - /** 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 printed. - @param DatePrinted - Date the document was printed. - */ - public void setDatePrinted (Timestamp DatePrinted) - { - set_Value (COLUMNNAME_DatePrinted, DatePrinted); - } - - /** Get Date printed. - @return Date the document was printed. - */ - public Timestamp getDatePrinted () - { - return (Timestamp)get_Value(COLUMNNAME_DatePrinted); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** DocAction AD_Reference_ID=135 */ - public static final int DOCACTION_AD_Reference_ID=135; - /** Complete = CO */ - public static final String DOCACTION_Complete = "CO"; - /** Approve = AP */ - public static final String DOCACTION_Approve = "AP"; - /** Reject = RJ */ - public static final String DOCACTION_Reject = "RJ"; - /** Post = PO */ - public static final String DOCACTION_Post = "PO"; - /** Void = VO */ - public static final String DOCACTION_Void = "VO"; - /** Close = CL */ - public static final String DOCACTION_Close = "CL"; - /** Reverse - Correct = RC */ - public static final String DOCACTION_Reverse_Correct = "RC"; - /** Reverse - Accrual = RA */ - public static final String DOCACTION_Reverse_Accrual = "RA"; - /** Invalidate = IN */ - public static final String DOCACTION_Invalidate = "IN"; - /** Re-activate = RE */ - public static final String DOCACTION_Re_Activate = "RE"; - /** = -- */ - public static final String DOCACTION_None = "--"; - /** Prepare = PR */ - public static final String DOCACTION_Prepare = "PR"; - /** Unlock = XL */ - public static final String DOCACTION_Unlock = "XL"; - /** Wait Complete = WC */ - public static final String DOCACTION_WaitComplete = "WC"; - /** Set Document Action. - @param DocAction - The targeted status of the document - */ - public void setDocAction (String DocAction) - { - if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); - 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("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC"); - if (DocAction.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocAction = DocAction.substring(0, 2); - } - set_Value (COLUMNNAME_DocAction, DocAction); - } - - /** Get Document Action. - @return The targeted status of the document - */ - public String getDocAction () - { - return (String)get_Value(COLUMNNAME_DocAction); - } - - /** DocStatus AD_Reference_ID=131 */ - public static final int DOCSTATUS_AD_Reference_ID=131; - /** Drafted = DR */ - public static final String DOCSTATUS_Drafted = "DR"; - /** Completed = CO */ - public static final String DOCSTATUS_Completed = "CO"; - /** Approved = AP */ - public static final String DOCSTATUS_Approved = "AP"; - /** Not Approved = NA */ - public static final String DOCSTATUS_NotApproved = "NA"; - /** Voided = VO */ - public static final String DOCSTATUS_Voided = "VO"; - /** Invalid = IN */ - public static final String DOCSTATUS_Invalid = "IN"; - /** Reversed = RE */ - public static final String DOCSTATUS_Reversed = "RE"; - /** Closed = CL */ - public static final String DOCSTATUS_Closed = "CL"; - /** Unknown = ?? */ - public static final String DOCSTATUS_Unknown = "??"; - /** In Progress = IP */ - public static final String DOCSTATUS_InProgress = "IP"; - /** Waiting Payment = WP */ - public static final String DOCSTATUS_WaitingPayment = "WP"; - /** Waiting Confirmation = WC */ - public static final String DOCSTATUS_WaitingConfirmation = "WC"; - /** Set Document Status. - @param DocStatus - The current status of the document - */ - public void setDocStatus (String DocStatus) - { - if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); - if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); - if (DocStatus.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocStatus = DocStatus.substring(0, 2); - } - set_Value (COLUMNNAME_DocStatus, DocStatus); - } - - /** Get Document Status. - @return The current status of the document - */ - public String getDocStatus () - { - return (String)get_Value(COLUMNNAME_DocStatus); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - if (DocumentNo == null) - throw new IllegalArgumentException ("DocumentNo is mandatory."); - - if (DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); - } - set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getDocumentNo()); - } - - /** Set Dunning Grace. - @param DunningGrace Dunning Grace */ - public void setDunningGrace (Timestamp DunningGrace) - { - set_Value (COLUMNNAME_DunningGrace, DunningGrace); - } - - /** Get Dunning Grace. - @return Dunning Grace */ - public Timestamp getDunningGrace () - { - return (Timestamp)get_Value(COLUMNNAME_DunningGrace); - } - - /** Set Generate To. - @param GenerateTo - Generate To - */ - public void setGenerateTo (String GenerateTo) - { - - if (GenerateTo != null && GenerateTo.length() > 1) - { - log.warning("Length > 1 - truncated"); - GenerateTo = GenerateTo.substring(0, 1); - } - set_Value (COLUMNNAME_GenerateTo, GenerateTo); - } - - /** Get Generate To. - @return Generate To - */ - public String getGenerateTo () - { - return (String)get_Value(COLUMNNAME_GenerateTo); - } - - /** Set Grand Total. - @param GrandTotal - Total amount of document - */ - public void setGrandTotal (BigDecimal GrandTotal) - { - if (GrandTotal == null) - throw new IllegalArgumentException ("GrandTotal is mandatory."); - 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; - } - - /** InvoiceCollectionType AD_Reference_ID=394 */ - public static final int INVOICECOLLECTIONTYPE_AD_Reference_ID=394; - /** Dunning = D */ - public static final String INVOICECOLLECTIONTYPE_Dunning = "D"; - /** Collection Agency = C */ - public static final String INVOICECOLLECTIONTYPE_CollectionAgency = "C"; - /** Legal Procedure = L */ - public static final String INVOICECOLLECTIONTYPE_LegalProcedure = "L"; - /** Uncollectable = U */ - public static final String INVOICECOLLECTIONTYPE_Uncollectable = "U"; - /** Set Collection Status. - @param InvoiceCollectionType - Invoice Collection Status - */ - public void setInvoiceCollectionType (String InvoiceCollectionType) - { - - if (InvoiceCollectionType == null || InvoiceCollectionType.equals("D") || InvoiceCollectionType.equals("C") || InvoiceCollectionType.equals("L") || InvoiceCollectionType.equals("U")); else throw new IllegalArgumentException ("InvoiceCollectionType Invalid value - " + InvoiceCollectionType + " - Reference_ID=394 - D - C - L - U"); - if (InvoiceCollectionType != null && InvoiceCollectionType.length() > 1) - { - log.warning("Length > 1 - truncated"); - InvoiceCollectionType = InvoiceCollectionType.substring(0, 1); - } - set_Value (COLUMNNAME_InvoiceCollectionType, InvoiceCollectionType); - } - - /** Get Collection Status. - @return Invoice Collection Status - */ - public String getInvoiceCollectionType () - { - return (String)get_Value(COLUMNNAME_InvoiceCollectionType); - } - - /** Set Approved. - @param IsApproved - Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved) - { - set_ValueNoCheck (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); - } - - /** Get Approved. - @return Indicates if this document requires approval - */ - public boolean isApproved () - { - Object oo = get_Value(COLUMNNAME_IsApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Discount Printed. - @param IsDiscountPrinted - Print Discount on Invoice and Order - */ - public void setIsDiscountPrinted (boolean IsDiscountPrinted) - { - set_Value (COLUMNNAME_IsDiscountPrinted, Boolean.valueOf(IsDiscountPrinted)); - } - - /** Get Discount Printed. - @return Print Discount on Invoice and Order - */ - public boolean isDiscountPrinted () - { - Object oo = get_Value(COLUMNNAME_IsDiscountPrinted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set In Dispute. - @param IsInDispute - Document is in dispute - */ - public void setIsInDispute (boolean IsInDispute) - { - set_Value (COLUMNNAME_IsInDispute, Boolean.valueOf(IsInDispute)); - } - - /** Get In Dispute. - @return Document is in dispute - */ - public boolean isInDispute () - { - Object oo = get_Value(COLUMNNAME_IsInDispute); - 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 Pay Schedule valid. - @param IsPayScheduleValid - Is the Payment Schedule is valid - */ - public void setIsPayScheduleValid (boolean IsPayScheduleValid) - { - set_ValueNoCheck (COLUMNNAME_IsPayScheduleValid, Boolean.valueOf(IsPayScheduleValid)); - } - - /** Get Pay Schedule valid. - @return Is the Payment Schedule is valid - */ - public boolean isPayScheduleValid () - { - Object oo = get_Value(COLUMNNAME_IsPayScheduleValid); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Printed. - @param IsPrinted - Indicates if this document / line is printed - */ - public void setIsPrinted (boolean IsPrinted) - { - set_ValueNoCheck (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted)); - } - - /** Get Printed. - @return Indicates if this document / line is printed - */ - public boolean isPrinted () - { - Object oo = get_Value(COLUMNNAME_IsPrinted); - 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 Self-Service. - @param IsSelfService - This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService) - { - set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); - } - - /** Get Self-Service. - @return This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService () - { - Object oo = get_Value(COLUMNNAME_IsSelfService); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Price includes Tax. - @param IsTaxIncluded - Tax is included in the price - */ - public void setIsTaxIncluded (boolean IsTaxIncluded) - { - set_Value (COLUMNNAME_IsTaxIncluded, Boolean.valueOf(IsTaxIncluded)); - } - - /** Get Price includes Tax. - @return Tax is included in the price - */ - public boolean isTaxIncluded () - { - Object oo = get_Value(COLUMNNAME_IsTaxIncluded); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Transferred. - @param IsTransferred - Transferred to General Ledger (i.e. accounted) - */ - public void setIsTransferred (boolean IsTransferred) - { - set_ValueNoCheck (COLUMNNAME_IsTransferred, Boolean.valueOf(IsTransferred)); - } - - /** Get Transferred. - @return Transferred to General Ledger (i.e. accounted) - */ - public boolean isTransferred () - { - Object oo = get_Value(COLUMNNAME_IsTransferred); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - public I_M_PriceList getM_PriceList() throws Exception - { - Class clazz = MTable.getClass(I_M_PriceList.Table_Name); - I_M_PriceList result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_PriceList)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PriceList_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Price List. - @param M_PriceList_ID - Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID) - { - if (M_PriceList_ID < 1) - throw new IllegalArgumentException ("M_PriceList_ID is mandatory."); - set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID)); - } - - /** 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 I_M_RMA getM_RMA() throws Exception - { - Class clazz = MTable.getClass(I_M_RMA.Table_Name); - I_M_RMA result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_RMA)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_RMA_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set RMA. - @param M_RMA_ID - Return Material Authorization - */ - public void setM_RMA_ID (int M_RMA_ID) - { - if (M_RMA_ID < 1) - set_Value (COLUMNNAME_M_RMA_ID, null); - else - set_Value (COLUMNNAME_M_RMA_ID, Integer.valueOf(M_RMA_ID)); - } - - /** Get RMA. - @return Return Material Authorization - */ - public int getM_RMA_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_RMA_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Order Reference. - @param POReference - Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public void setPOReference (String POReference) - { - - if (POReference != null && POReference.length() > 20) - { - log.warning("Length > 20 - truncated"); - POReference = POReference.substring(0, 20); - } - set_Value (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); - } - - /** PaymentRule AD_Reference_ID=195 */ - public static final int PAYMENTRULE_AD_Reference_ID=195; - /** Cash = B */ - public static final String PAYMENTRULE_Cash = "B"; - /** Credit Card = K */ - public static final String PAYMENTRULE_CreditCard = "K"; - /** Direct Deposit = T */ - public static final String PAYMENTRULE_DirectDeposit = "T"; - /** Check = S */ - public static final String PAYMENTRULE_Check = "S"; - /** On Credit = P */ - public static final String PAYMENTRULE_OnCredit = "P"; - /** Direct Debit = D */ - public static final String PAYMENTRULE_DirectDebit = "D"; - /** Set Payment Rule. - @param PaymentRule - How you pay the invoice - */ - public void setPaymentRule (String PaymentRule) - { - if (PaymentRule == null) throw new IllegalArgumentException ("PaymentRule is mandatory"); - if (PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P") || PaymentRule.equals("D")); else throw new IllegalArgumentException ("PaymentRule Invalid value - " + PaymentRule + " - Reference_ID=195 - B - K - T - S - P - D"); - if (PaymentRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - PaymentRule = PaymentRule.substring(0, 1); - } - set_Value (COLUMNNAME_PaymentRule, PaymentRule); - } - - /** Get Payment Rule. - @return How you pay the invoice - */ - public String getPaymentRule () - { - return (String)get_Value(COLUMNNAME_PaymentRule); - } - - /** Set Posted. - @param Posted - Posting status - */ - public void setPosted (boolean Posted) - { - set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); - } - - /** Get Posted. - @return Posting status - */ - public boolean isPosted () - { - Object oo = get_Value(COLUMNNAME_Posted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_ValueNoCheck (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** 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; - } - - /** Set Referenced Invoice. - @param Ref_Invoice_ID Referenced Invoice */ - public void setRef_Invoice_ID (int Ref_Invoice_ID) - { - if (Ref_Invoice_ID < 1) - set_Value (COLUMNNAME_Ref_Invoice_ID, null); - else - set_Value (COLUMNNAME_Ref_Invoice_ID, Integer.valueOf(Ref_Invoice_ID)); - } - - /** Get Referenced Invoice. - @return Referenced Invoice */ - public int getRef_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Ref_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** SalesRep_ID AD_Reference_ID=190 */ - public static final int SALESREP_ID_AD_Reference_ID=190; - /** Set Sales Representative. - @param SalesRep_ID - Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID) - { - if (SalesRep_ID < 1) - set_Value (COLUMNNAME_SalesRep_ID, null); - else - set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_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(); - } - - /** Set Send EMail. - @param SendEMail - Enable sending Document EMail - */ - public void setSendEMail (boolean SendEMail) - { - set_Value (COLUMNNAME_SendEMail, Boolean.valueOf(SendEMail)); - } - - /** Get Send EMail. - @return Enable sending Document EMail - */ - public boolean isSendEMail () - { - Object oo = get_Value(COLUMNNAME_SendEMail); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Total Lines. - @param TotalLines - Total of all document lines - */ - public void setTotalLines (BigDecimal TotalLines) - { - if (TotalLines == null) - throw new IllegalArgumentException ("TotalLines is mandatory."); - set_ValueNoCheck (COLUMNNAME_TotalLines, TotalLines); - } - - /** Get Total Lines. - @return Total of all document lines - */ - public BigDecimal getTotalLines () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalLines); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** User1_ID AD_Reference_ID=134 */ - public static final int USER1_ID_AD_Reference_ID=134; - /** Set User List 1. - @param User1_ID - User defined list element #1 - */ - public void setUser1_ID (int User1_ID) - { - if (User1_ID < 1) - set_Value (COLUMNNAME_User1_ID, null); - else - set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); - } - - /** Get User List 1. - @return User defined list element #1 - */ - public int getUser1_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** User2_ID AD_Reference_ID=137 */ - public static final int USER2_ID_AD_Reference_ID=137; - /** Set User List 2. - @param User2_ID - User defined list element #2 - */ - public void setUser2_ID (int User2_ID) - { - if (User2_ID < 1) - set_Value (COLUMNNAME_User2_ID, null); - else - set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); - } - - /** Get User List 2. - @return User defined list element #2 - */ - public int getUser2_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); - if (ii == null) - return 0; - return ii.intValue(); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_InvoiceBatch.java b/base/src/org/compiere/model/X_C_InvoiceBatch.java index 491f26da87..eeb319c0e2 100644 --- a/base/src/org/compiere/model/X_C_InvoiceBatch.java +++ b/base/src/org/compiere/model/X_C_InvoiceBatch.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_InvoiceBatch * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_InvoiceBatch extends PO implements I_C_InvoiceBatch, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_InvoiceBatchLine.java b/base/src/org/compiere/model/X_C_InvoiceBatchLine.java index a51aa91e6d..1712fd5661 100644 --- a/base/src/org/compiere/model/X_C_InvoiceBatchLine.java +++ b/base/src/org/compiere/model/X_C_InvoiceBatchLine.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_InvoiceBatchLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_InvoiceBatchLine extends PO implements I_C_InvoiceBatchLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_InvoiceLine.java b/base/src/org/compiere/model/X_C_InvoiceLine.java index 63eb643f0e..610bbacdf8 100644 --- a/base/src/org/compiere/model/X_C_InvoiceLine.java +++ b/base/src/org/compiere/model/X_C_InvoiceLine.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_InvoiceLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_InvoiceLine extends PO implements I_C_InvoiceLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_InvoicePaySchedule.java b/base/src/org/compiere/model/X_C_InvoicePaySchedule.java index a9c7050b01..36ebbe04d9 100644 --- a/base/src/org/compiere/model/X_C_InvoicePaySchedule.java +++ b/base/src/org/compiere/model/X_C_InvoicePaySchedule.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_InvoicePaySchedule * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_InvoicePaySchedule extends PO implements I_C_InvoicePaySchedule, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_InvoiceSchedule.java b/base/src/org/compiere/model/X_C_InvoiceSchedule.java index 689833c307..c24d989a99 100644 --- a/base/src/org/compiere/model/X_C_InvoiceSchedule.java +++ b/base/src/org/compiere/model/X_C_InvoiceSchedule.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_InvoiceSchedule * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_InvoiceSchedule extends PO implements I_C_InvoiceSchedule, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_InvoiceTax.java b/base/src/org/compiere/model/X_C_InvoiceTax.java index c60a6f8e4d..81bbea91cf 100644 --- a/base/src/org/compiere/model/X_C_InvoiceTax.java +++ b/base/src/org/compiere/model/X_C_InvoiceTax.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for C_InvoiceTax * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_InvoiceTax extends PO implements I_C_InvoiceTax, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Job.java b/base/src/org/compiere/model/X_C_Job.java index 202f879466..80ec72f44e 100644 --- a/base/src/org/compiere/model/X_C_Job.java +++ b/base/src/org/compiere/model/X_C_Job.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Job * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Job extends PO implements I_C_Job, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_JobAssignment.java b/base/src/org/compiere/model/X_C_JobAssignment.java index 280f97acce..ef9ee2920e 100644 --- a/base/src/org/compiere/model/X_C_JobAssignment.java +++ b/base/src/org/compiere/model/X_C_JobAssignment.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_JobAssignment * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_JobAssignment extends PO implements I_C_JobAssignment, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_JobCategory.java b/base/src/org/compiere/model/X_C_JobCategory.java index b90e25634f..fee29b19af 100644 --- a/base/src/org/compiere/model/X_C_JobCategory.java +++ b/base/src/org/compiere/model/X_C_JobCategory.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_JobCategory * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_JobCategory extends PO implements I_C_JobCategory, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_JobRemuneration.java b/base/src/org/compiere/model/X_C_JobRemuneration.java index 598471b981..7c04191029 100644 --- a/base/src/org/compiere/model/X_C_JobRemuneration.java +++ b/base/src/org/compiere/model/X_C_JobRemuneration.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_JobRemuneration * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_JobRemuneration extends PO implements I_C_JobRemuneration, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_LandedCost.java b/base/src/org/compiere/model/X_C_LandedCost.java index b85454585c..f45d86da64 100644 --- a/base/src/org/compiere/model/X_C_LandedCost.java +++ b/base/src/org/compiere/model/X_C_LandedCost.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_LandedCost * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_LandedCost extends PO implements I_C_LandedCost, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_LandedCostAllocation.java b/base/src/org/compiere/model/X_C_LandedCostAllocation.java index 3943205f7e..e115a1e291 100644 --- a/base/src/org/compiere/model/X_C_LandedCostAllocation.java +++ b/base/src/org/compiere/model/X_C_LandedCostAllocation.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_LandedCostAllocation * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_LandedCostAllocation extends PO implements I_C_LandedCostAllocation, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Location.java b/base/src/org/compiere/model/X_C_Location.java index e63bb49f65..0cd9222ec1 100644 --- a/base/src/org/compiere/model/X_C_Location.java +++ b/base/src/org/compiere/model/X_C_Location.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Location * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Location extends PO implements I_C_Location, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_NonBusinessDay.java b/base/src/org/compiere/model/X_C_NonBusinessDay.java index 6176c1157e..a14f0f65ec 100644 --- a/base/src/org/compiere/model/X_C_NonBusinessDay.java +++ b/base/src/org/compiere/model/X_C_NonBusinessDay.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_NonBusinessDay * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_NonBusinessDay extends PO implements I_C_NonBusinessDay, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Order.java b/base/src/org/compiere/model/X_C_Order.java deleted file mode 100644 index ea109235e0..0000000000 --- a/base/src/org/compiere/model/X_C_Order.java +++ /dev/null @@ -1,2115 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_Order - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_Order extends PO implements I_C_Order, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_Order (Properties ctx, int C_Order_ID, String trxName) - { - super (ctx, C_Order_ID, trxName); - /** if (C_Order_ID == 0) - { - setC_BPartner_ID (0); - setC_BPartner_Location_ID (0); - setC_Currency_ID (0); -// @C_Currency_ID@ - setC_DocTypeTarget_ID (0); - setC_DocType_ID (0); -// 0 - setC_Order_ID (0); - setC_PaymentTerm_ID (0); - setDateAcct (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setDateOrdered (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setDatePromised (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setDeliveryRule (null); -// F - setDeliveryViaRule (null); -// P - setDocAction (null); -// CO - setDocStatus (null); -// DR - setDocumentNo (null); - setFreightAmt (Env.ZERO); - setFreightCostRule (null); -// I - setGrandTotal (Env.ZERO); - setInvoiceRule (null); -// I - setIsApproved (false); -// @IsApproved@ - setIsCreditApproved (false); - setIsDelivered (false); - setIsDiscountPrinted (false); - setIsDropShip (false); -// N - setIsInvoiced (false); - setIsPrinted (false); - setIsSOTrx (false); -// @IsSOTrx@ - setIsSelected (false); - setIsSelfService (false); - setIsTaxIncluded (false); - setIsTransferred (false); - setM_PriceList_ID (0); - setM_Warehouse_ID (0); - setPaymentRule (null); -// B - setPosted (false); -// N - setPriorityRule (null); -// 5 - setProcessed (false); - setSalesRep_ID (0); - setSendEMail (false); - setTotalLines (Env.ZERO); - } */ - } - - /** Load Constructor */ - public X_C_Order (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_C_Order[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_OrgTrx_ID AD_Reference_ID=130 */ - public static final int AD_ORGTRX_ID_AD_Reference_ID=130; - /** Set Trx Organization. - @param AD_OrgTrx_ID - Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) - { - if (AD_OrgTrx_ID < 1) - set_Value (COLUMNNAME_AD_OrgTrx_ID, null); - else - set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); - } - - /** Get Trx Organization. - @return Performing or initiating organization - */ - public int getAD_OrgTrx_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_AD_User getAD_User() throws Exception - { - Class clazz = MTable.getClass(I_AD_User.Table_Name); - I_AD_User result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID < 1) - set_Value (COLUMNNAME_AD_User_ID, null); - else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set AmountRefunded. - @param AmountRefunded AmountRefunded */ - public void setAmountRefunded (BigDecimal AmountRefunded) - { - set_Value (COLUMNNAME_AmountRefunded, AmountRefunded); - } - - /** Get AmountRefunded. - @return AmountRefunded */ - public BigDecimal getAmountRefunded () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AmountRefunded); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set AmountTendered. - @param AmountTendered AmountTendered */ - public void setAmountTendered (BigDecimal AmountTendered) - { - set_Value (COLUMNNAME_AmountTendered, AmountTendered); - } - - /** Get AmountTendered. - @return AmountTendered */ - public BigDecimal getAmountTendered () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AmountTendered); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Bill_BPartner_ID AD_Reference_ID=138 */ - public static final int BILL_BPARTNER_ID_AD_Reference_ID=138; - /** Set Invoice Partner. - @param Bill_BPartner_ID - Business Partner to be invoiced - */ - public void setBill_BPartner_ID (int Bill_BPartner_ID) - { - if (Bill_BPartner_ID < 1) - set_Value (COLUMNNAME_Bill_BPartner_ID, null); - else - set_Value (COLUMNNAME_Bill_BPartner_ID, Integer.valueOf(Bill_BPartner_ID)); - } - - /** Get Invoice Partner. - @return Business Partner to be invoiced - */ - public int getBill_BPartner_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Bill_BPartner_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Bill_Location_ID AD_Reference_ID=159 */ - public static final int BILL_LOCATION_ID_AD_Reference_ID=159; - /** Set Invoice Location. - @param Bill_Location_ID - Business Partner Location for invoicing - */ - public void setBill_Location_ID (int Bill_Location_ID) - { - if (Bill_Location_ID < 1) - set_Value (COLUMNNAME_Bill_Location_ID, null); - else - set_Value (COLUMNNAME_Bill_Location_ID, Integer.valueOf(Bill_Location_ID)); - } - - /** Get Invoice Location. - @return Business Partner Location for invoicing - */ - public int getBill_Location_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Bill_Location_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Bill_User_ID AD_Reference_ID=110 */ - public static final int BILL_USER_ID_AD_Reference_ID=110; - /** Set Invoice Contact. - @param Bill_User_ID - Business Partner Contact for invoicing - */ - public void setBill_User_ID (int Bill_User_ID) - { - if (Bill_User_ID < 1) - set_Value (COLUMNNAME_Bill_User_ID, null); - else - set_Value (COLUMNNAME_Bill_User_ID, Integer.valueOf(Bill_User_ID)); - } - - /** Get Invoice Contact. - @return Business Partner Contact for invoicing - */ - public int getBill_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Bill_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Activity getC_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID < 1) - set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - throw new IllegalArgumentException ("C_BPartner_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_BPartner_Location getC_BPartner_Location() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner_Location.Table_Name); - I_C_BPartner_Location result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner_Location)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_Location_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Partner Location. - @param C_BPartner_Location_ID - Identifies the (ship to) address for this Business Partner - */ - public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) - { - if (C_BPartner_Location_ID < 1) - throw new IllegalArgumentException ("C_BPartner_Location_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID)); - } - - /** Get Partner Location. - @return Identifies the (ship to) address for this Business Partner - */ - public int getC_BPartner_Location_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Location_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Campaign getC_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID < 1) - set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_CashLine getC_CashLine() throws Exception - { - Class clazz = MTable.getClass(I_C_CashLine.Table_Name); - I_C_CashLine result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_CashLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_CashLine_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Cash Journal Line. - @param C_CashLine_ID - Cash Journal Line - */ - public void setC_CashLine_ID (int C_CashLine_ID) - { - if (C_CashLine_ID < 1) - set_Value (COLUMNNAME_C_CashLine_ID, null); - else - set_Value (COLUMNNAME_C_CashLine_ID, Integer.valueOf(C_CashLine_ID)); - } - - /** Get Cash Journal Line. - @return Cash Journal Line - */ - public int getC_CashLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_CashLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_Charge_ID AD_Reference_ID=200 */ - public static final int C_CHARGE_ID_AD_Reference_ID=200; - /** Set Charge. - @param C_Charge_ID - Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID) - { - if (C_Charge_ID < 1) - set_Value (COLUMNNAME_C_Charge_ID, null); - else - set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); - } - - /** Get Charge. - @return Additional document charges - */ - public int getC_Charge_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_ConversionType getC_ConversionType() throws Exception - { - Class clazz = MTable.getClass(I_C_ConversionType.Table_Name); - I_C_ConversionType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_ConversionType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ConversionType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency Type. - @param C_ConversionType_ID - Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID) - { - if (C_ConversionType_ID < 1) - set_Value (COLUMNNAME_C_ConversionType_ID, null); - else - set_Value (COLUMNNAME_C_ConversionType_ID, Integer.valueOf(C_ConversionType_ID)); - } - - /** Get Currency Type. - @return Currency Conversion Rate Type - */ - public int getC_ConversionType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - throw new IllegalArgumentException ("C_Currency_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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(); - } - - /** C_DocTypeTarget_ID AD_Reference_ID=170 */ - public static final int C_DOCTYPETARGET_ID_AD_Reference_ID=170; - /** Set Target Document Type. - @param C_DocTypeTarget_ID - Target document type for conversing documents - */ - public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID) - { - if (C_DocTypeTarget_ID < 1) - throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory."); - set_Value (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID)); - } - - /** 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(); - } - - /** C_DocType_ID AD_Reference_ID=170 */ - public static final int C_DOCTYPE_ID_AD_Reference_ID=170; - public I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 0) - throw new IllegalArgumentException ("C_DocType_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Order. - @param C_Order_ID - Order - */ - public void setC_Order_ID (int C_Order_ID) - { - if (C_Order_ID < 1) - throw new IllegalArgumentException ("C_Order_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID)); - } - - /** 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(); - } - - public I_C_POS getC_POS() throws Exception - { - Class clazz = MTable.getClass(I_C_POS.Table_Name); - I_C_POS result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_POS)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_POS_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set POS Terminal. - @param C_POS_ID - Point of Sales Terminal - */ - public void setC_POS_ID (int C_POS_ID) - { - if (C_POS_ID < 1) - set_Value (COLUMNNAME_C_POS_ID, null); - else - set_Value (COLUMNNAME_C_POS_ID, Integer.valueOf(C_POS_ID)); - } - - /** Get POS Terminal. - @return Point of Sales Terminal - */ - public int getC_POS_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_POS_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_PaymentTerm getC_PaymentTerm() throws Exception - { - Class clazz = MTable.getClass(I_C_PaymentTerm.Table_Name); - I_C_PaymentTerm result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment Term. - @param C_PaymentTerm_ID - The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) - { - if (C_PaymentTerm_ID < 1) - throw new IllegalArgumentException ("C_PaymentTerm_ID is mandatory."); - set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID)); - } - - /** Get Payment Term. - @return The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Payment getC_Payment() throws Exception - { - Class clazz = MTable.getClass(I_C_Payment.Table_Name); - I_C_Payment result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment. - @param C_Payment_ID - Payment identifier - */ - public void setC_Payment_ID (int C_Payment_ID) - { - if (C_Payment_ID < 1) - set_Value (COLUMNNAME_C_Payment_ID, null); - else - set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID)); - } - - /** Get Payment. - @return Payment identifier - */ - public int getC_Payment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Project getC_Project() throws Exception - { - Class clazz = MTable.getClass(I_C_Project.Table_Name); - I_C_Project result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID < 1) - set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Charge amount. - @param ChargeAmt - Charge Amount - */ - public void setChargeAmt (BigDecimal ChargeAmt) - { - set_Value (COLUMNNAME_ChargeAmt, ChargeAmt); - } - - /** Get Charge amount. - @return Charge Amount - */ - public BigDecimal getChargeAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Copy From. - @param CopyFrom - Copy From Record - */ - public void setCopyFrom (String CopyFrom) - { - - if (CopyFrom != null && CopyFrom.length() > 1) - { - log.warning("Length > 1 - truncated"); - CopyFrom = CopyFrom.substring(0, 1); - } - set_Value (COLUMNNAME_CopyFrom, CopyFrom); - } - - /** Get Copy From. - @return Copy From Record - */ - public String getCopyFrom () - { - return (String)get_Value(COLUMNNAME_CopyFrom); - } - - /** Set Account Date. - @param DateAcct - Accounting Date - */ - public void setDateAcct (Timestamp DateAcct) - { - if (DateAcct == null) - throw new IllegalArgumentException ("DateAcct is mandatory."); - set_Value (COLUMNNAME_DateAcct, DateAcct); - } - - /** Get Account Date. - @return Accounting Date - */ - public Timestamp getDateAcct () - { - return (Timestamp)get_Value(COLUMNNAME_DateAcct); - } - - /** Set Date Ordered. - @param DateOrdered - Date of Order - */ - public void setDateOrdered (Timestamp DateOrdered) - { - if (DateOrdered == null) - throw new IllegalArgumentException ("DateOrdered is mandatory."); - set_Value (COLUMNNAME_DateOrdered, DateOrdered); - } - - /** Get Date Ordered. - @return Date of Order - */ - public Timestamp getDateOrdered () - { - return (Timestamp)get_Value(COLUMNNAME_DateOrdered); - } - - /** Set Date printed. - @param DatePrinted - Date the document was printed. - */ - public void setDatePrinted (Timestamp DatePrinted) - { - set_Value (COLUMNNAME_DatePrinted, DatePrinted); - } - - /** Get Date printed. - @return Date the document was printed. - */ - public Timestamp getDatePrinted () - { - return (Timestamp)get_Value(COLUMNNAME_DatePrinted); - } - - /** Set Date Promised. - @param DatePromised - Date Order was promised - */ - public void setDatePromised (Timestamp DatePromised) - { - if (DatePromised == null) - throw new IllegalArgumentException ("DatePromised is mandatory."); - set_Value (COLUMNNAME_DatePromised, DatePromised); - } - - /** Get Date Promised. - @return Date Order was promised - */ - public Timestamp getDatePromised () - { - return (Timestamp)get_Value(COLUMNNAME_DatePromised); - } - - /** DeliveryRule AD_Reference_ID=151 */ - public static final int DELIVERYRULE_AD_Reference_ID=151; - /** After Receipt = R */ - public static final String DELIVERYRULE_AfterReceipt = "R"; - /** Availability = A */ - public static final String DELIVERYRULE_Availability = "A"; - /** Complete Line = L */ - public static final String DELIVERYRULE_CompleteLine = "L"; - /** Complete Order = O */ - public static final String DELIVERYRULE_CompleteOrder = "O"; - /** Force = F */ - public static final String DELIVERYRULE_Force = "F"; - /** Manual = M */ - public static final String DELIVERYRULE_Manual = "M"; - /** Set Delivery Rule. - @param DeliveryRule - Defines the timing of Delivery - */ - public void setDeliveryRule (String DeliveryRule) - { - if (DeliveryRule == null) throw new IllegalArgumentException ("DeliveryRule is mandatory"); - if (DeliveryRule.equals("R") || DeliveryRule.equals("A") || DeliveryRule.equals("L") || DeliveryRule.equals("O") || DeliveryRule.equals("F") || DeliveryRule.equals("M")); else throw new IllegalArgumentException ("DeliveryRule Invalid value - " + DeliveryRule + " - Reference_ID=151 - R - A - L - O - F - M"); - if (DeliveryRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - DeliveryRule = DeliveryRule.substring(0, 1); - } - set_Value (COLUMNNAME_DeliveryRule, DeliveryRule); - } - - /** Get Delivery Rule. - @return Defines the timing of Delivery - */ - public String getDeliveryRule () - { - return (String)get_Value(COLUMNNAME_DeliveryRule); - } - - /** DeliveryViaRule AD_Reference_ID=152 */ - public static final int DELIVERYVIARULE_AD_Reference_ID=152; - /** Pickup = P */ - public static final String DELIVERYVIARULE_Pickup = "P"; - /** Delivery = D */ - public static final String DELIVERYVIARULE_Delivery = "D"; - /** Shipper = S */ - public static final String DELIVERYVIARULE_Shipper = "S"; - /** Set Delivery Via. - @param DeliveryViaRule - How the order will be delivered - */ - public void setDeliveryViaRule (String DeliveryViaRule) - { - if (DeliveryViaRule == null) throw new IllegalArgumentException ("DeliveryViaRule is mandatory"); - if (DeliveryViaRule.equals("P") || DeliveryViaRule.equals("D") || DeliveryViaRule.equals("S")); else throw new IllegalArgumentException ("DeliveryViaRule Invalid value - " + DeliveryViaRule + " - Reference_ID=152 - P - D - S"); - if (DeliveryViaRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - DeliveryViaRule = DeliveryViaRule.substring(0, 1); - } - set_Value (COLUMNNAME_DeliveryViaRule, DeliveryViaRule); - } - - /** Get Delivery Via. - @return How the order will be delivered - */ - public String getDeliveryViaRule () - { - return (String)get_Value(COLUMNNAME_DeliveryViaRule); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** DocAction AD_Reference_ID=135 */ - public static final int DOCACTION_AD_Reference_ID=135; - /** Complete = CO */ - public static final String DOCACTION_Complete = "CO"; - /** Approve = AP */ - public static final String DOCACTION_Approve = "AP"; - /** Reject = RJ */ - public static final String DOCACTION_Reject = "RJ"; - /** Post = PO */ - public static final String DOCACTION_Post = "PO"; - /** Void = VO */ - public static final String DOCACTION_Void = "VO"; - /** Close = CL */ - public static final String DOCACTION_Close = "CL"; - /** Reverse - Correct = RC */ - public static final String DOCACTION_Reverse_Correct = "RC"; - /** Reverse - Accrual = RA */ - public static final String DOCACTION_Reverse_Accrual = "RA"; - /** Invalidate = IN */ - public static final String DOCACTION_Invalidate = "IN"; - /** Re-activate = RE */ - public static final String DOCACTION_Re_Activate = "RE"; - /** = -- */ - public static final String DOCACTION_None = "--"; - /** Prepare = PR */ - public static final String DOCACTION_Prepare = "PR"; - /** Unlock = XL */ - public static final String DOCACTION_Unlock = "XL"; - /** Wait Complete = WC */ - public static final String DOCACTION_WaitComplete = "WC"; - /** Set Document Action. - @param DocAction - The targeted status of the document - */ - public void setDocAction (String DocAction) - { - if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); - 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("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC"); - if (DocAction.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocAction = DocAction.substring(0, 2); - } - set_Value (COLUMNNAME_DocAction, DocAction); - } - - /** Get Document Action. - @return The targeted status of the document - */ - public String getDocAction () - { - return (String)get_Value(COLUMNNAME_DocAction); - } - - /** DocStatus AD_Reference_ID=131 */ - public static final int DOCSTATUS_AD_Reference_ID=131; - /** Drafted = DR */ - public static final String DOCSTATUS_Drafted = "DR"; - /** Completed = CO */ - public static final String DOCSTATUS_Completed = "CO"; - /** Approved = AP */ - public static final String DOCSTATUS_Approved = "AP"; - /** Not Approved = NA */ - public static final String DOCSTATUS_NotApproved = "NA"; - /** Voided = VO */ - public static final String DOCSTATUS_Voided = "VO"; - /** Invalid = IN */ - public static final String DOCSTATUS_Invalid = "IN"; - /** Reversed = RE */ - public static final String DOCSTATUS_Reversed = "RE"; - /** Closed = CL */ - public static final String DOCSTATUS_Closed = "CL"; - /** Unknown = ?? */ - public static final String DOCSTATUS_Unknown = "??"; - /** In Progress = IP */ - public static final String DOCSTATUS_InProgress = "IP"; - /** Waiting Payment = WP */ - public static final String DOCSTATUS_WaitingPayment = "WP"; - /** Waiting Confirmation = WC */ - public static final String DOCSTATUS_WaitingConfirmation = "WC"; - /** Set Document Status. - @param DocStatus - The current status of the document - */ - public void setDocStatus (String DocStatus) - { - if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); - if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); - if (DocStatus.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocStatus = DocStatus.substring(0, 2); - } - set_Value (COLUMNNAME_DocStatus, DocStatus); - } - - /** Get Document Status. - @return The current status of the document - */ - public String getDocStatus () - { - return (String)get_Value(COLUMNNAME_DocStatus); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - if (DocumentNo == null) - throw new IllegalArgumentException ("DocumentNo is mandatory."); - - if (DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); - } - set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getDocumentNo()); - } - - /** Set Freight Amount. - @param FreightAmt - Freight Amount - */ - public void setFreightAmt (BigDecimal FreightAmt) - { - if (FreightAmt == null) - throw new IllegalArgumentException ("FreightAmt is mandatory."); - set_Value (COLUMNNAME_FreightAmt, FreightAmt); - } - - /** Get Freight Amount. - @return Freight Amount - */ - public BigDecimal getFreightAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FreightAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** FreightCostRule AD_Reference_ID=153 */ - public static final int FREIGHTCOSTRULE_AD_Reference_ID=153; - /** Freight included = I */ - public static final String FREIGHTCOSTRULE_FreightIncluded = "I"; - /** Fix price = F */ - public static final String FREIGHTCOSTRULE_FixPrice = "F"; - /** Calculated = C */ - public static final String FREIGHTCOSTRULE_Calculated = "C"; - /** Line = L */ - public static final String FREIGHTCOSTRULE_Line = "L"; - /** Set Freight Cost Rule. - @param FreightCostRule - Method for charging Freight - */ - public void setFreightCostRule (String FreightCostRule) - { - if (FreightCostRule == null) throw new IllegalArgumentException ("FreightCostRule is mandatory"); - if (FreightCostRule.equals("I") || FreightCostRule.equals("F") || FreightCostRule.equals("C") || FreightCostRule.equals("L")); else throw new IllegalArgumentException ("FreightCostRule Invalid value - " + FreightCostRule + " - Reference_ID=153 - I - F - C - L"); - if (FreightCostRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - FreightCostRule = FreightCostRule.substring(0, 1); - } - set_Value (COLUMNNAME_FreightCostRule, FreightCostRule); - } - - /** Get Freight Cost Rule. - @return Method for charging Freight - */ - public String getFreightCostRule () - { - return (String)get_Value(COLUMNNAME_FreightCostRule); - } - - /** Set Grand Total. - @param GrandTotal - Total amount of document - */ - public void setGrandTotal (BigDecimal GrandTotal) - { - if (GrandTotal == null) - throw new IllegalArgumentException ("GrandTotal is mandatory."); - 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; - } - - /** InvoiceRule AD_Reference_ID=150 */ - public static final int INVOICERULE_AD_Reference_ID=150; - /** After Order delivered = O */ - public static final String INVOICERULE_AfterOrderDelivered = "O"; - /** After Delivery = D */ - public static final String INVOICERULE_AfterDelivery = "D"; - /** Customer Schedule after Delivery = S */ - public static final String INVOICERULE_CustomerScheduleAfterDelivery = "S"; - /** Immediate = I */ - public static final String INVOICERULE_Immediate = "I"; - /** Set Invoice Rule. - @param InvoiceRule - Frequency and method of invoicing - */ - public void setInvoiceRule (String InvoiceRule) - { - if (InvoiceRule == null) throw new IllegalArgumentException ("InvoiceRule is mandatory"); - if (InvoiceRule.equals("O") || InvoiceRule.equals("D") || InvoiceRule.equals("S") || InvoiceRule.equals("I")); else throw new IllegalArgumentException ("InvoiceRule Invalid value - " + InvoiceRule + " - Reference_ID=150 - O - D - S - I"); - if (InvoiceRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - InvoiceRule = InvoiceRule.substring(0, 1); - } - set_Value (COLUMNNAME_InvoiceRule, InvoiceRule); - } - - /** Get Invoice Rule. - @return Frequency and method of invoicing - */ - public String getInvoiceRule () - { - return (String)get_Value(COLUMNNAME_InvoiceRule); - } - - /** Set Approved. - @param IsApproved - Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved) - { - set_ValueNoCheck (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); - } - - /** Get Approved. - @return Indicates if this document requires approval - */ - public boolean isApproved () - { - Object oo = get_Value(COLUMNNAME_IsApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Credit Approved. - @param IsCreditApproved - Credit has been approved - */ - public void setIsCreditApproved (boolean IsCreditApproved) - { - set_ValueNoCheck (COLUMNNAME_IsCreditApproved, Boolean.valueOf(IsCreditApproved)); - } - - /** Get Credit Approved. - @return Credit has been approved - */ - public boolean isCreditApproved () - { - Object oo = get_Value(COLUMNNAME_IsCreditApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Delivered. - @param IsDelivered Delivered */ - public void setIsDelivered (boolean IsDelivered) - { - set_ValueNoCheck (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 Discount Printed. - @param IsDiscountPrinted - Print Discount on Invoice and Order - */ - public void setIsDiscountPrinted (boolean IsDiscountPrinted) - { - set_Value (COLUMNNAME_IsDiscountPrinted, Boolean.valueOf(IsDiscountPrinted)); - } - - /** Get Discount Printed. - @return Print Discount on Invoice and Order - */ - public boolean isDiscountPrinted () - { - Object oo = get_Value(COLUMNNAME_IsDiscountPrinted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Drop Shipment. - @param IsDropShip - Drop Shipments are sent from the Vendor directly to the Customer - */ - public void setIsDropShip (boolean IsDropShip) - { - set_ValueNoCheck (COLUMNNAME_IsDropShip, Boolean.valueOf(IsDropShip)); - } - - /** Get Drop Shipment. - @return Drop Shipments are sent from the Vendor directly to the Customer - */ - public boolean isDropShip () - { - Object oo = get_Value(COLUMNNAME_IsDropShip); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Invoiced. - @param IsInvoiced - Is this invoiced? - */ - public void setIsInvoiced (boolean IsInvoiced) - { - set_ValueNoCheck (COLUMNNAME_IsInvoiced, Boolean.valueOf(IsInvoiced)); - } - - /** Get Invoiced. - @return Is this invoiced? - */ - public boolean isInvoiced () - { - Object oo = get_Value(COLUMNNAME_IsInvoiced); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Printed. - @param IsPrinted - Indicates if this document / line is printed - */ - public void setIsPrinted (boolean IsPrinted) - { - set_ValueNoCheck (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted)); - } - - /** Get Printed. - @return Indicates if this document / line is printed - */ - public boolean isPrinted () - { - Object oo = get_Value(COLUMNNAME_IsPrinted); - 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_Value (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 Selected. - @param IsSelected Selected */ - public void setIsSelected (boolean IsSelected) - { - set_Value (COLUMNNAME_IsSelected, Boolean.valueOf(IsSelected)); - } - - /** Get Selected. - @return Selected */ - public boolean isSelected () - { - Object oo = get_Value(COLUMNNAME_IsSelected); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Self-Service. - @param IsSelfService - This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService) - { - set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); - } - - /** Get Self-Service. - @return This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService () - { - Object oo = get_Value(COLUMNNAME_IsSelfService); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Price includes Tax. - @param IsTaxIncluded - Tax is included in the price - */ - public void setIsTaxIncluded (boolean IsTaxIncluded) - { - set_Value (COLUMNNAME_IsTaxIncluded, Boolean.valueOf(IsTaxIncluded)); - } - - /** Get Price includes Tax. - @return Tax is included in the price - */ - public boolean isTaxIncluded () - { - Object oo = get_Value(COLUMNNAME_IsTaxIncluded); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Transferred. - @param IsTransferred - Transferred to General Ledger (i.e. accounted) - */ - public void setIsTransferred (boolean IsTransferred) - { - set_ValueNoCheck (COLUMNNAME_IsTransferred, Boolean.valueOf(IsTransferred)); - } - - /** Get Transferred. - @return Transferred to General Ledger (i.e. accounted) - */ - public boolean isTransferred () - { - Object oo = get_Value(COLUMNNAME_IsTransferred); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - public I_M_PriceList getM_PriceList() throws Exception - { - Class clazz = MTable.getClass(I_M_PriceList.Table_Name); - I_M_PriceList result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_PriceList)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PriceList_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Price List. - @param M_PriceList_ID - Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID) - { - if (M_PriceList_ID < 1) - throw new IllegalArgumentException ("M_PriceList_ID is mandatory."); - set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID)); - } - - /** 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 I_M_Shipper getM_Shipper() throws Exception - { - Class clazz = MTable.getClass(I_M_Shipper.Table_Name); - I_M_Shipper result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Shipper)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Shipper_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Shipper. - @param M_Shipper_ID - Method or manner of product delivery - */ - public void setM_Shipper_ID (int M_Shipper_ID) - { - if (M_Shipper_ID < 1) - set_Value (COLUMNNAME_M_Shipper_ID, null); - else - set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID)); - } - - /** Get Shipper. - @return Method or manner of product delivery - */ - public int getM_Shipper_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Warehouse getM_Warehouse() throws Exception - { - Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); - I_M_Warehouse result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Warehouse. - @param M_Warehouse_ID - Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID) - { - if (M_Warehouse_ID < 1) - throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); - set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); - } - - /** 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 OrderType. - @param OrderType OrderType */ - public void setOrderType (String OrderType) - { - - if (OrderType != null && OrderType.length() > 510) - { - log.warning("Length > 510 - truncated"); - OrderType = OrderType.substring(0, 510); - } - set_Value (COLUMNNAME_OrderType, OrderType); - } - - /** Get OrderType. - @return OrderType */ - public String getOrderType () - { - return (String)get_Value(COLUMNNAME_OrderType); - } - - /** Set Order Reference. - @param POReference - Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner - */ - public void setPOReference (String POReference) - { - - if (POReference != null && POReference.length() > 20) - { - log.warning("Length > 20 - truncated"); - POReference = POReference.substring(0, 20); - } - set_Value (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 Payment BPartner. - @param Pay_BPartner_ID - Business Partner responsible for the payment - */ - public void setPay_BPartner_ID (int Pay_BPartner_ID) - { - if (Pay_BPartner_ID < 1) - set_Value (COLUMNNAME_Pay_BPartner_ID, null); - else - set_Value (COLUMNNAME_Pay_BPartner_ID, Integer.valueOf(Pay_BPartner_ID)); - } - - /** Get Payment BPartner. - @return Business Partner responsible for the payment - */ - public int getPay_BPartner_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Pay_BPartner_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Payment Location. - @param Pay_Location_ID - Location of the Business Partner responsible for the payment - */ - public void setPay_Location_ID (int Pay_Location_ID) - { - if (Pay_Location_ID < 1) - set_Value (COLUMNNAME_Pay_Location_ID, null); - else - set_Value (COLUMNNAME_Pay_Location_ID, Integer.valueOf(Pay_Location_ID)); - } - - /** Get Payment Location. - @return Location of the Business Partner responsible for the payment - */ - public int getPay_Location_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Pay_Location_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** PaymentRule AD_Reference_ID=195 */ - public static final int PAYMENTRULE_AD_Reference_ID=195; - /** Cash = B */ - public static final String PAYMENTRULE_Cash = "B"; - /** Credit Card = K */ - public static final String PAYMENTRULE_CreditCard = "K"; - /** Direct Deposit = T */ - public static final String PAYMENTRULE_DirectDeposit = "T"; - /** Check = S */ - public static final String PAYMENTRULE_Check = "S"; - /** On Credit = P */ - public static final String PAYMENTRULE_OnCredit = "P"; - /** Direct Debit = D */ - public static final String PAYMENTRULE_DirectDebit = "D"; - /** Set Payment Rule. - @param PaymentRule - How you pay the invoice - */ - public void setPaymentRule (String PaymentRule) - { - if (PaymentRule == null) throw new IllegalArgumentException ("PaymentRule is mandatory"); - if (PaymentRule.equals("B") || PaymentRule.equals("K") || PaymentRule.equals("T") || PaymentRule.equals("S") || PaymentRule.equals("P") || PaymentRule.equals("D")); else throw new IllegalArgumentException ("PaymentRule Invalid value - " + PaymentRule + " - Reference_ID=195 - B - K - T - S - P - D"); - if (PaymentRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - PaymentRule = PaymentRule.substring(0, 1); - } - set_Value (COLUMNNAME_PaymentRule, PaymentRule); - } - - /** Get Payment Rule. - @return How you pay the invoice - */ - public String getPaymentRule () - { - return (String)get_Value(COLUMNNAME_PaymentRule); - } - - /** Set Posted. - @param Posted - Posting status - */ - public void setPosted (boolean Posted) - { - set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); - } - - /** Get Posted. - @return Posting status - */ - public boolean isPosted () - { - Object oo = get_Value(COLUMNNAME_Posted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** PriorityRule AD_Reference_ID=154 */ - public static final int PRIORITYRULE_AD_Reference_ID=154; - /** High = 3 */ - public static final String PRIORITYRULE_High = "3"; - /** Medium = 5 */ - public static final String PRIORITYRULE_Medium = "5"; - /** Low = 7 */ - public static final String PRIORITYRULE_Low = "7"; - /** Urgent = 1 */ - public static final String PRIORITYRULE_Urgent = "1"; - /** Minor = 9 */ - public static final String PRIORITYRULE_Minor = "9"; - /** Set Priority. - @param PriorityRule - Priority of a document - */ - public void setPriorityRule (String PriorityRule) - { - if (PriorityRule == null) throw new IllegalArgumentException ("PriorityRule is mandatory"); - if (PriorityRule.equals("3") || PriorityRule.equals("5") || PriorityRule.equals("7") || PriorityRule.equals("1") || PriorityRule.equals("9")); else throw new IllegalArgumentException ("PriorityRule Invalid value - " + PriorityRule + " - Reference_ID=154 - 3 - 5 - 7 - 1 - 9"); - if (PriorityRule.length() > 1) - { - log.warning("Length > 1 - truncated"); - PriorityRule = PriorityRule.substring(0, 1); - } - set_Value (COLUMNNAME_PriorityRule, PriorityRule); - } - - /** Get Priority. - @return Priority of a document - */ - public String getPriorityRule () - { - return (String)get_Value(COLUMNNAME_PriorityRule); - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_ValueNoCheck (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** 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; - } - - /** Ref_Order_ID AD_Reference_ID=290 */ - public static final int REF_ORDER_ID_AD_Reference_ID=290; - /** Set Referenced Order. - @param Ref_Order_ID - Reference to corresponding Sales/Purchase Order - */ - public void setRef_Order_ID (int Ref_Order_ID) - { - if (Ref_Order_ID < 1) - set_Value (COLUMNNAME_Ref_Order_ID, null); - else - set_Value (COLUMNNAME_Ref_Order_ID, Integer.valueOf(Ref_Order_ID)); - } - - /** Get Referenced Order. - @return Reference to corresponding Sales/Purchase Order - */ - public int getRef_Order_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Ref_Order_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** SalesRep_ID AD_Reference_ID=190 */ - public static final int SALESREP_ID_AD_Reference_ID=190; - /** Set Sales Representative. - @param SalesRep_ID - Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID) - { - if (SalesRep_ID < 1) - throw new IllegalArgumentException ("SalesRep_ID is mandatory."); - set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_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(); - } - - /** Set Send EMail. - @param SendEMail - Enable sending Document EMail - */ - public void setSendEMail (boolean SendEMail) - { - set_Value (COLUMNNAME_SendEMail, Boolean.valueOf(SendEMail)); - } - - /** Get Send EMail. - @return Enable sending Document EMail - */ - public boolean isSendEMail () - { - Object oo = get_Value(COLUMNNAME_SendEMail); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Total Lines. - @param TotalLines - Total of all document lines - */ - public void setTotalLines (BigDecimal TotalLines) - { - if (TotalLines == null) - throw new IllegalArgumentException ("TotalLines is mandatory."); - set_ValueNoCheck (COLUMNNAME_TotalLines, TotalLines); - } - - /** Get Total Lines. - @return Total of all document lines - */ - public BigDecimal getTotalLines () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalLines); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** User1_ID AD_Reference_ID=134 */ - public static final int USER1_ID_AD_Reference_ID=134; - /** Set User List 1. - @param User1_ID - User defined list element #1 - */ - public void setUser1_ID (int User1_ID) - { - if (User1_ID < 1) - set_Value (COLUMNNAME_User1_ID, null); - else - set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); - } - - /** Get User List 1. - @return User defined list element #1 - */ - public int getUser1_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** User2_ID AD_Reference_ID=137 */ - public static final int USER2_ID_AD_Reference_ID=137; - /** Set User List 2. - @param User2_ID - User defined list element #2 - */ - public void setUser2_ID (int User2_ID) - { - if (User2_ID < 1) - set_Value (COLUMNNAME_User2_ID, null); - else - set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); - } - - /** Get User List 2. - @return User defined list element #2 - */ - public int getUser2_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Volume. - @param Volume - Volume of a product - */ - public void setVolume (BigDecimal Volume) - { - set_Value (COLUMNNAME_Volume, Volume); - } - - /** Get Volume. - @return Volume of a product - */ - public BigDecimal getVolume () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Volume); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Weight. - @param Weight - Weight of a product - */ - public void setWeight (BigDecimal Weight) - { - set_Value (COLUMNNAME_Weight, Weight); - } - - /** Get Weight. - @return Weight of a product - */ - public BigDecimal getWeight () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Weight); - if (bd == null) - return Env.ZERO; - return bd; - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_OrderLine.java b/base/src/org/compiere/model/X_C_OrderLine.java deleted file mode 100644 index c69b772185..0000000000 --- a/base/src/org/compiere/model/X_C_OrderLine.java +++ /dev/null @@ -1,1351 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_OrderLine - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_OrderLine (Properties ctx, int C_OrderLine_ID, String trxName) - { - super (ctx, C_OrderLine_ID, trxName); - /** if (C_OrderLine_ID == 0) - { - setC_BPartner_Location_ID (0); -// @C_BPartner_Location_ID@ - setC_Currency_ID (0); -// @C_Currency_ID@ - setC_OrderLine_ID (0); - setC_Order_ID (0); - setC_Tax_ID (0); - setC_UOM_ID (0); -// @#C_UOM_ID@ - setDateOrdered (new Timestamp(System.currentTimeMillis())); -// @DateOrdered@ - setFreightAmt (Env.ZERO); - setIsDescription (false); -// N - setLine (0); -// @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM C_OrderLine WHERE C_Order_ID=@C_Order_ID@ - setLineNetAmt (Env.ZERO); - setM_AttributeSetInstance_ID (0); - setM_Warehouse_ID (0); -// @M_Warehouse_ID@ - setPriceActual (Env.ZERO); - setPriceEntered (Env.ZERO); - setPriceLimit (Env.ZERO); - setPriceList (Env.ZERO); - setProcessed (false); - setQtyDelivered (Env.ZERO); - setQtyEntered (Env.ZERO); -// 1 - setQtyInvoiced (Env.ZERO); - setQtyLostSales (Env.ZERO); - setQtyOrdered (Env.ZERO); -// 1 - setQtyReserved (Env.ZERO); - } */ - } - - /** Load Constructor */ - public X_C_OrderLine (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_C_OrderLine[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_OrgTrx_ID AD_Reference_ID=130 */ - public static final int AD_ORGTRX_ID_AD_Reference_ID=130; - /** Set Trx Organization. - @param AD_OrgTrx_ID - Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) - { - if (AD_OrgTrx_ID < 1) - set_Value (COLUMNNAME_AD_OrgTrx_ID, null); - else - set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); - } - - /** Get Trx Organization. - @return Performing or initiating organization - */ - public int getAD_OrgTrx_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Activity getC_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID < 1) - set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_BPartner_Location getC_BPartner_Location() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner_Location.Table_Name); - I_C_BPartner_Location result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner_Location)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_Location_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Partner Location. - @param C_BPartner_Location_ID - Identifies the (ship to) address for this Business Partner - */ - public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) - { - if (C_BPartner_Location_ID < 1) - throw new IllegalArgumentException ("C_BPartner_Location_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID)); - } - - /** Get Partner Location. - @return Identifies the (ship to) address for this Business Partner - */ - public int getC_BPartner_Location_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Location_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Campaign getC_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID < 1) - set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Charge getC_Charge() throws Exception - { - Class clazz = MTable.getClass(I_C_Charge.Table_Name); - I_C_Charge result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Charge. - @param C_Charge_ID - Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID) - { - if (C_Charge_ID < 1) - set_Value (COLUMNNAME_C_Charge_ID, null); - else - set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); - } - - /** Get Charge. - @return Additional document charges - */ - public int getC_Charge_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - throw new IllegalArgumentException ("C_Currency_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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(); - } - - /** Set Sales Order Line. - @param C_OrderLine_ID - Sales Order Line - */ - public void setC_OrderLine_ID (int C_OrderLine_ID) - { - if (C_OrderLine_ID < 1) - throw new IllegalArgumentException ("C_OrderLine_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID)); - } - - /** Get Sales Order Line. - @return Sales Order Line - */ - public int getC_OrderLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Order getC_Order() throws Exception - { - Class clazz = MTable.getClass(I_C_Order.Table_Name); - I_C_Order result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Order_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Order. - @param C_Order_ID - Order - */ - public void setC_Order_ID (int C_Order_ID) - { - if (C_Order_ID < 1) - throw new IllegalArgumentException ("C_Order_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID)); - } - - /** 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(); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getC_Order_ID())); - } - - public I_C_ProjectPhase getC_ProjectPhase() throws Exception - { - Class clazz = MTable.getClass(I_C_ProjectPhase.Table_Name); - I_C_ProjectPhase result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_ProjectPhase)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ProjectPhase_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project Phase. - @param C_ProjectPhase_ID - Phase of a Project - */ - public void setC_ProjectPhase_ID (int C_ProjectPhase_ID) - { - if (C_ProjectPhase_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_ProjectPhase_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_ProjectPhase_ID, Integer.valueOf(C_ProjectPhase_ID)); - } - - /** Get Project Phase. - @return Phase of a Project - */ - public int getC_ProjectPhase_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_ProjectPhase_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_ProjectTask getC_ProjectTask() throws Exception - { - Class clazz = MTable.getClass(I_C_ProjectTask.Table_Name); - I_C_ProjectTask result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_ProjectTask)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ProjectTask_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project Task. - @param C_ProjectTask_ID - Actual Project Task in a Phase - */ - public void setC_ProjectTask_ID (int C_ProjectTask_ID) - { - if (C_ProjectTask_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_ProjectTask_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_ProjectTask_ID, Integer.valueOf(C_ProjectTask_ID)); - } - - /** Get Project Task. - @return Actual Project Task in a Phase - */ - public int getC_ProjectTask_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_ProjectTask_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Project getC_Project() throws Exception - { - Class clazz = MTable.getClass(I_C_Project.Table_Name); - I_C_Project result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID < 1) - set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Tax getC_Tax() throws Exception - { - Class clazz = MTable.getClass(I_C_Tax.Table_Name); - I_C_Tax result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Tax)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Tax_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Tax. - @param C_Tax_ID - Tax identifier - */ - public void setC_Tax_ID (int C_Tax_ID) - { - if (C_Tax_ID < 1) - throw new IllegalArgumentException ("C_Tax_ID is mandatory."); - set_Value (COLUMNNAME_C_Tax_ID, Integer.valueOf(C_Tax_ID)); - } - - /** Get Tax. - @return Tax identifier - */ - public int getC_Tax_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Tax_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_UOM getC_UOM() throws Exception - { - Class clazz = MTable.getClass(I_C_UOM.Table_Name); - I_C_UOM result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set UOM. - @param C_UOM_ID - Unit of Measure - */ - public void setC_UOM_ID (int C_UOM_ID) - { - if (C_UOM_ID < 1) - throw new IllegalArgumentException ("C_UOM_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); - } - - /** Get UOM. - @return Unit of Measure - */ - public int getC_UOM_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Date Delivered. - @param DateDelivered - Date when the product was delivered - */ - public void setDateDelivered (Timestamp DateDelivered) - { - set_ValueNoCheck (COLUMNNAME_DateDelivered, DateDelivered); - } - - /** Get Date Delivered. - @return Date when the product was delivered - */ - public Timestamp getDateDelivered () - { - return (Timestamp)get_Value(COLUMNNAME_DateDelivered); - } - - /** Set Date Invoiced. - @param DateInvoiced - Date printed on Invoice - */ - public void setDateInvoiced (Timestamp DateInvoiced) - { - set_ValueNoCheck (COLUMNNAME_DateInvoiced, DateInvoiced); - } - - /** Get Date Invoiced. - @return Date printed on Invoice - */ - public Timestamp getDateInvoiced () - { - return (Timestamp)get_Value(COLUMNNAME_DateInvoiced); - } - - /** Set Date Ordered. - @param DateOrdered - Date of Order - */ - public void setDateOrdered (Timestamp DateOrdered) - { - if (DateOrdered == null) - throw new IllegalArgumentException ("DateOrdered is mandatory."); - set_Value (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) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Discount %. - @param Discount - Discount in percent - */ - public void setDiscount (BigDecimal Discount) - { - set_Value (COLUMNNAME_Discount, Discount); - } - - /** Get Discount %. - @return Discount in percent - */ - public BigDecimal getDiscount () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Discount); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Freight Amount. - @param FreightAmt - Freight Amount - */ - public void setFreightAmt (BigDecimal FreightAmt) - { - if (FreightAmt == null) - throw new IllegalArgumentException ("FreightAmt is mandatory."); - set_Value (COLUMNNAME_FreightAmt, FreightAmt); - } - - /** Get Freight Amount. - @return Freight Amount - */ - public BigDecimal getFreightAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FreightAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Description Only. - @param IsDescription - if true, the line is just description and no transaction - */ - public void setIsDescription (boolean IsDescription) - { - set_Value (COLUMNNAME_IsDescription, Boolean.valueOf(IsDescription)); - } - - /** Get Description Only. - @return if true, the line is just description and no transaction - */ - public boolean isDescription () - { - Object oo = get_Value(COLUMNNAME_IsDescription); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Line No. - @param Line - Unique line for this document - */ - public void setLine (int Line) - { - set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); - } - - /** Get Line No. - @return Unique line for this document - */ - public int getLine () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Line); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Line Amount. - @param LineNetAmt - Line Extended Amount (Quantity * Actual Price) without Freight and Charges - */ - public void setLineNetAmt (BigDecimal LineNetAmt) - { - if (LineNetAmt == null) - throw new IllegalArgumentException ("LineNetAmt is mandatory."); - set_ValueNoCheck (COLUMNNAME_LineNetAmt, LineNetAmt); - } - - /** Get Line Amount. - @return Line Extended Amount (Quantity * Actual Price) without Freight and Charges - */ - public BigDecimal getLineNetAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_LineNetAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Attribute Set Instance. - @param M_AttributeSetInstance_ID - Product Attribute Set Instance - */ - public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) - { - if (M_AttributeSetInstance_ID < 0) - throw new IllegalArgumentException ("M_AttributeSetInstance_ID is mandatory."); - set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); - } - - /** Get Attribute Set Instance. - @return Product Attribute Set Instance - */ - public int getM_AttributeSetInstance_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Product getM_Product() throws Exception - { - Class clazz = MTable.getClass(I_M_Product.Table_Name); - I_M_Product result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - set_Value (COLUMNNAME_M_Product_ID, null); - else - set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Shipper getM_Shipper() throws Exception - { - Class clazz = MTable.getClass(I_M_Shipper.Table_Name); - I_M_Shipper result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Shipper)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Shipper_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Shipper. - @param M_Shipper_ID - Method or manner of product delivery - */ - public void setM_Shipper_ID (int M_Shipper_ID) - { - if (M_Shipper_ID < 1) - set_Value (COLUMNNAME_M_Shipper_ID, null); - else - set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID)); - } - - /** Get Shipper. - @return Method or manner of product delivery - */ - public int getM_Shipper_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** M_Warehouse_ID AD_Reference_ID=197 */ - public static final int M_WAREHOUSE_ID_AD_Reference_ID=197; - /** Set Warehouse. - @param M_Warehouse_ID - Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID) - { - if (M_Warehouse_ID < 1) - throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); - set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); - } - - /** 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 Unit Price. - @param PriceActual - Actual Price - */ - public void setPriceActual (BigDecimal PriceActual) - { - if (PriceActual == null) - throw new IllegalArgumentException ("PriceActual is mandatory."); - set_ValueNoCheck (COLUMNNAME_PriceActual, PriceActual); - } - - /** Get Unit Price. - @return Actual Price - */ - public BigDecimal getPriceActual () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceActual); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Cost Price. - @param PriceCost - Price per Unit of Measure including all indirect costs (Freight, etc.) - */ - public void setPriceCost (BigDecimal PriceCost) - { - set_Value (COLUMNNAME_PriceCost, PriceCost); - } - - /** Get Cost Price. - @return Price per Unit of Measure including all indirect costs (Freight, etc.) - */ - public BigDecimal getPriceCost () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceCost); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Price. - @param PriceEntered - Price Entered - the price based on the selected/base UoM - */ - public void setPriceEntered (BigDecimal PriceEntered) - { - if (PriceEntered == null) - throw new IllegalArgumentException ("PriceEntered is mandatory."); - set_Value (COLUMNNAME_PriceEntered, PriceEntered); - } - - /** Get Price. - @return Price Entered - the price based on the selected/base UoM - */ - public BigDecimal getPriceEntered () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceEntered); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Limit Price. - @param PriceLimit - Lowest price for a product - */ - public void setPriceLimit (BigDecimal PriceLimit) - { - if (PriceLimit == null) - throw new IllegalArgumentException ("PriceLimit is mandatory."); - set_Value (COLUMNNAME_PriceLimit, PriceLimit); - } - - /** Get Limit Price. - @return Lowest price for a product - */ - public BigDecimal getPriceLimit () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceLimit); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set List Price. - @param PriceList - List Price - */ - public void setPriceList (BigDecimal PriceList) - { - if (PriceList == null) - throw new IllegalArgumentException ("PriceList is mandatory."); - set_Value (COLUMNNAME_PriceList, PriceList); - } - - /** Get List Price. - @return List Price - */ - public BigDecimal getPriceList () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceList); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Delivered Quantity. - @param QtyDelivered - Delivered Quantity - */ - public void setQtyDelivered (BigDecimal QtyDelivered) - { - if (QtyDelivered == null) - throw new IllegalArgumentException ("QtyDelivered is mandatory."); - set_ValueNoCheck (COLUMNNAME_QtyDelivered, QtyDelivered); - } - - /** Get Delivered Quantity. - @return Delivered Quantity - */ - public BigDecimal getQtyDelivered () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyDelivered); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Quantity. - @param QtyEntered - The Quantity Entered is based on the selected UoM - */ - public void setQtyEntered (BigDecimal QtyEntered) - { - if (QtyEntered == null) - throw new IllegalArgumentException ("QtyEntered is mandatory."); - set_Value (COLUMNNAME_QtyEntered, QtyEntered); - } - - /** Get Quantity. - @return The Quantity Entered is based on the selected UoM - */ - public BigDecimal getQtyEntered () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyEntered); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Quantity Invoiced. - @param QtyInvoiced - Invoiced Quantity - */ - public void setQtyInvoiced (BigDecimal QtyInvoiced) - { - if (QtyInvoiced == null) - throw new IllegalArgumentException ("QtyInvoiced is mandatory."); - set_ValueNoCheck (COLUMNNAME_QtyInvoiced, QtyInvoiced); - } - - /** Get Quantity Invoiced. - @return Invoiced Quantity - */ - public BigDecimal getQtyInvoiced () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInvoiced); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Lost Sales Qty. - @param QtyLostSales - Quantity of potential sales - */ - public void setQtyLostSales (BigDecimal QtyLostSales) - { - if (QtyLostSales == null) - throw new IllegalArgumentException ("QtyLostSales is mandatory."); - set_Value (COLUMNNAME_QtyLostSales, QtyLostSales); - } - - /** Get Lost Sales Qty. - @return Quantity of potential sales - */ - public BigDecimal getQtyLostSales () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyLostSales); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Ordered Quantity. - @param QtyOrdered - Ordered Quantity - */ - public void setQtyOrdered (BigDecimal QtyOrdered) - { - if (QtyOrdered == null) - throw new IllegalArgumentException ("QtyOrdered is mandatory."); - set_Value (COLUMNNAME_QtyOrdered, QtyOrdered); - } - - /** Get Ordered Quantity. - @return Ordered Quantity - */ - public BigDecimal getQtyOrdered () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Reserved Quantity. - @param QtyReserved - Reserved Quantity - */ - public void setQtyReserved (BigDecimal QtyReserved) - { - if (QtyReserved == null) - throw new IllegalArgumentException ("QtyReserved is mandatory."); - set_ValueNoCheck (COLUMNNAME_QtyReserved, QtyReserved); - } - - /** Get Reserved Quantity. - @return Reserved Quantity - */ - public BigDecimal getQtyReserved () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Revenue Recognition Amt. - @param RRAmt - Revenue Recognition Amount - */ - public void setRRAmt (BigDecimal RRAmt) - { - set_Value (COLUMNNAME_RRAmt, RRAmt); - } - - /** Get Revenue Recognition Amt. - @return Revenue Recognition Amount - */ - public BigDecimal getRRAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_RRAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Revenue Recognition Start. - @param RRStartDate - Revenue Recognition Start Date - */ - public void setRRStartDate (Timestamp RRStartDate) - { - set_Value (COLUMNNAME_RRStartDate, RRStartDate); - } - - /** Get Revenue Recognition Start. - @return Revenue Recognition Start Date - */ - public Timestamp getRRStartDate () - { - return (Timestamp)get_Value(COLUMNNAME_RRStartDate); - } - - /** Ref_OrderLine_ID AD_Reference_ID=271 */ - public static final int REF_ORDERLINE_ID_AD_Reference_ID=271; - /** Set Referenced Order Line. - @param Ref_OrderLine_ID - Reference to corresponding Sales/Purchase Order - */ - public void setRef_OrderLine_ID (int Ref_OrderLine_ID) - { - if (Ref_OrderLine_ID < 1) - set_Value (COLUMNNAME_Ref_OrderLine_ID, null); - else - set_Value (COLUMNNAME_Ref_OrderLine_ID, Integer.valueOf(Ref_OrderLine_ID)); - } - - /** Get Referenced Order Line. - @return Reference to corresponding Sales/Purchase Order - */ - public int getRef_OrderLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Ref_OrderLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Resource Assignment. - @param S_ResourceAssignment_ID - Resource Assignment - */ - public void setS_ResourceAssignment_ID (int S_ResourceAssignment_ID) - { - if (S_ResourceAssignment_ID < 1) - set_Value (COLUMNNAME_S_ResourceAssignment_ID, null); - else - set_Value (COLUMNNAME_S_ResourceAssignment_ID, Integer.valueOf(S_ResourceAssignment_ID)); - } - - /** Get Resource Assignment. - @return Resource Assignment - */ - public int getS_ResourceAssignment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_S_ResourceAssignment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** User1_ID AD_Reference_ID=134 */ - public static final int USER1_ID_AD_Reference_ID=134; - /** Set User List 1. - @param User1_ID - User defined list element #1 - */ - public void setUser1_ID (int User1_ID) - { - if (User1_ID < 1) - set_Value (COLUMNNAME_User1_ID, null); - else - set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); - } - - /** Get User List 1. - @return User defined list element #1 - */ - public int getUser1_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** User2_ID AD_Reference_ID=137 */ - public static final int USER2_ID_AD_Reference_ID=137; - /** Set User List 2. - @param User2_ID - User defined list element #2 - */ - public void setUser2_ID (int User2_ID) - { - if (User2_ID < 1) - set_Value (COLUMNNAME_User2_ID, null); - else - set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); - } - - /** Get User List 2. - @return User defined list element #2 - */ - public int getUser2_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); - if (ii == null) - return 0; - return ii.intValue(); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_OrderTax.java b/base/src/org/compiere/model/X_C_OrderTax.java index a7910ce9dd..7efd8de727 100644 --- a/base/src/org/compiere/model/X_C_OrderTax.java +++ b/base/src/org/compiere/model/X_C_OrderTax.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for C_OrderTax * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_OrderTax extends PO implements I_C_OrderTax, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_OrgAssignment.java b/base/src/org/compiere/model/X_C_OrgAssignment.java index d4d2abad23..47e230b0e0 100644 --- a/base/src/org/compiere/model/X_C_OrgAssignment.java +++ b/base/src/org/compiere/model/X_C_OrgAssignment.java @@ -25,7 +25,7 @@ import java.util.logging.Level; /** Generated Model for C_OrgAssignment * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_OrgAssignment extends PO implements I_C_OrgAssignment, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_POS.java b/base/src/org/compiere/model/X_C_POS.java deleted file mode 100644 index a9ebbf8c30..0000000000 --- a/base/src/org/compiere/model/X_C_POS.java +++ /dev/null @@ -1,490 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_POS - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_POS extends PO implements I_C_POS, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_POS (Properties ctx, int C_POS_ID, String trxName) - { - super (ctx, C_POS_ID, trxName); - /** if (C_POS_ID == 0) - { - setC_CashBook_ID (0); - setC_POS_ID (0); - setIsModifyPrice (false); -// N - setM_PriceList_ID (0); - setM_Warehouse_ID (0); - setName (null); - setSalesRep_ID (0); - } */ - } - - /** Load Constructor */ - public X_C_POS (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_C_POS[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** C_BPartnerCashTrx_ID AD_Reference_ID=173 */ - public static final int C_BPARTNERCASHTRX_ID_AD_Reference_ID=173; - /** Set Template B.Partner. - @param C_BPartnerCashTrx_ID - Business Partner used for creating new Business Partners on the fly - */ - public void setC_BPartnerCashTrx_ID (int C_BPartnerCashTrx_ID) - { - if (C_BPartnerCashTrx_ID < 1) - set_Value (COLUMNNAME_C_BPartnerCashTrx_ID, null); - else - set_Value (COLUMNNAME_C_BPartnerCashTrx_ID, Integer.valueOf(C_BPartnerCashTrx_ID)); - } - - /** Get Template B.Partner. - @return Business Partner used for creating new Business Partners on the fly - */ - public int getC_BPartnerCashTrx_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartnerCashTrx_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_CashBook getC_CashBook() throws Exception - { - Class clazz = MTable.getClass(I_C_CashBook.Table_Name); - I_C_CashBook result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_CashBook)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_CashBook_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Cash Book. - @param C_CashBook_ID - Cash Book for recording petty cash transactions - */ - public void setC_CashBook_ID (int C_CashBook_ID) - { - if (C_CashBook_ID < 1) - throw new IllegalArgumentException ("C_CashBook_ID is mandatory."); - set_Value (COLUMNNAME_C_CashBook_ID, Integer.valueOf(C_CashBook_ID)); - } - - /** Get Cash Book. - @return Cash Book for recording petty cash transactions - */ - public int getC_CashBook_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_CashBook_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 1) - set_Value (COLUMNNAME_C_DocType_ID, null); - else - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_POSKeyLayout getC_POSKeyLayout() throws Exception - { - Class clazz = MTable.getClass(I_C_POSKeyLayout.Table_Name); - I_C_POSKeyLayout result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_POSKeyLayout)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_POSKeyLayout_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set POS Key Layout. - @param C_POSKeyLayout_ID - POS Function Key Layout - */ - public void setC_POSKeyLayout_ID (int C_POSKeyLayout_ID) - { - if (C_POSKeyLayout_ID < 1) - set_Value (COLUMNNAME_C_POSKeyLayout_ID, null); - else - set_Value (COLUMNNAME_C_POSKeyLayout_ID, Integer.valueOf(C_POSKeyLayout_ID)); - } - - /** Get POS Key Layout. - @return POS Function Key Layout - */ - public int getC_POSKeyLayout_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_POSKeyLayout_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set POS Terminal. - @param C_POS_ID - Point of Sales Terminal - */ - public void setC_POS_ID (int C_POS_ID) - { - if (C_POS_ID < 1) - throw new IllegalArgumentException ("C_POS_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_POS_ID, Integer.valueOf(C_POS_ID)); - } - - /** Get POS Terminal. - @return Point of Sales Terminal - */ - public int getC_POS_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_POS_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set CashDrawer. - @param CashDrawer CashDrawer */ - public void setCashDrawer (String CashDrawer) - { - - if (CashDrawer != null && CashDrawer.length() > 120) - { - log.warning("Length > 120 - truncated"); - CashDrawer = CashDrawer.substring(0, 120); - } - set_Value (COLUMNNAME_CashDrawer, CashDrawer); - } - - /** Get CashDrawer. - @return CashDrawer */ - public String getCashDrawer () - { - return (String)get_Value(COLUMNNAME_CashDrawer); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Comment/Help. - @param Help - Comment or Hint - */ - public void setHelp (String Help) - { - - if (Help != null && Help.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - Help = Help.substring(0, 2000); - } - set_Value (COLUMNNAME_Help, Help); - } - - /** Get Comment/Help. - @return Comment or Hint - */ - public String getHelp () - { - return (String)get_Value(COLUMNNAME_Help); - } - - /** Set Modify Price. - @param IsModifyPrice - Allow modifying the price - */ - public void setIsModifyPrice (boolean IsModifyPrice) - { - set_Value (COLUMNNAME_IsModifyPrice, Boolean.valueOf(IsModifyPrice)); - } - - /** Get Modify Price. - @return Allow modifying the price - */ - public boolean isModifyPrice () - { - Object oo = get_Value(COLUMNNAME_IsModifyPrice); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - public I_M_PriceList getM_PriceList() throws Exception - { - Class clazz = MTable.getClass(I_M_PriceList.Table_Name); - I_M_PriceList result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_PriceList)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PriceList_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Price List. - @param M_PriceList_ID - Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID) - { - if (M_PriceList_ID < 1) - throw new IllegalArgumentException ("M_PriceList_ID is mandatory."); - set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID)); - } - - /** 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 I_M_Warehouse getM_Warehouse() throws Exception - { - Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); - I_M_Warehouse result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Warehouse. - @param M_Warehouse_ID - Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID) - { - if (M_Warehouse_ID < 1) - throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); - set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); - } - - /** 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 Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Set Printer Name. - @param PrinterName - Name of the Printer - */ - public void setPrinterName (String PrinterName) - { - - if (PrinterName != null && PrinterName.length() > 60) - { - log.warning("Length > 60 - truncated"); - PrinterName = PrinterName.substring(0, 60); - } - set_Value (COLUMNNAME_PrinterName, PrinterName); - } - - /** Get Printer Name. - @return Name of the Printer - */ - public String getPrinterName () - { - return (String)get_Value(COLUMNNAME_PrinterName); - } - - /** SalesRep_ID AD_Reference_ID=190 */ - public static final int SALESREP_ID_AD_Reference_ID=190; - /** Set Sales Representative. - @param SalesRep_ID - Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID) - { - if (SalesRep_ID < 1) - throw new IllegalArgumentException ("SalesRep_ID is mandatory."); - set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_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(); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_POSKey.java b/base/src/org/compiere/model/X_C_POSKey.java index 733dcd8637..78334a3701 100644 --- a/base/src/org/compiere/model/X_C_POSKey.java +++ b/base/src/org/compiere/model/X_C_POSKey.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_POSKey * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_POSKey extends PO implements I_C_POSKey, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_POSKeyLayout.java b/base/src/org/compiere/model/X_C_POSKeyLayout.java index 5045e9b070..2e476b3fc6 100644 --- a/base/src/org/compiere/model/X_C_POSKeyLayout.java +++ b/base/src/org/compiere/model/X_C_POSKeyLayout.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_POSKeyLayout * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_POSKeyLayout extends PO implements I_C_POSKeyLayout, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_PaySchedule.java b/base/src/org/compiere/model/X_C_PaySchedule.java index d749cad071..b1aeeb4cec 100644 --- a/base/src/org/compiere/model/X_C_PaySchedule.java +++ b/base/src/org/compiere/model/X_C_PaySchedule.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_PaySchedule * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_PaySchedule extends PO implements I_C_PaySchedule, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_PaySelection.java b/base/src/org/compiere/model/X_C_PaySelection.java index 5a745beaad..128af0e904 100644 --- a/base/src/org/compiere/model/X_C_PaySelection.java +++ b/base/src/org/compiere/model/X_C_PaySelection.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_PaySelection * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_PaySelection extends PO implements I_C_PaySelection, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_PaySelectionCheck.java b/base/src/org/compiere/model/X_C_PaySelectionCheck.java index 84f8d016f6..c79e6894a2 100644 --- a/base/src/org/compiere/model/X_C_PaySelectionCheck.java +++ b/base/src/org/compiere/model/X_C_PaySelectionCheck.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for C_PaySelectionCheck * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_PaySelectionCheck extends PO implements I_C_PaySelectionCheck, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_PaySelectionLine.java b/base/src/org/compiere/model/X_C_PaySelectionLine.java index 42cf71ee4b..764aff4695 100644 --- a/base/src/org/compiere/model/X_C_PaySelectionLine.java +++ b/base/src/org/compiere/model/X_C_PaySelectionLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_PaySelectionLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_PaySelectionLine extends PO implements I_C_PaySelectionLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Payment.java b/base/src/org/compiere/model/X_C_Payment.java deleted file mode 100644 index f6bd43ebe2..0000000000 --- a/base/src/org/compiere/model/X_C_Payment.java +++ /dev/null @@ -1,2198 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_Payment - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_Payment extends PO implements I_C_Payment, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_Payment (Properties ctx, int C_Payment_ID, String trxName) - { - super (ctx, C_Payment_ID, trxName); - /** if (C_Payment_ID == 0) - { - setC_BPartner_ID (0); - setC_BankAccount_ID (0); - setC_Currency_ID (0); - setC_DocType_ID (0); - setC_Payment_ID (0); - setDateAcct (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setDateTrx (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setDocAction (null); -// CO - setDocStatus (null); -// DR - setDocumentNo (null); - setIsAllocated (false); - setIsApproved (false); -// N - setIsDelayedCapture (false); - setIsOnline (false); - setIsOverUnderPayment (false); -// N - setIsPrepayment (false); - setIsReceipt (false); - setIsReconciled (false); - setIsSelfService (false); - setPayAmt (Env.ZERO); -// 0 - setPosted (false); -// N - setProcessed (false); - setTenderType (null); -// K - setTrxType (null); -// S - } */ - } - - /** Load Constructor */ - public X_C_Payment (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_C_Payment[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_OrgTrx_ID AD_Reference_ID=130 */ - public static final int AD_ORGTRX_ID_AD_Reference_ID=130; - /** Set Trx Organization. - @param AD_OrgTrx_ID - Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) - { - if (AD_OrgTrx_ID < 1) - set_Value (COLUMNNAME_AD_OrgTrx_ID, null); - else - set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); - } - - /** Get Trx Organization. - @return Performing or initiating organization - */ - public int getAD_OrgTrx_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Account City. - @param A_City - City or the Credit Card or Account Holder - */ - public void setA_City (String A_City) - { - - if (A_City != null && A_City.length() > 60) - { - log.warning("Length > 60 - truncated"); - A_City = A_City.substring(0, 60); - } - set_Value (COLUMNNAME_A_City, A_City); - } - - /** Get Account City. - @return City or the Credit Card or Account Holder - */ - public String getA_City () - { - return (String)get_Value(COLUMNNAME_A_City); - } - - /** Set Account Country. - @param A_Country - Country - */ - public void setA_Country (String A_Country) - { - - if (A_Country != null && A_Country.length() > 40) - { - log.warning("Length > 40 - truncated"); - A_Country = A_Country.substring(0, 40); - } - set_Value (COLUMNNAME_A_Country, A_Country); - } - - /** Get Account Country. - @return Country - */ - public String getA_Country () - { - return (String)get_Value(COLUMNNAME_A_Country); - } - - /** Set Account EMail. - @param A_EMail - Email Address - */ - public void setA_EMail (String A_EMail) - { - - if (A_EMail != null && A_EMail.length() > 60) - { - log.warning("Length > 60 - truncated"); - A_EMail = A_EMail.substring(0, 60); - } - set_Value (COLUMNNAME_A_EMail, A_EMail); - } - - /** Get Account EMail. - @return Email Address - */ - public String getA_EMail () - { - return (String)get_Value(COLUMNNAME_A_EMail); - } - - /** Set Driver License. - @param A_Ident_DL - Payment Identification - Driver License - */ - public void setA_Ident_DL (String A_Ident_DL) - { - - if (A_Ident_DL != null && A_Ident_DL.length() > 20) - { - log.warning("Length > 20 - truncated"); - A_Ident_DL = A_Ident_DL.substring(0, 20); - } - set_Value (COLUMNNAME_A_Ident_DL, A_Ident_DL); - } - - /** Get Driver License. - @return Payment Identification - Driver License - */ - public String getA_Ident_DL () - { - return (String)get_Value(COLUMNNAME_A_Ident_DL); - } - - /** Set Social Security No. - @param A_Ident_SSN - Payment Identification - Social Security No - */ - public void setA_Ident_SSN (String A_Ident_SSN) - { - - if (A_Ident_SSN != null && A_Ident_SSN.length() > 20) - { - log.warning("Length > 20 - truncated"); - A_Ident_SSN = A_Ident_SSN.substring(0, 20); - } - set_Value (COLUMNNAME_A_Ident_SSN, A_Ident_SSN); - } - - /** Get Social Security No. - @return Payment Identification - Social Security No - */ - public String getA_Ident_SSN () - { - return (String)get_Value(COLUMNNAME_A_Ident_SSN); - } - - /** Set Account Name. - @param A_Name - Name on Credit Card or Account holder - */ - public void setA_Name (String A_Name) - { - - if (A_Name != null && A_Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - A_Name = A_Name.substring(0, 60); - } - set_Value (COLUMNNAME_A_Name, A_Name); - } - - /** Get Account Name. - @return Name on Credit Card or Account holder - */ - public String getA_Name () - { - return (String)get_Value(COLUMNNAME_A_Name); - } - - /** Set Account State. - @param A_State - State of the Credit Card or Account holder - */ - public void setA_State (String A_State) - { - - if (A_State != null && A_State.length() > 40) - { - log.warning("Length > 40 - truncated"); - A_State = A_State.substring(0, 40); - } - set_Value (COLUMNNAME_A_State, A_State); - } - - /** Get Account State. - @return State of the Credit Card or Account holder - */ - public String getA_State () - { - return (String)get_Value(COLUMNNAME_A_State); - } - - /** Set Account Street. - @param A_Street - Street address of the Credit Card or Account holder - */ - public void setA_Street (String A_Street) - { - - if (A_Street != null && A_Street.length() > 60) - { - log.warning("Length > 60 - truncated"); - A_Street = A_Street.substring(0, 60); - } - set_Value (COLUMNNAME_A_Street, A_Street); - } - - /** Get Account Street. - @return Street address of the Credit Card or Account holder - */ - public String getA_Street () - { - return (String)get_Value(COLUMNNAME_A_Street); - } - - /** Set Account Zip/Postal. - @param A_Zip - Zip Code of the Credit Card or Account Holder - */ - public void setA_Zip (String A_Zip) - { - - if (A_Zip != null && A_Zip.length() > 20) - { - log.warning("Length > 20 - truncated"); - A_Zip = A_Zip.substring(0, 20); - } - set_Value (COLUMNNAME_A_Zip, A_Zip); - } - - /** Get Account Zip/Postal. - @return Zip Code of the Credit Card or Account Holder - */ - public String getA_Zip () - { - return (String)get_Value(COLUMNNAME_A_Zip); - } - - /** Set Account No. - @param AccountNo - Account Number - */ - public void setAccountNo (String AccountNo) - { - - if (AccountNo != null && AccountNo.length() > 20) - { - log.warning("Length > 20 - truncated"); - AccountNo = AccountNo.substring(0, 20); - } - set_Value (COLUMNNAME_AccountNo, AccountNo); - } - - /** Get Account No. - @return Account Number - */ - public String getAccountNo () - { - return (String)get_Value(COLUMNNAME_AccountNo); - } - - public I_C_Activity getC_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID < 1) - set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BP_BankAccount getC_BP_BankAccount() throws Exception - { - Class clazz = MTable.getClass(I_C_BP_BankAccount.Table_Name); - I_C_BP_BankAccount result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BP_BankAccount)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BP_BankAccount_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Partner Bank Account. - @param C_BP_BankAccount_ID - Bank Account of the Business Partner - */ - public void setC_BP_BankAccount_ID (int C_BP_BankAccount_ID) - { - if (C_BP_BankAccount_ID < 1) - set_Value (COLUMNNAME_C_BP_BankAccount_ID, null); - else - set_Value (COLUMNNAME_C_BP_BankAccount_ID, Integer.valueOf(C_BP_BankAccount_ID)); - } - - /** Get Partner Bank Account. - @return Bank Account of the Business Partner - */ - public int getC_BP_BankAccount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_BankAccount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - throw new IllegalArgumentException ("C_BPartner_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_BankAccount getC_BankAccount() throws Exception - { - Class clazz = MTable.getClass(I_C_BankAccount.Table_Name); - I_C_BankAccount result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BankAccount)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BankAccount_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Bank Account. - @param C_BankAccount_ID - Account at the Bank - */ - public void setC_BankAccount_ID (int C_BankAccount_ID) - { - if (C_BankAccount_ID < 1) - throw new IllegalArgumentException ("C_BankAccount_ID is mandatory."); - set_Value (COLUMNNAME_C_BankAccount_ID, Integer.valueOf(C_BankAccount_ID)); - } - - /** Get Bank Account. - @return Account at the Bank - */ - public int getC_BankAccount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BankAccount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Campaign getC_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID < 1) - set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Charge getC_Charge() throws Exception - { - Class clazz = MTable.getClass(I_C_Charge.Table_Name); - I_C_Charge result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Charge. - @param C_Charge_ID - Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID) - { - if (C_Charge_ID < 1) - set_Value (COLUMNNAME_C_Charge_ID, null); - else - set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); - } - - /** Get Charge. - @return Additional document charges - */ - public int getC_Charge_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_ConversionType getC_ConversionType() throws Exception - { - Class clazz = MTable.getClass(I_C_ConversionType.Table_Name); - I_C_ConversionType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_ConversionType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ConversionType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency Type. - @param C_ConversionType_ID - Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID) - { - if (C_ConversionType_ID < 1) - set_Value (COLUMNNAME_C_ConversionType_ID, null); - else - set_Value (COLUMNNAME_C_ConversionType_ID, Integer.valueOf(C_ConversionType_ID)); - } - - /** Get Currency Type. - @return Currency Conversion Rate Type - */ - public int getC_ConversionType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - throw new IllegalArgumentException ("C_Currency_ID is mandatory."); - set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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 I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 0) - throw new IllegalArgumentException ("C_DocType_ID is mandatory."); - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Invoice getC_Invoice() throws Exception - { - Class clazz = MTable.getClass(I_C_Invoice.Table_Name); - I_C_Invoice result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Invoice)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Invoice_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Invoice. - @param C_Invoice_ID - Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID) - { - if (C_Invoice_ID < 1) - set_Value (COLUMNNAME_C_Invoice_ID, null); - else - set_Value (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID)); - } - - /** Get Invoice. - @return Invoice Identifier - */ - public int getC_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Order getC_Order() throws Exception - { - Class clazz = MTable.getClass(I_C_Order.Table_Name); - I_C_Order result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Order_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Order. - @param C_Order_ID - Order - */ - public void setC_Order_ID (int C_Order_ID) - { - if (C_Order_ID < 1) - set_Value (COLUMNNAME_C_Order_ID, null); - else - set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID)); - } - - /** 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(); - } - - public I_C_PaymentBatch getC_PaymentBatch() throws Exception - { - Class clazz = MTable.getClass(I_C_PaymentBatch.Table_Name); - I_C_PaymentBatch result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_PaymentBatch)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentBatch_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment Batch. - @param C_PaymentBatch_ID - Payment batch for EFT - */ - public void setC_PaymentBatch_ID (int C_PaymentBatch_ID) - { - if (C_PaymentBatch_ID < 1) - set_Value (COLUMNNAME_C_PaymentBatch_ID, null); - else - set_Value (COLUMNNAME_C_PaymentBatch_ID, Integer.valueOf(C_PaymentBatch_ID)); - } - - /** Get Payment Batch. - @return Payment batch for EFT - */ - public int getC_PaymentBatch_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentBatch_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Payment. - @param C_Payment_ID - Payment identifier - */ - public void setC_Payment_ID (int C_Payment_ID) - { - if (C_Payment_ID < 1) - throw new IllegalArgumentException ("C_Payment_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID)); - } - - /** Get Payment. - @return Payment identifier - */ - public int getC_Payment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Project getC_Project() throws Exception - { - Class clazz = MTable.getClass(I_C_Project.Table_Name); - I_C_Project result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID < 1) - set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Charge amount. - @param ChargeAmt - Charge Amount - */ - public void setChargeAmt (BigDecimal ChargeAmt) - { - set_Value (COLUMNNAME_ChargeAmt, ChargeAmt); - } - - /** Get Charge amount. - @return Charge Amount - */ - public BigDecimal getChargeAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Check No. - @param CheckNo - Check Number - */ - public void setCheckNo (String CheckNo) - { - - if (CheckNo != null && CheckNo.length() > 20) - { - log.warning("Length > 20 - truncated"); - CheckNo = CheckNo.substring(0, 20); - } - set_Value (COLUMNNAME_CheckNo, CheckNo); - } - - /** Get Check No. - @return Check Number - */ - public String getCheckNo () - { - return (String)get_Value(COLUMNNAME_CheckNo); - } - - /** Set Exp. Month. - @param CreditCardExpMM - Expiry Month - */ - public void setCreditCardExpMM (int CreditCardExpMM) - { - set_Value (COLUMNNAME_CreditCardExpMM, Integer.valueOf(CreditCardExpMM)); - } - - /** Get Exp. Month. - @return Expiry Month - */ - public int getCreditCardExpMM () - { - Integer ii = (Integer)get_Value(COLUMNNAME_CreditCardExpMM); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Exp. Year. - @param CreditCardExpYY - Expiry Year - */ - public void setCreditCardExpYY (int CreditCardExpYY) - { - set_Value (COLUMNNAME_CreditCardExpYY, Integer.valueOf(CreditCardExpYY)); - } - - /** Get Exp. Year. - @return Expiry Year - */ - public int getCreditCardExpYY () - { - Integer ii = (Integer)get_Value(COLUMNNAME_CreditCardExpYY); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Number. - @param CreditCardNumber - Credit Card Number - */ - public void setCreditCardNumber (String CreditCardNumber) - { - - if (CreditCardNumber != null && CreditCardNumber.length() > 20) - { - log.warning("Length > 20 - truncated"); - CreditCardNumber = CreditCardNumber.substring(0, 20); - } - set_Value (COLUMNNAME_CreditCardNumber, CreditCardNumber); - } - - /** Get Number. - @return Credit Card Number - */ - public String getCreditCardNumber () - { - return (String)get_Value(COLUMNNAME_CreditCardNumber); - } - - /** CreditCardType AD_Reference_ID=149 */ - public static final int CREDITCARDTYPE_AD_Reference_ID=149; - /** Amex = A */ - public static final String CREDITCARDTYPE_Amex = "A"; - /** MasterCard = M */ - public static final String CREDITCARDTYPE_MasterCard = "M"; - /** Visa = V */ - public static final String CREDITCARDTYPE_Visa = "V"; - /** ATM = C */ - public static final String CREDITCARDTYPE_ATM = "C"; - /** Diners = D */ - public static final String CREDITCARDTYPE_Diners = "D"; - /** Discover = N */ - public static final String CREDITCARDTYPE_Discover = "N"; - /** Purchase Card = P */ - public static final String CREDITCARDTYPE_PurchaseCard = "P"; - /** Set Credit Card. - @param CreditCardType - Credit Card (Visa, MC, AmEx) - */ - public void setCreditCardType (String CreditCardType) - { - - if (CreditCardType == null || CreditCardType.equals("A") || CreditCardType.equals("M") || CreditCardType.equals("V") || CreditCardType.equals("C") || CreditCardType.equals("D") || CreditCardType.equals("N") || CreditCardType.equals("P")); else throw new IllegalArgumentException ("CreditCardType Invalid value - " + CreditCardType + " - Reference_ID=149 - A - M - V - C - D - N - P"); - if (CreditCardType != null && CreditCardType.length() > 1) - { - log.warning("Length > 1 - truncated"); - CreditCardType = CreditCardType.substring(0, 1); - } - set_Value (COLUMNNAME_CreditCardType, CreditCardType); - } - - /** Get Credit Card. - @return Credit Card (Visa, MC, AmEx) - */ - public String getCreditCardType () - { - return (String)get_Value(COLUMNNAME_CreditCardType); - } - - /** Set Verification Code. - @param CreditCardVV - Credit Card Verification code on credit card - */ - public void setCreditCardVV (String CreditCardVV) - { - - if (CreditCardVV != null && CreditCardVV.length() > 4) - { - log.warning("Length > 4 - truncated"); - CreditCardVV = CreditCardVV.substring(0, 4); - } - set_Value (COLUMNNAME_CreditCardVV, CreditCardVV); - } - - /** Get Verification Code. - @return Credit Card Verification code on credit card - */ - public String getCreditCardVV () - { - return (String)get_Value(COLUMNNAME_CreditCardVV); - } - - /** Set Account Date. - @param DateAcct - Accounting Date - */ - public void setDateAcct (Timestamp DateAcct) - { - if (DateAcct == null) - throw new IllegalArgumentException ("DateAcct is mandatory."); - set_Value (COLUMNNAME_DateAcct, DateAcct); - } - - /** Get Account Date. - @return Accounting Date - */ - public Timestamp getDateAcct () - { - return (Timestamp)get_Value(COLUMNNAME_DateAcct); - } - - /** Set Transaction Date. - @param DateTrx - Transaction Date - */ - public void setDateTrx (Timestamp DateTrx) - { - if (DateTrx == null) - throw new IllegalArgumentException ("DateTrx is mandatory."); - set_Value (COLUMNNAME_DateTrx, DateTrx); - } - - /** Get Transaction Date. - @return Transaction Date - */ - public Timestamp getDateTrx () - { - return (Timestamp)get_Value(COLUMNNAME_DateTrx); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Discount Amount. - @param DiscountAmt - Calculated amount of discount - */ - public void setDiscountAmt (BigDecimal DiscountAmt) - { - set_Value (COLUMNNAME_DiscountAmt, DiscountAmt); - } - - /** Get Discount Amount. - @return Calculated amount of discount - */ - public BigDecimal getDiscountAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DiscountAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** DocAction AD_Reference_ID=135 */ - public static final int DOCACTION_AD_Reference_ID=135; - /** Complete = CO */ - public static final String DOCACTION_Complete = "CO"; - /** Approve = AP */ - public static final String DOCACTION_Approve = "AP"; - /** Reject = RJ */ - public static final String DOCACTION_Reject = "RJ"; - /** Post = PO */ - public static final String DOCACTION_Post = "PO"; - /** Void = VO */ - public static final String DOCACTION_Void = "VO"; - /** Close = CL */ - public static final String DOCACTION_Close = "CL"; - /** Reverse - Correct = RC */ - public static final String DOCACTION_Reverse_Correct = "RC"; - /** Reverse - Accrual = RA */ - public static final String DOCACTION_Reverse_Accrual = "RA"; - /** Invalidate = IN */ - public static final String DOCACTION_Invalidate = "IN"; - /** Re-activate = RE */ - public static final String DOCACTION_Re_Activate = "RE"; - /** = -- */ - public static final String DOCACTION_None = "--"; - /** Prepare = PR */ - public static final String DOCACTION_Prepare = "PR"; - /** Unlock = XL */ - public static final String DOCACTION_Unlock = "XL"; - /** Wait Complete = WC */ - public static final String DOCACTION_WaitComplete = "WC"; - /** Set Document Action. - @param DocAction - The targeted status of the document - */ - public void setDocAction (String DocAction) - { - if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); - 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("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC"); - if (DocAction.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocAction = DocAction.substring(0, 2); - } - set_Value (COLUMNNAME_DocAction, DocAction); - } - - /** Get Document Action. - @return The targeted status of the document - */ - public String getDocAction () - { - return (String)get_Value(COLUMNNAME_DocAction); - } - - /** DocStatus AD_Reference_ID=131 */ - public static final int DOCSTATUS_AD_Reference_ID=131; - /** Drafted = DR */ - public static final String DOCSTATUS_Drafted = "DR"; - /** Completed = CO */ - public static final String DOCSTATUS_Completed = "CO"; - /** Approved = AP */ - public static final String DOCSTATUS_Approved = "AP"; - /** Not Approved = NA */ - public static final String DOCSTATUS_NotApproved = "NA"; - /** Voided = VO */ - public static final String DOCSTATUS_Voided = "VO"; - /** Invalid = IN */ - public static final String DOCSTATUS_Invalid = "IN"; - /** Reversed = RE */ - public static final String DOCSTATUS_Reversed = "RE"; - /** Closed = CL */ - public static final String DOCSTATUS_Closed = "CL"; - /** Unknown = ?? */ - public static final String DOCSTATUS_Unknown = "??"; - /** In Progress = IP */ - public static final String DOCSTATUS_InProgress = "IP"; - /** Waiting Payment = WP */ - public static final String DOCSTATUS_WaitingPayment = "WP"; - /** Waiting Confirmation = WC */ - public static final String DOCSTATUS_WaitingConfirmation = "WC"; - /** Set Document Status. - @param DocStatus - The current status of the document - */ - public void setDocStatus (String DocStatus) - { - if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); - if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); - if (DocStatus.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocStatus = DocStatus.substring(0, 2); - } - set_Value (COLUMNNAME_DocStatus, DocStatus); - } - - /** Get Document Status. - @return The current status of the document - */ - public String getDocStatus () - { - return (String)get_Value(COLUMNNAME_DocStatus); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - if (DocumentNo == null) - throw new IllegalArgumentException ("DocumentNo is mandatory."); - - if (DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); - } - set_Value (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getDocumentNo()); - } - - /** Set Allocated. - @param IsAllocated - Indicates if the payment has been allocated - */ - public void setIsAllocated (boolean IsAllocated) - { - set_Value (COLUMNNAME_IsAllocated, Boolean.valueOf(IsAllocated)); - } - - /** Get Allocated. - @return Indicates if the payment has been allocated - */ - public boolean isAllocated () - { - Object oo = get_Value(COLUMNNAME_IsAllocated); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Approved. - @param IsApproved - Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved) - { - set_ValueNoCheck (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); - } - - /** Get Approved. - @return Indicates if this document requires approval - */ - public boolean isApproved () - { - Object oo = get_Value(COLUMNNAME_IsApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Delayed Capture. - @param IsDelayedCapture - Charge after Shipment - */ - public void setIsDelayedCapture (boolean IsDelayedCapture) - { - set_Value (COLUMNNAME_IsDelayedCapture, Boolean.valueOf(IsDelayedCapture)); - } - - /** Get Delayed Capture. - @return Charge after Shipment - */ - public boolean isDelayedCapture () - { - Object oo = get_Value(COLUMNNAME_IsDelayedCapture); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Online Access. - @param IsOnline - Can be accessed online - */ - public void setIsOnline (boolean IsOnline) - { - set_Value (COLUMNNAME_IsOnline, Boolean.valueOf(IsOnline)); - } - - /** Get Online Access. - @return Can be accessed online - */ - public boolean isOnline () - { - Object oo = get_Value(COLUMNNAME_IsOnline); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Over/Under Payment. - @param IsOverUnderPayment - Over-Payment (unallocated) or Under-Payment (partial payment) - */ - public void setIsOverUnderPayment (boolean IsOverUnderPayment) - { - set_Value (COLUMNNAME_IsOverUnderPayment, Boolean.valueOf(IsOverUnderPayment)); - } - - /** Get Over/Under Payment. - @return Over-Payment (unallocated) or Under-Payment (partial payment) - */ - public boolean isOverUnderPayment () - { - Object oo = get_Value(COLUMNNAME_IsOverUnderPayment); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Prepayment. - @param IsPrepayment - The Payment/Receipt is a Prepayment - */ - public void setIsPrepayment (boolean IsPrepayment) - { - set_Value (COLUMNNAME_IsPrepayment, Boolean.valueOf(IsPrepayment)); - } - - /** Get Prepayment. - @return The Payment/Receipt is a Prepayment - */ - public boolean isPrepayment () - { - Object oo = get_Value(COLUMNNAME_IsPrepayment); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Receipt. - @param IsReceipt - This is a sales transaction (receipt) - */ - public void setIsReceipt (boolean IsReceipt) - { - set_Value (COLUMNNAME_IsReceipt, Boolean.valueOf(IsReceipt)); - } - - /** Get Receipt. - @return This is a sales transaction (receipt) - */ - public boolean isReceipt () - { - Object oo = get_Value(COLUMNNAME_IsReceipt); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Reconciled. - @param IsReconciled - Payment is reconciled with bank statement - */ - public void setIsReconciled (boolean IsReconciled) - { - set_Value (COLUMNNAME_IsReconciled, Boolean.valueOf(IsReconciled)); - } - - /** Get Reconciled. - @return Payment is reconciled with bank statement - */ - public boolean isReconciled () - { - Object oo = get_Value(COLUMNNAME_IsReconciled); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Self-Service. - @param IsSelfService - This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService) - { - set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); - } - - /** Get Self-Service. - @return This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService () - { - Object oo = get_Value(COLUMNNAME_IsSelfService); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Micr. - @param Micr - Combination of routing no, account and check no - */ - public void setMicr (String Micr) - { - - if (Micr != null && Micr.length() > 20) - { - log.warning("Length > 20 - truncated"); - Micr = Micr.substring(0, 20); - } - set_Value (COLUMNNAME_Micr, Micr); - } - - /** Get Micr. - @return Combination of routing no, account and check no - */ - public String getMicr () - { - return (String)get_Value(COLUMNNAME_Micr); - } - - /** Set Online Processing. - @param OProcessing - This payment can be processed online - */ - public void setOProcessing (String OProcessing) - { - - if (OProcessing != null && OProcessing.length() > 1) - { - log.warning("Length > 1 - truncated"); - OProcessing = OProcessing.substring(0, 1); - } - set_Value (COLUMNNAME_OProcessing, OProcessing); - } - - /** Get Online Processing. - @return This payment can be processed online - */ - public String getOProcessing () - { - return (String)get_Value(COLUMNNAME_OProcessing); - } - - /** Set Original Transaction ID. - @param Orig_TrxID - Original Transaction ID - */ - public void setOrig_TrxID (String Orig_TrxID) - { - - if (Orig_TrxID != null && Orig_TrxID.length() > 20) - { - log.warning("Length > 20 - truncated"); - Orig_TrxID = Orig_TrxID.substring(0, 20); - } - set_Value (COLUMNNAME_Orig_TrxID, Orig_TrxID); - } - - /** Get Original Transaction ID. - @return Original Transaction ID - */ - public String getOrig_TrxID () - { - return (String)get_Value(COLUMNNAME_Orig_TrxID); - } - - /** Set Over/Under Payment. - @param OverUnderAmt - Over-Payment (unallocated) or Under-Payment (partial payment) Amount - */ - public void setOverUnderAmt (BigDecimal OverUnderAmt) - { - set_Value (COLUMNNAME_OverUnderAmt, OverUnderAmt); - } - - /** Get Over/Under Payment. - @return Over-Payment (unallocated) or Under-Payment (partial payment) Amount - */ - public BigDecimal getOverUnderAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OverUnderAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set PO Number. - @param PONum - Purchase Order Number - */ - public void setPONum (String PONum) - { - - if (PONum != null && PONum.length() > 60) - { - log.warning("Length > 60 - truncated"); - PONum = PONum.substring(0, 60); - } - set_Value (COLUMNNAME_PONum, PONum); - } - - /** Get PO Number. - @return Purchase Order Number - */ - public String getPONum () - { - return (String)get_Value(COLUMNNAME_PONum); - } - - /** Set Payment amount. - @param PayAmt - Amount being paid - */ - public void setPayAmt (BigDecimal PayAmt) - { - if (PayAmt == null) - throw new IllegalArgumentException ("PayAmt is mandatory."); - set_Value (COLUMNNAME_PayAmt, PayAmt); - } - - /** Get Payment amount. - @return Amount being paid - */ - public BigDecimal getPayAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PayAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Posted. - @param Posted - Posting status - */ - public void setPosted (boolean Posted) - { - set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); - } - - /** Get Posted. - @return Posting status - */ - public boolean isPosted () - { - Object oo = get_Value(COLUMNNAME_Posted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** 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; - } - - /** Set Authorization Code. - @param R_AuthCode - Authorization Code returned - */ - public void setR_AuthCode (String R_AuthCode) - { - - if (R_AuthCode != null && R_AuthCode.length() > 20) - { - log.warning("Length > 20 - truncated"); - R_AuthCode = R_AuthCode.substring(0, 20); - } - set_ValueNoCheck (COLUMNNAME_R_AuthCode, R_AuthCode); - } - - /** Get Authorization Code. - @return Authorization Code returned - */ - public String getR_AuthCode () - { - return (String)get_Value(COLUMNNAME_R_AuthCode); - } - - /** Set Authorization Code (DC). - @param R_AuthCode_DC - Authorization Code Delayed Capture returned - */ - public void setR_AuthCode_DC (String R_AuthCode_DC) - { - - if (R_AuthCode_DC != null && R_AuthCode_DC.length() > 20) - { - log.warning("Length > 20 - truncated"); - R_AuthCode_DC = R_AuthCode_DC.substring(0, 20); - } - set_ValueNoCheck (COLUMNNAME_R_AuthCode_DC, R_AuthCode_DC); - } - - /** Get Authorization Code (DC). - @return Authorization Code Delayed Capture returned - */ - public String getR_AuthCode_DC () - { - return (String)get_Value(COLUMNNAME_R_AuthCode_DC); - } - - /** R_AvsAddr AD_Reference_ID=213 */ - public static final int R_AVSADDR_AD_Reference_ID=213; - /** Match = Y */ - public static final String R_AVSADDR_Match = "Y"; - /** No Match = N */ - public static final String R_AVSADDR_NoMatch = "N"; - /** Unavailable = X */ - public static final String R_AVSADDR_Unavailable = "X"; - /** Set Address verified. - @param R_AvsAddr - This address has been verified - */ - public void setR_AvsAddr (String R_AvsAddr) - { - - if (R_AvsAddr == null || R_AvsAddr.equals("Y") || R_AvsAddr.equals("N") || R_AvsAddr.equals("X")); else throw new IllegalArgumentException ("R_AvsAddr Invalid value - " + R_AvsAddr + " - Reference_ID=213 - Y - N - X"); - if (R_AvsAddr != null && R_AvsAddr.length() > 1) - { - log.warning("Length > 1 - truncated"); - R_AvsAddr = R_AvsAddr.substring(0, 1); - } - set_ValueNoCheck (COLUMNNAME_R_AvsAddr, R_AvsAddr); - } - - /** Get Address verified. - @return This address has been verified - */ - public String getR_AvsAddr () - { - return (String)get_Value(COLUMNNAME_R_AvsAddr); - } - - /** R_AvsZip AD_Reference_ID=213 */ - public static final int R_AVSZIP_AD_Reference_ID=213; - /** Match = Y */ - public static final String R_AVSZIP_Match = "Y"; - /** No Match = N */ - public static final String R_AVSZIP_NoMatch = "N"; - /** Unavailable = X */ - public static final String R_AVSZIP_Unavailable = "X"; - /** Set Zip verified. - @param R_AvsZip - The Zip Code has been verified - */ - public void setR_AvsZip (String R_AvsZip) - { - - if (R_AvsZip == null || R_AvsZip.equals("Y") || R_AvsZip.equals("N") || R_AvsZip.equals("X")); else throw new IllegalArgumentException ("R_AvsZip Invalid value - " + R_AvsZip + " - Reference_ID=213 - Y - N - X"); - if (R_AvsZip != null && R_AvsZip.length() > 1) - { - log.warning("Length > 1 - truncated"); - R_AvsZip = R_AvsZip.substring(0, 1); - } - set_ValueNoCheck (COLUMNNAME_R_AvsZip, R_AvsZip); - } - - /** Get Zip verified. - @return The Zip Code has been verified - */ - public String getR_AvsZip () - { - return (String)get_Value(COLUMNNAME_R_AvsZip); - } - - /** Set CVV Match. - @param R_CVV2Match - Credit Card Verification Code Match - */ - public void setR_CVV2Match (boolean R_CVV2Match) - { - set_ValueNoCheck (COLUMNNAME_R_CVV2Match, Boolean.valueOf(R_CVV2Match)); - } - - /** Get CVV Match. - @return Credit Card Verification Code Match - */ - public boolean isR_CVV2Match () - { - Object oo = get_Value(COLUMNNAME_R_CVV2Match); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Info. - @param R_Info - Response info - */ - public void setR_Info (String R_Info) - { - - if (R_Info != null && R_Info.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - R_Info = R_Info.substring(0, 2000); - } - set_ValueNoCheck (COLUMNNAME_R_Info, R_Info); - } - - /** Get Info. - @return Response info - */ - public String getR_Info () - { - return (String)get_Value(COLUMNNAME_R_Info); - } - - /** Set Reference. - @param R_PnRef - Payment reference - */ - public void setR_PnRef (String R_PnRef) - { - - if (R_PnRef != null && R_PnRef.length() > 20) - { - log.warning("Length > 20 - truncated"); - R_PnRef = R_PnRef.substring(0, 20); - } - set_ValueNoCheck (COLUMNNAME_R_PnRef, R_PnRef); - } - - /** Get Reference. - @return Payment reference - */ - public String getR_PnRef () - { - return (String)get_Value(COLUMNNAME_R_PnRef); - } - - /** Set Reference (DC). - @param R_PnRef_DC - Payment Reference Delayed Capture - */ - public void setR_PnRef_DC (String R_PnRef_DC) - { - - if (R_PnRef_DC != null && R_PnRef_DC.length() > 20) - { - log.warning("Length > 20 - truncated"); - R_PnRef_DC = R_PnRef_DC.substring(0, 20); - } - set_ValueNoCheck (COLUMNNAME_R_PnRef_DC, R_PnRef_DC); - } - - /** Get Reference (DC). - @return Payment Reference Delayed Capture - */ - public String getR_PnRef_DC () - { - return (String)get_Value(COLUMNNAME_R_PnRef_DC); - } - - /** Set Response Message. - @param R_RespMsg - Response message - */ - public void setR_RespMsg (String R_RespMsg) - { - - if (R_RespMsg != null && R_RespMsg.length() > 60) - { - log.warning("Length > 60 - truncated"); - R_RespMsg = R_RespMsg.substring(0, 60); - } - set_ValueNoCheck (COLUMNNAME_R_RespMsg, R_RespMsg); - } - - /** Get Response Message. - @return Response message - */ - public String getR_RespMsg () - { - return (String)get_Value(COLUMNNAME_R_RespMsg); - } - - /** Set Result. - @param R_Result - Result of transmission - */ - public void setR_Result (String R_Result) - { - - if (R_Result != null && R_Result.length() > 20) - { - log.warning("Length > 20 - truncated"); - R_Result = R_Result.substring(0, 20); - } - set_ValueNoCheck (COLUMNNAME_R_Result, R_Result); - } - - /** Get Result. - @return Result of transmission - */ - public String getR_Result () - { - return (String)get_Value(COLUMNNAME_R_Result); - } - - /** Ref_Payment_ID AD_Reference_ID=343 */ - public static final int REF_PAYMENT_ID_AD_Reference_ID=343; - /** Set Referenced Payment. - @param Ref_Payment_ID Referenced Payment */ - public void setRef_Payment_ID (int Ref_Payment_ID) - { - if (Ref_Payment_ID < 1) - set_ValueNoCheck (COLUMNNAME_Ref_Payment_ID, null); - else - set_ValueNoCheck (COLUMNNAME_Ref_Payment_ID, Integer.valueOf(Ref_Payment_ID)); - } - - /** Get Referenced Payment. - @return Referenced Payment */ - public int getRef_Payment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Ref_Payment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Routing No. - @param RoutingNo - Bank Routing Number - */ - public void setRoutingNo (String RoutingNo) - { - - if (RoutingNo != null && RoutingNo.length() > 20) - { - log.warning("Length > 20 - truncated"); - RoutingNo = RoutingNo.substring(0, 20); - } - set_Value (COLUMNNAME_RoutingNo, RoutingNo); - } - - /** Get Routing No. - @return Bank Routing Number - */ - public String getRoutingNo () - { - return (String)get_Value(COLUMNNAME_RoutingNo); - } - - /** Set Swipe. - @param Swipe - Track 1 and 2 of the Credit Card - */ - public void setSwipe (String Swipe) - { - - if (Swipe != null && Swipe.length() > 80) - { - log.warning("Length > 80 - truncated"); - Swipe = Swipe.substring(0, 80); - } - set_ValueNoCheck (COLUMNNAME_Swipe, Swipe); - } - - /** Get Swipe. - @return Track 1 and 2 of the Credit Card - */ - public String getSwipe () - { - return (String)get_Value(COLUMNNAME_Swipe); - } - - /** Set Tax Amount. - @param TaxAmt - Tax Amount for a document - */ - public void setTaxAmt (BigDecimal TaxAmt) - { - set_Value (COLUMNNAME_TaxAmt, TaxAmt); - } - - /** Get Tax Amount. - @return Tax Amount for a document - */ - public BigDecimal getTaxAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** TenderType AD_Reference_ID=214 */ - public static final int TENDERTYPE_AD_Reference_ID=214; - /** Credit Card = C */ - public static final String TENDERTYPE_CreditCard = "C"; - /** Check = K */ - public static final String TENDERTYPE_Check = "K"; - /** Direct Deposit = A */ - public static final String TENDERTYPE_DirectDeposit = "A"; - /** Direct Debit = D */ - public static final String TENDERTYPE_DirectDebit = "D"; - /** Set Tender type. - @param TenderType - Method of Payment - */ - public void setTenderType (String TenderType) - { - if (TenderType == null) throw new IllegalArgumentException ("TenderType is mandatory"); - if (TenderType.equals("C") || TenderType.equals("K") || TenderType.equals("A") || TenderType.equals("D")); else throw new IllegalArgumentException ("TenderType Invalid value - " + TenderType + " - Reference_ID=214 - C - K - A - D"); - if (TenderType.length() > 1) - { - log.warning("Length > 1 - truncated"); - TenderType = TenderType.substring(0, 1); - } - set_Value (COLUMNNAME_TenderType, TenderType); - } - - /** Get Tender type. - @return Method of Payment - */ - public String getTenderType () - { - return (String)get_Value(COLUMNNAME_TenderType); - } - - /** TrxType AD_Reference_ID=215 */ - public static final int TRXTYPE_AD_Reference_ID=215; - /** Sales = S */ - public static final String TRXTYPE_Sales = "S"; - /** Delayed Capture = D */ - public static final String TRXTYPE_DelayedCapture = "D"; - /** Credit (Payment) = C */ - public static final String TRXTYPE_CreditPayment = "C"; - /** Voice Authorization = F */ - public static final String TRXTYPE_VoiceAuthorization = "F"; - /** Authorization = A */ - public static final String TRXTYPE_Authorization = "A"; - /** Void = V */ - public static final String TRXTYPE_Void = "V"; - /** Set Transaction Type. - @param TrxType - Type of credit card transaction - */ - public void setTrxType (String TrxType) - { - if (TrxType == null) throw new IllegalArgumentException ("TrxType is mandatory"); - if (TrxType.equals("S") || TrxType.equals("D") || TrxType.equals("C") || TrxType.equals("F") || TrxType.equals("A") || TrxType.equals("V")); else throw new IllegalArgumentException ("TrxType Invalid value - " + TrxType + " - Reference_ID=215 - S - D - C - F - A - V"); - if (TrxType.length() > 1) - { - log.warning("Length > 1 - truncated"); - TrxType = TrxType.substring(0, 1); - } - set_Value (COLUMNNAME_TrxType, TrxType); - } - - /** Get Transaction Type. - @return Type of credit card transaction - */ - public String getTrxType () - { - return (String)get_Value(COLUMNNAME_TrxType); - } - - /** User1_ID AD_Reference_ID=134 */ - public static final int USER1_ID_AD_Reference_ID=134; - /** Set User List 1. - @param User1_ID - User defined list element #1 - */ - public void setUser1_ID (int User1_ID) - { - if (User1_ID < 1) - set_Value (COLUMNNAME_User1_ID, null); - else - set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); - } - - /** Get User List 1. - @return User defined list element #1 - */ - public int getUser1_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** User2_ID AD_Reference_ID=137 */ - public static final int USER2_ID_AD_Reference_ID=137; - /** Set User List 2. - @param User2_ID - User defined list element #2 - */ - public void setUser2_ID (int User2_ID) - { - if (User2_ID < 1) - set_Value (COLUMNNAME_User2_ID, null); - else - set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); - } - - /** Get User List 2. - @return User defined list element #2 - */ - public int getUser2_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Voice authorization code. - @param VoiceAuthCode - Voice Authorization Code from credit card company - */ - public void setVoiceAuthCode (String VoiceAuthCode) - { - - if (VoiceAuthCode != null && VoiceAuthCode.length() > 20) - { - log.warning("Length > 20 - truncated"); - VoiceAuthCode = VoiceAuthCode.substring(0, 20); - } - set_Value (COLUMNNAME_VoiceAuthCode, VoiceAuthCode); - } - - /** Get Voice authorization code. - @return Voice Authorization Code from credit card company - */ - public String getVoiceAuthCode () - { - return (String)get_Value(COLUMNNAME_VoiceAuthCode); - } - - /** Set Write-off Amount. - @param WriteOffAmt - Amount to write-off - */ - public void setWriteOffAmt (BigDecimal WriteOffAmt) - { - set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt); - } - - /** Get Write-off Amount. - @return Amount to write-off - */ - public BigDecimal getWriteOffAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt); - if (bd == null) - return Env.ZERO; - return bd; - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_PaymentAllocate.java b/base/src/org/compiere/model/X_C_PaymentAllocate.java index cfa143d237..7753fd8448 100644 --- a/base/src/org/compiere/model/X_C_PaymentAllocate.java +++ b/base/src/org/compiere/model/X_C_PaymentAllocate.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_PaymentAllocate * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_PaymentAllocate extends PO implements I_C_PaymentAllocate, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_PaymentBatch.java b/base/src/org/compiere/model/X_C_PaymentBatch.java index 59468f68ea..196c6f9d24 100644 --- a/base/src/org/compiere/model/X_C_PaymentBatch.java +++ b/base/src/org/compiere/model/X_C_PaymentBatch.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_PaymentBatch * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_PaymentBatch extends PO implements I_C_PaymentBatch, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_PaymentProcessor.java b/base/src/org/compiere/model/X_C_PaymentProcessor.java index 27f23c2e37..1ae9072aee 100644 --- a/base/src/org/compiere/model/X_C_PaymentProcessor.java +++ b/base/src/org/compiere/model/X_C_PaymentProcessor.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_PaymentProcessor * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_PaymentProcessor extends PO implements I_C_PaymentProcessor, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_PaymentTerm.java b/base/src/org/compiere/model/X_C_PaymentTerm.java index 69ee0dec1e..c1223fc838 100644 --- a/base/src/org/compiere/model/X_C_PaymentTerm.java +++ b/base/src/org/compiere/model/X_C_PaymentTerm.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_PaymentTerm * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_PaymentTerm extends PO implements I_C_PaymentTerm, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Period.java b/base/src/org/compiere/model/X_C_Period.java index 6fcf45d0ae..e2f227ed8e 100644 --- a/base/src/org/compiere/model/X_C_Period.java +++ b/base/src/org/compiere/model/X_C_Period.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Period * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Period extends PO implements I_C_Period, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_PeriodControl.java b/base/src/org/compiere/model/X_C_PeriodControl.java deleted file mode 100644 index d0db638aad..0000000000 --- a/base/src/org/compiere/model/X_C_PeriodControl.java +++ /dev/null @@ -1,304 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_PeriodControl - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_PeriodControl extends PO implements I_C_PeriodControl, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_PeriodControl (Properties ctx, int C_PeriodControl_ID, String trxName) - { - super (ctx, C_PeriodControl_ID, trxName); - /** if (C_PeriodControl_ID == 0) - { - setC_PeriodControl_ID (0); - setC_Period_ID (0); - setDocBaseType (null); - setPeriodAction (null); -// N - } */ - } - - /** Load Constructor */ - public X_C_PeriodControl (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_C_PeriodControl[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Period Control. - @param C_PeriodControl_ID Period Control */ - public void setC_PeriodControl_ID (int C_PeriodControl_ID) - { - if (C_PeriodControl_ID < 1) - throw new IllegalArgumentException ("C_PeriodControl_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_PeriodControl_ID, Integer.valueOf(C_PeriodControl_ID)); - } - - /** Get Period Control. - @return Period Control */ - public int getC_PeriodControl_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_PeriodControl_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getC_PeriodControl_ID())); - } - - public I_C_Period getC_Period() throws Exception - { - Class clazz = MTable.getClass(I_C_Period.Table_Name); - I_C_Period result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Period)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Period_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Period. - @param C_Period_ID - Period of the Calendar - */ - public void setC_Period_ID (int C_Period_ID) - { - if (C_Period_ID < 1) - throw new IllegalArgumentException ("C_Period_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID)); - } - - /** Get Period. - @return Period of the Calendar - */ - public int getC_Period_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** DocBaseType AD_Reference_ID=183 */ - public static final int DOCBASETYPE_AD_Reference_ID=183; - /** GL Journal = GLJ */ - public static final String DOCBASETYPE_GLJournal = "GLJ"; - /** GL Document = GLD */ - public static final String DOCBASETYPE_GLDocument = "GLD"; - /** AP Invoice = API */ - public static final String DOCBASETYPE_APInvoice = "API"; - /** AP Payment = APP */ - public static final String DOCBASETYPE_APPayment = "APP"; - /** AR Invoice = ARI */ - public static final String DOCBASETYPE_ARInvoice = "ARI"; - /** AR Receipt = ARR */ - public static final String DOCBASETYPE_ARReceipt = "ARR"; - /** Sales Order = SOO */ - public static final String DOCBASETYPE_SalesOrder = "SOO"; - /** AR Pro Forma Invoice = ARF */ - public static final String DOCBASETYPE_ARProFormaInvoice = "ARF"; - /** Material Delivery = MMS */ - public static final String DOCBASETYPE_MaterialDelivery = "MMS"; - /** Material Receipt = MMR */ - public static final String DOCBASETYPE_MaterialReceipt = "MMR"; - /** Material Movement = MMM */ - public static final String DOCBASETYPE_MaterialMovement = "MMM"; - /** Purchase Order = POO */ - public static final String DOCBASETYPE_PurchaseOrder = "POO"; - /** Purchase Requisition = POR */ - public static final String DOCBASETYPE_PurchaseRequisition = "POR"; - /** Material Physical Inventory = MMI */ - public static final String DOCBASETYPE_MaterialPhysicalInventory = "MMI"; - /** AP Credit Memo = APC */ - public static final String DOCBASETYPE_APCreditMemo = "APC"; - /** AR Credit Memo = ARC */ - public static final String DOCBASETYPE_ARCreditMemo = "ARC"; - /** Bank Statement = CMB */ - public static final String DOCBASETYPE_BankStatement = "CMB"; - /** Cash Journal = CMC */ - public static final String DOCBASETYPE_CashJournal = "CMC"; - /** Payment Allocation = CMA */ - public static final String DOCBASETYPE_PaymentAllocation = "CMA"; - /** Material Production = MMP */ - public static final String DOCBASETYPE_MaterialProduction = "MMP"; - /** Match Invoice = MXI */ - public static final String DOCBASETYPE_MatchInvoice = "MXI"; - /** Match PO = MXP */ - public static final String DOCBASETYPE_MatchPO = "MXP"; - /** Project Issue = PJI */ - public static final String DOCBASETYPE_ProjectIssue = "PJI"; - /** Set Document BaseType. - @param DocBaseType - Logical type of document - */ - public void setDocBaseType (String DocBaseType) - { - if (DocBaseType == null) throw new IllegalArgumentException ("DocBaseType is mandatory"); - if (DocBaseType.equals("GLJ") || DocBaseType.equals("GLD") || DocBaseType.equals("API") || DocBaseType.equals("APP") || DocBaseType.equals("ARI") || DocBaseType.equals("ARR") || DocBaseType.equals("SOO") || DocBaseType.equals("ARF") || DocBaseType.equals("MMS") || DocBaseType.equals("MMR") || DocBaseType.equals("MMM") || DocBaseType.equals("POO") || DocBaseType.equals("POR") || DocBaseType.equals("MMI") || DocBaseType.equals("APC") || DocBaseType.equals("ARC") || DocBaseType.equals("CMB") || DocBaseType.equals("CMC") || DocBaseType.equals("CMA") || DocBaseType.equals("MMP") || DocBaseType.equals("MXI") || DocBaseType.equals("MXP") || DocBaseType.equals("PJI")); else throw new IllegalArgumentException ("DocBaseType Invalid value - " + DocBaseType + " - Reference_ID=183 - GLJ - GLD - API - APP - ARI - ARR - SOO - ARF - MMS - MMR - MMM - POO - POR - MMI - APC - ARC - CMB - CMC - CMA - MMP - MXI - MXP - PJI"); - if (DocBaseType.length() > 3) - { - log.warning("Length > 3 - truncated"); - DocBaseType = DocBaseType.substring(0, 3); - } - set_ValueNoCheck (COLUMNNAME_DocBaseType, DocBaseType); - } - - /** Get Document BaseType. - @return Logical type of document - */ - public String getDocBaseType () - { - return (String)get_Value(COLUMNNAME_DocBaseType); - } - - /** PeriodAction AD_Reference_ID=176 */ - public static final int PERIODACTION_AD_Reference_ID=176; - /** Open Period = O */ - public static final String PERIODACTION_OpenPeriod = "O"; - /** Close Period = C */ - public static final String PERIODACTION_ClosePeriod = "C"; - /** Permanently Close Period = P */ - public static final String PERIODACTION_PermanentlyClosePeriod = "P"; - /** = N */ - public static final String PERIODACTION_NoAction = "N"; - /** Set Period Action. - @param PeriodAction - Action taken for this period - */ - public void setPeriodAction (String PeriodAction) - { - if (PeriodAction == null) throw new IllegalArgumentException ("PeriodAction is mandatory"); - if (PeriodAction.equals("O") || PeriodAction.equals("C") || PeriodAction.equals("P") || PeriodAction.equals("N")); else throw new IllegalArgumentException ("PeriodAction Invalid value - " + PeriodAction + " - Reference_ID=176 - O - C - P - N"); - if (PeriodAction.length() > 1) - { - log.warning("Length > 1 - truncated"); - PeriodAction = PeriodAction.substring(0, 1); - } - set_Value (COLUMNNAME_PeriodAction, PeriodAction); - } - - /** Get Period Action. - @return Action taken for this period - */ - public String getPeriodAction () - { - return (String)get_Value(COLUMNNAME_PeriodAction); - } - - /** PeriodStatus AD_Reference_ID=177 */ - public static final int PERIODSTATUS_AD_Reference_ID=177; - /** Open = O */ - public static final String PERIODSTATUS_Open = "O"; - /** Closed = C */ - public static final String PERIODSTATUS_Closed = "C"; - /** Permanently closed = P */ - public static final String PERIODSTATUS_PermanentlyClosed = "P"; - /** Never opened = N */ - public static final String PERIODSTATUS_NeverOpened = "N"; - /** Set Period Status. - @param PeriodStatus - Current state of this period - */ - public void setPeriodStatus (String PeriodStatus) - { - - if (PeriodStatus == null || PeriodStatus.equals("O") || PeriodStatus.equals("C") || PeriodStatus.equals("P") || PeriodStatus.equals("N")); else throw new IllegalArgumentException ("PeriodStatus Invalid value - " + PeriodStatus + " - Reference_ID=177 - O - C - P - N"); - if (PeriodStatus != null && PeriodStatus.length() > 1) - { - log.warning("Length > 1 - truncated"); - PeriodStatus = PeriodStatus.substring(0, 1); - } - set_ValueNoCheck (COLUMNNAME_PeriodStatus, PeriodStatus); - } - - /** Get Period Status. - @return Current state of this period - */ - public String getPeriodStatus () - { - return (String)get_Value(COLUMNNAME_PeriodStatus); - } - - /** 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; - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_Phase.java b/base/src/org/compiere/model/X_C_Phase.java index 9a3d103696..52a238691f 100644 --- a/base/src/org/compiere/model/X_C_Phase.java +++ b/base/src/org/compiere/model/X_C_Phase.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Phase * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Phase extends PO implements I_C_Phase, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Project.java b/base/src/org/compiere/model/X_C_Project.java index 3927bbb918..8b2d0df4fb 100644 --- a/base/src/org/compiere/model/X_C_Project.java +++ b/base/src/org/compiere/model/X_C_Project.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Project * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Project extends PO implements I_C_Project, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ProjectIssue.java b/base/src/org/compiere/model/X_C_ProjectIssue.java index f78c415efd..d45be9866f 100644 --- a/base/src/org/compiere/model/X_C_ProjectIssue.java +++ b/base/src/org/compiere/model/X_C_ProjectIssue.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ProjectIssue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ProjectIssueMA.java b/base/src/org/compiere/model/X_C_ProjectIssueMA.java index b67373af49..960bb69662 100644 --- a/base/src/org/compiere/model/X_C_ProjectIssueMA.java +++ b/base/src/org/compiere/model/X_C_ProjectIssueMA.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ProjectIssueMA * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ProjectIssueMA extends PO implements I_C_ProjectIssueMA, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ProjectLine.java b/base/src/org/compiere/model/X_C_ProjectLine.java index d0f939d380..0695e9e66c 100644 --- a/base/src/org/compiere/model/X_C_ProjectLine.java +++ b/base/src/org/compiere/model/X_C_ProjectLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ProjectLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ProjectLine extends PO implements I_C_ProjectLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ProjectPhase.java b/base/src/org/compiere/model/X_C_ProjectPhase.java index a589436b4b..b6d1df5fa2 100644 --- a/base/src/org/compiere/model/X_C_ProjectPhase.java +++ b/base/src/org/compiere/model/X_C_ProjectPhase.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ProjectPhase * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ProjectPhase extends PO implements I_C_ProjectPhase, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ProjectTask.java b/base/src/org/compiere/model/X_C_ProjectTask.java index a0d49b473b..67cc853f49 100644 --- a/base/src/org/compiere/model/X_C_ProjectTask.java +++ b/base/src/org/compiere/model/X_C_ProjectTask.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ProjectTask * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ProjectTask extends PO implements I_C_ProjectTask, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ProjectType.java b/base/src/org/compiere/model/X_C_ProjectType.java index 8a89005f89..e59454b90d 100644 --- a/base/src/org/compiere/model/X_C_ProjectType.java +++ b/base/src/org/compiere/model/X_C_ProjectType.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ProjectType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ProjectType extends PO implements I_C_ProjectType, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Project_Acct.java b/base/src/org/compiere/model/X_C_Project_Acct.java index 1f6859ca7f..bd19237112 100644 --- a/base/src/org/compiere/model/X_C_Project_Acct.java +++ b/base/src/org/compiere/model/X_C_Project_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_Project_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Project_Acct extends PO implements I_C_Project_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Recurring.java b/base/src/org/compiere/model/X_C_Recurring.java index f9b7dd0f87..45aef37eaa 100644 --- a/base/src/org/compiere/model/X_C_Recurring.java +++ b/base/src/org/compiere/model/X_C_Recurring.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Recurring * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Recurring extends PO implements I_C_Recurring, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Recurring_Run.java b/base/src/org/compiere/model/X_C_Recurring_Run.java index a4bc00bb9a..d7b4420bac 100644 --- a/base/src/org/compiere/model/X_C_Recurring_Run.java +++ b/base/src/org/compiere/model/X_C_Recurring_Run.java @@ -25,7 +25,7 @@ import java.util.logging.Level; /** Generated Model for C_Recurring_Run * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Recurring_Run extends PO implements I_C_Recurring_Run, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Region.java b/base/src/org/compiere/model/X_C_Region.java index 1216676c14..41875ec9b7 100644 --- a/base/src/org/compiere/model/X_C_Region.java +++ b/base/src/org/compiere/model/X_C_Region.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Region * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Region extends PO implements I_C_Region, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Remuneration.java b/base/src/org/compiere/model/X_C_Remuneration.java index d0e3e89295..ac81a0f32b 100644 --- a/base/src/org/compiere/model/X_C_Remuneration.java +++ b/base/src/org/compiere/model/X_C_Remuneration.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Remuneration * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Remuneration extends PO implements I_C_Remuneration, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RevenueRecognition.java b/base/src/org/compiere/model/X_C_RevenueRecognition.java index 2b2fd32246..f8bc68c337 100644 --- a/base/src/org/compiere/model/X_C_RevenueRecognition.java +++ b/base/src/org/compiere/model/X_C_RevenueRecognition.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RevenueRecognition * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RevenueRecognition extends PO implements I_C_RevenueRecognition, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RevenueRecognition_Plan.java b/base/src/org/compiere/model/X_C_RevenueRecognition_Plan.java index c612792594..ce92c8da72 100644 --- a/base/src/org/compiere/model/X_C_RevenueRecognition_Plan.java +++ b/base/src/org/compiere/model/X_C_RevenueRecognition_Plan.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RevenueRecognition_Plan * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RevenueRecognition_Plan extends PO implements I_C_RevenueRecognition_Plan, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RevenueRecognition_Run.java b/base/src/org/compiere/model/X_C_RevenueRecognition_Run.java index b120a342d9..8147c211ac 100644 --- a/base/src/org/compiere/model/X_C_RevenueRecognition_Run.java +++ b/base/src/org/compiere/model/X_C_RevenueRecognition_Run.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RevenueRecognition_Run * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RevenueRecognition_Run extends PO implements I_C_RevenueRecognition_Run, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQ.java b/base/src/org/compiere/model/X_C_RfQ.java index 4897772339..98eade0156 100644 --- a/base/src/org/compiere/model/X_C_RfQ.java +++ b/base/src/org/compiere/model/X_C_RfQ.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RfQ * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQ extends PO implements I_C_RfQ, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQLine.java b/base/src/org/compiere/model/X_C_RfQLine.java index 29cb72244f..04b26537b8 100644 --- a/base/src/org/compiere/model/X_C_RfQLine.java +++ b/base/src/org/compiere/model/X_C_RfQLine.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RfQLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQLine extends PO implements I_C_RfQLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQLineQty.java b/base/src/org/compiere/model/X_C_RfQLineQty.java index 8d6a87d292..9c682e0be1 100644 --- a/base/src/org/compiere/model/X_C_RfQLineQty.java +++ b/base/src/org/compiere/model/X_C_RfQLineQty.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RfQLineQty * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQLineQty extends PO implements I_C_RfQLineQty, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQResponse.java b/base/src/org/compiere/model/X_C_RfQResponse.java index c92315c009..05babfa7cc 100644 --- a/base/src/org/compiere/model/X_C_RfQResponse.java +++ b/base/src/org/compiere/model/X_C_RfQResponse.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RfQResponse * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQResponse extends PO implements I_C_RfQResponse, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQResponseLine.java b/base/src/org/compiere/model/X_C_RfQResponseLine.java index 7d3834b3ce..928f18b29f 100644 --- a/base/src/org/compiere/model/X_C_RfQResponseLine.java +++ b/base/src/org/compiere/model/X_C_RfQResponseLine.java @@ -25,7 +25,7 @@ import java.util.logging.Level; /** Generated Model for C_RfQResponseLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQResponseLine extends PO implements I_C_RfQResponseLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQResponseLineQty.java b/base/src/org/compiere/model/X_C_RfQResponseLineQty.java index 05de860c81..f51161627f 100644 --- a/base/src/org/compiere/model/X_C_RfQResponseLineQty.java +++ b/base/src/org/compiere/model/X_C_RfQResponseLineQty.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RfQResponseLineQty * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQResponseLineQty extends PO implements I_C_RfQResponseLineQty, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQ_Topic.java b/base/src/org/compiere/model/X_C_RfQ_Topic.java index 1fb8ba069a..6dc86d85b1 100644 --- a/base/src/org/compiere/model/X_C_RfQ_Topic.java +++ b/base/src/org/compiere/model/X_C_RfQ_Topic.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RfQ_Topic * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQ_Topic extends PO implements I_C_RfQ_Topic, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQ_TopicSubscriber.java b/base/src/org/compiere/model/X_C_RfQ_TopicSubscriber.java index 0c558780bc..429d8abe8b 100644 --- a/base/src/org/compiere/model/X_C_RfQ_TopicSubscriber.java +++ b/base/src/org/compiere/model/X_C_RfQ_TopicSubscriber.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RfQ_TopicSubscriber * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQ_TopicSubscriber extends PO implements I_C_RfQ_TopicSubscriber, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_RfQ_TopicSubscriberOnly.java b/base/src/org/compiere/model/X_C_RfQ_TopicSubscriberOnly.java index ce03f67d68..d811ec0da2 100644 --- a/base/src/org/compiere/model/X_C_RfQ_TopicSubscriberOnly.java +++ b/base/src/org/compiere/model/X_C_RfQ_TopicSubscriberOnly.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_RfQ_TopicSubscriberOnly * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_RfQ_TopicSubscriberOnly extends PO implements I_C_RfQ_TopicSubscriberOnly, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_SalesRegion.java b/base/src/org/compiere/model/X_C_SalesRegion.java index 13454dfa43..52003a7ce6 100644 --- a/base/src/org/compiere/model/X_C_SalesRegion.java +++ b/base/src/org/compiere/model/X_C_SalesRegion.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_SalesRegion * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_SalesRegion extends PO implements I_C_SalesRegion, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ServiceLevel.java b/base/src/org/compiere/model/X_C_ServiceLevel.java index 75aaa172b3..486077b6bb 100644 --- a/base/src/org/compiere/model/X_C_ServiceLevel.java +++ b/base/src/org/compiere/model/X_C_ServiceLevel.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ServiceLevel * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ServiceLevel extends PO implements I_C_ServiceLevel, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ServiceLevelLine.java b/base/src/org/compiere/model/X_C_ServiceLevelLine.java index 5cb7bd9ae0..6dca6796d6 100644 --- a/base/src/org/compiere/model/X_C_ServiceLevelLine.java +++ b/base/src/org/compiere/model/X_C_ServiceLevelLine.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ServiceLevelLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ServiceLevelLine extends PO implements I_C_ServiceLevelLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_SubAcct.java b/base/src/org/compiere/model/X_C_SubAcct.java index d5235c264a..340f3eac93 100644 --- a/base/src/org/compiere/model/X_C_SubAcct.java +++ b/base/src/org/compiere/model/X_C_SubAcct.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_SubAcct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_SubAcct extends PO implements I_C_SubAcct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Subscription.java b/base/src/org/compiere/model/X_C_Subscription.java index 33424ab1f9..d3145321dc 100644 --- a/base/src/org/compiere/model/X_C_Subscription.java +++ b/base/src/org/compiere/model/X_C_Subscription.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Subscription * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Subscription extends PO implements I_C_Subscription, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_SubscriptionType.java b/base/src/org/compiere/model/X_C_SubscriptionType.java index 4b566530e8..5ccfb54837 100644 --- a/base/src/org/compiere/model/X_C_SubscriptionType.java +++ b/base/src/org/compiere/model/X_C_SubscriptionType.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_SubscriptionType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_SubscriptionType extends PO implements I_C_SubscriptionType, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Subscription_Delivery.java b/base/src/org/compiere/model/X_C_Subscription_Delivery.java index b9da7e7738..558856aa6d 100644 --- a/base/src/org/compiere/model/X_C_Subscription_Delivery.java +++ b/base/src/org/compiere/model/X_C_Subscription_Delivery.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Subscription_Delivery * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Subscription_Delivery extends PO implements I_C_Subscription_Delivery, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Task.java b/base/src/org/compiere/model/X_C_Task.java index 35907697f6..2511581d2f 100644 --- a/base/src/org/compiere/model/X_C_Task.java +++ b/base/src/org/compiere/model/X_C_Task.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Task * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Task extends PO implements I_C_Task, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Tax.java b/base/src/org/compiere/model/X_C_Tax.java deleted file mode 100644 index 2d1e9e376e..0000000000 --- a/base/src/org/compiere/model/X_C_Tax.java +++ /dev/null @@ -1,571 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for C_Tax - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_C_Tax extends PO implements I_C_Tax, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_C_Tax (Properties ctx, int C_Tax_ID, String trxName) - { - super (ctx, C_Tax_ID, trxName); - /** if (C_Tax_ID == 0) - { - setC_TaxCategory_ID (0); - setC_Tax_ID (0); - setIsDefault (false); - setIsDocumentLevel (false); - setIsSalesTax (false); -// N - setIsSummary (false); - setIsTaxExempt (false); - setName (null); - setRate (Env.ZERO); - setRequiresTaxCertificate (false); - setSOPOType (null); -// B - setValidFrom (new Timestamp(System.currentTimeMillis())); - } */ - } - - /** Load Constructor */ - public X_C_Tax (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_C_Tax[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** C_Country_ID AD_Reference_ID=156 */ - public static final int C_COUNTRY_ID_AD_Reference_ID=156; - /** Set Country. - @param C_Country_ID - Country - */ - public void setC_Country_ID (int C_Country_ID) - { - if (C_Country_ID < 1) - set_Value (COLUMNNAME_C_Country_ID, null); - else - set_Value (COLUMNNAME_C_Country_ID, Integer.valueOf(C_Country_ID)); - } - - /** Get Country. - @return Country - */ - public int getC_Country_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Country_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_Region_ID AD_Reference_ID=157 */ - public static final int C_REGION_ID_AD_Reference_ID=157; - /** Set Region. - @param C_Region_ID - Identifies a geographical Region - */ - public void setC_Region_ID (int C_Region_ID) - { - if (C_Region_ID < 1) - set_Value (COLUMNNAME_C_Region_ID, null); - else - set_Value (COLUMNNAME_C_Region_ID, Integer.valueOf(C_Region_ID)); - } - - /** Get Region. - @return Identifies a geographical Region - */ - public int getC_Region_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Region_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_TaxCategory getC_TaxCategory() throws Exception - { - Class clazz = MTable.getClass(I_C_TaxCategory.Table_Name); - I_C_TaxCategory result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_TaxCategory)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_TaxCategory_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Tax Category. - @param C_TaxCategory_ID - Tax Category - */ - public void setC_TaxCategory_ID (int C_TaxCategory_ID) - { - if (C_TaxCategory_ID < 1) - throw new IllegalArgumentException ("C_TaxCategory_ID is mandatory."); - set_Value (COLUMNNAME_C_TaxCategory_ID, Integer.valueOf(C_TaxCategory_ID)); - } - - /** Get Tax Category. - @return Tax Category - */ - public int getC_TaxCategory_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxCategory_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Tax. - @param C_Tax_ID - Tax identifier - */ - public void setC_Tax_ID (int C_Tax_ID) - { - if (C_Tax_ID < 1) - throw new IllegalArgumentException ("C_Tax_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Tax_ID, Integer.valueOf(C_Tax_ID)); - } - - /** Get Tax. - @return Tax identifier - */ - public int getC_Tax_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Tax_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Default. - @param IsDefault - Default value - */ - public void setIsDefault (boolean IsDefault) - { - set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); - } - - /** Get Default. - @return Default value - */ - public boolean isDefault () - { - Object oo = get_Value(COLUMNNAME_IsDefault); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Document Level. - @param IsDocumentLevel - Tax is calculated on document level (rather than line by line) - */ - public void setIsDocumentLevel (boolean IsDocumentLevel) - { - set_Value (COLUMNNAME_IsDocumentLevel, Boolean.valueOf(IsDocumentLevel)); - } - - /** Get Document Level. - @return Tax is calculated on document level (rather than line by line) - */ - public boolean isDocumentLevel () - { - Object oo = get_Value(COLUMNNAME_IsDocumentLevel); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Sales Tax. - @param IsSalesTax - This is a sales tax (i.e. not a value added tax) - */ - public void setIsSalesTax (boolean IsSalesTax) - { - set_Value (COLUMNNAME_IsSalesTax, Boolean.valueOf(IsSalesTax)); - } - - /** Get Sales Tax. - @return This is a sales tax (i.e. not a value added tax) - */ - public boolean isSalesTax () - { - Object oo = get_Value(COLUMNNAME_IsSalesTax); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Summary Level. - @param IsSummary - This is a summary entity - */ - public void setIsSummary (boolean IsSummary) - { - set_Value (COLUMNNAME_IsSummary, Boolean.valueOf(IsSummary)); - } - - /** Get Summary Level. - @return This is a summary entity - */ - public boolean isSummary () - { - Object oo = get_Value(COLUMNNAME_IsSummary); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Tax exempt. - @param IsTaxExempt - Business partner is exempt from tax - */ - public void setIsTaxExempt (boolean IsTaxExempt) - { - set_Value (COLUMNNAME_IsTaxExempt, Boolean.valueOf(IsTaxExempt)); - } - - /** Get Tax exempt. - @return Business partner is exempt from tax - */ - public boolean isTaxExempt () - { - Object oo = get_Value(COLUMNNAME_IsTaxExempt); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** Parent_Tax_ID AD_Reference_ID=158 */ - public static final int PARENT_TAX_ID_AD_Reference_ID=158; - /** Set Parent Tax. - @param Parent_Tax_ID - Parent Tax indicates a tax that is made up of multiple taxes - */ - public void setParent_Tax_ID (int Parent_Tax_ID) - { - if (Parent_Tax_ID < 1) - set_Value (COLUMNNAME_Parent_Tax_ID, null); - else - set_Value (COLUMNNAME_Parent_Tax_ID, Integer.valueOf(Parent_Tax_ID)); - } - - /** Get Parent Tax. - @return Parent Tax indicates a tax that is made up of multiple taxes - */ - public int getParent_Tax_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Parent_Tax_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Rate. - @param Rate - Rate or Tax or Exchange - */ - public void setRate (BigDecimal Rate) - { - if (Rate == null) - throw new IllegalArgumentException ("Rate is mandatory."); - set_Value (COLUMNNAME_Rate, Rate); - } - - /** Get Rate. - @return Rate or Tax or Exchange - */ - public BigDecimal getRate () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Rate); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Requires Tax Certificate. - @param RequiresTaxCertificate - This tax rate requires the Business Partner to be tax exempt - */ - public void setRequiresTaxCertificate (boolean RequiresTaxCertificate) - { - set_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate)); - } - - /** Get Requires Tax Certificate. - @return This tax rate requires the Business Partner to be tax exempt - */ - public boolean isRequiresTaxCertificate () - { - Object oo = get_Value(COLUMNNAME_RequiresTaxCertificate); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** SOPOType AD_Reference_ID=287 */ - public static final int SOPOTYPE_AD_Reference_ID=287; - /** Both = B */ - public static final String SOPOTYPE_Both = "B"; - /** Sales Tax = S */ - public static final String SOPOTYPE_SalesTax = "S"; - /** Purchase Tax = P */ - public static final String SOPOTYPE_PurchaseTax = "P"; - /** Set SO/PO Type. - @param SOPOType - Sales Tax applies to sales situations, Purchase Tax to purchase situations - */ - public void setSOPOType (String SOPOType) - { - if (SOPOType == null) throw new IllegalArgumentException ("SOPOType is mandatory"); - if (SOPOType.equals("B") || SOPOType.equals("S") || SOPOType.equals("P")); else throw new IllegalArgumentException ("SOPOType Invalid value - " + SOPOType + " - Reference_ID=287 - B - S - P"); - if (SOPOType.length() > 1) - { - log.warning("Length > 1 - truncated"); - SOPOType = SOPOType.substring(0, 1); - } - set_Value (COLUMNNAME_SOPOType, SOPOType); - } - - /** Get SO/PO Type. - @return Sales Tax applies to sales situations, Purchase Tax to purchase situations - */ - public String getSOPOType () - { - return (String)get_Value(COLUMNNAME_SOPOType); - } - - /** Set Tax Indicator. - @param TaxIndicator - Short form for Tax to be printed on documents - */ - public void setTaxIndicator (String TaxIndicator) - { - - if (TaxIndicator != null && TaxIndicator.length() > 10) - { - log.warning("Length > 10 - truncated"); - TaxIndicator = TaxIndicator.substring(0, 10); - } - set_Value (COLUMNNAME_TaxIndicator, TaxIndicator); - } - - /** Get Tax Indicator. - @return Short form for Tax to be printed on documents - */ - public String getTaxIndicator () - { - return (String)get_Value(COLUMNNAME_TaxIndicator); - } - - /** To_Country_ID AD_Reference_ID=156 */ - public static final int TO_COUNTRY_ID_AD_Reference_ID=156; - /** Set To. - @param To_Country_ID - Receiving Country - */ - public void setTo_Country_ID (int To_Country_ID) - { - if (To_Country_ID < 1) - set_Value (COLUMNNAME_To_Country_ID, null); - else - set_Value (COLUMNNAME_To_Country_ID, Integer.valueOf(To_Country_ID)); - } - - /** Get To. - @return Receiving Country - */ - public int getTo_Country_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_To_Country_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** To_Region_ID AD_Reference_ID=157 */ - public static final int TO_REGION_ID_AD_Reference_ID=157; - /** Set To. - @param To_Region_ID - Receiving Region - */ - public void setTo_Region_ID (int To_Region_ID) - { - if (To_Region_ID < 1) - set_Value (COLUMNNAME_To_Region_ID, null); - else - set_Value (COLUMNNAME_To_Region_ID, Integer.valueOf(To_Region_ID)); - } - - /** Get To. - @return Receiving Region - */ - public int getTo_Region_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_To_Region_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Valid from. - @param ValidFrom - Valid from including this date (first day) - */ - public void setValidFrom (Timestamp ValidFrom) - { - if (ValidFrom == null) - throw new IllegalArgumentException ("ValidFrom is mandatory."); - set_Value (COLUMNNAME_ValidFrom, ValidFrom); - } - - /** Get Valid from. - @return Valid from including this date (first day) - */ - public Timestamp getValidFrom () - { - return (Timestamp)get_Value(COLUMNNAME_ValidFrom); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_C_TaxCategory.java b/base/src/org/compiere/model/X_C_TaxCategory.java index b992cdb3c4..ac9e7f2541 100644 --- a/base/src/org/compiere/model/X_C_TaxCategory.java +++ b/base/src/org/compiere/model/X_C_TaxCategory.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_TaxCategory * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_TaxCategory extends PO implements I_C_TaxCategory, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_TaxDeclaration.java b/base/src/org/compiere/model/X_C_TaxDeclaration.java index ff85405510..8f46967319 100644 --- a/base/src/org/compiere/model/X_C_TaxDeclaration.java +++ b/base/src/org/compiere/model/X_C_TaxDeclaration.java @@ -24,7 +24,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_TaxDeclaration * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_TaxDeclaration extends PO implements I_C_TaxDeclaration, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_TaxDeclarationAcct.java b/base/src/org/compiere/model/X_C_TaxDeclarationAcct.java index 58d2ae2f38..386670064d 100644 --- a/base/src/org/compiere/model/X_C_TaxDeclarationAcct.java +++ b/base/src/org/compiere/model/X_C_TaxDeclarationAcct.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for C_TaxDeclarationAcct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_TaxDeclarationAcct extends PO implements I_C_TaxDeclarationAcct, I_Persistent { @@ -416,6 +416,22 @@ public class X_C_TaxDeclarationAcct extends PO implements I_C_TaxDeclarationAcct return (String)get_Value(COLUMNNAME_Description); } + public I_Fact_Acct getFact_Acct() throws Exception + { + Class clazz = MTable.getClass(I_Fact_Acct.Table_Name); + I_Fact_Acct result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_Fact_Acct)constructor.newInstance(new Object[] {getCtx(), new Integer(getFact_Acct_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + /** Set Accounting Fact. @param Fact_Acct_ID Accounting Fact */ public void setFact_Acct_ID (int Fact_Acct_ID) diff --git a/base/src/org/compiere/model/X_C_TaxDeclarationLine.java b/base/src/org/compiere/model/X_C_TaxDeclarationLine.java index a34a15c2f7..3c2de22d61 100644 --- a/base/src/org/compiere/model/X_C_TaxDeclarationLine.java +++ b/base/src/org/compiere/model/X_C_TaxDeclarationLine.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for C_TaxDeclarationLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_TaxDeclarationLine extends PO implements I_C_TaxDeclarationLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_TaxPostal.java b/base/src/org/compiere/model/X_C_TaxPostal.java index 753f978b47..0559e488b6 100644 --- a/base/src/org/compiere/model/X_C_TaxPostal.java +++ b/base/src/org/compiere/model/X_C_TaxPostal.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_TaxPostal * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_TaxPostal extends PO implements I_C_TaxPostal, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Tax_Acct.java b/base/src/org/compiere/model/X_C_Tax_Acct.java index 61fe5594c6..fe4e216eb6 100644 --- a/base/src/org/compiere/model/X_C_Tax_Acct.java +++ b/base/src/org/compiere/model/X_C_Tax_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_Tax_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Tax_Acct extends PO implements I_C_Tax_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_UOM.java b/base/src/org/compiere/model/X_C_UOM.java index 7c04d406eb..773840f24c 100644 --- a/base/src/org/compiere/model/X_C_UOM.java +++ b/base/src/org/compiere/model/X_C_UOM.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_UOM * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_UOM extends PO implements I_C_UOM, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_UOM_Conversion.java b/base/src/org/compiere/model/X_C_UOM_Conversion.java index 6c299e1172..231a7f4e18 100644 --- a/base/src/org/compiere/model/X_C_UOM_Conversion.java +++ b/base/src/org/compiere/model/X_C_UOM_Conversion.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_UOM_Conversion * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_UOM_Conversion extends PO implements I_C_UOM_Conversion, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_UserRemuneration.java b/base/src/org/compiere/model/X_C_UserRemuneration.java index 23f636fcea..71c77b9773 100644 --- a/base/src/org/compiere/model/X_C_UserRemuneration.java +++ b/base/src/org/compiere/model/X_C_UserRemuneration.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_UserRemuneration * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_UserRemuneration extends PO implements I_C_UserRemuneration, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_ValidCombination.java b/base/src/org/compiere/model/X_C_ValidCombination.java index d0ac907e2c..cc8cccd8c0 100644 --- a/base/src/org/compiere/model/X_C_ValidCombination.java +++ b/base/src/org/compiere/model/X_C_ValidCombination.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_ValidCombination * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_ValidCombination extends PO implements I_C_ValidCombination, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Withholding.java b/base/src/org/compiere/model/X_C_Withholding.java index 80b8a8362b..db01fc43b8 100644 --- a/base/src/org/compiere/model/X_C_Withholding.java +++ b/base/src/org/compiere/model/X_C_Withholding.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Withholding * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Withholding extends PO implements I_C_Withholding, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Withholding_Acct.java b/base/src/org/compiere/model/X_C_Withholding_Acct.java index a495872393..c0d66f34e9 100644 --- a/base/src/org/compiere/model/X_C_Withholding_Acct.java +++ b/base/src/org/compiere/model/X_C_Withholding_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for C_Withholding_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Withholding_Acct extends PO implements I_C_Withholding_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_C_Year.java b/base/src/org/compiere/model/X_C_Year.java index 386dc0fe1d..ed558aea86 100644 --- a/base/src/org/compiere/model/X_C_Year.java +++ b/base/src/org/compiere/model/X_C_Year.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for C_Year * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_C_Year extends PO implements I_C_Year, I_Persistent { diff --git a/base/src/org/compiere/model/X_DD_Order_Header_v.java b/base/src/org/compiere/model/X_DD_Order_Header_v.java new file mode 100644 index 0000000000..47b22b89bc --- /dev/null +++ b/base/src/org/compiere/model/X_DD_Order_Header_v.java @@ -0,0 +1,70 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; + +/** Generated Model for DD_Order_Header_v + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_DD_Order_Header_v extends PO implements I_DD_Order_Header_v, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_DD_Order_Header_v (Properties ctx, int DD_Order_Header_v_ID, String trxName) + { + super (ctx, DD_Order_Header_v_ID, trxName); + /** if (DD_Order_Header_v_ID == 0) + { + } */ + } + + /** Load Constructor */ + public X_DD_Order_Header_v (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() + { + StringBuffer sb = new StringBuffer ("X_DD_Order_Header_v[") + .append(get_ID()).append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_Fact_Acct.java b/base/src/org/compiere/model/X_Fact_Acct.java index 8f71dcc669..7a0c38bb8a 100644 --- a/base/src/org/compiere/model/X_Fact_Acct.java +++ b/base/src/org/compiere/model/X_Fact_Acct.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for Fact_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_Fact_Acct extends PO implements I_Fact_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_Fact_Acct_Balance.java b/base/src/org/compiere/model/X_Fact_Acct_Balance.java index 459b84c01a..307080690a 100644 --- a/base/src/org/compiere/model/X_Fact_Acct_Balance.java +++ b/base/src/org/compiere/model/X_Fact_Acct_Balance.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for Fact_Acct_Balance * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_Fact_Acct_Balance extends PO implements I_Fact_Acct_Balance, I_Persistent { diff --git a/base/src/org/compiere/model/X_GL_Budget.java b/base/src/org/compiere/model/X_GL_Budget.java index a6dbcf13bb..1c5366df41 100644 --- a/base/src/org/compiere/model/X_GL_Budget.java +++ b/base/src/org/compiere/model/X_GL_Budget.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for GL_Budget * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_GL_Budget extends PO implements I_GL_Budget, I_Persistent { diff --git a/base/src/org/compiere/model/X_GL_BudgetControl.java b/base/src/org/compiere/model/X_GL_BudgetControl.java deleted file mode 100644 index f3875ad235..0000000000 --- a/base/src/org/compiere/model/X_GL_BudgetControl.java +++ /dev/null @@ -1,352 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.KeyNamePair; - -/** Generated Model for GL_BudgetControl - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_GL_BudgetControl extends PO implements I_GL_BudgetControl, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_GL_BudgetControl (Properties ctx, int GL_BudgetControl_ID, String trxName) - { - super (ctx, GL_BudgetControl_ID, trxName); - /** if (GL_BudgetControl_ID == 0) - { - setBudgetControlScope (null); - setC_AcctSchema_ID (0); - setCommitmentType (null); -// C - setGL_BudgetControl_ID (0); - setGL_Budget_ID (0); - setIsBeforeApproval (false); - setName (null); - } */ - } - - /** Load Constructor */ - public X_GL_BudgetControl (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_GL_BudgetControl[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** BudgetControlScope AD_Reference_ID=361 */ - public static final int BUDGETCONTROLSCOPE_AD_Reference_ID=361; - /** Period only = P */ - public static final String BUDGETCONTROLSCOPE_PeriodOnly = "P"; - /** Year To Date = Y */ - public static final String BUDGETCONTROLSCOPE_YearToDate = "Y"; - /** Total = T */ - public static final String BUDGETCONTROLSCOPE_Total = "T"; - /** Set Control Scope. - @param BudgetControlScope - Scope of the Budget Control - */ - public void setBudgetControlScope (String BudgetControlScope) - { - if (BudgetControlScope == null) throw new IllegalArgumentException ("BudgetControlScope is mandatory"); - if (BudgetControlScope.equals("P") || BudgetControlScope.equals("Y") || BudgetControlScope.equals("T")); else throw new IllegalArgumentException ("BudgetControlScope Invalid value - " + BudgetControlScope + " - Reference_ID=361 - P - Y - T"); - if (BudgetControlScope.length() > 1) - { - log.warning("Length > 1 - truncated"); - BudgetControlScope = BudgetControlScope.substring(0, 1); - } - set_Value (COLUMNNAME_BudgetControlScope, BudgetControlScope); - } - - /** Get Control Scope. - @return Scope of the Budget Control - */ - public String getBudgetControlScope () - { - return (String)get_Value(COLUMNNAME_BudgetControlScope); - } - - public I_C_AcctSchema getC_AcctSchema() throws Exception - { - Class clazz = MTable.getClass(I_C_AcctSchema.Table_Name); - I_C_AcctSchema result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Accounting Schema. - @param C_AcctSchema_ID - Rules for accounting - */ - public void setC_AcctSchema_ID (int C_AcctSchema_ID) - { - if (C_AcctSchema_ID < 1) - throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory."); - set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID)); - } - - /** Get Accounting Schema. - @return Rules for accounting - */ - public int getC_AcctSchema_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** CommitmentType AD_Reference_ID=359 */ - public static final int COMMITMENTTYPE_AD_Reference_ID=359; - /** PO Commitment only = C */ - public static final String COMMITMENTTYPE_POCommitmentOnly = "C"; - /** PO Commitment & Reservation = B */ - public static final String COMMITMENTTYPE_POCommitmentReservation = "B"; - /** None = N */ - public static final String COMMITMENTTYPE_None = "N"; - /** PO/SO Commitment & Reservation = A */ - public static final String COMMITMENTTYPE_POSOCommitmentReservation = "A"; - /** SO Commitment only = S */ - public static final String COMMITMENTTYPE_SOCommitmentOnly = "S"; - /** PO/SO Commitment = O */ - public static final String COMMITMENTTYPE_POSOCommitment = "O"; - /** Set Commitment Type. - @param CommitmentType - Create Commitment and/or Reservations for Budget Control - */ - public void setCommitmentType (String CommitmentType) - { - if (CommitmentType == null) throw new IllegalArgumentException ("CommitmentType is mandatory"); - if (CommitmentType.equals("C") || CommitmentType.equals("B") || CommitmentType.equals("N") || CommitmentType.equals("A") || CommitmentType.equals("S") || CommitmentType.equals("O")); else throw new IllegalArgumentException ("CommitmentType Invalid value - " + CommitmentType + " - Reference_ID=359 - C - B - N - A - S - O"); - if (CommitmentType.length() > 1) - { - log.warning("Length > 1 - truncated"); - CommitmentType = CommitmentType.substring(0, 1); - } - set_Value (COLUMNNAME_CommitmentType, CommitmentType); - } - - /** Get Commitment Type. - @return Create Commitment and/or Reservations for Budget Control - */ - public String getCommitmentType () - { - return (String)get_Value(COLUMNNAME_CommitmentType); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Budget Control. - @param GL_BudgetControl_ID - Budget Control - */ - public void setGL_BudgetControl_ID (int GL_BudgetControl_ID) - { - if (GL_BudgetControl_ID < 1) - throw new IllegalArgumentException ("GL_BudgetControl_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_GL_BudgetControl_ID, Integer.valueOf(GL_BudgetControl_ID)); - } - - /** Get Budget Control. - @return Budget Control - */ - public int getGL_BudgetControl_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_BudgetControl_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_GL_Budget getGL_Budget() throws Exception - { - Class clazz = MTable.getClass(I_GL_Budget.Table_Name); - I_GL_Budget result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_GL_Budget)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Budget_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Budget. - @param GL_Budget_ID - General Ledger Budget - */ - public void setGL_Budget_ID (int GL_Budget_ID) - { - if (GL_Budget_ID < 1) - throw new IllegalArgumentException ("GL_Budget_ID is mandatory."); - set_Value (COLUMNNAME_GL_Budget_ID, Integer.valueOf(GL_Budget_ID)); - } - - /** Get Budget. - @return General Ledger Budget - */ - public int getGL_Budget_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_Budget_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Comment/Help. - @param Help - Comment or Hint - */ - public void setHelp (String Help) - { - - if (Help != null && Help.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - Help = Help.substring(0, 2000); - } - set_Value (COLUMNNAME_Help, Help); - } - - /** Get Comment/Help. - @return Comment or Hint - */ - public String getHelp () - { - return (String)get_Value(COLUMNNAME_Help); - } - - /** Set Before Approval. - @param IsBeforeApproval - The Check is before the (manual) approval - */ - public void setIsBeforeApproval (boolean IsBeforeApproval) - { - set_Value (COLUMNNAME_IsBeforeApproval, Boolean.valueOf(IsBeforeApproval)); - } - - /** Get Before Approval. - @return The Check is before the (manual) approval - */ - public boolean isBeforeApproval () - { - Object oo = get_Value(COLUMNNAME_IsBeforeApproval); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 120) - { - log.warning("Length > 120 - truncated"); - Name = Name.substring(0, 120); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_GL_Category.java b/base/src/org/compiere/model/X_GL_Category.java index 94d4ac2cfc..04805838e9 100644 --- a/base/src/org/compiere/model/X_GL_Category.java +++ b/base/src/org/compiere/model/X_GL_Category.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for GL_Category * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_GL_Category extends PO implements I_GL_Category, I_Persistent { diff --git a/base/src/org/compiere/model/X_GL_Distribution.java b/base/src/org/compiere/model/X_GL_Distribution.java index b8ca3716fe..a6914b0c06 100644 --- a/base/src/org/compiere/model/X_GL_Distribution.java +++ b/base/src/org/compiere/model/X_GL_Distribution.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for GL_Distribution * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_GL_Distribution extends PO implements I_GL_Distribution, I_Persistent { diff --git a/base/src/org/compiere/model/X_GL_DistributionLine.java b/base/src/org/compiere/model/X_GL_DistributionLine.java index 69f2213092..ee39a25cb5 100644 --- a/base/src/org/compiere/model/X_GL_DistributionLine.java +++ b/base/src/org/compiere/model/X_GL_DistributionLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for GL_DistributionLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_GL_DistributionLine extends PO implements I_GL_DistributionLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_GL_Fund.java b/base/src/org/compiere/model/X_GL_Fund.java index ddb574503c..e4fdc4ccd2 100644 --- a/base/src/org/compiere/model/X_GL_Fund.java +++ b/base/src/org/compiere/model/X_GL_Fund.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for GL_Fund * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_GL_Fund extends PO implements I_GL_Fund, I_Persistent { diff --git a/base/src/org/compiere/model/X_GL_FundRestriction.java b/base/src/org/compiere/model/X_GL_FundRestriction.java index 7de1ee0b93..146a84c79c 100644 --- a/base/src/org/compiere/model/X_GL_FundRestriction.java +++ b/base/src/org/compiere/model/X_GL_FundRestriction.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for GL_FundRestriction * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_GL_FundRestriction extends PO implements I_GL_FundRestriction, I_Persistent { diff --git a/base/src/org/compiere/model/X_GL_JournalBatch.java b/base/src/org/compiere/model/X_GL_JournalBatch.java deleted file mode 100644 index 9b6b2d6c96..0000000000 --- a/base/src/org/compiere/model/X_GL_JournalBatch.java +++ /dev/null @@ -1,641 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for GL_JournalBatch - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_GL_JournalBatch extends PO implements I_GL_JournalBatch, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_GL_JournalBatch (Properties ctx, int GL_JournalBatch_ID, String trxName) - { - super (ctx, GL_JournalBatch_ID, trxName); - /** if (GL_JournalBatch_ID == 0) - { - setC_DocType_ID (0); - setDescription (null); - setDocAction (null); -// CO - setDocStatus (null); -// DR - setDocumentNo (null); - setGL_JournalBatch_ID (0); - setPostingType (null); -// A - setProcessed (false); - setProcessing (false); - setTotalCr (Env.ZERO); - setTotalDr (Env.ZERO); - } */ - } - - /** Load Constructor */ - public X_GL_JournalBatch (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_GL_JournalBatch[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - set_Value (COLUMNNAME_C_Currency_ID, null); - else - set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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 I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 0) - throw new IllegalArgumentException ("C_DocType_ID is mandatory."); - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_Period_ID AD_Reference_ID=275 */ - public static final int C_PERIOD_ID_AD_Reference_ID=275; - /** Set Period. - @param C_Period_ID - Period of the Calendar - */ - public void setC_Period_ID (int C_Period_ID) - { - if (C_Period_ID < 1) - set_Value (COLUMNNAME_C_Period_ID, null); - else - set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID)); - } - - /** Get Period. - @return Period of the Calendar - */ - public int getC_Period_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Control Amount. - @param ControlAmt - If not zero, the Debit amount of the document must be equal this amount - */ - public void setControlAmt (BigDecimal ControlAmt) - { - set_Value (COLUMNNAME_ControlAmt, ControlAmt); - } - - /** Get Control Amount. - @return If not zero, the Debit amount of the document must be equal this amount - */ - public BigDecimal getControlAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ControlAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Copy From. - @param CopyFrom - Copy From Record - */ - public void setCopyFrom (String CopyFrom) - { - - if (CopyFrom != null && CopyFrom.length() > 1) - { - log.warning("Length > 1 - truncated"); - CopyFrom = CopyFrom.substring(0, 1); - } - set_Value (COLUMNNAME_CopyFrom, CopyFrom); - } - - /** Get Copy From. - @return Copy From Record - */ - public String getCopyFrom () - { - return (String)get_Value(COLUMNNAME_CopyFrom); - } - - /** Set Account Date. - @param DateAcct - Accounting Date - */ - public void setDateAcct (Timestamp DateAcct) - { - set_Value (COLUMNNAME_DateAcct, DateAcct); - } - - /** Get Account Date. - @return Accounting Date - */ - public Timestamp getDateAcct () - { - return (Timestamp)get_Value(COLUMNNAME_DateAcct); - } - - /** Set Document Date. - @param DateDoc - Date of the Document - */ - public void setDateDoc (Timestamp DateDoc) - { - set_Value (COLUMNNAME_DateDoc, DateDoc); - } - - /** Get Document Date. - @return Date of the Document - */ - public Timestamp getDateDoc () - { - return (Timestamp)get_Value(COLUMNNAME_DateDoc); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - if (Description == null) - throw new IllegalArgumentException ("Description is mandatory."); - - if (Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** DocAction AD_Reference_ID=135 */ - public static final int DOCACTION_AD_Reference_ID=135; - /** Complete = CO */ - public static final String DOCACTION_Complete = "CO"; - /** Approve = AP */ - public static final String DOCACTION_Approve = "AP"; - /** Reject = RJ */ - public static final String DOCACTION_Reject = "RJ"; - /** Post = PO */ - public static final String DOCACTION_Post = "PO"; - /** Void = VO */ - public static final String DOCACTION_Void = "VO"; - /** Close = CL */ - public static final String DOCACTION_Close = "CL"; - /** Reverse - Correct = RC */ - public static final String DOCACTION_Reverse_Correct = "RC"; - /** Reverse - Accrual = RA */ - public static final String DOCACTION_Reverse_Accrual = "RA"; - /** Invalidate = IN */ - public static final String DOCACTION_Invalidate = "IN"; - /** Re-activate = RE */ - public static final String DOCACTION_Re_Activate = "RE"; - /** = -- */ - public static final String DOCACTION_None = "--"; - /** Prepare = PR */ - public static final String DOCACTION_Prepare = "PR"; - /** Unlock = XL */ - public static final String DOCACTION_Unlock = "XL"; - /** Wait Complete = WC */ - public static final String DOCACTION_WaitComplete = "WC"; - /** Set Document Action. - @param DocAction - The targeted status of the document - */ - public void setDocAction (String DocAction) - { - if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); - 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("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC"); - if (DocAction.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocAction = DocAction.substring(0, 2); - } - set_Value (COLUMNNAME_DocAction, DocAction); - } - - /** Get Document Action. - @return The targeted status of the document - */ - public String getDocAction () - { - return (String)get_Value(COLUMNNAME_DocAction); - } - - /** DocStatus AD_Reference_ID=131 */ - public static final int DOCSTATUS_AD_Reference_ID=131; - /** Drafted = DR */ - public static final String DOCSTATUS_Drafted = "DR"; - /** Completed = CO */ - public static final String DOCSTATUS_Completed = "CO"; - /** Approved = AP */ - public static final String DOCSTATUS_Approved = "AP"; - /** Not Approved = NA */ - public static final String DOCSTATUS_NotApproved = "NA"; - /** Voided = VO */ - public static final String DOCSTATUS_Voided = "VO"; - /** Invalid = IN */ - public static final String DOCSTATUS_Invalid = "IN"; - /** Reversed = RE */ - public static final String DOCSTATUS_Reversed = "RE"; - /** Closed = CL */ - public static final String DOCSTATUS_Closed = "CL"; - /** Unknown = ?? */ - public static final String DOCSTATUS_Unknown = "??"; - /** In Progress = IP */ - public static final String DOCSTATUS_InProgress = "IP"; - /** Waiting Payment = WP */ - public static final String DOCSTATUS_WaitingPayment = "WP"; - /** Waiting Confirmation = WC */ - public static final String DOCSTATUS_WaitingConfirmation = "WC"; - /** Set Document Status. - @param DocStatus - The current status of the document - */ - public void setDocStatus (String DocStatus) - { - if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); - if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); - if (DocStatus.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocStatus = DocStatus.substring(0, 2); - } - set_Value (COLUMNNAME_DocStatus, DocStatus); - } - - /** Get Document Status. - @return The current status of the document - */ - public String getDocStatus () - { - return (String)get_Value(COLUMNNAME_DocStatus); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - if (DocumentNo == null) - throw new IllegalArgumentException ("DocumentNo is mandatory."); - - if (DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); - } - set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getDocumentNo()); - } - - public I_GL_Category getGL_Category() throws Exception - { - Class clazz = MTable.getClass(I_GL_Category.Table_Name); - I_GL_Category result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_GL_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Category_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set GL Category. - @param GL_Category_ID - General Ledger Category - */ - public void setGL_Category_ID (int GL_Category_ID) - { - if (GL_Category_ID < 1) - set_Value (COLUMNNAME_GL_Category_ID, null); - else - set_Value (COLUMNNAME_GL_Category_ID, Integer.valueOf(GL_Category_ID)); - } - - /** Get GL Category. - @return General Ledger Category - */ - public int getGL_Category_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_Category_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Journal Batch. - @param GL_JournalBatch_ID - General Ledger Journal Batch - */ - public void setGL_JournalBatch_ID (int GL_JournalBatch_ID) - { - if (GL_JournalBatch_ID < 1) - throw new IllegalArgumentException ("GL_JournalBatch_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_GL_JournalBatch_ID, Integer.valueOf(GL_JournalBatch_ID)); - } - - /** Get Journal Batch. - @return General Ledger Journal Batch - */ - public int getGL_JournalBatch_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_JournalBatch_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Approved. - @param IsApproved - Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved) - { - set_Value (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); - } - - /** Get Approved. - @return Indicates if this document requires approval - */ - public boolean isApproved () - { - Object oo = get_Value(COLUMNNAME_IsApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** PostingType AD_Reference_ID=125 */ - public static final int POSTINGTYPE_AD_Reference_ID=125; - /** Actual = A */ - public static final String POSTINGTYPE_Actual = "A"; - /** Budget = B */ - public static final String POSTINGTYPE_Budget = "B"; - /** Commitment = E */ - public static final String POSTINGTYPE_Commitment = "E"; - /** Statistical = S */ - public static final String POSTINGTYPE_Statistical = "S"; - /** Reservation = R */ - public static final String POSTINGTYPE_Reservation = "R"; - /** Set PostingType. - @param PostingType - The type of posted amount for the transaction - */ - public void setPostingType (String PostingType) - { - if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory"); - if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R"); - if (PostingType.length() > 1) - { - log.warning("Length > 1 - truncated"); - PostingType = PostingType.substring(0, 1); - } - set_Value (COLUMNNAME_PostingType, PostingType); - } - - /** Get PostingType. - @return The type of posted amount for the transaction - */ - public String getPostingType () - { - return (String)get_Value(COLUMNNAME_PostingType); - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** 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; - } - - /** Set Total Credit. - @param TotalCr - Total Credit in document currency - */ - public void setTotalCr (BigDecimal TotalCr) - { - if (TotalCr == null) - throw new IllegalArgumentException ("TotalCr is mandatory."); - set_ValueNoCheck (COLUMNNAME_TotalCr, TotalCr); - } - - /** Get Total Credit. - @return Total Credit in document currency - */ - public BigDecimal getTotalCr () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalCr); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Total Debit. - @param TotalDr - Total debit in document currency - */ - public void setTotalDr (BigDecimal TotalDr) - { - if (TotalDr == null) - throw new IllegalArgumentException ("TotalDr is mandatory."); - set_ValueNoCheck (COLUMNNAME_TotalDr, TotalDr); - } - - /** Get Total Debit. - @return Total debit in document currency - */ - public BigDecimal getTotalDr () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalDr); - if (bd == null) - return Env.ZERO; - return bd; - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_GL_JournalLine.java b/base/src/org/compiere/model/X_GL_JournalLine.java index ed9749f1d9..dc82e2f23e 100644 --- a/base/src/org/compiere/model/X_GL_JournalLine.java +++ b/base/src/org/compiere/model/X_GL_JournalLine.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for GL_JournalLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_GL_JournalLine extends PO implements I_GL_JournalLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_BPartner.java b/base/src/org/compiere/model/X_I_BPartner.java index 7580f39304..0cb6b3b0f8 100644 --- a/base/src/org/compiere/model/X_I_BPartner.java +++ b/base/src/org/compiere/model/X_I_BPartner.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_BPartner * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_BPartner extends PO implements I_I_BPartner, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_BankStatement.java b/base/src/org/compiere/model/X_I_BankStatement.java index 0638de1160..a5e669f612 100644 --- a/base/src/org/compiere/model/X_I_BankStatement.java +++ b/base/src/org/compiere/model/X_I_BankStatement.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for I_BankStatement * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_BankStatement extends PO implements I_I_BankStatement, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_Conversion_Rate.java b/base/src/org/compiere/model/X_I_Conversion_Rate.java index 85aa509ea4..71fed922e8 100644 --- a/base/src/org/compiere/model/X_I_Conversion_Rate.java +++ b/base/src/org/compiere/model/X_I_Conversion_Rate.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_Conversion_Rate * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_Conversion_Rate extends PO implements I_I_Conversion_Rate, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_ElementValue.java b/base/src/org/compiere/model/X_I_ElementValue.java index 66384b62e4..7d4f7ce819 100644 --- a/base/src/org/compiere/model/X_I_ElementValue.java +++ b/base/src/org/compiere/model/X_I_ElementValue.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_ElementValue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_ElementValue extends PO implements I_I_ElementValue, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_GLJournal.java b/base/src/org/compiere/model/X_I_GLJournal.java index 27386813e5..2b76cf046e 100644 --- a/base/src/org/compiere/model/X_I_GLJournal.java +++ b/base/src/org/compiere/model/X_I_GLJournal.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_GLJournal * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_GLJournal extends PO implements I_I_GLJournal, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_InOutLineConfirm.java b/base/src/org/compiere/model/X_I_InOutLineConfirm.java index 28adaf84ae..5c16162fd3 100644 --- a/base/src/org/compiere/model/X_I_InOutLineConfirm.java +++ b/base/src/org/compiere/model/X_I_InOutLineConfirm.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_InOutLineConfirm * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_InOutLineConfirm extends PO implements I_I_InOutLineConfirm, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_Inventory.java b/base/src/org/compiere/model/X_I_Inventory.java index 3d539b3b36..1360af21dd 100644 --- a/base/src/org/compiere/model/X_I_Inventory.java +++ b/base/src/org/compiere/model/X_I_Inventory.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_Inventory * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_Inventory extends PO implements I_I_Inventory, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_Invoice.java b/base/src/org/compiere/model/X_I_Invoice.java index 3914ff0c12..33ba1fe50a 100644 --- a/base/src/org/compiere/model/X_I_Invoice.java +++ b/base/src/org/compiere/model/X_I_Invoice.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for I_Invoice * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_Invoice extends PO implements I_I_Invoice, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_Order.java b/base/src/org/compiere/model/X_I_Order.java index 9fdd42cae6..d06a58f4ab 100644 --- a/base/src/org/compiere/model/X_I_Order.java +++ b/base/src/org/compiere/model/X_I_Order.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for I_Order * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_Order extends PO implements I_I_Order, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_Payment.java b/base/src/org/compiere/model/X_I_Payment.java deleted file mode 100644 index cd78a287bd..0000000000 --- a/base/src/org/compiere/model/X_I_Payment.java +++ /dev/null @@ -1,1603 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; - -/** Generated Model for I_Payment - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_I_Payment extends PO implements I_I_Payment, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_I_Payment (Properties ctx, int I_Payment_ID, String trxName) - { - super (ctx, I_Payment_ID, trxName); - /** if (I_Payment_ID == 0) - { - setI_IsImported (false); - setI_Payment_ID (0); - } */ - } - - /** Load Constructor */ - public X_I_Payment (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - 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() - { - StringBuffer sb = new StringBuffer ("X_I_Payment[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Account City. - @param A_City - City or the Credit Card or Account Holder - */ - public void setA_City (String A_City) - { - - if (A_City != null && A_City.length() > 60) - { - log.warning("Length > 60 - truncated"); - A_City = A_City.substring(0, 60); - } - set_Value (COLUMNNAME_A_City, A_City); - } - - /** Get Account City. - @return City or the Credit Card or Account Holder - */ - public String getA_City () - { - return (String)get_Value(COLUMNNAME_A_City); - } - - /** Set Account Country. - @param A_Country - Country - */ - public void setA_Country (String A_Country) - { - - if (A_Country != null && A_Country.length() > 40) - { - log.warning("Length > 40 - truncated"); - A_Country = A_Country.substring(0, 40); - } - set_Value (COLUMNNAME_A_Country, A_Country); - } - - /** Get Account Country. - @return Country - */ - public String getA_Country () - { - return (String)get_Value(COLUMNNAME_A_Country); - } - - /** Set Account EMail. - @param A_EMail - Email Address - */ - public void setA_EMail (String A_EMail) - { - - if (A_EMail != null && A_EMail.length() > 60) - { - log.warning("Length > 60 - truncated"); - A_EMail = A_EMail.substring(0, 60); - } - set_Value (COLUMNNAME_A_EMail, A_EMail); - } - - /** Get Account EMail. - @return Email Address - */ - public String getA_EMail () - { - return (String)get_Value(COLUMNNAME_A_EMail); - } - - /** Set Driver License. - @param A_Ident_DL - Payment Identification - Driver License - */ - public void setA_Ident_DL (String A_Ident_DL) - { - - if (A_Ident_DL != null && A_Ident_DL.length() > 20) - { - log.warning("Length > 20 - truncated"); - A_Ident_DL = A_Ident_DL.substring(0, 20); - } - set_Value (COLUMNNAME_A_Ident_DL, A_Ident_DL); - } - - /** Get Driver License. - @return Payment Identification - Driver License - */ - public String getA_Ident_DL () - { - return (String)get_Value(COLUMNNAME_A_Ident_DL); - } - - /** Set Social Security No. - @param A_Ident_SSN - Payment Identification - Social Security No - */ - public void setA_Ident_SSN (String A_Ident_SSN) - { - - if (A_Ident_SSN != null && A_Ident_SSN.length() > 20) - { - log.warning("Length > 20 - truncated"); - A_Ident_SSN = A_Ident_SSN.substring(0, 20); - } - set_Value (COLUMNNAME_A_Ident_SSN, A_Ident_SSN); - } - - /** Get Social Security No. - @return Payment Identification - Social Security No - */ - public String getA_Ident_SSN () - { - return (String)get_Value(COLUMNNAME_A_Ident_SSN); - } - - /** Set Account Name. - @param A_Name - Name on Credit Card or Account holder - */ - public void setA_Name (String A_Name) - { - - if (A_Name != null && A_Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - A_Name = A_Name.substring(0, 60); - } - set_Value (COLUMNNAME_A_Name, A_Name); - } - - /** Get Account Name. - @return Name on Credit Card or Account holder - */ - public String getA_Name () - { - return (String)get_Value(COLUMNNAME_A_Name); - } - - /** Set Account State. - @param A_State - State of the Credit Card or Account holder - */ - public void setA_State (String A_State) - { - - if (A_State != null && A_State.length() > 40) - { - log.warning("Length > 40 - truncated"); - A_State = A_State.substring(0, 40); - } - set_Value (COLUMNNAME_A_State, A_State); - } - - /** Get Account State. - @return State of the Credit Card or Account holder - */ - public String getA_State () - { - return (String)get_Value(COLUMNNAME_A_State); - } - - /** Set Account Street. - @param A_Street - Street address of the Credit Card or Account holder - */ - public void setA_Street (String A_Street) - { - - if (A_Street != null && A_Street.length() > 60) - { - log.warning("Length > 60 - truncated"); - A_Street = A_Street.substring(0, 60); - } - set_Value (COLUMNNAME_A_Street, A_Street); - } - - /** Get Account Street. - @return Street address of the Credit Card or Account holder - */ - public String getA_Street () - { - return (String)get_Value(COLUMNNAME_A_Street); - } - - /** Set Account Zip/Postal. - @param A_Zip - Zip Code of the Credit Card or Account Holder - */ - public void setA_Zip (String A_Zip) - { - - if (A_Zip != null && A_Zip.length() > 20) - { - log.warning("Length > 20 - truncated"); - A_Zip = A_Zip.substring(0, 20); - } - set_Value (COLUMNNAME_A_Zip, A_Zip); - } - - /** Get Account Zip/Postal. - @return Zip Code of the Credit Card or Account Holder - */ - public String getA_Zip () - { - return (String)get_Value(COLUMNNAME_A_Zip); - } - - /** Set Account No. - @param AccountNo - Account Number - */ - public void setAccountNo (String AccountNo) - { - - if (AccountNo != null && AccountNo.length() > 20) - { - log.warning("Length > 20 - truncated"); - AccountNo = AccountNo.substring(0, 20); - } - set_Value (COLUMNNAME_AccountNo, AccountNo); - } - - /** Get Account No. - @return Account Number - */ - public String getAccountNo () - { - return (String)get_Value(COLUMNNAME_AccountNo); - } - - /** Set Business Partner Key. - @param BPartnerValue - Key of the Business Partner - */ - public void setBPartnerValue (String BPartnerValue) - { - - if (BPartnerValue != null && BPartnerValue.length() > 40) - { - log.warning("Length > 40 - truncated"); - BPartnerValue = BPartnerValue.substring(0, 40); - } - set_Value (COLUMNNAME_BPartnerValue, BPartnerValue); - } - - /** Get Business Partner Key. - @return Key of the Business Partner - */ - public String getBPartnerValue () - { - return (String)get_Value(COLUMNNAME_BPartnerValue); - } - - /** Set Bank Account No. - @param BankAccountNo - Bank Account Number - */ - public void setBankAccountNo (String BankAccountNo) - { - - if (BankAccountNo != null && BankAccountNo.length() > 20) - { - log.warning("Length > 20 - truncated"); - BankAccountNo = BankAccountNo.substring(0, 20); - } - set_Value (COLUMNNAME_BankAccountNo, BankAccountNo); - } - - /** Get Bank Account No. - @return Bank Account Number - */ - public String getBankAccountNo () - { - return (String)get_Value(COLUMNNAME_BankAccountNo); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - set_Value (COLUMNNAME_C_BPartner_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_BankAccount getC_BankAccount() throws Exception - { - Class clazz = MTable.getClass(I_C_BankAccount.Table_Name); - I_C_BankAccount result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BankAccount)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BankAccount_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Bank Account. - @param C_BankAccount_ID - Account at the Bank - */ - public void setC_BankAccount_ID (int C_BankAccount_ID) - { - if (C_BankAccount_ID < 1) - set_Value (COLUMNNAME_C_BankAccount_ID, null); - else - set_Value (COLUMNNAME_C_BankAccount_ID, Integer.valueOf(C_BankAccount_ID)); - } - - /** Get Bank Account. - @return Account at the Bank - */ - public int getC_BankAccount_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BankAccount_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Charge getC_Charge() throws Exception - { - Class clazz = MTable.getClass(I_C_Charge.Table_Name); - I_C_Charge result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Charge. - @param C_Charge_ID - Additional document charges - */ - public void setC_Charge_ID (int C_Charge_ID) - { - if (C_Charge_ID < 1) - set_Value (COLUMNNAME_C_Charge_ID, null); - else - set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); - } - - /** Get Charge. - @return Additional document charges - */ - public int getC_Charge_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - set_Value (COLUMNNAME_C_Currency_ID, null); - else - set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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 I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 1) - set_Value (COLUMNNAME_C_DocType_ID, null); - else - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Invoice getC_Invoice() throws Exception - { - Class clazz = MTable.getClass(I_C_Invoice.Table_Name); - I_C_Invoice result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Invoice)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Invoice_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Invoice. - @param C_Invoice_ID - Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID) - { - if (C_Invoice_ID < 1) - set_Value (COLUMNNAME_C_Invoice_ID, null); - else - set_Value (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID)); - } - - /** Get Invoice. - @return Invoice Identifier - */ - public int getC_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Payment getC_Payment() throws Exception - { - Class clazz = MTable.getClass(I_C_Payment.Table_Name); - I_C_Payment result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment. - @param C_Payment_ID - Payment identifier - */ - public void setC_Payment_ID (int C_Payment_ID) - { - if (C_Payment_ID < 1) - set_Value (COLUMNNAME_C_Payment_ID, null); - else - set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID)); - } - - /** Get Payment. - @return Payment identifier - */ - public int getC_Payment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Charge amount. - @param ChargeAmt - Charge Amount - */ - public void setChargeAmt (BigDecimal ChargeAmt) - { - set_Value (COLUMNNAME_ChargeAmt, ChargeAmt); - } - - /** Get Charge amount. - @return Charge Amount - */ - public BigDecimal getChargeAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Charge Name. - @param ChargeName - Name of the Charge - */ - public void setChargeName (String ChargeName) - { - - if (ChargeName != null && ChargeName.length() > 60) - { - log.warning("Length > 60 - truncated"); - ChargeName = ChargeName.substring(0, 60); - } - set_Value (COLUMNNAME_ChargeName, ChargeName); - } - - /** Get Charge Name. - @return Name of the Charge - */ - public String getChargeName () - { - return (String)get_Value(COLUMNNAME_ChargeName); - } - - /** Set Check No. - @param CheckNo - Check Number - */ - public void setCheckNo (String CheckNo) - { - - if (CheckNo != null && CheckNo.length() > 20) - { - log.warning("Length > 20 - truncated"); - CheckNo = CheckNo.substring(0, 20); - } - set_Value (COLUMNNAME_CheckNo, CheckNo); - } - - /** Get Check No. - @return Check Number - */ - public String getCheckNo () - { - return (String)get_Value(COLUMNNAME_CheckNo); - } - - /** Set Exp. Month. - @param CreditCardExpMM - Expiry Month - */ - public void setCreditCardExpMM (int CreditCardExpMM) - { - set_Value (COLUMNNAME_CreditCardExpMM, Integer.valueOf(CreditCardExpMM)); - } - - /** Get Exp. Month. - @return Expiry Month - */ - public int getCreditCardExpMM () - { - Integer ii = (Integer)get_Value(COLUMNNAME_CreditCardExpMM); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Exp. Year. - @param CreditCardExpYY - Expiry Year - */ - public void setCreditCardExpYY (int CreditCardExpYY) - { - set_Value (COLUMNNAME_CreditCardExpYY, Integer.valueOf(CreditCardExpYY)); - } - - /** Get Exp. Year. - @return Expiry Year - */ - public int getCreditCardExpYY () - { - Integer ii = (Integer)get_Value(COLUMNNAME_CreditCardExpYY); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Number. - @param CreditCardNumber - Credit Card Number - */ - public void setCreditCardNumber (String CreditCardNumber) - { - - if (CreditCardNumber != null && CreditCardNumber.length() > 20) - { - log.warning("Length > 20 - truncated"); - CreditCardNumber = CreditCardNumber.substring(0, 20); - } - set_Value (COLUMNNAME_CreditCardNumber, CreditCardNumber); - } - - /** Get Number. - @return Credit Card Number - */ - public String getCreditCardNumber () - { - return (String)get_Value(COLUMNNAME_CreditCardNumber); - } - - /** CreditCardType AD_Reference_ID=149 */ - public static final int CREDITCARDTYPE_AD_Reference_ID=149; - /** Amex = A */ - public static final String CREDITCARDTYPE_Amex = "A"; - /** MasterCard = M */ - public static final String CREDITCARDTYPE_MasterCard = "M"; - /** Visa = V */ - public static final String CREDITCARDTYPE_Visa = "V"; - /** ATM = C */ - public static final String CREDITCARDTYPE_ATM = "C"; - /** Diners = D */ - public static final String CREDITCARDTYPE_Diners = "D"; - /** Discover = N */ - public static final String CREDITCARDTYPE_Discover = "N"; - /** Purchase Card = P */ - public static final String CREDITCARDTYPE_PurchaseCard = "P"; - /** Set Credit Card. - @param CreditCardType - Credit Card (Visa, MC, AmEx) - */ - public void setCreditCardType (String CreditCardType) - { - - if (CreditCardType == null || CreditCardType.equals("A") || CreditCardType.equals("M") || CreditCardType.equals("V") || CreditCardType.equals("C") || CreditCardType.equals("D") || CreditCardType.equals("N") || CreditCardType.equals("P")); else throw new IllegalArgumentException ("CreditCardType Invalid value - " + CreditCardType + " - Reference_ID=149 - A - M - V - C - D - N - P"); - if (CreditCardType != null && CreditCardType.length() > 1) - { - log.warning("Length > 1 - truncated"); - CreditCardType = CreditCardType.substring(0, 1); - } - set_Value (COLUMNNAME_CreditCardType, CreditCardType); - } - - /** Get Credit Card. - @return Credit Card (Visa, MC, AmEx) - */ - public String getCreditCardType () - { - return (String)get_Value(COLUMNNAME_CreditCardType); - } - - /** Set Verification Code. - @param CreditCardVV - Credit Card Verification code on credit card - */ - public void setCreditCardVV (String CreditCardVV) - { - - if (CreditCardVV != null && CreditCardVV.length() > 4) - { - log.warning("Length > 4 - truncated"); - CreditCardVV = CreditCardVV.substring(0, 4); - } - set_Value (COLUMNNAME_CreditCardVV, CreditCardVV); - } - - /** Get Verification Code. - @return Credit Card Verification code on credit card - */ - public String getCreditCardVV () - { - return (String)get_Value(COLUMNNAME_CreditCardVV); - } - - /** Set Account Date. - @param DateAcct - Accounting Date - */ - public void setDateAcct (Timestamp DateAcct) - { - set_Value (COLUMNNAME_DateAcct, DateAcct); - } - - /** Get Account Date. - @return Accounting Date - */ - public Timestamp getDateAcct () - { - return (Timestamp)get_Value(COLUMNNAME_DateAcct); - } - - /** Set Transaction Date. - @param DateTrx - Transaction Date - */ - public void setDateTrx (Timestamp DateTrx) - { - set_Value (COLUMNNAME_DateTrx, DateTrx); - } - - /** Get Transaction Date. - @return Transaction Date - */ - public Timestamp getDateTrx () - { - return (Timestamp)get_Value(COLUMNNAME_DateTrx); - } - - /** Set Discount Amount. - @param DiscountAmt - Calculated amount of discount - */ - public void setDiscountAmt (BigDecimal DiscountAmt) - { - set_Value (COLUMNNAME_DiscountAmt, DiscountAmt); - } - - /** Get Discount Amount. - @return Calculated amount of discount - */ - public BigDecimal getDiscountAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DiscountAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Document Type Name. - @param DocTypeName - Name of the Document Type - */ - public void setDocTypeName (String DocTypeName) - { - - if (DocTypeName != null && DocTypeName.length() > 60) - { - log.warning("Length > 60 - truncated"); - DocTypeName = DocTypeName.substring(0, 60); - } - set_Value (COLUMNNAME_DocTypeName, DocTypeName); - } - - /** Get Document Type Name. - @return Name of the Document Type - */ - public String getDocTypeName () - { - return (String)get_Value(COLUMNNAME_DocTypeName); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - - if (DocumentNo != null && DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); - } - set_Value (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Set ISO Currency Code. - @param ISO_Code - Three letter ISO 4217 Code of the Currency - */ - public void setISO_Code (String ISO_Code) - { - - if (ISO_Code != null && ISO_Code.length() > 3) - { - log.warning("Length > 3 - truncated"); - ISO_Code = ISO_Code.substring(0, 3); - } - set_Value (COLUMNNAME_ISO_Code, ISO_Code); - } - - /** Get ISO Currency Code. - @return Three letter ISO 4217 Code of the Currency - */ - public String getISO_Code () - { - return (String)get_Value(COLUMNNAME_ISO_Code); - } - - /** Set Import Error Message. - @param I_ErrorMsg - Messages generated from import process - */ - public void setI_ErrorMsg (String I_ErrorMsg) - { - - if (I_ErrorMsg != null && I_ErrorMsg.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - I_ErrorMsg = I_ErrorMsg.substring(0, 2000); - } - set_Value (COLUMNNAME_I_ErrorMsg, I_ErrorMsg); - } - - /** Get Import Error Message. - @return Messages generated from import process - */ - public String getI_ErrorMsg () - { - return (String)get_Value(COLUMNNAME_I_ErrorMsg); - } - - /** Set Imported. - @param I_IsImported - Has this import been processed - */ - public void setI_IsImported (boolean I_IsImported) - { - set_Value (COLUMNNAME_I_IsImported, Boolean.valueOf(I_IsImported)); - } - - /** Get Imported. - @return Has this import been processed - */ - public boolean isI_IsImported () - { - Object oo = get_Value(COLUMNNAME_I_IsImported); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Import Payment. - @param I_Payment_ID - Import Payment - */ - public void setI_Payment_ID (int I_Payment_ID) - { - if (I_Payment_ID < 1) - throw new IllegalArgumentException ("I_Payment_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_I_Payment_ID, Integer.valueOf(I_Payment_ID)); - } - - /** Get Import Payment. - @return Import Payment - */ - public int getI_Payment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_I_Payment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Invoice Document No. - @param InvoiceDocumentNo - Document Number of the Invoice - */ - public void setInvoiceDocumentNo (String InvoiceDocumentNo) - { - - if (InvoiceDocumentNo != null && InvoiceDocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - InvoiceDocumentNo = InvoiceDocumentNo.substring(0, 30); - } - set_Value (COLUMNNAME_InvoiceDocumentNo, InvoiceDocumentNo); - } - - /** Get Invoice Document No. - @return Document Number of the Invoice - */ - public String getInvoiceDocumentNo () - { - return (String)get_Value(COLUMNNAME_InvoiceDocumentNo); - } - - /** Set Approved. - @param IsApproved - Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved) - { - set_Value (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); - } - - /** Get Approved. - @return Indicates if this document requires approval - */ - public boolean isApproved () - { - Object oo = get_Value(COLUMNNAME_IsApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Delayed Capture. - @param IsDelayedCapture - Charge after Shipment - */ - public void setIsDelayedCapture (boolean IsDelayedCapture) - { - set_Value (COLUMNNAME_IsDelayedCapture, Boolean.valueOf(IsDelayedCapture)); - } - - /** Get Delayed Capture. - @return Charge after Shipment - */ - public boolean isDelayedCapture () - { - Object oo = get_Value(COLUMNNAME_IsDelayedCapture); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Over/Under Payment. - @param IsOverUnderPayment - Over-Payment (unallocated) or Under-Payment (partial payment) - */ - public void setIsOverUnderPayment (boolean IsOverUnderPayment) - { - set_Value (COLUMNNAME_IsOverUnderPayment, Boolean.valueOf(IsOverUnderPayment)); - } - - /** Get Over/Under Payment. - @return Over-Payment (unallocated) or Under-Payment (partial payment) - */ - public boolean isOverUnderPayment () - { - Object oo = get_Value(COLUMNNAME_IsOverUnderPayment); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Receipt. - @param IsReceipt - This is a sales transaction (receipt) - */ - public void setIsReceipt (boolean IsReceipt) - { - set_Value (COLUMNNAME_IsReceipt, Boolean.valueOf(IsReceipt)); - } - - /** Get Receipt. - @return This is a sales transaction (receipt) - */ - public boolean isReceipt () - { - Object oo = get_Value(COLUMNNAME_IsReceipt); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Self-Service. - @param IsSelfService - This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService) - { - set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); - } - - /** Get Self-Service. - @return This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService () - { - Object oo = get_Value(COLUMNNAME_IsSelfService); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Micr. - @param Micr - Combination of routing no, account and check no - */ - public void setMicr (String Micr) - { - - if (Micr != null && Micr.length() > 20) - { - log.warning("Length > 20 - truncated"); - Micr = Micr.substring(0, 20); - } - set_Value (COLUMNNAME_Micr, Micr); - } - - /** Get Micr. - @return Combination of routing no, account and check no - */ - public String getMicr () - { - return (String)get_Value(COLUMNNAME_Micr); - } - - /** Set Original Transaction ID. - @param Orig_TrxID - Original Transaction ID - */ - public void setOrig_TrxID (String Orig_TrxID) - { - - if (Orig_TrxID != null && Orig_TrxID.length() > 20) - { - log.warning("Length > 20 - truncated"); - Orig_TrxID = Orig_TrxID.substring(0, 20); - } - set_Value (COLUMNNAME_Orig_TrxID, Orig_TrxID); - } - - /** Get Original Transaction ID. - @return Original Transaction ID - */ - public String getOrig_TrxID () - { - return (String)get_Value(COLUMNNAME_Orig_TrxID); - } - - /** Set Over/Under Payment. - @param OverUnderAmt - Over-Payment (unallocated) or Under-Payment (partial payment) Amount - */ - public void setOverUnderAmt (BigDecimal OverUnderAmt) - { - set_Value (COLUMNNAME_OverUnderAmt, OverUnderAmt); - } - - /** Get Over/Under Payment. - @return Over-Payment (unallocated) or Under-Payment (partial payment) Amount - */ - public BigDecimal getOverUnderAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OverUnderAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set PO Number. - @param PONum - Purchase Order Number - */ - public void setPONum (String PONum) - { - - if (PONum != null && PONum.length() > 60) - { - log.warning("Length > 60 - truncated"); - PONum = PONum.substring(0, 60); - } - set_Value (COLUMNNAME_PONum, PONum); - } - - /** Get PO Number. - @return Purchase Order Number - */ - public String getPONum () - { - return (String)get_Value(COLUMNNAME_PONum); - } - - /** Set Payment amount. - @param PayAmt - Amount being paid - */ - public void setPayAmt (BigDecimal PayAmt) - { - set_Value (COLUMNNAME_PayAmt, PayAmt); - } - - /** Get Payment amount. - @return Amount being paid - */ - public BigDecimal getPayAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PayAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** 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; - } - - /** Set Authorization Code. - @param R_AuthCode - Authorization Code returned - */ - public void setR_AuthCode (String R_AuthCode) - { - - if (R_AuthCode != null && R_AuthCode.length() > 20) - { - log.warning("Length > 20 - truncated"); - R_AuthCode = R_AuthCode.substring(0, 20); - } - set_Value (COLUMNNAME_R_AuthCode, R_AuthCode); - } - - /** Get Authorization Code. - @return Authorization Code returned - */ - public String getR_AuthCode () - { - return (String)get_Value(COLUMNNAME_R_AuthCode); - } - - /** Set Info. - @param R_Info - Response info - */ - public void setR_Info (String R_Info) - { - - if (R_Info != null && R_Info.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - R_Info = R_Info.substring(0, 2000); - } - set_Value (COLUMNNAME_R_Info, R_Info); - } - - /** Get Info. - @return Response info - */ - public String getR_Info () - { - return (String)get_Value(COLUMNNAME_R_Info); - } - - /** Set Reference. - @param R_PnRef - Payment reference - */ - public void setR_PnRef (String R_PnRef) - { - - if (R_PnRef != null && R_PnRef.length() > 20) - { - log.warning("Length > 20 - truncated"); - R_PnRef = R_PnRef.substring(0, 20); - } - set_Value (COLUMNNAME_R_PnRef, R_PnRef); - } - - /** Get Reference. - @return Payment reference - */ - public String getR_PnRef () - { - return (String)get_Value(COLUMNNAME_R_PnRef); - } - - /** Set Response Message. - @param R_RespMsg - Response message - */ - public void setR_RespMsg (String R_RespMsg) - { - - if (R_RespMsg != null && R_RespMsg.length() > 60) - { - log.warning("Length > 60 - truncated"); - R_RespMsg = R_RespMsg.substring(0, 60); - } - set_Value (COLUMNNAME_R_RespMsg, R_RespMsg); - } - - /** Get Response Message. - @return Response message - */ - public String getR_RespMsg () - { - return (String)get_Value(COLUMNNAME_R_RespMsg); - } - - /** Set Result. - @param R_Result - Result of transmission - */ - public void setR_Result (String R_Result) - { - - if (R_Result != null && R_Result.length() > 20) - { - log.warning("Length > 20 - truncated"); - R_Result = R_Result.substring(0, 20); - } - set_Value (COLUMNNAME_R_Result, R_Result); - } - - /** Get Result. - @return Result of transmission - */ - public String getR_Result () - { - return (String)get_Value(COLUMNNAME_R_Result); - } - - /** Set Routing No. - @param RoutingNo - Bank Routing Number - */ - public void setRoutingNo (String RoutingNo) - { - - if (RoutingNo != null && RoutingNo.length() > 20) - { - log.warning("Length > 20 - truncated"); - RoutingNo = RoutingNo.substring(0, 20); - } - set_Value (COLUMNNAME_RoutingNo, RoutingNo); - } - - /** Get Routing No. - @return Bank Routing Number - */ - public String getRoutingNo () - { - return (String)get_Value(COLUMNNAME_RoutingNo); - } - - /** Set Swipe. - @param Swipe - Track 1 and 2 of the Credit Card - */ - public void setSwipe (String Swipe) - { - - if (Swipe != null && Swipe.length() > 80) - { - log.warning("Length > 80 - truncated"); - Swipe = Swipe.substring(0, 80); - } - set_Value (COLUMNNAME_Swipe, Swipe); - } - - /** Get Swipe. - @return Track 1 and 2 of the Credit Card - */ - public String getSwipe () - { - return (String)get_Value(COLUMNNAME_Swipe); - } - - /** Set Tax Amount. - @param TaxAmt - Tax Amount for a document - */ - public void setTaxAmt (BigDecimal TaxAmt) - { - set_Value (COLUMNNAME_TaxAmt, TaxAmt); - } - - /** Get Tax Amount. - @return Tax Amount for a document - */ - public BigDecimal getTaxAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** TenderType AD_Reference_ID=214 */ - public static final int TENDERTYPE_AD_Reference_ID=214; - /** Credit Card = C */ - public static final String TENDERTYPE_CreditCard = "C"; - /** Check = K */ - public static final String TENDERTYPE_Check = "K"; - /** Direct Deposit = A */ - public static final String TENDERTYPE_DirectDeposit = "A"; - /** Direct Debit = D */ - public static final String TENDERTYPE_DirectDebit = "D"; - /** Set Tender type. - @param TenderType - Method of Payment - */ - public void setTenderType (String TenderType) - { - - if (TenderType == null || TenderType.equals("C") || TenderType.equals("K") || TenderType.equals("A") || TenderType.equals("D")); else throw new IllegalArgumentException ("TenderType Invalid value - " + TenderType + " - Reference_ID=214 - C - K - A - D"); - if (TenderType != null && TenderType.length() > 1) - { - log.warning("Length > 1 - truncated"); - TenderType = TenderType.substring(0, 1); - } - set_Value (COLUMNNAME_TenderType, TenderType); - } - - /** Get Tender type. - @return Method of Payment - */ - public String getTenderType () - { - return (String)get_Value(COLUMNNAME_TenderType); - } - - /** TrxType AD_Reference_ID=215 */ - public static final int TRXTYPE_AD_Reference_ID=215; - /** Sales = S */ - public static final String TRXTYPE_Sales = "S"; - /** Delayed Capture = D */ - public static final String TRXTYPE_DelayedCapture = "D"; - /** Credit (Payment) = C */ - public static final String TRXTYPE_CreditPayment = "C"; - /** Voice Authorization = F */ - public static final String TRXTYPE_VoiceAuthorization = "F"; - /** Authorization = A */ - public static final String TRXTYPE_Authorization = "A"; - /** Void = V */ - public static final String TRXTYPE_Void = "V"; - /** Set Transaction Type. - @param TrxType - Type of credit card transaction - */ - public void setTrxType (String TrxType) - { - - if (TrxType == null || TrxType.equals("S") || TrxType.equals("D") || TrxType.equals("C") || TrxType.equals("F") || TrxType.equals("A") || TrxType.equals("V")); else throw new IllegalArgumentException ("TrxType Invalid value - " + TrxType + " - Reference_ID=215 - S - D - C - F - A - V"); - if (TrxType != null && TrxType.length() > 1) - { - log.warning("Length > 1 - truncated"); - TrxType = TrxType.substring(0, 1); - } - set_Value (COLUMNNAME_TrxType, TrxType); - } - - /** Get Transaction Type. - @return Type of credit card transaction - */ - public String getTrxType () - { - return (String)get_Value(COLUMNNAME_TrxType); - } - - /** Set Voice authorization code. - @param VoiceAuthCode - Voice Authorization Code from credit card company - */ - public void setVoiceAuthCode (String VoiceAuthCode) - { - - if (VoiceAuthCode != null && VoiceAuthCode.length() > 20) - { - log.warning("Length > 20 - truncated"); - VoiceAuthCode = VoiceAuthCode.substring(0, 20); - } - set_Value (COLUMNNAME_VoiceAuthCode, VoiceAuthCode); - } - - /** Get Voice authorization code. - @return Voice Authorization Code from credit card company - */ - public String getVoiceAuthCode () - { - return (String)get_Value(COLUMNNAME_VoiceAuthCode); - } - - /** Set Write-off Amount. - @param WriteOffAmt - Amount to write-off - */ - public void setWriteOffAmt (BigDecimal WriteOffAmt) - { - set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt); - } - - /** Get Write-off Amount. - @return Amount to write-off - */ - public BigDecimal getWriteOffAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt); - if (bd == null) - return Env.ZERO; - return bd; - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_I_Product.java b/base/src/org/compiere/model/X_I_Product.java index 332b6a698b..586b51633f 100644 --- a/base/src/org/compiere/model/X_I_Product.java +++ b/base/src/org/compiere/model/X_I_Product.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_Product * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_Product extends PO implements I_I_Product, I_Persistent { diff --git a/base/src/org/compiere/model/X_I_ReportLine.java b/base/src/org/compiere/model/X_I_ReportLine.java index 7c8928a9bf..9c4e5f7ee0 100644 --- a/base/src/org/compiere/model/X_I_ReportLine.java +++ b/base/src/org/compiere/model/X_I_ReportLine.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_ReportLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_I_ReportLine extends PO implements I_I_ReportLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_Category.java b/base/src/org/compiere/model/X_K_Category.java index c7e75060f9..ebc2a7ba1b 100644 --- a/base/src/org/compiere/model/X_K_Category.java +++ b/base/src/org/compiere/model/X_K_Category.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_Category * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_Category extends PO implements I_K_Category, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_CategoryValue.java b/base/src/org/compiere/model/X_K_CategoryValue.java index 1067703318..98f04a73a8 100644 --- a/base/src/org/compiere/model/X_K_CategoryValue.java +++ b/base/src/org/compiere/model/X_K_CategoryValue.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_CategoryValue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_CategoryValue extends PO implements I_K_CategoryValue, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_Comment.java b/base/src/org/compiere/model/X_K_Comment.java index 2126b6190b..946c35eae5 100644 --- a/base/src/org/compiere/model/X_K_Comment.java +++ b/base/src/org/compiere/model/X_K_Comment.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_Comment * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_Comment extends PO implements I_K_Comment, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_Entry.java b/base/src/org/compiere/model/X_K_Entry.java index 369a34e296..5cb1584ea5 100644 --- a/base/src/org/compiere/model/X_K_Entry.java +++ b/base/src/org/compiere/model/X_K_Entry.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_Entry * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_Entry extends PO implements I_K_Entry, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_EntryCategory.java b/base/src/org/compiere/model/X_K_EntryCategory.java index 2ab6e06fa4..94852ca722 100644 --- a/base/src/org/compiere/model/X_K_EntryCategory.java +++ b/base/src/org/compiere/model/X_K_EntryCategory.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_EntryCategory * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_EntryCategory extends PO implements I_K_EntryCategory, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_EntryRelated.java b/base/src/org/compiere/model/X_K_EntryRelated.java index 94df6435ec..708db05687 100644 --- a/base/src/org/compiere/model/X_K_EntryRelated.java +++ b/base/src/org/compiere/model/X_K_EntryRelated.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_EntryRelated * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_EntryRelated extends PO implements I_K_EntryRelated, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_Index.java b/base/src/org/compiere/model/X_K_Index.java index b44b664aac..e6abb89efd 100644 --- a/base/src/org/compiere/model/X_K_Index.java +++ b/base/src/org/compiere/model/X_K_Index.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_Index * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_Index extends PO implements I_K_Index, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_IndexLog.java b/base/src/org/compiere/model/X_K_IndexLog.java index ba2deedf23..7eb2176f5e 100644 --- a/base/src/org/compiere/model/X_K_IndexLog.java +++ b/base/src/org/compiere/model/X_K_IndexLog.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_IndexLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_IndexLog extends PO implements I_K_IndexLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_IndexStop.java b/base/src/org/compiere/model/X_K_IndexStop.java index 3fea85851b..366e913f13 100644 --- a/base/src/org/compiere/model/X_K_IndexStop.java +++ b/base/src/org/compiere/model/X_K_IndexStop.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_IndexStop * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_IndexStop extends PO implements I_K_IndexStop, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_Source.java b/base/src/org/compiere/model/X_K_Source.java index f7210c443e..d2d0095d20 100644 --- a/base/src/org/compiere/model/X_K_Source.java +++ b/base/src/org/compiere/model/X_K_Source.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_Source * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_Source extends PO implements I_K_Source, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_Synonym.java b/base/src/org/compiere/model/X_K_Synonym.java index a6e4f96f23..0aa61e16a4 100644 --- a/base/src/org/compiere/model/X_K_Synonym.java +++ b/base/src/org/compiere/model/X_K_Synonym.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_Synonym * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_Synonym extends PO implements I_K_Synonym, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_Topic.java b/base/src/org/compiere/model/X_K_Topic.java index 40adb9a48c..12904be77e 100644 --- a/base/src/org/compiere/model/X_K_Topic.java +++ b/base/src/org/compiere/model/X_K_Topic.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_Topic * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_Topic extends PO implements I_K_Topic, I_Persistent { diff --git a/base/src/org/compiere/model/X_K_Type.java b/base/src/org/compiere/model/X_K_Type.java index 760e0deeb1..c1b717557f 100644 --- a/base/src/org/compiere/model/X_K_Type.java +++ b/base/src/org/compiere/model/X_K_Type.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for K_Type * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_K_Type extends PO implements I_K_Type, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Attribute.java b/base/src/org/compiere/model/X_M_Attribute.java index 8038c4aec1..1d673b209b 100644 --- a/base/src/org/compiere/model/X_M_Attribute.java +++ b/base/src/org/compiere/model/X_M_Attribute.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Attribute * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Attribute extends PO implements I_M_Attribute, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_AttributeInstance.java b/base/src/org/compiere/model/X_M_AttributeInstance.java index 289185a281..f8d53b11de 100644 --- a/base/src/org/compiere/model/X_M_AttributeInstance.java +++ b/base/src/org/compiere/model/X_M_AttributeInstance.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_AttributeInstance * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_AttributeInstance extends PO implements I_M_AttributeInstance, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_AttributeSearch.java b/base/src/org/compiere/model/X_M_AttributeSearch.java index 8c0d2cc84c..1e21d68d11 100644 --- a/base/src/org/compiere/model/X_M_AttributeSearch.java +++ b/base/src/org/compiere/model/X_M_AttributeSearch.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_AttributeSearch * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_AttributeSearch extends PO implements I_M_AttributeSearch, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_AttributeSet.java b/base/src/org/compiere/model/X_M_AttributeSet.java index 1f70e569f9..c0d0b34c19 100644 --- a/base/src/org/compiere/model/X_M_AttributeSet.java +++ b/base/src/org/compiere/model/X_M_AttributeSet.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_AttributeSet * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_AttributeSet extends PO implements I_M_AttributeSet, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_AttributeSetExclude.java b/base/src/org/compiere/model/X_M_AttributeSetExclude.java index 5688d62d80..c58ffbc988 100644 --- a/base/src/org/compiere/model/X_M_AttributeSetExclude.java +++ b/base/src/org/compiere/model/X_M_AttributeSetExclude.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for M_AttributeSetExclude * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_AttributeSetExclude extends PO implements I_M_AttributeSetExclude, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_AttributeSetInstance.java b/base/src/org/compiere/model/X_M_AttributeSetInstance.java index c2b8a5f712..b03e9e337c 100644 --- a/base/src/org/compiere/model/X_M_AttributeSetInstance.java +++ b/base/src/org/compiere/model/X_M_AttributeSetInstance.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_AttributeSetInstance * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_AttributeSetInstance extends PO implements I_M_AttributeSetInstance, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_AttributeUse.java b/base/src/org/compiere/model/X_M_AttributeUse.java index 2125f0f83a..5c33b47cd3 100644 --- a/base/src/org/compiere/model/X_M_AttributeUse.java +++ b/base/src/org/compiere/model/X_M_AttributeUse.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_AttributeUse * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_AttributeUse extends PO implements I_M_AttributeUse, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_AttributeValue.java b/base/src/org/compiere/model/X_M_AttributeValue.java index 570199cf55..0e57813259 100644 --- a/base/src/org/compiere/model/X_M_AttributeValue.java +++ b/base/src/org/compiere/model/X_M_AttributeValue.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_AttributeValue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_AttributeValue extends PO implements I_M_AttributeValue, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_BOMAlternative.java b/base/src/org/compiere/model/X_M_BOMAlternative.java index d9466b2a98..55a2cb3f97 100644 --- a/base/src/org/compiere/model/X_M_BOMAlternative.java +++ b/base/src/org/compiere/model/X_M_BOMAlternative.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_BOMAlternative * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_BOMAlternative extends PO implements I_M_BOMAlternative, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_BOMProduct.java b/base/src/org/compiere/model/X_M_BOMProduct.java index 6eacd5e956..a6bff3f117 100644 --- a/base/src/org/compiere/model/X_M_BOMProduct.java +++ b/base/src/org/compiere/model/X_M_BOMProduct.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_BOMProduct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_BOMProduct extends PO implements I_M_BOMProduct, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_ChangeNotice.java b/base/src/org/compiere/model/X_M_ChangeNotice.java index cf617436ff..3ccea6ff69 100644 --- a/base/src/org/compiere/model/X_M_ChangeNotice.java +++ b/base/src/org/compiere/model/X_M_ChangeNotice.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_ChangeNotice * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_ChangeNotice extends PO implements I_M_ChangeNotice, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_ChangeRequest.java b/base/src/org/compiere/model/X_M_ChangeRequest.java index a43b90855d..ab3556a06c 100644 --- a/base/src/org/compiere/model/X_M_ChangeRequest.java +++ b/base/src/org/compiere/model/X_M_ChangeRequest.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_ChangeRequest * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_ChangeRequest extends PO implements I_M_ChangeRequest, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Cost.java b/base/src/org/compiere/model/X_M_Cost.java index fde011be9a..1a9baaf7f1 100644 --- a/base/src/org/compiere/model/X_M_Cost.java +++ b/base/src/org/compiere/model/X_M_Cost.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for M_Cost * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Cost extends PO implements I_M_Cost, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_CostDetail.java b/base/src/org/compiere/model/X_M_CostDetail.java index 77eb9d3036..75dc9a40a9 100644 --- a/base/src/org/compiere/model/X_M_CostDetail.java +++ b/base/src/org/compiere/model/X_M_CostDetail.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for M_CostDetail * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_CostDetail extends PO implements I_M_CostDetail, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_CostElement.java b/base/src/org/compiere/model/X_M_CostElement.java index af9294b0a1..03a579026d 100644 --- a/base/src/org/compiere/model/X_M_CostElement.java +++ b/base/src/org/compiere/model/X_M_CostElement.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_CostElement * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_CostElement extends PO implements I_M_CostElement, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_CostQueue.java b/base/src/org/compiere/model/X_M_CostQueue.java index c3c41fd140..69c5acae74 100644 --- a/base/src/org/compiere/model/X_M_CostQueue.java +++ b/base/src/org/compiere/model/X_M_CostQueue.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for M_CostQueue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_CostQueue extends PO implements I_M_CostQueue, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_CostType.java b/base/src/org/compiere/model/X_M_CostType.java index c229a8dfc4..eda6737d58 100644 --- a/base/src/org/compiere/model/X_M_CostType.java +++ b/base/src/org/compiere/model/X_M_CostType.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_CostType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_CostType extends PO implements I_M_CostType, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Demand.java b/base/src/org/compiere/model/X_M_Demand.java index 14a6016ec8..aafbedc081 100644 --- a/base/src/org/compiere/model/X_M_Demand.java +++ b/base/src/org/compiere/model/X_M_Demand.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Demand * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Demand extends PO implements I_M_Demand, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_DemandDetail.java b/base/src/org/compiere/model/X_M_DemandDetail.java index 2752a74ea3..f2994ce8fd 100644 --- a/base/src/org/compiere/model/X_M_DemandDetail.java +++ b/base/src/org/compiere/model/X_M_DemandDetail.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_DemandDetail * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_DemandDetail extends PO implements I_M_DemandDetail, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_DemandLine.java b/base/src/org/compiere/model/X_M_DemandLine.java index 77ecd76b4c..38a84d92fa 100644 --- a/base/src/org/compiere/model/X_M_DemandLine.java +++ b/base/src/org/compiere/model/X_M_DemandLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_DemandLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_DemandLine extends PO implements I_M_DemandLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_DiscountSchema.java b/base/src/org/compiere/model/X_M_DiscountSchema.java index 968cea2eb3..b5c1f7c1f3 100644 --- a/base/src/org/compiere/model/X_M_DiscountSchema.java +++ b/base/src/org/compiere/model/X_M_DiscountSchema.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_DiscountSchema * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_DiscountSchema extends PO implements I_M_DiscountSchema, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_DiscountSchemaBreak.java b/base/src/org/compiere/model/X_M_DiscountSchemaBreak.java index 58625cd169..4bba5b017c 100644 --- a/base/src/org/compiere/model/X_M_DiscountSchemaBreak.java +++ b/base/src/org/compiere/model/X_M_DiscountSchemaBreak.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_DiscountSchemaBreak * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_DiscountSchemaBreak extends PO implements I_M_DiscountSchemaBreak, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_DiscountSchemaLine.java b/base/src/org/compiere/model/X_M_DiscountSchemaLine.java deleted file mode 100644 index 54a1382fd8..0000000000 --- a/base/src/org/compiere/model/X_M_DiscountSchemaLine.java +++ /dev/null @@ -1,921 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for M_DiscountSchemaLine - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_DiscountSchemaLine extends PO implements I_M_DiscountSchemaLine, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_M_DiscountSchemaLine (Properties ctx, int M_DiscountSchemaLine_ID, String trxName) - { - super (ctx, M_DiscountSchemaLine_ID, trxName); - /** if (M_DiscountSchemaLine_ID == 0) - { - setC_ConversionType_ID (0); - setConversionDate (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setLimit_AddAmt (Env.ZERO); - setLimit_Base (null); -// X - setLimit_Discount (Env.ZERO); - setLimit_MaxAmt (Env.ZERO); - setLimit_MinAmt (Env.ZERO); - setLimit_Rounding (null); -// C - setList_AddAmt (Env.ZERO); - setList_Base (null); -// L - setList_Discount (Env.ZERO); - setList_MaxAmt (Env.ZERO); - setList_MinAmt (Env.ZERO); - setList_Rounding (null); -// C - setM_DiscountSchemaLine_ID (0); - setM_DiscountSchema_ID (0); - setSeqNo (0); -// @SQL=SELECT NVL(MAX(SeqNo),0)+10 AS DefaultValue FROM M_DiscountSchemaLine WHERE M_DiscountSchema_ID=@M_DiscountSchema_ID@ - setStd_AddAmt (Env.ZERO); - setStd_Base (null); -// S - setStd_Discount (Env.ZERO); - setStd_MaxAmt (Env.ZERO); - setStd_MinAmt (Env.ZERO); - setStd_Rounding (null); -// C - } */ - } - - /** Load Constructor */ - public X_M_DiscountSchemaLine (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() - { - StringBuffer sb = new StringBuffer ("X_M_DiscountSchemaLine[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - set_Value (COLUMNNAME_C_BPartner_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_ConversionType getC_ConversionType() throws Exception - { - Class clazz = MTable.getClass(I_C_ConversionType.Table_Name); - I_C_ConversionType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_ConversionType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ConversionType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency Type. - @param C_ConversionType_ID - Currency Conversion Rate Type - */ - public void setC_ConversionType_ID (int C_ConversionType_ID) - { - if (C_ConversionType_ID < 1) - throw new IllegalArgumentException ("C_ConversionType_ID is mandatory."); - set_Value (COLUMNNAME_C_ConversionType_ID, Integer.valueOf(C_ConversionType_ID)); - } - - /** Get Currency Type. - @return Currency Conversion Rate Type - */ - public int getC_ConversionType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Conversion Date. - @param ConversionDate - Date for selecting conversion rate - */ - public void setConversionDate (Timestamp ConversionDate) - { - if (ConversionDate == null) - throw new IllegalArgumentException ("ConversionDate is mandatory."); - set_Value (COLUMNNAME_ConversionDate, ConversionDate); - } - - /** Get Conversion Date. - @return Date for selecting conversion rate - */ - public Timestamp getConversionDate () - { - return (Timestamp)get_Value(COLUMNNAME_ConversionDate); - } - - /** Set Limit price Surcharge Amount. - @param Limit_AddAmt - Amount added to the converted/copied price before multiplying - */ - public void setLimit_AddAmt (BigDecimal Limit_AddAmt) - { - if (Limit_AddAmt == null) - throw new IllegalArgumentException ("Limit_AddAmt is mandatory."); - set_Value (COLUMNNAME_Limit_AddAmt, Limit_AddAmt); - } - - /** Get Limit price Surcharge Amount. - @return Amount added to the converted/copied price before multiplying - */ - public BigDecimal getLimit_AddAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Limit_AddAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Limit_Base AD_Reference_ID=194 */ - public static final int LIMIT_BASE_AD_Reference_ID=194; - /** List Price = L */ - public static final String LIMIT_BASE_ListPrice = "L"; - /** Standard Price = S */ - public static final String LIMIT_BASE_StandardPrice = "S"; - /** Limit (PO) Price = X */ - public static final String LIMIT_BASE_LimitPOPrice = "X"; - /** Fixed Price = F */ - public static final String LIMIT_BASE_FixedPrice = "F"; - /** Set Limit price Base. - @param Limit_Base - Base price for calculation of the new price - */ - public void setLimit_Base (String Limit_Base) - { - if (Limit_Base == null) throw new IllegalArgumentException ("Limit_Base is mandatory"); - if (Limit_Base.equals("L") || Limit_Base.equals("S") || Limit_Base.equals("X") || Limit_Base.equals("F")); else throw new IllegalArgumentException ("Limit_Base Invalid value - " + Limit_Base + " - Reference_ID=194 - L - S - X - F"); - if (Limit_Base.length() > 1) - { - log.warning("Length > 1 - truncated"); - Limit_Base = Limit_Base.substring(0, 1); - } - set_Value (COLUMNNAME_Limit_Base, Limit_Base); - } - - /** Get Limit price Base. - @return Base price for calculation of the new price - */ - public String getLimit_Base () - { - return (String)get_Value(COLUMNNAME_Limit_Base); - } - - /** Set Limit price Discount %. - @param Limit_Discount - Discount in percent to be subtracted from base, if negative it will be added to base price - */ - public void setLimit_Discount (BigDecimal Limit_Discount) - { - if (Limit_Discount == null) - throw new IllegalArgumentException ("Limit_Discount is mandatory."); - set_Value (COLUMNNAME_Limit_Discount, Limit_Discount); - } - - /** Get Limit price Discount %. - @return Discount in percent to be subtracted from base, if negative it will be added to base price - */ - public BigDecimal getLimit_Discount () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Limit_Discount); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Fixed Limit Price. - @param Limit_Fixed - Fixed Limit Price (not calculated) - */ - public void setLimit_Fixed (BigDecimal Limit_Fixed) - { - set_Value (COLUMNNAME_Limit_Fixed, Limit_Fixed); - } - - /** Get Fixed Limit Price. - @return Fixed Limit Price (not calculated) - */ - public BigDecimal getLimit_Fixed () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Limit_Fixed); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Limit price max Margin. - @param Limit_MaxAmt - Maximum difference to original limit price; ignored if zero - */ - public void setLimit_MaxAmt (BigDecimal Limit_MaxAmt) - { - if (Limit_MaxAmt == null) - throw new IllegalArgumentException ("Limit_MaxAmt is mandatory."); - set_Value (COLUMNNAME_Limit_MaxAmt, Limit_MaxAmt); - } - - /** Get Limit price max Margin. - @return Maximum difference to original limit price; ignored if zero - */ - public BigDecimal getLimit_MaxAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Limit_MaxAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Limit price min Margin. - @param Limit_MinAmt - Minimum difference to original limit price; ignored if zero - */ - public void setLimit_MinAmt (BigDecimal Limit_MinAmt) - { - if (Limit_MinAmt == null) - throw new IllegalArgumentException ("Limit_MinAmt is mandatory."); - set_Value (COLUMNNAME_Limit_MinAmt, Limit_MinAmt); - } - - /** Get Limit price min Margin. - @return Minimum difference to original limit price; ignored if zero - */ - public BigDecimal getLimit_MinAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Limit_MinAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Limit_Rounding AD_Reference_ID=155 */ - public static final int LIMIT_ROUNDING_AD_Reference_ID=155; - /** Whole Number .00 = 0 */ - public static final String LIMIT_ROUNDING_WholeNumber00 = "0"; - /** No Rounding = N */ - public static final String LIMIT_ROUNDING_NoRounding = "N"; - /** Quarter .25 .50 .75 = Q */ - public static final String LIMIT_ROUNDING_Quarter255075 = "Q"; - /** Dime .10, .20, .30, ... = D */ - public static final String LIMIT_ROUNDING_Dime102030 = "D"; - /** Nickel .05, .10, .15, ... = 5 */ - public static final String LIMIT_ROUNDING_Nickel051015 = "5"; - /** Ten 10.00, 20.00, .. = T */ - public static final String LIMIT_ROUNDING_Ten10002000 = "T"; - /** Currency Precision = C */ - public static final String LIMIT_ROUNDING_CurrencyPrecision = "C"; - /** Ending in 9/5 = 9 */ - public static final String LIMIT_ROUNDING_EndingIn95 = "9"; - /** Set Limit price Rounding. - @param Limit_Rounding - Rounding of the final result - */ - public void setLimit_Rounding (String Limit_Rounding) - { - if (Limit_Rounding == null) throw new IllegalArgumentException ("Limit_Rounding is mandatory"); - if (Limit_Rounding.equals("0") || Limit_Rounding.equals("N") || Limit_Rounding.equals("Q") || Limit_Rounding.equals("D") || Limit_Rounding.equals("5") || Limit_Rounding.equals("T") || Limit_Rounding.equals("C") || Limit_Rounding.equals("9")); else throw new IllegalArgumentException ("Limit_Rounding Invalid value - " + Limit_Rounding + " - Reference_ID=155 - 0 - N - Q - D - 5 - T - C - 9"); - if (Limit_Rounding.length() > 1) - { - log.warning("Length > 1 - truncated"); - Limit_Rounding = Limit_Rounding.substring(0, 1); - } - set_Value (COLUMNNAME_Limit_Rounding, Limit_Rounding); - } - - /** Get Limit price Rounding. - @return Rounding of the final result - */ - public String getLimit_Rounding () - { - return (String)get_Value(COLUMNNAME_Limit_Rounding); - } - - /** Set List price Surcharge Amount. - @param List_AddAmt - List Price Surcharge Amount - */ - public void setList_AddAmt (BigDecimal List_AddAmt) - { - if (List_AddAmt == null) - throw new IllegalArgumentException ("List_AddAmt is mandatory."); - set_Value (COLUMNNAME_List_AddAmt, List_AddAmt); - } - - /** Get List price Surcharge Amount. - @return List Price Surcharge Amount - */ - public BigDecimal getList_AddAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_List_AddAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** List_Base AD_Reference_ID=194 */ - public static final int LIST_BASE_AD_Reference_ID=194; - /** List Price = L */ - public static final String LIST_BASE_ListPrice = "L"; - /** Standard Price = S */ - public static final String LIST_BASE_StandardPrice = "S"; - /** Limit (PO) Price = X */ - public static final String LIST_BASE_LimitPOPrice = "X"; - /** Fixed Price = F */ - public static final String LIST_BASE_FixedPrice = "F"; - /** Set List price Base. - @param List_Base - Price used as the basis for price list calculations - */ - public void setList_Base (String List_Base) - { - if (List_Base == null) throw new IllegalArgumentException ("List_Base is mandatory"); - if (List_Base.equals("L") || List_Base.equals("S") || List_Base.equals("X") || List_Base.equals("F")); else throw new IllegalArgumentException ("List_Base Invalid value - " + List_Base + " - Reference_ID=194 - L - S - X - F"); - if (List_Base.length() > 1) - { - log.warning("Length > 1 - truncated"); - List_Base = List_Base.substring(0, 1); - } - set_Value (COLUMNNAME_List_Base, List_Base); - } - - /** Get List price Base. - @return Price used as the basis for price list calculations - */ - public String getList_Base () - { - return (String)get_Value(COLUMNNAME_List_Base); - } - - /** Set List price Discount %. - @param List_Discount - Discount from list price as a percentage - */ - public void setList_Discount (BigDecimal List_Discount) - { - if (List_Discount == null) - throw new IllegalArgumentException ("List_Discount is mandatory."); - set_Value (COLUMNNAME_List_Discount, List_Discount); - } - - /** Get List price Discount %. - @return Discount from list price as a percentage - */ - public BigDecimal getList_Discount () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_List_Discount); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Fixed List Price. - @param List_Fixed - Fixes List Price (not calculated) - */ - public void setList_Fixed (BigDecimal List_Fixed) - { - set_Value (COLUMNNAME_List_Fixed, List_Fixed); - } - - /** Get Fixed List Price. - @return Fixes List Price (not calculated) - */ - public BigDecimal getList_Fixed () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_List_Fixed); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set List price max Margin. - @param List_MaxAmt - Maximum margin for a product - */ - public void setList_MaxAmt (BigDecimal List_MaxAmt) - { - if (List_MaxAmt == null) - throw new IllegalArgumentException ("List_MaxAmt is mandatory."); - set_Value (COLUMNNAME_List_MaxAmt, List_MaxAmt); - } - - /** Get List price max Margin. - @return Maximum margin for a product - */ - public BigDecimal getList_MaxAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_List_MaxAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set List price min Margin. - @param List_MinAmt - Minimum margin for a product - */ - public void setList_MinAmt (BigDecimal List_MinAmt) - { - if (List_MinAmt == null) - throw new IllegalArgumentException ("List_MinAmt is mandatory."); - set_Value (COLUMNNAME_List_MinAmt, List_MinAmt); - } - - /** Get List price min Margin. - @return Minimum margin for a product - */ - public BigDecimal getList_MinAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_List_MinAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** List_Rounding AD_Reference_ID=155 */ - public static final int LIST_ROUNDING_AD_Reference_ID=155; - /** Whole Number .00 = 0 */ - public static final String LIST_ROUNDING_WholeNumber00 = "0"; - /** No Rounding = N */ - public static final String LIST_ROUNDING_NoRounding = "N"; - /** Quarter .25 .50 .75 = Q */ - public static final String LIST_ROUNDING_Quarter255075 = "Q"; - /** Dime .10, .20, .30, ... = D */ - public static final String LIST_ROUNDING_Dime102030 = "D"; - /** Nickel .05, .10, .15, ... = 5 */ - public static final String LIST_ROUNDING_Nickel051015 = "5"; - /** Ten 10.00, 20.00, .. = T */ - public static final String LIST_ROUNDING_Ten10002000 = "T"; - /** Currency Precision = C */ - public static final String LIST_ROUNDING_CurrencyPrecision = "C"; - /** Ending in 9/5 = 9 */ - public static final String LIST_ROUNDING_EndingIn95 = "9"; - /** Set List price Rounding. - @param List_Rounding - Rounding rule for final list price - */ - public void setList_Rounding (String List_Rounding) - { - if (List_Rounding == null) throw new IllegalArgumentException ("List_Rounding is mandatory"); - if (List_Rounding.equals("0") || List_Rounding.equals("N") || List_Rounding.equals("Q") || List_Rounding.equals("D") || List_Rounding.equals("5") || List_Rounding.equals("T") || List_Rounding.equals("C") || List_Rounding.equals("9")); else throw new IllegalArgumentException ("List_Rounding Invalid value - " + List_Rounding + " - Reference_ID=155 - 0 - N - Q - D - 5 - T - C - 9"); - if (List_Rounding.length() > 1) - { - log.warning("Length > 1 - truncated"); - List_Rounding = List_Rounding.substring(0, 1); - } - set_Value (COLUMNNAME_List_Rounding, List_Rounding); - } - - /** Get List price Rounding. - @return Rounding rule for final list price - */ - public String getList_Rounding () - { - return (String)get_Value(COLUMNNAME_List_Rounding); - } - - /** Set Discount Pricelist. - @param M_DiscountSchemaLine_ID - Line of the pricelist trade discount schema - */ - public void setM_DiscountSchemaLine_ID (int M_DiscountSchemaLine_ID) - { - if (M_DiscountSchemaLine_ID < 1) - throw new IllegalArgumentException ("M_DiscountSchemaLine_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_DiscountSchemaLine_ID, Integer.valueOf(M_DiscountSchemaLine_ID)); - } - - /** Get Discount Pricelist. - @return Line of the pricelist trade discount schema - */ - public int getM_DiscountSchemaLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_DiscountSchemaLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_DiscountSchema getM_DiscountSchema() throws Exception - { - Class clazz = MTable.getClass(I_M_DiscountSchema.Table_Name); - I_M_DiscountSchema result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_DiscountSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_DiscountSchema_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Discount Schema. - @param M_DiscountSchema_ID - Schema to calculate the trade discount percentage - */ - public void setM_DiscountSchema_ID (int M_DiscountSchema_ID) - { - if (M_DiscountSchema_ID < 1) - throw new IllegalArgumentException ("M_DiscountSchema_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_DiscountSchema_ID, Integer.valueOf(M_DiscountSchema_ID)); - } - - /** Get Discount Schema. - @return Schema to calculate the trade discount percentage - */ - public int getM_DiscountSchema_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_DiscountSchema_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Product_Category getM_Product_Category() throws Exception - { - Class clazz = MTable.getClass(I_M_Product_Category.Table_Name); - I_M_Product_Category result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Product_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_Category_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Product Category. - @param M_Product_Category_ID - Category of a Product - */ - public void setM_Product_Category_ID (int M_Product_Category_ID) - { - if (M_Product_Category_ID < 1) - set_Value (COLUMNNAME_M_Product_Category_ID, null); - else - set_Value (COLUMNNAME_M_Product_Category_ID, Integer.valueOf(M_Product_Category_ID)); - } - - /** Get Product Category. - @return Category of a Product - */ - public int getM_Product_Category_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Category_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Product getM_Product() throws Exception - { - Class clazz = MTable.getClass(I_M_Product.Table_Name); - I_M_Product result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - set_Value (COLUMNNAME_M_Product_ID, null); - else - set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Sequence. - @param SeqNo - Method of ordering records; lowest number comes first - */ - public void setSeqNo (int SeqNo) - { - set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); - } - - /** Get Sequence. - @return Method of ordering records; lowest number comes first - */ - public int getSeqNo () - { - Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getSeqNo())); - } - - /** Set Standard price Surcharge Amount. - @param Std_AddAmt - Amount added to a price as a surcharge - */ - public void setStd_AddAmt (BigDecimal Std_AddAmt) - { - if (Std_AddAmt == null) - throw new IllegalArgumentException ("Std_AddAmt is mandatory."); - set_Value (COLUMNNAME_Std_AddAmt, Std_AddAmt); - } - - /** Get Standard price Surcharge Amount. - @return Amount added to a price as a surcharge - */ - public BigDecimal getStd_AddAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Std_AddAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Std_Base AD_Reference_ID=194 */ - public static final int STD_BASE_AD_Reference_ID=194; - /** List Price = L */ - public static final String STD_BASE_ListPrice = "L"; - /** Standard Price = S */ - public static final String STD_BASE_StandardPrice = "S"; - /** Limit (PO) Price = X */ - public static final String STD_BASE_LimitPOPrice = "X"; - /** Fixed Price = F */ - public static final String STD_BASE_FixedPrice = "F"; - /** Set Standard price Base. - @param Std_Base - Base price for calculating new standard price - */ - public void setStd_Base (String Std_Base) - { - if (Std_Base == null) throw new IllegalArgumentException ("Std_Base is mandatory"); - if (Std_Base.equals("L") || Std_Base.equals("S") || Std_Base.equals("X") || Std_Base.equals("F")); else throw new IllegalArgumentException ("Std_Base Invalid value - " + Std_Base + " - Reference_ID=194 - L - S - X - F"); - if (Std_Base.length() > 1) - { - log.warning("Length > 1 - truncated"); - Std_Base = Std_Base.substring(0, 1); - } - set_Value (COLUMNNAME_Std_Base, Std_Base); - } - - /** Get Standard price Base. - @return Base price for calculating new standard price - */ - public String getStd_Base () - { - return (String)get_Value(COLUMNNAME_Std_Base); - } - - /** Set Standard price Discount %. - @param Std_Discount - Discount percentage to subtract from base price - */ - public void setStd_Discount (BigDecimal Std_Discount) - { - if (Std_Discount == null) - throw new IllegalArgumentException ("Std_Discount is mandatory."); - set_Value (COLUMNNAME_Std_Discount, Std_Discount); - } - - /** Get Standard price Discount %. - @return Discount percentage to subtract from base price - */ - public BigDecimal getStd_Discount () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Std_Discount); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Fixed Standard Price. - @param Std_Fixed - Fixed Standard Price (not calculated) - */ - public void setStd_Fixed (BigDecimal Std_Fixed) - { - set_Value (COLUMNNAME_Std_Fixed, Std_Fixed); - } - - /** Get Fixed Standard Price. - @return Fixed Standard Price (not calculated) - */ - public BigDecimal getStd_Fixed () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Std_Fixed); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Standard max Margin. - @param Std_MaxAmt - Maximum margin allowed for a product - */ - public void setStd_MaxAmt (BigDecimal Std_MaxAmt) - { - if (Std_MaxAmt == null) - throw new IllegalArgumentException ("Std_MaxAmt is mandatory."); - set_Value (COLUMNNAME_Std_MaxAmt, Std_MaxAmt); - } - - /** Get Standard max Margin. - @return Maximum margin allowed for a product - */ - public BigDecimal getStd_MaxAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Std_MaxAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Standard price min Margin. - @param Std_MinAmt - Minimum margin allowed for a product - */ - public void setStd_MinAmt (BigDecimal Std_MinAmt) - { - if (Std_MinAmt == null) - throw new IllegalArgumentException ("Std_MinAmt is mandatory."); - set_Value (COLUMNNAME_Std_MinAmt, Std_MinAmt); - } - - /** Get Standard price min Margin. - @return Minimum margin allowed for a product - */ - public BigDecimal getStd_MinAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Std_MinAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Std_Rounding AD_Reference_ID=155 */ - public static final int STD_ROUNDING_AD_Reference_ID=155; - /** Whole Number .00 = 0 */ - public static final String STD_ROUNDING_WholeNumber00 = "0"; - /** No Rounding = N */ - public static final String STD_ROUNDING_NoRounding = "N"; - /** Quarter .25 .50 .75 = Q */ - public static final String STD_ROUNDING_Quarter255075 = "Q"; - /** Dime .10, .20, .30, ... = D */ - public static final String STD_ROUNDING_Dime102030 = "D"; - /** Nickel .05, .10, .15, ... = 5 */ - public static final String STD_ROUNDING_Nickel051015 = "5"; - /** Ten 10.00, 20.00, .. = T */ - public static final String STD_ROUNDING_Ten10002000 = "T"; - /** Currency Precision = C */ - public static final String STD_ROUNDING_CurrencyPrecision = "C"; - /** Ending in 9/5 = 9 */ - public static final String STD_ROUNDING_EndingIn95 = "9"; - /** Set Standard price Rounding. - @param Std_Rounding - Rounding rule for calculated price - */ - public void setStd_Rounding (String Std_Rounding) - { - if (Std_Rounding == null) throw new IllegalArgumentException ("Std_Rounding is mandatory"); - if (Std_Rounding.equals("0") || Std_Rounding.equals("N") || Std_Rounding.equals("Q") || Std_Rounding.equals("D") || Std_Rounding.equals("5") || Std_Rounding.equals("T") || Std_Rounding.equals("C") || Std_Rounding.equals("9")); else throw new IllegalArgumentException ("Std_Rounding Invalid value - " + Std_Rounding + " - Reference_ID=155 - 0 - N - Q - D - 5 - T - C - 9"); - if (Std_Rounding.length() > 1) - { - log.warning("Length > 1 - truncated"); - Std_Rounding = Std_Rounding.substring(0, 1); - } - set_Value (COLUMNNAME_Std_Rounding, Std_Rounding); - } - - /** Get Standard price Rounding. - @return Rounding rule for calculated price - */ - public String getStd_Rounding () - { - return (String)get_Value(COLUMNNAME_Std_Rounding); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_DistributionList.java b/base/src/org/compiere/model/X_M_DistributionList.java index 023fd4bebc..f9cc322b8c 100644 --- a/base/src/org/compiere/model/X_M_DistributionList.java +++ b/base/src/org/compiere/model/X_M_DistributionList.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_DistributionList * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_DistributionList extends PO implements I_M_DistributionList, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_DistributionListLine.java b/base/src/org/compiere/model/X_M_DistributionListLine.java index 925f30726c..43f85e2727 100644 --- a/base/src/org/compiere/model/X_M_DistributionListLine.java +++ b/base/src/org/compiere/model/X_M_DistributionListLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_DistributionListLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_DistributionListLine extends PO implements I_M_DistributionListLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_DistributionRun.java b/base/src/org/compiere/model/X_M_DistributionRun.java index 7661d55d7e..e8452732d5 100644 --- a/base/src/org/compiere/model/X_M_DistributionRun.java +++ b/base/src/org/compiere/model/X_M_DistributionRun.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_DistributionRun * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_DistributionRun extends PO implements I_M_DistributionRun, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_DistributionRunLine.java b/base/src/org/compiere/model/X_M_DistributionRunLine.java index b3f4de156e..2998b1b5f0 100644 --- a/base/src/org/compiere/model/X_M_DistributionRunLine.java +++ b/base/src/org/compiere/model/X_M_DistributionRunLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_DistributionRunLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_DistributionRunLine extends PO implements I_M_DistributionRunLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_EDI.java b/base/src/org/compiere/model/X_M_EDI.java index 5aec987210..d8c7e37711 100644 --- a/base/src/org/compiere/model/X_M_EDI.java +++ b/base/src/org/compiere/model/X_M_EDI.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_EDI * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_EDI extends PO implements I_M_EDI, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_EDI_Info.java b/base/src/org/compiere/model/X_M_EDI_Info.java index 52ea06b88b..13f92d9cd6 100644 --- a/base/src/org/compiere/model/X_M_EDI_Info.java +++ b/base/src/org/compiere/model/X_M_EDI_Info.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_EDI_Info * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_EDI_Info extends PO implements I_M_EDI_Info, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Freight.java b/base/src/org/compiere/model/X_M_Freight.java index 49006ddc7f..e16385eb41 100644 --- a/base/src/org/compiere/model/X_M_Freight.java +++ b/base/src/org/compiere/model/X_M_Freight.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Freight * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Freight extends PO implements I_M_Freight, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_FreightCategory.java b/base/src/org/compiere/model/X_M_FreightCategory.java index 6cde5c86bd..66d5d6c7c2 100644 --- a/base/src/org/compiere/model/X_M_FreightCategory.java +++ b/base/src/org/compiere/model/X_M_FreightCategory.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_FreightCategory * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_FreightCategory extends PO implements I_M_FreightCategory, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_InOutConfirm.java b/base/src/org/compiere/model/X_M_InOutConfirm.java index 9c7f240d15..6c7ae9d4d5 100644 --- a/base/src/org/compiere/model/X_M_InOutConfirm.java +++ b/base/src/org/compiere/model/X_M_InOutConfirm.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_InOutConfirm * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_InOutConfirm extends PO implements I_M_InOutConfirm, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_InOutLine.java b/base/src/org/compiere/model/X_M_InOutLine.java index 3114d2666a..034c5f2af2 100644 --- a/base/src/org/compiere/model/X_M_InOutLine.java +++ b/base/src/org/compiere/model/X_M_InOutLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_InOutLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_InOutLine extends PO implements I_M_InOutLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_InOutLineConfirm.java b/base/src/org/compiere/model/X_M_InOutLineConfirm.java index 13e7fc7d81..bc7590f647 100644 --- a/base/src/org/compiere/model/X_M_InOutLineConfirm.java +++ b/base/src/org/compiere/model/X_M_InOutLineConfirm.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_InOutLineConfirm * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_InOutLineConfirm extends PO implements I_M_InOutLineConfirm, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_InOutLineMA.java b/base/src/org/compiere/model/X_M_InOutLineMA.java index 7c1c8726de..477769461e 100644 --- a/base/src/org/compiere/model/X_M_InOutLineMA.java +++ b/base/src/org/compiere/model/X_M_InOutLineMA.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_InOutLineMA * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_InOutLineMA extends PO implements I_M_InOutLineMA, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Inventory.java b/base/src/org/compiere/model/X_M_Inventory.java deleted file mode 100644 index 0b5b0bad13..0000000000 --- a/base/src/org/compiere/model/X_M_Inventory.java +++ /dev/null @@ -1,753 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for M_Inventory - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_Inventory extends PO implements I_M_Inventory, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_M_Inventory (Properties ctx, int M_Inventory_ID, String trxName) - { - super (ctx, M_Inventory_ID, trxName); - /** if (M_Inventory_ID == 0) - { - setC_DocType_ID (0); - setDocAction (null); -// CO - setDocStatus (null); -// DR - setDocumentNo (null); - setIsApproved (false); - setM_Inventory_ID (0); - setM_Warehouse_ID (0); - setMovementDate (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setPosted (false); - setProcessed (false); - } */ - } - - /** Load Constructor */ - public X_M_Inventory (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_M_Inventory[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_OrgTrx_ID AD_Reference_ID=130 */ - public static final int AD_ORGTRX_ID_AD_Reference_ID=130; - /** Set Trx Organization. - @param AD_OrgTrx_ID - Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) - { - if (AD_OrgTrx_ID < 1) - set_Value (COLUMNNAME_AD_OrgTrx_ID, null); - else - set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); - } - - /** Get Trx Organization. - @return Performing or initiating organization - */ - public int getAD_OrgTrx_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Approval Amount. - @param ApprovalAmt - Document Approval Amount - */ - public void setApprovalAmt (BigDecimal ApprovalAmt) - { - set_Value (COLUMNNAME_ApprovalAmt, ApprovalAmt); - } - - /** Get Approval Amount. - @return Document Approval Amount - */ - public BigDecimal getApprovalAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ApprovalAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - public I_C_Activity getC_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID < 1) - set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Campaign getC_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID < 1) - set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 0) - throw new IllegalArgumentException ("C_DocType_ID is mandatory."); - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Project getC_Project() throws Exception - { - Class clazz = MTable.getClass(I_C_Project.Table_Name); - I_C_Project result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID < 1) - set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** DocAction AD_Reference_ID=135 */ - public static final int DOCACTION_AD_Reference_ID=135; - /** Complete = CO */ - public static final String DOCACTION_Complete = "CO"; - /** Approve = AP */ - public static final String DOCACTION_Approve = "AP"; - /** Reject = RJ */ - public static final String DOCACTION_Reject = "RJ"; - /** Post = PO */ - public static final String DOCACTION_Post = "PO"; - /** Void = VO */ - public static final String DOCACTION_Void = "VO"; - /** Close = CL */ - public static final String DOCACTION_Close = "CL"; - /** Reverse - Correct = RC */ - public static final String DOCACTION_Reverse_Correct = "RC"; - /** Reverse - Accrual = RA */ - public static final String DOCACTION_Reverse_Accrual = "RA"; - /** Invalidate = IN */ - public static final String DOCACTION_Invalidate = "IN"; - /** Re-activate = RE */ - public static final String DOCACTION_Re_Activate = "RE"; - /** = -- */ - public static final String DOCACTION_None = "--"; - /** Prepare = PR */ - public static final String DOCACTION_Prepare = "PR"; - /** Unlock = XL */ - public static final String DOCACTION_Unlock = "XL"; - /** Wait Complete = WC */ - public static final String DOCACTION_WaitComplete = "WC"; - /** Set Document Action. - @param DocAction - The targeted status of the document - */ - public void setDocAction (String DocAction) - { - if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); - 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("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC"); - if (DocAction.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocAction = DocAction.substring(0, 2); - } - set_Value (COLUMNNAME_DocAction, DocAction); - } - - /** Get Document Action. - @return The targeted status of the document - */ - public String getDocAction () - { - return (String)get_Value(COLUMNNAME_DocAction); - } - - /** DocStatus AD_Reference_ID=131 */ - public static final int DOCSTATUS_AD_Reference_ID=131; - /** Drafted = DR */ - public static final String DOCSTATUS_Drafted = "DR"; - /** Completed = CO */ - public static final String DOCSTATUS_Completed = "CO"; - /** Approved = AP */ - public static final String DOCSTATUS_Approved = "AP"; - /** Not Approved = NA */ - public static final String DOCSTATUS_NotApproved = "NA"; - /** Voided = VO */ - public static final String DOCSTATUS_Voided = "VO"; - /** Invalid = IN */ - public static final String DOCSTATUS_Invalid = "IN"; - /** Reversed = RE */ - public static final String DOCSTATUS_Reversed = "RE"; - /** Closed = CL */ - public static final String DOCSTATUS_Closed = "CL"; - /** Unknown = ?? */ - public static final String DOCSTATUS_Unknown = "??"; - /** In Progress = IP */ - public static final String DOCSTATUS_InProgress = "IP"; - /** Waiting Payment = WP */ - public static final String DOCSTATUS_WaitingPayment = "WP"; - /** Waiting Confirmation = WC */ - public static final String DOCSTATUS_WaitingConfirmation = "WC"; - /** Set Document Status. - @param DocStatus - The current status of the document - */ - public void setDocStatus (String DocStatus) - { - if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); - if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); - if (DocStatus.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocStatus = DocStatus.substring(0, 2); - } - set_Value (COLUMNNAME_DocStatus, DocStatus); - } - - /** Get Document Status. - @return The current status of the document - */ - public String getDocStatus () - { - return (String)get_Value(COLUMNNAME_DocStatus); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - if (DocumentNo == null) - throw new IllegalArgumentException ("DocumentNo is mandatory."); - - if (DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); - } - set_Value (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getDocumentNo()); - } - - /** Set Generate List. - @param GenerateList - Generate List - */ - public void setGenerateList (String GenerateList) - { - - if (GenerateList != null && GenerateList.length() > 1) - { - log.warning("Length > 1 - truncated"); - GenerateList = GenerateList.substring(0, 1); - } - set_Value (COLUMNNAME_GenerateList, GenerateList); - } - - /** Get Generate List. - @return Generate List - */ - public String getGenerateList () - { - return (String)get_Value(COLUMNNAME_GenerateList); - } - - /** Set Approved. - @param IsApproved - Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved) - { - set_Value (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); - } - - /** Get Approved. - @return Indicates if this document requires approval - */ - public boolean isApproved () - { - Object oo = get_Value(COLUMNNAME_IsApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Phys.Inventory. - @param M_Inventory_ID - Parameters for a Physical Inventory - */ - public void setM_Inventory_ID (int M_Inventory_ID) - { - if (M_Inventory_ID < 1) - throw new IllegalArgumentException ("M_Inventory_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Inventory_ID, Integer.valueOf(M_Inventory_ID)); - } - - /** Get Phys.Inventory. - @return Parameters for a Physical Inventory - */ - public int getM_Inventory_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Inventory_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_PerpetualInv getM_PerpetualInv() throws Exception - { - Class clazz = MTable.getClass(I_M_PerpetualInv.Table_Name); - I_M_PerpetualInv result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_PerpetualInv)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PerpetualInv_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Perpetual Inventory. - @param M_PerpetualInv_ID - Rules for generating physical inventory - */ - public void setM_PerpetualInv_ID (int M_PerpetualInv_ID) - { - if (M_PerpetualInv_ID < 1) - set_ValueNoCheck (COLUMNNAME_M_PerpetualInv_ID, null); - else - set_ValueNoCheck (COLUMNNAME_M_PerpetualInv_ID, Integer.valueOf(M_PerpetualInv_ID)); - } - - /** Get Perpetual Inventory. - @return Rules for generating physical inventory - */ - public int getM_PerpetualInv_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_PerpetualInv_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Warehouse getM_Warehouse() throws Exception - { - Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); - I_M_Warehouse result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Warehouse. - @param M_Warehouse_ID - Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID) - { - if (M_Warehouse_ID < 1) - throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); - set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); - } - - /** 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 Movement Date. - @param MovementDate - Date a product was moved in or out of inventory - */ - public void setMovementDate (Timestamp MovementDate) - { - if (MovementDate == null) - throw new IllegalArgumentException ("MovementDate is mandatory."); - set_Value (COLUMNNAME_MovementDate, MovementDate); - } - - /** Get Movement Date. - @return Date a product was moved in or out of inventory - */ - public Timestamp getMovementDate () - { - return (Timestamp)get_Value(COLUMNNAME_MovementDate); - } - - /** Set Posted. - @param Posted - Posting status - */ - public void setPosted (boolean Posted) - { - set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); - } - - /** Get Posted. - @return Posting status - */ - public boolean isPosted () - { - Object oo = get_Value(COLUMNNAME_Posted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** 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; - } - - /** Set Update Quantities. - @param UpdateQty Update Quantities */ - public void setUpdateQty (String UpdateQty) - { - - if (UpdateQty != null && UpdateQty.length() > 1) - { - log.warning("Length > 1 - truncated"); - UpdateQty = UpdateQty.substring(0, 1); - } - set_Value (COLUMNNAME_UpdateQty, UpdateQty); - } - - /** Get Update Quantities. - @return Update Quantities */ - public String getUpdateQty () - { - return (String)get_Value(COLUMNNAME_UpdateQty); - } - - /** User1_ID AD_Reference_ID=134 */ - public static final int USER1_ID_AD_Reference_ID=134; - /** Set User List 1. - @param User1_ID - User defined list element #1 - */ - public void setUser1_ID (int User1_ID) - { - if (User1_ID < 1) - set_Value (COLUMNNAME_User1_ID, null); - else - set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); - } - - /** Get User List 1. - @return User defined list element #1 - */ - public int getUser1_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** User2_ID AD_Reference_ID=137 */ - public static final int USER2_ID_AD_Reference_ID=137; - /** Set User List 2. - @param User2_ID - User defined list element #2 - */ - public void setUser2_ID (int User2_ID) - { - if (User2_ID < 1) - set_Value (COLUMNNAME_User2_ID, null); - else - set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); - } - - /** Get User List 2. - @return User defined list element #2 - */ - public int getUser2_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); - if (ii == null) - return 0; - return ii.intValue(); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_InventoryLine.java b/base/src/org/compiere/model/X_M_InventoryLine.java index 4b59091aba..bf8de01455 100644 --- a/base/src/org/compiere/model/X_M_InventoryLine.java +++ b/base/src/org/compiere/model/X_M_InventoryLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_InventoryLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_InventoryLine extends PO implements I_M_InventoryLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_InventoryLineMA.java b/base/src/org/compiere/model/X_M_InventoryLineMA.java index 8baa6b7ae3..074c5882de 100644 --- a/base/src/org/compiere/model/X_M_InventoryLineMA.java +++ b/base/src/org/compiere/model/X_M_InventoryLineMA.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_InventoryLineMA * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_InventoryLineMA extends PO implements I_M_InventoryLineMA, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Locator.java b/base/src/org/compiere/model/X_M_Locator.java index a1aa7d838b..d33b4b13fc 100644 --- a/base/src/org/compiere/model/X_M_Locator.java +++ b/base/src/org/compiere/model/X_M_Locator.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Locator * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Locator extends PO implements I_M_Locator, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Lot.java b/base/src/org/compiere/model/X_M_Lot.java index b59d4fb978..3f292eaf6d 100644 --- a/base/src/org/compiere/model/X_M_Lot.java +++ b/base/src/org/compiere/model/X_M_Lot.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Lot * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Lot extends PO implements I_M_Lot, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_LotCtl.java b/base/src/org/compiere/model/X_M_LotCtl.java index eeefd9adbc..e220828ec7 100644 --- a/base/src/org/compiere/model/X_M_LotCtl.java +++ b/base/src/org/compiere/model/X_M_LotCtl.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_LotCtl * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_LotCtl extends PO implements I_M_LotCtl, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_LotCtlExclude.java b/base/src/org/compiere/model/X_M_LotCtlExclude.java index 67527184cf..be33f0149e 100644 --- a/base/src/org/compiere/model/X_M_LotCtlExclude.java +++ b/base/src/org/compiere/model/X_M_LotCtlExclude.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for M_LotCtlExclude * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_LotCtlExclude extends PO implements I_M_LotCtlExclude, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_MatchInv.java b/base/src/org/compiere/model/X_M_MatchInv.java index 89cb1ebb28..f4d244758a 100644 --- a/base/src/org/compiere/model/X_M_MatchInv.java +++ b/base/src/org/compiere/model/X_M_MatchInv.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_MatchInv * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_MatchInv extends PO implements I_M_MatchInv, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_MatchPO.java b/base/src/org/compiere/model/X_M_MatchPO.java index 0aedc4431e..e744d46f1f 100644 --- a/base/src/org/compiere/model/X_M_MatchPO.java +++ b/base/src/org/compiere/model/X_M_MatchPO.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_MatchPO * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_MatchPO extends PO implements I_M_MatchPO, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Movement.java b/base/src/org/compiere/model/X_M_Movement.java deleted file mode 100644 index 3e4eea7df1..0000000000 --- a/base/src/org/compiere/model/X_M_Movement.java +++ /dev/null @@ -1,674 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for M_Movement - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_Movement extends PO implements I_M_Movement, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_M_Movement (Properties ctx, int M_Movement_ID, String trxName) - { - super (ctx, M_Movement_ID, trxName); - /** if (M_Movement_ID == 0) - { - setC_DocType_ID (0); - setDocAction (null); -// CO - setDocStatus (null); -// DR - setDocumentNo (null); - setIsApproved (false); - setIsInTransit (false); - setM_Movement_ID (0); - setMovementDate (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setPosted (false); - setProcessed (false); - } */ - } - - /** Load Constructor */ - public X_M_Movement (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_M_Movement[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** AD_OrgTrx_ID AD_Reference_ID=130 */ - public static final int AD_ORGTRX_ID_AD_Reference_ID=130; - /** Set Trx Organization. - @param AD_OrgTrx_ID - Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) - { - if (AD_OrgTrx_ID < 1) - set_Value (COLUMNNAME_AD_OrgTrx_ID, null); - else - set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); - } - - /** Get Trx Organization. - @return Performing or initiating organization - */ - public int getAD_OrgTrx_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Approval Amount. - @param ApprovalAmt - Document Approval Amount - */ - public void setApprovalAmt (BigDecimal ApprovalAmt) - { - set_Value (COLUMNNAME_ApprovalAmt, ApprovalAmt); - } - - /** Get Approval Amount. - @return Document Approval Amount - */ - public BigDecimal getApprovalAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ApprovalAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - public I_C_Activity getC_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID < 1) - set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Campaign getC_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID < 1) - set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 0) - throw new IllegalArgumentException ("C_DocType_ID is mandatory."); - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Project getC_Project() throws Exception - { - Class clazz = MTable.getClass(I_C_Project.Table_Name); - I_C_Project result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID < 1) - set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Date received. - @param DateReceived - Date a product was received - */ - public void setDateReceived (Timestamp DateReceived) - { - set_Value (COLUMNNAME_DateReceived, DateReceived); - } - - /** Get Date received. - @return Date a product was received - */ - public Timestamp getDateReceived () - { - return (Timestamp)get_Value(COLUMNNAME_DateReceived); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** DocAction AD_Reference_ID=135 */ - public static final int DOCACTION_AD_Reference_ID=135; - /** Complete = CO */ - public static final String DOCACTION_Complete = "CO"; - /** Approve = AP */ - public static final String DOCACTION_Approve = "AP"; - /** Reject = RJ */ - public static final String DOCACTION_Reject = "RJ"; - /** Post = PO */ - public static final String DOCACTION_Post = "PO"; - /** Void = VO */ - public static final String DOCACTION_Void = "VO"; - /** Close = CL */ - public static final String DOCACTION_Close = "CL"; - /** Reverse - Correct = RC */ - public static final String DOCACTION_Reverse_Correct = "RC"; - /** Reverse - Accrual = RA */ - public static final String DOCACTION_Reverse_Accrual = "RA"; - /** Invalidate = IN */ - public static final String DOCACTION_Invalidate = "IN"; - /** Re-activate = RE */ - public static final String DOCACTION_Re_Activate = "RE"; - /** = -- */ - public static final String DOCACTION_None = "--"; - /** Prepare = PR */ - public static final String DOCACTION_Prepare = "PR"; - /** Unlock = XL */ - public static final String DOCACTION_Unlock = "XL"; - /** Wait Complete = WC */ - public static final String DOCACTION_WaitComplete = "WC"; - /** Set Document Action. - @param DocAction - The targeted status of the document - */ - public void setDocAction (String DocAction) - { - if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); - 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("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC"); - if (DocAction.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocAction = DocAction.substring(0, 2); - } - set_Value (COLUMNNAME_DocAction, DocAction); - } - - /** Get Document Action. - @return The targeted status of the document - */ - public String getDocAction () - { - return (String)get_Value(COLUMNNAME_DocAction); - } - - /** DocStatus AD_Reference_ID=131 */ - public static final int DOCSTATUS_AD_Reference_ID=131; - /** Drafted = DR */ - public static final String DOCSTATUS_Drafted = "DR"; - /** Completed = CO */ - public static final String DOCSTATUS_Completed = "CO"; - /** Approved = AP */ - public static final String DOCSTATUS_Approved = "AP"; - /** Not Approved = NA */ - public static final String DOCSTATUS_NotApproved = "NA"; - /** Voided = VO */ - public static final String DOCSTATUS_Voided = "VO"; - /** Invalid = IN */ - public static final String DOCSTATUS_Invalid = "IN"; - /** Reversed = RE */ - public static final String DOCSTATUS_Reversed = "RE"; - /** Closed = CL */ - public static final String DOCSTATUS_Closed = "CL"; - /** Unknown = ?? */ - public static final String DOCSTATUS_Unknown = "??"; - /** In Progress = IP */ - public static final String DOCSTATUS_InProgress = "IP"; - /** Waiting Payment = WP */ - public static final String DOCSTATUS_WaitingPayment = "WP"; - /** Waiting Confirmation = WC */ - public static final String DOCSTATUS_WaitingConfirmation = "WC"; - /** Set Document Status. - @param DocStatus - The current status of the document - */ - public void setDocStatus (String DocStatus) - { - if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); - if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); - if (DocStatus.length() > 2) - { - log.warning("Length > 2 - truncated"); - DocStatus = DocStatus.substring(0, 2); - } - set_Value (COLUMNNAME_DocStatus, DocStatus); - } - - /** Get Document Status. - @return The current status of the document - */ - public String getDocStatus () - { - return (String)get_Value(COLUMNNAME_DocStatus); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - if (DocumentNo == null) - throw new IllegalArgumentException ("DocumentNo is mandatory."); - - if (DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); - } - set_Value (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getDocumentNo()); - } - - /** Set Approved. - @param IsApproved - Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved) - { - set_Value (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); - } - - /** Get Approved. - @return Indicates if this document requires approval - */ - public boolean isApproved () - { - Object oo = get_Value(COLUMNNAME_IsApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set In Transit. - @param IsInTransit - Movement is in transit - */ - public void setIsInTransit (boolean IsInTransit) - { - set_Value (COLUMNNAME_IsInTransit, Boolean.valueOf(IsInTransit)); - } - - /** Get In Transit. - @return Movement is in transit - */ - public boolean isInTransit () - { - Object oo = get_Value(COLUMNNAME_IsInTransit); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Inventory Move. - @param M_Movement_ID - Movement of Inventory - */ - public void setM_Movement_ID (int M_Movement_ID) - { - if (M_Movement_ID < 1) - throw new IllegalArgumentException ("M_Movement_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Movement_ID, Integer.valueOf(M_Movement_ID)); - } - - /** Get Inventory Move. - @return Movement of Inventory - */ - public int getM_Movement_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Movement_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Movement Date. - @param MovementDate - Date a product was moved in or out of inventory - */ - public void setMovementDate (Timestamp MovementDate) - { - if (MovementDate == null) - throw new IllegalArgumentException ("MovementDate is mandatory."); - set_Value (COLUMNNAME_MovementDate, MovementDate); - } - - /** Get Movement Date. - @return Date a product was moved in or out of inventory - */ - public Timestamp getMovementDate () - { - return (Timestamp)get_Value(COLUMNNAME_MovementDate); - } - - /** Set Posted. - @param Posted - Posting status - */ - public void setPosted (boolean Posted) - { - set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); - } - - /** Get Posted. - @return Posting status - */ - public boolean isPosted () - { - Object oo = get_Value(COLUMNNAME_Posted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** 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; - } - - /** User1_ID AD_Reference_ID=134 */ - public static final int USER1_ID_AD_Reference_ID=134; - /** Set User List 1. - @param User1_ID - User defined list element #1 - */ - public void setUser1_ID (int User1_ID) - { - if (User1_ID < 1) - set_Value (COLUMNNAME_User1_ID, null); - else - set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); - } - - /** Get User List 1. - @return User defined list element #1 - */ - public int getUser1_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** User2_ID AD_Reference_ID=137 */ - public static final int USER2_ID_AD_Reference_ID=137; - /** Set User List 2. - @param User2_ID - User defined list element #2 - */ - public void setUser2_ID (int User2_ID) - { - if (User2_ID < 1) - set_Value (COLUMNNAME_User2_ID, null); - else - set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); - } - - /** Get User List 2. - @return User defined list element #2 - */ - public int getUser2_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); - if (ii == null) - return 0; - return ii.intValue(); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_MovementConfirm.java b/base/src/org/compiere/model/X_M_MovementConfirm.java index 89fa94a00d..051066c474 100644 --- a/base/src/org/compiere/model/X_M_MovementConfirm.java +++ b/base/src/org/compiere/model/X_M_MovementConfirm.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_MovementConfirm * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_MovementConfirm extends PO implements I_M_MovementConfirm, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_MovementLine.java b/base/src/org/compiere/model/X_M_MovementLine.java deleted file mode 100644 index 876f7e8ab3..0000000000 --- a/base/src/org/compiere/model/X_M_MovementLine.java +++ /dev/null @@ -1,424 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for M_MovementLine - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_MovementLine extends PO implements I_M_MovementLine, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_M_MovementLine (Properties ctx, int M_MovementLine_ID, String trxName) - { - super (ctx, M_MovementLine_ID, trxName); - /** if (M_MovementLine_ID == 0) - { - setLine (0); -// @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_MovementLine WHERE M_Movement_ID=@M_Movement_ID@ - setM_AttributeSetInstance_ID (0); - setM_LocatorTo_ID (0); -// @M_LocatorTo_ID@ - setM_Locator_ID (0); -// @M_Locator_ID@ - setM_MovementLine_ID (0); - setM_Movement_ID (0); - setM_Product_ID (0); - setMovementQty (Env.ZERO); -// 1 - setProcessed (false); - setTargetQty (Env.ZERO); -// 0 - } */ - } - - /** Load Constructor */ - public X_M_MovementLine (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_M_MovementLine[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - /** Set Confirmed Quantity. - @param ConfirmedQty - Confirmation of a received quantity - */ - public void setConfirmedQty (BigDecimal ConfirmedQty) - { - set_Value (COLUMNNAME_ConfirmedQty, ConfirmedQty); - } - - /** Get Confirmed Quantity. - @return Confirmation of a received quantity - */ - public BigDecimal getConfirmedQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ConfirmedQty); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Line No. - @param Line - Unique line for this document - */ - public void setLine (int Line) - { - set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); - } - - /** Get Line No. - @return Unique line for this document - */ - public int getLine () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Line); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getLine())); - } - - /** Set Attribute Set Instance To. - @param M_AttributeSetInstanceTo_ID - Target Product Attribute Set Instance - */ - public void setM_AttributeSetInstanceTo_ID (int M_AttributeSetInstanceTo_ID) - { - if (M_AttributeSetInstanceTo_ID < 1) - set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstanceTo_ID, null); - else - set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstanceTo_ID, Integer.valueOf(M_AttributeSetInstanceTo_ID)); - } - - /** Get Attribute Set Instance To. - @return Target Product Attribute Set Instance - */ - public int getM_AttributeSetInstanceTo_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstanceTo_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Attribute Set Instance. - @param M_AttributeSetInstance_ID - Product Attribute Set Instance - */ - public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) - { - if (M_AttributeSetInstance_ID < 0) - throw new IllegalArgumentException ("M_AttributeSetInstance_ID is mandatory."); - set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); - } - - /** Get Attribute Set Instance. - @return Product Attribute Set Instance - */ - public int getM_AttributeSetInstance_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** M_LocatorTo_ID AD_Reference_ID=191 */ - public static final int M_LOCATORTO_ID_AD_Reference_ID=191; - /** Set Locator To. - @param M_LocatorTo_ID - Location inventory is moved to - */ - public void setM_LocatorTo_ID (int M_LocatorTo_ID) - { - if (M_LocatorTo_ID < 1) - throw new IllegalArgumentException ("M_LocatorTo_ID is mandatory."); - set_Value (COLUMNNAME_M_LocatorTo_ID, Integer.valueOf(M_LocatorTo_ID)); - } - - /** Get Locator To. - @return Location inventory is moved to - */ - public int getM_LocatorTo_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_LocatorTo_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Locator. - @param M_Locator_ID - Warehouse Locator - */ - public void setM_Locator_ID (int M_Locator_ID) - { - if (M_Locator_ID < 1) - throw new IllegalArgumentException ("M_Locator_ID is mandatory."); - set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID)); - } - - /** Get Locator. - @return Warehouse Locator - */ - public int getM_Locator_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Move Line. - @param M_MovementLine_ID - Inventory Move document Line - */ - public void setM_MovementLine_ID (int M_MovementLine_ID) - { - if (M_MovementLine_ID < 1) - throw new IllegalArgumentException ("M_MovementLine_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_MovementLine_ID, Integer.valueOf(M_MovementLine_ID)); - } - - /** Get Move Line. - @return Inventory Move document Line - */ - public int getM_MovementLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_MovementLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Movement getM_Movement() throws Exception - { - Class clazz = MTable.getClass(I_M_Movement.Table_Name); - I_M_Movement result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Movement)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Movement_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Inventory Move. - @param M_Movement_ID - Movement of Inventory - */ - public void setM_Movement_ID (int M_Movement_ID) - { - if (M_Movement_ID < 1) - throw new IllegalArgumentException ("M_Movement_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Movement_ID, Integer.valueOf(M_Movement_ID)); - } - - /** Get Inventory Move. - @return Movement of Inventory - */ - public int getM_Movement_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Movement_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** M_Product_ID AD_Reference_ID=171 */ - public static final int M_PRODUCT_ID_AD_Reference_ID=171; - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - throw new IllegalArgumentException ("M_Product_ID is mandatory."); - set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Movement Quantity. - @param MovementQty - Quantity of a product moved. - */ - public void setMovementQty (BigDecimal MovementQty) - { - if (MovementQty == null) - throw new IllegalArgumentException ("MovementQty is mandatory."); - set_Value (COLUMNNAME_MovementQty, MovementQty); - } - - /** Get Movement Quantity. - @return Quantity of a product moved. - */ - public BigDecimal getMovementQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MovementQty); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Scrapped Quantity. - @param ScrappedQty - The Quantity scrapped due to QA issues - */ - public void setScrappedQty (BigDecimal ScrappedQty) - { - set_Value (COLUMNNAME_ScrappedQty, ScrappedQty); - } - - /** Get Scrapped Quantity. - @return The Quantity scrapped due to QA issues - */ - public BigDecimal getScrappedQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ScrappedQty); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Target Quantity. - @param TargetQty - Target Movement Quantity - */ - public void setTargetQty (BigDecimal TargetQty) - { - if (TargetQty == null) - throw new IllegalArgumentException ("TargetQty is mandatory."); - set_Value (COLUMNNAME_TargetQty, TargetQty); - } - - /** Get Target Quantity. - @return Target Movement Quantity - */ - public BigDecimal getTargetQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TargetQty); - if (bd == null) - return Env.ZERO; - return bd; - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_MovementLineConfirm.java b/base/src/org/compiere/model/X_M_MovementLineConfirm.java index 424e2f538f..4bc73199ee 100644 --- a/base/src/org/compiere/model/X_M_MovementLineConfirm.java +++ b/base/src/org/compiere/model/X_M_MovementLineConfirm.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_MovementLineConfirm * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_MovementLineConfirm extends PO implements I_M_MovementLineConfirm, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_MovementLineMA.java b/base/src/org/compiere/model/X_M_MovementLineMA.java index 151380ff68..bec04859ce 100644 --- a/base/src/org/compiere/model/X_M_MovementLineMA.java +++ b/base/src/org/compiere/model/X_M_MovementLineMA.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_MovementLineMA * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_MovementLineMA extends PO implements I_M_MovementLineMA, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_OperationResource.java b/base/src/org/compiere/model/X_M_OperationResource.java index 640d7e786e..d9df2aacbd 100644 --- a/base/src/org/compiere/model/X_M_OperationResource.java +++ b/base/src/org/compiere/model/X_M_OperationResource.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_OperationResource * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_OperationResource extends PO implements I_M_OperationResource, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Package.java b/base/src/org/compiere/model/X_M_Package.java index f2661cdb32..a53bbe1194 100644 --- a/base/src/org/compiere/model/X_M_Package.java +++ b/base/src/org/compiere/model/X_M_Package.java @@ -25,7 +25,7 @@ import java.util.logging.Level; /** Generated Model for M_Package * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Package extends PO implements I_M_Package, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_PackageLine.java b/base/src/org/compiere/model/X_M_PackageLine.java index 9a160ee404..cd5e611a5d 100644 --- a/base/src/org/compiere/model/X_M_PackageLine.java +++ b/base/src/org/compiere/model/X_M_PackageLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_PackageLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_PackageLine extends PO implements I_M_PackageLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_PerpetualInv.java b/base/src/org/compiere/model/X_M_PerpetualInv.java index 6f2e3128b9..92262992b3 100644 --- a/base/src/org/compiere/model/X_M_PerpetualInv.java +++ b/base/src/org/compiere/model/X_M_PerpetualInv.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_PerpetualInv * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_PerpetualInv extends PO implements I_M_PerpetualInv, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_PriceList.java b/base/src/org/compiere/model/X_M_PriceList.java index 1e0fb0b666..61ac3e7f61 100644 --- a/base/src/org/compiere/model/X_M_PriceList.java +++ b/base/src/org/compiere/model/X_M_PriceList.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_PriceList * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_PriceList extends PO implements I_M_PriceList, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_PriceList_Version.java b/base/src/org/compiere/model/X_M_PriceList_Version.java index 5478883095..c16e019914 100644 --- a/base/src/org/compiere/model/X_M_PriceList_Version.java +++ b/base/src/org/compiere/model/X_M_PriceList_Version.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_PriceList_Version * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_PriceList_Version extends PO implements I_M_PriceList_Version, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Product.java b/base/src/org/compiere/model/X_M_Product.java deleted file mode 100644 index 7d5afab573..0000000000 --- a/base/src/org/compiere/model/X_M_Product.java +++ /dev/null @@ -1,1420 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for M_Product - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_Product extends PO implements I_M_Product, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_M_Product (Properties ctx, int M_Product_ID, String trxName) - { - super (ctx, M_Product_ID, trxName); - /** if (M_Product_ID == 0) - { - setC_TaxCategory_ID (0); - setC_UOM_ID (0); - setIsBOM (false); -// N - setIsDropShip (false); - setIsExcludeAutoDelivery (false); -// N - setIsInvoicePrintDetails (false); - setIsPickListPrintDetails (false); - setIsPurchased (true); -// Y - setIsSelfService (true); -// Y - setIsSold (true); -// Y - setIsStocked (true); -// Y - setIsSummary (false); - setIsVerified (false); -// N - setIsWebStoreFeatured (false); - setM_AttributeSetInstance_ID (0); - setM_Product_Category_ID (0); - setM_Product_ID (0); - setName (null); - setProductType (null); -// I - setValue (null); - } */ - } - - /** Load Constructor */ - public X_M_Product (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() - { - StringBuffer sb = new StringBuffer ("X_M_Product[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_C_RevenueRecognition getC_RevenueRecognition() throws Exception - { - Class clazz = MTable.getClass(I_C_RevenueRecognition.Table_Name); - I_C_RevenueRecognition result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_RevenueRecognition)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_RevenueRecognition_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Revenue Recognition. - @param C_RevenueRecognition_ID - Method for recording revenue - */ - public void setC_RevenueRecognition_ID (int C_RevenueRecognition_ID) - { - if (C_RevenueRecognition_ID < 1) - set_Value (COLUMNNAME_C_RevenueRecognition_ID, null); - else - set_Value (COLUMNNAME_C_RevenueRecognition_ID, Integer.valueOf(C_RevenueRecognition_ID)); - } - - /** Get Revenue Recognition. - @return Method for recording revenue - */ - public int getC_RevenueRecognition_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecognition_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Subscription Type. - @param C_SubscriptionType_ID - Type of subscription - */ - public void setC_SubscriptionType_ID (int C_SubscriptionType_ID) - { - if (C_SubscriptionType_ID < 1) - set_Value (COLUMNNAME_C_SubscriptionType_ID, null); - else - set_Value (COLUMNNAME_C_SubscriptionType_ID, Integer.valueOf(C_SubscriptionType_ID)); - } - - /** Get Subscription Type. - @return Type of subscription - */ - public int getC_SubscriptionType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_SubscriptionType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_TaxCategory getC_TaxCategory() throws Exception - { - Class clazz = MTable.getClass(I_C_TaxCategory.Table_Name); - I_C_TaxCategory result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_TaxCategory)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_TaxCategory_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Tax Category. - @param C_TaxCategory_ID - Tax Category - */ - public void setC_TaxCategory_ID (int C_TaxCategory_ID) - { - if (C_TaxCategory_ID < 1) - throw new IllegalArgumentException ("C_TaxCategory_ID is mandatory."); - set_Value (COLUMNNAME_C_TaxCategory_ID, Integer.valueOf(C_TaxCategory_ID)); - } - - /** Get Tax Category. - @return Tax Category - */ - public int getC_TaxCategory_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxCategory_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_UOM getC_UOM() throws Exception - { - Class clazz = MTable.getClass(I_C_UOM.Table_Name); - I_C_UOM result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set UOM. - @param C_UOM_ID - Unit of Measure - */ - public void setC_UOM_ID (int C_UOM_ID) - { - if (C_UOM_ID < 1) - throw new IllegalArgumentException ("C_UOM_ID is mandatory."); - set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); - } - - /** Get UOM. - @return Unit of Measure - */ - public int getC_UOM_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Classification. - @param Classification - Classification for grouping - */ - public void setClassification (String Classification) - { - - if (Classification != null && Classification.length() > 1) - { - log.warning("Length > 1 - truncated"); - Classification = Classification.substring(0, 1); - } - set_Value (COLUMNNAME_Classification, Classification); - } - - /** Get Classification. - @return Classification for grouping - */ - public String getClassification () - { - return (String)get_Value(COLUMNNAME_Classification); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Description URL. - @param DescriptionURL - URL for the description - */ - public void setDescriptionURL (String DescriptionURL) - { - - if (DescriptionURL != null && DescriptionURL.length() > 120) - { - log.warning("Length > 120 - truncated"); - DescriptionURL = DescriptionURL.substring(0, 120); - } - set_Value (COLUMNNAME_DescriptionURL, DescriptionURL); - } - - /** Get Description URL. - @return URL for the description - */ - public String getDescriptionURL () - { - return (String)get_Value(COLUMNNAME_DescriptionURL); - } - - /** Set Discontinued. - @param Discontinued - This product is no longer available - */ - public void setDiscontinued (boolean Discontinued) - { - set_Value (COLUMNNAME_Discontinued, Boolean.valueOf(Discontinued)); - } - - /** Get Discontinued. - @return This product is no longer available - */ - public boolean isDiscontinued () - { - Object oo = get_Value(COLUMNNAME_Discontinued); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Discontinued by. - @param DiscontinuedBy - Discontinued By - */ - public void setDiscontinuedBy (Timestamp DiscontinuedBy) - { - set_Value (COLUMNNAME_DiscontinuedBy, DiscontinuedBy); - } - - /** Get Discontinued by. - @return Discontinued By - */ - public Timestamp getDiscontinuedBy () - { - return (Timestamp)get_Value(COLUMNNAME_DiscontinuedBy); - } - - /** Set Document Note. - @param DocumentNote - Additional information for a Document - */ - public void setDocumentNote (String DocumentNote) - { - - if (DocumentNote != null && DocumentNote.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - DocumentNote = DocumentNote.substring(0, 2000); - } - set_Value (COLUMNNAME_DocumentNote, DocumentNote); - } - - /** Get Document Note. - @return Additional information for a Document - */ - public String getDocumentNote () - { - return (String)get_Value(COLUMNNAME_DocumentNote); - } - - /** Set Group1. - @param Group1 Group1 */ - public void setGroup1 (String Group1) - { - - if (Group1 != null && Group1.length() > 255) - { - log.warning("Length > 255 - truncated"); - Group1 = Group1.substring(0, 255); - } - set_Value (COLUMNNAME_Group1, Group1); - } - - /** Get Group1. - @return Group1 */ - public String getGroup1 () - { - return (String)get_Value(COLUMNNAME_Group1); - } - - /** Set Group2. - @param Group2 Group2 */ - public void setGroup2 (String Group2) - { - - if (Group2 != null && Group2.length() > 255) - { - log.warning("Length > 255 - truncated"); - Group2 = Group2.substring(0, 255); - } - set_Value (COLUMNNAME_Group2, Group2); - } - - /** Get Group2. - @return Group2 */ - public String getGroup2 () - { - return (String)get_Value(COLUMNNAME_Group2); - } - - /** Set Guarantee Days. - @param GuaranteeDays - Number of days the product is guaranteed or available - */ - public void setGuaranteeDays (int GuaranteeDays) - { - set_Value (COLUMNNAME_GuaranteeDays, Integer.valueOf(GuaranteeDays)); - } - - /** Get Guarantee Days. - @return Number of days the product is guaranteed or available - */ - public int getGuaranteeDays () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GuaranteeDays); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Min Guarantee Days. - @param GuaranteeDaysMin - Minumum number of guarantee days - */ - public void setGuaranteeDaysMin (int GuaranteeDaysMin) - { - set_Value (COLUMNNAME_GuaranteeDaysMin, Integer.valueOf(GuaranteeDaysMin)); - } - - /** Get Min Guarantee Days. - @return Minumum number of guarantee days - */ - public int getGuaranteeDaysMin () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GuaranteeDaysMin); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Comment/Help. - @param Help - Comment or Hint - */ - public void setHelp (String Help) - { - - if (Help != null && Help.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - Help = Help.substring(0, 2000); - } - set_Value (COLUMNNAME_Help, Help); - } - - /** Get Comment/Help. - @return Comment or Hint - */ - public String getHelp () - { - return (String)get_Value(COLUMNNAME_Help); - } - - /** Set Image URL. - @param ImageURL - URL of image - */ - public void setImageURL (String ImageURL) - { - - if (ImageURL != null && ImageURL.length() > 120) - { - log.warning("Length > 120 - truncated"); - ImageURL = ImageURL.substring(0, 120); - } - set_Value (COLUMNNAME_ImageURL, ImageURL); - } - - /** Get Image URL. - @return URL of image - */ - public String getImageURL () - { - return (String)get_Value(COLUMNNAME_ImageURL); - } - - /** Set Bill of Materials. - @param IsBOM - Bill of Materials - */ - public void setIsBOM (boolean IsBOM) - { - set_Value (COLUMNNAME_IsBOM, Boolean.valueOf(IsBOM)); - } - - /** Get Bill of Materials. - @return Bill of Materials - */ - public boolean isBOM () - { - Object oo = get_Value(COLUMNNAME_IsBOM); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Drop Shipment. - @param IsDropShip - Drop Shipments are sent from the Vendor directly to the Customer - */ - public void setIsDropShip (boolean IsDropShip) - { - set_Value (COLUMNNAME_IsDropShip, Boolean.valueOf(IsDropShip)); - } - - /** Get Drop Shipment. - @return Drop Shipments are sent from the Vendor directly to the Customer - */ - public boolean isDropShip () - { - Object oo = get_Value(COLUMNNAME_IsDropShip); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Exclude Auto Delivery. - @param IsExcludeAutoDelivery - Exclude from automatic Delivery - */ - public void setIsExcludeAutoDelivery (boolean IsExcludeAutoDelivery) - { - set_Value (COLUMNNAME_IsExcludeAutoDelivery, Boolean.valueOf(IsExcludeAutoDelivery)); - } - - /** Get Exclude Auto Delivery. - @return Exclude from automatic Delivery - */ - public boolean isExcludeAutoDelivery () - { - Object oo = get_Value(COLUMNNAME_IsExcludeAutoDelivery); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Print detail records on invoice . - @param IsInvoicePrintDetails - Print detail BOM elements on the invoice - */ - public void setIsInvoicePrintDetails (boolean IsInvoicePrintDetails) - { - set_Value (COLUMNNAME_IsInvoicePrintDetails, Boolean.valueOf(IsInvoicePrintDetails)); - } - - /** Get Print detail records on invoice . - @return Print detail BOM elements on the invoice - */ - public boolean isInvoicePrintDetails () - { - Object oo = get_Value(COLUMNNAME_IsInvoicePrintDetails); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Print detail records on pick list. - @param IsPickListPrintDetails - Print detail BOM elements on the pick list - */ - public void setIsPickListPrintDetails (boolean IsPickListPrintDetails) - { - set_Value (COLUMNNAME_IsPickListPrintDetails, Boolean.valueOf(IsPickListPrintDetails)); - } - - /** Get Print detail records on pick list. - @return Print detail BOM elements on the pick list - */ - public boolean isPickListPrintDetails () - { - Object oo = get_Value(COLUMNNAME_IsPickListPrintDetails); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Purchased. - @param IsPurchased - Organization purchases this product - */ - public void setIsPurchased (boolean IsPurchased) - { - set_Value (COLUMNNAME_IsPurchased, Boolean.valueOf(IsPurchased)); - } - - /** Get Purchased. - @return Organization purchases this product - */ - public boolean isPurchased () - { - Object oo = get_Value(COLUMNNAME_IsPurchased); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Self-Service. - @param IsSelfService - This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService) - { - set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); - } - - /** Get Self-Service. - @return This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService () - { - Object oo = get_Value(COLUMNNAME_IsSelfService); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Sold. - @param IsSold - Organization sells this product - */ - public void setIsSold (boolean IsSold) - { - set_Value (COLUMNNAME_IsSold, Boolean.valueOf(IsSold)); - } - - /** Get Sold. - @return Organization sells this product - */ - public boolean isSold () - { - Object oo = get_Value(COLUMNNAME_IsSold); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Stocked. - @param IsStocked - Organization stocks this product - */ - public void setIsStocked (boolean IsStocked) - { - set_Value (COLUMNNAME_IsStocked, Boolean.valueOf(IsStocked)); - } - - /** Get Stocked. - @return Organization stocks this product - */ - public boolean isStocked () - { - Object oo = get_Value(COLUMNNAME_IsStocked); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Summary Level. - @param IsSummary - This is a summary entity - */ - public void setIsSummary (boolean IsSummary) - { - set_Value (COLUMNNAME_IsSummary, Boolean.valueOf(IsSummary)); - } - - /** Get Summary Level. - @return This is a summary entity - */ - public boolean isSummary () - { - Object oo = get_Value(COLUMNNAME_IsSummary); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Verified. - @param IsVerified - The BOM configuration has been verified - */ - public void setIsVerified (boolean IsVerified) - { - set_ValueNoCheck (COLUMNNAME_IsVerified, Boolean.valueOf(IsVerified)); - } - - /** Get Verified. - @return The BOM configuration has been verified - */ - public boolean isVerified () - { - Object oo = get_Value(COLUMNNAME_IsVerified); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Featured in Web Store. - @param IsWebStoreFeatured - If selected, the product is displayed in the inital or any empy search - */ - public void setIsWebStoreFeatured (boolean IsWebStoreFeatured) - { - set_Value (COLUMNNAME_IsWebStoreFeatured, Boolean.valueOf(IsWebStoreFeatured)); - } - - /** Get Featured in Web Store. - @return If selected, the product is displayed in the inital or any empy search - */ - public boolean isWebStoreFeatured () - { - Object oo = get_Value(COLUMNNAME_IsWebStoreFeatured); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Attribute Set Instance. - @param M_AttributeSetInstance_ID - Product Attribute Set Instance - */ - public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) - { - if (M_AttributeSetInstance_ID < 0) - throw new IllegalArgumentException ("M_AttributeSetInstance_ID is mandatory."); - set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); - } - - /** Get Attribute Set Instance. - @return Product Attribute Set Instance - */ - public int getM_AttributeSetInstance_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_AttributeSet getM_AttributeSet() throws Exception - { - Class clazz = MTable.getClass(I_M_AttributeSet.Table_Name); - I_M_AttributeSet result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_AttributeSet)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_AttributeSet_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Attribute Set. - @param M_AttributeSet_ID - Product Attribute Set - */ - public void setM_AttributeSet_ID (int M_AttributeSet_ID) - { - if (M_AttributeSet_ID < 1) - set_Value (COLUMNNAME_M_AttributeSet_ID, null); - else - set_Value (COLUMNNAME_M_AttributeSet_ID, Integer.valueOf(M_AttributeSet_ID)); - } - - /** Get Attribute Set. - @return Product Attribute Set - */ - public int getM_AttributeSet_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSet_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_FreightCategory getM_FreightCategory() throws Exception - { - Class clazz = MTable.getClass(I_M_FreightCategory.Table_Name); - I_M_FreightCategory result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_FreightCategory)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_FreightCategory_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Freight Category. - @param M_FreightCategory_ID - Category of the Freight - */ - public void setM_FreightCategory_ID (int M_FreightCategory_ID) - { - if (M_FreightCategory_ID < 1) - set_Value (COLUMNNAME_M_FreightCategory_ID, null); - else - set_Value (COLUMNNAME_M_FreightCategory_ID, Integer.valueOf(M_FreightCategory_ID)); - } - - /** Get Freight Category. - @return Category of the Freight - */ - public int getM_FreightCategory_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_FreightCategory_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Locator. - @param M_Locator_ID - Warehouse Locator - */ - public void setM_Locator_ID (int M_Locator_ID) - { - if (M_Locator_ID < 1) - set_Value (COLUMNNAME_M_Locator_ID, null); - else - set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID)); - } - - /** Get Locator. - @return Warehouse Locator - */ - public int getM_Locator_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** M_Product_Category_ID AD_Reference_ID=163 */ - public static final int M_PRODUCT_CATEGORY_ID_AD_Reference_ID=163; - public I_M_Product_Category getM_Product_Category() throws Exception - { - Class clazz = MTable.getClass(I_M_Product_Category.Table_Name); - I_M_Product_Category result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Product_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_Category_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Product Category. - @param M_Product_Category_ID - Category of a Product - */ - public void setM_Product_Category_ID (int M_Product_Category_ID) - { - if (M_Product_Category_ID < 1) - throw new IllegalArgumentException ("M_Product_Category_ID is mandatory."); - set_Value (COLUMNNAME_M_Product_Category_ID, Integer.valueOf(M_Product_Category_ID)); - } - - /** Get Product Category. - @return Category of a Product - */ - public int getM_Product_Category_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Category_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - throw new IllegalArgumentException ("M_Product_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - - /** 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; - } - - /** ProductType AD_Reference_ID=270 */ - public static final int PRODUCTTYPE_AD_Reference_ID=270; - /** Item = I */ - public static final String PRODUCTTYPE_Item = "I"; - /** Service = S */ - public static final String PRODUCTTYPE_Service = "S"; - /** Resource = R */ - public static final String PRODUCTTYPE_Resource = "R"; - /** Expense type = E */ - public static final String PRODUCTTYPE_ExpenseType = "E"; - /** Online = O */ - public static final String PRODUCTTYPE_Online = "O"; - /** Set Product Type. - @param ProductType - Type of product - */ - public void setProductType (String ProductType) - { - if (ProductType == null) throw new IllegalArgumentException ("ProductType is mandatory"); - if (ProductType.equals("I") || ProductType.equals("S") || ProductType.equals("R") || ProductType.equals("E") || ProductType.equals("O")); else throw new IllegalArgumentException ("ProductType Invalid value - " + ProductType + " - Reference_ID=270 - I - S - R - E - O"); - if (ProductType.length() > 1) - { - log.warning("Length > 1 - truncated"); - ProductType = ProductType.substring(0, 1); - } - set_Value (COLUMNNAME_ProductType, ProductType); - } - - /** Get Product Type. - @return Type of product - */ - public String getProductType () - { - return (String)get_Value(COLUMNNAME_ProductType); - } - - public I_R_MailText getR_MailText() throws Exception - { - Class clazz = MTable.getClass(I_R_MailText.Table_Name); - I_R_MailText result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_MailText)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_MailText_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Mail Template. - @param R_MailText_ID - Text templates for mailings - */ - public void setR_MailText_ID (int R_MailText_ID) - { - if (R_MailText_ID < 1) - set_Value (COLUMNNAME_R_MailText_ID, null); - else - set_Value (COLUMNNAME_R_MailText_ID, Integer.valueOf(R_MailText_ID)); - } - - /** Get Mail Template. - @return Text templates for mailings - */ - public int getR_MailText_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_MailText_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set SKU. - @param SKU - Stock Keeping Unit - */ - public void setSKU (String SKU) - { - - if (SKU != null && SKU.length() > 30) - { - log.warning("Length > 30 - truncated"); - SKU = SKU.substring(0, 30); - } - set_Value (COLUMNNAME_SKU, SKU); - } - - /** Get SKU. - @return Stock Keeping Unit - */ - public String getSKU () - { - return (String)get_Value(COLUMNNAME_SKU); - } - - public I_S_ExpenseType getS_ExpenseType() throws Exception - { - Class clazz = MTable.getClass(I_S_ExpenseType.Table_Name); - I_S_ExpenseType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_S_ExpenseType)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_ExpenseType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Expense Type. - @param S_ExpenseType_ID - Expense report type - */ - public void setS_ExpenseType_ID (int S_ExpenseType_ID) - { - if (S_ExpenseType_ID < 1) - set_ValueNoCheck (COLUMNNAME_S_ExpenseType_ID, null); - else - set_ValueNoCheck (COLUMNNAME_S_ExpenseType_ID, Integer.valueOf(S_ExpenseType_ID)); - } - - /** Get Expense Type. - @return Expense report type - */ - public int getS_ExpenseType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_S_ExpenseType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_S_Resource getS_Resource() throws Exception - { - Class clazz = MTable.getClass(I_S_Resource.Table_Name); - I_S_Resource result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_S_Resource)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_Resource_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Resource. - @param S_Resource_ID - Resource - */ - public void setS_Resource_ID (int S_Resource_ID) - { - if (S_Resource_ID < 1) - set_ValueNoCheck (COLUMNNAME_S_Resource_ID, null); - else - set_ValueNoCheck (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); - } - - /** Get Resource. - @return Resource - */ - public int getS_Resource_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** SalesRep_ID AD_Reference_ID=190 */ - public static final int SALESREP_ID_AD_Reference_ID=190; - /** Set Sales Representative. - @param SalesRep_ID - Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID) - { - if (SalesRep_ID < 1) - set_Value (COLUMNNAME_SalesRep_ID, null); - else - set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_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(); - } - - /** Set Shelf Depth. - @param ShelfDepth - Shelf depth required - */ - public void setShelfDepth (int ShelfDepth) - { - set_Value (COLUMNNAME_ShelfDepth, Integer.valueOf(ShelfDepth)); - } - - /** Get Shelf Depth. - @return Shelf depth required - */ - public int getShelfDepth () - { - Integer ii = (Integer)get_Value(COLUMNNAME_ShelfDepth); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Shelf Height. - @param ShelfHeight - Shelf height required - */ - public void setShelfHeight (int ShelfHeight) - { - set_Value (COLUMNNAME_ShelfHeight, Integer.valueOf(ShelfHeight)); - } - - /** Get Shelf Height. - @return Shelf height required - */ - public int getShelfHeight () - { - Integer ii = (Integer)get_Value(COLUMNNAME_ShelfHeight); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Shelf Width. - @param ShelfWidth - Shelf width required - */ - public void setShelfWidth (int ShelfWidth) - { - set_Value (COLUMNNAME_ShelfWidth, Integer.valueOf(ShelfWidth)); - } - - /** Get Shelf Width. - @return Shelf width required - */ - public int getShelfWidth () - { - Integer ii = (Integer)get_Value(COLUMNNAME_ShelfWidth); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set UPC/EAN. - @param UPC - Bar Code (Universal Product Code or its superset European Article Number) - */ - public void setUPC (String UPC) - { - - if (UPC != null && UPC.length() > 30) - { - log.warning("Length > 30 - truncated"); - UPC = UPC.substring(0, 30); - } - set_Value (COLUMNNAME_UPC, UPC); - } - - /** Get UPC/EAN. - @return Bar Code (Universal Product Code or its superset European Article Number) - */ - public String getUPC () - { - return (String)get_Value(COLUMNNAME_UPC); - } - - /** Set Units Per Pallet. - @param UnitsPerPallet - Units Per Pallet - */ - public void setUnitsPerPallet (int UnitsPerPallet) - { - set_Value (COLUMNNAME_UnitsPerPallet, Integer.valueOf(UnitsPerPallet)); - } - - /** Get Units Per Pallet. - @return Units Per Pallet - */ - public int getUnitsPerPallet () - { - Integer ii = (Integer)get_Value(COLUMNNAME_UnitsPerPallet); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Search Key. - @param Value - Search key for the record in the format required - must be unique - */ - public void setValue (String Value) - { - if (Value == null) - throw new IllegalArgumentException ("Value is mandatory."); - - if (Value.length() > 40) - { - log.warning("Length > 40 - truncated"); - Value = Value.substring(0, 40); - } - set_Value (COLUMNNAME_Value, Value); - } - - /** Get Search Key. - @return Search key for the record in the format required - must be unique - */ - public String getValue () - { - return (String)get_Value(COLUMNNAME_Value); - } - - /** Set Version No. - @param VersionNo - Version Number - */ - public void setVersionNo (String VersionNo) - { - - if (VersionNo != null && VersionNo.length() > 20) - { - log.warning("Length > 20 - truncated"); - VersionNo = VersionNo.substring(0, 20); - } - set_Value (COLUMNNAME_VersionNo, VersionNo); - } - - /** Get Version No. - @return Version Number - */ - public String getVersionNo () - { - return (String)get_Value(COLUMNNAME_VersionNo); - } - - /** Set Volume. - @param Volume - Volume of a product - */ - public void setVolume (BigDecimal Volume) - { - set_Value (COLUMNNAME_Volume, Volume); - } - - /** Get Volume. - @return Volume of a product - */ - public BigDecimal getVolume () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Volume); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Weight. - @param Weight - Weight of a product - */ - public void setWeight (BigDecimal Weight) - { - set_Value (COLUMNNAME_Weight, Weight); - } - - /** Get Weight. - @return Weight of a product - */ - public BigDecimal getWeight () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Weight); - if (bd == null) - return Env.ZERO; - return bd; - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_ProductDownload.java b/base/src/org/compiere/model/X_M_ProductDownload.java index d19f37a7b7..331821fd85 100644 --- a/base/src/org/compiere/model/X_M_ProductDownload.java +++ b/base/src/org/compiere/model/X_M_ProductDownload.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_ProductDownload * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_ProductDownload extends PO implements I_M_ProductDownload, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_ProductOperation.java b/base/src/org/compiere/model/X_M_ProductOperation.java index 0785ba1958..b31747c35e 100644 --- a/base/src/org/compiere/model/X_M_ProductOperation.java +++ b/base/src/org/compiere/model/X_M_ProductOperation.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_ProductOperation * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_ProductOperation extends PO implements I_M_ProductOperation, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_ProductPrice.java b/base/src/org/compiere/model/X_M_ProductPrice.java index f848e861b5..67e02d5be5 100644 --- a/base/src/org/compiere/model/X_M_ProductPrice.java +++ b/base/src/org/compiere/model/X_M_ProductPrice.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for M_ProductPrice * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_ProductPrice extends PO implements I_M_ProductPrice, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Product_Acct.java b/base/src/org/compiere/model/X_M_Product_Acct.java index 96f002259b..ab82a63d95 100644 --- a/base/src/org/compiere/model/X_M_Product_Acct.java +++ b/base/src/org/compiere/model/X_M_Product_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for M_Product_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Product_Acct extends PO implements I_M_Product_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Product_BOM.java b/base/src/org/compiere/model/X_M_Product_BOM.java index c70c88899c..dba5bb1349 100644 --- a/base/src/org/compiere/model/X_M_Product_BOM.java +++ b/base/src/org/compiere/model/X_M_Product_BOM.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Product_BOM * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Product_BOM extends PO implements I_M_Product_BOM, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Product_Category.java b/base/src/org/compiere/model/X_M_Product_Category.java index 69f8fb74aa..cc4086b497 100644 --- a/base/src/org/compiere/model/X_M_Product_Category.java +++ b/base/src/org/compiere/model/X_M_Product_Category.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Product_Category * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Product_Category extends PO implements I_M_Product_Category, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Product_Category_Acct.java b/base/src/org/compiere/model/X_M_Product_Category_Acct.java index 77f484b052..cda73c731b 100644 --- a/base/src/org/compiere/model/X_M_Product_Category_Acct.java +++ b/base/src/org/compiere/model/X_M_Product_Category_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for M_Product_Category_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Product_Category_Acct extends PO implements I_M_Product_Category_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Product_Costing.java b/base/src/org/compiere/model/X_M_Product_Costing.java index 27daa47a34..e1579be1b6 100644 --- a/base/src/org/compiere/model/X_M_Product_Costing.java +++ b/base/src/org/compiere/model/X_M_Product_Costing.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for M_Product_Costing * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Product_Costing extends PO implements I_M_Product_Costing, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Product_PO.java b/base/src/org/compiere/model/X_M_Product_PO.java index 167cf1f419..c51bb8263e 100644 --- a/base/src/org/compiere/model/X_M_Product_PO.java +++ b/base/src/org/compiere/model/X_M_Product_PO.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for M_Product_PO * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Product_PO extends PO implements I_M_Product_PO, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Production.java b/base/src/org/compiere/model/X_M_Production.java index 4f6fe8cad3..b8711d99df 100644 --- a/base/src/org/compiere/model/X_M_Production.java +++ b/base/src/org/compiere/model/X_M_Production.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Production * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Production extends PO implements I_M_Production, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_ProductionLine.java b/base/src/org/compiere/model/X_M_ProductionLine.java index be86aecf08..49843c8bae 100644 --- a/base/src/org/compiere/model/X_M_ProductionLine.java +++ b/base/src/org/compiere/model/X_M_ProductionLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_ProductionLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_ProductionLine extends PO implements I_M_ProductionLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_ProductionLineMA.java b/base/src/org/compiere/model/X_M_ProductionLineMA.java index a2b35c175c..f4dfe6b2ab 100644 --- a/base/src/org/compiere/model/X_M_ProductionLineMA.java +++ b/base/src/org/compiere/model/X_M_ProductionLineMA.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_ProductionLineMA * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_ProductionLineMA extends PO implements I_M_ProductionLineMA, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_ProductionPlan.java b/base/src/org/compiere/model/X_M_ProductionPlan.java index e93d60a39a..9dc7db599e 100644 --- a/base/src/org/compiere/model/X_M_ProductionPlan.java +++ b/base/src/org/compiere/model/X_M_ProductionPlan.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_ProductionPlan * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_ProductionPlan extends PO implements I_M_ProductionPlan, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_RMA.java b/base/src/org/compiere/model/X_M_RMA.java index 9468164c75..70cc9fd3b6 100644 --- a/base/src/org/compiere/model/X_M_RMA.java +++ b/base/src/org/compiere/model/X_M_RMA.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_RMA * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_RMA extends PO implements I_M_RMA, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_RMALine.java b/base/src/org/compiere/model/X_M_RMALine.java index ada8b9bebe..8864429e15 100644 --- a/base/src/org/compiere/model/X_M_RMALine.java +++ b/base/src/org/compiere/model/X_M_RMALine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_RMALine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_RMALine extends PO implements I_M_RMALine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_RMAType.java b/base/src/org/compiere/model/X_M_RMAType.java index 691ccb7a7b..41c32cd16b 100644 --- a/base/src/org/compiere/model/X_M_RMAType.java +++ b/base/src/org/compiere/model/X_M_RMAType.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_RMAType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_RMAType extends PO implements I_M_RMAType, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_RelatedProduct.java b/base/src/org/compiere/model/X_M_RelatedProduct.java index aad41eb77c..e0210dda88 100644 --- a/base/src/org/compiere/model/X_M_RelatedProduct.java +++ b/base/src/org/compiere/model/X_M_RelatedProduct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for M_RelatedProduct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_RelatedProduct extends PO implements I_M_RelatedProduct, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Replenish.java b/base/src/org/compiere/model/X_M_Replenish.java index f3e5111172..aecbf3284d 100644 --- a/base/src/org/compiere/model/X_M_Replenish.java +++ b/base/src/org/compiere/model/X_M_Replenish.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for M_Replenish * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Replenish extends PO implements I_M_Replenish, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Requisition.java b/base/src/org/compiere/model/X_M_Requisition.java index 68c425c70b..961d529fc3 100644 --- a/base/src/org/compiere/model/X_M_Requisition.java +++ b/base/src/org/compiere/model/X_M_Requisition.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Requisition * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Requisition extends PO implements I_M_Requisition, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_RequisitionLine.java b/base/src/org/compiere/model/X_M_RequisitionLine.java index 20e2fc3a0e..0ddb976047 100644 --- a/base/src/org/compiere/model/X_M_RequisitionLine.java +++ b/base/src/org/compiere/model/X_M_RequisitionLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_RequisitionLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_RequisitionLine extends PO implements I_M_RequisitionLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_SerNoCtl.java b/base/src/org/compiere/model/X_M_SerNoCtl.java index 90967150b0..fbc0912ee2 100644 --- a/base/src/org/compiere/model/X_M_SerNoCtl.java +++ b/base/src/org/compiere/model/X_M_SerNoCtl.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_SerNoCtl * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_SerNoCtl extends PO implements I_M_SerNoCtl, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_SerNoCtlExclude.java b/base/src/org/compiere/model/X_M_SerNoCtlExclude.java index c149e3e4fd..2c8a884776 100644 --- a/base/src/org/compiere/model/X_M_SerNoCtlExclude.java +++ b/base/src/org/compiere/model/X_M_SerNoCtlExclude.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for M_SerNoCtlExclude * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_SerNoCtlExclude extends PO implements I_M_SerNoCtlExclude, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Shipper.java b/base/src/org/compiere/model/X_M_Shipper.java index 35954b6259..383c06436e 100644 --- a/base/src/org/compiere/model/X_M_Shipper.java +++ b/base/src/org/compiere/model/X_M_Shipper.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Shipper * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Shipper extends PO implements I_M_Shipper, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Storage.java b/base/src/org/compiere/model/X_M_Storage.java index a9305aff2c..101e6c1b3e 100644 --- a/base/src/org/compiere/model/X_M_Storage.java +++ b/base/src/org/compiere/model/X_M_Storage.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for M_Storage * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Storage extends PO implements I_M_Storage, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Substitute.java b/base/src/org/compiere/model/X_M_Substitute.java index ca0242c480..9f378514d1 100644 --- a/base/src/org/compiere/model/X_M_Substitute.java +++ b/base/src/org/compiere/model/X_M_Substitute.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for M_Substitute * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Substitute extends PO implements I_M_Substitute, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Transaction.java b/base/src/org/compiere/model/X_M_Transaction.java deleted file mode 100644 index be10f328c7..0000000000 --- a/base/src/org/compiere/model/X_M_Transaction.java +++ /dev/null @@ -1,478 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for M_Transaction - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_Transaction extends PO implements I_M_Transaction, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_M_Transaction (Properties ctx, int M_Transaction_ID, String trxName) - { - super (ctx, M_Transaction_ID, trxName); - /** if (M_Transaction_ID == 0) - { - setM_AttributeSetInstance_ID (0); - setM_Locator_ID (0); - setM_Product_ID (0); - setM_Transaction_ID (0); - setMovementDate (new Timestamp(System.currentTimeMillis())); - setMovementQty (Env.ZERO); - setMovementType (null); - } */ - } - - /** Load Constructor */ - public X_M_Transaction (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 1 - 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() - { - StringBuffer sb = new StringBuffer ("X_M_Transaction[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_C_ProjectIssue getC_ProjectIssue() throws Exception - { - Class clazz = MTable.getClass(I_C_ProjectIssue.Table_Name); - I_C_ProjectIssue result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_ProjectIssue)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ProjectIssue_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project Issue. - @param C_ProjectIssue_ID - Project Issues (Material, Labor) - */ - public void setC_ProjectIssue_ID (int C_ProjectIssue_ID) - { - if (C_ProjectIssue_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_ProjectIssue_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_ProjectIssue_ID, Integer.valueOf(C_ProjectIssue_ID)); - } - - /** Get Project Issue. - @return Project Issues (Material, Labor) - */ - public int getC_ProjectIssue_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_ProjectIssue_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Attribute Set Instance. - @param M_AttributeSetInstance_ID - Product Attribute Set Instance - */ - public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) - { - if (M_AttributeSetInstance_ID < 0) - throw new IllegalArgumentException ("M_AttributeSetInstance_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); - } - - /** Get Attribute Set Instance. - @return Product Attribute Set Instance - */ - public int getM_AttributeSetInstance_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_InOutLine getM_InOutLine() throws Exception - { - Class clazz = MTable.getClass(I_M_InOutLine.Table_Name); - I_M_InOutLine result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_InOutLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_InOutLine_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Shipment/Receipt Line. - @param M_InOutLine_ID - Line on Shipment or Receipt document - */ - public void setM_InOutLine_ID (int M_InOutLine_ID) - { - if (M_InOutLine_ID < 1) - set_ValueNoCheck (COLUMNNAME_M_InOutLine_ID, null); - else - set_ValueNoCheck (COLUMNNAME_M_InOutLine_ID, Integer.valueOf(M_InOutLine_ID)); - } - - /** Get Shipment/Receipt Line. - @return Line on Shipment or Receipt document - */ - public int getM_InOutLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_InOutLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_InventoryLine getM_InventoryLine() throws Exception - { - Class clazz = MTable.getClass(I_M_InventoryLine.Table_Name); - I_M_InventoryLine result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_InventoryLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_InventoryLine_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Phys.Inventory Line. - @param M_InventoryLine_ID - Unique line in an Inventory document - */ - public void setM_InventoryLine_ID (int M_InventoryLine_ID) - { - if (M_InventoryLine_ID < 1) - set_ValueNoCheck (COLUMNNAME_M_InventoryLine_ID, null); - else - set_ValueNoCheck (COLUMNNAME_M_InventoryLine_ID, Integer.valueOf(M_InventoryLine_ID)); - } - - /** Get Phys.Inventory Line. - @return Unique line in an Inventory document - */ - public int getM_InventoryLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_InventoryLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Locator. - @param M_Locator_ID - Warehouse Locator - */ - public void setM_Locator_ID (int M_Locator_ID) - { - if (M_Locator_ID < 1) - throw new IllegalArgumentException ("M_Locator_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID)); - } - - /** Get Locator. - @return Warehouse Locator - */ - public int getM_Locator_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_MovementLine getM_MovementLine() throws Exception - { - Class clazz = MTable.getClass(I_M_MovementLine.Table_Name); - I_M_MovementLine result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_MovementLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_MovementLine_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Move Line. - @param M_MovementLine_ID - Inventory Move document Line - */ - public void setM_MovementLine_ID (int M_MovementLine_ID) - { - if (M_MovementLine_ID < 1) - set_ValueNoCheck (COLUMNNAME_M_MovementLine_ID, null); - else - set_ValueNoCheck (COLUMNNAME_M_MovementLine_ID, Integer.valueOf(M_MovementLine_ID)); - } - - /** Get Move Line. - @return Inventory Move document Line - */ - public int getM_MovementLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_MovementLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Product getM_Product() throws Exception - { - Class clazz = MTable.getClass(I_M_Product.Table_Name); - I_M_Product result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - throw new IllegalArgumentException ("M_Product_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_ProductionLine getM_ProductionLine() throws Exception - { - Class clazz = MTable.getClass(I_M_ProductionLine.Table_Name); - I_M_ProductionLine result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_ProductionLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_ProductionLine_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Production Line. - @param M_ProductionLine_ID - Document Line representing a production - */ - public void setM_ProductionLine_ID (int M_ProductionLine_ID) - { - if (M_ProductionLine_ID < 1) - set_ValueNoCheck (COLUMNNAME_M_ProductionLine_ID, null); - else - set_ValueNoCheck (COLUMNNAME_M_ProductionLine_ID, Integer.valueOf(M_ProductionLine_ID)); - } - - /** Get Production Line. - @return Document Line representing a production - */ - public int getM_ProductionLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_ProductionLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Inventory Transaction. - @param M_Transaction_ID Inventory Transaction */ - public void setM_Transaction_ID (int M_Transaction_ID) - { - if (M_Transaction_ID < 1) - throw new IllegalArgumentException ("M_Transaction_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Transaction_ID, Integer.valueOf(M_Transaction_ID)); - } - - /** Get Inventory Transaction. - @return Inventory Transaction */ - public int getM_Transaction_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Transaction_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Movement Date. - @param MovementDate - Date a product was moved in or out of inventory - */ - public void setMovementDate (Timestamp MovementDate) - { - if (MovementDate == null) - throw new IllegalArgumentException ("MovementDate is mandatory."); - set_ValueNoCheck (COLUMNNAME_MovementDate, MovementDate); - } - - /** Get Movement Date. - @return Date a product was moved in or out of inventory - */ - public Timestamp getMovementDate () - { - return (Timestamp)get_Value(COLUMNNAME_MovementDate); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getMovementDate())); - } - - /** Set Movement Quantity. - @param MovementQty - Quantity of a product moved. - */ - public void setMovementQty (BigDecimal MovementQty) - { - if (MovementQty == null) - throw new IllegalArgumentException ("MovementQty is mandatory."); - set_ValueNoCheck (COLUMNNAME_MovementQty, MovementQty); - } - - /** Get Movement Quantity. - @return Quantity of a product moved. - */ - public BigDecimal getMovementQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MovementQty); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** MovementType AD_Reference_ID=189 */ - public static final int MOVEMENTTYPE_AD_Reference_ID=189; - /** Customer Shipment = C- */ - public static final String MOVEMENTTYPE_CustomerShipment = "C-"; - /** Customer Returns = C+ */ - public static final String MOVEMENTTYPE_CustomerReturns = "C+"; - /** Vendor Receipts = V+ */ - public static final String MOVEMENTTYPE_VendorReceipts = "V+"; - /** Vendor Returns = V- */ - public static final String MOVEMENTTYPE_VendorReturns = "V-"; - /** Inventory Out = I- */ - public static final String MOVEMENTTYPE_InventoryOut = "I-"; - /** Inventory In = I+ */ - public static final String MOVEMENTTYPE_InventoryIn = "I+"; - /** Movement From = M- */ - public static final String MOVEMENTTYPE_MovementFrom = "M-"; - /** Movement To = M+ */ - public static final String MOVEMENTTYPE_MovementTo = "M+"; - /** Production + = P+ */ - public static final String MOVEMENTTYPE_ProductionPlus = "P+"; - /** Production - = P- */ - public static final String MOVEMENTTYPE_Production_ = "P-"; - /** Work Order + = W+ */ - public static final String MOVEMENTTYPE_WorkOrderPlus = "W+"; - /** Work Order - = W- */ - public static final String MOVEMENTTYPE_WorkOrder_ = "W-"; - /** Set Movement Type. - @param MovementType - Method of moving the inventory - */ - public void setMovementType (String MovementType) - { - if (MovementType == null) throw new IllegalArgumentException ("MovementType is mandatory"); - if (MovementType.equals("C-") || MovementType.equals("C+") || MovementType.equals("V+") || MovementType.equals("V-") || MovementType.equals("I-") || MovementType.equals("I+") || MovementType.equals("M-") || MovementType.equals("M+") || MovementType.equals("P+") || MovementType.equals("P-") || MovementType.equals("W+") || MovementType.equals("W-")); else throw new IllegalArgumentException ("MovementType Invalid value - " + MovementType + " - Reference_ID=189 - C- - C+ - V+ - V- - I- - I+ - M- - M+ - P+ - P- - W+ - W-"); - if (MovementType.length() > 2) - { - log.warning("Length > 2 - truncated"); - MovementType = MovementType.substring(0, 2); - } - set_ValueNoCheck (COLUMNNAME_MovementType, MovementType); - } - - /** Get Movement Type. - @return Method of moving the inventory - */ - public String getMovementType () - { - return (String)get_Value(COLUMNNAME_MovementType); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_TransactionAllocation.java b/base/src/org/compiere/model/X_M_TransactionAllocation.java index dcd6509341..150bf2ae0f 100644 --- a/base/src/org/compiere/model/X_M_TransactionAllocation.java +++ b/base/src/org/compiere/model/X_M_TransactionAllocation.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for M_TransactionAllocation * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_TransactionAllocation extends PO implements I_M_TransactionAllocation, I_Persistent { diff --git a/base/src/org/compiere/model/X_M_Warehouse_Acct.java b/base/src/org/compiere/model/X_M_Warehouse_Acct.java index 5fc33817f4..ea89c4d50f 100644 --- a/base/src/org/compiere/model/X_M_Warehouse_Acct.java +++ b/base/src/org/compiere/model/X_M_Warehouse_Acct.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for M_Warehouse_Acct * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_M_Warehouse_Acct extends PO implements I_M_Warehouse_Acct, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_Achievement.java b/base/src/org/compiere/model/X_PA_Achievement.java index 4b71980650..eb447ec50e 100644 --- a/base/src/org/compiere/model/X_PA_Achievement.java +++ b/base/src/org/compiere/model/X_PA_Achievement.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_Achievement * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_Achievement extends PO implements I_PA_Achievement, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_Benchmark.java b/base/src/org/compiere/model/X_PA_Benchmark.java index d3ffc88f37..a871d33dd1 100644 --- a/base/src/org/compiere/model/X_PA_Benchmark.java +++ b/base/src/org/compiere/model/X_PA_Benchmark.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_Benchmark * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_Benchmark extends PO implements I_PA_Benchmark, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_BenchmarkData.java b/base/src/org/compiere/model/X_PA_BenchmarkData.java index 18283e63f8..10308fcd05 100644 --- a/base/src/org/compiere/model/X_PA_BenchmarkData.java +++ b/base/src/org/compiere/model/X_PA_BenchmarkData.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_BenchmarkData * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_BenchmarkData extends PO implements I_PA_BenchmarkData, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_ColorSchema.java b/base/src/org/compiere/model/X_PA_ColorSchema.java index eb84fafb8f..1732354b7a 100644 --- a/base/src/org/compiere/model/X_PA_ColorSchema.java +++ b/base/src/org/compiere/model/X_PA_ColorSchema.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_ColorSchema * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_ColorSchema extends PO implements I_PA_ColorSchema, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_DashboardContent.java b/base/src/org/compiere/model/X_PA_DashboardContent.java index 88c8eaf6d5..1851719e6d 100644 --- a/base/src/org/compiere/model/X_PA_DashboardContent.java +++ b/base/src/org/compiere/model/X_PA_DashboardContent.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_DashboardContent * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_DashboardContent extends PO implements I_PA_DashboardContent, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_Goal.java b/base/src/org/compiere/model/X_PA_Goal.java index 75c892a72a..e48e4f6e54 100644 --- a/base/src/org/compiere/model/X_PA_Goal.java +++ b/base/src/org/compiere/model/X_PA_Goal.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_Goal * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_Goal extends PO implements I_PA_Goal, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_GoalRestriction.java b/base/src/org/compiere/model/X_PA_GoalRestriction.java index 35cb97b769..e54104eeac 100644 --- a/base/src/org/compiere/model/X_PA_GoalRestriction.java +++ b/base/src/org/compiere/model/X_PA_GoalRestriction.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_GoalRestriction * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_GoalRestriction extends PO implements I_PA_GoalRestriction, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_Hierarchy.java b/base/src/org/compiere/model/X_PA_Hierarchy.java index 3ac5978502..c65d682c04 100644 --- a/base/src/org/compiere/model/X_PA_Hierarchy.java +++ b/base/src/org/compiere/model/X_PA_Hierarchy.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_Hierarchy * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_Hierarchy extends PO implements I_PA_Hierarchy, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_Measure.java b/base/src/org/compiere/model/X_PA_Measure.java index f60fb31f0a..eac9045edd 100644 --- a/base/src/org/compiere/model/X_PA_Measure.java +++ b/base/src/org/compiere/model/X_PA_Measure.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_Measure * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_Measure extends PO implements I_PA_Measure, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_MeasureCalc.java b/base/src/org/compiere/model/X_PA_MeasureCalc.java index c5056905d5..d0f6bd2f6c 100644 --- a/base/src/org/compiere/model/X_PA_MeasureCalc.java +++ b/base/src/org/compiere/model/X_PA_MeasureCalc.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_MeasureCalc * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_MeasureCalc extends PO implements I_PA_MeasureCalc, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_Ratio.java b/base/src/org/compiere/model/X_PA_Ratio.java index 3b5ea1be44..b804ded903 100644 --- a/base/src/org/compiere/model/X_PA_Ratio.java +++ b/base/src/org/compiere/model/X_PA_Ratio.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_Ratio * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_Ratio extends PO implements I_PA_Ratio, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_RatioElement.java b/base/src/org/compiere/model/X_PA_RatioElement.java index c27faf210f..24a0f188f9 100644 --- a/base/src/org/compiere/model/X_PA_RatioElement.java +++ b/base/src/org/compiere/model/X_PA_RatioElement.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_RatioElement * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_RatioElement extends PO implements I_PA_RatioElement, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_Report.java b/base/src/org/compiere/model/X_PA_Report.java index 1d46440c0d..acc1e0e0a2 100644 --- a/base/src/org/compiere/model/X_PA_Report.java +++ b/base/src/org/compiere/model/X_PA_Report.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_Report * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_Report extends PO implements I_PA_Report, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_ReportColumn.java b/base/src/org/compiere/model/X_PA_ReportColumn.java index 101d2f0ede..ef709a461d 100644 --- a/base/src/org/compiere/model/X_PA_ReportColumn.java +++ b/base/src/org/compiere/model/X_PA_ReportColumn.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_ReportColumn * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_ReportColumnSet.java b/base/src/org/compiere/model/X_PA_ReportColumnSet.java index 94beea86e8..a10f2bec3d 100644 --- a/base/src/org/compiere/model/X_PA_ReportColumnSet.java +++ b/base/src/org/compiere/model/X_PA_ReportColumnSet.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_ReportColumnSet * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_ReportColumnSet extends PO implements I_PA_ReportColumnSet, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_ReportLine.java b/base/src/org/compiere/model/X_PA_ReportLine.java index 017beb414a..3fe9366e49 100644 --- a/base/src/org/compiere/model/X_PA_ReportLine.java +++ b/base/src/org/compiere/model/X_PA_ReportLine.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_ReportLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_ReportLine extends PO implements I_PA_ReportLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_ReportLineSet.java b/base/src/org/compiere/model/X_PA_ReportLineSet.java index 929cdf1d71..dabbc26e8f 100644 --- a/base/src/org/compiere/model/X_PA_ReportLineSet.java +++ b/base/src/org/compiere/model/X_PA_ReportLineSet.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_ReportLineSet * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_ReportLineSet extends PO implements I_PA_ReportLineSet, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_ReportSource.java b/base/src/org/compiere/model/X_PA_ReportSource.java index e537899df7..21c5e29dcc 100644 --- a/base/src/org/compiere/model/X_PA_ReportSource.java +++ b/base/src/org/compiere/model/X_PA_ReportSource.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_ReportSource * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_ReportSource extends PO implements I_PA_ReportSource, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_SLA_Criteria.java b/base/src/org/compiere/model/X_PA_SLA_Criteria.java index 85f4a4f583..d267263b90 100644 --- a/base/src/org/compiere/model/X_PA_SLA_Criteria.java +++ b/base/src/org/compiere/model/X_PA_SLA_Criteria.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_SLA_Criteria * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_SLA_Criteria extends PO implements I_PA_SLA_Criteria, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_SLA_Goal.java b/base/src/org/compiere/model/X_PA_SLA_Goal.java index e2ea3bd991..84efe501c4 100644 --- a/base/src/org/compiere/model/X_PA_SLA_Goal.java +++ b/base/src/org/compiere/model/X_PA_SLA_Goal.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_SLA_Goal * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_SLA_Goal extends PO implements I_PA_SLA_Goal, I_Persistent { diff --git a/base/src/org/compiere/model/X_PA_SLA_Measure.java b/base/src/org/compiere/model/X_PA_SLA_Measure.java index 0c20d9850b..f6d8d38bc3 100644 --- a/base/src/org/compiere/model/X_PA_SLA_Measure.java +++ b/base/src/org/compiere/model/X_PA_SLA_Measure.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for PA_SLA_Measure * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_PA_SLA_Measure extends PO implements I_PA_SLA_Measure, I_Persistent { diff --git a/base/src/org/compiere/model/X_RV_BPartner.java b/base/src/org/compiere/model/X_RV_BPartner.java index 7dd747d347..be8ee865cd 100644 --- a/base/src/org/compiere/model/X_RV_BPartner.java +++ b/base/src/org/compiere/model/X_RV_BPartner.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for RV_BPartner * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_RV_BPartner extends PO implements I_RV_BPartner, I_Persistent { diff --git a/base/src/org/compiere/model/X_RV_PP_Order_BOMLine.java b/base/src/org/compiere/model/X_RV_PP_Order_BOMLine.java new file mode 100644 index 0000000000..6fa5ca972a --- /dev/null +++ b/base/src/org/compiere/model/X_RV_PP_Order_BOMLine.java @@ -0,0 +1,70 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; + +/** Generated Model for RV_PP_Order_BOMLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_RV_PP_Order_BOMLine extends PO implements I_RV_PP_Order_BOMLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_RV_PP_Order_BOMLine (Properties ctx, int RV_PP_Order_BOMLine_ID, String trxName) + { + super (ctx, RV_PP_Order_BOMLine_ID, trxName); + /** if (RV_PP_Order_BOMLine_ID == 0) + { + } */ + } + + /** Load Constructor */ + public X_RV_PP_Order_BOMLine (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() + { + StringBuffer sb = new StringBuffer ("X_RV_PP_Order_BOMLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_RV_PP_WIP.java b/base/src/org/compiere/model/X_RV_PP_WIP.java new file mode 100644 index 0000000000..ddf53f407d --- /dev/null +++ b/base/src/org/compiere/model/X_RV_PP_WIP.java @@ -0,0 +1,70 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; + +/** Generated Model for RV_PP_WIP + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_RV_PP_WIP extends PO implements I_RV_PP_WIP, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_RV_PP_WIP (Properties ctx, int RV_PP_WIP_ID, String trxName) + { + super (ctx, RV_PP_WIP_ID, trxName); + /** if (RV_PP_WIP_ID == 0) + { + } */ + } + + /** Load Constructor */ + public X_RV_PP_WIP (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() + { + StringBuffer sb = new StringBuffer ("X_RV_PP_WIP[") + .append(get_ID()).append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_RV_WarehousePrice.java b/base/src/org/compiere/model/X_RV_WarehousePrice.java index 0892187fe8..df294e5830 100644 --- a/base/src/org/compiere/model/X_RV_WarehousePrice.java +++ b/base/src/org/compiere/model/X_RV_WarehousePrice.java @@ -26,7 +26,7 @@ import org.compiere.util.Env; /** Generated Model for RV_WarehousePrice * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_RV_WarehousePrice extends PO implements I_RV_WarehousePrice, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_Category.java b/base/src/org/compiere/model/X_R_Category.java index 002e5a4d45..bc847df806 100644 --- a/base/src/org/compiere/model/X_R_Category.java +++ b/base/src/org/compiere/model/X_R_Category.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_Category * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_Category extends PO implements I_R_Category, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_CategoryUpdates.java b/base/src/org/compiere/model/X_R_CategoryUpdates.java index c72bae4990..64e8a9069f 100644 --- a/base/src/org/compiere/model/X_R_CategoryUpdates.java +++ b/base/src/org/compiere/model/X_R_CategoryUpdates.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for R_CategoryUpdates * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_CategoryUpdates extends PO implements I_R_CategoryUpdates, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_ContactInterest.java b/base/src/org/compiere/model/X_R_ContactInterest.java index 99d98d6463..f011f71b3e 100644 --- a/base/src/org/compiere/model/X_R_ContactInterest.java +++ b/base/src/org/compiere/model/X_R_ContactInterest.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_ContactInterest * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_ContactInterest extends PO implements I_R_ContactInterest, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_Group.java b/base/src/org/compiere/model/X_R_Group.java index b36188bfdb..fe631dc56a 100644 --- a/base/src/org/compiere/model/X_R_Group.java +++ b/base/src/org/compiere/model/X_R_Group.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_Group * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_Group extends PO implements I_R_Group, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_GroupUpdates.java b/base/src/org/compiere/model/X_R_GroupUpdates.java index a99b891205..46cd83a5c8 100644 --- a/base/src/org/compiere/model/X_R_GroupUpdates.java +++ b/base/src/org/compiere/model/X_R_GroupUpdates.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for R_GroupUpdates * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_GroupUpdates extends PO implements I_R_GroupUpdates, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_InterestArea.java b/base/src/org/compiere/model/X_R_InterestArea.java index 090f2ee187..38400944e8 100644 --- a/base/src/org/compiere/model/X_R_InterestArea.java +++ b/base/src/org/compiere/model/X_R_InterestArea.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_InterestArea * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_InterestArea extends PO implements I_R_InterestArea, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_IssueKnown.java b/base/src/org/compiere/model/X_R_IssueKnown.java index 577e5676fc..ddfe943a8a 100644 --- a/base/src/org/compiere/model/X_R_IssueKnown.java +++ b/base/src/org/compiere/model/X_R_IssueKnown.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_IssueKnown * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_IssueKnown extends PO implements I_R_IssueKnown, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_IssueProject.java b/base/src/org/compiere/model/X_R_IssueProject.java index ce5ddd2862..963404e59e 100644 --- a/base/src/org/compiere/model/X_R_IssueProject.java +++ b/base/src/org/compiere/model/X_R_IssueProject.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_IssueProject * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_IssueProject extends PO implements I_R_IssueProject, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_IssueRecommendation.java b/base/src/org/compiere/model/X_R_IssueRecommendation.java index bdc139a838..d2e2c97e31 100644 --- a/base/src/org/compiere/model/X_R_IssueRecommendation.java +++ b/base/src/org/compiere/model/X_R_IssueRecommendation.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_IssueRecommendation * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_IssueRecommendation extends PO implements I_R_IssueRecommendation, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_IssueStatus.java b/base/src/org/compiere/model/X_R_IssueStatus.java index 519f152dcc..fb3bece959 100644 --- a/base/src/org/compiere/model/X_R_IssueStatus.java +++ b/base/src/org/compiere/model/X_R_IssueStatus.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_IssueStatus * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_IssueStatus extends PO implements I_R_IssueStatus, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_IssueSystem.java b/base/src/org/compiere/model/X_R_IssueSystem.java index 6068ae1a26..9772904be8 100644 --- a/base/src/org/compiere/model/X_R_IssueSystem.java +++ b/base/src/org/compiere/model/X_R_IssueSystem.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_IssueSystem * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_IssueSystem extends PO implements I_R_IssueSystem, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_IssueUser.java b/base/src/org/compiere/model/X_R_IssueUser.java index 83795ae40d..f98a2e240c 100644 --- a/base/src/org/compiere/model/X_R_IssueUser.java +++ b/base/src/org/compiere/model/X_R_IssueUser.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_IssueUser * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_IssueUser extends PO implements I_R_IssueUser, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_MailText.java b/base/src/org/compiere/model/X_R_MailText.java index 582bf4a901..89490e97bd 100644 --- a/base/src/org/compiere/model/X_R_MailText.java +++ b/base/src/org/compiere/model/X_R_MailText.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_MailText * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_MailText extends PO implements I_R_MailText, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_Request.java b/base/src/org/compiere/model/X_R_Request.java deleted file mode 100644 index 562814c7e8..0000000000 --- a/base/src/org/compiere/model/X_R_Request.java +++ /dev/null @@ -1,1803 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; - -/** Generated Model for R_Request - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_R_Request extends PO implements I_R_Request, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_R_Request (Properties ctx, int R_Request_ID, String trxName) - { - super (ctx, R_Request_ID, trxName); - /** if (R_Request_ID == 0) - { - setConfidentialType (null); -// C - setConfidentialTypeEntry (null); -// C - setDocumentNo (null); - setDueType (null); -// 5 - setIsEscalated (false); - setIsInvoiced (false); - setIsSelfService (false); -// N - setPriority (null); -// 5 - setProcessed (false); - setR_RequestType_ID (0); - setR_Request_ID (0); - setRequestAmt (Env.ZERO); - setSalesRep_ID (0); -// @#AD_User_ID@ - setSummary (null); - } */ - } - - /** Load Constructor */ - public X_R_Request (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 7 - System - 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() - { - StringBuffer sb = new StringBuffer ("X_R_Request[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_AD_Role getAD_Role() throws Exception - { - Class clazz = MTable.getClass(I_AD_Role.Table_Name); - I_AD_Role result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_Role)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Role_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Role. - @param AD_Role_ID - Responsibility Role - */ - public void setAD_Role_ID (int AD_Role_ID) - { - if (AD_Role_ID < 1) - set_Value (COLUMNNAME_AD_Role_ID, null); - else - set_Value (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID)); - } - - /** Get Role. - @return Responsibility Role - */ - public int getAD_Role_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_AD_Table getAD_Table() throws Exception - { - Class clazz = MTable.getClass(I_AD_Table.Table_Name); - I_AD_Table result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_Table)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Table_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Table. - @param AD_Table_ID - Database Table information - */ - public void setAD_Table_ID (int AD_Table_ID) - { - if (AD_Table_ID < 1) - set_ValueNoCheck (COLUMNNAME_AD_Table_ID, null); - else - set_ValueNoCheck (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID)); - } - - /** Get Table. - @return Database Table information - */ - public int getAD_Table_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_AD_User getAD_User() throws Exception - { - Class clazz = MTable.getClass(I_AD_User.Table_Name); - I_AD_User result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID < 1) - set_Value (COLUMNNAME_AD_User_ID, null); - else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_A_Asset getA_Asset() throws Exception - { - Class clazz = MTable.getClass(I_A_Asset.Table_Name); - I_A_Asset result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_A_Asset)constructor.newInstance(new Object[] {getCtx(), new Integer(getA_Asset_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Asset. - @param A_Asset_ID - Asset used internally or by customers - */ - public void setA_Asset_ID (int A_Asset_ID) - { - if (A_Asset_ID < 1) - set_Value (COLUMNNAME_A_Asset_ID, null); - else - set_Value (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID)); - } - - /** Get Asset. - @return Asset used internally or by customers - */ - public int getA_Asset_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Activity getC_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID < 1) - set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - set_Value (COLUMNNAME_C_BPartner_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_Campaign getC_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID < 1) - set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** C_InvoiceRequest_ID AD_Reference_ID=336 */ - public static final int C_INVOICEREQUEST_ID_AD_Reference_ID=336; - /** Set Request Invoice. - @param C_InvoiceRequest_ID - The generated invoice for this request - */ - public void setC_InvoiceRequest_ID (int C_InvoiceRequest_ID) - { - if (C_InvoiceRequest_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_InvoiceRequest_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_InvoiceRequest_ID, Integer.valueOf(C_InvoiceRequest_ID)); - } - - /** Get Request Invoice. - @return The generated invoice for this request - */ - public int getC_InvoiceRequest_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_InvoiceRequest_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Invoice getC_Invoice() throws Exception - { - Class clazz = MTable.getClass(I_C_Invoice.Table_Name); - I_C_Invoice result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Invoice)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Invoice_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Invoice. - @param C_Invoice_ID - Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID) - { - if (C_Invoice_ID < 1) - set_Value (COLUMNNAME_C_Invoice_ID, null); - else - set_Value (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID)); - } - - /** Get Invoice. - @return Invoice Identifier - */ - public int getC_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Order getC_Order() throws Exception - { - Class clazz = MTable.getClass(I_C_Order.Table_Name); - I_C_Order result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Order_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Order. - @param C_Order_ID - Order - */ - public void setC_Order_ID (int C_Order_ID) - { - if (C_Order_ID < 1) - set_Value (COLUMNNAME_C_Order_ID, null); - else - set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID)); - } - - /** 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(); - } - - public I_C_Payment getC_Payment() throws Exception - { - Class clazz = MTable.getClass(I_C_Payment.Table_Name); - I_C_Payment result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment. - @param C_Payment_ID - Payment identifier - */ - public void setC_Payment_ID (int C_Payment_ID) - { - if (C_Payment_ID < 1) - set_Value (COLUMNNAME_C_Payment_ID, null); - else - set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID)); - } - - /** Get Payment. - @return Payment identifier - */ - public int getC_Payment_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Project getC_Project() throws Exception - { - Class clazz = MTable.getClass(I_C_Project.Table_Name); - I_C_Project result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID < 1) - set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Close Date. - @param CloseDate - Close Date - */ - public void setCloseDate (Timestamp CloseDate) - { - set_Value (COLUMNNAME_CloseDate, CloseDate); - } - - /** Get Close Date. - @return Close Date - */ - public Timestamp getCloseDate () - { - return (Timestamp)get_Value(COLUMNNAME_CloseDate); - } - - /** ConfidentialType AD_Reference_ID=340 */ - public static final int CONFIDENTIALTYPE_AD_Reference_ID=340; - /** Public Information = A */ - public static final String CONFIDENTIALTYPE_PublicInformation = "A"; - /** Partner Confidential = C */ - public static final String CONFIDENTIALTYPE_PartnerConfidential = "C"; - /** Internal = I */ - public static final String CONFIDENTIALTYPE_Internal = "I"; - /** Private Information = P */ - public static final String CONFIDENTIALTYPE_PrivateInformation = "P"; - /** Set Confidentiality. - @param ConfidentialType - Type of Confidentiality - */ - public void setConfidentialType (String ConfidentialType) - { - if (ConfidentialType == null) throw new IllegalArgumentException ("ConfidentialType is mandatory"); - if (ConfidentialType.equals("A") || ConfidentialType.equals("C") || ConfidentialType.equals("I") || ConfidentialType.equals("P")); else throw new IllegalArgumentException ("ConfidentialType Invalid value - " + ConfidentialType + " - Reference_ID=340 - A - C - I - P"); - if (ConfidentialType.length() > 1) - { - log.warning("Length > 1 - truncated"); - ConfidentialType = ConfidentialType.substring(0, 1); - } - set_Value (COLUMNNAME_ConfidentialType, ConfidentialType); - } - - /** Get Confidentiality. - @return Type of Confidentiality - */ - public String getConfidentialType () - { - return (String)get_Value(COLUMNNAME_ConfidentialType); - } - - /** ConfidentialTypeEntry AD_Reference_ID=340 */ - public static final int CONFIDENTIALTYPEENTRY_AD_Reference_ID=340; - /** Public Information = A */ - public static final String CONFIDENTIALTYPEENTRY_PublicInformation = "A"; - /** Partner Confidential = C */ - public static final String CONFIDENTIALTYPEENTRY_PartnerConfidential = "C"; - /** Internal = I */ - public static final String CONFIDENTIALTYPEENTRY_Internal = "I"; - /** Private Information = P */ - public static final String CONFIDENTIALTYPEENTRY_PrivateInformation = "P"; - /** Set Entry Confidentiality. - @param ConfidentialTypeEntry - Confidentiality of the individual entry - */ - public void setConfidentialTypeEntry (String ConfidentialTypeEntry) - { - if (ConfidentialTypeEntry == null) throw new IllegalArgumentException ("ConfidentialTypeEntry is mandatory"); - if (ConfidentialTypeEntry.equals("A") || ConfidentialTypeEntry.equals("C") || ConfidentialTypeEntry.equals("I") || ConfidentialTypeEntry.equals("P")); else throw new IllegalArgumentException ("ConfidentialTypeEntry Invalid value - " + ConfidentialTypeEntry + " - Reference_ID=340 - A - C - I - P"); - if (ConfidentialTypeEntry.length() > 1) - { - log.warning("Length > 1 - truncated"); - ConfidentialTypeEntry = ConfidentialTypeEntry.substring(0, 1); - } - set_Value (COLUMNNAME_ConfidentialTypeEntry, ConfidentialTypeEntry); - } - - /** Get Entry Confidentiality. - @return Confidentiality of the individual entry - */ - public String getConfidentialTypeEntry () - { - return (String)get_Value(COLUMNNAME_ConfidentialTypeEntry); - } - - /** Set Complete Plan. - @param DateCompletePlan - Planned Completion Date - */ - public void setDateCompletePlan (Timestamp DateCompletePlan) - { - set_Value (COLUMNNAME_DateCompletePlan, DateCompletePlan); - } - - /** Get Complete Plan. - @return Planned Completion Date - */ - public Timestamp getDateCompletePlan () - { - return (Timestamp)get_Value(COLUMNNAME_DateCompletePlan); - } - - /** Set Date last action. - @param DateLastAction - Date this request was last acted on - */ - public void setDateLastAction (Timestamp DateLastAction) - { - set_ValueNoCheck (COLUMNNAME_DateLastAction, DateLastAction); - } - - /** Get Date last action. - @return Date this request was last acted on - */ - public Timestamp getDateLastAction () - { - return (Timestamp)get_Value(COLUMNNAME_DateLastAction); - } - - /** Set Last Alert. - @param DateLastAlert - Date when last alert were sent - */ - public void setDateLastAlert (Timestamp DateLastAlert) - { - set_Value (COLUMNNAME_DateLastAlert, DateLastAlert); - } - - /** Get Last Alert. - @return Date when last alert were sent - */ - public Timestamp getDateLastAlert () - { - return (Timestamp)get_Value(COLUMNNAME_DateLastAlert); - } - - /** Set Date next action. - @param DateNextAction - Date that this request should be acted on - */ - public void setDateNextAction (Timestamp DateNextAction) - { - set_Value (COLUMNNAME_DateNextAction, DateNextAction); - } - - /** Get Date next action. - @return Date that this request should be acted on - */ - public Timestamp getDateNextAction () - { - return (Timestamp)get_Value(COLUMNNAME_DateNextAction); - } - - /** Set Start Plan. - @param DateStartPlan - Planned Start Date - */ - public void setDateStartPlan (Timestamp DateStartPlan) - { - set_Value (COLUMNNAME_DateStartPlan, DateStartPlan); - } - - /** Get Start Plan. - @return Planned Start Date - */ - public Timestamp getDateStartPlan () - { - return (Timestamp)get_Value(COLUMNNAME_DateStartPlan); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - if (DocumentNo == null) - throw new IllegalArgumentException ("DocumentNo is mandatory."); - - if (DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); - } - set_Value (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getDocumentNo()); - } - - /** DueType AD_Reference_ID=222 */ - public static final int DUETYPE_AD_Reference_ID=222; - /** Overdue = 3 */ - public static final String DUETYPE_Overdue = "3"; - /** Due = 5 */ - public static final String DUETYPE_Due = "5"; - /** Scheduled = 7 */ - public static final String DUETYPE_Scheduled = "7"; - /** Set Due type. - @param DueType - Status of the next action for this Request - */ - public void setDueType (String DueType) - { - if (DueType == null) throw new IllegalArgumentException ("DueType is mandatory"); - if (DueType.equals("3") || DueType.equals("5") || DueType.equals("7")); else throw new IllegalArgumentException ("DueType Invalid value - " + DueType + " - Reference_ID=222 - 3 - 5 - 7"); - if (DueType.length() > 1) - { - log.warning("Length > 1 - truncated"); - DueType = DueType.substring(0, 1); - } - set_Value (COLUMNNAME_DueType, DueType); - } - - /** Get Due type. - @return Status of the next action for this Request - */ - public String getDueType () - { - return (String)get_Value(COLUMNNAME_DueType); - } - - /** Set End Time. - @param EndTime - End of the time span - */ - public void setEndTime (Timestamp EndTime) - { - set_Value (COLUMNNAME_EndTime, EndTime); - } - - /** Get End Time. - @return End of the time span - */ - public Timestamp getEndTime () - { - return (Timestamp)get_Value(COLUMNNAME_EndTime); - } - - /** Set Escalated. - @param IsEscalated - This request has been escalated - */ - public void setIsEscalated (boolean IsEscalated) - { - set_Value (COLUMNNAME_IsEscalated, Boolean.valueOf(IsEscalated)); - } - - /** Get Escalated. - @return This request has been escalated - */ - public boolean isEscalated () - { - Object oo = get_Value(COLUMNNAME_IsEscalated); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Invoiced. - @param IsInvoiced - Is this invoiced? - */ - public void setIsInvoiced (boolean IsInvoiced) - { - set_Value (COLUMNNAME_IsInvoiced, Boolean.valueOf(IsInvoiced)); - } - - /** Get Invoiced. - @return Is this invoiced? - */ - public boolean isInvoiced () - { - Object oo = get_Value(COLUMNNAME_IsInvoiced); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Self-Service. - @param IsSelfService - This is a Self-Service entry or this entry can be changed via Self-Service - */ - public void setIsSelfService (boolean IsSelfService) - { - set_ValueNoCheck (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); - } - - /** Get Self-Service. - @return This is a Self-Service entry or this entry can be changed via Self-Service - */ - public boolean isSelfService () - { - Object oo = get_Value(COLUMNNAME_IsSelfService); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Last Result. - @param LastResult - Result of last contact - */ - public void setLastResult (String LastResult) - { - - if (LastResult != null && LastResult.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - LastResult = LastResult.substring(0, 2000); - } - set_Value (COLUMNNAME_LastResult, LastResult); - } - - /** Get Last Result. - @return Result of last contact - */ - public String getLastResult () - { - return (String)get_Value(COLUMNNAME_LastResult); - } - - public I_M_ChangeRequest getM_ChangeRequest() throws Exception - { - Class clazz = MTable.getClass(I_M_ChangeRequest.Table_Name); - I_M_ChangeRequest result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_ChangeRequest)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_ChangeRequest_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Change Request. - @param M_ChangeRequest_ID - BOM (Engineering) Change Request - */ - public void setM_ChangeRequest_ID (int M_ChangeRequest_ID) - { - if (M_ChangeRequest_ID < 1) - set_Value (COLUMNNAME_M_ChangeRequest_ID, null); - else - set_Value (COLUMNNAME_M_ChangeRequest_ID, Integer.valueOf(M_ChangeRequest_ID)); - } - - /** Get Change Request. - @return BOM (Engineering) Change Request - */ - public int getM_ChangeRequest_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_ChangeRequest_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** M_FixChangeNotice_ID AD_Reference_ID=351 */ - public static final int M_FIXCHANGENOTICE_ID_AD_Reference_ID=351; - /** Set Fixed in. - @param M_FixChangeNotice_ID - Fixed in Change Notice - */ - public void setM_FixChangeNotice_ID (int M_FixChangeNotice_ID) - { - if (M_FixChangeNotice_ID < 1) - set_Value (COLUMNNAME_M_FixChangeNotice_ID, null); - else - set_Value (COLUMNNAME_M_FixChangeNotice_ID, Integer.valueOf(M_FixChangeNotice_ID)); - } - - /** Get Fixed in. - @return Fixed in Change Notice - */ - public int getM_FixChangeNotice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_FixChangeNotice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_InOut getM_InOut() throws Exception - { - Class clazz = MTable.getClass(I_M_InOut.Table_Name); - I_M_InOut result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_InOut)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_InOut_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Shipment/Receipt. - @param M_InOut_ID - Material Shipment Document - */ - public void setM_InOut_ID (int M_InOut_ID) - { - if (M_InOut_ID < 1) - set_Value (COLUMNNAME_M_InOut_ID, null); - else - set_Value (COLUMNNAME_M_InOut_ID, Integer.valueOf(M_InOut_ID)); - } - - /** Get Shipment/Receipt. - @return Material Shipment Document - */ - public int getM_InOut_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_InOut_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** M_ProductSpent_ID AD_Reference_ID=162 */ - public static final int M_PRODUCTSPENT_ID_AD_Reference_ID=162; - /** Set Product Used. - @param M_ProductSpent_ID - Product/Resource/Service used in Request - */ - public void setM_ProductSpent_ID (int M_ProductSpent_ID) - { - if (M_ProductSpent_ID < 1) - set_Value (COLUMNNAME_M_ProductSpent_ID, null); - else - set_Value (COLUMNNAME_M_ProductSpent_ID, Integer.valueOf(M_ProductSpent_ID)); - } - - /** Get Product Used. - @return Product/Resource/Service used in Request - */ - public int getM_ProductSpent_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_ProductSpent_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Product getM_Product() throws Exception - { - Class clazz = MTable.getClass(I_M_Product.Table_Name); - I_M_Product result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - set_Value (COLUMNNAME_M_Product_ID, null); - else - set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_RMA getM_RMA() throws Exception - { - Class clazz = MTable.getClass(I_M_RMA.Table_Name); - I_M_RMA result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_RMA)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_RMA_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set RMA. - @param M_RMA_ID - Return Material Authorization - */ - public void setM_RMA_ID (int M_RMA_ID) - { - if (M_RMA_ID < 1) - set_Value (COLUMNNAME_M_RMA_ID, null); - else - set_Value (COLUMNNAME_M_RMA_ID, Integer.valueOf(M_RMA_ID)); - } - - /** Get RMA. - @return Return Material Authorization - */ - public int getM_RMA_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_RMA_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** NextAction AD_Reference_ID=219 */ - public static final int NEXTACTION_AD_Reference_ID=219; - /** None = N */ - public static final String NEXTACTION_None = "N"; - /** Follow up = F */ - public static final String NEXTACTION_FollowUp = "F"; - /** Set Next action. - @param NextAction - Next Action to be taken - */ - public void setNextAction (String NextAction) - { - - if (NextAction == null || NextAction.equals("N") || NextAction.equals("F")); else throw new IllegalArgumentException ("NextAction Invalid value - " + NextAction + " - Reference_ID=219 - N - F"); - if (NextAction != null && NextAction.length() > 1) - { - log.warning("Length > 1 - truncated"); - NextAction = NextAction.substring(0, 1); - } - set_Value (COLUMNNAME_NextAction, NextAction); - } - - /** Get Next action. - @return Next Action to be taken - */ - public String getNextAction () - { - return (String)get_Value(COLUMNNAME_NextAction); - } - - /** Priority AD_Reference_ID=154 */ - public static final int PRIORITY_AD_Reference_ID=154; - /** High = 3 */ - public static final String PRIORITY_High = "3"; - /** Medium = 5 */ - public static final String PRIORITY_Medium = "5"; - /** Low = 7 */ - public static final String PRIORITY_Low = "7"; - /** Urgent = 1 */ - public static final String PRIORITY_Urgent = "1"; - /** Minor = 9 */ - public static final String PRIORITY_Minor = "9"; - /** Set Priority. - @param Priority - Indicates if this request is of a high, medium or low priority. - */ - public void setPriority (String Priority) - { - if (Priority == null) throw new IllegalArgumentException ("Priority is mandatory"); - if (Priority.equals("3") || Priority.equals("5") || Priority.equals("7") || Priority.equals("1") || Priority.equals("9")); else throw new IllegalArgumentException ("Priority Invalid value - " + Priority + " - Reference_ID=154 - 3 - 5 - 7 - 1 - 9"); - if (Priority.length() > 1) - { - log.warning("Length > 1 - truncated"); - Priority = Priority.substring(0, 1); - } - set_Value (COLUMNNAME_Priority, Priority); - } - - /** Get Priority. - @return Indicates if this request is of a high, medium or low priority. - */ - public String getPriority () - { - return (String)get_Value(COLUMNNAME_Priority); - } - - /** PriorityUser AD_Reference_ID=154 */ - public static final int PRIORITYUSER_AD_Reference_ID=154; - /** High = 3 */ - public static final String PRIORITYUSER_High = "3"; - /** Medium = 5 */ - public static final String PRIORITYUSER_Medium = "5"; - /** Low = 7 */ - public static final String PRIORITYUSER_Low = "7"; - /** Urgent = 1 */ - public static final String PRIORITYUSER_Urgent = "1"; - /** Minor = 9 */ - public static final String PRIORITYUSER_Minor = "9"; - /** Set User Importance. - @param PriorityUser - Priority of the issue for the User - */ - public void setPriorityUser (String PriorityUser) - { - - if (PriorityUser == null || PriorityUser.equals("3") || PriorityUser.equals("5") || PriorityUser.equals("7") || PriorityUser.equals("1") || PriorityUser.equals("9")); else throw new IllegalArgumentException ("PriorityUser Invalid value - " + PriorityUser + " - Reference_ID=154 - 3 - 5 - 7 - 1 - 9"); - if (PriorityUser != null && PriorityUser.length() > 1) - { - log.warning("Length > 1 - truncated"); - PriorityUser = PriorityUser.substring(0, 1); - } - set_Value (COLUMNNAME_PriorityUser, PriorityUser); - } - - /** Get User Importance. - @return Priority of the issue for the User - */ - public String getPriorityUser () - { - return (String)get_Value(COLUMNNAME_PriorityUser); - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Quantity Invoiced. - @param QtyInvoiced - Invoiced Quantity - */ - public void setQtyInvoiced (BigDecimal QtyInvoiced) - { - set_Value (COLUMNNAME_QtyInvoiced, QtyInvoiced); - } - - /** Get Quantity Invoiced. - @return Invoiced Quantity - */ - public BigDecimal getQtyInvoiced () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInvoiced); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Quantity Plan. - @param QtyPlan - Planned Quantity - */ - public void setQtyPlan (BigDecimal QtyPlan) - { - set_Value (COLUMNNAME_QtyPlan, QtyPlan); - } - - /** Get Quantity Plan. - @return Planned Quantity - */ - public BigDecimal getQtyPlan () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyPlan); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Quantity Used. - @param QtySpent - Quantity used for this event - */ - public void setQtySpent (BigDecimal QtySpent) - { - set_Value (COLUMNNAME_QtySpent, QtySpent); - } - - /** Get Quantity Used. - @return Quantity used for this event - */ - public BigDecimal getQtySpent () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtySpent); - if (bd == null) - return Env.ZERO; - return bd; - } - - public I_R_Category getR_Category() throws Exception - { - Class clazz = MTable.getClass(I_R_Category.Table_Name); - I_R_Category result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_Category_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Category. - @param R_Category_ID - Request Category - */ - public void setR_Category_ID (int R_Category_ID) - { - if (R_Category_ID < 1) - set_Value (COLUMNNAME_R_Category_ID, null); - else - set_Value (COLUMNNAME_R_Category_ID, Integer.valueOf(R_Category_ID)); - } - - /** Get Category. - @return Request Category - */ - public int getR_Category_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_Category_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_R_Group getR_Group() throws Exception - { - Class clazz = MTable.getClass(I_R_Group.Table_Name); - I_R_Group result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_Group)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_Group_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Group. - @param R_Group_ID - Request Group - */ - public void setR_Group_ID (int R_Group_ID) - { - if (R_Group_ID < 1) - set_Value (COLUMNNAME_R_Group_ID, null); - else - set_Value (COLUMNNAME_R_Group_ID, Integer.valueOf(R_Group_ID)); - } - - /** Get Group. - @return Request Group - */ - public int getR_Group_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_Group_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_R_MailText getR_MailText() throws Exception - { - Class clazz = MTable.getClass(I_R_MailText.Table_Name); - I_R_MailText result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_MailText)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_MailText_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Mail Template. - @param R_MailText_ID - Text templates for mailings - */ - public void setR_MailText_ID (int R_MailText_ID) - { - if (R_MailText_ID < 1) - set_Value (COLUMNNAME_R_MailText_ID, null); - else - set_Value (COLUMNNAME_R_MailText_ID, Integer.valueOf(R_MailText_ID)); - } - - /** Get Mail Template. - @return Text templates for mailings - */ - public int getR_MailText_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_MailText_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** R_RequestRelated_ID AD_Reference_ID=341 */ - public static final int R_REQUESTRELATED_ID_AD_Reference_ID=341; - /** Set Related Request. - @param R_RequestRelated_ID - Related Request (Master Issue, ..) - */ - public void setR_RequestRelated_ID (int R_RequestRelated_ID) - { - if (R_RequestRelated_ID < 1) - set_Value (COLUMNNAME_R_RequestRelated_ID, null); - else - set_Value (COLUMNNAME_R_RequestRelated_ID, Integer.valueOf(R_RequestRelated_ID)); - } - - /** Get Related Request. - @return Related Request (Master Issue, ..) - */ - public int getR_RequestRelated_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_RequestRelated_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_R_RequestType getR_RequestType() throws Exception - { - Class clazz = MTable.getClass(I_R_RequestType.Table_Name); - I_R_RequestType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_RequestType)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_RequestType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Request Type. - @param R_RequestType_ID - Type of request (e.g. Inquiry, Complaint, ..) - */ - public void setR_RequestType_ID (int R_RequestType_ID) - { - if (R_RequestType_ID < 1) - throw new IllegalArgumentException ("R_RequestType_ID is mandatory."); - set_Value (COLUMNNAME_R_RequestType_ID, Integer.valueOf(R_RequestType_ID)); - } - - /** Get Request Type. - @return Type of request (e.g. Inquiry, Complaint, ..) - */ - public int getR_RequestType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_RequestType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Request. - @param R_Request_ID - Request from a Business Partner or Prospect - */ - public void setR_Request_ID (int R_Request_ID) - { - if (R_Request_ID < 1) - throw new IllegalArgumentException ("R_Request_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_R_Request_ID, Integer.valueOf(R_Request_ID)); - } - - /** Get Request. - @return Request from a Business Partner or Prospect - */ - public int getR_Request_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_Request_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_R_Resolution getR_Resolution() throws Exception - { - Class clazz = MTable.getClass(I_R_Resolution.Table_Name); - I_R_Resolution result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_Resolution)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_Resolution_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Resolution. - @param R_Resolution_ID - Request Resolution - */ - public void setR_Resolution_ID (int R_Resolution_ID) - { - if (R_Resolution_ID < 1) - set_Value (COLUMNNAME_R_Resolution_ID, null); - else - set_Value (COLUMNNAME_R_Resolution_ID, Integer.valueOf(R_Resolution_ID)); - } - - /** Get Resolution. - @return Request Resolution - */ - public int getR_Resolution_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_Resolution_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_R_StandardResponse getR_StandardResponse() throws Exception - { - Class clazz = MTable.getClass(I_R_StandardResponse.Table_Name); - I_R_StandardResponse result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_StandardResponse)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_StandardResponse_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Standard Response. - @param R_StandardResponse_ID - Request Standard Response - */ - public void setR_StandardResponse_ID (int R_StandardResponse_ID) - { - if (R_StandardResponse_ID < 1) - set_Value (COLUMNNAME_R_StandardResponse_ID, null); - else - set_Value (COLUMNNAME_R_StandardResponse_ID, Integer.valueOf(R_StandardResponse_ID)); - } - - /** Get Standard Response. - @return Request Standard Response - */ - public int getR_StandardResponse_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_StandardResponse_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_R_Status getR_Status() throws Exception - { - Class clazz = MTable.getClass(I_R_Status.Table_Name); - I_R_Status result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_Status)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_Status_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Status. - @param R_Status_ID - Request Status - */ - public void setR_Status_ID (int R_Status_ID) - { - if (R_Status_ID < 1) - set_Value (COLUMNNAME_R_Status_ID, null); - else - set_Value (COLUMNNAME_R_Status_ID, Integer.valueOf(R_Status_ID)); - } - - /** Get Status. - @return Request Status - */ - public int getR_Status_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_R_Status_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Record ID. - @param Record_ID - Direct internal record ID - */ - public void setRecord_ID (int Record_ID) - { - if (Record_ID < 1) - set_ValueNoCheck (COLUMNNAME_Record_ID, null); - else - set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID)); - } - - /** Get Record ID. - @return Direct internal record ID - */ - public int getRecord_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Request Amount. - @param RequestAmt - Amount associated with this request - */ - public void setRequestAmt (BigDecimal RequestAmt) - { - if (RequestAmt == null) - throw new IllegalArgumentException ("RequestAmt is mandatory."); - set_Value (COLUMNNAME_RequestAmt, RequestAmt); - } - - /** Get Request Amount. - @return Amount associated with this request - */ - public BigDecimal getRequestAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_RequestAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Result. - @param Result - Result of the action taken - */ - public void setResult (String Result) - { - - if (Result != null && Result.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - Result = Result.substring(0, 2000); - } - set_Value (COLUMNNAME_Result, Result); - } - - /** Get Result. - @return Result of the action taken - */ - public String getResult () - { - return (String)get_Value(COLUMNNAME_Result); - } - - /** SalesRep_ID AD_Reference_ID=286 */ - public static final int SALESREP_ID_AD_Reference_ID=286; - /** Set Sales Representative. - @param SalesRep_ID - Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID) - { - if (SalesRep_ID < 1) - throw new IllegalArgumentException ("SalesRep_ID is mandatory."); - set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_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(); - } - - /** Set Start Date. - @param StartDate - First effective day (inclusive) - */ - public void setStartDate (Timestamp StartDate) - { - set_Value (COLUMNNAME_StartDate, StartDate); - } - - /** Get Start Date. - @return First effective day (inclusive) - */ - public Timestamp getStartDate () - { - return (Timestamp)get_Value(COLUMNNAME_StartDate); - } - - /** Set Start Time. - @param StartTime - Time started - */ - public void setStartTime (Timestamp StartTime) - { - set_Value (COLUMNNAME_StartTime, StartTime); - } - - /** Get Start Time. - @return Time started - */ - public Timestamp getStartTime () - { - return (Timestamp)get_Value(COLUMNNAME_StartTime); - } - - /** Set Summary. - @param Summary - Textual summary of this request - */ - public void setSummary (String Summary) - { - if (Summary == null) - throw new IllegalArgumentException ("Summary is mandatory."); - - if (Summary.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - Summary = Summary.substring(0, 2000); - } - set_Value (COLUMNNAME_Summary, Summary); - } - - /** Get Summary. - @return Textual summary of this request - */ - public String getSummary () - { - return (String)get_Value(COLUMNNAME_Summary); - } - - /** TaskStatus AD_Reference_ID=366 */ - public static final int TASKSTATUS_AD_Reference_ID=366; - /** 0% Not Started = 0 */ - public static final String TASKSTATUS_0NotStarted = "0"; - /** 100% Complete = D */ - public static final String TASKSTATUS_100Complete = "D"; - /** 20% Started = 2 */ - public static final String TASKSTATUS_20Started = "2"; - /** 80% Nearly Done = 8 */ - public static final String TASKSTATUS_80NearlyDone = "8"; - /** 40% Busy = 4 */ - public static final String TASKSTATUS_40Busy = "4"; - /** 60% Good Progress = 6 */ - public static final String TASKSTATUS_60GoodProgress = "6"; - /** 90% Finishing = 9 */ - public static final String TASKSTATUS_90Finishing = "9"; - /** 95% Almost Done = A */ - public static final String TASKSTATUS_95AlmostDone = "A"; - /** 99% Cleaning up = C */ - public static final String TASKSTATUS_99CleaningUp = "C"; - /** Set Task Status. - @param TaskStatus - Status of the Task - */ - public void setTaskStatus (String TaskStatus) - { - - if (TaskStatus == null || TaskStatus.equals("0") || TaskStatus.equals("D") || TaskStatus.equals("2") || TaskStatus.equals("8") || TaskStatus.equals("4") || TaskStatus.equals("6") || TaskStatus.equals("9") || TaskStatus.equals("A") || TaskStatus.equals("C")); else throw new IllegalArgumentException ("TaskStatus Invalid value - " + TaskStatus + " - Reference_ID=366 - 0 - D - 2 - 8 - 4 - 6 - 9 - A - C"); - if (TaskStatus != null && TaskStatus.length() > 1) - { - log.warning("Length > 1 - truncated"); - TaskStatus = TaskStatus.substring(0, 1); - } - set_Value (COLUMNNAME_TaskStatus, TaskStatus); - } - - /** Get Task Status. - @return Status of the Task - */ - public String getTaskStatus () - { - return (String)get_Value(COLUMNNAME_TaskStatus); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_R_RequestAction.java b/base/src/org/compiere/model/X_R_RequestAction.java index 1f2f0aa7d1..629efc2936 100644 --- a/base/src/org/compiere/model/X_R_RequestAction.java +++ b/base/src/org/compiere/model/X_R_RequestAction.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for R_RequestAction * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_RequestAction extends PO implements I_R_RequestAction, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_RequestProcessor.java b/base/src/org/compiere/model/X_R_RequestProcessor.java index ccd872e7f7..3741db67f7 100644 --- a/base/src/org/compiere/model/X_R_RequestProcessor.java +++ b/base/src/org/compiere/model/X_R_RequestProcessor.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_RequestProcessor * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_RequestProcessor extends PO implements I_R_RequestProcessor, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_RequestProcessorLog.java b/base/src/org/compiere/model/X_R_RequestProcessorLog.java index 95e12f7a4e..b8a03e0358 100644 --- a/base/src/org/compiere/model/X_R_RequestProcessorLog.java +++ b/base/src/org/compiere/model/X_R_RequestProcessorLog.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for R_RequestProcessorLog * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_RequestProcessorLog extends PO implements I_R_RequestProcessorLog, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_RequestProcessor_Route.java b/base/src/org/compiere/model/X_R_RequestProcessor_Route.java index 7b5f0c9a2c..c4aab12943 100644 --- a/base/src/org/compiere/model/X_R_RequestProcessor_Route.java +++ b/base/src/org/compiere/model/X_R_RequestProcessor_Route.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_RequestProcessor_Route * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_RequestProcessor_Route extends PO implements I_R_RequestProcessor_Route, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_RequestType.java b/base/src/org/compiere/model/X_R_RequestType.java index 1a0b99ff3a..e2a69a465e 100644 --- a/base/src/org/compiere/model/X_R_RequestType.java +++ b/base/src/org/compiere/model/X_R_RequestType.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_RequestType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_RequestType extends PO implements I_R_RequestType, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_RequestTypeUpdates.java b/base/src/org/compiere/model/X_R_RequestTypeUpdates.java index 98488a98b4..5e72640f11 100644 --- a/base/src/org/compiere/model/X_R_RequestTypeUpdates.java +++ b/base/src/org/compiere/model/X_R_RequestTypeUpdates.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for R_RequestTypeUpdates * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_RequestTypeUpdates extends PO implements I_R_RequestTypeUpdates, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_RequestUpdate.java b/base/src/org/compiere/model/X_R_RequestUpdate.java index 801918e1e6..ddc7b3b058 100644 --- a/base/src/org/compiere/model/X_R_RequestUpdate.java +++ b/base/src/org/compiere/model/X_R_RequestUpdate.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_RequestUpdate * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_RequestUpdate extends PO implements I_R_RequestUpdate, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_RequestUpdates.java b/base/src/org/compiere/model/X_R_RequestUpdates.java index 4ed610ec68..8c45785c4c 100644 --- a/base/src/org/compiere/model/X_R_RequestUpdates.java +++ b/base/src/org/compiere/model/X_R_RequestUpdates.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for R_RequestUpdates * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_RequestUpdates extends PO implements I_R_RequestUpdates, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_Resolution.java b/base/src/org/compiere/model/X_R_Resolution.java index 40605269d0..3cf1bb94c0 100644 --- a/base/src/org/compiere/model/X_R_Resolution.java +++ b/base/src/org/compiere/model/X_R_Resolution.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_Resolution * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_Resolution extends PO implements I_R_Resolution, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_StandardResponse.java b/base/src/org/compiere/model/X_R_StandardResponse.java index a6cc7a4669..6731793b61 100644 --- a/base/src/org/compiere/model/X_R_StandardResponse.java +++ b/base/src/org/compiere/model/X_R_StandardResponse.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_StandardResponse * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_StandardResponse extends PO implements I_R_StandardResponse, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_Status.java b/base/src/org/compiere/model/X_R_Status.java index 545a971e16..ada9b4a5a4 100644 --- a/base/src/org/compiere/model/X_R_Status.java +++ b/base/src/org/compiere/model/X_R_Status.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_Status * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_Status extends PO implements I_R_Status, I_Persistent { diff --git a/base/src/org/compiere/model/X_R_StatusCategory.java b/base/src/org/compiere/model/X_R_StatusCategory.java index 538ef8bd4a..e883afc93b 100644 --- a/base/src/org/compiere/model/X_R_StatusCategory.java +++ b/base/src/org/compiere/model/X_R_StatusCategory.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for R_StatusCategory * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_R_StatusCategory extends PO implements I_R_StatusCategory, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_ExpenseType.java b/base/src/org/compiere/model/X_S_ExpenseType.java index a429dcda51..43deb525cc 100644 --- a/base/src/org/compiere/model/X_S_ExpenseType.java +++ b/base/src/org/compiere/model/X_S_ExpenseType.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_ExpenseType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_ExpenseType extends PO implements I_S_ExpenseType, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_ResourceAssignment.java b/base/src/org/compiere/model/X_S_ResourceAssignment.java index 33382d5d08..06cc1cec65 100644 --- a/base/src/org/compiere/model/X_S_ResourceAssignment.java +++ b/base/src/org/compiere/model/X_S_ResourceAssignment.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_ResourceAssignment * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_ResourceAssignment extends PO implements I_S_ResourceAssignment, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_ResourceType.java b/base/src/org/compiere/model/X_S_ResourceType.java index 9865fa6813..3f0f115e93 100644 --- a/base/src/org/compiere/model/X_S_ResourceType.java +++ b/base/src/org/compiere/model/X_S_ResourceType.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_ResourceType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_ResourceType extends PO implements I_S_ResourceType, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_ResourceUnAvailable.java b/base/src/org/compiere/model/X_S_ResourceUnAvailable.java index 9340fbf025..7aa06436aa 100644 --- a/base/src/org/compiere/model/X_S_ResourceUnAvailable.java +++ b/base/src/org/compiere/model/X_S_ResourceUnAvailable.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_ResourceUnAvailable * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_ResourceUnAvailable extends PO implements I_S_ResourceUnAvailable, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_TimeExpense.java b/base/src/org/compiere/model/X_S_TimeExpense.java index acc860183f..871ebf5141 100644 --- a/base/src/org/compiere/model/X_S_TimeExpense.java +++ b/base/src/org/compiere/model/X_S_TimeExpense.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_TimeExpense * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_TimeExpense extends PO implements I_S_TimeExpense, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_TimeExpenseLine.java b/base/src/org/compiere/model/X_S_TimeExpenseLine.java index badf1cf294..e28310f391 100644 --- a/base/src/org/compiere/model/X_S_TimeExpenseLine.java +++ b/base/src/org/compiere/model/X_S_TimeExpenseLine.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_TimeExpenseLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_TimeExpenseLine extends PO implements I_S_TimeExpenseLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_TimeType.java b/base/src/org/compiere/model/X_S_TimeType.java index d769cea8a2..053c6ec7d9 100644 --- a/base/src/org/compiere/model/X_S_TimeType.java +++ b/base/src/org/compiere/model/X_S_TimeType.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_TimeType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_TimeType extends PO implements I_S_TimeType, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_Training.java b/base/src/org/compiere/model/X_S_Training.java index 2fceb84f1a..a658eb40b6 100644 --- a/base/src/org/compiere/model/X_S_Training.java +++ b/base/src/org/compiere/model/X_S_Training.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_Training * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_Training extends PO implements I_S_Training, I_Persistent { diff --git a/base/src/org/compiere/model/X_S_Training_Class.java b/base/src/org/compiere/model/X_S_Training_Class.java index ba14a1b86f..7ddc7184b6 100644 --- a/base/src/org/compiere/model/X_S_Training_Class.java +++ b/base/src/org/compiere/model/X_S_Training_Class.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for S_Training_Class * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_S_Training_Class extends PO implements I_S_Training_Class, I_Persistent { diff --git a/base/src/org/compiere/model/X_T_Aging.java b/base/src/org/compiere/model/X_T_Aging.java deleted file mode 100644 index f16ead4102..0000000000 --- a/base/src/org/compiere/model/X_T_Aging.java +++ /dev/null @@ -1,985 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.sql.Timestamp; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; - -/** Generated Model for T_Aging - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_T_Aging extends PO implements I_T_Aging, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_T_Aging (Properties ctx, int T_Aging_ID, String trxName) - { - super (ctx, T_Aging_ID, trxName); - /** if (T_Aging_ID == 0) - { - setAD_PInstance_ID (0); - setC_BP_Group_ID (0); - setC_BPartner_ID (0); - setC_Currency_ID (0); - setDue0 (Env.ZERO); - setDue0_30 (Env.ZERO); - setDue0_7 (Env.ZERO); - setDue1_7 (Env.ZERO); - setDue31_60 (Env.ZERO); - setDue31_Plus (Env.ZERO); - setDue61_90 (Env.ZERO); - setDue61_Plus (Env.ZERO); - setDue8_30 (Env.ZERO); - setDue91_Plus (Env.ZERO); - setDueAmt (Env.ZERO); - setDueDate (new Timestamp(System.currentTimeMillis())); - setInvoicedAmt (Env.ZERO); - setIsListInvoices (false); - setIsSOTrx (false); - setOpenAmt (Env.ZERO); - setPastDue1_30 (Env.ZERO); - setPastDue1_7 (Env.ZERO); - setPastDue31_60 (Env.ZERO); - setPastDue31_Plus (Env.ZERO); - setPastDue61_90 (Env.ZERO); - setPastDue61_Plus (Env.ZERO); - setPastDue8_30 (Env.ZERO); - setPastDue91_Plus (Env.ZERO); - setPastDueAmt (Env.ZERO); - setStatementDate (new Timestamp(System.currentTimeMillis())); - } */ - } - - /** Load Constructor */ - public X_T_Aging (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() - { - StringBuffer sb = new StringBuffer ("X_T_Aging[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_AD_PInstance getAD_PInstance() throws Exception - { - Class clazz = MTable.getClass(I_AD_PInstance.Table_Name); - I_AD_PInstance result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_PInstance)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_PInstance_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Process Instance. - @param AD_PInstance_ID - Instance of the process - */ - public void setAD_PInstance_ID (int AD_PInstance_ID) - { - if (AD_PInstance_ID < 1) - throw new IllegalArgumentException ("AD_PInstance_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_PInstance_ID, Integer.valueOf(AD_PInstance_ID)); - } - - /** Get Process Instance. - @return Instance of the process - */ - public int getAD_PInstance_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Activity getC_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID < 1) - set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BP_Group getC_BP_Group() throws Exception - { - Class clazz = MTable.getClass(I_C_BP_Group.Table_Name); - I_C_BP_Group result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BP_Group)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BP_Group_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner Group. - @param C_BP_Group_ID - Business Partner Group - */ - public void setC_BP_Group_ID (int C_BP_Group_ID) - { - if (C_BP_Group_ID < 1) - throw new IllegalArgumentException ("C_BP_Group_ID is mandatory."); - set_Value (COLUMNNAME_C_BP_Group_ID, Integer.valueOf(C_BP_Group_ID)); - } - - /** Get Business Partner Group. - @return Business Partner Group - */ - public int getC_BP_Group_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_Group_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - throw new IllegalArgumentException ("C_BPartner_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_Campaign getC_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID < 1) - set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getC_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID < 1) - throw new IllegalArgumentException ("C_Currency_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** 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 I_C_InvoicePaySchedule getC_InvoicePaySchedule() throws Exception - { - Class clazz = MTable.getClass(I_C_InvoicePaySchedule.Table_Name); - I_C_InvoicePaySchedule result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_InvoicePaySchedule)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_InvoicePaySchedule_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Invoice Payment Schedule. - @param C_InvoicePaySchedule_ID - Invoice Payment Schedule - */ - public void setC_InvoicePaySchedule_ID (int C_InvoicePaySchedule_ID) - { - if (C_InvoicePaySchedule_ID < 1) - set_Value (COLUMNNAME_C_InvoicePaySchedule_ID, null); - else - set_Value (COLUMNNAME_C_InvoicePaySchedule_ID, Integer.valueOf(C_InvoicePaySchedule_ID)); - } - - /** Get Invoice Payment Schedule. - @return Invoice Payment Schedule - */ - public int getC_InvoicePaySchedule_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_InvoicePaySchedule_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Invoice getC_Invoice() throws Exception - { - Class clazz = MTable.getClass(I_C_Invoice.Table_Name); - I_C_Invoice result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Invoice)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Invoice_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Invoice. - @param C_Invoice_ID - Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID) - { - if (C_Invoice_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID)); - } - - /** Get Invoice. - @return Invoice Identifier - */ - public int getC_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Project getC_Project() throws Exception - { - Class clazz = MTable.getClass(I_C_Project.Table_Name); - I_C_Project result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID < 1) - set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Days due. - @param DaysDue - Number of days due (negative: due in number of days) - */ - public void setDaysDue (int DaysDue) - { - set_Value (COLUMNNAME_DaysDue, Integer.valueOf(DaysDue)); - } - - /** Get Days due. - @return Number of days due (negative: due in number of days) - */ - public int getDaysDue () - { - Integer ii = (Integer)get_Value(COLUMNNAME_DaysDue); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Due Today. - @param Due0 Due Today */ - public void setDue0 (BigDecimal Due0) - { - if (Due0 == null) - throw new IllegalArgumentException ("Due0 is mandatory."); - set_Value (COLUMNNAME_Due0, Due0); - } - - /** Get Due Today. - @return Due Today */ - public BigDecimal getDue0 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due0); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due Today-30. - @param Due0_30 Due Today-30 */ - public void setDue0_30 (BigDecimal Due0_30) - { - if (Due0_30 == null) - throw new IllegalArgumentException ("Due0_30 is mandatory."); - set_Value (COLUMNNAME_Due0_30, Due0_30); - } - - /** Get Due Today-30. - @return Due Today-30 */ - public BigDecimal getDue0_30 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due0_30); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due Today-7. - @param Due0_7 Due Today-7 */ - public void setDue0_7 (BigDecimal Due0_7) - { - if (Due0_7 == null) - throw new IllegalArgumentException ("Due0_7 is mandatory."); - set_Value (COLUMNNAME_Due0_7, Due0_7); - } - - /** Get Due Today-7. - @return Due Today-7 */ - public BigDecimal getDue0_7 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due0_7); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due 1-7. - @param Due1_7 Due 1-7 */ - public void setDue1_7 (BigDecimal Due1_7) - { - if (Due1_7 == null) - throw new IllegalArgumentException ("Due1_7 is mandatory."); - set_Value (COLUMNNAME_Due1_7, Due1_7); - } - - /** Get Due 1-7. - @return Due 1-7 */ - public BigDecimal getDue1_7 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due1_7); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due 31-60. - @param Due31_60 Due 31-60 */ - public void setDue31_60 (BigDecimal Due31_60) - { - if (Due31_60 == null) - throw new IllegalArgumentException ("Due31_60 is mandatory."); - set_Value (COLUMNNAME_Due31_60, Due31_60); - } - - /** Get Due 31-60. - @return Due 31-60 */ - public BigDecimal getDue31_60 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due31_60); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due > 31. - @param Due31_Plus Due > 31 */ - public void setDue31_Plus (BigDecimal Due31_Plus) - { - if (Due31_Plus == null) - throw new IllegalArgumentException ("Due31_Plus is mandatory."); - set_Value (COLUMNNAME_Due31_Plus, Due31_Plus); - } - - /** Get Due > 31. - @return Due > 31 */ - public BigDecimal getDue31_Plus () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due31_Plus); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due 61-90. - @param Due61_90 Due 61-90 */ - public void setDue61_90 (BigDecimal Due61_90) - { - if (Due61_90 == null) - throw new IllegalArgumentException ("Due61_90 is mandatory."); - set_Value (COLUMNNAME_Due61_90, Due61_90); - } - - /** Get Due 61-90. - @return Due 61-90 */ - public BigDecimal getDue61_90 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due61_90); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due > 61. - @param Due61_Plus Due > 61 */ - public void setDue61_Plus (BigDecimal Due61_Plus) - { - if (Due61_Plus == null) - throw new IllegalArgumentException ("Due61_Plus is mandatory."); - set_Value (COLUMNNAME_Due61_Plus, Due61_Plus); - } - - /** Get Due > 61. - @return Due > 61 */ - public BigDecimal getDue61_Plus () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due61_Plus); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due 8-30. - @param Due8_30 Due 8-30 */ - public void setDue8_30 (BigDecimal Due8_30) - { - if (Due8_30 == null) - throw new IllegalArgumentException ("Due8_30 is mandatory."); - set_Value (COLUMNNAME_Due8_30, Due8_30); - } - - /** Get Due 8-30. - @return Due 8-30 */ - public BigDecimal getDue8_30 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due8_30); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due > 91. - @param Due91_Plus Due > 91 */ - public void setDue91_Plus (BigDecimal Due91_Plus) - { - if (Due91_Plus == null) - throw new IllegalArgumentException ("Due91_Plus is mandatory."); - set_Value (COLUMNNAME_Due91_Plus, Due91_Plus); - } - - /** Get Due > 91. - @return Due > 91 */ - public BigDecimal getDue91_Plus () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due91_Plus); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Amount due. - @param DueAmt - Amount of the payment due - */ - public void setDueAmt (BigDecimal DueAmt) - { - if (DueAmt == null) - throw new IllegalArgumentException ("DueAmt is mandatory."); - set_Value (COLUMNNAME_DueAmt, DueAmt); - } - - /** Get Amount due. - @return Amount of the payment due - */ - public BigDecimal getDueAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DueAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Due Date. - @param DueDate - Date when the payment is due - */ - public void setDueDate (Timestamp DueDate) - { - if (DueDate == null) - throw new IllegalArgumentException ("DueDate is mandatory."); - set_Value (COLUMNNAME_DueDate, DueDate); - } - - /** Get Due Date. - @return Date when the payment is due - */ - public Timestamp getDueDate () - { - return (Timestamp)get_Value(COLUMNNAME_DueDate); - } - - /** Set Invoiced Amount. - @param InvoicedAmt - The amount invoiced - */ - public void setInvoicedAmt (BigDecimal InvoicedAmt) - { - if (InvoicedAmt == null) - throw new IllegalArgumentException ("InvoicedAmt is mandatory."); - set_Value (COLUMNNAME_InvoicedAmt, InvoicedAmt); - } - - /** Get Invoiced Amount. - @return The amount invoiced - */ - public BigDecimal getInvoicedAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_InvoicedAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set List Invoices. - @param IsListInvoices - Include List of Invoices - */ - public void setIsListInvoices (boolean IsListInvoices) - { - set_Value (COLUMNNAME_IsListInvoices, Boolean.valueOf(IsListInvoices)); - } - - /** Get List Invoices. - @return Include List of Invoices - */ - public boolean isListInvoices () - { - Object oo = get_Value(COLUMNNAME_IsListInvoices); - 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_Value (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 Open Amount. - @param OpenAmt - Open item amount - */ - public void setOpenAmt (BigDecimal OpenAmt) - { - if (OpenAmt == null) - throw new IllegalArgumentException ("OpenAmt is mandatory."); - set_Value (COLUMNNAME_OpenAmt, OpenAmt); - } - - /** Get Open Amount. - @return Open item amount - */ - public BigDecimal getOpenAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OpenAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due 1-30. - @param PastDue1_30 Past Due 1-30 */ - public void setPastDue1_30 (BigDecimal PastDue1_30) - { - if (PastDue1_30 == null) - throw new IllegalArgumentException ("PastDue1_30 is mandatory."); - set_Value (COLUMNNAME_PastDue1_30, PastDue1_30); - } - - /** Get Past Due 1-30. - @return Past Due 1-30 */ - public BigDecimal getPastDue1_30 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue1_30); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due 1-7. - @param PastDue1_7 Past Due 1-7 */ - public void setPastDue1_7 (BigDecimal PastDue1_7) - { - if (PastDue1_7 == null) - throw new IllegalArgumentException ("PastDue1_7 is mandatory."); - set_Value (COLUMNNAME_PastDue1_7, PastDue1_7); - } - - /** Get Past Due 1-7. - @return Past Due 1-7 */ - public BigDecimal getPastDue1_7 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue1_7); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due 31-60. - @param PastDue31_60 Past Due 31-60 */ - public void setPastDue31_60 (BigDecimal PastDue31_60) - { - if (PastDue31_60 == null) - throw new IllegalArgumentException ("PastDue31_60 is mandatory."); - set_Value (COLUMNNAME_PastDue31_60, PastDue31_60); - } - - /** Get Past Due 31-60. - @return Past Due 31-60 */ - public BigDecimal getPastDue31_60 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue31_60); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due > 31. - @param PastDue31_Plus Past Due > 31 */ - public void setPastDue31_Plus (BigDecimal PastDue31_Plus) - { - if (PastDue31_Plus == null) - throw new IllegalArgumentException ("PastDue31_Plus is mandatory."); - set_Value (COLUMNNAME_PastDue31_Plus, PastDue31_Plus); - } - - /** Get Past Due > 31. - @return Past Due > 31 */ - public BigDecimal getPastDue31_Plus () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue31_Plus); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due 61-90. - @param PastDue61_90 Past Due 61-90 */ - public void setPastDue61_90 (BigDecimal PastDue61_90) - { - if (PastDue61_90 == null) - throw new IllegalArgumentException ("PastDue61_90 is mandatory."); - set_Value (COLUMNNAME_PastDue61_90, PastDue61_90); - } - - /** Get Past Due 61-90. - @return Past Due 61-90 */ - public BigDecimal getPastDue61_90 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue61_90); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due > 61. - @param PastDue61_Plus Past Due > 61 */ - public void setPastDue61_Plus (BigDecimal PastDue61_Plus) - { - if (PastDue61_Plus == null) - throw new IllegalArgumentException ("PastDue61_Plus is mandatory."); - set_Value (COLUMNNAME_PastDue61_Plus, PastDue61_Plus); - } - - /** Get Past Due > 61. - @return Past Due > 61 */ - public BigDecimal getPastDue61_Plus () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue61_Plus); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due 8-30. - @param PastDue8_30 Past Due 8-30 */ - public void setPastDue8_30 (BigDecimal PastDue8_30) - { - if (PastDue8_30 == null) - throw new IllegalArgumentException ("PastDue8_30 is mandatory."); - set_Value (COLUMNNAME_PastDue8_30, PastDue8_30); - } - - /** Get Past Due 8-30. - @return Past Due 8-30 */ - public BigDecimal getPastDue8_30 () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue8_30); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due > 91. - @param PastDue91_Plus Past Due > 91 */ - public void setPastDue91_Plus (BigDecimal PastDue91_Plus) - { - if (PastDue91_Plus == null) - throw new IllegalArgumentException ("PastDue91_Plus is mandatory."); - set_Value (COLUMNNAME_PastDue91_Plus, PastDue91_Plus); - } - - /** Get Past Due > 91. - @return Past Due > 91 */ - public BigDecimal getPastDue91_Plus () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDue91_Plus); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Past Due. - @param PastDueAmt Past Due */ - public void setPastDueAmt (BigDecimal PastDueAmt) - { - if (PastDueAmt == null) - throw new IllegalArgumentException ("PastDueAmt is mandatory."); - set_Value (COLUMNNAME_PastDueAmt, PastDueAmt); - } - - /** Get Past Due. - @return Past Due */ - public BigDecimal getPastDueAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PastDueAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Statement date. - @param StatementDate - Date of the statement - */ - public void setStatementDate (Timestamp StatementDate) - { - if (StatementDate == null) - throw new IllegalArgumentException ("StatementDate is mandatory."); - set_Value (COLUMNNAME_StatementDate, StatementDate); - } - - /** Get Statement date. - @return Date of the statement - */ - public Timestamp getStatementDate () - { - return (Timestamp)get_Value(COLUMNNAME_StatementDate); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_T_DistributionRunDetail.java b/base/src/org/compiere/model/X_T_DistributionRunDetail.java index 5cd54b80cb..66b06a937a 100644 --- a/base/src/org/compiere/model/X_T_DistributionRunDetail.java +++ b/base/src/org/compiere/model/X_T_DistributionRunDetail.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for T_DistributionRunDetail * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_T_DistributionRunDetail extends PO implements I_T_DistributionRunDetail, I_Persistent { diff --git a/base/src/org/compiere/model/X_T_InventoryValue.java b/base/src/org/compiere/model/X_T_InventoryValue.java index 165b63cfdd..236557f3f0 100644 --- a/base/src/org/compiere/model/X_T_InventoryValue.java +++ b/base/src/org/compiere/model/X_T_InventoryValue.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for T_InventoryValue * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_T_InventoryValue extends PO implements I_T_InventoryValue, I_Persistent { diff --git a/base/src/org/compiere/model/X_T_InvoiceGL.java b/base/src/org/compiere/model/X_T_InvoiceGL.java index d79d910f06..9ba886ff74 100644 --- a/base/src/org/compiere/model/X_T_InvoiceGL.java +++ b/base/src/org/compiere/model/X_T_InvoiceGL.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for T_InvoiceGL * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_T_InvoiceGL extends PO implements I_T_InvoiceGL, I_Persistent { diff --git a/base/src/org/compiere/model/X_T_Replenish.java b/base/src/org/compiere/model/X_T_Replenish.java deleted file mode 100644 index f881315648..0000000000 --- a/base/src/org/compiere/model/X_T_Replenish.java +++ /dev/null @@ -1,524 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 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.compiere.model; - -import java.lang.reflect.Constructor; -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.Env; - -/** Generated Model for T_Replenish - * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_T_Replenish extends PO implements I_T_Replenish, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_T_Replenish (Properties ctx, int T_Replenish_ID, String trxName) - { - super (ctx, T_Replenish_ID, trxName); - /** if (T_Replenish_ID == 0) - { - setAD_PInstance_ID (0); - setC_BPartner_ID (0); - setLevel_Max (Env.ZERO); - setLevel_Min (Env.ZERO); - setM_Product_ID (0); - setM_Warehouse_ID (0); - setReplenishType (null); - } */ - } - - /** Load Constructor */ - public X_T_Replenish (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() - { - StringBuffer sb = new StringBuffer ("X_T_Replenish[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_AD_PInstance getAD_PInstance() throws Exception - { - Class clazz = MTable.getClass(I_AD_PInstance.Table_Name); - I_AD_PInstance result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_PInstance)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_PInstance_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Process Instance. - @param AD_PInstance_ID - Instance of the process - */ - public void setAD_PInstance_ID (int AD_PInstance_ID) - { - if (AD_PInstance_ID < 1) - throw new IllegalArgumentException ("AD_PInstance_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_PInstance_ID, Integer.valueOf(AD_PInstance_ID)); - } - - /** Get Process Instance. - @return Instance of the process - */ - public int getAD_PInstance_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BPartner getC_BPartner() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner.Table_Name); - I_C_BPartner result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID < 1) - throw new IllegalArgumentException ("C_BPartner_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** 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 I_C_DocType getC_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID < 1) - set_Value (COLUMNNAME_C_DocType_ID, null); - else - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Maximum Level. - @param Level_Max - Maximum Inventory level for this product - */ - public void setLevel_Max (BigDecimal Level_Max) - { - if (Level_Max == null) - throw new IllegalArgumentException ("Level_Max is mandatory."); - set_Value (COLUMNNAME_Level_Max, Level_Max); - } - - /** Get Maximum Level. - @return Maximum Inventory level for this product - */ - public BigDecimal getLevel_Max () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Level_Max); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Minimum Level. - @param Level_Min - Minimum Inventory level for this product - */ - public void setLevel_Min (BigDecimal Level_Min) - { - if (Level_Min == null) - throw new IllegalArgumentException ("Level_Min is mandatory."); - set_Value (COLUMNNAME_Level_Min, Level_Min); - } - - /** Get Minimum Level. - @return Minimum Inventory level for this product - */ - public BigDecimal getLevel_Min () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Level_Min); - if (bd == null) - return Env.ZERO; - return bd; - } - - public I_M_Product getM_Product() throws Exception - { - Class clazz = MTable.getClass(I_M_Product.Table_Name); - I_M_Product result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - throw new IllegalArgumentException ("M_Product_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** M_WarehouseSource_ID AD_Reference_ID=197 */ - public static final int M_WAREHOUSESOURCE_ID_AD_Reference_ID=197; - /** Set Source Warehouse. - @param M_WarehouseSource_ID - Optional Warehouse to replenish from - */ - public void setM_WarehouseSource_ID (int M_WarehouseSource_ID) - { - if (M_WarehouseSource_ID < 1) - set_Value (COLUMNNAME_M_WarehouseSource_ID, null); - else - set_Value (COLUMNNAME_M_WarehouseSource_ID, Integer.valueOf(M_WarehouseSource_ID)); - } - - /** Get Source Warehouse. - @return Optional Warehouse to replenish from - */ - public int getM_WarehouseSource_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_WarehouseSource_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_Warehouse getM_Warehouse() throws Exception - { - Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); - I_M_Warehouse result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Warehouse. - @param M_Warehouse_ID - Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID) - { - if (M_Warehouse_ID < 1) - throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); - } - - /** 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 Minimum Order Qty. - @param Order_Min - Minimum order quantity in UOM - */ - public void setOrder_Min (BigDecimal Order_Min) - { - set_Value (COLUMNNAME_Order_Min, Order_Min); - } - - /** Get Minimum Order Qty. - @return Minimum order quantity in UOM - */ - public BigDecimal getOrder_Min () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Min); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Order Pack Qty. - @param Order_Pack - Package order size in UOM (e.g. order set of 5 units) - */ - public void setOrder_Pack (BigDecimal Order_Pack) - { - set_Value (COLUMNNAME_Order_Pack, Order_Pack); - } - - /** Get Order Pack Qty. - @return Package order size in UOM (e.g. order set of 5 units) - */ - public BigDecimal getOrder_Pack () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Pack); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set On Hand Quantity. - @param QtyOnHand - On Hand Quantity - */ - public void setQtyOnHand (BigDecimal QtyOnHand) - { - set_Value (COLUMNNAME_QtyOnHand, QtyOnHand); - } - - /** Get On Hand Quantity. - @return On Hand Quantity - */ - public BigDecimal getQtyOnHand () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOnHand); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Ordered Quantity. - @param QtyOrdered - Ordered Quantity - */ - public void setQtyOrdered (BigDecimal QtyOrdered) - { - set_Value (COLUMNNAME_QtyOrdered, QtyOrdered); - } - - /** Get Ordered Quantity. - @return Ordered Quantity - */ - public BigDecimal getQtyOrdered () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Reserved Quantity. - @param QtyReserved - Reserved Quantity - */ - public void setQtyReserved (BigDecimal QtyReserved) - { - set_Value (COLUMNNAME_QtyReserved, QtyReserved); - } - - /** Get Reserved Quantity. - @return Reserved Quantity - */ - public BigDecimal getQtyReserved () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Quantity to Order. - @param QtyToOrder Quantity to Order */ - public void setQtyToOrder (BigDecimal QtyToOrder) - { - set_Value (COLUMNNAME_QtyToOrder, QtyToOrder); - } - - /** Get Quantity to Order. - @return Quantity to Order */ - public BigDecimal getQtyToOrder () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyToOrder); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** ReplenishType AD_Reference_ID=164 */ - public static final int REPLENISHTYPE_AD_Reference_ID=164; - /** Maintain Maximum Level = 2 */ - public static final String REPLENISHTYPE_MaintainMaximumLevel = "2"; - /** Manual = 0 */ - public static final String REPLENISHTYPE_Manual = "0"; - /** Reorder below Minimum Level = 1 */ - public static final String REPLENISHTYPE_ReorderBelowMinimumLevel = "1"; - /** Custom = 9 */ - public static final String REPLENISHTYPE_Custom = "9"; - /** Set Replenish Type. - @param ReplenishType - Method for re-ordering a product - */ - public void setReplenishType (String ReplenishType) - { - if (ReplenishType == null) throw new IllegalArgumentException ("ReplenishType is mandatory"); - if (ReplenishType.equals("2") || ReplenishType.equals("0") || ReplenishType.equals("1") || ReplenishType.equals("9")); else throw new IllegalArgumentException ("ReplenishType Invalid value - " + ReplenishType + " - Reference_ID=164 - 2 - 0 - 1 - 9"); - if (ReplenishType.length() > 1) - { - log.warning("Length > 1 - truncated"); - ReplenishType = ReplenishType.substring(0, 1); - } - set_Value (COLUMNNAME_ReplenishType, ReplenishType); - } - - /** Get Replenish Type. - @return Method for re-ordering a product - */ - public String getReplenishType () - { - return (String)get_Value(COLUMNNAME_ReplenishType); - } - - /** ReplenishmentCreate AD_Reference_ID=329 */ - public static final int REPLENISHMENTCREATE_AD_Reference_ID=329; - /** Purchase Order = POO */ - public static final String REPLENISHMENTCREATE_PurchaseOrder = "POO"; - /** Requisition = POR */ - public static final String REPLENISHMENTCREATE_Requisition = "POR"; - /** Inventory Move = MMM */ - public static final String REPLENISHMENTCREATE_InventoryMove = "MMM"; - /** Set Create. - @param ReplenishmentCreate - Create from Replenishment - */ - public void setReplenishmentCreate (String ReplenishmentCreate) - { - - if (ReplenishmentCreate == null || ReplenishmentCreate.equals("POO") || ReplenishmentCreate.equals("POR") || ReplenishmentCreate.equals("MMM")); else throw new IllegalArgumentException ("ReplenishmentCreate Invalid value - " + ReplenishmentCreate + " - Reference_ID=329 - POO - POR - MMM"); - if (ReplenishmentCreate != null && ReplenishmentCreate.length() > 1) - { - log.warning("Length > 1 - truncated"); - ReplenishmentCreate = ReplenishmentCreate.substring(0, 1); - } - set_Value (COLUMNNAME_ReplenishmentCreate, ReplenishmentCreate); - } - - /** Get Create. - @return Create from Replenishment - */ - public String getReplenishmentCreate () - { - return (String)get_Value(COLUMNNAME_ReplenishmentCreate); - } -} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_T_Report.java b/base/src/org/compiere/model/X_T_Report.java index 8a1b85a1c9..87f0a1ded2 100644 --- a/base/src/org/compiere/model/X_T_Report.java +++ b/base/src/org/compiere/model/X_T_Report.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for T_Report * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_T_Report extends PO implements I_T_Report, I_Persistent { diff --git a/base/src/org/compiere/model/X_T_ReportStatement.java b/base/src/org/compiere/model/X_T_ReportStatement.java index 31a59b11a3..d260bc7033 100644 --- a/base/src/org/compiere/model/X_T_ReportStatement.java +++ b/base/src/org/compiere/model/X_T_ReportStatement.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for T_ReportStatement * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_T_ReportStatement extends PO implements I_T_ReportStatement, I_Persistent { diff --git a/base/src/org/compiere/model/X_T_Transaction.java b/base/src/org/compiere/model/X_T_Transaction.java index 06fb1ad827..e61517c94c 100644 --- a/base/src/org/compiere/model/X_T_Transaction.java +++ b/base/src/org/compiere/model/X_T_Transaction.java @@ -27,7 +27,7 @@ import org.compiere.util.Env; /** Generated Model for T_Transaction * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_T_Transaction extends PO implements I_T_Transaction, I_Persistent { diff --git a/base/src/org/compiere/model/X_Test.java b/base/src/org/compiere/model/X_Test.java index 7bc567f753..1687757e30 100644 --- a/base/src/org/compiere/model/X_Test.java +++ b/base/src/org/compiere/model/X_Test.java @@ -28,7 +28,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for Test * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_Test extends PO implements I_Test, I_Persistent { diff --git a/base/src/org/compiere/model/X_U_BlackListCheque.java b/base/src/org/compiere/model/X_U_BlackListCheque.java index 948e1e247c..a37300dafa 100644 --- a/base/src/org/compiere/model/X_U_BlackListCheque.java +++ b/base/src/org/compiere/model/X_U_BlackListCheque.java @@ -22,7 +22,7 @@ import java.util.Properties; /** Generated Model for U_BlackListCheque * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_U_BlackListCheque extends PO implements I_U_BlackListCheque, I_Persistent { diff --git a/base/src/org/compiere/model/X_U_RoleMenu.java b/base/src/org/compiere/model/X_U_RoleMenu.java index decd94df60..e5a02340b1 100644 --- a/base/src/org/compiere/model/X_U_RoleMenu.java +++ b/base/src/org/compiere/model/X_U_RoleMenu.java @@ -24,7 +24,7 @@ import java.util.logging.Level; /** Generated Model for U_RoleMenu * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_U_RoleMenu extends PO implements I_U_RoleMenu, I_Persistent { diff --git a/base/src/org/compiere/model/X_U_WebMenu.java b/base/src/org/compiere/model/X_U_WebMenu.java index 5d5358e679..90d0b72b90 100644 --- a/base/src/org/compiere/model/X_U_WebMenu.java +++ b/base/src/org/compiere/model/X_U_WebMenu.java @@ -24,7 +24,7 @@ import org.compiere.util.Env; /** Generated Model for U_WebMenu * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_U_WebMenu extends PO implements I_U_WebMenu, I_Persistent { diff --git a/base/src/org/compiere/model/X_U_Web_Properties.java b/base/src/org/compiere/model/X_U_Web_Properties.java index 3203b48483..bf14791a8a 100644 --- a/base/src/org/compiere/model/X_U_Web_Properties.java +++ b/base/src/org/compiere/model/X_U_Web_Properties.java @@ -22,7 +22,7 @@ import java.util.Properties; /** Generated Model for U_Web_Properties * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_U_Web_Properties extends PO implements I_U_Web_Properties, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_Advertisement.java b/base/src/org/compiere/model/X_W_Advertisement.java index c8162e26fe..9ab25f9eea 100644 --- a/base/src/org/compiere/model/X_W_Advertisement.java +++ b/base/src/org/compiere/model/X_W_Advertisement.java @@ -26,7 +26,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_Advertisement * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_Advertisement extends PO implements I_W_Advertisement, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_Basket.java b/base/src/org/compiere/model/X_W_Basket.java index 62e54e81ca..ec75c24dc1 100644 --- a/base/src/org/compiere/model/X_W_Basket.java +++ b/base/src/org/compiere/model/X_W_Basket.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_Basket * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_Basket extends PO implements I_W_Basket, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_BasketLine.java b/base/src/org/compiere/model/X_W_BasketLine.java index 0cf23aa1b6..4dde415c6f 100644 --- a/base/src/org/compiere/model/X_W_BasketLine.java +++ b/base/src/org/compiere/model/X_W_BasketLine.java @@ -27,7 +27,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_BasketLine * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_BasketLine extends PO implements I_W_BasketLine, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_Click.java b/base/src/org/compiere/model/X_W_Click.java index 60bff06a61..5cc7718ef3 100644 --- a/base/src/org/compiere/model/X_W_Click.java +++ b/base/src/org/compiere/model/X_W_Click.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_Click * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_Click extends PO implements I_W_Click, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_ClickCount.java b/base/src/org/compiere/model/X_W_ClickCount.java index 4583885215..5352f8d47e 100644 --- a/base/src/org/compiere/model/X_W_ClickCount.java +++ b/base/src/org/compiere/model/X_W_ClickCount.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_ClickCount * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_ClickCount extends PO implements I_W_ClickCount, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_Counter.java b/base/src/org/compiere/model/X_W_Counter.java index 8d2f4289a4..93a830956d 100644 --- a/base/src/org/compiere/model/X_W_Counter.java +++ b/base/src/org/compiere/model/X_W_Counter.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_Counter * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_Counter extends PO implements I_W_Counter, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_CounterCount.java b/base/src/org/compiere/model/X_W_CounterCount.java index 4acef4b9f7..b7bf63d370 100644 --- a/base/src/org/compiere/model/X_W_CounterCount.java +++ b/base/src/org/compiere/model/X_W_CounterCount.java @@ -23,7 +23,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_CounterCount * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_CounterCount extends PO implements I_W_CounterCount, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_MailMsg.java b/base/src/org/compiere/model/X_W_MailMsg.java index 0856347564..1729befc02 100644 --- a/base/src/org/compiere/model/X_W_MailMsg.java +++ b/base/src/org/compiere/model/X_W_MailMsg.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_MailMsg * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_MailMsg extends PO implements I_W_MailMsg, I_Persistent { diff --git a/base/src/org/compiere/model/X_W_Store.java b/base/src/org/compiere/model/X_W_Store.java index 542560ab20..a4096bb630 100644 --- a/base/src/org/compiere/model/X_W_Store.java +++ b/base/src/org/compiere/model/X_W_Store.java @@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair; /** Generated Model for W_Store * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ + * @version Release 3.5.1a - $Id$ */ public class X_W_Store extends PO implements I_W_Store, I_Persistent { diff --git a/base/src/org/compiere/print/layout/LayoutEngine.java b/base/src/org/compiere/print/layout/LayoutEngine.java new file mode 100644 index 0000000000..a0d261e499 --- /dev/null +++ b/base/src/org/compiere/print/layout/LayoutEngine.java @@ -0,0 +1,1842 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.print.layout; + +import java.awt.*; +import java.awt.geom.*; +import java.awt.print.*; +import java.io.*; +import java.net.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import javax.print.*; +import javax.print.attribute.*; +import org.compiere.*; +import org.compiere.model.*; +import org.compiere.print.*; +import org.compiere.util.*; + +/** + * Adempiere Print Engine. + * All coordinates are relative to the Page. + * The Language setting is maintained in the format + * + * @author Jorg Janke + * @version $Id: LayoutEngine.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $ + * + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1673505 ] BarCode/Image problem when print format is not form + *
  • BF [ 1673542 ] Can't add static image in report table cell + *
  • BF [ 1673548 ] Image is not scaled in a report table cell + *
  • BF [ 1807917 ] Layout positioning issue with m_maxHeightSinceNewLine + *
  • BF [ 1825876 ] Layout boxes with auto width not working + */ +public class LayoutEngine implements Pageable, Printable, Doc +{ + /** + * Detail Constructor + * @param format Print Format + * @param data Print Data + * @param query query for parameter info + */ + public LayoutEngine (MPrintFormat format, PrintData data, MQuery query) + { + this(format, data, query, null); + } // LayoutEngine + + /** + * Detail Constructor + * @param format Print Format + * @param data Print Data + * @param query query for parameter info + * @param trxName + */ + public LayoutEngine (MPrintFormat format, PrintData data, MQuery query, String trxName) + { + m_TrxName = trxName; + log.info(format + " - " + data + " - " + query); + // s_FASTDRAW = MClient.get(format.getCtx()).isUseBetaFunctions(); + // + setPrintFormat(format, false); + setPrintData(data, query, false); + layout(); + } // LayoutEngine + + + /*************************************************************************/ + + /** Logger */ + private static CLogger log = CLogger.getCLogger (LayoutEngine.class); + /** Existing Layout */ + private boolean m_hasLayout = false; + /** The Format */ + private MPrintFormat m_format; + /** Print Context */ + private Properties m_printCtx; + /** The Data */ + private PrintData m_data; + /** The Query (parameter */ + private MQuery m_query; + /** Default Color */ + private MPrintColor m_printColor; + /** Default Font */ + private MPrintFont m_printFont; + /** Printed Column Count */ + private int m_columnCount = -1; + /** Transaction name */ + private String m_TrxName = null; + + + /** Paper - default: standard portrait */ + private CPaper m_paper; + /** Header Area Height (1/4") */ + private int m_headerHeight = 18; // 1/4" => 72/4 + /** Footer Area Height (1/4") */ + private int m_footerHeight = 18; + + + /** Current Page Number */ + private int m_pageNo = 0; + /** Current Page */ + private Page m_currPage; + /** Pages */ + private ArrayList m_pages = new ArrayList(); + /** Header&Footer for all pages */ + private HeaderFooter m_headerFooter; + + + /** Header Coordinates */ + private Rectangle m_header = new Rectangle (); + /** Content Coordinates */ + private Rectangle m_content = new Rectangle(); + /** Footer Coordinates */ + private Rectangle m_footer = new Rectangle(); + /** Temporary NL Position */ + private int m_tempNLPositon = 0; + + /** Header Area */ + public static final int AREA_HEADER = 0; + /** Content Area */ + public static final int AREA_CONTENT = 1; + /** Footer Area */ + public static final int AREA_FOOTER = 2; + /** Area Pointer */ + private int m_area = AREA_CONTENT; + + /** Current Position in 1/72 inch */ + private Point2D.Double[] m_position = new Point2D.Double[] + {new Point2D.Double(0,0), new Point2D.Double(0,0), new Point2D.Double(0,0)}; + /** Max Height Since New Line */ + private float m_maxHeightSinceNewLine[] = new float[] {0f, 0f, 0f}; + + /** Primary Table Element for Page XY Info */ + private TableElement m_tableElement = null; + + /** Last Height by area */ + private float m_lastHeight[] = new float[] {0f, 0f, 0f}; + /** Last Width by area */ + private float m_lastWidth[] = new float[] {0f, 0f, 0f}; + + /** Draw using attributed String vs. Text Layout where possible */ + public static boolean s_FASTDRAW = true; + /** Print Copy (print interface) */ + private boolean m_isCopy = false; + + + /*************************************************************************/ + + /** True Image */ + public static Image IMAGE_TRUE = null; + /** False Image */ + public static Image IMAGE_FALSE = null; + /** Image Size */ + public static Dimension IMAGE_SIZE = new Dimension(10,10); + + static { + Toolkit tk = Toolkit.getDefaultToolkit(); + URL url = LayoutEngine.class.getResource("true10.gif"); + if (url != null) + IMAGE_TRUE = tk.getImage(url); + url = LayoutEngine.class.getResource("false10.gif"); + /** @todo load images via medialoader */ + if (url != null) + IMAGE_FALSE = tk.getImage(url); + } // static init + + + + /************************************************************************** + * Set Print Format + * Optionally re-calculate layout + * @param doLayout if layout exists, redo it + * @param format print Format + */ + public void setPrintFormat (MPrintFormat format, boolean doLayout) + { + m_format = format; + // Initial & Default Settings + m_printCtx = new Properties(format.getCtx()); + + // Set Paper + boolean tempHasLayout = m_hasLayout; + m_hasLayout = false; // do not start re-calculation + MPrintPaper mPaper = MPrintPaper.get(format.getAD_PrintPaper_ID()); + if (m_format.isStandardHeaderFooter()) + setPaper(mPaper.getCPaper()); + else + setPaper(mPaper.getCPaper(), + m_format.getHeaderMargin(), m_format.getFooterMargin()); + m_hasLayout = tempHasLayout; + // + m_printColor = MPrintColor.get(getCtx(), format.getAD_PrintColor_ID()); + m_printFont = MPrintFont.get (format.getAD_PrintFont_ID()); + + // Print Context + Env.setContext(m_printCtx, Page.CONTEXT_REPORTNAME, m_format.getName()); + Env.setContext(m_printCtx, Page.CONTEXT_HEADER, Env.getHeader(m_printCtx, 0)); + Env.setContext(m_printCtx, Env.LANGUAGE, m_format.getLanguage().getAD_Language()); + + if (m_hasLayout && doLayout) + layout(); // re-calculate + } // setPrintFormat + + /** + * Set PrintData. + * Optionally re-calculate layout + * @param data data + * @param doLayout if layout exists, redo it + * @param query query for parameter + */ + public void setPrintData (PrintData data, MQuery query, boolean doLayout) + { + m_data = data; + m_query = query; + if (m_hasLayout && doLayout) + layout(); // re-calculate + } // setPrintData + + public void setPrintData (PrintData data, MQuery query, boolean doLayout, String trxName) + { + m_data = data; + m_query = query; + m_TrxName = trxName; + if (m_hasLayout && doLayout) + layout(); // re-calculate + } // setPrintData + + + /************************************************************************** + * Set Paper + * @param paper Paper + */ + public void setPaper (CPaper paper) + { + setPaper(paper, m_headerHeight, m_footerHeight); + } // setPaper + + /** + * Set Paper + * Optionally re-calculate layout + * @param paper Paper + * @param headerHeight header height + * @param footerHeight footer height + */ + public void setPaper (CPaper paper, int headerHeight, int footerHeight) + { + if (paper == null) + return; + // + boolean paperChange = headerHeight != m_headerHeight || footerHeight != m_footerHeight; + if (!paperChange) + paperChange = !paper.equals(m_paper); + // + log.fine(paper + " - Header=" + headerHeight + ", Footer=" + footerHeight); + m_paper = paper; + m_headerHeight = headerHeight; + m_footerHeight = footerHeight; + calculatePageSize(); + // + if (m_hasLayout && paperChange) + layout(); // re-calculate + } // setPaper + + /** + * Show Dialog and Set Paper + * Optionally re-calculate layout + * @param job printer job + */ + public void pageSetupDialog (PrinterJob job) + { + log.info(""); + if (m_paper.pageSetupDialog(job)) + { + setPaper(m_paper); + layout(); + } + } // pageSetupDialog + + /** + * Set Paper from Page Format. + * PageFormat is derived from CPaper + * @param pf Optional PageFormat - if null standard paper Portrait + */ + protected void setPageFormat (PageFormat pf) + { + if (pf != null) + setPaper(new CPaper(pf)); + else + setPaper(null); + } // setPageFormat + + /** + * Get Page Format + * @return page format + */ + public PageFormat getPageFormat () + { + return m_paper.getPageFormat(); + } // getPageFormat + + + /** + * Calculate Page size based on Paper and header/footerHeight. + *
    +	 *  Paper: 8.5x11.0" Portrait x=32.0,y=32.0 w=548.0,h=728.0
    +	 *  +------------------------ Paper   612x792
    +	 *  |    non-imageable space          32x32
    +	 *  |  +--------------------- Header = printable area start
    +	 *  |  | headerHeight=32      =>  [x=32,y=32,width=548,height=32]
    +	 *  |  +--------------------- Content
    +	 *  |  |                      =>  [x=32,y=64,width=548,height=664]
    +	 *  |  |
    +	 *  |  |
    +	 *  |  |
    +	 *  |  +--------------------- Footer
    +	 *  |  | footerHeight=32      =>  [x=32,y=728,width=548,height=32]
    +	 *  |  +--------------------- Footer end = printable area end
    +	 *  |   non-imageable space
    +	 *  +------------------------
    +	 *  
    + */ + private void calculatePageSize() + { + int x = (int)m_paper.getImageableX (true); + int w = (int)m_paper.getImageableWidth (true); + // + int y = (int)m_paper.getImageableY (true); + int h = (int)m_paper.getImageableHeight (true); + + int height = m_headerHeight; + m_header.setBounds (x, y, w, height); + // + y += height; + height = h-m_headerHeight-m_footerHeight; + m_content.setBounds (x, y, w, height); + // + y += height; + height = m_footerHeight; + m_footer.setBounds (x, y, w, height); + + log.fine("Paper=" + m_paper + ",HeaderHeight=" + m_headerHeight + ",FooterHeight=" + m_footerHeight + + " => Header=" + m_header + ",Contents=" + m_content + ",Footer=" + m_footer); + } // calculatePageSize + + /** + * Set Paper + * @return Paper + */ + public CPaper getPaper() + { + return m_paper; + } // getPaper + + + + /************************************************************************** + * Create Layout + */ + private void layout() + { + // Header/Footer + m_headerFooter = new HeaderFooter(m_printCtx); + if (!m_format.isForm() && m_format.isStandardHeaderFooter()) + createStandardHeaderFooter(); + // + m_pageNo = 0; + m_pages.clear(); + m_tableElement = null; + newPage(true, false); // initialize + // + if (m_format.isForm()) + layoutForm(); + else + { + // Parameter + PrintElement element = layoutParameter(); + if (element != null) + { + m_currPage.addElement (element); + element.setLocation(m_position[AREA_CONTENT]); + m_position[AREA_CONTENT].y += element.getHeight() + 5; // GAP + } + // Table + if (m_data != null) + { + element = layoutTable(m_format, m_data, 0); + element.setLocation(m_content.getLocation()); + for (int p = 1; p <= element.getPageCount(); p++) + { + if (p != 1) + newPage(true, false); + m_currPage.addElement (element); + } + } + } + // + String pageInfo = String.valueOf(m_pages.size()) + getPageInfo(m_pages.size()); + Env.setContext(m_printCtx, Page.CONTEXT_PAGECOUNT, pageInfo); + Timestamp now = new Timestamp(System.currentTimeMillis()); + Env.setContext(m_printCtx, Page.CONTEXT_DATE, + DisplayType.getDateFormat(DisplayType.Date, m_format.getLanguage()).format(now)); + Env.setContext(m_printCtx, Page.CONTEXT_TIME, + DisplayType.getDateFormat(DisplayType.DateTime, m_format.getLanguage()).format(now)); + // Update Page Info + int pages = m_pages.size(); + for (int i = 0; i < pages; i++) + { + Page page = (Page)m_pages.get(i); + int pageNo = page.getPageNo(); + pageInfo = String.valueOf(pageNo) + getPageInfo(pageNo); + page.setPageInfo(pageInfo); + page.setPageCount(pages); + } + + m_hasLayout = true; + } // layout + + + /*************************************************************************** + * Get PrintLayout (Report) Context + * @return context + */ + public Properties getCtx() + { + return m_printCtx; + } // getCtx + + /** + * Get the number of printed Columns + * @return no of printed columns + */ + public int getColumnCount() + { + return m_columnCount; + } // getColumnCount + + /** + * Set the current Print Area + * @param area see HEADER_.. constants + */ + protected void setArea (int area) + { + if (m_area == area) + return; + if (area < 0 || area > 2) + throw new ArrayIndexOutOfBoundsException (area); + m_area = area; + } // setArea + + /** + * Get the current Print Area + * @return area see HEADER_.. constants + */ + public int getArea () + { + return m_area; + } // getArea + + /** + * Return bounds of current Area + * @return rectangle with bounds + */ + public Rectangle getAreaBounds() + { + Rectangle part = m_content; + if (m_area == AREA_HEADER) + part = m_header; + else if (m_area == AREA_FOOTER) + part = m_footer; + // + return part; + } // getAreaBounds + + + /************************************************************************** + * Create New Page, set position to top content + * @param force if false will check if nothing printed so far + * @param preserveXPos preserve X Position of content area + * @return new page no + */ + protected int newPage (boolean force, boolean preserveXPos) + { + // We are on a new page + if (!force + && m_position[AREA_CONTENT].getX() == m_content.x + && m_position[AREA_CONTENT].getY() == m_content.y) + { + log.fine("skipped"); + return m_pageNo; + } + + m_pageNo++; + m_currPage = new Page (m_printCtx, m_pageNo); + m_pages.add(m_currPage); + // + m_position[AREA_HEADER].setLocation(m_header.x, m_header.y); + if (preserveXPos) + m_position[AREA_CONTENT].setLocation(m_position[AREA_CONTENT].x, m_content.y); + else + m_position[AREA_CONTENT].setLocation(m_content.x, m_content.y); + m_position[AREA_FOOTER].setLocation(m_footer.x, m_footer.y); + m_maxHeightSinceNewLine = new float[] {0f, 0f, 0f}; + log.finer("Page=" + m_pageNo); + return m_pageNo; + } // newPage + + /** + * Move to New Line (may cause new page) + */ + protected void newLine () + { + Rectangle part = m_content; + if (m_area == AREA_HEADER) + part = m_header; + else if (m_area == AREA_FOOTER) + part = m_footer; + + // Temporary NL Position + int xPos = part.x; + if (m_tempNLPositon != 0) + xPos = m_tempNLPositon; + + if (isYspaceFor(m_maxHeightSinceNewLine[m_area])) + { + m_position[m_area].setLocation(xPos, m_position[m_area].y + m_maxHeightSinceNewLine[m_area]); + log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y); + } + else if (m_area == AREA_CONTENT) + { + log.finest("Not enough Y space " + + m_lastHeight[m_area] + " - remaining " + getYspace() + " - Area=" + m_area); + newPage(true, false); + log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y); + } + else // footer/header + { + m_position[m_area].setLocation(part.x, m_position[m_area].y + m_maxHeightSinceNewLine[m_area]); + log.log(Level.SEVERE, "Outside of Area(" + m_area + "): " + m_position[m_area]); + } + m_maxHeightSinceNewLine[m_area] = 0f; + } // newLine + + + /** + * Get current Page Number (not zero based) + * @return Page No + */ + public int getPageNo() + { + return m_pageNo; + } // getPageNo + + /** + * Get Page No + * @param pageNo page number (NOT zero based) + * @return Page + */ + public Page getPage (int pageNo) + { + if (pageNo <= 0 || pageNo > m_pages.size()) + { + log.log(Level.SEVERE, "No page #" + pageNo); + return null; + } + Page retValue = (Page)m_pages.get(pageNo-1); + return retValue; + } // getPage + + /** + * Get Pages + * @return Pages in ArrayList + */ + public ArrayList getPages() + { + return m_pages; + } // getPages + + /** + * Get Header & Footer info + * @return Header&Footer + */ + public HeaderFooter getHeaderFooter() + { + return m_headerFooter; + } // getPages + + /** + * Set Current page to Page No + * @param pageNo page number (NOT zero based) + */ + protected void setPage (int pageNo) + { + if (pageNo <= 0 || pageNo > m_pages.size()) + { + log.log(Level.SEVERE, "No page #" + pageNo); + return; + } + Page retValue = (Page)m_pages.get(pageNo-1); + m_currPage = retValue; + } // setPage + + /** + * Get Page Info for Multi-Page tables + * @param pageNo page + * @return info e.g. (1,1) + */ + public String getPageInfo(int pageNo) + { + if (m_tableElement == null || m_tableElement.getPageXCount() == 1) + return ""; + int pi = m_tableElement.getPageIndex(pageNo); + StringBuffer sb = new StringBuffer("("); + sb.append(m_tableElement.getPageYIndex(pi)+1).append(",") + .append(m_tableElement.getPageXIndex(pi)+1).append(")"); + return sb.toString(); + } // getPageInfo + + /** + * Get Max Page Info for Multi-Page tables + * @return info e.g. (3,2) + */ + public String getPageInfoMax() + { + if (m_tableElement == null || m_tableElement.getPageXCount() == 1) + return ""; + StringBuffer sb = new StringBuffer("("); + sb.append(m_tableElement.getPageYCount()).append(",") + .append(m_tableElement.getPageXCount()).append(")"); + return sb.toString(); + } // getPageInfoMax + + /** + * Get Format Model + * @return model + */ + public MPrintFormat getFormat() + { + return m_format; + } // getFormat + + /** + * Get Print Interface (Pageable, Printable, Doc) + * @param isCopy true if it is a document copy + * @return this if nothing to print + */ + public LayoutEngine getPageable (boolean isCopy) + { + setCopy(isCopy); + if (getNumberOfPages() == 0 + || !ArchiveEngine.isValid(this)) + { + log.warning("Nothing to print - " + toString()); + return null; + } + return this; + } // getPageable + + /************************************************************************** + * Set Position on current page (no check) + * @param p point relative in area + */ + protected void setRelativePosition (Point2D p) + { + if (p == null) + return; + Rectangle part = m_content; + if (m_area == AREA_HEADER) + part = m_header; + else if (m_area == AREA_FOOTER) + part = m_footer; + m_position[m_area].setLocation(part.x + p.getX(), part.y + p.getY()); + log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y); + } // setPosition + + /** + * Set Position on current page (no check) + * @param x x position in 1/72 inch + * @param y y position in 1/72 inch + */ + protected void setRelativePosition (float x, float y) + { + setRelativePosition(new Point2D.Float(x, y)); + } // setPosition + + /** + * Get the current position on current page + * @return current position + */ + public Point2D getPosition () + { + return m_position[m_area]; + } // getPosition + + /** + * Set X Position on current page + * @param x x position in 1/72 inch + */ + protected void setX (float x) + { + m_position[m_area].x = x; + log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y); + } // setX + + /** + * Add to X Position on current page + * @param xOffset add offset to x position in 1/72 inch + */ + protected void addX (float xOffset) + { + if (xOffset == 0f) + return; + m_position[m_area].x += xOffset; + log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y); + } // addX + + /** + * Get X Position on current page + * @return x position in 1/72 inch + */ + public float getX () + { + return (float)m_position[m_area].x; + } // getX + + /** + * Set Y Position on current page + * @param y y position in 1/72 inch + */ + protected void setY (int y) + { + m_position[m_area].y = y; + log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y); + } // setY + + /** + * Add to Y Position - may cause New Page + * @param yOffset add offset to y position in 1/72 inch + */ + protected void addY (int yOffset) + { + if (yOffset == 0f) + return; + if (isYspaceFor(yOffset)) + { + m_position[m_area].y += yOffset; + log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y); + } + else if (m_area == AREA_CONTENT) + { + log.finest("Not enough Y space " + + m_lastHeight[m_area] + " - remaining " + getYspace() + " - Area=" + m_area); + newPage(true, true); + log.finest("Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y); + } + else + { + m_position[m_area].y += yOffset; + log.log(Level.SEVERE, "Outside of Area: " + m_position); + } + } // addY + + /** + * Get Y Position on current page + * @return y position in 1/72 inch + */ + public float getY () + { + return (float)m_position[m_area].y; + } // getY + + + /************************************************************************** + * Return remaining X dimension space _ on current page in Area + * @return space in 1/72 inch remaining in line + */ + public float getXspace() + { + Rectangle part = m_content; + if (m_area == AREA_HEADER) + part = m_header; + else if (m_area == AREA_FOOTER) + part = m_footer; + // + return (float)(part.x + part.width - m_position[m_area].x); + } // getXspace + + /** + * Remaining Space is OK for Width in Area + * @param width width + * @return true if width fits in area + */ + public boolean isXspaceFor (float width) + { + return (getXspace()-width) > 0f; + } // isXspaceFor + + /** + * Return remaining Y dimension space | on current page in Area + * @return space in 1/72 inch remaining on page + */ + public float getYspace() + { + Rectangle part = m_content; + if (m_area == AREA_HEADER) + part = m_header; + else if (m_area == AREA_FOOTER) + part = m_footer; + // + return (float)(part.y + part.height - m_position[m_area].y); + } // getYspace + + /** + * Remaining Space is OK for Height in Area + * @param height height + * @return true if height fits in area + */ + public boolean isYspaceFor (float height) + { + return (getYspace()-height) > 0f; + } // isYspaceFor + + /************************************************************************** + * Create Standard Header/Footer + *
    +	 *  title           C        Page x of x
    +	 *  Copyright      who         date&time
    +	 *  
    + */ + private void createStandardHeaderFooter() + { + PrintElement element = new ImageElement(org.compiere.Adempiere.getImageLogoSmall(true)); // 48x15 + // element = new ImageElement(org.compiere.Adempiere.getImageLogo()); // 100x30 + element.layout(48, 15, false, MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft); + element.setLocation(m_header.getLocation()); + m_headerFooter.addElement(element); + // + MPrintTableFormat tf = m_format.getTableFormat(); + Font font = tf.getPageHeader_Font(); + Color color = tf.getPageHeaderFG_Color(); + // + element = new StringElement("@*ReportName@", font, color, null, true); + element.layout (m_header.width, 0, true, MPrintFormatItem.FIELDALIGNMENTTYPE_Center); + element.setLocation(m_header.getLocation()); + m_headerFooter.addElement(element); + // + // + element = new StringElement("@Page@ @*Page@ @of@ @*PageCount@", font, color, null, true); + element.layout (m_header.width, 0, true, MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight); + element.setLocation(m_header.getLocation()); + m_headerFooter.addElement(element); + + // Footer + font = tf.getPageFooter_Font(); + color = tf.getPageFooterFG_Color(); + // + element = new StringElement(Adempiere.ADEMPIERE_R, font, color, null, true); + /** You can use the following to customize reports for your product name */ + // element = new StringElement(Adempiere.NAME, font, color, null, true); + element.layout (m_footer.width, 0, true, MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft); + Point ft = m_footer.getLocation(); + ft.y += m_footer.height - element.getHeight() - 2; // 2pt above min + element.setLocation(ft); + m_headerFooter.addElement(element); + // + element = new StringElement("@*Header@", font, color, null, true); + element.layout (m_footer.width, 0, true, MPrintFormatItem.FIELDALIGNMENTTYPE_Center); + element.setLocation(ft); + m_headerFooter.addElement(element); + // + element = new StringElement("@*CurrentDateTime@", font, color, null, true); + element.layout (m_footer.width, 0, true, MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight); + element.setLocation(ft); + m_headerFooter.addElement(element); + } // createStandardHeaderFooter + + + + /************************************************************************** + * Layout Form. + * For every Row, loop through the Format + * and calculate element size and position. + */ + private void layoutForm() + { + // log.info("layoutForm"); + m_columnCount = 0; + if (m_data == null) + return; + // for every row + for (int row = 0; row < m_data.getRowCount(); row++) + { + log.info("Row=" + row); + m_data.setRowIndex(row); + boolean somethingPrinted = true; // prevent NL of nothing printed and supress null + // for every item + for (int i = 0; i < m_format.getItemCount(); i++) + { + MPrintFormatItem item = m_format.getItem(i); + // log.fine("layoutForm - Row=" + row + " - #" + i + " - " + item); + if (!item.isPrinted()) + continue; + // log.fine("layoutForm - Row=" + row + " - #" + i + " - " + item); + m_columnCount++; + // Read Header/Footer just once + if (row > 0 && (item.isHeader() || item.isFooter())) + continue; + // Position + if (item.isHeader()) // Area + setArea(AREA_HEADER); + else if (item.isFooter()) + setArea(AREA_FOOTER); + else + setArea(AREA_CONTENT); + // + if (item.isSetNLPosition() && item.isRelativePosition()) + m_tempNLPositon = 0; + // New Page/Line + if (item.isNextPage()) // item.isPageBreak() // new page + newPage(false, false); + else if (item.isNextLine() && somethingPrinted) // new line + { + newLine (); + somethingPrinted = false; + } + else + addX(m_lastWidth[m_area]); + // Relative Position space + if (item.isRelativePosition()) + { + addX(item.getXSpace()); + addY(item.getYSpace()); + } + else // Absolute relative position + setRelativePosition(item.getXPosition(), item.getYPosition()); + // Temporary NL Position when absolute positioned + if (item.isSetNLPosition() && !item.isRelativePosition()) + m_tempNLPositon = (int)getPosition().getX(); + + // line alignment + String alignment = item.getFieldAlignmentType(); + int maxWidth = item.getMaxWidth(); + boolean lineAligned = false; + if (item.isRelativePosition()) + { + if (item.isLineAlignLeading()) + { + alignment = MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft; + maxWidth = getAreaBounds().width; + lineAligned = true; + } + else if (item.isLineAlignCenter()) + { + alignment = MPrintFormatItem.FIELDALIGNMENTTYPE_Center; + maxWidth = getAreaBounds().width; + lineAligned = true; + } + else if (item.isLineAlignTrailing()) + { + alignment = MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight; + maxWidth = getAreaBounds().width; + lineAligned = true; + } + } + + // Type + PrintElement element = null; + if (item.isTypePrintFormat()) //** included PrintFormat + { + element = includeFormat (item, m_data); + } + else if (item.isBarcode()) + { + element = createBarcodeElement(item); + element.layout(maxWidth, item.getMaxHeight(), false, alignment); + } + else if (item.isTypeImage()) //** Image + { + if (item.isImageField()) + element = createImageElement (item); + else if (item.isImageIsAttached()) + element = ImageElement.get (item.get_ID()); + else + element = ImageElement.get (item.getImageURL()); + if (element != null) + element.layout(maxWidth, item.getMaxHeight(), false, alignment); + } + else if (item.isTypeField()) //** Field + { + if (maxWidth == 0 && item.isFieldAlignBlock()) + maxWidth = getAreaBounds().width; + element = createFieldElement (item, maxWidth, alignment, m_format.isForm()); + } + else if (item.isTypeBox()) //** Line/Box + { + if (m_format.isForm()) + element = createBoxElement(item); + // Auto detect width - teo_sarca, BF [ 1825876 ] + if (element != null && maxWidth == 0) { + maxWidth = getAreaBounds().width; + element.setMaxWidth(maxWidth); + } + } + else // (item.isTypeText()) //** Text + { + if (maxWidth == 0 && item.isFieldAlignBlock()) + maxWidth = getAreaBounds().width; + element = createStringElement (item.getPrintName (m_format.getLanguage ()), + item.getAD_PrintColor_ID (), item.getAD_PrintFont_ID (), + maxWidth, item.getMaxHeight (), item.isHeightOneLine (), alignment, true); + } + + // Printed - set last width/height + if (element != null) + { + somethingPrinted = true; + if (!lineAligned) + m_lastWidth[m_area] = element.getWidth(); + m_lastHeight[m_area] = element.getHeight(); + } + else + { + somethingPrinted = false; + m_lastWidth[m_area] = 0f; + m_lastHeight[m_area] = 0f; + } + + // Does it fit? + if (item.isRelativePosition() && !lineAligned) + { + if (!isXspaceFor(m_lastWidth[m_area])) + { + log.finest("Not enough X space for " + + m_lastWidth[m_area] + " - remaining " + getXspace() + " - Area=" + m_area); + newLine (); + } + if (m_area == AREA_CONTENT && !isYspaceFor(m_lastHeight[m_area])) + { + log.finest("Not enough Y space " + + m_lastHeight[m_area] + " - remaining " + getYspace() + " - Area=" + m_area); + newPage (true, true); + } + } + // We know Position and Size + // log.fine( "LayoutEngine.layoutForm", + // "Page=" + m_pageNo + " [" + m_area + "] " + m_position[m_area].x + "/" + m_position[m_area].y + // + " w=" + lastWidth[m_area] + ",h=" + lastHeight[m_area] + " " + item); + if (element != null) + element.setLocation(m_position[m_area]); + // Add to Area + if (m_area == AREA_CONTENT) + m_currPage.addElement (element); + else + m_headerFooter.addElement (element); + // + if (m_lastHeight[m_area] > m_maxHeightSinceNewLine[m_area]) + m_maxHeightSinceNewLine[m_area] = m_lastHeight[m_area]; + // Reset maxHeightSinceNewLine if we have an absolute position - teo_sarca BF [ 1807917 ] + if (!item.isRelativePosition()) + m_maxHeightSinceNewLine[m_area] = m_lastHeight[m_area]; + + } // for every item + } // for every row + } // layoutForm + + + /** + * Include Table Format + * @param item print format item + * @param data print data + * @return Print Element + */ + private PrintElement includeFormat (MPrintFormatItem item, PrintData data) + { + newLine(); + PrintElement element = null; + // + MPrintFormat format = MPrintFormat.get (getCtx(), item.getAD_PrintFormatChild_ID(), false); + format.setLanguage(m_format.getLanguage()); + if (m_format.isTranslationView()) + format.setTranslationLanguage(m_format.getLanguage()); + int AD_Column_ID = item.getAD_Column_ID(); + log.info(format + " - Item=" + item.getName() + " (" + AD_Column_ID + ")"); + // + Object obj = data.getNode(new Integer(AD_Column_ID)); + // Object obj = data.getNode(item.getColumnName()); // slower + if (obj == null) + { + data.dumpHeader(); + data.dumpCurrentRow(); + log.log(Level.SEVERE, "No Node - AD_Column_ID=" + + AD_Column_ID + " - " + item + " - " + data); + return null; + } + PrintDataElement dataElement = (PrintDataElement)obj; + String recordString = dataElement.getValueKey(); + if (recordString == null || recordString.length() == 0) + { + data.dumpHeader(); + data.dumpCurrentRow(); + log.log(Level.SEVERE, "No Record Key - " + dataElement + + " - AD_Column_ID=" + AD_Column_ID + " - " + item); + return null; + } + int Record_ID = 0; + try + { + Record_ID = Integer.parseInt(recordString); + } + catch (Exception e) + { + data.dumpCurrentRow(); + log.log(Level.SEVERE, "Invalid Record Key - " + recordString + + " (" + e.getMessage() + + ") - AD_Column_ID=" + AD_Column_ID + " - " + item); + return null; + } + MQuery query = new MQuery (format.getAD_Table_ID()); + query.addRestriction(item.getColumnName(), MQuery.EQUAL, new Integer(Record_ID)); + format.setTranslationViewQuery(query); + log.fine(query.toString()); + // + DataEngine de = new DataEngine(format.getLanguage(),m_TrxName); + PrintData includedData = de.getPrintData(data.getCtx(), format, query); + if (includedData == null) + return null; + log.fine(includedData.toString()); + // + element = layoutTable (format, includedData, item.getXSpace()); + // handle multi page tables + if (element.getPageCount() > 1) + { + Point2D.Double loc = m_position[m_area]; + element.setLocation(loc); + for (int p = 1; p < element.getPageCount(); p++) // don't add last one + { + m_currPage.addElement (element); + newPage(true, false); + } + m_position[m_area] = loc; + ((TableElement)element).setHeightToLastPage(); + } + + m_lastWidth[m_area] = element.getWidth(); + m_lastHeight[m_area] = element.getHeight(); + + if (!isXspaceFor(m_lastWidth[m_area])) + { + log.finest("Not enough X space for " + + m_lastWidth[m_area] + " - remaining " + getXspace() + " - Area=" + m_area); + newLine (); + } + if (m_area == AREA_CONTENT && !isYspaceFor(m_lastHeight[m_area])) + { + log.finest("Not enough Y space " + + m_lastHeight[m_area] + " - remaining " + getYspace() + " - Area=" + m_area); + newPage (true, false); + } + // + return element; + } // includeFormat + + /** + * Create String Element + * + * @param content string to be printed + * @param AD_PrintColor_ID color + * @param AD_PrintFont_ID font + * @param maxWidth max width + * @param maxHeight max height + * @param isHeightOneLine onle line only + * @param FieldAlignmentType alignment type (MPrintFormatItem.FIELD_ALIGN_*) + * @param isTranslated if true and content contaiins @variable@, it is dynamically translated during print + * @return Print Element + */ + private PrintElement createStringElement (String content, int AD_PrintColor_ID, int AD_PrintFont_ID, + int maxWidth, int maxHeight, boolean isHeightOneLine, String FieldAlignmentType, boolean isTranslated) + { + if (content == null || content.length() == 0) + return null; + // Color / Font + Color color = getColor(); // default + if (AD_PrintColor_ID != 0 && m_printColor.get_ID() != AD_PrintColor_ID) + { + MPrintColor c = MPrintColor.get (getCtx(), AD_PrintColor_ID); + if (c.getColor() != null) + color = c.getColor(); + } + Font font = m_printFont.getFont(); // default + if (AD_PrintFont_ID != 0 && m_printFont.get_ID() != AD_PrintFont_ID) + { + MPrintFont f = MPrintFont.get (AD_PrintFont_ID); + if (f.getFont() != null) + font = f.getFont(); + } + PrintElement e = new StringElement(content, font, color, null, isTranslated); + e.layout (maxWidth, maxHeight, isHeightOneLine, FieldAlignmentType); + return e; + } // createStringElement + + /** + * Create Field Element + * @param item Format Item + * @param maxWidth max width + * @param FieldAlignmentType alignment type (MPrintFormatItem.FIELD_ALIGN_*) + * @param isForm true if document + * @return Print Element or null if nothing to print + */ + private PrintElement createFieldElement (MPrintFormatItem item, int maxWidth, + String FieldAlignmentType, boolean isForm) + { + // Get Data + Object obj = m_data.getNode(new Integer(item.getAD_Column_ID())); + if (obj == null) + return null; + else if (obj instanceof PrintDataElement) + ; + else + { + log.log(Level.SEVERE, "Element not PrintDataElement " + obj.getClass()); + return null; + } + + // Convert DataElement to String + PrintDataElement data = (PrintDataElement)obj; + if (data.isNull() && item.isSuppressNull()) + return null; + String stringContent = data.getValueDisplay (m_format.getLanguage()); + if ((stringContent == null || stringContent.length() == 0) && item.isSuppressNull()) + return null; + // non-string + Object content = stringContent; + if (data.getValue() instanceof Boolean) + content = data.getValue(); + + // Convert AmtInWords Content to alpha + if (item.getColumnName().equals("AmtInWords")) + { + log.fine("AmtInWords: " + stringContent); + stringContent = Msg.getAmtInWords (m_format.getLanguage(), stringContent); + content = stringContent; + } + // Label + String label = item.getPrintName(m_format.getLanguage()); + String labelSuffix = item.getPrintNameSuffix(m_format.getLanguage()); + + // ID Type + NamePair ID = null; + if (data.isID()) + { // Record_ID/ColumnName + Object value = data.getValue(); + if (value instanceof KeyNamePair) + ID = new KeyNamePair(((KeyNamePair)value).getKey(), item.getColumnName()); + else if (value instanceof ValueNamePair) + ID = new ValueNamePair(((ValueNamePair)value).getValue(), item.getColumnName()); + } + else if (MPrintFormatItem.FIELDALIGNMENTTYPE_Default.equals(FieldAlignmentType)) + { + if (data.isNumeric()) + FieldAlignmentType = MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight; + else + FieldAlignmentType = MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft; + } + + // Get Color/ Font + Color color = getColor(); // default + if (ID != null && !isForm) + ; // link color/underline handeled in PrintElement classes + else if (item.getAD_PrintColor_ID() != 0 && m_printColor.get_ID() != item.getAD_PrintColor_ID()) + { + MPrintColor c = MPrintColor.get (getCtx(), item.getAD_PrintColor_ID()); + if (c.getColor() != null) + color = c.getColor(); + } + + Font font = m_printFont.getFont(); // default + if (item.getAD_PrintFont_ID() != 0 && m_printFont.get_ID() != item.getAD_PrintFont_ID()) + { + MPrintFont f = MPrintFont.get (item.getAD_PrintFont_ID()); + if (f.getFont() != null) + font = f.getFont(); + } + + // Create String, HTML or Location + PrintElement e = null; + if (data.getDisplayType() == DisplayType.Location) + { + e = new LocationElement(m_printCtx, ((KeyNamePair)ID).getKey(), font, color, + item.isHeightOneLine(), label, labelSuffix); + e.layout (maxWidth, item.getMaxHeight(), item.isHeightOneLine(), FieldAlignmentType); + } + else + { + if (HTMLElement.isHTML(stringContent)) + e = new HTMLElement(stringContent); + else + e = new StringElement(content, font, color, isForm ? null : ID, label, labelSuffix); + e.layout (maxWidth, item.getMaxHeight(), item.isHeightOneLine(), FieldAlignmentType); + } + return e; + } // createFieldElement + + /** + * Create Box/Line Element + * @param item item + * @return box element + */ + private PrintElement createBoxElement (MPrintFormatItem item) + { + Color color = getColor(); // default + if (item.getAD_PrintColor_ID() != 0 + && m_printColor.get_ID() != item.getAD_PrintColor_ID()) + { + MPrintColor c = MPrintColor.get (getCtx(), item.getAD_PrintColor_ID()); + if (c.getColor() != null) + color = c.getColor(); + } + return new BoxElement(item, color); + } // createBoxElement + + /** + * Create Image Element from item + * @param item item + * @return image element + */ + private PrintElement createImageElement (MPrintFormatItem item) + { + Object obj = m_data.getNode(new Integer(item.getAD_Column_ID())); + if (obj == null) + return null; + else if (obj instanceof PrintDataElement) + ; + else + { + log.log(Level.SEVERE, "Element not PrintDataElement " + obj.getClass()); + return null; + } + + PrintDataElement data = (PrintDataElement)obj; + if (data.isNull() && item.isSuppressNull()) + return null; + String url = data.getValueDisplay (m_format.getLanguage()); + if ((url == null || url.length() == 0)) + { + if (item.isSuppressNull()) + return null; + else // should create an empty area + return null; + } + ImageElement element = null; + if (data.getDisplayType() == DisplayType.Image) { + element = ImageElement.get (data, url); + } else { + element = ImageElement.get (url); + } + return element; + } // createImageElement + + /** + * Create Barcode Element + * @param item item + * @return barcode element + */ + private PrintElement createBarcodeElement (MPrintFormatItem item) + { + // Get Data + Object obj = m_data.getNode(new Integer(item.getAD_Column_ID())); + if (obj == null) + return null; + else if (obj instanceof PrintDataElement) + ; + else + { + log.log(Level.SEVERE, "Element not PrintDataElement " + obj.getClass()); + return null; + } + + // Convert DataElement to String + PrintDataElement data = (PrintDataElement)obj; + if (data.isNull() && item.isSuppressNull()) + return null; + String stringContent = data.getValueDisplay (m_format.getLanguage()); + if ((stringContent == null || stringContent.length() == 0) && item.isSuppressNull()) + return null; + + BarcodeElement element = new BarcodeElement (stringContent, item); + if (element.isValid()) + return element; + return null; + } // createBarcodeElement + + /** + * Get default Color + * @return color + */ + public Color getColor() + { + if (m_printColor == null) + return Color.BLACK; + return m_printColor.getColor(); + } // getColor + + /************************************************************************** + * Layout Table. + * Convert PrintData into TableElement + * @param format format to use + * @param printData data to use + * @param xOffset X Axis - offset (start of table) i.e. indentation + * @return TableElement + */ + private PrintElement layoutTable (MPrintFormat format, PrintData printData, + int xOffset) + { + log.info(format.getName() + " - " + printData.getName()); + MPrintTableFormat tf = format.getTableFormat(); + // Initial Values + HashMap rowColFont = new HashMap(); + MPrintFont printFont = MPrintFont.get (format.getAD_PrintFont_ID()); + rowColFont.put(new Point(TableElement.ALL,TableElement.ALL), printFont.getFont()); + tf.setStandard_Font(printFont.getFont()); + rowColFont.put(new Point(TableElement.HEADER_ROW,TableElement.ALL), tf.getHeader_Font()); + // + HashMap rowColColor = new HashMap(); + MPrintColor printColor = MPrintColor.get (getCtx(), format.getAD_PrintColor_ID()); + rowColColor.put(new Point(TableElement.ALL,TableElement.ALL), printColor.getColor()); + rowColColor.put(new Point(TableElement.HEADER_ROW,TableElement.ALL), tf.getHeaderFG_Color()); + // + HashMap rowColBackground = new HashMap(); + rowColBackground.put(new Point(TableElement.HEADER_ROW,TableElement.ALL), tf.getHeaderBG_Color()); + // Sizes + boolean multiLineHeader = false; + int pageNoStart = m_pageNo; + int repeatedColumns = 1; + Rectangle firstPage = new Rectangle(m_content); + firstPage.x += xOffset; + firstPage.width -= xOffset; + int yOffset = (int)m_position[AREA_CONTENT].y - m_content.y; + firstPage.y += yOffset; + firstPage.height -= yOffset; + Rectangle nextPages = new Rectangle(m_content); + nextPages.x += xOffset; + nextPages.width -= xOffset; + // Column count + int columnCount = 0; + for (int c = 0; c < format.getItemCount(); c++) + { + if (format.getItem(c).isPrinted()) + columnCount++; + } + // System.out.println("Cols=" + cols); + + // Header & Column Setup + ValueNamePair[] columnHeader = new ValueNamePair[columnCount]; + int[] columnMaxWidth = new int[columnCount]; + int[] columnMaxHeight = new int[columnCount]; + boolean[] fixedWidth = new boolean [columnCount]; + String[] columnJustification = new String[columnCount]; + HashMap additionalLines = new HashMap(); + + int col = 0; + for (int c = 0; c < format.getItemCount(); c++) + { + MPrintFormatItem item = format.getItem(c); + if (item.isPrinted()) + { + if (item.isNextLine() && item.getBelowColumn() != 0) + { + additionalLines.put(new Integer(col), new Integer(item.getBelowColumn()-1)); + if (!item.isSuppressNull()) + { + item.setIsSuppressNull(true); // display size will be set to 0 in TableElement + item.save(); + } + } + columnHeader[col] = new ValueNamePair(item.getColumnName(), + item.getPrintName(format.getLanguage())); + columnMaxWidth[col] = item.getMaxWidth(); + fixedWidth[col] = (columnMaxWidth[col] != 0 && item.isFixedWidth()); + if (item.isSuppressNull()) + { + if (columnMaxWidth[col] == 0) + columnMaxWidth[col] = -1; // indication suppress if Null + else + columnMaxWidth[col] *= -1; + } + columnMaxHeight[col] = item.getMaxHeight(); + if (item.isHeightOneLine()) + columnMaxHeight[col] = -1; + columnJustification[col] = item.getFieldAlignmentType(); + if (columnJustification[col] == null || columnJustification[col].equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Default)) + columnJustification[col] = MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft; // when generated sets correct alignment + // Column Fonts + if (item.getAD_PrintFont_ID() != 0 && item.getAD_PrintFont_ID() != format.getAD_PrintFont_ID()) + { + MPrintFont font = MPrintFont.get(item.getAD_PrintFont_ID()); + rowColFont.put(new Point(TableElement.ALL, col), font.getFont()); + } + if (item.getAD_PrintColor_ID() != 0 && item.getAD_PrintColor_ID() != format.getAD_PrintColor_ID()) + { + MPrintColor color = MPrintColor.get (getCtx(), item.getAD_PrintColor_ID()); + rowColColor.put(new Point(TableElement.ALL, col), color.getColor()); + } + // + col++; + } + } + + // The Data + int rows = printData.getRowCount(); + // System.out.println("Rows=" + rows); + Object[][] data = new Object [rows][columnCount]; + KeyNamePair[] pk = new KeyNamePair[rows]; + String pkColumnName = null; + ArrayList functionRows = new ArrayList(); + ArrayList pageBreak = new ArrayList(); + + // for all rows + for (int row = 0; row < rows; row++) + { + // System.out.println("row=" + row); + printData.setRowIndex(row); + if (printData.isFunctionRow()) + { + functionRows.add(new Integer(row)); + rowColFont.put(new Point(row, TableElement.ALL), tf.getFunct_Font()); + rowColColor.put(new Point(row, TableElement.ALL), tf.getFunctFG_Color()); + rowColBackground.put(new Point(row, TableElement.ALL), tf.getFunctBG_Color()); + if (printData.isPageBreak()) + { + pageBreak.add(new Integer(row)); + log.finer("PageBreak row=" + row); + } + } + // Summary/Line Levels for Finanial Reports + else + { + int levelNo = printData.getLineLevelNo(); + if (levelNo != 0) + { + if (levelNo < 0) + levelNo = -levelNo; + Font base = printFont.getFont(); + if (levelNo == 1) + rowColFont.put(new Point(row, TableElement.ALL), new Font (base.getName(), + Font.ITALIC, base.getSize()-levelNo)); + else if (levelNo == 2) + rowColFont.put(new Point(row, TableElement.ALL), new Font (base.getName(), + Font.PLAIN, base.getSize()-levelNo)); + } + } + // for all columns + col = 0; + for (int c = 0; c < format.getItemCount(); c++) + { + MPrintFormatItem item = format.getItem(c); + Object dataElement = null; + if (item.isPrinted()) // Text Columns + { + if (item.isTypeImage()) + { + if (item.isImageField()) + { + Object obj = null; + if (item.getAD_Column_ID() > 0) // teo_sarca, [ 1673542 ] + obj = printData.getNode(new Integer(item.getAD_Column_ID())); + if (obj == null) + ; + else if (obj instanceof PrintDataElement) + { + PrintDataElement pde = (PrintDataElement)obj; + // Get the PrintDataElement string value - teo_sarca [ 1673505 ] + Object o = pde.getValue(); + String value = null; + if (o == null) + value = ""; + else if (o instanceof KeyNamePair) + value = ((KeyNamePair)o).getName(); + else + value = o.toString(); + + data[row][col] = ImageElement.get (value); + } + } + else if (item.isImageIsAttached()) + data[row][col] = ImageElement.get (item.get_ID()); + else + data[row][col] = ImageElement.get (item.getImageURL()); + // Image layout - teo_sarca, [ 1673548 ] + if (data[row][col] != null) + ((ImageElement)data[row][col]).layout(item.getMaxWidth(), item.getMaxHeight(), false, item.getFieldAlignmentType()); + } + else if (item.isBarcode()) + { + Object obj = null; + if (item.getAD_Column_ID() > 0) // teo_sarca, [ 1673542 ] + obj = printData.getNode(new Integer(item.getAD_Column_ID())); + if (obj == null) + ; + else if (obj instanceof PrintDataElement) + { + PrintDataElement pde = (PrintDataElement)obj; + // Get the PrintDataElement string value - teo_sarca [ 1673505 ] + String value = null; + Object o = pde.getValue(); + if (o == null) + value = ""; + if (o instanceof KeyNamePair) + value = ((KeyNamePair)o).getID(); + else + value = o.toString(); + BarcodeElement element = new BarcodeElement (value, item); + + if (element.isValid()) + data[row][col] = element; + } + } + else if (item.isTypeText() ) + { + data[row][col] = item.getPrintName(format.getLanguage()); + } + else if (item.isTypeField()) + { + Object obj = null; + if (item.getAD_Column_ID() > 0) // teo_sarca, [ 1673542 ] + obj = printData.getNode(new Integer(item.getAD_Column_ID())); + if (obj == null) + ; + else if (obj instanceof PrintDataElement) + { + PrintDataElement pde = (PrintDataElement)obj; + if (pde.isID() || pde.isYesNo()) + dataElement = pde.getValue(); + else + dataElement = pde.getValueDisplay(format.getLanguage()); + } + else + log.log(Level.SEVERE, "Element not PrintDataElement " + obj.getClass()); + // System.out.println(" row=" + row + ",col=" + col + " - " + item.getAD_Column_ID() + " => " + dataElement); + data[row][col] = dataElement; + } + else // item.isTypeBox() or isTypePrintFormat() + { + log.warning("Unsupported: " + (item.isTypeBox() ? "Box" : "PrintFormat") + " in Table: " + item); + } + col++; + } // printed + } // for all columns + + PrintDataElement pde = printData.getPKey(); + if (pde != null) // for FunctionRows + { + pk[row] = (KeyNamePair)pde.getValue(); + if (pkColumnName == null) + pkColumnName = pde.getColumnName(); + } + // else + // System.out.println("No PK " + printData); + } // for all rows + + // + TableElement table = new TableElement(columnHeader, + columnMaxWidth, columnMaxHeight, columnJustification, + fixedWidth, functionRows, multiLineHeader, + data, pk, pkColumnName, + pageNoStart, firstPage, nextPages, repeatedColumns, additionalLines, + rowColFont, rowColColor, rowColBackground, + tf, pageBreak); + table.layout(0,0,false, MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft); + if (m_tableElement == null) + m_tableElement = table; + return table; + } // layoutTable + + /** + * Layout Parameter based on MQuery + * @return PrintElement + */ + private PrintElement layoutParameter () + { + if (m_query == null || !m_query.isActive()) + return null; + // + ParameterElement pe = new ParameterElement(m_query, m_printCtx, m_format.getTableFormat()); + pe.layout(0, 0, false, null); + return pe; + } // layoutParameter + + + /************************************************************************** + * Get number of pages (Pageable Interface) + * @return number of pages + */ + public int getNumberOfPages() + { + return m_pages.size(); + } // getNumberOfPages + + /** + * Get Page Format (Pageable Interface) + * @param pageIndex page index + * @return Page Format + * @throws IndexOutOfBoundsException + */ + public PageFormat getPageFormat (int pageIndex) throws IndexOutOfBoundsException + { + if (!havePage(pageIndex)) + throw new IndexOutOfBoundsException("No page index=" + pageIndex); + return getPageFormat(); + } // getPageFormat + + /** + * Get Printable (PageableInterface) + * @param pageIndex page index + * @return this + * @throws IndexOutOfBoundsException + */ + public Printable getPrintable (int pageIndex) throws IndexOutOfBoundsException + { + if (!havePage(pageIndex)) + throw new IndexOutOfBoundsException("No page index=" + pageIndex); + return this; + } // getPrintable + + /** + * Print Page (Printable Interface) + * @param graphics graphics + * @param pageFormat page format (ignored) + * @param pageIndex page index + * @return PageExists/NoSuchPage + * @throws PrinterException + */ + public int print (Graphics graphics, PageFormat pageFormat, int pageIndex) + throws PrinterException + { + if (!havePage(pageIndex)) + return Printable.NO_SUCH_PAGE; + // + Rectangle r = new Rectangle (0, 0, (int)getPaper().getWidth(true), (int)getPaper().getHeight(true)); + Page page = getPage(pageIndex+1); + // + // log.fine("#" + m_id, "PageIndex=" + pageIndex + ", Copy=" + m_isCopy); + page.paint((Graphics2D)graphics, r, false, m_isCopy); // sets context + getHeaderFooter().paint((Graphics2D)graphics, r, false); + // + return Printable.PAGE_EXISTS; + } // print + + /** + * Do we have the page + * @param pageIndex page index + * @return true if page exists + */ + private boolean havePage (int pageIndex) + { + if (pageIndex < 0 || pageIndex >= getNumberOfPages()) + return false; + return true; + } // havePage + + /** + * Print Copy + * @return true if copy + */ + public boolean isCopy() + { + return m_isCopy; + } // isCopy + + /** + * Set Copy + * @param isCopy if true document is a copy + */ + public void setCopy (boolean isCopy) + { + m_isCopy = isCopy; + } // setCopy + + /************************************************************************** + * Get the doc flavor (Doc Interface) + * @return SERVICE_FORMATTED.PAGEABLE + */ + public DocFlavor getDocFlavor() + { + return DocFlavor.SERVICE_FORMATTED.PAGEABLE; + } // getDocFlavor + + /** + * Get Print Data (Doc Interface) + * @return this + * @throws IOException + */ + public Object getPrintData() throws IOException + { + return this; + } // getPrintData + + /** + * Get Document Attributes (Doc Interface) + * @return null to obtain all attribute values from the + * job's attribute set. + */ + public DocAttributeSet getAttributes() + { + return null; + } // getAttributes + + /** + * Obtains a reader for extracting character print data from this doc. + * (Doc Interface) + * @return null + * @exception IOException + */ + public Reader getReaderForText() throws IOException + { + return null; + } // getReaderForText + + /** + * Obtains an input stream for extracting byte print data from this doc. + * (Doc Interface) + * @return null + * @exception IOException + */ + public InputStream getStreamForBytes() throws IOException + { + return null; + } // getStreamForBytes + +} // LayoutEngine diff --git a/base/src/org/compiere/process/Aging.java b/base/src/org/compiere/process/Aging.java new file mode 100644 index 0000000000..1ee6eae56f --- /dev/null +++ b/base/src/org/compiere/process/Aging.java @@ -0,0 +1,237 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.process; + +import java.math.*; +import java.sql.*; +import java.util.logging.*; +import org.compiere.model.*; +import org.compiere.util.*; + +/** + * Invoice Aging Report. + * Based on RV_Aging. + * @author Jorg Janke + * @author victor.perez@e-evolution.com FR 1933937 Is necessary a new Aging to Date + * @see http://sourceforge.net/tracker/index.php?func=detail&aid=1933937&group_id=176962&atid=879335 + * @version $Id: Aging.java,v 1.5 2006/10/07 00:58:44 jjanke Exp $ + */ +public class Aging extends SvrProcess +{ + /** The date to calculate the days due from */ + private Timestamp p_StatementDate = null; + //FR 1933937 + private boolean p_DateAcct = false; + private boolean p_IsSOTrx = false; + private int p_C_Currency_ID = 0; + private int p_C_BP_Group_ID = 0; + private int p_C_BPartner_ID = 0; + private boolean p_IsListInvoices = false; + /** Number of days between today and statement date */ + private int m_statementOffset = 0; + + /** + * Prepare - e.g., get Parameters. + */ + protected void prepare() + { + ProcessInfoParameter[] para = getParameter(); + for (int i = 0; i < para.length; i++) + { + String name = para[i].getParameterName(); + if (para[i].getParameter() == null) + ; + else if (name.equals("StatementDate")) + p_StatementDate = (Timestamp)para[i].getParameter(); + else if (name.equals("DateAcct")) + p_DateAcct = "Y".equals(para[i].getParameter()); + else if (name.equals("IsSOTrx")) + p_IsSOTrx = "Y".equals(para[i].getParameter()); + else if (name.equals("C_Currency_ID")) + p_C_Currency_ID = ((BigDecimal)para[i].getParameter()).intValue(); + else if (name.equals("C_BP_Group_ID")) + p_C_BP_Group_ID = ((BigDecimal)para[i].getParameter()).intValue(); + else if (name.equals("C_BPartner_ID")) + p_C_BPartner_ID = ((BigDecimal)para[i].getParameter()).intValue(); + else if (name.equals("IsListInvoices")) + p_IsListInvoices = "Y".equals(para[i].getParameter()); + else + log.log(Level.SEVERE, "Unknown Parameter: " + name); + } + if (p_StatementDate == null) + p_StatementDate = new Timestamp (System.currentTimeMillis()); + else + m_statementOffset = TimeUtil.getDaysBetween( + new Timestamp(System.currentTimeMillis()), p_StatementDate); + } // prepare + + /** + * DoIt + * @return Message + * @throws Exception + */ + protected String doIt() throws Exception + { + log.info("StatementDate=" + p_StatementDate + ", IsSOTrx=" + p_IsSOTrx + + ", C_Currency_ID=" + p_C_Currency_ID + + ", C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID + + ", IsListInvoices=" + p_IsListInvoices); + //FR 1933937 + String dateacct = DB.TO_DATE(p_StatementDate); + + StringBuffer sql = new StringBuffer(); + sql.append("SELECT bp.C_BP_Group_ID, oi.C_BPartner_ID,oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID, " + + "oi.C_Currency_ID, oi.IsSOTrx, " // 5..6 + + "oi.DateInvoiced, oi.NetDays,oi.DueDate,oi.DaysDue, "); // 7..10 + if (p_C_Currency_ID == 0) + if (!p_DateAcct)//FR 1933937 + sql.append("oi.GrandTotal, oi.PaidAmt, oi.OpenAmt "); // 11..13 + else + sql.append("oi.GrandTotal, invoicePaidToDate(oi.C_Invoice_ID, oi.C_Currency_ID, 1,"+dateacct+") AS PaidAmt, invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+") AS OpenAmt "); // 11..13 + else + { + String s = ",oi.C_Currency_ID," + p_C_Currency_ID + ",oi.DateAcct,oi.C_ConversionType_ID,oi.AD_Client_ID,oi.AD_Org_ID)"; + sql.append("currencyConvert(oi.GrandTotal").append(s); // 11.. + if (!p_DateAcct) + sql.append(", currencyConvert(oi.PaidAmt").append(s) + .append(", currencyConvert(oi.OpenAmt").append(s); + else + sql.append(", currencyConvert(invoicePaidToDate(oi.C_Invoice_ID, oi.C_Currency_ID, 1,"+dateacct+")").append(s) + .append(", currencyConvert(invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+")").append(s); + + } + sql.append(",oi.C_Activity_ID,oi.C_Campaign_ID,oi.C_Project_ID "); // 14 + if (!p_DateAcct)//FR 1933937 + sql.append( "FROM RV_OpenItem oi"); + else + sql.append( "FROM RV_OpenItemToDate oi"); + + sql.append(" INNER JOIN C_BPartner bp ON (oi.C_BPartner_ID=bp.C_BPartner_ID) " + + "WHERE oi.ISSoTrx=").append(p_IsSOTrx ? "'Y'" : "'N'"); + if (p_C_BPartner_ID > 0) + sql.append(" AND oi.C_BPartner_ID=").append(p_C_BPartner_ID); + else if (p_C_BP_Group_ID > 0) + sql.append(" AND bp.C_BP_Group_ID=").append(p_C_BP_Group_ID); + + if (p_DateAcct)//FR 1933937 + sql.append("AND invoiceOpenToDate(oi.C_Invoice_ID,oi.C_InvoicePaySchedule_ID,"+dateacct+") <> 0 "); + + sql.append(" ORDER BY oi.C_BPartner_ID, oi.C_Currency_ID, oi.C_Invoice_ID"); + + log.finest(sql.toString()); + String finalSql = MRole.getDefault(getCtx(), false).addAccessSQL( + sql.toString(), "oi", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + log.finer(finalSql); + + PreparedStatement pstmt = null; + // + MAging aging = null; + int counter = 0; + int rows = 0; + int AD_PInstance_ID = getAD_PInstance_ID(); + // + try + { + pstmt = DB.prepareStatement(finalSql, get_TrxName()); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + int C_BP_Group_ID = rs.getInt(1); + int C_BPartner_ID = rs.getInt(2); + int C_Invoice_ID = p_IsListInvoices ? rs.getInt(3) : 0; + int C_InvoicePaySchedule_ID = p_IsListInvoices ? rs.getInt(4) : 0; + int C_Currency_ID = rs.getInt(5); + boolean IsSOTrx = "Y".equals(rs.getString(6)); + // + Timestamp DateInvoiced = rs.getTimestamp(7); + int NetDays = rs.getInt(8); + Timestamp DueDate = rs.getTimestamp(9); + // Days Due + int DaysDue = rs.getInt(10) // based on today + + m_statementOffset; + // + BigDecimal GrandTotal = rs.getBigDecimal(11); + BigDecimal PaidAmt = rs.getBigDecimal(12); + BigDecimal OpenAmt = rs.getBigDecimal(13); + // + int C_Activity_ID = p_IsListInvoices ? rs.getInt(14) : 0; + int C_Campaign_ID = p_IsListInvoices ? rs.getInt(15) : 0; + int C_Project_ID = p_IsListInvoices ? rs.getInt(16) : 0; + + rows++; + // New Aging Row + if (aging == null // Key + || AD_PInstance_ID != aging.getAD_PInstance_ID() + || C_BPartner_ID != aging.getC_BPartner_ID() + || C_Currency_ID != aging.getC_Currency_ID() + || C_Invoice_ID != aging.getC_Invoice_ID() + || C_InvoicePaySchedule_ID != aging.getC_InvoicePaySchedule_ID()) + { + if (aging != null) + { + if (aging.save()) + log.fine("#" + ++counter + " - " + aging); + else + { + log.log(Level.SEVERE, "Not saved " + aging); + break; + } + } + aging = new MAging (getCtx(), AD_PInstance_ID, p_StatementDate, + C_BPartner_ID, C_Currency_ID, + C_Invoice_ID, C_InvoicePaySchedule_ID, + C_BP_Group_ID, DueDate, IsSOTrx, get_TrxName()); + aging.setC_Activity_ID(C_Activity_ID); + aging.setC_Campaign_ID(C_Campaign_ID); + aging.setC_Project_ID(C_Project_ID); + aging.setDateAcct(p_DateAcct); + } + // Fill Buckets + aging.add (DueDate, DaysDue, GrandTotal, OpenAmt); + } + if (aging != null) + { + if (aging.save()) + log.fine("#" + ++counter + " - " + aging); + else + log.log(Level.SEVERE, "Not saved " + aging); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, finalSql, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + // + log.info("#" + counter + " - rows=" + rows); + return ""; + } // doIt + +} // Aging + diff --git a/base/src/org/compiere/process/DocumentEngine.java b/base/src/org/compiere/process/DocumentEngine.java new file mode 100644 index 0000000000..8bf859e1c9 --- /dev/null +++ b/base/src/org/compiere/process/DocumentEngine.java @@ -0,0 +1,1150 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.process; + +import java.io.File; +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Properties; +import java.util.Vector; +import java.util.logging.Level; + +import javax.naming.InitialContext; + +import org.compiere.db.CConnection; +import org.compiere.interfaces.Server; +import org.compiere.interfaces.ServerHome; +import org.compiere.model.MAllocationHdr; +import org.compiere.model.MBankStatement; +import org.compiere.model.MCash; +import org.compiere.model.MClient; +import org.compiere.model.MInOut; +import org.compiere.model.MInventory; +import org.compiere.model.MInvoice; +import org.compiere.model.MJournal; +import org.compiere.model.MJournalBatch; +import org.compiere.model.MMovement; +import org.compiere.model.MOrder; +import org.compiere.model.MPayment; +import org.compiere.model.X_C_Order; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Ini; + +/** + * Document Action Engine + * + * @author Jorg Janke + * @author Karsten Thiemann FR [ 1782412 ] + * @author victor.perez@e-evolution.com www.e-evolution.com FR [ 1866214 ] http://sourceforge.net/tracker/index.php?func=detail&aid=1866214&group_id=176962&atid=879335 + * @version $Id: DocumentEngine.java,v 1.2 2006/07/30 00:54:44 jjanke Exp $ + */ +public class DocumentEngine implements DocAction +{ + /** + * Doc Engine (Drafted) + * @param po document + */ + public DocumentEngine (DocAction po) + { + this (po, STATUS_Drafted); + } // DocActionEngine + + /** + * Doc Engine + * @param po document + * @param docStatus initial document status + */ + public DocumentEngine (DocAction po, String docStatus) + { + m_document = po; + if (docStatus != null) + m_status = docStatus; + } // DocActionEngine + + /** Persistent Document */ + private DocAction m_document; + /** Document Status */ + private String m_status = STATUS_Drafted; + /** Process Message */ + private String m_message = null; + /** Actual Doc Action */ + private String m_action = null; + + /** Logger */ + private static CLogger log = CLogger.getCLogger(DocumentEngine.class); + + /** + * Get Doc Status + * @return document status + */ + public String getDocStatus() + { + return m_status; + } // getDocStatus + + /** + * Set Doc Status - Ignored + * @param ignored Status is not set directly + * @see org.compiere.process.DocAction#setDocStatus(String) + */ + public void setDocStatus(String ignored) + { + } // setDocStatus + + /** + * Document is Drafted + * @return true if drafted + */ + public boolean isDrafted() + { + return STATUS_Drafted.equals(m_status); + } // isDrafted + + /** + * Document is Invalid + * @return true if Invalid + */ + public boolean isInvalid() + { + return STATUS_Invalid.equals(m_status); + } // isInvalid + + /** + * Document is In Progress + * @return true if In Progress + */ + public boolean isInProgress() + { + return STATUS_InProgress.equals(m_status); + } // isInProgress + + /** + * Document is Approved + * @return true if Approved + */ + public boolean isApproved() + { + return STATUS_Approved.equals(m_status); + } // isApproved + + /** + * Document is Not Approved + * @return true if Not Approved + */ + public boolean isNotApproved() + { + return STATUS_NotApproved.equals(m_status); + } // isNotApproved + + /** + * Document is Waiting Payment or Confirmation + * @return true if Waiting Payment + */ + public boolean isWaiting() + { + return STATUS_WaitingPayment.equals(m_status) + || STATUS_WaitingConfirmation.equals(m_status); + } // isWaitingPayment + + /** + * Document is Completed + * @return true if Completed + */ + public boolean isCompleted() + { + return STATUS_Completed.equals(m_status); + } // isCompleted + + /** + * Document is Reversed + * @return true if Reversed + */ + public boolean isReversed() + { + return STATUS_Reversed.equals(m_status); + } // isReversed + + /** + * Document is Closed + * @return true if Closed + */ + public boolean isClosed() + { + return STATUS_Closed.equals(m_status); + } // isClosed + + /** + * Document is Voided + * @return true if Voided + */ + public boolean isVoided() + { + return STATUS_Voided.equals(m_status); + } // isVoided + + /** + * Document Status is Unknown + * @return true if unknown + */ + public boolean isUnknown() + { + return STATUS_Unknown.equals(m_status) || + !(isDrafted() || isInvalid() || isInProgress() || isNotApproved() + || isApproved() || isWaiting() || isCompleted() + || isReversed() || isClosed() || isVoided() ); + } // isUnknown + + + /** + * Process actual document. + * Checks if user (document) action is valid and then process action + * Calls the individual actions which call the document action + * @param processAction document action based on workflow + * @param docAction document action based on document + * @return true if performed + */ + public boolean processIt (String processAction, String docAction) + { + m_message = null; + m_action = null; + // Std User Workflows - see MWFNodeNext.isValidFor + + if (isValidAction(processAction)) // WF Selection first + m_action = processAction; + // + else if (isValidAction(docAction)) // User Selection second + m_action = docAction; + // Nothing to do + else if (processAction.equals(ACTION_None) + || docAction.equals(ACTION_None)) + { + if (m_document != null) + m_document.get_Logger().info ("**** No Action (Prc=" + processAction + "/Doc=" + docAction + ") " + m_document); + return true; + } + else + { + throw new IllegalStateException("Status=" + getDocStatus() + + " - Invalid Actions: Process=" + processAction + ", Doc=" + docAction); + } + if (m_document != null) + m_document.get_Logger().info ("**** Action=" + m_action + " (Prc=" + processAction + "/Doc=" + docAction + ") " + m_document); + boolean success = processIt (m_action); + if (m_document != null) + m_document.get_Logger().fine("**** Action=" + m_action + " - Success=" + success); + return success; + } // process + + /** + * Process actual document - do not call directly. + * Calls the individual actions which call the document action + * @param action document action + * @return true if performed + */ + public boolean processIt (String action) + { + m_message = null; + m_action = action; + // + if (ACTION_Unlock.equals(m_action)) + return unlockIt(); + if (ACTION_Invalidate.equals(m_action)) + return invalidateIt(); + if (ACTION_Prepare.equals(m_action)) + return STATUS_InProgress.equals(prepareIt()); + if (ACTION_Approve.equals(m_action)) + return approveIt(); + if (ACTION_Reject.equals(m_action)) + return rejectIt(); + if (ACTION_Complete.equals(m_action) || ACTION_WaitComplete.equals(m_action)) + { + String status = null; + if (isDrafted() || isInvalid()) // prepare if not prepared yet + { + status = prepareIt(); + if (!STATUS_InProgress.equals(status)) + return false; + } + status = completeIt(); + if (m_document != null + && !Ini.isClient()) // Post Immediate if on Server + { + MClient client = MClient.get(m_document.getCtx(), m_document.getAD_Client_ID()); + if (STATUS_Completed.equals(status) && client.isPostImmediate()) + { + m_document.save(); + postIt(); + } + } + return STATUS_Completed.equals(status) + || STATUS_InProgress.equals(status) + || STATUS_WaitingPayment.equals(status) + || STATUS_WaitingConfirmation.equals(status); + } + if (ACTION_ReActivate.equals(m_action)) + return reActivateIt(); + if (ACTION_Reverse_Accrual.equals(m_action)) + return reverseAccrualIt(); + if (ACTION_Reverse_Correct.equals(m_action)) + return reverseCorrectIt(); + if (ACTION_Close.equals(m_action)) + return closeIt(); + if (ACTION_Void.equals(m_action)) + return voidIt(); + if (ACTION_Post.equals(m_action)) + return postIt(); + // + return false; + } // processDocument + + /** + * Unlock Document. + * Status: Drafted + * @return true if success + * @see org.compiere.process.DocAction#unlockIt() + */ + public boolean unlockIt() + { + if (!isValidAction(ACTION_Unlock)) + return false; + if (m_document != null) + { + if (m_document.unlockIt()) + { + m_status = STATUS_Drafted; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_Drafted; + return true; + } // unlockIt + + /** + * Invalidate Document. + * Status: Invalid + * @return true if success + * @see org.compiere.process.DocAction#invalidateIt() + */ + public boolean invalidateIt() + { + if (!isValidAction(ACTION_Invalidate)) + return false; + if (m_document != null) + { + if (m_document.invalidateIt()) + { + m_status = STATUS_Invalid; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_Invalid; + return true; + } // invalidateIt + + /** + * Process Document. + * Status is set by process + * @return new status (In Progress or Invalid) + * @see org.compiere.process.DocAction#prepareIt() + */ + public String prepareIt() + { + if (!isValidAction(ACTION_Prepare)) + return m_status; + if (m_document != null) + { + m_status = m_document.prepareIt(); + m_document.setDocStatus(m_status); + } + return m_status; + } // processIt + + /** + * Approve Document. + * Status: Approved + * @return true if success + * @see org.compiere.process.DocAction#approveIt() + */ + public boolean approveIt() + { + if (!isValidAction(ACTION_Approve)) + return false; + if (m_document != null) + { + if (m_document.approveIt()) + { + m_status = STATUS_Approved; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_Approved; + return true; + } // approveIt + + /** + * Reject Approval. + * Status: Not Approved + * @return true if success + * @see org.compiere.process.DocAction#rejectIt() + */ + public boolean rejectIt() + { + if (!isValidAction(ACTION_Reject)) + return false; + if (m_document != null) + { + if (m_document.rejectIt()) + { + m_status = STATUS_NotApproved; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_NotApproved; + return true; + } // rejectIt + + /** + * Complete Document. + * Status is set by process + * @return new document status (Complete, In Progress, Invalid, Waiting ..) + * @see org.compiere.process.DocAction#completeIt() + */ + public String completeIt() + { + if (!isValidAction(ACTION_Complete)) + return m_status; + if (m_document != null) + { + m_status = m_document.completeIt(); + m_document.setDocStatus(m_status); + } + return m_status; + } // completeIt + + /** + * Post Document + * Does not change status + * @return true if success + */ + public boolean postIt() + { + if (!isValidAction(ACTION_Post) + || m_document == null) + return false; + try + { + // Should work on Client and Server + InitialContext ctx = CConnection.get().getInitialContext(true); + ServerHome serverHome = (ServerHome)ctx.lookup (ServerHome.JNDI_NAME); + if (serverHome != null) + { + Server server = serverHome.create(); + if (server != null) + { + String error = server.postImmediate(Env.getCtx(), + m_document.getAD_Client_ID(), + m_document.get_Table_ID(), m_document.get_ID(), + true, m_document.get_TrxName()); + m_document.get_Logger().config("Server: " + error == null ? "OK" : error); + return error == null; + } + } + else + m_document.get_Logger().config("NoServerHome"); + } + catch (Exception e) + { + m_document.get_Logger().config("(ex) " + e.getMessage()); + } + return false; + } // postIt + + /** + * Void Document. + * Status: Voided + * @return true if success + * @see org.compiere.process.DocAction#voidIt() + */ + public boolean voidIt() + { + if (!isValidAction(ACTION_Void)) + return false; + if (m_document != null) + { + if (m_document.voidIt()) + { + m_status = STATUS_Voided; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_Voided; + return true; + } // voidIt + + /** + * Close Document. + * Status: Closed + * @return true if success + * @see org.compiere.process.DocAction#closeIt() + */ + public boolean closeIt() + { + if (m_document != null // orders can be closed any time + && m_document.get_Table_ID() == X_C_Order.Table_ID) + ; + else if (!isValidAction(ACTION_Close)) + return false; + if (m_document != null) + { + if (m_document.closeIt()) + { + m_status = STATUS_Closed; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_Closed; + return true; + } // closeIt + + /** + * Reverse Correct Document. + * Status: Reversed + * @return true if success + * @see org.compiere.process.DocAction#reverseCorrectIt() + */ + public boolean reverseCorrectIt() + { + if (!isValidAction(ACTION_Reverse_Correct)) + return false; + if (m_document != null) + { + if (m_document.reverseCorrectIt()) + { + m_status = STATUS_Reversed; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_Reversed; + return true; + } // reverseCorrectIt + + /** + * Reverse Accrual Document. + * Status: Reversed + * @return true if success + * @see org.compiere.process.DocAction#reverseAccrualIt() + */ + public boolean reverseAccrualIt() + { + if (!isValidAction(ACTION_Reverse_Accrual)) + return false; + if (m_document != null) + { + if (m_document.reverseAccrualIt()) + { + m_status = STATUS_Reversed; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_Reversed; + return true; + } // reverseAccrualIt + + /** + * Re-activate Document. + * Status: In Progress + * @return true if success + * @see org.compiere.process.DocAction#reActivateIt() + */ + public boolean reActivateIt() + { + if (!isValidAction(ACTION_ReActivate)) + return false; + if (m_document != null) + { + if (m_document.reActivateIt()) + { + m_status = STATUS_InProgress; + m_document.setDocStatus(m_status); + return true; + } + return false; + } + m_status = STATUS_InProgress; + return true; + } // reActivateIt + + + /** + * Set Document Status to new Status + * @param newStatus new status + */ + void setStatus (String newStatus) + { + m_status = newStatus; + } // setStatus + + + /************************************************************************** + * Get Action Options based on current Status + * @return array of actions + */ + public String[] getActionOptions() + { + if (isInvalid()) + return new String[] {ACTION_Prepare, ACTION_Invalidate, + ACTION_Unlock, ACTION_Void}; + + if (isDrafted()) + return new String[] {ACTION_Prepare, ACTION_Invalidate, ACTION_Complete, + ACTION_Unlock, ACTION_Void}; + + if (isInProgress() || isApproved()) + return new String[] {ACTION_Complete, ACTION_WaitComplete, + ACTION_Approve, ACTION_Reject, + ACTION_Unlock, ACTION_Void, ACTION_Prepare}; + + if (isNotApproved()) + return new String[] {ACTION_Reject, ACTION_Prepare, + ACTION_Unlock, ACTION_Void}; + + if (isWaiting()) + return new String[] {ACTION_Complete, ACTION_WaitComplete, + ACTION_ReActivate, ACTION_Void, ACTION_Close}; + + if (isCompleted()) + return new String[] {ACTION_Close, ACTION_ReActivate, + ACTION_Reverse_Accrual, ACTION_Reverse_Correct, + ACTION_Post, ACTION_Void}; + + if (isClosed()) + return new String[] {ACTION_Post, ACTION_ReOpen}; + + if (isReversed() || isVoided()) + return new String[] {ACTION_Post}; + + return new String[] {}; + } // getActionOptions + + /** + * Is The Action Valid based on current state + * @param action action + * @return true if valid + */ + public boolean isValidAction (String action) + { + String[] options = getActionOptions(); + for (int i = 0; i < options.length; i++) + { + if (options[i].equals(action)) + return true; + } + return false; + } // isValidAction + + /** + * Get Process Message + * @return clear text error message + */ + public String getProcessMsg () + { + return m_message; + } // getProcessMsg + + /** + * Get Process Message + * @param msg clear text error message + */ + public void setProcessMsg (String msg) + { + m_message = msg; + } // setProcessMsg + + + /** Document Exception Message */ + private static String EXCEPTION_MSG = "Document Engine is no Document"; + + /************************************************************************* + * Get Summary + * @return throw exception + */ + public String getSummary() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Document No + * @return throw exception + */ + public String getDocumentNo() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Document Info + * @return throw exception + */ + public String getDocumentInfo() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Document Owner + * @return throw exception + */ + public int getDoc_User_ID() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Document Currency + * @return throw exception + */ + public int getC_Currency_ID() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Document Approval Amount + * @return throw exception + */ + public BigDecimal getApprovalAmt() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Document Client + * @return throw exception + */ + public int getAD_Client_ID() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Document Organization + * @return throw exception + */ + public int getAD_Org_ID() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Doc Action + * @return Document Action + */ + public String getDocAction() + { + return m_action; + } + + /** + * Save Document + * @return throw exception + */ + public boolean save() + { + throw new IllegalStateException(EXCEPTION_MSG); + } + + /** + * Get Context + * @return context + */ + public Properties getCtx() + { + if (m_document != null) + return m_document.getCtx(); + throw new IllegalStateException(EXCEPTION_MSG); + } // getCtx + + /** + * Get ID of record + * @return ID + */ + public int get_ID() + { + if (m_document != null) + return m_document.get_ID(); + throw new IllegalStateException(EXCEPTION_MSG); + } // get_ID + + /** + * Get AD_Table_ID + * @return AD_Table_ID + */ + public int get_Table_ID() + { + if (m_document != null) + return m_document.get_Table_ID(); + throw new IllegalStateException(EXCEPTION_MSG); + } // get_Table_ID + + /** + * Get Logger + * @return logger + */ + public CLogger get_Logger() + { + if (m_document != null) + return m_document.get_Logger(); + throw new IllegalStateException(EXCEPTION_MSG); + } // get_Logger + + /** + * Get Transaction + * @return trx name + */ + public String get_TrxName() + { + return null; + } // get_TrxName + + /** + * CreatePDF + * @return null + */ + public File createPDF () + { + return null; + } + + /** + * Get list of valid document action into the options arary parameter. + * Set default document action into the docAction array parameter. + * @param docStatus + * @param processing + * @param orderType + * @param isSOTrx + * @param AD_Table_ID + * @param docAction + * @param options + * @return Number of valid options + */ + public static int getValidActions(String docStatus, Object processing, + String orderType, String isSOTrx, int AD_Table_ID, String[] docAction, String[] options) + { + if (options == null) + throw new IllegalArgumentException("Option array parameter is null"); + if (docAction == null) + throw new IllegalArgumentException("Doc action array parameter is null"); + + int index = 0; + +// Locked + if (processing != null) + { + boolean locked = "Y".equals(processing); + if (!locked && processing instanceof Boolean) + locked = ((Boolean)processing).booleanValue(); + if (locked) + options[index++] = DocumentEngine.ACTION_Unlock; + } + + // Approval required .. NA + if (docStatus.equals(DocumentEngine.STATUS_NotApproved)) + { + options[index++] = DocumentEngine.ACTION_Prepare; + options[index++] = DocumentEngine.ACTION_Void; + } + // Draft/Invalid .. DR/IN + else if (docStatus.equals(DocumentEngine.STATUS_Drafted) + || docStatus.equals(DocumentEngine.STATUS_Invalid)) + { + options[index++] = DocumentEngine.ACTION_Complete; + // options[index++] = DocumentEngine.ACTION_Prepare; + options[index++] = DocumentEngine.ACTION_Void; + } + // In Process .. IP + else if (docStatus.equals(DocumentEngine.STATUS_InProgress) + || docStatus.equals(DocumentEngine.STATUS_Approved)) + { + options[index++] = DocumentEngine.ACTION_Complete; + options[index++] = DocumentEngine.ACTION_Void; + } + // Complete .. CO + else if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Close; + } + // Waiting Payment + else if (docStatus.equals(DocumentEngine.STATUS_WaitingPayment) + || docStatus.equals(DocumentEngine.STATUS_WaitingConfirmation)) + { + options[index++] = DocumentEngine.ACTION_Void; + options[index++] = DocumentEngine.ACTION_Prepare; + } + // Closed, Voided, REversed .. CL/VO/RE + else if (docStatus.equals(DocumentEngine.STATUS_Closed) + || docStatus.equals(DocumentEngine.STATUS_Voided) + || docStatus.equals(DocumentEngine.STATUS_Reversed)) + return 0; + + /******************** + * Order + */ + if (AD_Table_ID == MOrder.Table_ID) + { + // Draft .. DR/IP/IN + if (docStatus.equals(DocumentEngine.STATUS_Drafted) + || docStatus.equals(DocumentEngine.STATUS_InProgress) + || docStatus.equals(DocumentEngine.STATUS_Invalid)) + { + options[index++] = DocumentEngine.ACTION_Prepare; + options[index++] = DocumentEngine.ACTION_Close; + // Draft Sales Order Quote/Proposal - Process + if ("Y".equals(isSOTrx) + && ("OB".equals(orderType) || "ON".equals(orderType))) + docAction[0] = DocumentEngine.ACTION_Prepare; + } + // Complete .. CO + else if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Void; + options[index++] = DocumentEngine.ACTION_ReActivate; + } + else if (docStatus.equals(DocumentEngine.STATUS_WaitingPayment)) + { + options[index++] = DocumentEngine.ACTION_ReActivate; + options[index++] = DocumentEngine.ACTION_Close; + } + } + /******************** + * Shipment + */ + else if (AD_Table_ID == MInOut.Table_ID) + { + // Complete .. CO + if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Void; + options[index++] = DocumentEngine.ACTION_Reverse_Correct; + } + } + /******************** + * Invoice + */ + else if (AD_Table_ID == MInvoice.Table_ID) + { + // Complete .. CO + if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Void; + options[index++] = DocumentEngine.ACTION_Reverse_Correct; + } + } + /******************** + * Payment + */ + else if (AD_Table_ID == MPayment.Table_ID) + { + // Complete .. CO + if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Void; + options[index++] = DocumentEngine.ACTION_Reverse_Correct; + } + } + /******************** + * GL Journal + */ + else if (AD_Table_ID == MJournal.Table_ID || AD_Table_ID == MJournalBatch.Table_ID) + { + // Complete .. CO + if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Reverse_Correct; + options[index++] = DocumentEngine.ACTION_Reverse_Accrual; + } + } + /******************** + * Allocation + */ + else if (AD_Table_ID == MAllocationHdr.Table_ID) + { + // Complete .. CO + if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Void; + options[index++] = DocumentEngine.ACTION_Reverse_Correct; + } + } + //[ 1782412 ] + /******************** + * Cash + */ + else if (AD_Table_ID == MCash.Table_ID) + { + // Complete .. CO + if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Void; + } + } + /******************** + * Bank Statement + */ + else if (AD_Table_ID == MBankStatement.Table_ID) + { + // Complete .. CO + if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Void; + } + } + /******************** + * Inventory Movement, Physical Inventory + */ + else if (AD_Table_ID == MMovement.Table_ID + || AD_Table_ID == MInventory.Table_ID) + { + // Complete .. CO + if (docStatus.equals(DocumentEngine.STATUS_Completed)) + { + options[index++] = DocumentEngine.ACTION_Void; + options[index++] = DocumentEngine.ACTION_Reverse_Correct; + } + } + return index; + } + + /** + * Fill Vector with DocAction Ref_List(135) values + * @param v_value + * @param v_name + * @param v_description + */ + public static void readReferenceList(ArrayList v_value, ArrayList v_name, + ArrayList v_description) + { + if (v_value == null) + throw new IllegalArgumentException("v_value parameter is null"); + if (v_name == null) + throw new IllegalArgumentException("v_name parameter is null"); + if (v_description == null) + throw new IllegalArgumentException("v_description parameter is null"); + + String sql; + if (Env.isBaseLanguage(Env.getCtx(), "AD_Ref_List")) + sql = "SELECT Value, Name, Description FROM AD_Ref_List " + + "WHERE AD_Reference_ID=? ORDER BY Name"; + else + sql = "SELECT l.Value, t.Name, t.Description " + + "FROM AD_Ref_List l, AD_Ref_List_Trl t " + + "WHERE l.AD_Ref_List_ID=t.AD_Ref_List_ID" + + " AND t.AD_Language='" + Env.getAD_Language(Env.getCtx()) + "'" + + " AND l.AD_Reference_ID=? ORDER BY t.Name"; + + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, DocAction.AD_REFERENCE_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + String value = rs.getString(1); + String name = rs.getString(2); + String description = rs.getString(3); + if (description == null) + description = ""; + // + v_value.add(value); + v_name.add(name); + v_description.add(description); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + } + + /** + * Checks the access rights of the given role/client for the given document actions. + * If no access rules can be found for a doctype/client/document action combination + * every role can access this combination (so no definition is needed for the default + * access rights). + * @param clientId + * @param roleId + * @param docTypeId + * @param options + * @param maxIndex + * @return number of valid actions in the String[] options + */ + public static int checkActionAccess(int clientId, int roleId, int docTypeId, String[] options, int maxIndex) { + final Vector validOptions = new Vector(); + String sql = "SELECT AD_Role_ID FROM AD_Document_Action_Access " + + "WHERE IsActive='Y' AND AD_Client_ID=? AND C_DocType_ID=? AND AD_Ref_List_ID=" + + "(SELECT AD_Ref_List_ID FROM AD_Ref_List WHERE AD_Reference_ID=135" + + " AND Value=?)"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + for (int i = 0; i < maxIndex; i++) { + pstmt.setInt(1, clientId); + pstmt.setInt(2, docTypeId); + pstmt.setString(3, options[i]); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + if(rs.getInt(1) == roleId){ + //is valid for role + validOptions.add(options[i]); + continue; + } + } + rs.close(); + } + validOptions.toArray(options); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + return validOptions.size(); + } +} // DocumentEnine diff --git a/base/src/org/compiere/process/M_Product_BOM_Check.java b/base/src/org/compiere/process/M_Product_BOM_Check.java new file mode 100644 index 0000000000..5bd2853144 --- /dev/null +++ b/base/src/org/compiere/process/M_Product_BOM_Check.java @@ -0,0 +1,183 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + * Portions created by Carlos Ruiz are Copyright (C) 2005 QSS Ltda. + * Contributor(s): Carlos Ruiz (globalqss) + *****************************************************************************/ +package org.compiere.process; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.*; + +import org.compiere.model.X_M_Product; +import org.compiere.util.*; + +/** + * Title: Check BOM Structure (free of cycles) + * Description: + * Tree cannot contain BOMs which are already referenced + * + * @author Carlos Ruiz (globalqss) + * @version $Id: M_Product_BOM_Check.java,v 1.0 2005/09/17 13:32:00 globalqss Exp $ + * @author Carlos Ruiz (globalqss) + * Make T_Selection tables permanent + */ +public class M_Product_BOM_Check extends SvrProcess +{ + + /** The Record */ + private int p_Record_ID = 0; + + private int m_AD_PInstance_ID = 0; + + /** + * Prepare - e.g., get Parameters. + */ + protected void prepare() + { + ProcessInfoParameter[] para = getParameter(); + for (int i = 0; i < para.length; i++) + { + String name = para[i].getParameterName(); + if (para[i].getParameter() == null) + ; + else + log.log(Level.SEVERE, "Unknown Parameter: " + name); + } + p_Record_ID = getRecord_ID(); + m_AD_PInstance_ID = getAD_PInstance_ID(); + } // prepare + + /** + * Process + * @return message + * @throws Exception + */ + protected String doIt() throws Exception + { + StringBuffer sql1 = null; + int no = 0; + + log.info("Check BOM Structure"); + + // Record ID is M_Product_ID of product to be tested + X_M_Product xp = new X_M_Product(Env.getCtx(), p_Record_ID, get_TrxName()); + + if (! xp.isBOM()) { + log.info("NOT BOM Product"); + // No BOM - should not happen, but no problem + xp.setIsVerified(true); + xp.save(get_TrxName()); + return "OK"; + } + + // Table to put all BOMs - duplicate will cause exception + sql1 = new StringBuffer("DELETE FROM T_Selection2 WHERE Query_ID = 0 AND AD_PInstance_ID="+ m_AD_PInstance_ID); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + sql1 = new StringBuffer("INSERT INTO T_Selection2 (AD_PInstance_ID, Query_ID, T_Selection_ID) VALUES (" + + m_AD_PInstance_ID + + ", 0, " + + p_Record_ID + ")"); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + // Table of root modes + sql1 = new StringBuffer("DELETE FROM T_Selection WHERE AD_PInstance_ID="+ m_AD_PInstance_ID); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + sql1 = new StringBuffer("INSERT INTO T_Selection (AD_PInstance_ID, T_Selection_ID) VALUES (" + + m_AD_PInstance_ID + + ", " + + p_Record_ID + ")"); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + + while (true) { + + // Get count remaining on t_selection + int countno = 0; + try + { + PreparedStatement pstmt = DB.prepareStatement + ("SELECT COUNT(*) FROM T_Selection WHERE AD_PInstance_ID="+ m_AD_PInstance_ID, get_TrxName()); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + countno = rs.getInt(1); + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + throw new Exception ("count t_selection", e); + } + log.fine("Count T_Selection =" + countno); + + if (countno == 0) + break; + + try + { + // if any command fails (no==-1) break and inform failure + // Insert BOM Nodes into "All" table + sql1 = new StringBuffer("INSERT INTO T_Selection2 (AD_PInstance_ID, Query_ID, T_Selection_ID) " + + "SELECT " + m_AD_PInstance_ID + ", 0, p.M_Product_ID FROM M_Product p WHERE IsBOM='Y' AND EXISTS " + //+ "(SELECT * FROM M_Product_BOM b WHERE p.M_Product_ID=b.M_ProductBOM_ID AND b.M_Product_ID IN " + + "(SELECT * FROM PP_Product_BOM b WHERE p.M_Product_ID=b.M_Product_ID AND b.M_Product_ID IN " + + "(SELECT T_Selection_ID FROM T_Selection WHERE AD_PInstance_ID="+ m_AD_PInstance_ID + "))"); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + if (no == -1) raiseError("InsertingRoot:ERROR", sql1.toString()); + // Insert BOM Nodes into temporary table + sql1 = new StringBuffer("DELETE FROM T_Selection2 WHERE Query_ID = 1 AND AD_PInstance_ID="+ m_AD_PInstance_ID); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + if (no == -1) raiseError("InsertingRoot:ERROR", sql1.toString()); + sql1 = new StringBuffer("INSERT INTO T_Selection2 (AD_PInstance_ID, Query_ID, T_Selection_ID) " + + "SELECT " + m_AD_PInstance_ID + ", 1, p.M_Product_ID FROM M_Product p WHERE IsBOM='Y' AND EXISTS " + //+ "(SELECT * FROM M_Product_BOM b WHERE p.M_Product_ID=b.M_ProductBOM_ID AND b.M_Product_ID IN " + + "(SELECT * FROM PP_Product_BOM b WHERE p.M_Product_ID=b.M_Product_ID AND b.M_Product_ID IN " + + "(SELECT T_Selection_ID FROM T_Selection WHERE AD_PInstance_ID="+ m_AD_PInstance_ID + "))"); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + if (no == -1) raiseError("InsertingRoot:ERROR", sql1.toString()); + // Copy into root table + sql1 = new StringBuffer("DELETE FROM T_Selection WHERE AD_PInstance_ID="+ m_AD_PInstance_ID); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + if (no == -1) raiseError("InsertingRoot:ERROR", sql1.toString()); + sql1 = new StringBuffer("INSERT INTO T_Selection (AD_PInstance_ID, T_Selection_ID) " + + "SELECT " + m_AD_PInstance_ID + ", T_Selection_ID " + + "FROM T_Selection2 WHERE Query_ID = 1 AND AD_PInstance_ID="+ m_AD_PInstance_ID); + no = DB.executeUpdate(sql1.toString(), get_TrxName()); + if (no == -1) raiseError("InsertingRoot:ERROR", sql1.toString()); + } + catch (Exception e) + { + throw new Exception ("root insert", e); + } + + } + + // Finish process + xp.setIsVerified(true); + xp.save(get_TrxName()); + return "OK"; + } // doIt + + private void raiseError(String string, String sql) throws Exception { + DB.rollback(false, get_TrxName()); + String msg = string; + ValueNamePair pp = CLogger.retrieveError(); + if (pp != null) + msg = pp.getName() + " - "; + msg += sql; + throw new AdempiereUserError (msg); + } + +} // M_Product_BOM_Check diff --git a/base/src/org/compiere/process/OrderBatchProcess.java b/base/src/org/compiere/process/OrderBatchProcess.java new file mode 100644 index 0000000000..dac01bec0e --- /dev/null +++ b/base/src/org/compiere/process/OrderBatchProcess.java @@ -0,0 +1,181 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + * @contributor Karsten Thiemann / Schaeffer AG - kthiemann@adempiere.org * + *****************************************************************************/ +package org.compiere.process; + +import java.sql.*; +import java.util.logging.*; +import org.compiere.model.*; +import org.compiere.util.*; + + +/** + * Order Batch Processing + * + * @author Jorg Janke + * @version $Id: OrderBatchProcess.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $ + */ +public class OrderBatchProcess extends SvrProcess +{ + private int p_C_DocTypeTarget_ID = 0; + private String p_DocStatus = null; + private int p_C_BPartner_ID = 0; + private String p_IsSelfService = null; + private Timestamp p_DateOrdered_From = null; + private Timestamp p_DateOrdered_To = null; + private String p_DocAction = null; + private String p_IsDelivered = null; + private String p_IsInvoiced = null; + + /** + * Prepare + */ + protected void prepare () + { + ProcessInfoParameter[] para = getParameter(); + for (int i = 0; i < para.length; i++) + { + String name = para[i].getParameterName(); + if (para[i].getParameter() == null) + ; + else if (name.equals("C_DocTypeTarget_ID")) + p_C_DocTypeTarget_ID = para[i].getParameterAsInt(); + else if (name.equals("DocStatus")) + p_DocStatus = (String)para[i].getParameter(); + else if (name.equals("IsSelfService")) + p_IsSelfService = (String)para[i].getParameter(); + else if (name.equals("C_BPartner_ID")) + p_C_BPartner_ID = para[i].getParameterAsInt(); + else if (name.equals("DateOrdered")) + { + p_DateOrdered_From = (Timestamp)para[i].getParameter(); + p_DateOrdered_To = (Timestamp)para[i].getParameter_To(); + } + else if (name.equals("DocAction")) + p_DocAction = (String)para[i].getParameter(); + else if (name.equals("IsDelivered")) { + p_IsDelivered = (String)para[i].getParameter(); + } else if (name.equals("IsInvoiced")) { + p_IsInvoiced = (String)para[i].getParameter(); + } + else + log.log(Level.SEVERE, "Unknown Parameter: " + name); + } + } // prepare + + /** + * Process + * @return msg + * @throws Exception + */ + protected String doIt () throws Exception + { + log.info("C_DocTypeTarget_ID=" + p_C_DocTypeTarget_ID + ", DocStatus=" + p_DocStatus + + ", IsSelfService=" + p_IsSelfService + ", C_BPartner_ID=" + p_C_BPartner_ID + + ", DateOrdered=" + p_DateOrdered_From + "->" + p_DateOrdered_To + + ", DocAction=" + p_DocAction + ", IsDelivered=" + p_IsDelivered + + ", IsInvoiced=" + p_IsInvoiced); + + if (p_C_DocTypeTarget_ID == 0) + throw new AdempiereUserError("@NotFound@: @C_DocTypeTarget_ID@"); + if (p_DocStatus == null || p_DocStatus.length() != 2) + throw new AdempiereUserError("@NotFound@: @DocStatus@"); + if (p_DocAction == null || p_DocAction.length() != 2) + throw new AdempiereUserError("@NotFound@: @DocAction@"); + + // + StringBuffer sql = new StringBuffer("SELECT * FROM C_Order o " + + " WHERE o.C_DocTypeTarget_ID=? AND o.DocStatus=? "); + if (p_IsSelfService != null && p_IsSelfService.length() == 1) + sql.append(" AND o.IsSelfService='").append(p_IsSelfService).append("'"); + if (p_C_BPartner_ID != 0) + sql.append(" AND o.C_BPartner_ID=").append(p_C_BPartner_ID); + if (p_DateOrdered_From != null) + sql.append(" AND TRUNC(o.DateOrdered) >= ").append(DB.TO_DATE(p_DateOrdered_From, true)); + if (p_DateOrdered_To != null) + sql.append(" AND TRUNC(o.DateOrdered) <= ").append(DB.TO_DATE(p_DateOrdered_To, true)); + if ("Y".equals(p_IsDelivered)) + sql.append(" AND NOT EXISTS (SELECT l.C_OrderLine_ID FROM C_OrderLine l ") + .append(" WHERE l.C_Order_ID=o.C_Order_ID AND l.QtyOrdered>l.QtyDelivered) "); + else if ("N".equals(p_IsDelivered)) + sql.append(" AND EXISTS (SELECT l.C_OrderLine_ID FROM C_OrderLine l ") + .append(" WHERE l.C_Order_ID=o.C_Order_ID AND l.QtyOrdered>l.QtyDelivered) "); + if ("Y".equals(p_IsInvoiced)) + sql.append(" AND NOT EXISTS (SELECT l.C_OrderLine_ID FROM C_OrderLine l ") + .append(" WHERE l.C_Order_ID=o.C_Order_ID AND l.QtyOrdered>l.QtyInvoiced) "); + else if ("N".equals(p_IsInvoiced)) + sql.append(" AND EXISTS (SELECT l.C_OrderLine_ID FROM C_OrderLine l ") + .append(" WHERE l.C_Order_ID=o.C_Order_ID AND l.QtyOrdered>l.QtyInvoiced) "); + + int counter = 0; + int errCounter = 0; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(sql.toString(), get_TrxName()); + pstmt.setInt(1, p_C_DocTypeTarget_ID); + pstmt.setString(2, p_DocStatus); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + if (process(new MOrder(getCtx(),rs, get_TrxName()))) + counter++; + else + errCounter++; + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql.toString(), e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + return "@Updated@=" + counter + ", @Errors@=" + errCounter; + } // doIt + + /** + * Process Order + * @param order order + * @return true if ok + */ + private boolean process (MOrder order) + { + log.info(order.toString()); + // + order.setDocAction(p_DocAction); + if (order.processIt(p_DocAction)) + { + order.save(); + addLog(0, null, null, order.getDocumentNo() + ": OK"); + return true; + } + addLog (0, null, null, order.getDocumentNo() + ": Error " + order.getProcessMsg()); + return false; + } // process + +} // OrderBatchProcess diff --git a/base/src/org/compiere/process/OrderOpen.java b/base/src/org/compiere/process/OrderOpen.java new file mode 100644 index 0000000000..67627a74e2 --- /dev/null +++ b/base/src/org/compiere/process/OrderOpen.java @@ -0,0 +1,73 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.process; + +import java.util.logging.*; +import org.compiere.model.*; +import org.compiere.util.AdempiereSystemError; + +/** + * Re-Open Order Process (from Closed to Completed) + * + * @author Jorg Janke + * @version $Id: OrderOpen.java,v 1.2 2006/07/30 00:51:02 jjanke Exp $ + */ +public class OrderOpen extends SvrProcess +{ + /** The Order */ + private int p_C_Order_ID = 0; + + /** + * Prepare - e.g., get Parameters. + */ + protected void prepare() + { + ProcessInfoParameter[] para = getParameter(); + for (int i = 0; i < para.length; i++) + { + String name = para[i].getParameterName(); + if (para[i].getParameter() == null) + ; + else if (name.equals("C_Order_ID")) + p_C_Order_ID = para[i].getParameterAsInt(); + else + log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name); + } + } // prepare + + /** + * Perrform process. + * @return Message + * @throws Exception if not successful + */ + protected String doIt() throws AdempiereSystemError + { + log.info("doIt - Open C_Order_ID=" + p_C_Order_ID); + if (p_C_Order_ID == 0) + return ""; + // + MOrder order = new MOrder (getCtx(), p_C_Order_ID, get_TrxName()); + String msg = order.reopenIt(); + if ( msg.length() != 0 ) + { + throw new AdempiereSystemError(msg); + } + + return order.save() ? "@OK@" : "@Error@"; + } // doIt + +} // OrderOpen diff --git a/base/src/org/compiere/process/OrderPOCreate.java b/base/src/org/compiere/process/OrderPOCreate.java new file mode 100644 index 0000000000..8ce6489fff --- /dev/null +++ b/base/src/org/compiere/process/OrderPOCreate.java @@ -0,0 +1,291 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.process; + +import java.awt.geom.IllegalPathStateException; +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.logging.Level; + +import org.compiere.model.MBPartner; +import org.compiere.model.MOrder; +import org.compiere.model.MOrderLine; +import org.compiere.util.DB; + +/** + * Generate PO from Sales Order + * + * @author Jorg Janke + * @version $Id: OrderPOCreate.java,v 1.2 2006/07/30 00:51:01 jjanke Exp $ + */ +public class OrderPOCreate extends SvrProcess +{ + /** Order Date From */ + private Timestamp p_DateOrdered_From; + /** Order Date To */ + private Timestamp p_DateOrdered_To; + /** Customer */ + private int p_C_BPartner_ID; + /** Vendor */ + private int p_Vendor_ID; + /** Sales Order */ + private int p_C_Order_ID; + /** Drop Ship */ + private String p_IsDropShip; + + /** + * Prepare - e.g., get Parameters. + */ + protected void prepare() + { + ProcessInfoParameter[] para = getParameter(); + for (int i = 0; i < para.length; i++) + { + String name = para[i].getParameterName(); + if (para[i].getParameter() == null) + ; + else if (name.equals("DateOrdered")) + { + p_DateOrdered_From = (Timestamp)para[i].getParameter(); + p_DateOrdered_To = (Timestamp)para[i].getParameter_To(); + } + else if (name.equals("C_BPartner_ID")) + p_C_BPartner_ID = ((BigDecimal)para[i].getParameter()).intValue(); + else if (name.equals("Vendor_ID")) + p_Vendor_ID = ((BigDecimal)para[i].getParameter()).intValue(); + else if (name.equals("C_Order_ID")) + p_C_Order_ID = ((BigDecimal)para[i].getParameter()).intValue(); + else if (name.equals("IsDropShip")) + p_IsDropShip = (String)para[i].getParameter(); + else + log.log(Level.SEVERE, "Unknown Parameter: " + name); + } + } // prepare + + /** + * Perrform process. + * @return Message + * @throws Exception if not successful + */ + protected String doIt() throws Exception + { + log.info("DateOrdered=" + p_DateOrdered_From + " - " + p_DateOrdered_To + + " - C_BPartner_ID=" + p_C_BPartner_ID + " - Vendor_ID=" + p_Vendor_ID + + " - IsDropShip=" + p_IsDropShip + " - C_Order_ID=" + p_C_Order_ID); + if (p_C_Order_ID == 0 && p_IsDropShip == null + && p_DateOrdered_From == null && p_DateOrdered_To == null + && p_C_BPartner_ID == 0 && p_Vendor_ID == 0) + throw new IllegalPathStateException("You need to restrict selection"); + // + String sql = "SELECT * FROM C_Order o " + + "WHERE o.IsSOTrx='Y'" + // No Duplicates + // " AND o.Link_Order_ID IS NULL" + + " AND NOT EXISTS (SELECT * FROM C_OrderLine ol WHERE o.C_Order_ID=ol.C_Order_ID AND ol.Link_OrderLine_ID IS NOT NULL)" + ; + if (p_C_Order_ID != 0) + sql += " AND o.C_Order_ID=?"; + else + { + if (p_C_BPartner_ID != 0) + sql += " AND o.C_BPartner_ID=?"; + if (p_IsDropShip != null) + sql += " AND o.IsDropShip=?"; + if (p_Vendor_ID != 0) + sql += " AND EXISTS (SELECT * FROM C_OrderLine ol" + + " INNER JOIN M_Product_PO po ON (ol.M_Product_ID=po.M_Product_ID) " + + "WHERE o.C_Order_ID=ol.C_Order_ID AND po.C_BPartner_ID=?)"; + if (p_DateOrdered_From != null && p_DateOrdered_To != null) + sql += "AND TRUNC(o.DateOrdered) BETWEEN ? AND ?"; + else if (p_DateOrdered_From != null && p_DateOrdered_To == null) + sql += "AND TRUNC(o.DateOrdered) >= ?"; + else if (p_DateOrdered_From == null && p_DateOrdered_To != null) + sql += "AND TRUNC(o.DateOrdered) <= ?"; + } + PreparedStatement pstmt = null; + ResultSet rs = null; + int counter = 0; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + if (p_C_Order_ID != 0) + pstmt.setInt (1, p_C_Order_ID); + else + { + int index = 1; + if (p_C_BPartner_ID != 0) + pstmt.setInt (index++, p_C_BPartner_ID); + if (p_IsDropShip != null) + pstmt.setString(index++, p_IsDropShip); + if (p_Vendor_ID != 0) + pstmt.setInt (index++, p_Vendor_ID); + if (p_DateOrdered_From != null && p_DateOrdered_To != null) + { + pstmt.setTimestamp(index++, p_DateOrdered_From); + pstmt.setTimestamp(index++, p_DateOrdered_To); + } + else if (p_DateOrdered_From != null && p_DateOrdered_To == null) + pstmt.setTimestamp(index++, p_DateOrdered_From); + else if (p_DateOrdered_From == null && p_DateOrdered_To != null) + pstmt.setTimestamp(index++, p_DateOrdered_To); + } + rs = pstmt.executeQuery (); + while (rs.next ()) + { + counter += createPOFromSO (new MOrder (getCtx(), rs, get_TrxName())); + } + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + if (counter == 0) + log.fine(sql); + return "@Created@ " + counter; + } // doIt + + /** + * Create PO From SO + * @param so sales order + * @return number of POs created + */ + private int createPOFromSO (MOrder so) + { + log.info(so.toString()); + MOrderLine[] soLines = so.getLines(true, null); + if (soLines == null || soLines.length == 0) + { + log.warning("No Lines - " + so); + return 0; + } + // + int counter = 0; + // Order Lines with a Product which has a current vendor + String sql = "SELECT DISTINCT po.C_BPartner_ID, po.M_Product_ID " + + "FROM M_Product_PO po" + + " INNER JOIN C_OrderLine ol ON (po.M_Product_ID=ol.M_Product_ID) " + + "WHERE ol.C_Order_ID=? AND po.IsCurrentVendor='Y' " + + "ORDER BY 1"; + PreparedStatement pstmt = null; + ResultSet rs = null; + MOrder po = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, so.getC_Order_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + { + // New Order + int C_BPartner_ID = rs.getInt(1); + if (po == null || po.getBill_BPartner_ID() != C_BPartner_ID) + { + po = createPOForVendor(rs.getInt(1), so); + addLog(0, null, null, po.getDocumentNo()); + counter++; + } + + // Line + int M_Product_ID = rs.getInt(2); + for (int i = 0; i < soLines.length; i++) + { + if (soLines[i].getM_Product_ID() == M_Product_ID) + { + MOrderLine poLine = new MOrderLine (po); + poLine.setLink_OrderLine_ID(soLines[i].getC_OrderLine_ID()); + poLine.setM_Product_ID(soLines[i].getM_Product_ID()); + poLine.setM_AttributeSetInstance_ID(soLines[i].getM_AttributeSetInstance_ID()); + poLine.setC_UOM_ID(soLines[i].getC_UOM_ID()); + poLine.setQtyEntered(soLines[i].getQtyEntered()); + poLine.setQtyOrdered(soLines[i].getQtyOrdered()); + poLine.setDescription(soLines[i].getDescription()); + poLine.setDatePromised(soLines[i].getDatePromised()); + poLine.setPrice(); + poLine.save(); + + soLines[i].setLink_OrderLine_ID(poLine.getC_OrderLine_ID()); + soLines[i].save(); + } + } + } + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + // Set Reference to PO + if (counter == 1 && po != null) + { + so.setLink_Order_ID(po.getC_Order_ID()); + so.save(); + } + return counter; + } // createPOFromSO + + /** + * Create PO for Vendor + * @param C_BPartner_ID vendor + * @param so sales order + */ + public MOrder createPOForVendor(int C_BPartner_ID, MOrder so) + { + MOrder po = new MOrder (getCtx(), 0, get_TrxName()); + po.setClientOrg(so.getAD_Client_ID(), so.getAD_Org_ID()); + po.setLink_Order_ID(so.getC_Order_ID()); + po.setIsSOTrx(false); + po.setC_DocTypeTarget_ID(); + // + po.setDescription(so.getDescription()); + po.setPOReference(so.getDocumentNo()); + po.setPriorityRule(so.getPriorityRule()); + po.setSalesRep_ID(so.getSalesRep_ID()); + po.setM_Warehouse_ID(so.getM_Warehouse_ID()); + // Set Vendor + MBPartner vendor = new MBPartner (getCtx(), C_BPartner_ID, get_TrxName()); + po.setBPartner(vendor); + // Drop Ship + po.setIsDropShip(so.isDropShip()); + if (so.isDropShip()) + { + po.setShip_BPartner_ID(so.getC_BPartner_ID()); + po.setShip_Location_ID(so.getC_BPartner_Location_ID()); + po.setShip_User_ID(so.getAD_User_ID()); + } + // References + po.setC_Activity_ID(so.getC_Activity_ID()); + po.setC_Campaign_ID(so.getC_Campaign_ID()); + po.setC_Project_ID(so.getC_Project_ID()); + po.setUser1_ID(so.getUser1_ID()); + po.setUser2_ID(so.getUser2_ID()); + // + po.save(); + return po; + } // createPOForVendor + +} // doIt diff --git a/base/src/org/compiere/process/ReplenishReport.java b/base/src/org/compiere/process/ReplenishReport.java new file mode 100644 index 0000000000..3388aa2d1a --- /dev/null +++ b/base/src/org/compiere/process/ReplenishReport.java @@ -0,0 +1,787 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + * Contributor(s): Chris Farley - northernbrewer * + *****************************************************************************/ +package org.compiere.process; + +import java.sql.*; +import java.util.*; +import java.math.*; + +import org.compiere.model.*; +import org.eevolution.model.*; +import java.util.logging.*; +import org.compiere.util.*; + +/** + * Replenishment Report + * + * @author Jorg Janke + * @version $Id: ReplenishReport.java,v 1.2 2006/07/30 00:51:01 jjanke Exp $ + * + * Carlos Ruiz globalqss - integrate bug fixing from Chris Farley + * [ 1619517 ] Replenish report fails when no records in m_storage + */ +public class ReplenishReport extends SvrProcess +{ + /** Warehouse */ + private int p_M_Warehouse_ID = 0; + /** Optional BPartner */ + private int p_C_BPartner_ID = 0; + /** Create (POO)Purchse Order or (POR)Requisition or (MMM)Movements */ + private String p_ReplenishmentCreate = null; + /** Document Type */ + private int p_C_DocType_ID = 0; + /** Return Info */ + private String m_info = ""; + + /** + * Prepare - e.g., get Parameters. + */ + protected void prepare() + { + ProcessInfoParameter[] para = getParameter(); + for (int i = 0; i < para.length; i++) + { + String name = para[i].getParameterName(); + if (para[i].getParameter() == null) + ; + else if (name.equals("M_Warehouse_ID")) + p_M_Warehouse_ID = para[i].getParameterAsInt(); + else if (name.equals("C_BPartner_ID")) + p_C_BPartner_ID = para[i].getParameterAsInt(); + else if (name.equals("ReplenishmentCreate")) + p_ReplenishmentCreate = (String)para[i].getParameter(); + else if (name.equals("C_DocType_ID")) + p_C_DocType_ID = para[i].getParameterAsInt(); + else + log.log(Level.SEVERE, "Unknown Parameter: " + name); + } + } // prepare + + /** + * Perrform process. + * @return Message + * @throws Exception if not successful + */ + protected String doIt() throws Exception + { + log.info("M_Warehouse_ID=" + p_M_Warehouse_ID + + ", C_BPartner_ID=" + p_C_BPartner_ID + + " - ReplenishmentCreate=" + p_ReplenishmentCreate + + ", C_DocType_ID=" + p_C_DocType_ID); + if (p_ReplenishmentCreate != null && p_C_DocType_ID == 0) + throw new AdempiereUserError("@FillMandatory@ @C_DocType_ID@"); + + MWarehouse wh = MWarehouse.get(getCtx(), p_M_Warehouse_ID); + if (wh.get_ID() == 0) + throw new AdempiereSystemError("@FillMandatory@ @M_Warehouse_ID@"); + // + prepareTable(); + fillTable(wh); + // + if (p_ReplenishmentCreate == null) + return "OK"; + // + MDocType dt = MDocType.get(getCtx(), p_C_DocType_ID); + if (!dt.getDocBaseType().equals(p_ReplenishmentCreate)) + throw new AdempiereSystemError("@C_DocType_ID@=" + dt.getName() + " <> " + p_ReplenishmentCreate); + // + if (p_ReplenishmentCreate.equals("POO")) + createPO(); + else if (p_ReplenishmentCreate.equals("POR")) + createRequisition(); + else if (p_ReplenishmentCreate.equals("MMM")) + createMovements(); + else if (p_ReplenishmentCreate.equals("DOO")) + createDO(); + return m_info; + } // doIt + + /** + * Prepare/Check Replenishment Table + */ + private void prepareTable() + { + // Level_Max must be >= Level_Max + String sql = "UPDATE M_Replenish" + + " SET Level_Max = Level_Min " + + "WHERE Level_Max < Level_Min"; + int no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Corrected Max_Level=" + no); + + // Minimum Order should be 1 + sql = "UPDATE M_Product_PO" + + " SET Order_Min = 1 " + + "WHERE Order_Min IS NULL OR Order_Min < 1"; + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Corrected Order Min=" + no); + + // Pack should be 1 + sql = "UPDATE M_Product_PO" + + " SET Order_Pack = 1 " + + "WHERE Order_Pack IS NULL OR Order_Pack < 1"; + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Corrected Order Pack=" + no); + + // Set Current Vendor where only one vendor + sql = "UPDATE M_Product_PO p" + + " SET IsCurrentVendor='Y' " + + "WHERE IsCurrentVendor<>'Y'" + + " AND EXISTS (SELECT pp.M_Product_ID FROM M_Product_PO pp " + + "WHERE p.M_Product_ID=pp.M_Product_ID " + + "GROUP BY pp.M_Product_ID " + + "HAVING COUNT(*) = 1)"; + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Corrected CurrentVendor(Y)=" + no); + + // More then one current vendor + sql = "UPDATE M_Product_PO p" + + " SET IsCurrentVendor='N' " + + "WHERE IsCurrentVendor = 'Y'" + + " AND EXISTS (SELECT pp.M_Product_ID FROM M_Product_PO pp " + + "WHERE p.M_Product_ID=pp.M_Product_ID AND pp.IsCurrentVendor='Y' " + + "GROUP BY pp.M_Product_ID " + + "HAVING COUNT(*) > 1)"; + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Corrected CurrentVendor(N)=" + no); + + // Just to be sure + sql = "DELETE T_Replenish WHERE AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Delete Existing Temp=" + no); + } // prepareTable + + /** + * Fill Table + * @param wh warehouse + */ + private void fillTable (MWarehouse wh) throws Exception + { + String sql = "INSERT INTO T_Replenish " + + "(AD_PInstance_ID, M_Warehouse_ID, M_Product_ID, AD_Client_ID, AD_Org_ID," + + " ReplenishType, Level_Min, Level_Max," + + " C_BPartner_ID, Order_Min, Order_Pack, QtyToOrder, ReplenishmentCreate) " + + "SELECT " + getAD_PInstance_ID() + + ", r.M_Warehouse_ID, r.M_Product_ID, r.AD_Client_ID, r.AD_Org_ID," + + " r.ReplenishType, r.Level_Min, r.Level_Max," + + " po.C_BPartner_ID, po.Order_Min, po.Order_Pack, 0, "; + if (p_ReplenishmentCreate == null) + sql += "null"; + else + sql += "'" + p_ReplenishmentCreate + "'"; + sql += " FROM M_Replenish r" + + " INNER JOIN M_Product_PO po ON (r.M_Product_ID=po.M_Product_ID) " + + "WHERE po.IsCurrentVendor='Y'" // Only Current Vendor + + " AND r.ReplenishType<>'0'" + + " AND po.IsActive='Y' AND r.IsActive='Y'" + + " AND r.M_Warehouse_ID=" + p_M_Warehouse_ID; + if (p_C_BPartner_ID != 0) + sql += " AND po.C_BPartner_ID=" + p_C_BPartner_ID; + int no = DB.executeUpdate(sql, get_TrxName()); + log.finest(sql); + log.fine("Insert (1) #" + no); + + if (p_C_BPartner_ID == 0) + { + sql = "INSERT INTO T_Replenish " + + "(AD_PInstance_ID, M_Warehouse_ID, M_Product_ID, AD_Client_ID, AD_Org_ID," + + " ReplenishType, Level_Min, Level_Max," + + " C_BPartner_ID, Order_Min, Order_Pack, QtyToOrder, ReplenishmentCreate) " + + "SELECT " + getAD_PInstance_ID() + + ", r.M_Warehouse_ID, r.M_Product_ID, r.AD_Client_ID, r.AD_Org_ID," + + " r.ReplenishType, r.Level_Min, r.Level_Max," + + " 0, 1, 1, 0, "; + if (p_ReplenishmentCreate == null) + sql += "null"; + else + sql += "'" + p_ReplenishmentCreate + "'"; + sql += " FROM M_Replenish r " + + "WHERE r.ReplenishType<>'0' AND r.IsActive='Y'" + + " AND r.M_Warehouse_ID=" + p_M_Warehouse_ID + + " AND NOT EXISTS (SELECT * FROM T_Replenish t " + + "WHERE r.M_Product_ID=t.M_Product_ID" + + " AND AD_PInstance_ID=" + getAD_PInstance_ID() + ")"; + no = DB.executeUpdate(sql, get_TrxName()); + log.fine("Insert (BP) #" + no); + } + + sql = "UPDATE T_Replenish t SET " + + "QtyOnHand = (SELECT COALESCE(SUM(QtyOnHand),0) FROM M_Storage s, M_Locator l WHERE t.M_Product_ID=s.M_Product_ID" + + " AND l.M_Locator_ID=s.M_Locator_ID AND l.M_Warehouse_ID=t.M_Warehouse_ID)," + + "QtyReserved = (SELECT COALESCE(SUM(QtyReserved),0) FROM M_Storage s, M_Locator l WHERE t.M_Product_ID=s.M_Product_ID" + + " AND l.M_Locator_ID=s.M_Locator_ID AND l.M_Warehouse_ID=t.M_Warehouse_ID)," + + "QtyOrdered = (SELECT COALESCE(SUM(QtyOrdered),0) FROM M_Storage s, M_Locator l WHERE t.M_Product_ID=s.M_Product_ID" + + " AND l.M_Locator_ID=s.M_Locator_ID AND l.M_Warehouse_ID=t.M_Warehouse_ID)"; + if (p_C_DocType_ID != 0) + sql += ", C_DocType_ID=" + p_C_DocType_ID; + sql += " WHERE AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Update #" + no); + + // Delete inactive products and replenishments + sql = "DELETE T_Replenish r " + + "WHERE (EXISTS (SELECT * FROM M_Product p " + + "WHERE p.M_Product_ID=r.M_Product_ID AND p.IsActive='N')" + + " OR EXISTS (SELECT * FROM M_Replenish rr " + + " WHERE rr.M_Product_ID=r.M_Product_ID AND rr.IsActive='N'))" + + " AND AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Delete Inactive=" + no); + + // Ensure Data consistency + sql = "UPDATE T_Replenish SET QtyOnHand = 0 WHERE QtyOnHand IS NULL"; + no = DB.executeUpdate(sql, get_TrxName()); + sql = "UPDATE T_Replenish SET QtyReserved = 0 WHERE QtyReserved IS NULL"; + no = DB.executeUpdate(sql, get_TrxName()); + sql = "UPDATE T_Replenish SET QtyOrdered = 0 WHERE QtyOrdered IS NULL"; + no = DB.executeUpdate(sql, get_TrxName()); + + // Set Minimum / Maximum Maintain Level + // X_M_Replenish.REPLENISHTYPE_ReorderBelowMinimumLevel + sql = "UPDATE T_Replenish" + + " SET QtyToOrder = CASE WHEN QtyOnHand - QtyReserved + QtyOrdered <= Level_Min " + + " THEN Level_Max - QtyOnHand + QtyReserved - QtyOrdered " + + " ELSE 0 END " + + "WHERE ReplenishType='1'" + + " AND AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Update Type-1=" + no); + // + // X_M_Replenish.REPLENISHTYPE_MaintainMaximumLevel + sql = "UPDATE T_Replenish" + + " SET QtyToOrder = Level_Max - QtyOnHand + QtyReserved - QtyOrdered " + + "WHERE ReplenishType='2'" + + " AND AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Update Type-2=" + no); + + + // Minimum Order Quantity + sql = "UPDATE T_Replenish" + + " SET QtyToOrder = Order_Min " + + "WHERE QtyToOrder < Order_Min" + + " AND QtyToOrder > 0" + + " AND AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Set MinOrderQty=" + no); + + // Even dividable by Pack + sql = "UPDATE T_Replenish" + + " SET QtyToOrder = QtyToOrder - MOD(QtyToOrder, Order_Pack) + Order_Pack " + + "WHERE MOD(QtyToOrder, Order_Pack) <> 0" + + " AND QtyToOrder > 0" + + " AND AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Set OrderPackQty=" + no); + + // Source from other warehouse + if (wh.getM_WarehouseSource_ID() != 0) + { + sql = "UPDATE T_Replenish" + + " SET M_WarehouseSource_ID=" + wh.getM_WarehouseSource_ID() + + " WHERE AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Set Source Warehouse=" + no); + } + // Check Source Warehouse + sql = "UPDATE T_Replenish" + + " SET M_WarehouseSource_ID = NULL " + + "WHERE M_Warehouse_ID=M_WarehouseSource_ID" + + " AND AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Set same Source Warehouse=" + no); + + // Custom Replenishment + String className = wh.getReplenishmentClass(); + if (className != null && className.length() > 0) + { + // Get Replenishment Class + ReplenishInterface custom = null; + try + { + Class clazz = Class.forName(className); + custom = (ReplenishInterface)clazz.newInstance(); + } + catch (Exception e) + { + throw new AdempiereUserError("No custom Replenishment class " + + className + " - " + e.toString()); + } + + X_T_Replenish[] replenishs = getReplenish("ReplenishType='9'"); + for (int i = 0; i < replenishs.length; i++) + { + X_T_Replenish replenish = replenishs[i]; + if (replenish.getReplenishType().equals(X_T_Replenish.REPLENISHTYPE_Custom)) + { + BigDecimal qto = null; + try + { + qto = custom.getQtyToOrder(wh, replenish); + } + catch (Exception e) + { + log.log(Level.SEVERE, custom.toString(), e); + } + if (qto == null) + qto = Env.ZERO; + replenish.setQtyToOrder(qto); + replenish.save(); + } + } + } + // Delete rows where nothing to order + sql = "DELETE T_Replenish " + + "WHERE QtyToOrder < 1" + + " AND AD_PInstance_ID=" + getAD_PInstance_ID(); + no = DB.executeUpdate(sql, get_TrxName()); + if (no != 0) + log.fine("Delete No QtyToOrder=" + no); + } // fillTable + + /** + * Create PO's + */ + private void createPO() + { + int noOrders = 0; + String info = ""; + // + MOrder order = null; + MWarehouse wh = null; + X_T_Replenish[] replenishs = getReplenish("M_WarehouseSource_ID IS NULL"); + for (int i = 0; i < replenishs.length; i++) + { + X_T_Replenish replenish = replenishs[i]; + if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID()) + wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID()); + // + if (order == null + || order.getC_BPartner_ID() != replenish.getC_BPartner_ID() + || order.getM_Warehouse_ID() != replenish.getM_Warehouse_ID()) + { + order = new MOrder(getCtx(), 0, get_TrxName()); + order.setIsSOTrx(false); + order.setC_DocTypeTarget_ID(p_C_DocType_ID); + MBPartner bp = new MBPartner(getCtx(), replenish.getC_BPartner_ID(), get_TrxName()); + order.setBPartner(bp); + order.setSalesRep_ID(getAD_User_ID()); + order.setDescription(Msg.getMsg(getCtx(), "Replenishment")); + // Set Org/WH + order.setAD_Org_ID(wh.getAD_Org_ID()); + order.setM_Warehouse_ID(wh.getM_Warehouse_ID()); + if (!order.save()) + return; + log.fine(order.toString()); + noOrders++; + info += " - " + order.getDocumentNo(); + } + MOrderLine line = new MOrderLine (order); + line.setM_Product_ID(replenish.getM_Product_ID()); + line.setQty(replenish.getQtyToOrder()); + line.setPrice(); + line.save(); + } + m_info = "#" + noOrders + info; + log.info(m_info); + } // createPO + + /** + * Create Requisition + */ + private void createRequisition() + { + int noReqs = 0; + String info = ""; + // + MRequisition requisition = null; + MWarehouse wh = null; + X_T_Replenish[] replenishs = getReplenish("M_WarehouseSource_ID IS NULL"); + for (int i = 0; i < replenishs.length; i++) + { + X_T_Replenish replenish = replenishs[i]; + if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID()) + wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID()); + // + if (requisition == null + || requisition.getM_Warehouse_ID() != replenish.getM_Warehouse_ID()) + { + requisition = new MRequisition (getCtx(), 0, get_TrxName()); + requisition.setAD_User_ID (getAD_User_ID()); + requisition.setC_DocType_ID(p_C_DocType_ID); + requisition.setDescription(Msg.getMsg(getCtx(), "Replenishment")); + // Set Org/WH + requisition.setAD_Org_ID(wh.getAD_Org_ID()); + requisition.setM_Warehouse_ID(wh.getM_Warehouse_ID()); + if (!requisition.save()) + return; + log.fine(requisition.toString()); + noReqs++; + info += " - " + requisition.getDocumentNo(); + } + // + MRequisitionLine line = new MRequisitionLine(requisition); + line.setM_Product_ID(replenish.getM_Product_ID()); + line.setC_BPartner_ID(replenish.getC_BPartner_ID()); + line.setQty(replenish.getQtyToOrder()); + line.setPrice(); + line.save(); + } + m_info = "#" + noReqs + info; + log.info(m_info); + } // createRequisition + + /** + * Create Inventory Movements + */ + private void createMovements() + { + int noMoves = 0; + String info = ""; + // + MClient client = null; + MMovement move = null; + int M_Warehouse_ID = 0; + int M_WarehouseSource_ID = 0; + MWarehouse whSource = null; + MWarehouse wh = null; + X_T_Replenish[] replenishs = getReplenish("M_WarehouseSource_ID IS NOT NULL"); + for (int i = 0; i < replenishs.length; i++) + { + X_T_Replenish replenish = replenishs[i]; + if (whSource == null || whSource.getM_WarehouseSource_ID() != replenish.getM_WarehouseSource_ID()) + whSource = MWarehouse.get(getCtx(), replenish.getM_WarehouseSource_ID()); + if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID()) + wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID()); + if (client == null || client.getAD_Client_ID() != whSource.getAD_Client_ID()) + client = MClient.get(getCtx(), whSource.getAD_Client_ID()); + // + if (move == null + || M_WarehouseSource_ID != replenish.getM_WarehouseSource_ID() + || M_Warehouse_ID != replenish.getM_Warehouse_ID()) + { + M_WarehouseSource_ID = replenish.getM_WarehouseSource_ID(); + M_Warehouse_ID = replenish.getM_Warehouse_ID(); + + move = new MMovement (getCtx(), 0, get_TrxName()); + move.setC_DocType_ID(p_C_DocType_ID); + move.setDescription(Msg.getMsg(getCtx(), "Replenishment") + + ": " + whSource.getName() + "->" + wh.getName()); + // Set Org + move.setAD_Org_ID(whSource.getAD_Org_ID()); + if (!move.save()) + return; + log.fine(move.toString()); + noMoves++; + info += " - " + move.getDocumentNo(); + } + // To + int M_LocatorTo_ID = wh.getDefaultLocator().getM_Locator_ID(); + // From: Look-up Storage + MProduct product = MProduct.get(getCtx(), replenish.getM_Product_ID()); + String MMPolicy = product.getMMPolicy(); + MStorage[] storages = MStorage.getWarehouse(getCtx(), + whSource.getM_Warehouse_ID(), replenish.getM_Product_ID(), 0, 0, + true, null, + MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName()); + // + BigDecimal target = replenish.getQtyToOrder(); + for (int j = 0; j < storages.length; j++) + { + MStorage storage = storages[j]; + if (storage.getQtyOnHand().signum() <= 0) + continue; + BigDecimal moveQty = target; + if (storage.getQtyOnHand().compareTo(moveQty) < 0) + moveQty = storage.getQtyOnHand(); + // + MMovementLine line = new MMovementLine(move); + line.setM_Product_ID(replenish.getM_Product_ID()); + line.setMovementQty(moveQty); + if (replenish.getQtyToOrder().compareTo(moveQty) != 0) + line.setDescription("Total: " + replenish.getQtyToOrder()); + line.setM_Locator_ID(storage.getM_Locator_ID()); // from + line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID()); + line.setM_LocatorTo_ID(M_LocatorTo_ID); // to + line.setM_AttributeSetInstanceTo_ID(storage.getM_AttributeSetInstance_ID()); + line.save(); + // + target = target.subtract(moveQty); + if (target.signum() == 0) + break; + } + } + if (replenishs.length == 0) + { + m_info = "No Source Warehouse"; + log.warning(m_info); + } + else + { + m_info = "#" + noMoves + info; + log.info(m_info); + } + } // Create Inventory Movements + + /** + * Create Distribution Order + */ + private void createDO() throws Exception + { + int noMoves = 0; + String info = ""; + // + MClient client = null; + MDDOrder order = null; + int M_Warehouse_ID = 0; + int M_WarehouseSource_ID = 0; + MWarehouse whSource = null; + MWarehouse wh = null; + X_T_Replenish[] replenishs = getReplenishDO("M_WarehouseSource_ID IS NOT NULL"); + for (X_T_Replenish replenish:replenishs) + { + if (whSource == null || whSource.getM_WarehouseSource_ID() != replenish.getM_WarehouseSource_ID()) + whSource = MWarehouse.get(getCtx(), replenish.getM_WarehouseSource_ID()); + if (wh == null || wh.getM_Warehouse_ID() != replenish.getM_Warehouse_ID()) + wh = MWarehouse.get(getCtx(), replenish.getM_Warehouse_ID()); + if (client == null || client.getAD_Client_ID() != whSource.getAD_Client_ID()) + client = MClient.get(getCtx(), whSource.getAD_Client_ID()); + // + if (order == null + || M_WarehouseSource_ID != replenish.getM_WarehouseSource_ID() + || M_Warehouse_ID != replenish.getM_Warehouse_ID()) + { + M_WarehouseSource_ID = replenish.getM_WarehouseSource_ID(); + M_Warehouse_ID = replenish.getM_Warehouse_ID(); + + order = new MDDOrder (getCtx(), 0, get_TrxName()); + order.setC_DocType_ID(p_C_DocType_ID); + order.setDescription(Msg.getMsg(getCtx(), "Replenishment") + + ": " + whSource.getName() + "->" + wh.getName()); + // Set Org + order.setAD_Org_ID(whSource.getAD_Org_ID()); + // Set Org Trx + MOrg orgTrx = MOrg.get(getCtx(), wh.getAD_Org_ID()); + order.setAD_OrgTrx_ID(orgTrx.getAD_Org_ID()); + int C_BPartner_ID = orgTrx.getLinkedC_BPartner_ID(get_TrxName()); + if (C_BPartner_ID==0) + throw new AdempiereUserError(Msg.translate(getCtx(), "C_BPartner_ID")+ " @FillMandatory@ "); + MBPartner bp = new MBPartner(getCtx(),C_BPartner_ID,get_TrxName()); + // Set BPartner Link to Org + order.setBPartner(bp); + order.setDateOrdered(new Timestamp(System.currentTimeMillis())); + //order.setDatePromised(DatePromised); + order.setDeliveryRule(MDDOrder.DELIVERYRULE_Availability); + order.setDeliveryViaRule(MDDOrder.DELIVERYVIARULE_Delivery); + order.setPriorityRule(MDDOrder.PRIORITYRULE_Medium); + order.setIsInDispute(false); + order.setIsApproved(false); + order.setIsDropShip(false); + order.setIsDelivered(false); + order.setIsInTransit(false); + order.setIsPrinted(false); + order.setIsSelected(false); + order.setIsSOTrx(false); + // Warehouse in Transit + MWarehouse[] whsInTransit = MWarehouse.getForOrg(getCtx(), whSource.getAD_Org_ID()); + for (MWarehouse whInTransit:whsInTransit) + { + if(whInTransit.isInTransit()) + order.setM_Warehouse_ID(whInTransit.getM_Warehouse_ID()); + } + if (order.getM_Warehouse_ID()==0) + throw new AdempiereUserError("Warehouse inTransit is @FillMandatory@ "); + + if (!order.save()) + return; + log.fine(order.toString()); + noMoves++; + info += " - " + order.getDocumentNo(); + } + + // To + int M_LocatorTo_ID = wh.getDefaultLocator().getM_Locator_ID(); + int M_Locator_ID = whSource.getDefaultLocator().getM_Locator_ID(); + if(M_LocatorTo_ID == 0 || M_Locator_ID==0) + throw new AdempiereUserError(Msg.translate(getCtx(), "M_Locator_ID")+" @FillMandatory@ "); + + // From: Look-up Storage + /*MProduct product = MProduct.get(getCtx(), replenish.getM_Product_ID()); + MProductCategory pc = MProductCategory.get(getCtx(), product.getM_Product_Category_ID()); + String MMPolicy = pc.getMMPolicy(); + if (MMPolicy == null || MMPolicy.length() == 0) + MMPolicy = client.getMMPolicy(); + // + MStorage[] storages = MStorage.getWarehouse(getCtx(), + whSource.getM_Warehouse_ID(), replenish.getM_Product_ID(), 0, 0, + true, null, + MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName()); + + + BigDecimal target = replenish.getQtyToOrder(); + for (int j = 0; j < storages.length; j++) + { + MStorage storage = storages[j]; + if (storage.getQtyOnHand().signum() <= 0) + continue; + BigDecimal moveQty = target; + if (storage.getQtyOnHand().compareTo(moveQty) < 0) + moveQty = storage.getQtyOnHand(); + // + MDDOrderLine line = new MDDOrderLine(order); + line.setM_Product_ID(replenish.getM_Product_ID()); + line.setQtyEntered(moveQty); + if (replenish.getQtyToOrder().compareTo(moveQty) != 0) + line.setDescription("Total: " + replenish.getQtyToOrder()); + line.setM_Locator_ID(storage.getM_Locator_ID()); // from + line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID()); + line.setM_LocatorTo_ID(M_LocatorTo_ID); // to + line.setM_AttributeSetInstanceTo_ID(storage.getM_AttributeSetInstance_ID()); + line.setIsInvoiced(false); + line.save(); + // + target = target.subtract(moveQty); + if (target.signum() == 0) + break; + }*/ + + MDDOrderLine line = new MDDOrderLine(order); + line.setM_Product_ID(replenish.getM_Product_ID()); + line.setQty(replenish.getQtyToOrder()); + if (replenish.getQtyToOrder().compareTo(replenish.getQtyToOrder()) != 0) + line.setDescription("Total: " + replenish.getQtyToOrder()); + line.setM_Locator_ID(M_Locator_ID); // from + line.setM_AttributeSetInstance_ID(0); + line.setM_LocatorTo_ID(M_LocatorTo_ID); // to + line.setM_AttributeSetInstanceTo_ID(0); + line.setIsInvoiced(false); + line.save(); + + } + if (replenishs.length == 0) + { + m_info = "No Source Warehouse"; + log.warning(m_info); + } + else + { + m_info = "#" + noMoves + info; + log.info(m_info); + } + } // create Distribution Order + + /** + * Get Replenish Records + * @return replenish + */ + private X_T_Replenish[] getReplenish (String where) + { + String sql = "SELECT * FROM T_Replenish " + + "WHERE AD_PInstance_ID=? AND C_BPartner_ID > 0 "; + if (where != null && where.length() > 0) + sql += " AND " + where; + sql += " ORDER BY M_Warehouse_ID, M_WarehouseSource_ID, C_BPartner_ID"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getAD_PInstance_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new X_T_Replenish (getCtx(), rs, get_TrxName())); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + X_T_Replenish[] retValue = new X_T_Replenish[list.size ()]; + list.toArray (retValue); + return retValue; + } // getReplenish + + /** + * Get Replenish Records + * @return replenish + */ + private X_T_Replenish[] getReplenishDO (String where) + { + String sql = "SELECT * FROM T_Replenish " + + "WHERE AD_PInstance_ID=? "; + if (where != null && where.length() > 0) + sql += " AND " + where; + sql += " ORDER BY M_Warehouse_ID, M_WarehouseSource_ID, C_BPartner_ID"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getAD_PInstance_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new X_T_Replenish (getCtx(), rs, get_TrxName())); + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + X_T_Replenish[] retValue = new X_T_Replenish[list.size ()]; + list.toArray (retValue); + return retValue; + } // getReplenish + +} // Replenish diff --git a/base/src/org/compiere/model/I_AD_SysConfig.java b/base/src/org/eevolution/model/I_C_TaxBase.java similarity index 70% rename from base/src/org/compiere/model/I_AD_SysConfig.java rename to base/src/org/eevolution/model/I_C_TaxBase.java index 317f06db3c..e504a509c9 100644 --- a/base/src/org/compiere/model/I_AD_SysConfig.java +++ b/base/src/org/eevolution/model/I_C_TaxBase.java @@ -30,53 +30,54 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for AD_SysConfig +/** Generated Interface for C_TaxBase * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_AD_SysConfig +public interface I_C_TaxBase { - /** TableName=AD_SysConfig */ - public static final String Table_Name = "AD_SysConfig"; + /** TableName=C_TaxBase */ + public static final String Table_Name = "C_TaxBase"; - /** AD_Table_ID=50009 */ + /** AD_Table_ID=53069 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - /** AccessLevel = 6 - System - Client + /** AccessLevel = 3 - Client - Org */ - BigDecimal accessLevel = BigDecimal.valueOf(6); + BigDecimal accessLevel = BigDecimal.valueOf(3); /** Load Meta Data */ - /** Column name AD_SysConfig_ID */ - public static final String COLUMNNAME_AD_SysConfig_ID = "AD_SysConfig_ID"; + /** Column name Base */ + public static final String COLUMNNAME_Base = "Base"; - /** Set System Configurator */ - public void setAD_SysConfig_ID (int AD_SysConfig_ID); - - /** Get System Configurator */ - public int getAD_SysConfig_ID(); - - /** Column name ConfigurationLevel */ - public static final String COLUMNNAME_ConfigurationLevel = "ConfigurationLevel"; - - /** Set Configuration LEVEL. - * Configuration Level for this parameter + /** Set Base. + * Calculation Base */ - public void setConfigurationLevel (String ConfigurationLevel); + public void setBase (String Base); - /** Get Configuration LEVEL. - * Configuration Level for this parameter + /** Get Base. + * Calculation Base */ - public String getConfigurationLevel(); + public String getBase(); + + /** Column name C_TaxBase_ID */ + public static final String COLUMNNAME_C_TaxBase_ID = "C_TaxBase_ID"; + + /** Set C_TaxBase_ID */ + public void setC_TaxBase_ID (int C_TaxBase_ID); + + /** Get C_TaxBase_ID */ + public int getC_TaxBase_ID(); /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; @@ -91,20 +92,18 @@ public interface I_AD_SysConfig */ public String getDescription(); - /** Column name EntityType */ - public static final String COLUMNNAME_EntityType = "EntityType"; + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; - /** Set Entity Type. - * Dictionary Entity Type; - Determines ownership and synchronization + /** Set Comment/Help. + * Comment or Hint */ - public void setEntityType (String EntityType); + public void setHelp (String Help); - /** Get Entity Type. - * Dictionary Entity Type; - Determines ownership and synchronization + /** Get Comment/Help. + * Comment or Hint */ - public String getEntityType(); + public String getHelp(); /** Column name Name */ public static final String COLUMNNAME_Name = "Name"; @@ -119,6 +118,19 @@ public interface I_AD_SysConfig */ public String getName(); + /** Column name Percentage */ + public static final String COLUMNNAME_Percentage = "Percentage"; + + /** Set Percentage. + * Percent of the entire amount + */ + public void setPercentage (int Percentage); + + /** Get Percentage. + * Percent of the entire amount + */ + public int getPercentage(); + /** Column name Value */ public static final String COLUMNNAME_Value = "Value"; diff --git a/base/src/org/eevolution/model/I_C_TaxDefinition.java b/base/src/org/eevolution/model/I_C_TaxDefinition.java new file mode 100644 index 0000000000..cad988056a --- /dev/null +++ b/base/src/org/eevolution/model/I_C_TaxDefinition.java @@ -0,0 +1,331 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for C_TaxDefinition + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_C_TaxDefinition +{ + + /** TableName=C_TaxDefinition */ + public static final String Table_Name = "C_TaxDefinition"; + + /** AD_Table_ID=53067 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_OrgType_ID */ + public static final String COLUMNNAME_AD_OrgType_ID = "AD_OrgType_ID"; + + /** Set Organization Type. + * Organization Type allows you to categorize your organizations + */ + public void setAD_OrgType_ID (int AD_OrgType_ID); + + /** Get Organization Type. + * Organization Type allows you to categorize your organizations + */ + public int getAD_OrgType_ID(); + + public I_AD_OrgType getAD_OrgType() throws Exception; + + /** Column name C_BP_Group_ID */ + public static final String COLUMNNAME_C_BP_Group_ID = "C_BP_Group_ID"; + + /** Set Business Partner Group. + * Business Partner Group + */ + public void setC_BP_Group_ID (int C_BP_Group_ID); + + /** Get Business Partner Group. + * Business Partner Group + */ + public int getC_BP_Group_ID(); + + public I_C_BP_Group getC_BP_Group() throws Exception; + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + + /** Column name C_TaxBase_ID */ + public static final String COLUMNNAME_C_TaxBase_ID = "C_TaxBase_ID"; + + /** Set C_TaxBase_ID */ + public void setC_TaxBase_ID (int C_TaxBase_ID); + + /** Get C_TaxBase_ID */ + public int getC_TaxBase_ID(); + + public org.eevolution.model.I_C_TaxBase getC_TaxBase() throws Exception; + + /** Column name C_TaxCategory_ID */ + public static final String COLUMNNAME_C_TaxCategory_ID = "C_TaxCategory_ID"; + + /** Set Tax Category. + * Tax Category + */ + public void setC_TaxCategory_ID (int C_TaxCategory_ID); + + /** Get Tax Category. + * Tax Category + */ + public int getC_TaxCategory_ID(); + + public I_C_TaxCategory getC_TaxCategory() throws Exception; + + /** Column name C_TaxDefinition_ID */ + public static final String COLUMNNAME_C_TaxDefinition_ID = "C_TaxDefinition_ID"; + + /** Set C_TaxDefinition_ID */ + public void setC_TaxDefinition_ID (int C_TaxDefinition_ID); + + /** Get C_TaxDefinition_ID */ + public int getC_TaxDefinition_ID(); + + /** Column name C_TaxGroup_ID */ + public static final String COLUMNNAME_C_TaxGroup_ID = "C_TaxGroup_ID"; + + /** Set Tax Group */ + public void setC_TaxGroup_ID (int C_TaxGroup_ID); + + /** Get Tax Group */ + public int getC_TaxGroup_ID(); + + public org.eevolution.model.I_C_TaxGroup getC_TaxGroup() throws Exception; + + /** Column name C_TaxType_ID */ + public static final String COLUMNNAME_C_TaxType_ID = "C_TaxType_ID"; + + /** Set C_TaxType_ID */ + public void setC_TaxType_ID (int C_TaxType_ID); + + /** Get C_TaxType_ID */ + public int getC_TaxType_ID(); + + public org.eevolution.model.I_C_TaxType getC_TaxType() throws Exception; + + /** Column name C_Tax_ID */ + public static final String COLUMNNAME_C_Tax_ID = "C_Tax_ID"; + + /** Set Tax. + * Tax identifier + */ + public void setC_Tax_ID (int C_Tax_ID); + + /** Get Tax. + * Tax identifier + */ + public int getC_Tax_ID(); + + public I_C_Tax getC_Tax() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsInvoiced */ + public static final String COLUMNNAME_IsInvoiced = "IsInvoiced"; + + /** Set Invoiced. + * Is this invoiced? + */ + public void setIsInvoiced (boolean IsInvoiced); + + /** Get Invoiced. + * Is this invoiced? + */ + public boolean isInvoiced(); + + /** Column name M_Product_Category_ID */ + public static final String COLUMNNAME_M_Product_Category_ID = "M_Product_Category_ID"; + + /** Set Product Category. + * Category of a Product + */ + public void setM_Product_Category_ID (int M_Product_Category_ID); + + /** Get Product Category. + * Category of a Product + */ + public int getM_Product_Category_ID(); + + public I_M_Product_Category getM_Product_Category() throws Exception; + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name MaxTaxable */ + public static final String COLUMNNAME_MaxTaxable = "MaxTaxable"; + + /** Set MaxTaxable */ + public void setMaxTaxable (int MaxTaxable); + + /** Get MaxTaxable */ + public int getMaxTaxable(); + + /** Column name MinTaxable */ + public static final String COLUMNNAME_MinTaxable = "MinTaxable"; + + /** Set MinTaxable */ + public void setMinTaxable (int MinTaxable); + + /** Get MinTaxable */ + public int getMinTaxable(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; + + /** Set Sequence. + * Method of ordering records; + lowest number comes first + */ + public void setSeqNo (int SeqNo); + + /** Get Sequence. + * Method of ordering records; + lowest number comes first + */ + public int getSeqNo(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/compiere/model/I_AD_ReplicationStrategy.java b/base/src/org/eevolution/model/I_C_TaxGroup.java similarity index 73% rename from base/src/org/compiere/model/I_AD_ReplicationStrategy.java rename to base/src/org/eevolution/model/I_C_TaxGroup.java index 40e8c76705..e243133d08 100644 --- a/base/src/org/compiere/model/I_AD_ReplicationStrategy.java +++ b/base/src/org/eevolution/model/I_C_TaxGroup.java @@ -30,44 +30,41 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for AD_ReplicationStrategy +/** Generated Interface for C_TaxGroup * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_AD_ReplicationStrategy +public interface I_C_TaxGroup { - /** TableName=AD_ReplicationStrategy */ - public static final String Table_Name = "AD_ReplicationStrategy"; + /** TableName=C_TaxGroup */ + public static final String Table_Name = "C_TaxGroup"; - /** AD_Table_ID=602 */ + /** AD_Table_ID=53066 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - /** AccessLevel = 6 - System - Client + /** AccessLevel = 3 - Client - Org */ - BigDecimal accessLevel = BigDecimal.valueOf(6); + BigDecimal accessLevel = BigDecimal.valueOf(3); /** Load Meta Data */ - /** Column name AD_ReplicationStrategy_ID */ - public static final String COLUMNNAME_AD_ReplicationStrategy_ID = "AD_ReplicationStrategy_ID"; + /** Column name C_TaxGroup_ID */ + public static final String COLUMNNAME_C_TaxGroup_ID = "C_TaxGroup_ID"; - /** Set Replication Strategy. - * Data Replication Strategy - */ - public void setAD_ReplicationStrategy_ID (int AD_ReplicationStrategy_ID); + /** Set Tax Group */ + public void setC_TaxGroup_ID (int C_TaxGroup_ID); - /** Get Replication Strategy. - * Data Replication Strategy - */ - public int getAD_ReplicationStrategy_ID(); + /** Get Tax Group */ + public int getC_TaxGroup_ID(); /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; @@ -82,21 +79,6 @@ public interface I_AD_ReplicationStrategy */ public String getDescription(); - /** Column name EntityType */ - public static final String COLUMNNAME_EntityType = "EntityType"; - - /** Set Entity Type. - * Dictionary Entity Type; - Determines ownership and synchronization - */ - public void setEntityType (String EntityType); - - /** Get Entity Type. - * Dictionary Entity Type; - Determines ownership and synchronization - */ - public String getEntityType(); - /** Column name Help */ public static final String COLUMNNAME_Help = "Help"; @@ -122,4 +104,17 @@ public interface I_AD_ReplicationStrategy * Alphanumeric identifier of the entity */ public String getName(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); } diff --git a/base/src/org/eevolution/model/I_C_TaxType.java b/base/src/org/eevolution/model/I_C_TaxType.java new file mode 100644 index 0000000000..26f302f8ca --- /dev/null +++ b/base/src/org/eevolution/model/I_C_TaxType.java @@ -0,0 +1,120 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for C_TaxType + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_C_TaxType +{ + + /** TableName=C_TaxType */ + public static final String Table_Name = "C_TaxType"; + + /** AD_Table_ID=53068 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name C_TaxType_ID */ + public static final String COLUMNNAME_C_TaxType_ID = "C_TaxType_ID"; + + /** Set C_TaxType_ID */ + public void setC_TaxType_ID (int C_TaxType_ID); + + /** Get C_TaxType_ID */ + public int getC_TaxType_ID(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_DD_NetworkDistribution.java b/base/src/org/eevolution/model/I_DD_NetworkDistribution.java new file mode 100644 index 0000000000..afb138482b --- /dev/null +++ b/base/src/org/eevolution/model/I_DD_NetworkDistribution.java @@ -0,0 +1,206 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for DD_NetworkDistribution + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_DD_NetworkDistribution +{ + + /** TableName=DD_NetworkDistribution */ + public static final String Table_Name = "DD_NetworkDistribution"; + + /** AD_Table_ID=53060 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name CopyFrom */ + public static final String COLUMNNAME_CopyFrom = "CopyFrom"; + + /** Set Copy From. + * Copy From Record + */ + public void setCopyFrom (String CopyFrom); + + /** Get Copy From. + * Copy From Record + */ + public String getCopyFrom(); + + /** Column name DD_NetworkDistribution_ID */ + public static final String COLUMNNAME_DD_NetworkDistribution_ID = "DD_NetworkDistribution_ID"; + + /** Set Network Distribution */ + public void setDD_NetworkDistribution_ID (int DD_NetworkDistribution_ID); + + /** Get Network Distribution */ + public int getDD_NetworkDistribution_ID(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name DocumentNo */ + public static final String COLUMNNAME_DocumentNo = "DocumentNo"; + + /** Set Document No. + * Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo); + + /** Get Document No. + * Document sequence number of the document + */ + public String getDocumentNo(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name M_ChangeNotice_ID */ + public static final String COLUMNNAME_M_ChangeNotice_ID = "M_ChangeNotice_ID"; + + /** Set Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID); + + /** Get Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID(); + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception; + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name Revision */ + public static final String COLUMNNAME_Revision = "Revision"; + + /** Set Revision */ + public void setRevision (String Revision); + + /** Get Revision */ + public String getRevision(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_DD_NetworkDistributionLine.java b/base/src/org/eevolution/model/I_DD_NetworkDistributionLine.java new file mode 100644 index 0000000000..a9cbb2353c --- /dev/null +++ b/base/src/org/eevolution/model/I_DD_NetworkDistributionLine.java @@ -0,0 +1,182 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for DD_NetworkDistributionLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_DD_NetworkDistributionLine +{ + + /** TableName=DD_NetworkDistributionLine */ + public static final String Table_Name = "DD_NetworkDistributionLine"; + + /** AD_Table_ID=53061 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name DD_NetworkDistributionLine_ID */ + public static final String COLUMNNAME_DD_NetworkDistributionLine_ID = "DD_NetworkDistributionLine_ID"; + + /** Set DD_NetworkDistributionLine_ID */ + public void setDD_NetworkDistributionLine_ID (int DD_NetworkDistributionLine_ID); + + /** Get DD_NetworkDistributionLine_ID */ + public int getDD_NetworkDistributionLine_ID(); + + /** Column name DD_NetworkDistribution_ID */ + public static final String COLUMNNAME_DD_NetworkDistribution_ID = "DD_NetworkDistribution_ID"; + + /** Set Network Distribution */ + public void setDD_NetworkDistribution_ID (int DD_NetworkDistribution_ID); + + /** Get Network Distribution */ + public int getDD_NetworkDistribution_ID(); + + public org.eevolution.model.I_DD_NetworkDistribution getDD_NetworkDistribution() throws Exception; + + /** Column name M_Shipper_ID */ + public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID"; + + /** Set Shipper. + * Method or manner of product delivery + */ + public void setM_Shipper_ID (int M_Shipper_ID); + + /** Get Shipper. + * Method or manner of product delivery + */ + public int getM_Shipper_ID(); + + public I_M_Shipper getM_Shipper() throws Exception; + + /** Column name M_WarehouseSource_ID */ + public static final String COLUMNNAME_M_WarehouseSource_ID = "M_WarehouseSource_ID"; + + /** Set Source Warehouse. + * Optional Warehouse to replenish from + */ + public void setM_WarehouseSource_ID (int M_WarehouseSource_ID); + + /** Get Source Warehouse. + * Optional Warehouse to replenish from + */ + public int getM_WarehouseSource_ID(); + + /** Column name M_Warehouse_ID */ + public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; + + /** Set Warehouse. + * Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID); + + /** Get Warehouse. + * Storage Warehouse and Service Point + */ + public int getM_Warehouse_ID(); + + /** Column name Percent */ + public static final String COLUMNNAME_Percent = "Percent"; + + /** Set Percent. + * Percentage + */ + public void setPercent (BigDecimal Percent); + + /** Get Percent. + * Percentage + */ + public BigDecimal getPercent(); + + /** Column name PriorityNo */ + public static final String COLUMNNAME_PriorityNo = "PriorityNo"; + + /** Set Relative Priority. + * Where inventory should be picked from first + */ + public void setPriorityNo (int PriorityNo); + + /** Get Relative Priority. + * Where inventory should be picked from first + */ + public int getPriorityNo(); + + /** Column name TransfertTime */ + public static final String COLUMNNAME_TransfertTime = "TransfertTime"; + + /** Set Transfert Time */ + public void setTransfertTime (BigDecimal TransfertTime); + + /** Get Transfert Time */ + public BigDecimal getTransfertTime(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); +} diff --git a/base/src/org/compiere/model/I_M_InOut.java b/base/src/org/eevolution/model/I_DD_Order.java similarity index 89% rename from base/src/org/compiere/model/I_M_InOut.java rename to base/src/org/eevolution/model/I_DD_Order.java index 32f0bc71a5..775d0b1153 100644 --- a/base/src/org/compiere/model/I_M_InOut.java +++ b/base/src/org/eevolution/model/I_DD_Order.java @@ -30,23 +30,24 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; import java.sql.Timestamp; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for M_InOut +/** Generated Interface for DD_Order * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_M_InOut +public interface I_DD_Order { - /** TableName=M_InOut */ - public static final String Table_Name = "M_InOut"; + /** TableName=DD_Order */ + public static final String Table_Name = "DD_Order"; - /** AD_Table_ID=319 */ + /** AD_Table_ID=53037 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -171,6 +172,8 @@ public interface I_M_InOut */ public int getC_DocType_ID(); + public I_C_DocType getC_DocType() throws Exception; + /** Column name C_Invoice_ID */ public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID"; @@ -260,18 +263,14 @@ public interface I_M_InOut /** Get Create Package */ public String getCreatePackage(); - /** Column name DateAcct */ - public static final String COLUMNNAME_DateAcct = "DateAcct"; + /** Column name DD_Order_ID */ + public static final String COLUMNNAME_DD_Order_ID = "DD_Order_ID"; - /** Set Account Date. - * Accounting Date - */ - public void setDateAcct (Timestamp DateAcct); + /** Set Distribution Order */ + public void setDD_Order_ID (int DD_Order_ID); - /** Get Account Date. - * Accounting Date - */ - public Timestamp getDateAcct(); + /** Get Distribution Order */ + public int getDD_Order_ID(); /** Column name DateOrdered */ public static final String COLUMNNAME_DateOrdered = "DateOrdered"; @@ -299,6 +298,19 @@ public interface I_M_InOut */ public Timestamp getDatePrinted(); + /** Column name DatePromised */ + public static final String COLUMNNAME_DatePromised = "DatePromised"; + + /** Set Date Promised. + * Date Order was promised + */ + public void setDatePromised (Timestamp DatePromised); + + /** Get Date Promised. + * Date Order was promised + */ + public Timestamp getDatePromised(); + /** Column name DateReceived */ public static final String COLUMNNAME_DateReceived = "DateReceived"; @@ -442,6 +454,28 @@ public interface I_M_InOut */ public boolean isApproved(); + /** Column name IsDelivered */ + public static final String COLUMNNAME_IsDelivered = "IsDelivered"; + + /** Set Delivered */ + public void setIsDelivered (boolean IsDelivered); + + /** Get Delivered */ + public boolean isDelivered(); + + /** Column name IsDropShip */ + public static final String COLUMNNAME_IsDropShip = "IsDropShip"; + + /** Set Drop Shipment. + * Drop Shipments are sent from the Vendor directly to the Customer + */ + public void setIsDropShip (boolean IsDropShip); + + /** Get Drop Shipment. + * Drop Shipments are sent from the Vendor directly to the Customer + */ + public boolean isDropShip(); + /** Column name IsInDispute */ public static final String COLUMNNAME_IsInDispute = "IsInDispute"; @@ -494,33 +528,14 @@ public interface I_M_InOut */ public boolean isSOTrx(); - /** Column name M_InOut_ID */ - public static final String COLUMNNAME_M_InOut_ID = "M_InOut_ID"; + /** Column name IsSelected */ + public static final String COLUMNNAME_IsSelected = "IsSelected"; - /** Set Shipment/Receipt. - * Material Shipment Document - */ - public void setM_InOut_ID (int M_InOut_ID); + /** Set Selected */ + public void setIsSelected (boolean IsSelected); - /** Get Shipment/Receipt. - * Material Shipment Document - */ - public int getM_InOut_ID(); - - /** Column name M_RMA_ID */ - public static final String COLUMNNAME_M_RMA_ID = "M_RMA_ID"; - - /** Set RMA. - * Return Material Authorization - */ - public void setM_RMA_ID (int M_RMA_ID); - - /** Get RMA. - * Return Material Authorization - */ - public int getM_RMA_ID(); - - public I_M_RMA getM_RMA() throws Exception; + /** Get Selected */ + public boolean isSelected(); /** Column name M_Shipper_ID */ public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID"; @@ -552,32 +567,6 @@ public interface I_M_InOut public I_M_Warehouse getM_Warehouse() throws Exception; - /** Column name MovementDate */ - public static final String COLUMNNAME_MovementDate = "MovementDate"; - - /** Set Movement Date. - * Date a product was moved in or out of inventory - */ - public void setMovementDate (Timestamp MovementDate); - - /** Get Movement Date. - * Date a product was moved in or out of inventory - */ - public Timestamp getMovementDate(); - - /** Column name MovementType */ - public static final String COLUMNNAME_MovementType = "MovementType"; - - /** Set Movement Type. - * Method of moving the inventory - */ - public void setMovementType (String MovementType); - - /** Get Movement Type. - * Method of moving the inventory - */ - public String getMovementType(); - /** Column name NoPackages */ public static final String COLUMNNAME_NoPackages = "NoPackages"; @@ -665,14 +654,18 @@ public interface I_M_InOut /** Get Process Now */ public boolean isProcessing(); - /** Column name Ref_InOut_ID */ - public static final String COLUMNNAME_Ref_InOut_ID = "Ref_InOut_ID"; + /** Column name Ref_Order_ID */ + public static final String COLUMNNAME_Ref_Order_ID = "Ref_Order_ID"; - /** Set Referenced Shipment */ - public void setRef_InOut_ID (int Ref_InOut_ID); + /** Set Referenced Order. + * Reference to corresponding Sales/Purchase Order + */ + public void setRef_Order_ID (int Ref_Order_ID); - /** Get Referenced Shipment */ - public int getRef_InOut_ID(); + /** Get Referenced Order. + * Reference to corresponding Sales/Purchase Order + */ + public int getRef_Order_ID(); /** Column name SalesRep_ID */ public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; diff --git a/base/src/org/compiere/model/I_C_OrderLine.java b/base/src/org/eevolution/model/I_DD_OrderLine.java similarity index 55% rename from base/src/org/compiere/model/I_C_OrderLine.java rename to base/src/org/eevolution/model/I_DD_OrderLine.java index 3e20e75e92..39c3f54e56 100644 --- a/base/src/org/compiere/model/I_C_OrderLine.java +++ b/base/src/org/eevolution/model/I_DD_OrderLine.java @@ -30,23 +30,24 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; import java.sql.Timestamp; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for C_OrderLine +/** Generated Interface for DD_OrderLine * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_C_OrderLine +public interface I_DD_OrderLine { - /** TableName=C_OrderLine */ - public static final String Table_Name = "C_OrderLine"; + /** TableName=DD_OrderLine */ + public static final String Table_Name = "DD_OrderLine"; - /** AD_Table_ID=260 */ + /** AD_Table_ID=53038 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -85,36 +86,6 @@ public interface I_C_OrderLine public I_C_Activity getC_Activity() throws Exception; - /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; - - /** Set Business Partner . - * Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID); - - /** Get Business Partner . - * Identifies a Business Partner - */ - public int getC_BPartner_ID(); - - public I_C_BPartner getC_BPartner() throws Exception; - - /** Column name C_BPartner_Location_ID */ - public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID"; - - /** Set Partner Location. - * Identifies the (ship to) address for this Business Partner - */ - public void setC_BPartner_Location_ID (int C_BPartner_Location_ID); - - /** Get Partner Location. - * Identifies the (ship to) address for this Business Partner - */ - public int getC_BPartner_Location_ID(); - - public I_C_BPartner_Location getC_BPartner_Location() throws Exception; - /** Column name C_Campaign_ID */ public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; @@ -145,79 +116,6 @@ public interface I_C_OrderLine public I_C_Charge getC_Charge() throws Exception; - /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; - - /** Set Currency. - * The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID); - - /** Get Currency. - * The Currency for this record - */ - public int getC_Currency_ID(); - - public I_C_Currency getC_Currency() throws Exception; - - /** Column name C_OrderLine_ID */ - public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID"; - - /** Set Sales Order Line. - * Sales Order Line - */ - public void setC_OrderLine_ID (int C_OrderLine_ID); - - /** Get Sales Order Line. - * Sales Order Line - */ - public int getC_OrderLine_ID(); - - /** Column name C_Order_ID */ - public static final String COLUMNNAME_C_Order_ID = "C_Order_ID"; - - /** Set Order. - * Order - */ - public void setC_Order_ID (int C_Order_ID); - - /** Get Order. - * Order - */ - public int getC_Order_ID(); - - public I_C_Order getC_Order() throws Exception; - - /** Column name C_ProjectPhase_ID */ - public static final String COLUMNNAME_C_ProjectPhase_ID = "C_ProjectPhase_ID"; - - /** Set Project Phase. - * Phase of a Project - */ - public void setC_ProjectPhase_ID (int C_ProjectPhase_ID); - - /** Get Project Phase. - * Phase of a Project - */ - public int getC_ProjectPhase_ID(); - - public I_C_ProjectPhase getC_ProjectPhase() throws Exception; - - /** Column name C_ProjectTask_ID */ - public static final String COLUMNNAME_C_ProjectTask_ID = "C_ProjectTask_ID"; - - /** Set Project Task. - * Actual Project Task in a Phase - */ - public void setC_ProjectTask_ID (int C_ProjectTask_ID); - - /** Get Project Task. - * Actual Project Task in a Phase - */ - public int getC_ProjectTask_ID(); - - public I_C_ProjectTask getC_ProjectTask() throws Exception; - /** Column name C_Project_ID */ public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; @@ -233,21 +131,6 @@ public interface I_C_OrderLine public I_C_Project getC_Project() throws Exception; - /** Column name C_Tax_ID */ - public static final String COLUMNNAME_C_Tax_ID = "C_Tax_ID"; - - /** Set Tax. - * Tax identifier - */ - public void setC_Tax_ID (int C_Tax_ID); - - /** Get Tax. - * Tax identifier - */ - public int getC_Tax_ID(); - - public I_C_Tax getC_Tax() throws Exception; - /** Column name C_UOM_ID */ public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; @@ -263,6 +146,39 @@ public interface I_C_OrderLine public I_C_UOM getC_UOM() throws Exception; + /** Column name ConfirmedQty */ + public static final String COLUMNNAME_ConfirmedQty = "ConfirmedQty"; + + /** Set Confirmed Quantity. + * Confirmation of a received quantity + */ + public void setConfirmedQty (BigDecimal ConfirmedQty); + + /** Get Confirmed Quantity. + * Confirmation of a received quantity + */ + public BigDecimal getConfirmedQty(); + + /** Column name DD_OrderLine_ID */ + public static final String COLUMNNAME_DD_OrderLine_ID = "DD_OrderLine_ID"; + + /** Set Distribution Order Line */ + public void setDD_OrderLine_ID (int DD_OrderLine_ID); + + /** Get Distribution Order Line */ + public int getDD_OrderLine_ID(); + + /** Column name DD_Order_ID */ + public static final String COLUMNNAME_DD_Order_ID = "DD_Order_ID"; + + /** Set Distribution Order */ + public void setDD_Order_ID (int DD_Order_ID); + + /** Get Distribution Order */ + public int getDD_Order_ID(); + + public org.eevolution.model.I_DD_Order getDD_Order() throws Exception; + /** Column name DateDelivered */ public static final String COLUMNNAME_DateDelivered = "DateDelivered"; @@ -276,19 +192,6 @@ public interface I_C_OrderLine */ public Timestamp getDateDelivered(); - /** Column name DateInvoiced */ - public static final String COLUMNNAME_DateInvoiced = "DateInvoiced"; - - /** Set Date Invoiced. - * Date printed on Invoice - */ - public void setDateInvoiced (Timestamp DateInvoiced); - - /** Get Date Invoiced. - * Date printed on Invoice - */ - public Timestamp getDateInvoiced(); - /** Column name DateOrdered */ public static final String COLUMNNAME_DateOrdered = "DateOrdered"; @@ -328,19 +231,6 @@ public interface I_C_OrderLine */ public String getDescription(); - /** Column name Discount */ - public static final String COLUMNNAME_Discount = "Discount"; - - /** Set Discount %. - * Discount in percent - */ - public void setDiscount (BigDecimal Discount); - - /** Get Discount %. - * Discount in percent - */ - public BigDecimal getDiscount(); - /** Column name FreightAmt */ public static final String COLUMNNAME_FreightAmt = "FreightAmt"; @@ -367,6 +257,19 @@ public interface I_C_OrderLine */ public boolean isDescription(); + /** Column name IsInvoiced */ + public static final String COLUMNNAME_IsInvoiced = "IsInvoiced"; + + /** Set Invoiced. + * Is this invoiced? + */ + public void setIsInvoiced (boolean IsInvoiced); + + /** Get Invoiced. + * Is this invoiced? + */ + public boolean isInvoiced(); + /** Column name Line */ public static final String COLUMNNAME_Line = "Line"; @@ -393,6 +296,19 @@ public interface I_C_OrderLine */ public BigDecimal getLineNetAmt(); + /** Column name M_AttributeSetInstanceTo_ID */ + public static final String COLUMNNAME_M_AttributeSetInstanceTo_ID = "M_AttributeSetInstanceTo_ID"; + + /** Set Attribute Set Instance To. + * Target Product Attribute Set Instance + */ + public void setM_AttributeSetInstanceTo_ID (int M_AttributeSetInstanceTo_ID); + + /** Get Attribute Set Instance To. + * Target Product Attribute Set Instance + */ + public int getM_AttributeSetInstanceTo_ID(); + /** Column name M_AttributeSetInstance_ID */ public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; @@ -406,6 +322,32 @@ public interface I_C_OrderLine */ public int getM_AttributeSetInstance_ID(); + /** Column name M_LocatorTo_ID */ + public static final String COLUMNNAME_M_LocatorTo_ID = "M_LocatorTo_ID"; + + /** Set Locator To. + * Location inventory is moved to + */ + public void setM_LocatorTo_ID (int M_LocatorTo_ID); + + /** Get Locator To. + * Location inventory is moved to + */ + public int getM_LocatorTo_ID(); + + /** Column name M_Locator_ID */ + public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID"; + + /** Set Locator. + * Warehouse Locator + */ + public void setM_Locator_ID (int M_Locator_ID); + + /** Get Locator. + * Warehouse Locator + */ + public int getM_Locator_ID(); + /** Column name M_Product_ID */ public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; @@ -419,100 +361,14 @@ public interface I_C_OrderLine */ public int getM_Product_ID(); - public I_M_Product getM_Product() throws Exception; + /** Column name PickedQty */ + public static final String COLUMNNAME_PickedQty = "PickedQty"; - /** Column name M_Shipper_ID */ - public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID"; + /** Set Picked Quantity */ + public void setPickedQty (BigDecimal PickedQty); - /** Set Shipper. - * Method or manner of product delivery - */ - public void setM_Shipper_ID (int M_Shipper_ID); - - /** Get Shipper. - * Method or manner of product delivery - */ - public int getM_Shipper_ID(); - - public I_M_Shipper getM_Shipper() throws Exception; - - /** Column name M_Warehouse_ID */ - public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; - - /** Set Warehouse. - * Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID); - - /** Get Warehouse. - * Storage Warehouse and Service Point - */ - public int getM_Warehouse_ID(); - - /** Column name PriceActual */ - public static final String COLUMNNAME_PriceActual = "PriceActual"; - - /** Set Unit Price. - * Actual Price - */ - public void setPriceActual (BigDecimal PriceActual); - - /** Get Unit Price. - * Actual Price - */ - public BigDecimal getPriceActual(); - - /** Column name PriceCost */ - public static final String COLUMNNAME_PriceCost = "PriceCost"; - - /** Set Cost Price. - * Price per Unit of Measure including all indirect costs (Freight, etc.) - */ - public void setPriceCost (BigDecimal PriceCost); - - /** Get Cost Price. - * Price per Unit of Measure including all indirect costs (Freight, etc.) - */ - public BigDecimal getPriceCost(); - - /** Column name PriceEntered */ - public static final String COLUMNNAME_PriceEntered = "PriceEntered"; - - /** Set Price. - * Price Entered - the price based on the selected/base UoM - */ - public void setPriceEntered (BigDecimal PriceEntered); - - /** Get Price. - * Price Entered - the price based on the selected/base UoM - */ - public BigDecimal getPriceEntered(); - - /** Column name PriceLimit */ - public static final String COLUMNNAME_PriceLimit = "PriceLimit"; - - /** Set Limit Price. - * Lowest price for a product - */ - public void setPriceLimit (BigDecimal PriceLimit); - - /** Get Limit Price. - * Lowest price for a product - */ - public BigDecimal getPriceLimit(); - - /** Column name PriceList */ - public static final String COLUMNNAME_PriceList = "PriceList"; - - /** Set List Price. - * List Price - */ - public void setPriceList (BigDecimal PriceList); - - /** Get List Price. - * List Price - */ - public BigDecimal getPriceList(); + /** Get Picked Quantity */ + public BigDecimal getPickedQty(); /** Column name Processed */ public static final String COLUMNNAME_Processed = "Processed"; @@ -553,31 +409,14 @@ public interface I_C_OrderLine */ public BigDecimal getQtyEntered(); - /** Column name QtyInvoiced */ - public static final String COLUMNNAME_QtyInvoiced = "QtyInvoiced"; + /** Column name QtyInTransit */ + public static final String COLUMNNAME_QtyInTransit = "QtyInTransit"; - /** Set Quantity Invoiced. - * Invoiced Quantity - */ - public void setQtyInvoiced (BigDecimal QtyInvoiced); + /** Set QtyInTransit */ + public void setQtyInTransit (BigDecimal QtyInTransit); - /** Get Quantity Invoiced. - * Invoiced Quantity - */ - public BigDecimal getQtyInvoiced(); - - /** Column name QtyLostSales */ - public static final String COLUMNNAME_QtyLostSales = "QtyLostSales"; - - /** Set Lost Sales Qty. - * Quantity of potential sales - */ - public void setQtyLostSales (BigDecimal QtyLostSales); - - /** Get Lost Sales Qty. - * Quantity of potential sales - */ - public BigDecimal getQtyLostSales(); + /** Get QtyInTransit */ + public BigDecimal getQtyInTransit(); /** Column name QtyOrdered */ public static final String COLUMNNAME_QtyOrdered = "QtyOrdered"; @@ -605,57 +444,31 @@ public interface I_C_OrderLine */ public BigDecimal getQtyReserved(); - /** Column name RRAmt */ - public static final String COLUMNNAME_RRAmt = "RRAmt"; + /** Column name ScrappedQty */ + public static final String COLUMNNAME_ScrappedQty = "ScrappedQty"; - /** Set Revenue Recognition Amt. - * Revenue Recognition Amount + /** Set Scrapped Quantity. + * The Quantity scrapped due to QA issues */ - public void setRRAmt (BigDecimal RRAmt); + public void setScrappedQty (BigDecimal ScrappedQty); - /** Get Revenue Recognition Amt. - * Revenue Recognition Amount + /** Get Scrapped Quantity. + * The Quantity scrapped due to QA issues */ - public BigDecimal getRRAmt(); + public BigDecimal getScrappedQty(); - /** Column name RRStartDate */ - public static final String COLUMNNAME_RRStartDate = "RRStartDate"; + /** Column name TargetQty */ + public static final String COLUMNNAME_TargetQty = "TargetQty"; - /** Set Revenue Recognition Start. - * Revenue Recognition Start Date + /** Set Target Quantity. + * Target Movement Quantity */ - public void setRRStartDate (Timestamp RRStartDate); + public void setTargetQty (BigDecimal TargetQty); - /** Get Revenue Recognition Start. - * Revenue Recognition Start Date + /** Get Target Quantity. + * Target Movement Quantity */ - public Timestamp getRRStartDate(); - - /** Column name Ref_OrderLine_ID */ - public static final String COLUMNNAME_Ref_OrderLine_ID = "Ref_OrderLine_ID"; - - /** Set Referenced Order Line. - * Reference to corresponding Sales/Purchase Order - */ - public void setRef_OrderLine_ID (int Ref_OrderLine_ID); - - /** Get Referenced Order Line. - * Reference to corresponding Sales/Purchase Order - */ - public int getRef_OrderLine_ID(); - - /** Column name S_ResourceAssignment_ID */ - public static final String COLUMNNAME_S_ResourceAssignment_ID = "S_ResourceAssignment_ID"; - - /** Set Resource Assignment. - * Resource Assignment - */ - public void setS_ResourceAssignment_ID (int S_ResourceAssignment_ID); - - /** Get Resource Assignment. - * Resource Assignment - */ - public int getS_ResourceAssignment_ID(); + public BigDecimal getTargetQty(); /** Column name User1_ID */ public static final String COLUMNNAME_User1_ID = "User1_ID"; diff --git a/base/src/org/eevolution/model/I_EXP_Format.java b/base/src/org/eevolution/model/I_EXP_Format.java new file mode 100644 index 0000000000..dee407976c --- /dev/null +++ b/base/src/org/eevolution/model/I_EXP_Format.java @@ -0,0 +1,188 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for EXP_Format + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_EXP_Format +{ + + /** TableName=EXP_Format */ + public static final String Table_Name = "EXP_Format"; + + /** AD_Table_ID=53072 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Table_ID */ + public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID"; + + /** Set Table. + * Database Table information + */ + public void setAD_Table_ID (int AD_Table_ID); + + /** Get Table. + * Database Table information + */ + public int getAD_Table_ID(); + + public I_AD_Table getAD_Table() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name EXP_Format_ID */ + public static final String COLUMNNAME_EXP_Format_ID = "EXP_Format_ID"; + + /** Set Export Format ID */ + public void setEXP_Format_ID (int EXP_Format_ID); + + /** Get Export Format ID */ + public int getEXP_Format_ID(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name TestExportModel */ + public static final String COLUMNNAME_TestExportModel = "TestExportModel"; + + /** Set Test Export Model */ + public void setTestExportModel (String TestExportModel); + + /** Get Test Export Model */ + public String getTestExportModel(); + + /** Column name TestImportModel */ + public static final String COLUMNNAME_TestImportModel = "TestImportModel"; + + /** Set TestImportModel */ + public void setTestImportModel (String TestImportModel); + + /** Get TestImportModel */ + public String getTestImportModel(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); + + /** Column name Version */ + public static final String COLUMNNAME_Version = "Version"; + + /** Set Version. + * Version of the table definition + */ + public void setVersion (String Version); + + /** Get Version. + * Version of the table definition + */ + public String getVersion(); + + /** Column name WhereClause */ + public static final String COLUMNNAME_WhereClause = "WhereClause"; + + /** Set Sql WHERE. + * Fully qualified SQL WHERE clause + */ + public void setWhereClause (String WhereClause); + + /** Get Sql WHERE. + * Fully qualified SQL WHERE clause + */ + public String getWhereClause(); +} diff --git a/base/src/org/eevolution/model/I_EXP_FormatLine.java b/base/src/org/eevolution/model/I_EXP_FormatLine.java new file mode 100644 index 0000000000..4fc3c4aa9e --- /dev/null +++ b/base/src/org/eevolution/model/I_EXP_FormatLine.java @@ -0,0 +1,225 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for EXP_FormatLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_EXP_FormatLine +{ + + /** TableName=EXP_FormatLine */ + public static final String Table_Name = "EXP_FormatLine"; + + /** AD_Table_ID=53073 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Column_ID */ + public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID"; + + /** Set Column. + * Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID); + + /** Get Column. + * Column in the table + */ + public int getAD_Column_ID(); + + public I_AD_Column getAD_Column() throws Exception; + + /** Column name AD_Reference_ID */ + public static final String COLUMNNAME_AD_Reference_ID = "AD_Reference_ID"; + + /** Set Reference. + * System Reference and Validation + */ + public void setAD_Reference_ID (int AD_Reference_ID); + + /** Get Reference. + * System Reference and Validation + */ + public int getAD_Reference_ID(); + + /** Column name DateFormat */ + public static final String COLUMNNAME_DateFormat = "DateFormat"; + + /** Set Date Format. + * Date format used in the imput format + */ + public void setDateFormat (String DateFormat); + + /** Get Date Format. + * Date format used in the imput format + */ + public String getDateFormat(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name EXP_EmbeddedFormat_ID */ + public static final String COLUMNNAME_EXP_EmbeddedFormat_ID = "EXP_EmbeddedFormat_ID"; + + /** Set EXP_EmbeddedFormat_ID */ + public void setEXP_EmbeddedFormat_ID (int EXP_EmbeddedFormat_ID); + + /** Get EXP_EmbeddedFormat_ID */ + public int getEXP_EmbeddedFormat_ID(); + + /** Column name EXP_FormatLine_ID */ + public static final String COLUMNNAME_EXP_FormatLine_ID = "EXP_FormatLine_ID"; + + /** Set EXP_FormatLine_ID */ + public void setEXP_FormatLine_ID (int EXP_FormatLine_ID); + + /** Get EXP_FormatLine_ID */ + public int getEXP_FormatLine_ID(); + + /** Column name EXP_Format_ID */ + public static final String COLUMNNAME_EXP_Format_ID = "EXP_Format_ID"; + + /** Set Export Format ID */ + public void setEXP_Format_ID (int EXP_Format_ID); + + /** Get Export Format ID */ + public int getEXP_Format_ID(); + + public org.eevolution.model.I_EXP_Format getEXP_Format() throws Exception; + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsMandatory */ + public static final String COLUMNNAME_IsMandatory = "IsMandatory"; + + /** Set Mandatory. + * Data entry is required in this column + */ + public void setIsMandatory (boolean IsMandatory); + + /** Get Mandatory. + * Data entry is required in this column + */ + public boolean isMandatory(); + + /** Column name IsPartUniqueIndex */ + public static final String COLUMNNAME_IsPartUniqueIndex = "IsPartUniqueIndex"; + + /** Set IsPartUniqueIndex */ + public void setIsPartUniqueIndex (boolean IsPartUniqueIndex); + + /** Get IsPartUniqueIndex */ + public boolean isPartUniqueIndex(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Position */ + public static final String COLUMNNAME_Position = "Position"; + + /** Set Position */ + public void setPosition (int Position); + + /** Get Position */ + public int getPosition(); + + /** Column name Type */ + public static final String COLUMNNAME_Type = "Type"; + + /** Set Type. + * Type of Validation (SQL, Java Script, Java Language) + */ + public void setType (String Type); + + /** Get Type. + * Type of Validation (SQL, Java Script, Java Language) + */ + public String getType(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_EXP_Processor.java b/base/src/org/eevolution/model/I_EXP_Processor.java new file mode 100644 index 0000000000..f9e1fe803f --- /dev/null +++ b/base/src/org/eevolution/model/I_EXP_Processor.java @@ -0,0 +1,167 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for EXP_Processor + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_EXP_Processor +{ + + /** TableName=EXP_Processor */ + public static final String Table_Name = "EXP_Processor"; + + /** AD_Table_ID=53074 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 7 - System - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(7); + + /** Load Meta Data */ + + /** Column name Account */ + public static final String COLUMNNAME_Account = "Account"; + + /** Set Account */ + public void setAccount (String Account); + + /** Get Account */ + public String getAccount(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name EXP_Processor_ID */ + public static final String COLUMNNAME_EXP_Processor_ID = "EXP_Processor_ID"; + + /** Set EXP_Processor_ID */ + public void setEXP_Processor_ID (int EXP_Processor_ID); + + /** Get EXP_Processor_ID */ + public int getEXP_Processor_ID(); + + /** Column name EXP_Processor_Type_ID */ + public static final String COLUMNNAME_EXP_Processor_Type_ID = "EXP_Processor_Type_ID"; + + /** Set EXP_Processor_Type_ID */ + public void setEXP_Processor_Type_ID (int EXP_Processor_Type_ID); + + /** Get EXP_Processor_Type_ID */ + public int getEXP_Processor_Type_ID(); + + public org.eevolution.model.I_EXP_Processor_Type getEXP_Processor_Type() throws Exception; + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name Host */ + public static final String COLUMNNAME_Host = "Host"; + + /** Set Host */ + public void setHost (String Host); + + /** Get Host */ + public String getHost(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name PasswordInfo */ + public static final String COLUMNNAME_PasswordInfo = "PasswordInfo"; + + /** Set PasswordInfo */ + public void setPasswordInfo (String PasswordInfo); + + /** Get PasswordInfo */ + public String getPasswordInfo(); + + /** Column name Port */ + public static final String COLUMNNAME_Port = "Port"; + + /** Set Port */ + public void setPort (int Port); + + /** Get Port */ + public int getPort(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_EXP_ProcessorParameter.java b/base/src/org/eevolution/model/I_EXP_ProcessorParameter.java new file mode 100644 index 0000000000..6b687b398b --- /dev/null +++ b/base/src/org/eevolution/model/I_EXP_ProcessorParameter.java @@ -0,0 +1,140 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for EXP_ProcessorParameter + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_EXP_ProcessorParameter +{ + + /** TableName=EXP_ProcessorParameter */ + public static final String Table_Name = "EXP_ProcessorParameter"; + + /** AD_Table_ID=53075 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 7 - System - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(7); + + /** Load Meta Data */ + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name EXP_ProcessorParameter_ID */ + public static final String COLUMNNAME_EXP_ProcessorParameter_ID = "EXP_ProcessorParameter_ID"; + + /** Set EXP_ProcessorParameter_ID */ + public void setEXP_ProcessorParameter_ID (int EXP_ProcessorParameter_ID); + + /** Get EXP_ProcessorParameter_ID */ + public int getEXP_ProcessorParameter_ID(); + + /** Column name EXP_Processor_ID */ + public static final String COLUMNNAME_EXP_Processor_ID = "EXP_Processor_ID"; + + /** Set EXP_Processor_ID */ + public void setEXP_Processor_ID (int EXP_Processor_ID); + + /** Get EXP_Processor_ID */ + public int getEXP_Processor_ID(); + + public org.eevolution.model.I_EXP_Processor getEXP_Processor() throws Exception; + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name ParameterValue */ + public static final String COLUMNNAME_ParameterValue = "ParameterValue"; + + /** Set ParameterValue */ + public void setParameterValue (String ParameterValue); + + /** Get ParameterValue */ + public String getParameterValue(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_EXP_Processor_Type.java b/base/src/org/eevolution/model/I_EXP_Processor_Type.java new file mode 100644 index 0000000000..f7b72b179d --- /dev/null +++ b/base/src/org/eevolution/model/I_EXP_Processor_Type.java @@ -0,0 +1,129 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for EXP_Processor_Type + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_EXP_Processor_Type +{ + + /** TableName=EXP_Processor_Type */ + public static final String Table_Name = "EXP_Processor_Type"; + + /** AD_Table_ID=53076 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 7 - System - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(7); + + /** Load Meta Data */ + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name EXP_Processor_Type_ID */ + public static final String COLUMNNAME_EXP_Processor_Type_ID = "EXP_Processor_Type_ID"; + + /** Set EXP_Processor_Type_ID */ + public void setEXP_Processor_Type_ID (int EXP_Processor_Type_ID); + + /** Get EXP_Processor_Type_ID */ + public int getEXP_Processor_Type_ID(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name JavaClass */ + public static final String COLUMNNAME_JavaClass = "JavaClass"; + + /** Set JavaClass */ + public void setJavaClass (String JavaClass); + + /** Get JavaClass */ + public String getJavaClass(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_HR_Attribute.java b/base/src/org/eevolution/model/I_HR_Attribute.java new file mode 100644 index 0000000000..5319ac4c86 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Attribute.java @@ -0,0 +1,294 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Attribute + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Attribute +{ + + /** TableName=HR_Attribute */ + public static final String Table_Name = "HR_Attribute"; + + /** AD_Table_ID=53087 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_Rule_ID */ + public static final String COLUMNNAME_AD_Rule_ID = "AD_Rule_ID"; + + /** Set Rule */ + public void setAD_Rule_ID (int AD_Rule_ID); + + /** Get Rule */ + public int getAD_Rule_ID(); + + public I_AD_Rule getAD_Rule() throws Exception; + + /** Column name Amount */ + public static final String COLUMNNAME_Amount = "Amount"; + + /** Set Amount. + * Amount in a defined currency + */ + public void setAmount (BigDecimal Amount); + + /** Get Amount. + * Amount in a defined currency + */ + public BigDecimal getAmount(); + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + + /** Column name ColumnType */ + public static final String COLUMNNAME_ColumnType = "ColumnType"; + + /** Set Column Type */ + public void setColumnType (String ColumnType); + + /** Get Column Type */ + public String getColumnType(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name HR_Attribute_Acct */ + public static final String COLUMNNAME_HR_Attribute_Acct = "HR_Attribute_Acct"; + + /** Set Account Payroll Employee Attribute. + * Account for Employee Attribute + */ + public void setHR_Attribute_Acct (int HR_Attribute_Acct); + + /** Get Account Payroll Employee Attribute. + * Account for Employee Attribute + */ + public int getHR_Attribute_Acct(); + + /** Column name HR_Attribute_ID */ + public static final String COLUMNNAME_HR_Attribute_ID = "HR_Attribute_ID"; + + /** Set Payroll Employee Attribute */ + public void setHR_Attribute_ID (int HR_Attribute_ID); + + /** Get Payroll Employee Attribute */ + public int getHR_Attribute_ID(); + + /** Column name HR_Concept_ID */ + public static final String COLUMNNAME_HR_Concept_ID = "HR_Concept_ID"; + + /** Set Concept */ + public void setHR_Concept_ID (int HR_Concept_ID); + + /** Get Concept */ + public int getHR_Concept_ID(); + + public org.eevolution.model.I_HR_Concept getHR_Concept() throws Exception; + + /** Column name HR_Department_ID */ + public static final String COLUMNNAME_HR_Department_ID = "HR_Department_ID"; + + /** Set Department */ + public void setHR_Department_ID (int HR_Department_ID); + + /** Get Department */ + public int getHR_Department_ID(); + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception; + + /** Column name HR_Employee_ID */ + public static final String COLUMNNAME_HR_Employee_ID = "HR_Employee_ID"; + + /** Set Employee */ + public void setHR_Employee_ID (int HR_Employee_ID); + + /** Get Employee */ + public int getHR_Employee_ID(); + + public org.eevolution.model.I_HR_Employee getHR_Employee() throws Exception; + + /** Column name HR_Job_ID */ + public static final String COLUMNNAME_HR_Job_ID = "HR_Job_ID"; + + /** Set Job */ + public void setHR_Job_ID (int HR_Job_ID); + + /** Get Job */ + public int getHR_Job_ID(); + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception; + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception; + + /** Column name IsPrinted */ + public static final String COLUMNNAME_IsPrinted = "IsPrinted"; + + /** Set Printed. + * Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted); + + /** Get Printed. + * Indicates if this document / line is printed + */ + public boolean isPrinted(); + + /** Column name MaxValue */ + public static final String COLUMNNAME_MaxValue = "MaxValue"; + + /** Set MaxValue */ + public void setMaxValue (int MaxValue); + + /** Get MaxValue */ + public int getMaxValue(); + + /** Column name MinValue */ + public static final String COLUMNNAME_MinValue = "MinValue"; + + /** Set MinValue */ + public void setMinValue (int MinValue); + + /** Get MinValue */ + public int getMinValue(); + + /** Column name Qty */ + public static final String COLUMNNAME_Qty = "Qty"; + + /** Set Quantity. + * Quantity + */ + public void setQty (BigDecimal Qty); + + /** Get Quantity. + * Quantity + */ + public BigDecimal getQty(); + + /** Column name ServiceDate */ + public static final String COLUMNNAME_ServiceDate = "ServiceDate"; + + /** Set Service date. + * Date service was provided + */ + public void setServiceDate (Timestamp ServiceDate); + + /** Get Service date. + * Date service was provided + */ + public Timestamp getServiceDate(); + + /** Column name TextMsg */ + public static final String COLUMNNAME_TextMsg = "TextMsg"; + + /** Set Text Message. + * Text Message + */ + public void setTextMsg (String TextMsg); + + /** Get Text Message. + * Text Message + */ + public String getTextMsg(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); +} diff --git a/base/src/org/eevolution/model/I_HR_Concept.java b/base/src/org/eevolution/model/I_HR_Concept.java new file mode 100644 index 0000000000..3f98d175a2 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Concept.java @@ -0,0 +1,304 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Concept + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Concept +{ + + /** TableName=HR_Concept */ + public static final String Table_Name = "HR_Concept"; + + /** AD_Table_ID=53090 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AccountSign */ + public static final String COLUMNNAME_AccountSign = "AccountSign"; + + /** Set Account Sign. + * Indicates the Natural Sign of the Account as a Debit or Credit + */ + public void setAccountSign (String AccountSign); + + /** Get Account Sign. + * Indicates the Natural Sign of the Account as a Debit or Credit + */ + public String getAccountSign(); + + /** Column name ColumnType */ + public static final String COLUMNNAME_ColumnType = "ColumnType"; + + /** Set Column Type */ + public void setColumnType (String ColumnType); + + /** Get Column Type */ + public String getColumnType(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name HR_Concept_Category_ID */ + public static final String COLUMNNAME_HR_Concept_Category_ID = "HR_Concept_Category_ID"; + + /** Set Payroll Concept Category */ + public void setHR_Concept_Category_ID (int HR_Concept_Category_ID); + + /** Get Payroll Concept Category */ + public int getHR_Concept_Category_ID(); + + public org.eevolution.model.I_HR_Concept_Category getHR_Concept_Category() throws Exception; + + /** Column name HR_Concept_ID */ + public static final String COLUMNNAME_HR_Concept_ID = "HR_Concept_ID"; + + /** Set Concept */ + public void setHR_Concept_ID (int HR_Concept_ID); + + /** Get Concept */ + public int getHR_Concept_ID(); + + /** Column name HR_Department_ID */ + public static final String COLUMNNAME_HR_Department_ID = "HR_Department_ID"; + + /** Set Department */ + public void setHR_Department_ID (int HR_Department_ID); + + /** Get Department */ + public int getHR_Department_ID(); + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception; + + /** Column name HR_Job_ID */ + public static final String COLUMNNAME_HR_Job_ID = "HR_Job_ID"; + + /** Set Job */ + public void setHR_Job_ID (int HR_Job_ID); + + /** Get Job */ + public int getHR_Job_ID(); + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception; + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception; + + /** Column name IsDefault */ + public static final String COLUMNNAME_IsDefault = "IsDefault"; + + /** Set Default. + * Default value + */ + public void setIsDefault (boolean IsDefault); + + /** Get Default. + * Default value + */ + public boolean isDefault(); + + /** Column name IsEmployee */ + public static final String COLUMNNAME_IsEmployee = "IsEmployee"; + + /** Set Employee. + * Indicates if this Business Partner is an employee + */ + public void setIsEmployee (boolean IsEmployee); + + /** Get Employee. + * Indicates if this Business Partner is an employee + */ + public boolean isEmployee(); + + /** Column name IsPaid */ + public static final String COLUMNNAME_IsPaid = "IsPaid"; + + /** Set Paid. + * The document is paid + */ + public void setIsPaid (boolean IsPaid); + + /** Get Paid. + * The document is paid + */ + public boolean isPaid(); + + /** Column name IsPrinted */ + public static final String COLUMNNAME_IsPrinted = "IsPrinted"; + + /** Set Printed. + * Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted); + + /** Get Printed. + * Indicates if this document / line is printed + */ + public boolean isPrinted(); + + /** Column name IsReadWrite */ + public static final String COLUMNNAME_IsReadWrite = "IsReadWrite"; + + /** Set Read Write. + * Field is read / write + */ + public void setIsReadWrite (boolean IsReadWrite); + + /** Get Read Write. + * Field is read / write + */ + public boolean isReadWrite(); + + /** Column name IsReceipt */ + public static final String COLUMNNAME_IsReceipt = "IsReceipt"; + + /** Set Receipt. + * This is a sales transaction (receipt) + */ + public void setIsReceipt (boolean IsReceipt); + + /** Get Receipt. + * This is a sales transaction (receipt) + */ + public boolean isReceipt(); + + /** Column name IsRegistered */ + public static final String COLUMNNAME_IsRegistered = "IsRegistered"; + + /** Set Registered. + * The application is registered. + */ + public void setIsRegistered (boolean IsRegistered); + + /** Get Registered. + * The application is registered. + */ + public boolean isRegistered(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Type */ + public static final String COLUMNNAME_Type = "Type"; + + /** Set Type. + * Type of Validation (SQL, Java Script, Java Language) + */ + public void setType (String Type); + + /** Get Type. + * Type of Validation (SQL, Java Script, Java Language) + */ + public String getType(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_HR_Concept_Acct.java b/base/src/org/eevolution/model/I_HR_Concept_Acct.java new file mode 100644 index 0000000000..0bb3d9da98 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Concept_Acct.java @@ -0,0 +1,166 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Concept_Acct + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Concept_Acct +{ + + /** TableName=HR_Concept_Acct */ + public static final String Table_Name = "HR_Concept_Acct"; + + /** AD_Table_ID=53091 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name C_AcctSchema_ID */ + public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID"; + + /** Set Accounting Schema. + * Rules for accounting + */ + public void setC_AcctSchema_ID (int C_AcctSchema_ID); + + /** Get Accounting Schema. + * Rules for accounting + */ + public int getC_AcctSchema_ID(); + + public I_C_AcctSchema getC_AcctSchema() throws Exception; + + /** Column name C_BP_Group_ID */ + public static final String COLUMNNAME_C_BP_Group_ID = "C_BP_Group_ID"; + + /** Set Business Partner Group. + * Business Partner Group + */ + public void setC_BP_Group_ID (int C_BP_Group_ID); + + /** Get Business Partner Group. + * Business Partner Group + */ + public int getC_BP_Group_ID(); + + public I_C_BP_Group getC_BP_Group() throws Exception; + + /** Column name HR_Concept_Acct_ID */ + public static final String COLUMNNAME_HR_Concept_Acct_ID = "HR_Concept_Acct_ID"; + + /** Set HR_Concept_Acct_ID */ + public void setHR_Concept_Acct_ID (int HR_Concept_Acct_ID); + + /** Get HR_Concept_Acct_ID */ + public int getHR_Concept_Acct_ID(); + + /** Column name HR_Concept_ID */ + public static final String COLUMNNAME_HR_Concept_ID = "HR_Concept_ID"; + + /** Set Concept */ + public void setHR_Concept_ID (int HR_Concept_ID); + + /** Get Concept */ + public int getHR_Concept_ID(); + + public org.eevolution.model.I_HR_Concept getHR_Concept() throws Exception; + + /** Column name HR_Expense_Acct */ + public static final String COLUMNNAME_HR_Expense_Acct = "HR_Expense_Acct"; + + /** Set HR_Expense_Acct */ + public void setHR_Expense_Acct (int HR_Expense_Acct); + + /** Get HR_Expense_Acct */ + public int getHR_Expense_Acct(); + + /** Column name HR_Revenue_Acct */ + public static final String COLUMNNAME_HR_Revenue_Acct = "HR_Revenue_Acct"; + + /** Set HR_Revenue_Acct */ + public void setHR_Revenue_Acct (int HR_Revenue_Acct); + + /** Get HR_Revenue_Acct */ + public int getHR_Revenue_Acct(); + + /** Column name IsBalancing */ + public static final String COLUMNNAME_IsBalancing = "IsBalancing"; + + /** Set Balancing. + * All transactions within an element value must balance (e.g. cost centers) + */ + public void setIsBalancing (boolean IsBalancing); + + /** Get Balancing. + * All transactions within an element value must balance (e.g. cost centers) + */ + public boolean isBalancing(); + + /** Column name User1_ID */ + public static final String COLUMNNAME_User1_ID = "User1_ID"; + + /** Set User List 1. + * User defined list element #1 + */ + public void setUser1_ID (int User1_ID); + + /** Get User List 1. + * User defined list element #1 + */ + public int getUser1_ID(); + + /** Column name User2_ID */ + public static final String COLUMNNAME_User2_ID = "User2_ID"; + + /** Set User List 2. + * User defined list element #2 + */ + public void setUser2_ID (int User2_ID); + + /** Get User List 2. + * User defined list element #2 + */ + public int getUser2_ID(); +} diff --git a/base/src/org/compiere/model/I_M_Forecast.java b/base/src/org/eevolution/model/I_HR_Concept_Category.java similarity index 64% rename from base/src/org/compiere/model/I_M_Forecast.java rename to base/src/org/eevolution/model/I_HR_Concept_Category.java index 4dbed43ecf..123cb459f5 100644 --- a/base/src/org/compiere/model/I_M_Forecast.java +++ b/base/src/org/eevolution/model/I_HR_Concept_Category.java @@ -30,62 +30,33 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for M_Forecast +/** Generated Interface for HR_Concept_Category * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_M_Forecast +public interface I_HR_Concept_Category { - /** TableName=M_Forecast */ - public static final String Table_Name = "M_Forecast"; + /** TableName=HR_Concept_Category */ + public static final String Table_Name = "HR_Concept_Category"; - /** AD_Table_ID=720 */ + /** AD_Table_ID=53097 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - /** AccessLevel = 2 - Client + /** AccessLevel = 3 - Client - Org */ - BigDecimal accessLevel = BigDecimal.valueOf(2); + BigDecimal accessLevel = BigDecimal.valueOf(3); /** Load Meta Data */ - /** Column name C_Calendar_ID */ - public static final String COLUMNNAME_C_Calendar_ID = "C_Calendar_ID"; - - /** Set Calendar. - * Accounting Calendar Name - */ - public void setC_Calendar_ID (int C_Calendar_ID); - - /** Get Calendar. - * Accounting Calendar Name - */ - public int getC_Calendar_ID(); - - public I_C_Calendar getC_Calendar() throws Exception; - - /** Column name C_Year_ID */ - public static final String COLUMNNAME_C_Year_ID = "C_Year_ID"; - - /** Set Year. - * Calendar Year - */ - public void setC_Year_ID (int C_Year_ID); - - /** Get Year. - * Calendar Year - */ - public int getC_Year_ID(); - - public I_C_Year getC_Year() throws Exception; - /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; @@ -99,18 +70,23 @@ public interface I_M_Forecast */ public String getDescription(); - /** Column name Help */ - public static final String COLUMNNAME_Help = "Help"; + /** Column name HR_Concept_Acct */ + public static final String COLUMNNAME_HR_Concept_Acct = "HR_Concept_Acct"; - /** Set Comment/Help. - * Comment or Hint - */ - public void setHelp (String Help); + /** Set HR_Concept_Acct */ + public void setHR_Concept_Acct (int HR_Concept_Acct); - /** Get Comment/Help. - * Comment or Hint - */ - public String getHelp(); + /** Get HR_Concept_Acct */ + public int getHR_Concept_Acct(); + + /** Column name HR_Concept_Category_ID */ + public static final String COLUMNNAME_HR_Concept_Category_ID = "HR_Concept_Category_ID"; + + /** Set Payroll Concept Category */ + public void setHR_Concept_Category_ID (int HR_Concept_Category_ID); + + /** Get Payroll Concept Category */ + public int getHR_Concept_Category_ID(); /** Column name IsDefault */ public static final String COLUMNNAME_IsDefault = "IsDefault"; @@ -125,19 +101,6 @@ public interface I_M_Forecast */ public boolean isDefault(); - /** Column name M_Forecast_ID */ - public static final String COLUMNNAME_M_Forecast_ID = "M_Forecast_ID"; - - /** Set Forecast. - * Material Forecast - */ - public void setM_Forecast_ID (int M_Forecast_ID); - - /** Get Forecast. - * Material Forecast - */ - public int getM_Forecast_ID(); - /** Column name Name */ public static final String COLUMNNAME_Name = "Name"; @@ -151,12 +114,16 @@ public interface I_M_Forecast */ public String getName(); - /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; - /** Set Process Now */ - public void setProcessing (boolean Processing); + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); - /** Get Process Now */ - public boolean isProcessing(); + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); } diff --git a/base/src/org/eevolution/model/I_HR_Contract.java b/base/src/org/eevolution/model/I_HR_Contract.java new file mode 100644 index 0000000000..4dd4d255c6 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Contract.java @@ -0,0 +1,192 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Contract + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Contract +{ + + /** TableName=HR_Contract */ + public static final String Table_Name = "HR_Contract"; + + /** AD_Table_ID=53085 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + + /** Column name C_Campaign_ID */ + public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; + + /** Set Campaign. + * Marketing Campaign + */ + public void setC_Campaign_ID (int C_Campaign_ID); + + /** Get Campaign. + * Marketing Campaign + */ + public int getC_Campaign_ID(); + + public I_C_Campaign getC_Campaign() throws Exception; + + /** Column name C_Project_ID */ + public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; + + /** Set Project. + * Financial Project + */ + public void setC_Project_ID (int C_Project_ID); + + /** Get Project. + * Financial Project + */ + public int getC_Project_ID(); + + public I_C_Project getC_Project() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name HR_Contract_ID */ + public static final String COLUMNNAME_HR_Contract_ID = "HR_Contract_ID"; + + /** Set Payroll Contract */ + public void setHR_Contract_ID (int HR_Contract_ID); + + /** Get Payroll Contract */ + public int getHR_Contract_ID(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name NetDays */ + public static final String COLUMNNAME_NetDays = "NetDays"; + + /** Set Net Days. + * Net Days in which payment is due + */ + public void setNetDays (int NetDays); + + /** Get Net Days. + * Net Days in which payment is due + */ + public int getNetDays(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/compiere/model/I_S_Resource.java b/base/src/org/eevolution/model/I_HR_Department.java similarity index 59% rename from base/src/org/compiere/model/I_S_Resource.java rename to base/src/org/eevolution/model/I_HR_Department.java index 0e81372b80..59d6d4abc0 100644 --- a/base/src/org/compiere/model/I_S_Resource.java +++ b/base/src/org/eevolution/model/I_HR_Department.java @@ -30,22 +30,23 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for S_Resource +/** Generated Interface for HR_Department * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_S_Resource +public interface I_HR_Department { - /** TableName=S_Resource */ - public static final String Table_Name = "S_Resource"; + /** TableName=HR_Department */ + public static final String Table_Name = "HR_Department"; - /** AD_Table_ID=487 */ + /** AD_Table_ID=53088 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -56,30 +57,6 @@ public interface I_S_Resource /** Load Meta Data */ - /** Column name AD_User_ID */ - public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; - - /** Set User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID); - - /** Get User/Contact. - * User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID(); - - public I_AD_User getAD_User() throws Exception; - - /** Column name ChargeableQty */ - public static final String COLUMNNAME_ChargeableQty = "ChargeableQty"; - - /** Set Chargeable Quantity */ - public void setChargeableQty (BigDecimal ChargeableQty); - - /** Get Chargeable Quantity */ - public BigDecimal getChargeableQty(); - /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; @@ -93,33 +70,14 @@ public interface I_S_Resource */ public String getDescription(); - /** Column name IsAvailable */ - public static final String COLUMNNAME_IsAvailable = "IsAvailable"; + /** Column name HR_Department_ID */ + public static final String COLUMNNAME_HR_Department_ID = "HR_Department_ID"; - /** Set Available. - * Resource is available - */ - public void setIsAvailable (boolean IsAvailable); + /** Set Department */ + public void setHR_Department_ID (int HR_Department_ID); - /** Get Available. - * Resource is available - */ - public boolean isAvailable(); - - /** Column name M_Warehouse_ID */ - public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; - - /** Set Warehouse. - * Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID); - - /** Get Warehouse. - * Storage Warehouse and Service Point - */ - public int getM_Warehouse_ID(); - - public I_M_Warehouse getM_Warehouse() throws Exception; + /** Get Department */ + public int getHR_Department_ID(); /** Column name Name */ public static final String COLUMNNAME_Name = "Name"; @@ -134,30 +92,6 @@ public interface I_S_Resource */ public String getName(); - /** Column name S_ResourceType_ID */ - public static final String COLUMNNAME_S_ResourceType_ID = "S_ResourceType_ID"; - - /** Set Resource Type */ - public void setS_ResourceType_ID (int S_ResourceType_ID); - - /** Get Resource Type */ - public int getS_ResourceType_ID(); - - public I_S_ResourceType getS_ResourceType() throws Exception; - - /** Column name S_Resource_ID */ - public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; - - /** Set Resource. - * Resource - */ - public void setS_Resource_ID (int S_Resource_ID); - - /** Get Resource. - * Resource - */ - public int getS_Resource_ID(); - /** Column name Value */ public static final String COLUMNNAME_Value = "Value"; diff --git a/base/src/org/eevolution/model/I_HR_Employee.java b/base/src/org/eevolution/model/I_HR_Employee.java new file mode 100644 index 0000000000..eb47d1a276 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Employee.java @@ -0,0 +1,228 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Employee + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Employee +{ + + /** TableName=HR_Employee */ + public static final String Table_Name = "HR_Employee"; + + /** AD_Table_ID=53086 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name C_Activity_ID */ + public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; + + /** Set Activity. + * Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID); + + /** Get Activity. + * Business Activity + */ + public int getC_Activity_ID(); + + public I_C_Activity getC_Activity() throws Exception; + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + + /** Column name Code */ + public static final String COLUMNNAME_Code = "Code"; + + /** Set Validation code. + * Validation Code + */ + public void setCode (String Code); + + /** Get Validation code. + * Validation Code + */ + public String getCode(); + + /** Column name EndDate */ + public static final String COLUMNNAME_EndDate = "EndDate"; + + /** Set End Date. + * Last effective date (inclusive) + */ + public void setEndDate (Timestamp EndDate); + + /** Get End Date. + * Last effective date (inclusive) + */ + public Timestamp getEndDate(); + + /** Column name HR_Department_ID */ + public static final String COLUMNNAME_HR_Department_ID = "HR_Department_ID"; + + /** Set Department */ + public void setHR_Department_ID (int HR_Department_ID); + + /** Get Department */ + public int getHR_Department_ID(); + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception; + + /** Column name HR_Employee_ID */ + public static final String COLUMNNAME_HR_Employee_ID = "HR_Employee_ID"; + + /** Set Employee */ + public void setHR_Employee_ID (int HR_Employee_ID); + + /** Get Employee */ + public int getHR_Employee_ID(); + + /** Column name HR_Job_ID */ + public static final String COLUMNNAME_HR_Job_ID = "HR_Job_ID"; + + /** Set Job */ + public void setHR_Job_ID (int HR_Job_ID); + + /** Get Job */ + public int getHR_Job_ID(); + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception; + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception; + + /** Column name ImageURL */ + public static final String COLUMNNAME_ImageURL = "ImageURL"; + + /** Set Image URL. + * URL of image + */ + public void setImageURL (byte[] ImageURL); + + /** Get Image URL. + * URL of image + */ + public byte[] getImageURL(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Name2 */ + public static final String COLUMNNAME_Name2 = "Name2"; + + /** Set Name 2. + * Additional Name + */ + public void setName2 (String Name2); + + /** Get Name 2. + * Additional Name + */ + public String getName2(); + + /** Column name NationalCode */ + public static final String COLUMNNAME_NationalCode = "NationalCode"; + + /** Set National Code */ + public void setNationalCode (String NationalCode); + + /** Get National Code */ + public String getNationalCode(); + + /** Column name SSCode */ + public static final String COLUMNNAME_SSCode = "SSCode"; + + /** Set Social Security Code */ + public void setSSCode (String SSCode); + + /** Get Social Security Code */ + public String getSSCode(); + + /** Column name StartDate */ + public static final String COLUMNNAME_StartDate = "StartDate"; + + /** Set Start Date. + * First effective day (inclusive) + */ + public void setStartDate (Timestamp StartDate); + + /** Get Start Date. + * First effective day (inclusive) + */ + public Timestamp getStartDate(); +} diff --git a/base/src/org/compiere/model/I_M_Warehouse.java b/base/src/org/eevolution/model/I_HR_Job.java similarity index 63% rename from base/src/org/compiere/model/I_M_Warehouse.java rename to base/src/org/eevolution/model/I_HR_Job.java index 5e691a54e1..b2a4e13007 100644 --- a/base/src/org/compiere/model/I_M_Warehouse.java +++ b/base/src/org/eevolution/model/I_HR_Job.java @@ -30,22 +30,23 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for M_Warehouse +/** Generated Interface for HR_Job * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_M_Warehouse +public interface I_HR_Job { - /** TableName=M_Warehouse */ - public static final String Table_Name = "M_Warehouse"; + /** TableName=HR_Job */ + public static final String Table_Name = "HR_Job"; - /** AD_Table_ID=190 */ + /** AD_Table_ID=53089 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -56,19 +57,6 @@ public interface I_M_Warehouse /** Load Meta Data */ - /** Column name C_Location_ID */ - public static final String COLUMNNAME_C_Location_ID = "C_Location_ID"; - - /** Set Address. - * Location or Address - */ - public void setC_Location_ID (int C_Location_ID); - - /** Get Address. - * Location or Address - */ - public int getC_Location_ID(); - /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; @@ -82,31 +70,47 @@ public interface I_M_Warehouse */ public String getDescription(); - /** Column name M_WarehouseSource_ID */ - public static final String COLUMNNAME_M_WarehouseSource_ID = "M_WarehouseSource_ID"; + /** Column name HR_Department_ID */ + public static final String COLUMNNAME_HR_Department_ID = "HR_Department_ID"; - /** Set Source Warehouse. - * Optional Warehouse to replenish from + /** Set Department */ + public void setHR_Department_ID (int HR_Department_ID); + + /** Get Department */ + public int getHR_Department_ID(); + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception; + + /** Column name HR_Job_ID */ + public static final String COLUMNNAME_HR_Job_ID = "HR_Job_ID"; + + /** Set Job */ + public void setHR_Job_ID (int HR_Job_ID); + + /** Get Job */ + public int getHR_Job_ID(); + + /** Column name IsParent */ + public static final String COLUMNNAME_IsParent = "IsParent"; + + /** Set Parent link column. + * This column is a link to the parent table (e.g. header from lines) - incl. Association key columns */ - public void setM_WarehouseSource_ID (int M_WarehouseSource_ID); + public void setIsParent (boolean IsParent); - /** Get Source Warehouse. - * Optional Warehouse to replenish from + /** Get Parent link column. + * This column is a link to the parent table (e.g. header from lines) - incl. Association key columns */ - public int getM_WarehouseSource_ID(); + public boolean isParent(); - /** Column name M_Warehouse_ID */ - public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; + /** Column name JobCant */ + public static final String COLUMNNAME_JobCant = "JobCant"; - /** Set Warehouse. - * Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID); + /** Set Job Cant */ + public void setJobCant (int JobCant); - /** Get Warehouse. - * Storage Warehouse and Service Point - */ - public int getM_Warehouse_ID(); + /** Get Job Cant */ + public int getJobCant(); /** Column name Name */ public static final String COLUMNNAME_Name = "Name"; @@ -121,31 +125,27 @@ public interface I_M_Warehouse */ public String getName(); - /** Column name ReplenishmentClass */ - public static final String COLUMNNAME_ReplenishmentClass = "ReplenishmentClass"; + /** Column name Next_Job_ID */ + public static final String COLUMNNAME_Next_Job_ID = "Next_Job_ID"; - /** Set Replenishment Class. - * Custom class to calculate Quantity to Order + /** Set Next Job */ + public void setNext_Job_ID (int Next_Job_ID); + + /** Get Next Job */ + public int getNext_Job_ID(); + + /** Column name Supervisor_ID */ + public static final String COLUMNNAME_Supervisor_ID = "Supervisor_ID"; + + /** Set Supervisor. + * Supervisor for this user/organization - used for escalation and approval */ - public void setReplenishmentClass (String ReplenishmentClass); + public void setSupervisor_ID (int Supervisor_ID); - /** Get Replenishment Class. - * Custom class to calculate Quantity to Order + /** Get Supervisor. + * Supervisor for this user/organization - used for escalation and approval */ - public String getReplenishmentClass(); - - /** Column name Separator */ - public static final String COLUMNNAME_Separator = "Separator"; - - /** Set Element Separator. - * Element Separator - */ - public void setSeparator (String Separator); - - /** Get Element Separator. - * Element Separator - */ - public String getSeparator(); + public int getSupervisor_ID(); /** Column name Value */ public static final String COLUMNNAME_Value = "Value"; diff --git a/base/src/org/eevolution/model/I_HR_List.java b/base/src/org/eevolution/model/I_HR_List.java new file mode 100644 index 0000000000..a4d3c12367 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_List.java @@ -0,0 +1,178 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_List + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_List +{ + + /** TableName=HR_List */ + public static final String Table_Name = "HR_List"; + + /** AD_Table_ID=53099 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name HR_Department_ID */ + public static final String COLUMNNAME_HR_Department_ID = "HR_Department_ID"; + + /** Set Department */ + public void setHR_Department_ID (int HR_Department_ID); + + /** Get Department */ + public int getHR_Department_ID(); + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception; + + /** Column name HR_Employee_ID */ + public static final String COLUMNNAME_HR_Employee_ID = "HR_Employee_ID"; + + /** Set Employee */ + public void setHR_Employee_ID (int HR_Employee_ID); + + /** Get Employee */ + public int getHR_Employee_ID(); + + public org.eevolution.model.I_HR_Employee getHR_Employee() throws Exception; + + /** Column name HR_ListType_ID */ + public static final String COLUMNNAME_HR_ListType_ID = "HR_ListType_ID"; + + /** Set Payroll List Type */ + public void setHR_ListType_ID (int HR_ListType_ID); + + /** Get Payroll List Type */ + public int getHR_ListType_ID(); + + public org.eevolution.model.I_HR_ListType getHR_ListType() throws Exception; + + /** Column name HR_List_ID */ + public static final String COLUMNNAME_HR_List_ID = "HR_List_ID"; + + /** Set Payroll List */ + public void setHR_List_ID (int HR_List_ID); + + /** Get Payroll List */ + public int getHR_List_ID(); + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception; + + /** Column name IsEmployee */ + public static final String COLUMNNAME_IsEmployee = "IsEmployee"; + + /** Set Employee. + * Indicates if this Business Partner is an employee + */ + public void setIsEmployee (boolean IsEmployee); + + /** Get Employee. + * Indicates if this Business Partner is an employee + */ + public boolean isEmployee(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_HR_ListLine.java b/base/src/org/eevolution/model/I_HR_ListLine.java new file mode 100644 index 0000000000..b80d78f34a --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_ListLine.java @@ -0,0 +1,182 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_ListLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_ListLine +{ + + /** TableName=HR_ListLine */ + public static final String Table_Name = "HR_ListLine"; + + /** AD_Table_ID=53101 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name Col_1 */ + public static final String COLUMNNAME_Col_1 = "Col_1"; + + /** Set Col_1 */ + public void setCol_1 (BigDecimal Col_1); + + /** Get Col_1 */ + public BigDecimal getCol_1(); + + /** Column name Col_2 */ + public static final String COLUMNNAME_Col_2 = "Col_2"; + + /** Set Col_2 */ + public void setCol_2 (BigDecimal Col_2); + + /** Get Col_2 */ + public BigDecimal getCol_2(); + + /** Column name Col_3 */ + public static final String COLUMNNAME_Col_3 = "Col_3"; + + /** Set Col_3 */ + public void setCol_3 (BigDecimal Col_3); + + /** Get Col_3 */ + public BigDecimal getCol_3(); + + /** Column name Col_4 */ + public static final String COLUMNNAME_Col_4 = "Col_4"; + + /** Set Col_4 */ + public void setCol_4 (BigDecimal Col_4); + + /** Get Col_4 */ + public BigDecimal getCol_4(); + + /** Column name Col_5 */ + public static final String COLUMNNAME_Col_5 = "Col_5"; + + /** Set Col_5 */ + public void setCol_5 (BigDecimal Col_5); + + /** Get Col_5 */ + public BigDecimal getCol_5(); + + /** Column name Col_6 */ + public static final String COLUMNNAME_Col_6 = "Col_6"; + + /** Set Col_6 */ + public void setCol_6 (BigDecimal Col_6); + + /** Get Col_6 */ + public BigDecimal getCol_6(); + + /** Column name Col_7 */ + public static final String COLUMNNAME_Col_7 = "Col_7"; + + /** Set Col_7 */ + public void setCol_7 (BigDecimal Col_7); + + /** Get Col_7 */ + public BigDecimal getCol_7(); + + /** Column name Col_8 */ + public static final String COLUMNNAME_Col_8 = "Col_8"; + + /** Set Col_8 */ + public void setCol_8 (BigDecimal Col_8); + + /** Get Col_8 */ + public BigDecimal getCol_8(); + + /** Column name HR_ListLine_ID */ + public static final String COLUMNNAME_HR_ListLine_ID = "HR_ListLine_ID"; + + /** Set Payroll List Line */ + public void setHR_ListLine_ID (int HR_ListLine_ID); + + /** Get Payroll List Line */ + public int getHR_ListLine_ID(); + + /** Column name HR_ListVersion_ID */ + public static final String COLUMNNAME_HR_ListVersion_ID = "HR_ListVersion_ID"; + + /** Set Payroll List Version */ + public void setHR_ListVersion_ID (int HR_ListVersion_ID); + + /** Get Payroll List Version */ + public int getHR_ListVersion_ID(); + + public org.eevolution.model.I_HR_ListVersion getHR_ListVersion() throws Exception; + + /** Column name MaxValue */ + public static final String COLUMNNAME_MaxValue = "MaxValue"; + + /** Set MaxValue */ + public void setMaxValue (BigDecimal MaxValue); + + /** Get MaxValue */ + public BigDecimal getMaxValue(); + + /** Column name MinValue */ + public static final String COLUMNNAME_MinValue = "MinValue"; + + /** Set MinValue */ + public void setMinValue (BigDecimal MinValue); + + /** Get MinValue */ + public BigDecimal getMinValue(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); +} diff --git a/base/src/org/eevolution/model/I_HR_ListType.java b/base/src/org/eevolution/model/I_HR_ListType.java new file mode 100644 index 0000000000..f6eebb6343 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_ListType.java @@ -0,0 +1,107 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_ListType + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_ListType +{ + + /** TableName=HR_ListType */ + public static final String Table_Name = "HR_ListType"; + + /** AD_Table_ID=53098 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name HR_ListType_ID */ + public static final String COLUMNNAME_HR_ListType_ID = "HR_ListType_ID"; + + /** Set Payroll List Type */ + public void setHR_ListType_ID (int HR_ListType_ID); + + /** Get Payroll List Type */ + public int getHR_ListType_ID(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_HR_ListVersion.java b/base/src/org/eevolution/model/I_HR_ListVersion.java new file mode 100644 index 0000000000..64b66e56be --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_ListVersion.java @@ -0,0 +1,141 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_ListVersion + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_ListVersion +{ + + /** TableName=HR_ListVersion */ + public static final String Table_Name = "HR_ListVersion"; + + /** AD_Table_ID=53100 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name HR_ListBase_ID */ + public static final String COLUMNNAME_HR_ListBase_ID = "HR_ListBase_ID"; + + /** Set Payroll List Base */ + public void setHR_ListBase_ID (int HR_ListBase_ID); + + /** Get Payroll List Base */ + public int getHR_ListBase_ID(); + + /** Column name HR_ListVersion_ID */ + public static final String COLUMNNAME_HR_ListVersion_ID = "HR_ListVersion_ID"; + + /** Set Payroll List Version */ + public void setHR_ListVersion_ID (int HR_ListVersion_ID); + + /** Get Payroll List Version */ + public int getHR_ListVersion_ID(); + + /** Column name HR_List_ID */ + public static final String COLUMNNAME_HR_List_ID = "HR_List_ID"; + + /** Set Payroll List */ + public void setHR_List_ID (int HR_List_ID); + + /** Get Payroll List */ + public int getHR_List_ID(); + + public org.eevolution.model.I_HR_List getHR_List() throws Exception; + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); +} diff --git a/base/src/org/eevolution/model/I_HR_Movement.java b/base/src/org/eevolution/model/I_HR_Movement.java new file mode 100644 index 0000000000..2e090dac21 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Movement.java @@ -0,0 +1,317 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Movement + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Movement +{ + + /** TableName=HR_Movement */ + public static final String Table_Name = "HR_Movement"; + + /** AD_Table_ID=53102 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_Rule_ID */ + public static final String COLUMNNAME_AD_Rule_ID = "AD_Rule_ID"; + + /** Set Rule */ + public void setAD_Rule_ID (int AD_Rule_ID); + + /** Get Rule */ + public int getAD_Rule_ID(); + + public I_AD_Rule getAD_Rule() throws Exception; + + /** Column name Amount */ + public static final String COLUMNNAME_Amount = "Amount"; + + /** Set Amount. + * Amount in a defined currency + */ + public void setAmount (BigDecimal Amount); + + /** Get Amount. + * Amount in a defined currency + */ + public BigDecimal getAmount(); + + /** Column name C_Activity_ID */ + public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; + + /** Set Activity. + * Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID); + + /** Get Activity. + * Business Activity + */ + public int getC_Activity_ID(); + + public I_C_Activity getC_Activity() throws Exception; + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + + /** Column name ColumnType */ + public static final String COLUMNNAME_ColumnType = "ColumnType"; + + /** Set Column Type */ + public void setColumnType (String ColumnType); + + /** Get Column Type */ + public String getColumnType(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name HR_Concept_Category_ID */ + public static final String COLUMNNAME_HR_Concept_Category_ID = "HR_Concept_Category_ID"; + + /** Set Payroll Concept Category */ + public void setHR_Concept_Category_ID (int HR_Concept_Category_ID); + + /** Get Payroll Concept Category */ + public int getHR_Concept_Category_ID(); + + public org.eevolution.model.I_HR_Concept_Category getHR_Concept_Category() throws Exception; + + /** Column name HR_Concept_ID */ + public static final String COLUMNNAME_HR_Concept_ID = "HR_Concept_ID"; + + /** Set Concept */ + public void setHR_Concept_ID (int HR_Concept_ID); + + /** Get Concept */ + public int getHR_Concept_ID(); + + public org.eevolution.model.I_HR_Concept getHR_Concept() throws Exception; + + /** Column name HR_Department_ID */ + public static final String COLUMNNAME_HR_Department_ID = "HR_Department_ID"; + + /** Set Department */ + public void setHR_Department_ID (int HR_Department_ID); + + /** Get Department */ + public int getHR_Department_ID(); + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception; + + /** Column name HR_Job_ID */ + public static final String COLUMNNAME_HR_Job_ID = "HR_Job_ID"; + + /** Set Job */ + public void setHR_Job_ID (int HR_Job_ID); + + /** Get Job */ + public int getHR_Job_ID(); + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception; + + /** Column name HR_Movement_ID */ + public static final String COLUMNNAME_HR_Movement_ID = "HR_Movement_ID"; + + /** Set Payroll Movement */ + public void setHR_Movement_ID (int HR_Movement_ID); + + /** Get Payroll Movement */ + public int getHR_Movement_ID(); + + /** Column name HR_Process_ID */ + public static final String COLUMNNAME_HR_Process_ID = "HR_Process_ID"; + + /** Set Payroll Process */ + public void setHR_Process_ID (int HR_Process_ID); + + /** Get Payroll Process */ + public int getHR_Process_ID(); + + public org.eevolution.model.I_HR_Process getHR_Process() throws Exception; + + /** Column name IsPrinted */ + public static final String COLUMNNAME_IsPrinted = "IsPrinted"; + + /** Set Printed. + * Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted); + + /** Get Printed. + * Indicates if this document / line is printed + */ + public boolean isPrinted(); + + /** Column name IsRegistered */ + public static final String COLUMNNAME_IsRegistered = "IsRegistered"; + + /** Set Registered. + * The application is registered. + */ + public void setIsRegistered (boolean IsRegistered); + + /** Get Registered. + * The application is registered. + */ + public boolean isRegistered(); + + /** Column name Posted */ + public static final String COLUMNNAME_Posted = "Posted"; + + /** Set Posted. + * Posting status + */ + public void setPosted (boolean Posted); + + /** Get Posted. + * Posting status + */ + public boolean isPosted(); + + /** Column name Processed */ + public static final String COLUMNNAME_Processed = "Processed"; + + /** Set Processed. + * The document has been processed + */ + public void setProcessed (boolean Processed); + + /** Get Processed. + * The document has been processed + */ + public boolean isProcessed(); + + /** Column name Qty */ + public static final String COLUMNNAME_Qty = "Qty"; + + /** Set Quantity. + * Quantity + */ + public void setQty (BigDecimal Qty); + + /** Get Quantity. + * Quantity + */ + public BigDecimal getQty(); + + /** Column name ServiceDate */ + public static final String COLUMNNAME_ServiceDate = "ServiceDate"; + + /** Set Service date. + * Date service was provided + */ + public void setServiceDate (Timestamp ServiceDate); + + /** Get Service date. + * Date service was provided + */ + public Timestamp getServiceDate(); + + /** Column name TextMsg */ + public static final String COLUMNNAME_TextMsg = "TextMsg"; + + /** Set Text Message. + * Text Message + */ + public void setTextMsg (String TextMsg); + + /** Get Text Message. + * Text Message + */ + public String getTextMsg(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); +} diff --git a/base/src/org/eevolution/model/I_HR_Payroll.java b/base/src/org/eevolution/model/I_HR_Payroll.java new file mode 100644 index 0000000000..91f2f8b12f --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Payroll.java @@ -0,0 +1,183 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Payroll + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Payroll +{ + + /** TableName=HR_Payroll */ + public static final String Table_Name = "HR_Payroll"; + + /** AD_Table_ID=53093 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_PrintFormat_ID */ + public static final String COLUMNNAME_AD_PrintFormat_ID = "AD_PrintFormat_ID"; + + /** Set Print Format. + * Data Print Format + */ + public void setAD_PrintFormat_ID (int AD_PrintFormat_ID); + + /** Get Print Format. + * Data Print Format + */ + public int getAD_PrintFormat_ID(); + + public I_AD_PrintFormat getAD_PrintFormat() throws Exception; + + /** Column name C_Charge_ID */ + public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID"; + + /** Set Charge. + * Additional document charges + */ + public void setC_Charge_ID (int C_Charge_ID); + + /** Get Charge. + * Additional document charges + */ + public int getC_Charge_ID(); + + public I_C_Charge getC_Charge() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name HR_Contract_ID */ + public static final String COLUMNNAME_HR_Contract_ID = "HR_Contract_ID"; + + /** Set Payroll Contract */ + public void setHR_Contract_ID (int HR_Contract_ID); + + /** Get Payroll Contract */ + public int getHR_Contract_ID(); + + public org.eevolution.model.I_HR_Contract getHR_Contract() throws Exception; + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name PaymentRule */ + public static final String COLUMNNAME_PaymentRule = "PaymentRule"; + + /** Set Payment Rule. + * How you pay the invoice + */ + public void setPaymentRule (String PaymentRule); + + /** Get Payment Rule. + * How you pay the invoice + */ + public String getPaymentRule(); + + /** Column name Processed */ + public static final String COLUMNNAME_Processed = "Processed"; + + /** Set Processed. + * The document has been processed + */ + public void setProcessed (boolean Processed); + + /** Get Processed. + * The document has been processed + */ + public boolean isProcessed(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_HR_PayrollConcept.java b/base/src/org/eevolution/model/I_HR_PayrollConcept.java new file mode 100644 index 0000000000..95c2bada5e --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_PayrollConcept.java @@ -0,0 +1,168 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_PayrollConcept + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_PayrollConcept +{ + + /** TableName=HR_PayrollConcept */ + public static final String Table_Name = "HR_PayrollConcept"; + + /** AD_Table_ID=53096 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_Rule_ID */ + public static final String COLUMNNAME_AD_Rule_ID = "AD_Rule_ID"; + + /** Set Rule */ + public void setAD_Rule_ID (int AD_Rule_ID); + + /** Get Rule */ + public int getAD_Rule_ID(); + + public I_AD_Rule getAD_Rule() throws Exception; + + /** Column name HR_Concept_ID */ + public static final String COLUMNNAME_HR_Concept_ID = "HR_Concept_ID"; + + /** Set Concept */ + public void setHR_Concept_ID (int HR_Concept_ID); + + /** Get Concept */ + public int getHR_Concept_ID(); + + public org.eevolution.model.I_HR_Concept getHR_Concept() throws Exception; + + /** Column name HR_PayrollConcept_ID */ + public static final String COLUMNNAME_HR_PayrollConcept_ID = "HR_PayrollConcept_ID"; + + /** Set Payroll Concept */ + public void setHR_PayrollConcept_ID (int HR_PayrollConcept_ID); + + /** Get Payroll Concept */ + public int getHR_PayrollConcept_ID(); + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception; + + /** Column name IsDisplayed */ + public static final String COLUMNNAME_IsDisplayed = "IsDisplayed"; + + /** Set Displayed. + * Determines, if this field is displayed + */ + public void setIsDisplayed (boolean IsDisplayed); + + /** Get Displayed. + * Determines, if this field is displayed + */ + public boolean isDisplayed(); + + /** Column name IsInclude */ + public static final String COLUMNNAME_IsInclude = "IsInclude"; + + /** Set Included. + * Defines whether this content / template is included into another one + */ + public void setIsInclude (boolean IsInclude); + + /** Get Included. + * Defines whether this content / template is included into another one + */ + public boolean isInclude(); + + /** Column name IsPrinted */ + public static final String COLUMNNAME_IsPrinted = "IsPrinted"; + + /** Set Printed. + * Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted); + + /** Get Printed. + * Indicates if this document / line is printed + */ + public boolean isPrinted(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; + + /** Set Sequence. + * Method of ordering records; + lowest number comes first + */ + public void setSeqNo (int SeqNo); + + /** Get Sequence. + * Method of ordering records; + lowest number comes first + */ + public int getSeqNo(); +} diff --git a/base/src/org/eevolution/model/I_HR_Period.java b/base/src/org/eevolution/model/I_HR_Period.java new file mode 100644 index 0000000000..e646114ca4 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Period.java @@ -0,0 +1,247 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Period + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Period +{ + + /** TableName=HR_Period */ + public static final String Table_Name = "HR_Period"; + + /** AD_Table_ID=53094 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name C_Period_ID */ + public static final String COLUMNNAME_C_Period_ID = "C_Period_ID"; + + /** Set Period. + * Period of the Calendar + */ + public void setC_Period_ID (int C_Period_ID); + + /** Get Period. + * Period of the Calendar + */ + public int getC_Period_ID(); + + public I_C_Period getC_Period() throws Exception; + + /** Column name C_Year_ID */ + public static final String COLUMNNAME_C_Year_ID = "C_Year_ID"; + + /** Set Year. + * Calendar Year + */ + public void setC_Year_ID (int C_Year_ID); + + /** Get Year. + * Calendar Year + */ + public int getC_Year_ID(); + + public I_C_Year getC_Year() throws Exception; + + /** Column name DateAcct */ + public static final String COLUMNNAME_DateAcct = "DateAcct"; + + /** Set Account Date. + * Accounting Date + */ + public void setDateAcct (Timestamp DateAcct); + + /** Get Account Date. + * Accounting Date + */ + public Timestamp getDateAcct(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name EndDate */ + public static final String COLUMNNAME_EndDate = "EndDate"; + + /** Set End Date. + * Last effective date (inclusive) + */ + public void setEndDate (Timestamp EndDate); + + /** Get End Date. + * Last effective date (inclusive) + */ + public Timestamp getEndDate(); + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception; + + /** Column name HR_Period_ID */ + public static final String COLUMNNAME_HR_Period_ID = "HR_Period_ID"; + + /** Set Payroll Period */ + public void setHR_Period_ID (int HR_Period_ID); + + /** Get Payroll Period */ + public int getHR_Period_ID(); + + /** Column name HR_Year_ID */ + public static final String COLUMNNAME_HR_Year_ID = "HR_Year_ID"; + + /** Set Payroll Year */ + public void setHR_Year_ID (int HR_Year_ID); + + /** Get Payroll Year */ + public int getHR_Year_ID(); + + public org.eevolution.model.I_HR_Year getHR_Year() throws Exception; + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name PeriodAction */ + public static final String COLUMNNAME_PeriodAction = "PeriodAction"; + + /** Set Period Action. + * Action taken for this period + */ + public void setPeriodAction (String PeriodAction); + + /** Get Period Action. + * Action taken for this period + */ + public String getPeriodAction(); + + /** Column name PeriodNo */ + public static final String COLUMNNAME_PeriodNo = "PeriodNo"; + + /** Set Period No. + * Unique Period Number + */ + public void setPeriodNo (int PeriodNo); + + /** Get Period No. + * Unique Period Number + */ + public int getPeriodNo(); + + /** Column name PeriodStatus */ + public static final String COLUMNNAME_PeriodStatus = "PeriodStatus"; + + /** Set Period Status. + * Current state of this period + */ + public void setPeriodStatus (String PeriodStatus); + + /** Get Period Status. + * Current state of this period + */ + public String getPeriodStatus(); + + /** Column name Processed */ + public static final String COLUMNNAME_Processed = "Processed"; + + /** Set Processed. + * The document has been processed + */ + public void setProcessed (boolean Processed); + + /** Get Processed. + * The document has been processed + */ + public boolean isProcessed(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name StartDate */ + public static final String COLUMNNAME_StartDate = "StartDate"; + + /** Set Start Date. + * First effective day (inclusive) + */ + public void setStartDate (Timestamp StartDate); + + /** Get Start Date. + * First effective day (inclusive) + */ + public Timestamp getStartDate(); +} diff --git a/base/src/org/eevolution/model/I_HR_Process.java b/base/src/org/eevolution/model/I_HR_Process.java new file mode 100644 index 0000000000..c47f71d1b1 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Process.java @@ -0,0 +1,353 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Process + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Process +{ + + /** TableName=HR_Process */ + public static final String Table_Name = "HR_Process"; + + /** AD_Table_ID=53092 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_PrintFormat_ID */ + public static final String COLUMNNAME_AD_PrintFormat_ID = "AD_PrintFormat_ID"; + + /** Set Print Format. + * Data Print Format + */ + public void setAD_PrintFormat_ID (int AD_PrintFormat_ID); + + /** Get Print Format. + * Data Print Format + */ + public int getAD_PrintFormat_ID(); + + public I_AD_PrintFormat getAD_PrintFormat() throws Exception; + + /** Column name AD_Workflow_ID */ + public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID"; + + /** Set Workflow. + * Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID); + + /** Get Workflow. + * Workflow or combination of tasks + */ + public int getAD_Workflow_ID(); + + public I_AD_Workflow getAD_Workflow() throws Exception; + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + + /** Column name C_Charge_ID */ + public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID"; + + /** Set Charge. + * Additional document charges + */ + public void setC_Charge_ID (int C_Charge_ID); + + /** Get Charge. + * Additional document charges + */ + public int getC_Charge_ID(); + + public I_C_Charge getC_Charge() throws Exception; + + /** Column name C_DocTypeTarget_ID */ + public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID"; + + /** Set Target Document Type. + * Target document type for conversing documents + */ + public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID); + + /** Get Target Document Type. + * Target document type for conversing documents + */ + public int getC_DocTypeTarget_ID(); + + /** Column name C_DocType_ID */ + public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; + + /** Set Document Type. + * Document type or rules + */ + public void setC_DocType_ID (int C_DocType_ID); + + /** Get Document Type. + * Document type or rules + */ + public int getC_DocType_ID(); + + public I_C_DocType getC_DocType() throws Exception; + + /** Column name C_PaySelection_ID */ + public static final String COLUMNNAME_C_PaySelection_ID = "C_PaySelection_ID"; + + /** Set Payment Selection. + * Payment Selection + */ + public void setC_PaySelection_ID (int C_PaySelection_ID); + + /** Get Payment Selection. + * Payment Selection + */ + public int getC_PaySelection_ID(); + + public I_C_PaySelection getC_PaySelection() throws Exception; + + /** Column name ColumnSQL */ + public static final String COLUMNNAME_ColumnSQL = "ColumnSQL"; + + /** Set Column SQL. + * Virtual Column (r/o) + */ + public void setColumnSQL (String ColumnSQL); + + /** Get Column SQL. + * Virtual Column (r/o) + */ + public String getColumnSQL(); + + /** Column name DateAcct */ + public static final String COLUMNNAME_DateAcct = "DateAcct"; + + /** Set Account Date. + * Accounting Date + */ + public void setDateAcct (Timestamp DateAcct); + + /** Get Account Date. + * Accounting Date + */ + public Timestamp getDateAcct(); + + /** Column name DocAction */ + public static final String COLUMNNAME_DocAction = "DocAction"; + + /** Set Document Action. + * The targeted status of the document + */ + public void setDocAction (String DocAction); + + /** Get Document Action. + * The targeted status of the document + */ + public String getDocAction(); + + /** Column name DocStatus */ + public static final String COLUMNNAME_DocStatus = "DocStatus"; + + /** Set Document Status. + * The current status of the document + */ + public void setDocStatus (String DocStatus); + + /** Get Document Status. + * The current status of the document + */ + public String getDocStatus(); + + /** Column name DocumentNo */ + public static final String COLUMNNAME_DocumentNo = "DocumentNo"; + + /** Set Document No. + * Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo); + + /** Get Document No. + * Document sequence number of the document + */ + public String getDocumentNo(); + + /** Column name HR_Department_ID */ + public static final String COLUMNNAME_HR_Department_ID = "HR_Department_ID"; + + /** Set Department */ + public void setHR_Department_ID (int HR_Department_ID); + + /** Get Department */ + public int getHR_Department_ID(); + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception; + + /** Column name HR_Employee_ID */ + public static final String COLUMNNAME_HR_Employee_ID = "HR_Employee_ID"; + + /** Set Employee */ + public void setHR_Employee_ID (int HR_Employee_ID); + + /** Get Employee */ + public int getHR_Employee_ID(); + + public org.eevolution.model.I_HR_Employee getHR_Employee() throws Exception; + + /** Column name HR_Job_ID */ + public static final String COLUMNNAME_HR_Job_ID = "HR_Job_ID"; + + /** Set Job */ + public void setHR_Job_ID (int HR_Job_ID); + + /** Get Job */ + public int getHR_Job_ID(); + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception; + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception; + + /** Column name HR_Period_ID */ + public static final String COLUMNNAME_HR_Period_ID = "HR_Period_ID"; + + /** Set Payroll Period */ + public void setHR_Period_ID (int HR_Period_ID); + + /** Get Payroll Period */ + public int getHR_Period_ID(); + + public org.eevolution.model.I_HR_Period getHR_Period() throws Exception; + + /** Column name HR_Process_ID */ + public static final String COLUMNNAME_HR_Process_ID = "HR_Process_ID"; + + /** Set Payroll Process */ + public void setHR_Process_ID (int HR_Process_ID); + + /** Get Payroll Process */ + public int getHR_Process_ID(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Posted */ + public static final String COLUMNNAME_Posted = "Posted"; + + /** Set Posted. + * Posting status + */ + public void setPosted (boolean Posted); + + /** Get Posted. + * Posting status + */ + public boolean isPosted(); + + /** Column name Processed */ + public static final String COLUMNNAME_Processed = "Processed"; + + /** Set Processed. + * The document has been processed + */ + public void setProcessed (boolean Processed); + + /** Get Processed. + * The document has been processed + */ + public boolean isProcessed(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name Reversal_ID */ + public static final String COLUMNNAME_Reversal_ID = "Reversal_ID"; + + /** Set Reversal ID. + * ID of document reversal + */ + public void setReversal_ID (int Reversal_ID); + + /** Get Reversal ID. + * ID of document reversal + */ + public int getReversal_ID(); +} diff --git a/base/src/org/eevolution/model/I_HR_ProfileJob.java b/base/src/org/eevolution/model/I_HR_ProfileJob.java new file mode 100644 index 0000000000..418a5d5db8 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_ProfileJob.java @@ -0,0 +1,82 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_ProfileJob + * @author Trifon Trifonov (generated) + * @version Release 3.5.0b + */ +public interface I_HR_ProfileJob +{ + + /** TableName=HR_ProfileJob */ + public static final String Table_Name = "HR_ProfileJob"; + + /** AD_Table_ID=1000004 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name HR_Job_ID */ + public static final String COLUMNNAME_HR_Job_ID = "HR_Job_ID"; + + /** Set HR_Job_ID */ + public void setHR_Job_ID (int HR_Job_ID); + + /** Get HR_Job_ID */ + public int getHR_Job_ID(); + + public I_HR_Job getHR_Job() throws Exception; + + /** Column name HR_ProfileJob_ID */ + public static final String COLUMNNAME_HR_ProfileJob_ID = "HR_ProfileJob_ID"; + + /** Set HR_ProfileJob_ID */ + public void setHR_ProfileJob_ID (int HR_ProfileJob_ID); + + /** Get HR_ProfileJob_ID */ + public int getHR_ProfileJob_ID(); + + /** Column name HR_ProfileLine_ID */ + public static final String COLUMNNAME_HR_ProfileLine_ID = "HR_ProfileLine_ID"; +} diff --git a/base/src/org/eevolution/model/I_HR_Profile_bp.java b/base/src/org/eevolution/model/I_HR_Profile_bp.java new file mode 100644 index 0000000000..f60b76f066 --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Profile_bp.java @@ -0,0 +1,88 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Profile_bp + * @author Trifon Trifonov (generated) + * @version Release 3.5.0b + */ +public interface I_HR_Profile_bp +{ + + /** TableName=HR_Profile_bp */ + public static final String Table_Name = "HR_Profile_bp"; + + /** AD_Table_ID=1000000 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + + /** Column name HR_Job_ID */ + public static final String COLUMNNAME_HR_Job_ID = "HR_Job_ID"; + + /** Set HR_Job_ID */ + public void setHR_Job_ID (int HR_Job_ID); + + /** Get HR_Job_ID */ + public int getHR_Job_ID(); + + public I_HR_Job getHR_Job() throws Exception; + + /** Column name HR_ProfileLine_ID */ + public static final String COLUMNNAME_HR_ProfileLine_ID = "HR_ProfileLine_ID"; +} diff --git a/base/src/org/eevolution/model/I_HR_Year.java b/base/src/org/eevolution/model/I_HR_Year.java new file mode 100644 index 0000000000..c1517ec26f --- /dev/null +++ b/base/src/org/eevolution/model/I_HR_Year.java @@ -0,0 +1,156 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for HR_Year + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_HR_Year +{ + + /** TableName=HR_Year */ + public static final String Table_Name = "HR_Year"; + + /** AD_Table_ID=53095 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name C_Year_ID */ + public static final String COLUMNNAME_C_Year_ID = "C_Year_ID"; + + /** Set Year. + * Calendar Year + */ + public void setC_Year_ID (int C_Year_ID); + + /** Get Year. + * Calendar Year + */ + public int getC_Year_ID(); + + public I_C_Year getC_Year() throws Exception; + + /** Column name HR_Payroll_ID */ + public static final String COLUMNNAME_HR_Payroll_ID = "HR_Payroll_ID"; + + /** Set Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID); + + /** Get Payroll */ + public int getHR_Payroll_ID(); + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception; + + /** Column name HR_Year_ID */ + public static final String COLUMNNAME_HR_Year_ID = "HR_Year_ID"; + + /** Set Payroll Year */ + public void setHR_Year_ID (int HR_Year_ID); + + /** Get Payroll Year */ + public int getHR_Year_ID(); + + /** Column name NetDays */ + public static final String COLUMNNAME_NetDays = "NetDays"; + + /** Set Net Days. + * Net Days in which payment is due + */ + public void setNetDays (int NetDays); + + /** Get Net Days. + * Net Days in which payment is due + */ + public int getNetDays(); + + /** Column name Processed */ + public static final String COLUMNNAME_Processed = "Processed"; + + /** Set Processed. + * The document has been processed + */ + public void setProcessed (boolean Processed); + + /** Get Processed. + * The document has been processed + */ + public boolean isProcessed(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name Qty */ + public static final String COLUMNNAME_Qty = "Qty"; + + /** Set Quantity. + * Quantity + */ + public void setQty (int Qty); + + /** Get Quantity. + * Quantity + */ + public int getQty(); + + /** Column name StartDate */ + public static final String COLUMNNAME_StartDate = "StartDate"; + + /** Set Start Date. + * First effective day (inclusive) + */ + public void setStartDate (Timestamp StartDate); + + /** Get Start Date. + * First effective day (inclusive) + */ + public Timestamp getStartDate(); +} diff --git a/base/src/org/eevolution/model/I_IMP_Processor.java b/base/src/org/eevolution/model/I_IMP_Processor.java new file mode 100644 index 0000000000..75883f0c17 --- /dev/null +++ b/base/src/org/eevolution/model/I_IMP_Processor.java @@ -0,0 +1,242 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for IMP_Processor + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_IMP_Processor +{ + + /** TableName=IMP_Processor */ + public static final String Table_Name = "IMP_Processor"; + + /** AD_Table_ID=53077 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name Account */ + public static final String COLUMNNAME_Account = "Account"; + + /** Set Account */ + public void setAccount (String Account); + + /** Get Account */ + public String getAccount(); + + /** Column name DateLastRun */ + public static final String COLUMNNAME_DateLastRun = "DateLastRun"; + + /** Set Date last run. + * Date the process was last run. + */ + public void setDateLastRun (Timestamp DateLastRun); + + /** Get Date last run. + * Date the process was last run. + */ + public Timestamp getDateLastRun(); + + /** Column name DateNextRun */ + public static final String COLUMNNAME_DateNextRun = "DateNextRun"; + + /** Set Date next run. + * Date the process will run next + */ + public void setDateNextRun (Timestamp DateNextRun); + + /** Get Date next run. + * Date the process will run next + */ + public Timestamp getDateNextRun(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Frequency */ + public static final String COLUMNNAME_Frequency = "Frequency"; + + /** Set Frequency. + * Frequency of events + */ + public void setFrequency (int Frequency); + + /** Get Frequency. + * Frequency of events + */ + public int getFrequency(); + + /** Column name FrequencyType */ + public static final String COLUMNNAME_FrequencyType = "FrequencyType"; + + /** Set Frequency Type. + * Frequency of event + */ + public void setFrequencyType (String FrequencyType); + + /** Get Frequency Type. + * Frequency of event + */ + public String getFrequencyType(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name Host */ + public static final String COLUMNNAME_Host = "Host"; + + /** Set Host */ + public void setHost (String Host); + + /** Get Host */ + public String getHost(); + + /** Column name IMP_Processor_ID */ + public static final String COLUMNNAME_IMP_Processor_ID = "IMP_Processor_ID"; + + /** Set IMP_Processor_ID */ + public void setIMP_Processor_ID (int IMP_Processor_ID); + + /** Get IMP_Processor_ID */ + public int getIMP_Processor_ID(); + + /** Column name IMP_Processor_Type_ID */ + public static final String COLUMNNAME_IMP_Processor_Type_ID = "IMP_Processor_Type_ID"; + + /** Set IMP_Processor_Type_ID */ + public void setIMP_Processor_Type_ID (int IMP_Processor_Type_ID); + + /** Get IMP_Processor_Type_ID */ + public int getIMP_Processor_Type_ID(); + + public org.eevolution.model.I_IMP_Processor_Type getIMP_Processor_Type() throws Exception; + + /** Column name KeepLogDays */ + public static final String COLUMNNAME_KeepLogDays = "KeepLogDays"; + + /** Set Days to keep Log. + * Number of days to keep the log entries + */ + public void setKeepLogDays (int KeepLogDays); + + /** Get Days to keep Log. + * Number of days to keep the log entries + */ + public int getKeepLogDays(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name PasswordInfo */ + public static final String COLUMNNAME_PasswordInfo = "PasswordInfo"; + + /** Set PasswordInfo */ + public void setPasswordInfo (String PasswordInfo); + + /** Get PasswordInfo */ + public String getPasswordInfo(); + + /** Column name Port */ + public static final String COLUMNNAME_Port = "Port"; + + /** Set Port */ + public void setPort (int Port); + + /** Get Port */ + public int getPort(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_IMP_ProcessorLog.java b/base/src/org/eevolution/model/I_IMP_ProcessorLog.java new file mode 100644 index 0000000000..ab59946716 --- /dev/null +++ b/base/src/org/eevolution/model/I_IMP_ProcessorLog.java @@ -0,0 +1,170 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for IMP_ProcessorLog + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_IMP_ProcessorLog +{ + + /** TableName=IMP_ProcessorLog */ + public static final String Table_Name = "IMP_ProcessorLog"; + + /** AD_Table_ID=53079 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name BinaryData */ + public static final String COLUMNNAME_BinaryData = "BinaryData"; + + /** Set BinaryData. + * Binary Data + */ + public void setBinaryData (byte[] BinaryData); + + /** Get BinaryData. + * Binary Data + */ + public byte[] getBinaryData(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IMP_ProcessorLog_ID */ + public static final String COLUMNNAME_IMP_ProcessorLog_ID = "IMP_ProcessorLog_ID"; + + /** Set IMP_ProcessorLog_ID */ + public void setIMP_ProcessorLog_ID (int IMP_ProcessorLog_ID); + + /** Get IMP_ProcessorLog_ID */ + public int getIMP_ProcessorLog_ID(); + + /** Column name IMP_Processor_ID */ + public static final String COLUMNNAME_IMP_Processor_ID = "IMP_Processor_ID"; + + /** Set IMP_Processor_ID */ + public void setIMP_Processor_ID (int IMP_Processor_ID); + + /** Get IMP_Processor_ID */ + public int getIMP_Processor_ID(); + + public org.eevolution.model.I_IMP_Processor getIMP_Processor() throws Exception; + + /** Column name IsError */ + public static final String COLUMNNAME_IsError = "IsError"; + + /** Set Error. + * An Error occured in the execution + */ + public void setIsError (boolean IsError); + + /** Get Error. + * An Error occured in the execution + */ + public boolean isError(); + + /** Column name Reference */ + public static final String COLUMNNAME_Reference = "Reference"; + + /** Set Reference. + * Reference for this record + */ + public void setReference (String Reference); + + /** Get Reference. + * Reference for this record + */ + public String getReference(); + + /** Column name Summary */ + public static final String COLUMNNAME_Summary = "Summary"; + + /** Set Summary. + * Textual summary of this request + */ + public void setSummary (String Summary); + + /** Get Summary. + * Textual summary of this request + */ + public String getSummary(); + + /** Column name TextMsg */ + public static final String COLUMNNAME_TextMsg = "TextMsg"; + + /** Set Text Message. + * Text Message + */ + public void setTextMsg (String TextMsg); + + /** Get Text Message. + * Text Message + */ + public String getTextMsg(); +} diff --git a/base/src/org/eevolution/model/I_IMP_ProcessorParameter.java b/base/src/org/eevolution/model/I_IMP_ProcessorParameter.java new file mode 100644 index 0000000000..d04d0c3dd4 --- /dev/null +++ b/base/src/org/eevolution/model/I_IMP_ProcessorParameter.java @@ -0,0 +1,140 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for IMP_ProcessorParameter + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_IMP_ProcessorParameter +{ + + /** TableName=IMP_ProcessorParameter */ + public static final String Table_Name = "IMP_ProcessorParameter"; + + /** AD_Table_ID=53078 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 7 - System - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(7); + + /** Load Meta Data */ + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IMP_ProcessorParameter_ID */ + public static final String COLUMNNAME_IMP_ProcessorParameter_ID = "IMP_ProcessorParameter_ID"; + + /** Set IMP_ProcessorParameter_ID */ + public void setIMP_ProcessorParameter_ID (int IMP_ProcessorParameter_ID); + + /** Get IMP_ProcessorParameter_ID */ + public int getIMP_ProcessorParameter_ID(); + + /** Column name IMP_Processor_ID */ + public static final String COLUMNNAME_IMP_Processor_ID = "IMP_Processor_ID"; + + /** Set IMP_Processor_ID */ + public void setIMP_Processor_ID (int IMP_Processor_ID); + + /** Get IMP_Processor_ID */ + public int getIMP_Processor_ID(); + + public org.eevolution.model.I_IMP_Processor getIMP_Processor() throws Exception; + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name ParameterValue */ + public static final String COLUMNNAME_ParameterValue = "ParameterValue"; + + /** Set ParameterValue */ + public void setParameterValue (String ParameterValue); + + /** Get ParameterValue */ + public String getParameterValue(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_IMP_Processor_Type.java b/base/src/org/eevolution/model/I_IMP_Processor_Type.java new file mode 100644 index 0000000000..042043faa3 --- /dev/null +++ b/base/src/org/eevolution/model/I_IMP_Processor_Type.java @@ -0,0 +1,129 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for IMP_Processor_Type + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_IMP_Processor_Type +{ + + /** TableName=IMP_Processor_Type */ + public static final String Table_Name = "IMP_Processor_Type"; + + /** AD_Table_ID=53080 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 7 - System - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(7); + + /** Load Meta Data */ + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IMP_Processor_Type_ID */ + public static final String COLUMNNAME_IMP_Processor_Type_ID = "IMP_Processor_Type_ID"; + + /** Set IMP_Processor_Type_ID */ + public void setIMP_Processor_Type_ID (int IMP_Processor_Type_ID); + + /** Get IMP_Processor_Type_ID */ + public int getIMP_Processor_Type_ID(); + + /** Column name JavaClass */ + public static final String COLUMNNAME_JavaClass = "JavaClass"; + + /** Set JavaClass */ + public void setJavaClass (String JavaClass); + + /** Get JavaClass */ + public String getJavaClass(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/compiere/model/I_M_Inventory.java b/base/src/org/eevolution/model/I_PP_Cost_Collector.java similarity index 50% rename from base/src/org/compiere/model/I_M_Inventory.java rename to base/src/org/eevolution/model/I_PP_Cost_Collector.java index f2d32368a3..b8bd19297e 100644 --- a/base/src/org/compiere/model/I_M_Inventory.java +++ b/base/src/org/eevolution/model/I_PP_Cost_Collector.java @@ -30,23 +30,24 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; import java.sql.Timestamp; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for M_Inventory +/** Generated Interface for PP_Cost_Collector * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_M_Inventory +public interface I_PP_Cost_Collector { - /** TableName=M_Inventory */ - public static final String Table_Name = "M_Inventory"; + /** TableName=PP_Cost_Collector */ + public static final String Table_Name = "PP_Cost_Collector"; - /** AD_Table_ID=321 */ + /** AD_Table_ID=53035 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -70,18 +71,20 @@ public interface I_M_Inventory */ public int getAD_OrgTrx_ID(); - /** Column name ApprovalAmt */ - public static final String COLUMNNAME_ApprovalAmt = "ApprovalAmt"; + /** Column name AD_User_ID */ + public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; - /** Set Approval Amount. - * Document Approval Amount + /** Set User/Contact. + * User within the system - Internal or Business Partner Contact */ - public void setApprovalAmt (BigDecimal ApprovalAmt); + public void setAD_User_ID (int AD_User_ID); - /** Get Approval Amount. - * Document Approval Amount + /** Get User/Contact. + * User within the system - Internal or Business Partner Contact */ - public BigDecimal getApprovalAmt(); + public int getAD_User_ID(); + + public I_AD_User getAD_User() throws Exception; /** Column name C_Activity_ID */ public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; @@ -113,6 +116,19 @@ public interface I_M_Inventory public I_C_Campaign getC_Campaign() throws Exception; + /** Column name C_DocTypeTarget_ID */ + public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID"; + + /** Set Target Document Type. + * Target document type for conversing documents + */ + public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID); + + /** Get Target Document Type. + * Target document type for conversing documents + */ + public int getC_DocTypeTarget_ID(); + /** Column name C_DocType_ID */ public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; @@ -126,8 +142,6 @@ public interface I_M_Inventory */ public int getC_DocType_ID(); - public I_C_DocType getC_DocType() throws Exception; - /** Column name C_Project_ID */ public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; @@ -143,6 +157,34 @@ public interface I_M_Inventory public I_C_Project getC_Project() throws Exception; + /** Column name C_UOM_ID */ + public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; + + /** Set UOM. + * Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID); + + /** Get UOM. + * Unit of Measure + */ + public int getC_UOM_ID(); + + public I_C_UOM getC_UOM() throws Exception; + + /** Column name DateAcct */ + public static final String COLUMNNAME_DateAcct = "DateAcct"; + + /** Set Account Date. + * Accounting Date + */ + public void setDateAcct (Timestamp DateAcct); + + /** Get Account Date. + * Accounting Date + */ + public Timestamp getDateAcct(); + /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; @@ -182,72 +224,64 @@ public interface I_M_Inventory */ public String getDocStatus(); - /** Column name DocumentNo */ - public static final String COLUMNNAME_DocumentNo = "DocumentNo"; + /** Column name DurationReal */ + public static final String COLUMNNAME_DurationReal = "DurationReal"; - /** Set Document No. - * Document sequence number of the document + /** Set DurationReal */ + public void setDurationReal (BigDecimal DurationReal); + + /** Get DurationReal */ + public BigDecimal getDurationReal(); + + /** Column name IsBatchTime */ + public static final String COLUMNNAME_IsBatchTime = "IsBatchTime"; + + /** Set IsBatchTime */ + public void setIsBatchTime (boolean IsBatchTime); + + /** Get IsBatchTime */ + public boolean isBatchTime(); + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance */ - public void setDocumentNo (String DocumentNo); + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); - /** Get Document No. - * Document sequence number of the document + /** Get Attribute Set Instance. + * Product Attribute Set Instance */ - public String getDocumentNo(); + public int getM_AttributeSetInstance_ID(); - /** Column name GenerateList */ - public static final String COLUMNNAME_GenerateList = "GenerateList"; + /** Column name M_Locator_ID */ + public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID"; - /** Set Generate List. - * Generate List + /** Set Locator. + * Warehouse Locator */ - public void setGenerateList (String GenerateList); + public void setM_Locator_ID (int M_Locator_ID); - /** Get Generate List. - * Generate List + /** Get Locator. + * Warehouse Locator */ - public String getGenerateList(); + public int getM_Locator_ID(); - /** Column name IsApproved */ - public static final String COLUMNNAME_IsApproved = "IsApproved"; + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; - /** Set Approved. - * Indicates if this document requires approval + /** Set Product. + * Product, Service, Item */ - public void setIsApproved (boolean IsApproved); + public void setM_Product_ID (int M_Product_ID); - /** Get Approved. - * Indicates if this document requires approval + /** Get Product. + * Product, Service, Item */ - public boolean isApproved(); + public int getM_Product_ID(); - /** Column name M_Inventory_ID */ - public static final String COLUMNNAME_M_Inventory_ID = "M_Inventory_ID"; - - /** Set Phys.Inventory. - * Parameters for a Physical Inventory - */ - public void setM_Inventory_ID (int M_Inventory_ID); - - /** Get Phys.Inventory. - * Parameters for a Physical Inventory - */ - public int getM_Inventory_ID(); - - /** Column name M_PerpetualInv_ID */ - public static final String COLUMNNAME_M_PerpetualInv_ID = "M_PerpetualInv_ID"; - - /** Set Perpetual Inventory. - * Rules for generating physical inventory - */ - public void setM_PerpetualInv_ID (int M_PerpetualInv_ID); - - /** Get Perpetual Inventory. - * Rules for generating physical inventory - */ - public int getM_PerpetualInv_ID(); - - public I_M_PerpetualInv getM_PerpetualInv() throws Exception; + public I_M_Product getM_Product() throws Exception; /** Column name M_Warehouse_ID */ public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; @@ -277,6 +311,85 @@ public interface I_M_Inventory */ public Timestamp getMovementDate(); + /** Column name MovementQty */ + public static final String COLUMNNAME_MovementQty = "MovementQty"; + + /** Set Movement Quantity. + * Quantity of a product moved. + */ + public void setMovementQty (BigDecimal MovementQty); + + /** Get Movement Quantity. + * Quantity of a product moved. + */ + public BigDecimal getMovementQty(); + + /** Column name MovementType */ + public static final String COLUMNNAME_MovementType = "MovementType"; + + /** Set Movement Type. + * Method of moving the inventory + */ + public void setMovementType (String MovementType); + + /** Get Movement Type. + * Method of moving the inventory + */ + public String getMovementType(); + + /** Column name PP_Cost_Collector_ID */ + public static final String COLUMNNAME_PP_Cost_Collector_ID = "PP_Cost_Collector_ID"; + + /** Set PP_Cost_Collector_ID */ + public void setPP_Cost_Collector_ID (int PP_Cost_Collector_ID); + + /** Get PP_Cost_Collector_ID */ + public int getPP_Cost_Collector_ID(); + + /** Column name PP_Order_BOMLine_ID */ + public static final String COLUMNNAME_PP_Order_BOMLine_ID = "PP_Order_BOMLine_ID"; + + /** Set PP_Order_BOMLine_ID */ + public void setPP_Order_BOMLine_ID (int PP_Order_BOMLine_ID); + + /** Get PP_Order_BOMLine_ID */ + public int getPP_Order_BOMLine_ID(); + + public org.eevolution.model.I_PP_Order_BOMLine getPP_Order_BOMLine() throws Exception; + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name PP_Order_Node_ID */ + public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID"; + + /** Set PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID); + + /** Get PP_Order_Node_ID */ + public int getPP_Order_Node_ID(); + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception; + + /** Column name PP_Order_Workflow_ID */ + public static final String COLUMNNAME_PP_Order_Workflow_ID = "PP_Order_Workflow_ID"; + + /** Set PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID); + + /** Get PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID(); + + public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception; + /** Column name Posted */ public static final String COLUMNNAME_Posted = "Posted"; @@ -312,14 +425,64 @@ public interface I_M_Inventory /** Get Process Now */ public boolean isProcessing(); - /** Column name UpdateQty */ - public static final String COLUMNNAME_UpdateQty = "UpdateQty"; + /** Column name QtyReject */ + public static final String COLUMNNAME_QtyReject = "QtyReject"; - /** Set Update Quantities */ - public void setUpdateQty (String UpdateQty); + /** Set QtyReject */ + public void setQtyReject (BigDecimal QtyReject); - /** Get Update Quantities */ - public String getUpdateQty(); + /** Get QtyReject */ + public BigDecimal getQtyReject(); + + /** Column name Reversal_ID */ + public static final String COLUMNNAME_Reversal_ID = "Reversal_ID"; + + /** Set Reversal ID. + * ID of document reversal + */ + public void setReversal_ID (int Reversal_ID); + + /** Get Reversal ID. + * ID of document reversal + */ + public int getReversal_ID(); + + /** Column name S_Resource_ID */ + public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; + + /** Set Resource. + * Resource + */ + public void setS_Resource_ID (int S_Resource_ID); + + /** Get Resource. + * Resource + */ + public int getS_Resource_ID(); + + public I_S_Resource getS_Resource() throws Exception; + + /** Column name ScrappedQty */ + public static final String COLUMNNAME_ScrappedQty = "ScrappedQty"; + + /** Set Scrapped Quantity. + * The Quantity scrapped due to QA issues + */ + public void setScrappedQty (BigDecimal ScrappedQty); + + /** Get Scrapped Quantity. + * The Quantity scrapped due to QA issues + */ + public BigDecimal getScrappedQty(); + + /** Column name SetupTimeReal */ + public static final String COLUMNNAME_SetupTimeReal = "SetupTimeReal"; + + /** Set SetupTimeReal */ + public void setSetupTimeReal (BigDecimal SetupTimeReal); + + /** Get SetupTimeReal */ + public BigDecimal getSetupTimeReal(); /** Column name User1_ID */ public static final String COLUMNNAME_User1_ID = "User1_ID"; diff --git a/base/src/org/eevolution/model/I_PP_MRP.java b/base/src/org/eevolution/model/I_PP_MRP.java new file mode 100644 index 0000000000..d03d2ef9cb --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_MRP.java @@ -0,0 +1,447 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_MRP + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_MRP +{ + + /** TableName=PP_MRP */ + public static final String Table_Name = "PP_MRP"; + + /** AD_Table_ID=53043 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + + /** Column name C_OrderLine_ID */ + public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID"; + + /** Set Sales Order Line. + * Sales Order Line + */ + public void setC_OrderLine_ID (int C_OrderLine_ID); + + /** Get Sales Order Line. + * Sales Order Line + */ + public int getC_OrderLine_ID(); + + public I_C_OrderLine getC_OrderLine() throws Exception; + + /** Column name C_Order_ID */ + public static final String COLUMNNAME_C_Order_ID = "C_Order_ID"; + + /** Set Order. + * Order + */ + public void setC_Order_ID (int C_Order_ID); + + /** Get Order. + * Order + */ + public int getC_Order_ID(); + + public I_C_Order getC_Order() throws Exception; + + /** Column name DateConfirm */ + public static final String COLUMNNAME_DateConfirm = "DateConfirm"; + + /** Set DateConfirm */ + public void setDateConfirm (Timestamp DateConfirm); + + /** Get DateConfirm */ + public Timestamp getDateConfirm(); + + /** Column name DateFinishSchedule */ + public static final String COLUMNNAME_DateFinishSchedule = "DateFinishSchedule"; + + /** Set DateFinishSchedule */ + public void setDateFinishSchedule (Timestamp DateFinishSchedule); + + /** Get DateFinishSchedule */ + public Timestamp getDateFinishSchedule(); + + /** Column name DateOrdered */ + public static final String COLUMNNAME_DateOrdered = "DateOrdered"; + + /** Set Date Ordered. + * Date of Order + */ + public void setDateOrdered (Timestamp DateOrdered); + + /** Get Date Ordered. + * Date of Order + */ + public Timestamp getDateOrdered(); + + /** Column name DatePromised */ + public static final String COLUMNNAME_DatePromised = "DatePromised"; + + /** Set Date Promised. + * Date Order was promised + */ + public void setDatePromised (Timestamp DatePromised); + + /** Get Date Promised. + * Date Order was promised + */ + public Timestamp getDatePromised(); + + /** Column name DateSimulation */ + public static final String COLUMNNAME_DateSimulation = "DateSimulation"; + + /** Set DateSimulation */ + public void setDateSimulation (Timestamp DateSimulation); + + /** Get DateSimulation */ + public Timestamp getDateSimulation(); + + /** Column name DateStart */ + public static final String COLUMNNAME_DateStart = "DateStart"; + + /** Set DateStart */ + public void setDateStart (Timestamp DateStart); + + /** Get DateStart */ + public Timestamp getDateStart(); + + /** Column name DateStartSchedule */ + public static final String COLUMNNAME_DateStartSchedule = "DateStartSchedule"; + + /** Set DateStartSchedule */ + public void setDateStartSchedule (Timestamp DateStartSchedule); + + /** Get DateStartSchedule */ + public Timestamp getDateStartSchedule(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name DocStatus */ + public static final String COLUMNNAME_DocStatus = "DocStatus"; + + /** Set Document Status. + * The current status of the document + */ + public void setDocStatus (String DocStatus); + + /** Get Document Status. + * The current status of the document + */ + public String getDocStatus(); + + /** Column name IsAvailable */ + public static final String COLUMNNAME_IsAvailable = "IsAvailable"; + + /** Set Available. + * Resource is available + */ + public void setIsAvailable (boolean IsAvailable); + + /** Get Available. + * Resource is available + */ + public boolean isAvailable(); + + /** Column name M_ForecastLine_ID */ + public static final String COLUMNNAME_M_ForecastLine_ID = "M_ForecastLine_ID"; + + /** Set Forecast Line. + * Forecast Line + */ + public void setM_ForecastLine_ID (int M_ForecastLine_ID); + + /** Get Forecast Line. + * Forecast Line + */ + public int getM_ForecastLine_ID(); + + public I_M_ForecastLine getM_ForecastLine() throws Exception; + + /** Column name M_Forecast_ID */ + public static final String COLUMNNAME_M_Forecast_ID = "M_Forecast_ID"; + + /** Set Forecast. + * Material Forecast + */ + public void setM_Forecast_ID (int M_Forecast_ID); + + /** Get Forecast. + * Material Forecast + */ + public int getM_Forecast_ID(); + + public I_M_Forecast getM_Forecast() throws Exception; + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name M_RequisitionLine_ID */ + public static final String COLUMNNAME_M_RequisitionLine_ID = "M_RequisitionLine_ID"; + + /** Set Requisition Line. + * Material Requisition Line + */ + public void setM_RequisitionLine_ID (int M_RequisitionLine_ID); + + /** Get Requisition Line. + * Material Requisition Line + */ + public int getM_RequisitionLine_ID(); + + public I_M_RequisitionLine getM_RequisitionLine() throws Exception; + + /** Column name M_Requisition_ID */ + public static final String COLUMNNAME_M_Requisition_ID = "M_Requisition_ID"; + + /** Set Requisition. + * Material Requisition + */ + public void setM_Requisition_ID (int M_Requisition_ID); + + /** Get Requisition. + * Material Requisition + */ + public int getM_Requisition_ID(); + + public I_M_Requisition getM_Requisition() throws Exception; + + /** Column name M_Warehouse_ID */ + public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; + + /** Set Warehouse. + * Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID); + + /** Get Warehouse. + * Storage Warehouse and Service Point + */ + public int getM_Warehouse_ID(); + + public I_M_Warehouse getM_Warehouse() throws Exception; + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name PP_MRP_ID */ + public static final String COLUMNNAME_PP_MRP_ID = "PP_MRP_ID"; + + /** Set PP_MRP_ID */ + public void setPP_MRP_ID (int PP_MRP_ID); + + /** Get PP_MRP_ID */ + public int getPP_MRP_ID(); + + /** Column name PP_Order_BOMLine_ID */ + public static final String COLUMNNAME_PP_Order_BOMLine_ID = "PP_Order_BOMLine_ID"; + + /** Set PP_Order_BOMLine_ID */ + public void setPP_Order_BOMLine_ID (int PP_Order_BOMLine_ID); + + /** Get PP_Order_BOMLine_ID */ + public int getPP_Order_BOMLine_ID(); + + public org.eevolution.model.I_PP_Order_BOMLine getPP_Order_BOMLine() throws Exception; + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name Planner_ID */ + public static final String COLUMNNAME_Planner_ID = "Planner_ID"; + + /** Set Planner */ + public void setPlanner_ID (int Planner_ID); + + /** Get Planner */ + public int getPlanner_ID(); + + /** Column name Priority */ + public static final String COLUMNNAME_Priority = "Priority"; + + /** Set Priority. + * Indicates if this request is of a high, medium or low priority. + */ + public void setPriority (String Priority); + + /** Get Priority. + * Indicates if this request is of a high, medium or low priority. + */ + public String getPriority(); + + /** Column name Qty */ + public static final String COLUMNNAME_Qty = "Qty"; + + /** Set Quantity. + * Quantity + */ + public void setQty (BigDecimal Qty); + + /** Get Quantity. + * Quantity + */ + public BigDecimal getQty(); + + /** Column name S_Resource_ID */ + public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; + + /** Set Resource. + * Resource + */ + public void setS_Resource_ID (int S_Resource_ID); + + /** Get Resource. + * Resource + */ + public int getS_Resource_ID(); + + public I_S_Resource getS_Resource() throws Exception; + + /** Column name Type */ + public static final String COLUMNNAME_Type = "Type"; + + /** Set Type. + * Type of Validation (SQL, Java Script, Java Language) + */ + public void setType (String Type); + + /** Get Type. + * Type of Validation (SQL, Java Script, Java Language) + */ + public String getType(); + + /** Column name TypeMRP */ + public static final String COLUMNNAME_TypeMRP = "TypeMRP"; + + /** Set TypeMRP */ + public void setTypeMRP (String TypeMRP); + + /** Get TypeMRP */ + public String getTypeMRP(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); + + /** Column name Version */ + public static final String COLUMNNAME_Version = "Version"; + + /** Set Version. + * Version of the table definition + */ + public void setVersion (BigDecimal Version); + + /** Get Version. + * Version of the table definition + */ + public BigDecimal getVersion(); +} diff --git a/base/src/org/eevolution/model/I_PP_Order.java b/base/src/org/eevolution/model/I_PP_Order.java new file mode 100644 index 0000000000..b7326f40d5 --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Order.java @@ -0,0 +1,757 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Order + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Order +{ + + /** TableName=PP_Order */ + public static final String Table_Name = "PP_Order"; + + /** AD_Table_ID=53027 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 1 - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(1); + + /** Load Meta Data */ + + /** Column name AD_OrgTrx_ID */ + public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; + + /** Set Trx Organization. + * Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); + + /** Get Trx Organization. + * Performing or initiating organization + */ + public int getAD_OrgTrx_ID(); + + /** Column name AD_Workflow_ID */ + public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID"; + + /** Set Workflow. + * Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID); + + /** Get Workflow. + * Workflow or combination of tasks + */ + public int getAD_Workflow_ID(); + + public I_AD_Workflow getAD_Workflow() throws Exception; + + /** Column name Assay */ + public static final String COLUMNNAME_Assay = "Assay"; + + /** Set Quantity Assay. + * Indicated the Quantity Assay to use into Quality Order + */ + public void setAssay (BigDecimal Assay); + + /** Get Quantity Assay. + * Indicated the Quantity Assay to use into Quality Order + */ + public BigDecimal getAssay(); + + /** Column name C_Activity_ID */ + public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; + + /** Set Activity. + * Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID); + + /** Get Activity. + * Business Activity + */ + public int getC_Activity_ID(); + + public I_C_Activity getC_Activity() throws Exception; + + /** Column name C_Campaign_ID */ + public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; + + /** Set Campaign. + * Marketing Campaign + */ + public void setC_Campaign_ID (int C_Campaign_ID); + + /** Get Campaign. + * Marketing Campaign + */ + public int getC_Campaign_ID(); + + public I_C_Campaign getC_Campaign() throws Exception; + + /** Column name C_DocTypeTarget_ID */ + public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID"; + + /** Set Target Document Type. + * Target document type for conversing documents + */ + public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID); + + /** Get Target Document Type. + * Target document type for conversing documents + */ + public int getC_DocTypeTarget_ID(); + + /** Column name C_DocType_ID */ + public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; + + /** Set Document Type. + * Document type or rules + */ + public void setC_DocType_ID (int C_DocType_ID); + + /** Get Document Type. + * Document type or rules + */ + public int getC_DocType_ID(); + + /** Column name C_OrderLine_ID */ + public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID"; + + /** Set Sales Order Line. + * Sales Order Line + */ + public void setC_OrderLine_ID (int C_OrderLine_ID); + + /** Get Sales Order Line. + * Sales Order Line + */ + public int getC_OrderLine_ID(); + + public I_C_OrderLine getC_OrderLine() throws Exception; + + /** Column name C_Project_ID */ + public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; + + /** Set Project. + * Financial Project + */ + public void setC_Project_ID (int C_Project_ID); + + /** Get Project. + * Financial Project + */ + public int getC_Project_ID(); + + public I_C_Project getC_Project() throws Exception; + + /** Column name C_UOM_ID */ + public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; + + /** Set UOM. + * Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID); + + /** Get UOM. + * Unit of Measure + */ + public int getC_UOM_ID(); + + public I_C_UOM getC_UOM() throws Exception; + + /** Column name CopyFrom */ + public static final String COLUMNNAME_CopyFrom = "CopyFrom"; + + /** Set Copy From. + * Copy From Record + */ + public void setCopyFrom (String CopyFrom); + + /** Get Copy From. + * Copy From Record + */ + public String getCopyFrom(); + + /** Column name DateConfirm */ + public static final String COLUMNNAME_DateConfirm = "DateConfirm"; + + /** Set DateConfirm */ + public void setDateConfirm (Timestamp DateConfirm); + + /** Get DateConfirm */ + public Timestamp getDateConfirm(); + + /** Column name DateDelivered */ + public static final String COLUMNNAME_DateDelivered = "DateDelivered"; + + /** Set Date Delivered. + * Date when the product was delivered + */ + public void setDateDelivered (Timestamp DateDelivered); + + /** Get Date Delivered. + * Date when the product was delivered + */ + public Timestamp getDateDelivered(); + + /** Column name DateFinish */ + public static final String COLUMNNAME_DateFinish = "DateFinish"; + + /** Set Finish Date. + * Finish or (planned) completion date + */ + public void setDateFinish (Timestamp DateFinish); + + /** Get Finish Date. + * Finish or (planned) completion date + */ + public Timestamp getDateFinish(); + + /** Column name DateFinishSchedule */ + public static final String COLUMNNAME_DateFinishSchedule = "DateFinishSchedule"; + + /** Set DateFinishSchedule */ + public void setDateFinishSchedule (Timestamp DateFinishSchedule); + + /** Get DateFinishSchedule */ + public Timestamp getDateFinishSchedule(); + + /** Column name DateOrdered */ + public static final String COLUMNNAME_DateOrdered = "DateOrdered"; + + /** Set Date Ordered. + * Date of Order + */ + public void setDateOrdered (Timestamp DateOrdered); + + /** Get Date Ordered. + * Date of Order + */ + public Timestamp getDateOrdered(); + + /** Column name DatePromised */ + public static final String COLUMNNAME_DatePromised = "DatePromised"; + + /** Set Date Promised. + * Date Order was promised + */ + public void setDatePromised (Timestamp DatePromised); + + /** Get Date Promised. + * Date Order was promised + */ + public Timestamp getDatePromised(); + + /** Column name DateStart */ + public static final String COLUMNNAME_DateStart = "DateStart"; + + /** Set DateStart */ + public void setDateStart (Timestamp DateStart); + + /** Get DateStart */ + public Timestamp getDateStart(); + + /** Column name DateStartSchedule */ + public static final String COLUMNNAME_DateStartSchedule = "DateStartSchedule"; + + /** Set DateStartSchedule */ + public void setDateStartSchedule (Timestamp DateStartSchedule); + + /** Get DateStartSchedule */ + public Timestamp getDateStartSchedule(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name DocAction */ + public static final String COLUMNNAME_DocAction = "DocAction"; + + /** Set Document Action. + * The targeted status of the document + */ + public void setDocAction (String DocAction); + + /** Get Document Action. + * The targeted status of the document + */ + public String getDocAction(); + + /** Column name DocStatus */ + public static final String COLUMNNAME_DocStatus = "DocStatus"; + + /** Set Document Status. + * The current status of the document + */ + public void setDocStatus (String DocStatus); + + /** Get Document Status. + * The current status of the document + */ + public String getDocStatus(); + + /** Column name DocumentNo */ + public static final String COLUMNNAME_DocumentNo = "DocumentNo"; + + /** Set Document No. + * Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo); + + /** Get Document No. + * Document sequence number of the document + */ + public String getDocumentNo(); + + /** Column name FloatAfter */ + public static final String COLUMNNAME_FloatAfter = "FloatAfter"; + + /** Set FloatAfter */ + public void setFloatAfter (BigDecimal FloatAfter); + + /** Get FloatAfter */ + public BigDecimal getFloatAfter(); + + /** Column name FloatBefored */ + public static final String COLUMNNAME_FloatBefored = "FloatBefored"; + + /** Set FloatBefored */ + public void setFloatBefored (BigDecimal FloatBefored); + + /** Get FloatBefored */ + public BigDecimal getFloatBefored(); + + /** Column name IsApproved */ + public static final String COLUMNNAME_IsApproved = "IsApproved"; + + /** Set Approved. + * Indicates if this document requires approval + */ + public void setIsApproved (boolean IsApproved); + + /** Get Approved. + * Indicates if this document requires approval + */ + public boolean isApproved(); + + /** Column name IsPrinted */ + public static final String COLUMNNAME_IsPrinted = "IsPrinted"; + + /** Set Printed. + * Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted); + + /** Get Printed. + * Indicates if this document / line is printed + */ + public boolean isPrinted(); + + /** Column name IsQtyPercentage */ + public static final String COLUMNNAME_IsQtyPercentage = "IsQtyPercentage"; + + /** Set Is Qty Percentage. + * Indicate that this component is based in % Quantity + */ + public void setIsQtyPercentage (boolean IsQtyPercentage); + + /** Get Is Qty Percentage. + * Indicate that this component is based in % Quantity + */ + public boolean isQtyPercentage(); + + /** Column name IsSOTrx */ + public static final String COLUMNNAME_IsSOTrx = "IsSOTrx"; + + /** Set Sales Transaction. + * This is a Sales Transaction + */ + public void setIsSOTrx (boolean IsSOTrx); + + /** Get Sales Transaction. + * This is a Sales Transaction + */ + public boolean isSOTrx(); + + /** Column name IsSelected */ + public static final String COLUMNNAME_IsSelected = "IsSelected"; + + /** Set Selected */ + public void setIsSelected (boolean IsSelected); + + /** Get Selected */ + public boolean isSelected(); + + /** Column name Line */ + public static final String COLUMNNAME_Line = "Line"; + + /** Set Line No. + * Unique line for this document + */ + public void setLine (int Line); + + /** Get Line No. + * Unique line for this document + */ + public int getLine(); + + /** Column name Lot */ + public static final String COLUMNNAME_Lot = "Lot"; + + /** Set Lot No. + * Lot number (alphanumeric) + */ + public void setLot (String Lot); + + /** Get Lot No. + * Lot number (alphanumeric) + */ + public String getLot(); + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); + + /** Get Attribute Set Instance. + * Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID(); + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name M_Warehouse_ID */ + public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; + + /** Set Warehouse. + * Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID); + + /** Get Warehouse. + * Storage Warehouse and Service Point + */ + public int getM_Warehouse_ID(); + + public I_M_Warehouse getM_Warehouse() throws Exception; + + /** Column name OrderType */ + public static final String COLUMNNAME_OrderType = "OrderType"; + + /** Set OrderType */ + public void setOrderType (String OrderType); + + /** Get OrderType */ + public String getOrderType(); + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + /** Column name PP_Product_BOM_ID */ + public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; + + /** Set BOM & Formula. + * BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID); + + /** Get BOM & Formula. + * BOM & Formula + */ + public int getPP_Product_BOM_ID(); + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception; + + /** Column name Planner_ID */ + public static final String COLUMNNAME_Planner_ID = "Planner_ID"; + + /** Set Planner */ + public void setPlanner_ID (int Planner_ID); + + /** Get Planner */ + public int getPlanner_ID(); + + /** Column name Posted */ + public static final String COLUMNNAME_Posted = "Posted"; + + /** Set Posted. + * Posting status + */ + public void setPosted (boolean Posted); + + /** Get Posted. + * Posting status + */ + public boolean isPosted(); + + /** Column name PriorityRule */ + public static final String COLUMNNAME_PriorityRule = "PriorityRule"; + + /** Set Priority. + * Priority of a document + */ + public void setPriorityRule (String PriorityRule); + + /** Get Priority. + * Priority of a document + */ + public String getPriorityRule(); + + /** Column name Processed */ + public static final String COLUMNNAME_Processed = "Processed"; + + /** Set Processed. + * The document has been processed + */ + public void setProcessed (boolean Processed); + + /** Get Processed. + * The document has been processed + */ + public boolean isProcessed(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name QtyBatchSize */ + public static final String COLUMNNAME_QtyBatchSize = "QtyBatchSize"; + + /** Set QtyBatchSize */ + public void setQtyBatchSize (BigDecimal QtyBatchSize); + + /** Get QtyBatchSize */ + public BigDecimal getQtyBatchSize(); + + /** Column name QtyBatchs */ + public static final String COLUMNNAME_QtyBatchs = "QtyBatchs"; + + /** Set QtyBatchs */ + public void setQtyBatchs (BigDecimal QtyBatchs); + + /** Get QtyBatchs */ + public BigDecimal getQtyBatchs(); + + /** Column name QtyDelivered */ + public static final String COLUMNNAME_QtyDelivered = "QtyDelivered"; + + /** Set Delivered Quantity. + * Delivered Quantity + */ + public void setQtyDelivered (BigDecimal QtyDelivered); + + /** Get Delivered Quantity. + * Delivered Quantity + */ + public BigDecimal getQtyDelivered(); + + /** Column name QtyEntered */ + public static final String COLUMNNAME_QtyEntered = "QtyEntered"; + + /** Set Quantity. + * The Quantity Entered is based on the selected UoM + */ + public void setQtyEntered (BigDecimal QtyEntered); + + /** Get Quantity. + * The Quantity Entered is based on the selected UoM + */ + public BigDecimal getQtyEntered(); + + /** Column name QtyOrdered */ + public static final String COLUMNNAME_QtyOrdered = "QtyOrdered"; + + /** Set Ordered Quantity. + * Ordered Quantity + */ + public void setQtyOrdered (BigDecimal QtyOrdered); + + /** Get Ordered Quantity. + * Ordered Quantity + */ + public BigDecimal getQtyOrdered(); + + /** Column name QtyReject */ + public static final String COLUMNNAME_QtyReject = "QtyReject"; + + /** Set QtyReject */ + public void setQtyReject (BigDecimal QtyReject); + + /** Get QtyReject */ + public BigDecimal getQtyReject(); + + /** Column name QtyReserved */ + public static final String COLUMNNAME_QtyReserved = "QtyReserved"; + + /** Set Reserved Quantity. + * Reserved Quantity + */ + public void setQtyReserved (BigDecimal QtyReserved); + + /** Get Reserved Quantity. + * Reserved Quantity + */ + public BigDecimal getQtyReserved(); + + /** Column name QtyScrap */ + public static final String COLUMNNAME_QtyScrap = "QtyScrap"; + + /** Set QtyScrap */ + public void setQtyScrap (BigDecimal QtyScrap); + + /** Get QtyScrap */ + public BigDecimal getQtyScrap(); + + /** Column name S_Resource_ID */ + public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; + + /** Set Resource. + * Resource + */ + public void setS_Resource_ID (int S_Resource_ID); + + /** Get Resource. + * Resource + */ + public int getS_Resource_ID(); + + public I_S_Resource getS_Resource() throws Exception; + + /** Column name ScheduleType */ + public static final String COLUMNNAME_ScheduleType = "ScheduleType"; + + /** Set Schedule Type. + * Type of schedule + */ + public void setScheduleType (String ScheduleType); + + /** Get Schedule Type. + * Type of schedule + */ + public String getScheduleType(); + + /** Column name SerNo */ + public static final String COLUMNNAME_SerNo = "SerNo"; + + /** Set Serial No. + * Product Serial Number + */ + public void setSerNo (String SerNo); + + /** Get Serial No. + * Product Serial Number + */ + public String getSerNo(); + + /** Column name User1_ID */ + public static final String COLUMNNAME_User1_ID = "User1_ID"; + + /** Set User List 1. + * User defined list element #1 + */ + public void setUser1_ID (int User1_ID); + + /** Get User List 1. + * User defined list element #1 + */ + public int getUser1_ID(); + + /** Column name User2_ID */ + public static final String COLUMNNAME_User2_ID = "User2_ID"; + + /** Set User List 2. + * User defined list element #2 + */ + public void setUser2_ID (int User2_ID); + + /** Get User List 2. + * User defined list element #2 + */ + public int getUser2_ID(); + + /** Column name Yield */ + public static final String COLUMNNAME_Yield = "Yield"; + + /** Set Yield */ + public void setYield (BigDecimal Yield); + + /** Get Yield */ + public BigDecimal getYield(); +} diff --git a/base/src/org/eevolution/model/I_PP_Order_BOM.java b/base/src/org/eevolution/model/I_PP_Order_BOM.java new file mode 100644 index 0000000000..64fc1e4bac --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Order_BOM.java @@ -0,0 +1,286 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Order_BOM + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Order_BOM +{ + + /** TableName=PP_Order_BOM */ + public static final String Table_Name = "PP_Order_BOM"; + + /** AD_Table_ID=53026 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name BOMType */ + public static final String COLUMNNAME_BOMType = "BOMType"; + + /** Set BOM Type. + * Type of BOM + */ + public void setBOMType (String BOMType); + + /** Get BOM Type. + * Type of BOM + */ + public String getBOMType(); + + /** Column name BOMUse */ + public static final String COLUMNNAME_BOMUse = "BOMUse"; + + /** Set BOM Use. + * The use of the Bill of Material + */ + public void setBOMUse (String BOMUse); + + /** Get BOM Use. + * The use of the Bill of Material + */ + public String getBOMUse(); + + /** Column name C_UOM_ID */ + public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; + + /** Set UOM. + * Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID); + + /** Get UOM. + * Unit of Measure + */ + public int getC_UOM_ID(); + + public I_C_UOM getC_UOM() throws Exception; + + /** Column name CopyFrom */ + public static final String COLUMNNAME_CopyFrom = "CopyFrom"; + + /** Set Copy From. + * Copy From Record + */ + public void setCopyFrom (String CopyFrom); + + /** Get Copy From. + * Copy From Record + */ + public String getCopyFrom(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name DocumentNo */ + public static final String COLUMNNAME_DocumentNo = "DocumentNo"; + + /** Set Document No. + * Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo); + + /** Get Document No. + * Document sequence number of the document + */ + public String getDocumentNo(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); + + /** Get Attribute Set Instance. + * Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID(); + + /** Column name M_ChangeNotice_ID */ + public static final String COLUMNNAME_M_ChangeNotice_ID = "M_ChangeNotice_ID"; + + /** Set Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID); + + /** Get Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID(); + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception; + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name PP_Order_BOM_ID */ + public static final String COLUMNNAME_PP_Order_BOM_ID = "PP_Order_BOM_ID"; + + /** Set PP_Order_BOM_ID */ + public void setPP_Order_BOM_ID (int PP_Order_BOM_ID); + + /** Get PP_Order_BOM_ID */ + public int getPP_Order_BOM_ID(); + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name Revision */ + public static final String COLUMNNAME_Revision = "Revision"; + + /** Set Revision */ + public void setRevision (String Revision); + + /** Get Revision */ + public String getRevision(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_PP_Order_BOMLine.java b/base/src/org/eevolution/model/I_PP_Order_BOMLine.java new file mode 100644 index 0000000000..b84c5b2c18 --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Order_BOMLine.java @@ -0,0 +1,499 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Order_BOMLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Order_BOMLine +{ + + /** TableName=PP_Order_BOMLine */ + public static final String Table_Name = "PP_Order_BOMLine"; + + /** AD_Table_ID=53025 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name Assay */ + public static final String COLUMNNAME_Assay = "Assay"; + + /** Set Quantity Assay. + * Indicated the Quantity Assay to use into Quality Order + */ + public void setAssay (BigDecimal Assay); + + /** Get Quantity Assay. + * Indicated the Quantity Assay to use into Quality Order + */ + public BigDecimal getAssay(); + + /** Column name BackflushGroup */ + public static final String COLUMNNAME_BackflushGroup = "BackflushGroup"; + + /** Set Backflush Group. + * The Grouping Components to the Backflush + */ + public void setBackflushGroup (String BackflushGroup); + + /** Get Backflush Group. + * The Grouping Components to the Backflush + */ + public String getBackflushGroup(); + + /** Column name C_UOM_ID */ + public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; + + /** Set UOM. + * Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID); + + /** Get UOM. + * Unit of Measure + */ + public int getC_UOM_ID(); + + public I_C_UOM getC_UOM() throws Exception; + + /** Column name ComponentType */ + public static final String COLUMNNAME_ComponentType = "ComponentType"; + + /** Set Component Type. + * Component Type for a Bill of Material or Formula + */ + public void setComponentType (String ComponentType); + + /** Get Component Type. + * Component Type for a Bill of Material or Formula + */ + public String getComponentType(); + + /** Column name DateDelivered */ + public static final String COLUMNNAME_DateDelivered = "DateDelivered"; + + /** Set Date Delivered. + * Date when the product was delivered + */ + public void setDateDelivered (Timestamp DateDelivered); + + /** Get Date Delivered. + * Date when the product was delivered + */ + public Timestamp getDateDelivered(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Feature */ + public static final String COLUMNNAME_Feature = "Feature"; + + /** Set Feature. + * Indicated the Feature for Product Configure + */ + public void setFeature (String Feature); + + /** Get Feature. + * Indicated the Feature for Product Configure + */ + public String getFeature(); + + /** Column name Forecast */ + public static final String COLUMNNAME_Forecast = "Forecast"; + + /** Set Forecast. + * Indicated the % of participation this component into a of the BOM Planning + */ + public void setForecast (BigDecimal Forecast); + + /** Get Forecast. + * Indicated the % of participation this component into a of the BOM Planning + */ + public BigDecimal getForecast(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsCritical */ + public static final String COLUMNNAME_IsCritical = "IsCritical"; + + /** Set Is Critical Component. + * Indicate that a Manufacturing Order can not begin without have this component + */ + public void setIsCritical (boolean IsCritical); + + /** Get Is Critical Component. + * Indicate that a Manufacturing Order can not begin without have this component + */ + public boolean isCritical(); + + /** Column name IsQtyPercentage */ + public static final String COLUMNNAME_IsQtyPercentage = "IsQtyPercentage"; + + /** Set Is Qty Percentage. + * Indicate that this component is based in % Quantity + */ + public void setIsQtyPercentage (boolean IsQtyPercentage); + + /** Get Is Qty Percentage. + * Indicate that this component is based in % Quantity + */ + public boolean isQtyPercentage(); + + /** Column name IssueMethod */ + public static final String COLUMNNAME_IssueMethod = "IssueMethod"; + + /** Set Issue Method. + * There are two methods for issue the components to Manufacturing Order + */ + public void setIssueMethod (String IssueMethod); + + /** Get Issue Method. + * There are two methods for issue the components to Manufacturing Order + */ + public String getIssueMethod(); + + /** Column name LeadTimeOffset */ + public static final String COLUMNNAME_LeadTimeOffset = "LeadTimeOffset"; + + /** Set Lead Time Offset. + * Optional Lead Time offest before starting production + */ + public void setLeadTimeOffset (int LeadTimeOffset); + + /** Get Lead Time Offset. + * Optional Lead Time offest before starting production + */ + public int getLeadTimeOffset(); + + /** Column name Line */ + public static final String COLUMNNAME_Line = "Line"; + + /** Set Line No. + * Unique line for this document + */ + public void setLine (int Line); + + /** Get Line No. + * Unique line for this document + */ + public int getLine(); + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); + + /** Get Attribute Set Instance. + * Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID(); + + /** Column name M_ChangeNotice_ID */ + public static final String COLUMNNAME_M_ChangeNotice_ID = "M_ChangeNotice_ID"; + + /** Set Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID); + + /** Get Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID(); + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception; + + /** Column name M_Locator_ID */ + public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID"; + + /** Set Locator. + * Warehouse Locator + */ + public void setM_Locator_ID (int M_Locator_ID); + + /** Get Locator. + * Warehouse Locator + */ + public int getM_Locator_ID(); + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name M_Warehouse_ID */ + public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; + + /** Set Warehouse. + * Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID); + + /** Get Warehouse. + * Storage Warehouse and Service Point + */ + public int getM_Warehouse_ID(); + + public I_M_Warehouse getM_Warehouse() throws Exception; + + /** Column name PP_Order_BOMLine_ID */ + public static final String COLUMNNAME_PP_Order_BOMLine_ID = "PP_Order_BOMLine_ID"; + + /** Set PP_Order_BOMLine_ID */ + public void setPP_Order_BOMLine_ID (int PP_Order_BOMLine_ID); + + /** Get PP_Order_BOMLine_ID */ + public int getPP_Order_BOMLine_ID(); + + /** Column name PP_Order_BOM_ID */ + public static final String COLUMNNAME_PP_Order_BOM_ID = "PP_Order_BOM_ID"; + + /** Set PP_Order_BOM_ID */ + public void setPP_Order_BOM_ID (int PP_Order_BOM_ID); + + /** Get PP_Order_BOM_ID */ + public int getPP_Order_BOM_ID(); + + public org.eevolution.model.I_PP_Order_BOM getPP_Order_BOM() throws Exception; + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name QtyBOM */ + public static final String COLUMNNAME_QtyBOM = "QtyBOM"; + + /** Set Quantity. + * Indicate the Quantity use in this BOM + */ + public void setQtyBOM (BigDecimal QtyBOM); + + /** Get Quantity. + * Indicate the Quantity use in this BOM + */ + public BigDecimal getQtyBOM(); + + /** Column name QtyBatch */ + public static final String COLUMNNAME_QtyBatch = "QtyBatch"; + + /** Set Quantity %. + * Indicate the Quantity % use in this Formula + */ + public void setQtyBatch (BigDecimal QtyBatch); + + /** Get Quantity %. + * Indicate the Quantity % use in this Formula + */ + public BigDecimal getQtyBatch(); + + /** Column name QtyDelivered */ + public static final String COLUMNNAME_QtyDelivered = "QtyDelivered"; + + /** Set Delivered Quantity. + * Delivered Quantity + */ + public void setQtyDelivered (BigDecimal QtyDelivered); + + /** Get Delivered Quantity. + * Delivered Quantity + */ + public BigDecimal getQtyDelivered(); + + /** Column name QtyEntered */ + public static final String COLUMNNAME_QtyEntered = "QtyEntered"; + + /** Set Quantity. + * The Quantity Entered is based on the selected UoM + */ + public void setQtyEntered (BigDecimal QtyEntered); + + /** Get Quantity. + * The Quantity Entered is based on the selected UoM + */ + public BigDecimal getQtyEntered(); + + /** Column name QtyPost */ + public static final String COLUMNNAME_QtyPost = "QtyPost"; + + /** Set QtyPost */ + public void setQtyPost (BigDecimal QtyPost); + + /** Get QtyPost */ + public BigDecimal getQtyPost(); + + /** Column name QtyReject */ + public static final String COLUMNNAME_QtyReject = "QtyReject"; + + /** Set QtyReject */ + public void setQtyReject (BigDecimal QtyReject); + + /** Get QtyReject */ + public BigDecimal getQtyReject(); + + /** Column name QtyRequiered */ + public static final String COLUMNNAME_QtyRequiered = "QtyRequiered"; + + /** Set QtyRequiered */ + public void setQtyRequiered (BigDecimal QtyRequiered); + + /** Get QtyRequiered */ + public BigDecimal getQtyRequiered(); + + /** Column name QtyReserved */ + public static final String COLUMNNAME_QtyReserved = "QtyReserved"; + + /** Set Reserved Quantity. + * Reserved Quantity + */ + public void setQtyReserved (BigDecimal QtyReserved); + + /** Get Reserved Quantity. + * Reserved Quantity + */ + public BigDecimal getQtyReserved(); + + /** Column name QtyScrap */ + public static final String COLUMNNAME_QtyScrap = "QtyScrap"; + + /** Set QtyScrap */ + public void setQtyScrap (BigDecimal QtyScrap); + + /** Get QtyScrap */ + public BigDecimal getQtyScrap(); + + /** Column name Scrap */ + public static final String COLUMNNAME_Scrap = "Scrap"; + + /** Set Scrap. + * Indicate the Scrap Quantity that is generate in a manufacturing process + */ + public void setScrap (BigDecimal Scrap); + + /** Get Scrap. + * Indicate the Scrap Quantity that is generate in a manufacturing process + */ + public BigDecimal getScrap(); + + /** Column name UserID */ + public static final String COLUMNNAME_UserID = "UserID"; + + /** Set User ID. + * User ID or account number + */ + public void setUserID (int UserID); + + /** Get User ID. + * User ID or account number + */ + public int getUserID(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); +} diff --git a/base/src/org/eevolution/model/I_PP_Order_BOMLineMA.java b/base/src/org/eevolution/model/I_PP_Order_BOMLineMA.java new file mode 100644 index 0000000000..a6f59397d6 --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Order_BOMLineMA.java @@ -0,0 +1,105 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Order_BOMLineMA + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Order_BOMLineMA +{ + + /** TableName=PP_Order_BOMLineMA */ + public static final String Table_Name = "PP_Order_BOMLineMA"; + + /** AD_Table_ID=53062 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); + + /** Get Attribute Set Instance. + * Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID(); + + /** Column name MovementQty */ + public static final String COLUMNNAME_MovementQty = "MovementQty"; + + /** Set Movement Quantity. + * Quantity of a product moved. + */ + public void setMovementQty (BigDecimal MovementQty); + + /** Get Movement Quantity. + * Quantity of a product moved. + */ + public BigDecimal getMovementQty(); + + /** Column name PP_Order_BOMLineMA_ID */ + public static final String COLUMNNAME_PP_Order_BOMLineMA_ID = "PP_Order_BOMLineMA_ID"; + + /** Set PP_Order_BOMLineMA_ID */ + public void setPP_Order_BOMLineMA_ID (int PP_Order_BOMLineMA_ID); + + /** Get PP_Order_BOMLineMA_ID */ + public int getPP_Order_BOMLineMA_ID(); + + /** Column name PP_Order_BOMLine_ID */ + public static final String COLUMNNAME_PP_Order_BOMLine_ID = "PP_Order_BOMLine_ID"; + + /** Set PP_Order_BOMLine_ID */ + public void setPP_Order_BOMLine_ID (int PP_Order_BOMLine_ID); + + /** Get PP_Order_BOMLine_ID */ + public int getPP_Order_BOMLine_ID(); + + public org.eevolution.model.I_PP_Order_BOMLine getPP_Order_BOMLine() throws Exception; +} diff --git a/base/src/org/eevolution/model/I_PP_Order_Cost.java b/base/src/org/eevolution/model/I_PP_Order_Cost.java new file mode 100644 index 0000000000..3ef7268989 --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Order_Cost.java @@ -0,0 +1,259 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Order_Cost + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Order_Cost +{ + + /** TableName=PP_Order_Cost */ + public static final String Table_Name = "PP_Order_Cost"; + + /** AD_Table_ID=53024 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_Workflow_ID */ + public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID"; + + /** Set Workflow. + * Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID); + + /** Get Workflow. + * Workflow or combination of tasks + */ + public int getAD_Workflow_ID(); + + public I_AD_Workflow getAD_Workflow() throws Exception; + + /** Column name C_AcctSchema_ID */ + public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID"; + + /** Set Accounting Schema. + * Rules for accounting + */ + public void setC_AcctSchema_ID (int C_AcctSchema_ID); + + /** Get Accounting Schema. + * Rules for accounting + */ + public int getC_AcctSchema_ID(); + + public I_C_AcctSchema getC_AcctSchema() throws Exception; + + /** Column name CostingMethod */ + public static final String COLUMNNAME_CostingMethod = "CostingMethod"; + + /** Set Costing Method. + * Indicates how Costs will be calculated + */ + public void setCostingMethod (String CostingMethod); + + /** Get Costing Method. + * Indicates how Costs will be calculated + */ + public String getCostingMethod(); + + /** Column name CumulatedAmt */ + public static final String COLUMNNAME_CumulatedAmt = "CumulatedAmt"; + + /** Set Accumulated Amt. + * Total Amount + */ + public void setCumulatedAmt (BigDecimal CumulatedAmt); + + /** Get Accumulated Amt. + * Total Amount + */ + public BigDecimal getCumulatedAmt(); + + /** Column name CumulatedAmtPost */ + public static final String COLUMNNAME_CumulatedAmtPost = "CumulatedAmtPost"; + + /** Set CumulatedAmtPost */ + public void setCumulatedAmtPost (BigDecimal CumulatedAmtPost); + + /** Get CumulatedAmtPost */ + public BigDecimal getCumulatedAmtPost(); + + /** Column name CumulatedQty */ + public static final String COLUMNNAME_CumulatedQty = "CumulatedQty"; + + /** Set Accumulated Qty. + * Total Quantity + */ + public void setCumulatedQty (BigDecimal CumulatedQty); + + /** Get Accumulated Qty. + * Total Quantity + */ + public BigDecimal getCumulatedQty(); + + /** Column name CumulatedQtyPost */ + public static final String COLUMNNAME_CumulatedQtyPost = "CumulatedQtyPost"; + + /** Set CumulatedQtyPost */ + public void setCumulatedQtyPost (BigDecimal CumulatedQtyPost); + + /** Get CumulatedQtyPost */ + public BigDecimal getCumulatedQtyPost(); + + /** Column name CurrentCostPrice */ + public static final String COLUMNNAME_CurrentCostPrice = "CurrentCostPrice"; + + /** Set Current Cost Price. + * The currently used cost price + */ + public void setCurrentCostPrice (BigDecimal CurrentCostPrice); + + /** Get Current Cost Price. + * The currently used cost price + */ + public BigDecimal getCurrentCostPrice(); + + /** Column name CurrentCostPriceLL */ + public static final String COLUMNNAME_CurrentCostPriceLL = "CurrentCostPriceLL"; + + /** Set CurrentCostPriceLL */ + public void setCurrentCostPriceLL (BigDecimal CurrentCostPriceLL); + + /** Get CurrentCostPriceLL */ + public BigDecimal getCurrentCostPriceLL(); + + /** Column name CurrentQty */ + public static final String COLUMNNAME_CurrentQty = "CurrentQty"; + + /** Set Current Quantity. + * Current Quantity + */ + public void setCurrentQty (BigDecimal CurrentQty); + + /** Get Current Quantity. + * Current Quantity + */ + public BigDecimal getCurrentQty(); + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); + + /** Get Attribute Set Instance. + * Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID(); + + /** Column name M_CostElement_ID */ + public static final String COLUMNNAME_M_CostElement_ID = "M_CostElement_ID"; + + /** Set Cost Element. + * Product Cost Element + */ + public void setM_CostElement_ID (int M_CostElement_ID); + + /** Get Cost Element. + * Product Cost Element + */ + public int getM_CostElement_ID(); + + public I_M_CostElement getM_CostElement() throws Exception; + + /** Column name M_CostType_ID */ + public static final String COLUMNNAME_M_CostType_ID = "M_CostType_ID"; + + /** Set Cost Type. + * Type of Cost (e.g. Current, Plan, Future) + */ + public void setM_CostType_ID (int M_CostType_ID); + + /** Get Cost Type. + * Type of Cost (e.g. Current, Plan, Future) + */ + public int getM_CostType_ID(); + + public I_M_CostType getM_CostType() throws Exception; + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name PP_Order_Cost_ID */ + public static final String COLUMNNAME_PP_Order_Cost_ID = "PP_Order_Cost_ID"; + + /** Set PP_Order_Cost_ID */ + public void setPP_Order_Cost_ID (int PP_Order_Cost_ID); + + /** Get PP_Order_Cost_ID */ + public int getPP_Order_Cost_ID(); + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; +} diff --git a/base/src/org/compiere/model/I_AD_WF_Node.java b/base/src/org/eevolution/model/I_PP_Order_Node.java similarity index 62% rename from base/src/org/compiere/model/I_AD_WF_Node.java rename to base/src/org/eevolution/model/I_PP_Order_Node.java index d85e98f10e..6e6f830c07 100644 --- a/base/src/org/compiere/model/I_AD_WF_Node.java +++ b/base/src/org/eevolution/model/I_PP_Order_Node.java @@ -30,29 +30,31 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for AD_WF_Node +/** Generated Interface for PP_Order_Node * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_AD_WF_Node +public interface I_PP_Order_Node { - /** TableName=AD_WF_Node */ - public static final String Table_Name = "AD_WF_Node"; + /** TableName=PP_Order_Node */ + public static final String Table_Name = "PP_Order_Node"; - /** AD_Table_ID=129 */ + /** AD_Table_ID=53022 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - /** AccessLevel = 6 - System - Client + /** AccessLevel = 3 - Client - Org */ - BigDecimal accessLevel = BigDecimal.valueOf(6); + BigDecimal accessLevel = BigDecimal.valueOf(3); /** Load Meta Data */ @@ -159,6 +161,8 @@ public interface I_AD_WF_Node */ public int getAD_WF_Node_ID(); + public I_AD_WF_Node getAD_WF_Node() throws Exception; + /** Column name AD_WF_Responsible_ID */ public static final String COLUMNNAME_AD_WF_Responsible_ID = "AD_WF_Responsible_ID"; @@ -243,6 +247,21 @@ public interface I_AD_WF_Node */ public String getAttributeValue(); + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws Exception; + /** Column name Cost */ public static final String COLUMNNAME_Cost = "Cost"; @@ -256,6 +275,46 @@ public interface I_AD_WF_Node */ public BigDecimal getCost(); + /** Column name DateFinish */ + public static final String COLUMNNAME_DateFinish = "DateFinish"; + + /** Set Finish Date. + * Finish or (planned) completion date + */ + public void setDateFinish (Timestamp DateFinish); + + /** Get Finish Date. + * Finish or (planned) completion date + */ + public Timestamp getDateFinish(); + + /** Column name DateFinishSchedule */ + public static final String COLUMNNAME_DateFinishSchedule = "DateFinishSchedule"; + + /** Set DateFinishSchedule */ + public void setDateFinishSchedule (Timestamp DateFinishSchedule); + + /** Get DateFinishSchedule */ + public Timestamp getDateFinishSchedule(); + + /** Column name DateStart */ + public static final String COLUMNNAME_DateStart = "DateStart"; + + /** Set DateStart */ + public void setDateStart (Timestamp DateStart); + + /** Get DateStart */ + public Timestamp getDateStart(); + + /** Column name DateStartSchedule */ + public static final String COLUMNNAME_DateStartSchedule = "DateStartSchedule"; + + /** Set DateStartSchedule */ + public void setDateStartSchedule (Timestamp DateStartSchedule); + + /** Get DateStartSchedule */ + public Timestamp getDateStartSchedule(); + /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; @@ -282,6 +341,19 @@ public interface I_AD_WF_Node */ public String getDocAction(); + /** Column name DocStatus */ + public static final String COLUMNNAME_DocStatus = "DocStatus"; + + /** Set Document Status. + * The current status of the document + */ + public void setDocStatus (String DocStatus); + + /** Get Document Status. + * The current status of the document + */ + public String getDocStatus(); + /** Column name Duration */ public static final String COLUMNNAME_Duration = "Duration"; @@ -295,57 +367,23 @@ public interface I_AD_WF_Node */ public int getDuration(); - /** Column name DynPriorityChange */ - public static final String COLUMNNAME_DynPriorityChange = "DynPriorityChange"; + /** Column name DurationReal */ + public static final String COLUMNNAME_DurationReal = "DurationReal"; - /** Set Dynamic Priority Change. - * Change of priority when Activity is suspended waiting for user - */ - public void setDynPriorityChange (BigDecimal DynPriorityChange); + /** Set DurationReal */ + public void setDurationReal (int DurationReal); - /** Get Dynamic Priority Change. - * Change of priority when Activity is suspended waiting for user - */ - public BigDecimal getDynPriorityChange(); + /** Get DurationReal */ + public int getDurationReal(); - /** Column name DynPriorityUnit */ - public static final String COLUMNNAME_DynPriorityUnit = "DynPriorityUnit"; + /** Column name DurationRequiered */ + public static final String COLUMNNAME_DurationRequiered = "DurationRequiered"; - /** Set Dynamic Priority Unit. - * Change of priority when Activity is suspended waiting for user - */ - public void setDynPriorityUnit (String DynPriorityUnit); + /** Set DurationRequiered */ + public void setDurationRequiered (int DurationRequiered); - /** Get Dynamic Priority Unit. - * Change of priority when Activity is suspended waiting for user - */ - public String getDynPriorityUnit(); - - /** Column name EMail */ - public static final String COLUMNNAME_EMail = "EMail"; - - /** Set EMail Address. - * Electronic Mail Address - */ - public void setEMail (String EMail); - - /** Get EMail Address. - * Electronic Mail Address - */ - public String getEMail(); - - /** Column name EMailRecipient */ - public static final String COLUMNNAME_EMailRecipient = "EMailRecipient"; - - /** Set EMail Recipient. - * Recipient of the EMail - */ - public void setEMailRecipient (String EMailRecipient); - - /** Get EMail Recipient. - * Recipient of the EMail - */ - public String getEMailRecipient(); + /** Get DurationRequiered */ + public int getDurationRequiered(); /** Column name EntityType */ public static final String COLUMNNAME_EntityType = "EntityType"; @@ -401,6 +439,24 @@ public interface I_AD_WF_Node */ public boolean isCentrallyMaintained(); + /** Column name IsMilestone */ + public static final String COLUMNNAME_IsMilestone = "IsMilestone"; + + /** Set IsMilestone */ + public void setIsMilestone (boolean IsMilestone); + + /** Get IsMilestone */ + public boolean isMilestone(); + + /** Column name IsSubcontracting */ + public static final String COLUMNNAME_IsSubcontracting = "IsSubcontracting"; + + /** Set IsSubcontracting */ + public void setIsSubcontracting (boolean IsSubcontracting); + + /** Get IsSubcontracting */ + public boolean isSubcontracting(); + /** Column name JoinElement */ public static final String COLUMNNAME_JoinElement = "JoinElement"; @@ -427,6 +483,15 @@ public interface I_AD_WF_Node */ public int getLimit(); + /** Column name MovingTime */ + public static final String COLUMNNAME_MovingTime = "MovingTime"; + + /** Set MovingTime */ + public void setMovingTime (int MovingTime); + + /** Get MovingTime */ + public int getMovingTime(); + /** Column name Name */ public static final String COLUMNNAME_Name = "Name"; @@ -440,6 +505,46 @@ public interface I_AD_WF_Node */ public String getName(); + /** Column name OverlapUnits */ + public static final String COLUMNNAME_OverlapUnits = "OverlapUnits"; + + /** Set OverlapUnits */ + public void setOverlapUnits (int OverlapUnits); + + /** Get OverlapUnits */ + public int getOverlapUnits(); + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name PP_Order_Node_ID */ + public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID"; + + /** Set PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID); + + /** Get PP_Order_Node_ID */ + public int getPP_Order_Node_ID(); + + /** Column name PP_Order_Workflow_ID */ + public static final String COLUMNNAME_PP_Order_Workflow_ID = "PP_Order_Workflow_ID"; + + /** Set PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID); + + /** Get PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID(); + + public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception; + /** Column name Priority */ public static final String COLUMNNAME_Priority = "Priority"; @@ -453,20 +558,100 @@ public interface I_AD_WF_Node */ public int getPriority(); - /** Column name R_MailText_ID */ - public static final String COLUMNNAME_R_MailText_ID = "R_MailText_ID"; + /** Column name QtyDelivered */ + public static final String COLUMNNAME_QtyDelivered = "QtyDelivered"; - /** Set Mail Template. - * Text templates for mailings + /** Set Delivered Quantity. + * Delivered Quantity */ - public void setR_MailText_ID (int R_MailText_ID); + public void setQtyDelivered (BigDecimal QtyDelivered); - /** Get Mail Template. - * Text templates for mailings + /** Get Delivered Quantity. + * Delivered Quantity */ - public int getR_MailText_ID(); + public BigDecimal getQtyDelivered(); - public I_R_MailText getR_MailText() throws Exception; + /** Column name QtyReject */ + public static final String COLUMNNAME_QtyReject = "QtyReject"; + + /** Set QtyReject */ + public void setQtyReject (BigDecimal QtyReject); + + /** Get QtyReject */ + public BigDecimal getQtyReject(); + + /** Column name QtyRequiered */ + public static final String COLUMNNAME_QtyRequiered = "QtyRequiered"; + + /** Set QtyRequiered */ + public void setQtyRequiered (BigDecimal QtyRequiered); + + /** Get QtyRequiered */ + public BigDecimal getQtyRequiered(); + + /** Column name QtyScrap */ + public static final String COLUMNNAME_QtyScrap = "QtyScrap"; + + /** Set QtyScrap */ + public void setQtyScrap (BigDecimal QtyScrap); + + /** Get QtyScrap */ + public BigDecimal getQtyScrap(); + + /** Column name QueuingTime */ + public static final String COLUMNNAME_QueuingTime = "QueuingTime"; + + /** Set QueuingTime */ + public void setQueuingTime (int QueuingTime); + + /** Get QueuingTime */ + public int getQueuingTime(); + + /** Column name S_Resource_ID */ + public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; + + /** Set Resource. + * Resource + */ + public void setS_Resource_ID (int S_Resource_ID); + + /** Get Resource. + * Resource + */ + public int getS_Resource_ID(); + + public I_S_Resource getS_Resource() throws Exception; + + /** Column name SetupTime */ + public static final String COLUMNNAME_SetupTime = "SetupTime"; + + /** Set Setup Time. + * Setup time before starting Production + */ + public void setSetupTime (int SetupTime); + + /** Get Setup Time. + * Setup time before starting Production + */ + public int getSetupTime(); + + /** Column name SetupTimeReal */ + public static final String COLUMNNAME_SetupTimeReal = "SetupTimeReal"; + + /** Set SetupTimeReal */ + public void setSetupTimeReal (int SetupTimeReal); + + /** Get SetupTimeReal */ + public int getSetupTimeReal(); + + /** Column name SetupTimeRequiered */ + public static final String COLUMNNAME_SetupTimeRequiered = "SetupTimeRequiered"; + + /** Set SetupTimeRequiered */ + public void setSetupTimeRequiered (int SetupTimeRequiered); + + /** Get SetupTimeRequiered */ + public int getSetupTimeRequiered(); /** Column name SplitElement */ public static final String COLUMNNAME_SplitElement = "SplitElement"; @@ -507,6 +692,41 @@ public interface I_AD_WF_Node */ public String getSubflowExecution(); + /** Column name UnitsCycles */ + public static final String COLUMNNAME_UnitsCycles = "UnitsCycles"; + + /** Set UnitsCycles */ + public void setUnitsCycles (int UnitsCycles); + + /** Get UnitsCycles */ + public int getUnitsCycles(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + /** Column name Value */ public static final String COLUMNNAME_Value = "Value"; @@ -520,19 +740,6 @@ public interface I_AD_WF_Node */ public String getValue(); - /** Column name WaitTime */ - public static final String COLUMNNAME_WaitTime = "WaitTime"; - - /** Set Wait Time. - * Time in minutes to wait (sleep) - */ - public void setWaitTime (int WaitTime); - - /** Get Wait Time. - * Time in minutes to wait (sleep) - */ - public int getWaitTime(); - /** Column name WaitingTime */ public static final String COLUMNNAME_WaitingTime = "WaitingTime"; diff --git a/base/src/org/eevolution/model/I_PP_Order_NodeNext.java b/base/src/org/eevolution/model/I_PP_Order_NodeNext.java new file mode 100644 index 0000000000..cdf33e05f3 --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Order_NodeNext.java @@ -0,0 +1,196 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Order_NodeNext + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Order_NodeNext +{ + + /** TableName=PP_Order_NodeNext */ + public static final String Table_Name = "PP_Order_NodeNext"; + + /** AD_Table_ID=53023 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_WF_Next_ID */ + public static final String COLUMNNAME_AD_WF_Next_ID = "AD_WF_Next_ID"; + + /** Set Next Node. + * Next Node in workflow + */ + public void setAD_WF_Next_ID (int AD_WF_Next_ID); + + /** Get Next Node. + * Next Node in workflow + */ + public int getAD_WF_Next_ID(); + + /** Column name AD_WF_Node_ID */ + public static final String COLUMNNAME_AD_WF_Node_ID = "AD_WF_Node_ID"; + + /** Set Node. + * Workflow Node (activity), step or process + */ + public void setAD_WF_Node_ID (int AD_WF_Node_ID); + + /** Get Node. + * Workflow Node (activity), step or process + */ + public int getAD_WF_Node_ID(); + + public I_AD_WF_Node getAD_WF_Node() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name EntityType */ + public static final String COLUMNNAME_EntityType = "EntityType"; + + /** Set Entity Type. + * Dictionary Entity Type; + Determines ownership and synchronization + */ + public void setEntityType (String EntityType); + + /** Get Entity Type. + * Dictionary Entity Type; + Determines ownership and synchronization + */ + public String getEntityType(); + + /** Column name IsStdUserWorkflow */ + public static final String COLUMNNAME_IsStdUserWorkflow = "IsStdUserWorkflow"; + + /** Set Std User Workflow. + * Standard Manual User Approval Workflow + */ + public void setIsStdUserWorkflow (boolean IsStdUserWorkflow); + + /** Get Std User Workflow. + * Standard Manual User Approval Workflow + */ + public boolean isStdUserWorkflow(); + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name PP_Order_Next_ID */ + public static final String COLUMNNAME_PP_Order_Next_ID = "PP_Order_Next_ID"; + + /** Set PP_Order_Next_ID */ + public void setPP_Order_Next_ID (int PP_Order_Next_ID); + + /** Get PP_Order_Next_ID */ + public int getPP_Order_Next_ID(); + + /** Column name PP_Order_NodeNext_ID */ + public static final String COLUMNNAME_PP_Order_NodeNext_ID = "PP_Order_NodeNext_ID"; + + /** Set PP_Order_NodeNext_ID */ + public void setPP_Order_NodeNext_ID (int PP_Order_NodeNext_ID); + + /** Get PP_Order_NodeNext_ID */ + public int getPP_Order_NodeNext_ID(); + + /** Column name PP_Order_Node_ID */ + public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID"; + + /** Set PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID); + + /** Get PP_Order_Node_ID */ + public int getPP_Order_Node_ID(); + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception; + + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; + + /** Set Sequence. + * Method of ordering records; + lowest number comes first + */ + public void setSeqNo (int SeqNo); + + /** Get Sequence. + * Method of ordering records; + lowest number comes first + */ + public int getSeqNo(); + + /** Column name TransitionCode */ + public static final String COLUMNNAME_TransitionCode = "TransitionCode"; + + /** Set Transition Code. + * Code resulting in TRUE of FALSE + */ + public void setTransitionCode (String TransitionCode); + + /** Get Transition Code. + * Code resulting in TRUE of FALSE + */ + public String getTransitionCode(); +} diff --git a/base/src/org/eevolution/model/I_PP_Order_Node_Asset.java b/base/src/org/eevolution/model/I_PP_Order_Node_Asset.java new file mode 100644 index 0000000000..05d887e0af --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Order_Node_Asset.java @@ -0,0 +1,116 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Order_Node_Asset + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Order_Node_Asset +{ + + /** TableName=PP_Order_Node_Asset */ + public static final String Table_Name = "PP_Order_Node_Asset"; + + /** AD_Table_ID=53031 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name A_Asset_ID */ + public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID"; + + /** Set Asset. + * Asset used internally or by customers + */ + public void setA_Asset_ID (int A_Asset_ID); + + /** Get Asset. + * Asset used internally or by customers + */ + public int getA_Asset_ID(); + + public I_A_Asset getA_Asset() throws Exception; + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name PP_Order_Node_Asset_ID */ + public static final String COLUMNNAME_PP_Order_Node_Asset_ID = "PP_Order_Node_Asset_ID"; + + /** Set PP_Order_Node_Asset_ID */ + public void setPP_Order_Node_Asset_ID (int PP_Order_Node_Asset_ID); + + /** Get PP_Order_Node_Asset_ID */ + public int getPP_Order_Node_Asset_ID(); + + /** Column name PP_Order_Node_ID */ + public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID"; + + /** Set PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID); + + /** Get PP_Order_Node_ID */ + public int getPP_Order_Node_ID(); + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception; + + /** Column name PP_Order_Workflow_ID */ + public static final String COLUMNNAME_PP_Order_Workflow_ID = "PP_Order_Workflow_ID"; + + /** Set PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID); + + /** Get PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID(); + + public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception; +} diff --git a/base/src/org/eevolution/model/I_PP_Order_Node_Product.java b/base/src/org/eevolution/model/I_PP_Order_Node_Product.java new file mode 100644 index 0000000000..ef2d4c575f --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Order_Node_Product.java @@ -0,0 +1,125 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Order_Node_Product + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Order_Node_Product +{ + + /** TableName=PP_Order_Node_Product */ + public static final String Table_Name = "PP_Order_Node_Product"; + + /** AD_Table_ID=53030 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name PP_Order_Node_ID */ + public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID"; + + /** Set PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID); + + /** Get PP_Order_Node_ID */ + public int getPP_Order_Node_ID(); + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception; + + /** Column name PP_Order_Node_Product_ID */ + public static final String COLUMNNAME_PP_Order_Node_Product_ID = "PP_Order_Node_Product_ID"; + + /** Set PP_Order_Node_Product_ID */ + public void setPP_Order_Node_Product_ID (int PP_Order_Node_Product_ID); + + /** Get PP_Order_Node_Product_ID */ + public int getPP_Order_Node_Product_ID(); + + /** Column name PP_Order_Workflow_ID */ + public static final String COLUMNNAME_PP_Order_Workflow_ID = "PP_Order_Workflow_ID"; + + /** Set PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID); + + /** Get PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID(); + + public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception; + + /** Column name Yield */ + public static final String COLUMNNAME_Yield = "Yield"; + + /** Set Yield */ + public void setYield (int Yield); + + /** Get Yield */ + public int getYield(); +} diff --git a/base/src/org/compiere/model/I_AD_Workflow.java b/base/src/org/eevolution/model/I_PP_Order_Workflow.java similarity index 76% rename from base/src/org/compiere/model/I_AD_Workflow.java rename to base/src/org/eevolution/model/I_PP_Order_Workflow.java index ce9c1c1693..6560cac205 100644 --- a/base/src/org/compiere/model/I_AD_Workflow.java +++ b/base/src/org/eevolution/model/I_PP_Order_Workflow.java @@ -30,30 +30,31 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; import java.sql.Timestamp; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for AD_Workflow +/** Generated Interface for PP_Order_Workflow * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_AD_Workflow +public interface I_PP_Order_Workflow { - /** TableName=AD_Workflow */ - public static final String Table_Name = "AD_Workflow"; + /** TableName=PP_Order_Workflow */ + public static final String Table_Name = "PP_Order_Workflow"; - /** AD_Table_ID=117 */ + /** AD_Table_ID=53029 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - /** AccessLevel = 6 - System - Client + /** AccessLevel = 3 - Client - Org */ - BigDecimal accessLevel = BigDecimal.valueOf(6); + BigDecimal accessLevel = BigDecimal.valueOf(3); /** Load Meta Data */ @@ -130,6 +131,8 @@ public interface I_AD_Workflow */ public int getAD_Workflow_ID(); + public I_AD_Workflow getAD_Workflow() throws Exception; + /** Column name AccessLevel */ public static final String COLUMNNAME_AccessLevel = "AccessLevel"; @@ -182,18 +185,18 @@ public interface I_AD_Workflow */ public String getDescription(); - /** Column name DocValueLogic */ - public static final String COLUMNNAME_DocValueLogic = "DocValueLogic"; + /** Column name DocumentNo */ + public static final String COLUMNNAME_DocumentNo = "DocumentNo"; - /** Set Document Value Logic. - * Logic to determine Workflow Start - If true, a workflow process is started for the document + /** Set Document No. + * Document sequence number of the document */ - public void setDocValueLogic (String DocValueLogic); + public void setDocumentNo (String DocumentNo); - /** Get Document Value Logic. - * Logic to determine Workflow Start - If true, a workflow process is started for the document + /** Get Document No. + * Document sequence number of the document */ - public String getDocValueLogic(); + public String getDocumentNo(); /** Column name Duration */ public static final String COLUMNNAME_Duration = "Duration"; @@ -262,19 +265,6 @@ public interface I_AD_Workflow */ public boolean isDefault(); - /** Column name IsValid */ - public static final String COLUMNNAME_IsValid = "IsValid"; - - /** Set Valid. - * Element is valid - */ - public void setIsValid (boolean IsValid); - - /** Get Valid. - * Element is valid - */ - public boolean isValid(); - /** Column name Limit */ public static final String COLUMNNAME_Limit = "Limit"; @@ -288,6 +278,15 @@ public interface I_AD_Workflow */ public int getLimit(); + /** Column name MovingTime */ + public static final String COLUMNNAME_MovingTime = "MovingTime"; + + /** Set MovingTime */ + public void setMovingTime (int MovingTime); + + /** Get MovingTime */ + public int getMovingTime(); + /** Column name Name */ public static final String COLUMNNAME_Name = "Name"; @@ -301,6 +300,37 @@ public interface I_AD_Workflow */ public String getName(); + /** Column name PP_Order_ID */ + public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; + + /** Set PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID); + + /** Get PP_Order_ID */ + public int getPP_Order_ID(); + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception; + + /** Column name PP_Order_Node_ID */ + public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID"; + + /** Set PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID); + + /** Get PP_Order_Node_ID */ + public int getPP_Order_Node_ID(); + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception; + + /** Column name PP_Order_Workflow_ID */ + public static final String COLUMNNAME_PP_Order_Workflow_ID = "PP_Order_Workflow_ID"; + + /** Set PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID); + + /** Get PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID(); + /** Column name Priority */ public static final String COLUMNNAME_Priority = "Priority"; @@ -314,6 +344,15 @@ public interface I_AD_Workflow */ public int getPriority(); + /** Column name ProcessType */ + public static final String COLUMNNAME_ProcessType = "ProcessType"; + + /** Set ProcessType */ + public void setProcessType (String ProcessType); + + /** Get ProcessType */ + public String getProcessType(); + /** Column name PublishStatus */ public static final String COLUMNNAME_PublishStatus = "PublishStatus"; @@ -327,6 +366,52 @@ public interface I_AD_Workflow */ public String getPublishStatus(); + /** Column name QtyBatchSize */ + public static final String COLUMNNAME_QtyBatchSize = "QtyBatchSize"; + + /** Set QtyBatchSize */ + public void setQtyBatchSize (BigDecimal QtyBatchSize); + + /** Get QtyBatchSize */ + public BigDecimal getQtyBatchSize(); + + /** Column name QueuingTime */ + public static final String COLUMNNAME_QueuingTime = "QueuingTime"; + + /** Set QueuingTime */ + public void setQueuingTime (int QueuingTime); + + /** Get QueuingTime */ + public int getQueuingTime(); + + /** Column name S_Resource_ID */ + public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; + + /** Set Resource. + * Resource + */ + public void setS_Resource_ID (int S_Resource_ID); + + /** Get Resource. + * Resource + */ + public int getS_Resource_ID(); + + public I_S_Resource getS_Resource() throws Exception; + + /** Column name SetupTime */ + public static final String COLUMNNAME_SetupTime = "SetupTime"; + + /** Set Setup Time. + * Setup time before starting Production + */ + public void setSetupTime (int SetupTime); + + /** Get Setup Time. + * Setup time before starting Production + */ + public int getSetupTime(); + /** Column name ValidFrom */ public static final String COLUMNNAME_ValidFrom = "ValidFrom"; diff --git a/base/src/org/eevolution/model/I_PP_Product_BOM.java b/base/src/org/eevolution/model/I_PP_Product_BOM.java new file mode 100644 index 0000000000..d1bbaceca8 --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Product_BOM.java @@ -0,0 +1,279 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Product_BOM + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Product_BOM +{ + + /** TableName=PP_Product_BOM */ + public static final String Table_Name = "PP_Product_BOM"; + + /** AD_Table_ID=53018 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name BOMType */ + public static final String COLUMNNAME_BOMType = "BOMType"; + + /** Set BOM Type. + * Type of BOM + */ + public void setBOMType (String BOMType); + + /** Get BOM Type. + * Type of BOM + */ + public String getBOMType(); + + /** Column name BOMUse */ + public static final String COLUMNNAME_BOMUse = "BOMUse"; + + /** Set BOM Use. + * The use of the Bill of Material + */ + public void setBOMUse (String BOMUse); + + /** Get BOM Use. + * The use of the Bill of Material + */ + public String getBOMUse(); + + /** Column name C_UOM_ID */ + public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; + + /** Set UOM. + * Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID); + + /** Get UOM. + * Unit of Measure + */ + public int getC_UOM_ID(); + + public I_C_UOM getC_UOM() throws Exception; + + /** Column name CopyFrom */ + public static final String COLUMNNAME_CopyFrom = "CopyFrom"; + + /** Set Copy From. + * Copy From Record + */ + public void setCopyFrom (String CopyFrom); + + /** Get Copy From. + * Copy From Record + */ + public String getCopyFrom(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name DocumentNo */ + public static final String COLUMNNAME_DocumentNo = "DocumentNo"; + + /** Set Document No. + * Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo); + + /** Get Document No. + * Document sequence number of the document + */ + public String getDocumentNo(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); + + /** Get Attribute Set Instance. + * Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID(); + + /** Column name M_ChangeNotice_ID */ + public static final String COLUMNNAME_M_ChangeNotice_ID = "M_ChangeNotice_ID"; + + /** Set Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID); + + /** Get Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID(); + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception; + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name PP_Product_BOM_ID */ + public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; + + /** Set BOM & Formula. + * BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID); + + /** Get BOM & Formula. + * BOM & Formula + */ + public int getPP_Product_BOM_ID(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name Revision */ + public static final String COLUMNNAME_Revision = "Revision"; + + /** Set Revision */ + public void setRevision (String Revision); + + /** Get Revision */ + public String getRevision(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_PP_Product_BOMLine.java b/base/src/org/eevolution/model/I_PP_Product_BOMLine.java new file mode 100644 index 0000000000..51c02a0aca --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Product_BOMLine.java @@ -0,0 +1,367 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Product_BOMLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Product_BOMLine +{ + + /** TableName=PP_Product_BOMLine */ + public static final String Table_Name = "PP_Product_BOMLine"; + + /** AD_Table_ID=53019 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name Assay */ + public static final String COLUMNNAME_Assay = "Assay"; + + /** Set Quantity Assay. + * Indicated the Quantity Assay to use into Quality Order + */ + public void setAssay (BigDecimal Assay); + + /** Get Quantity Assay. + * Indicated the Quantity Assay to use into Quality Order + */ + public BigDecimal getAssay(); + + /** Column name BackflushGroup */ + public static final String COLUMNNAME_BackflushGroup = "BackflushGroup"; + + /** Set Backflush Group. + * The Grouping Components to the Backflush + */ + public void setBackflushGroup (String BackflushGroup); + + /** Get Backflush Group. + * The Grouping Components to the Backflush + */ + public String getBackflushGroup(); + + /** Column name C_UOM_ID */ + public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; + + /** Set UOM. + * Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID); + + /** Get UOM. + * Unit of Measure + */ + public int getC_UOM_ID(); + + public I_C_UOM getC_UOM() throws Exception; + + /** Column name ComponentType */ + public static final String COLUMNNAME_ComponentType = "ComponentType"; + + /** Set Component Type. + * Component Type for a Bill of Material or Formula + */ + public void setComponentType (String ComponentType); + + /** Get Component Type. + * Component Type for a Bill of Material or Formula + */ + public String getComponentType(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Feature */ + public static final String COLUMNNAME_Feature = "Feature"; + + /** Set Feature. + * Indicated the Feature for Product Configure + */ + public void setFeature (String Feature); + + /** Get Feature. + * Indicated the Feature for Product Configure + */ + public String getFeature(); + + /** Column name Forecast */ + public static final String COLUMNNAME_Forecast = "Forecast"; + + /** Set Forecast. + * Indicated the % of participation this component into a of the BOM Planning + */ + public void setForecast (BigDecimal Forecast); + + /** Get Forecast. + * Indicated the % of participation this component into a of the BOM Planning + */ + public BigDecimal getForecast(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsCritical */ + public static final String COLUMNNAME_IsCritical = "IsCritical"; + + /** Set Is Critical Component. + * Indicate that a Manufacturing Order can not begin without have this component + */ + public void setIsCritical (boolean IsCritical); + + /** Get Is Critical Component. + * Indicate that a Manufacturing Order can not begin without have this component + */ + public boolean isCritical(); + + /** Column name IsQtyPercentage */ + public static final String COLUMNNAME_IsQtyPercentage = "IsQtyPercentage"; + + /** Set Is Qty Percentage. + * Indicate that this component is based in % Quantity + */ + public void setIsQtyPercentage (boolean IsQtyPercentage); + + /** Get Is Qty Percentage. + * Indicate that this component is based in % Quantity + */ + public boolean isQtyPercentage(); + + /** Column name IssueMethod */ + public static final String COLUMNNAME_IssueMethod = "IssueMethod"; + + /** Set Issue Method. + * There are two methods for issue the components to Manufacturing Order + */ + public void setIssueMethod (String IssueMethod); + + /** Get Issue Method. + * There are two methods for issue the components to Manufacturing Order + */ + public String getIssueMethod(); + + /** Column name LeadTimeOffset */ + public static final String COLUMNNAME_LeadTimeOffset = "LeadTimeOffset"; + + /** Set Lead Time Offset. + * Optional Lead Time offest before starting production + */ + public void setLeadTimeOffset (int LeadTimeOffset); + + /** Get Lead Time Offset. + * Optional Lead Time offest before starting production + */ + public int getLeadTimeOffset(); + + /** Column name Line */ + public static final String COLUMNNAME_Line = "Line"; + + /** Set Line No. + * Unique line for this document + */ + public void setLine (int Line); + + /** Get Line No. + * Unique line for this document + */ + public int getLine(); + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); + + /** Get Attribute Set Instance. + * Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID(); + + /** Column name M_ChangeNotice_ID */ + public static final String COLUMNNAME_M_ChangeNotice_ID = "M_ChangeNotice_ID"; + + /** Set Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID); + + /** Get Change Notice. + * Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID(); + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception; + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name PP_Product_BOMLine_ID */ + public static final String COLUMNNAME_PP_Product_BOMLine_ID = "PP_Product_BOMLine_ID"; + + /** Set BOM Line. + * BOM Line + */ + public void setPP_Product_BOMLine_ID (int PP_Product_BOMLine_ID); + + /** Get BOM Line. + * BOM Line + */ + public int getPP_Product_BOMLine_ID(); + + /** Column name PP_Product_BOM_ID */ + public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; + + /** Set BOM & Formula. + * BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID); + + /** Get BOM & Formula. + * BOM & Formula + */ + public int getPP_Product_BOM_ID(); + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception; + + /** Column name QtyBOM */ + public static final String COLUMNNAME_QtyBOM = "QtyBOM"; + + /** Set Quantity. + * Indicate the Quantity use in this BOM + */ + public void setQtyBOM (BigDecimal QtyBOM); + + /** Get Quantity. + * Indicate the Quantity use in this BOM + */ + public BigDecimal getQtyBOM(); + + /** Column name QtyBatch */ + public static final String COLUMNNAME_QtyBatch = "QtyBatch"; + + /** Set Quantity %. + * Indicate the Quantity % use in this Formula + */ + public void setQtyBatch (BigDecimal QtyBatch); + + /** Get Quantity %. + * Indicate the Quantity % use in this Formula + */ + public BigDecimal getQtyBatch(); + + /** Column name Scrap */ + public static final String COLUMNNAME_Scrap = "Scrap"; + + /** Set Scrap. + * Indicate the Scrap Quantity that is generate in a manufacturing process + */ + public void setScrap (BigDecimal Scrap); + + /** Get Scrap. + * Indicate the Scrap Quantity that is generate in a manufacturing process + */ + public BigDecimal getScrap(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); +} diff --git a/base/src/org/eevolution/model/I_PP_Product_Planning.java b/base/src/org/eevolution/model/I_PP_Product_Planning.java new file mode 100644 index 0000000000..45ac06a8fd --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_Product_Planning.java @@ -0,0 +1,349 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_Product_Planning + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_Product_Planning +{ + + /** TableName=PP_Product_Planning */ + public static final String Table_Name = "PP_Product_Planning"; + + /** AD_Table_ID=53020 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_Workflow_ID */ + public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID"; + + /** Set Workflow. + * Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID); + + /** Get Workflow. + * Workflow or combination of tasks + */ + public int getAD_Workflow_ID(); + + public I_AD_Workflow getAD_Workflow() throws Exception; + + /** Column name DD_NetworkDistribution_ID */ + public static final String COLUMNNAME_DD_NetworkDistribution_ID = "DD_NetworkDistribution_ID"; + + /** Set Network Distribution */ + public void setDD_NetworkDistribution_ID (int DD_NetworkDistribution_ID); + + /** Get Network Distribution */ + public int getDD_NetworkDistribution_ID(); + + public org.eevolution.model.I_DD_NetworkDistribution getDD_NetworkDistribution() throws Exception; + + /** Column name DeliveryTime_Promised */ + public static final String COLUMNNAME_DeliveryTime_Promised = "DeliveryTime_Promised"; + + /** Set Promised Delivery Time. + * Promised days between order and delivery + */ + public void setDeliveryTime_Promised (BigDecimal DeliveryTime_Promised); + + /** Get Promised Delivery Time. + * Promised days between order and delivery + */ + public BigDecimal getDeliveryTime_Promised(); + + /** Column name IsCreatePlan */ + public static final String COLUMNNAME_IsCreatePlan = "IsCreatePlan"; + + /** Set Is Create Plan */ + public void setIsCreatePlan (boolean IsCreatePlan); + + /** Get Is Create Plan */ + public boolean isCreatePlan(); + + /** Column name IsIssue */ + public static final String COLUMNNAME_IsIssue = "IsIssue"; + + /** Set Is Issue */ + public void setIsIssue (boolean IsIssue); + + /** Get Is Issue */ + public boolean isIssue(); + + /** Column name IsMPS */ + public static final String COLUMNNAME_IsMPS = "IsMPS"; + + /** Set Is MPS */ + public void setIsMPS (boolean IsMPS); + + /** Get Is MPS */ + public boolean isMPS(); + + /** Column name IsPhantom */ + public static final String COLUMNNAME_IsPhantom = "IsPhantom"; + + /** Set Phantom. + * Phantom Component + */ + public void setIsPhantom (boolean IsPhantom); + + /** Get Phantom. + * Phantom Component + */ + public boolean isPhantom(); + + /** Column name IsRequiredDRP */ + public static final String COLUMNNAME_IsRequiredDRP = "IsRequiredDRP"; + + /** Set Required Calculate DRP */ + public void setIsRequiredDRP (boolean IsRequiredDRP); + + /** Get Required Calculate DRP */ + public boolean isRequiredDRP(); + + /** Column name IsRequiredMRP */ + public static final String COLUMNNAME_IsRequiredMRP = "IsRequiredMRP"; + + /** Set Required Calculate MRP */ + public void setIsRequiredMRP (boolean IsRequiredMRP); + + /** Get Required Calculate MRP */ + public boolean isRequiredMRP(); + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name M_Warehouse_ID */ + public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; + + /** Set Warehouse. + * Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID); + + /** Get Warehouse. + * Storage Warehouse and Service Point + */ + public int getM_Warehouse_ID(); + + public I_M_Warehouse getM_Warehouse() throws Exception; + + /** Column name Order_Max */ + public static final String COLUMNNAME_Order_Max = "Order_Max"; + + /** Set Order_Max */ + public void setOrder_Max (BigDecimal Order_Max); + + /** Get Order_Max */ + public BigDecimal getOrder_Max(); + + /** Column name Order_Min */ + public static final String COLUMNNAME_Order_Min = "Order_Min"; + + /** Set Minimum Order Qty. + * Minimum order quantity in UOM + */ + public void setOrder_Min (BigDecimal Order_Min); + + /** Get Minimum Order Qty. + * Minimum order quantity in UOM + */ + public BigDecimal getOrder_Min(); + + /** Column name Order_Pack */ + public static final String COLUMNNAME_Order_Pack = "Order_Pack"; + + /** Set Order Pack Qty. + * Package order size in UOM (e.g. order set of 5 units) + */ + public void setOrder_Pack (BigDecimal Order_Pack); + + /** Get Order Pack Qty. + * Package order size in UOM (e.g. order set of 5 units) + */ + public BigDecimal getOrder_Pack(); + + /** Column name Order_Period */ + public static final String COLUMNNAME_Order_Period = "Order_Period"; + + /** Set Order Period */ + public void setOrder_Period (BigDecimal Order_Period); + + /** Get Order Period */ + public BigDecimal getOrder_Period(); + + /** Column name Order_Policy */ + public static final String COLUMNNAME_Order_Policy = "Order_Policy"; + + /** Set Order Policy */ + public void setOrder_Policy (String Order_Policy); + + /** Get Order Policy */ + public String getOrder_Policy(); + + /** Column name Order_Qty */ + public static final String COLUMNNAME_Order_Qty = "Order_Qty"; + + /** Set Order Qty */ + public void setOrder_Qty (BigDecimal Order_Qty); + + /** Get Order Qty */ + public BigDecimal getOrder_Qty(); + + /** Column name PP_Product_BOM_ID */ + public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; + + /** Set BOM & Formula. + * BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID); + + /** Get BOM & Formula. + * BOM & Formula + */ + public int getPP_Product_BOM_ID(); + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception; + + /** Column name PP_Product_Planning_ID */ + public static final String COLUMNNAME_PP_Product_Planning_ID = "PP_Product_Planning_ID"; + + /** Set PP_Product_Planning_ID */ + public void setPP_Product_Planning_ID (int PP_Product_Planning_ID); + + /** Get PP_Product_Planning_ID */ + public int getPP_Product_Planning_ID(); + + /** Column name Planner_ID */ + public static final String COLUMNNAME_Planner_ID = "Planner_ID"; + + /** Set Planner */ + public void setPlanner_ID (int Planner_ID); + + /** Get Planner */ + public int getPlanner_ID(); + + /** Column name S_Resource_ID */ + public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; + + /** Set Resource. + * Resource + */ + public void setS_Resource_ID (int S_Resource_ID); + + /** Get Resource. + * Resource + */ + public int getS_Resource_ID(); + + public I_S_Resource getS_Resource() throws Exception; + + /** Column name SafetyStock */ + public static final String COLUMNNAME_SafetyStock = "SafetyStock"; + + /** Set Safety Stock Qty. + * Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public void setSafetyStock (BigDecimal SafetyStock); + + /** Get Safety Stock Qty. + * Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public BigDecimal getSafetyStock(); + + /** Column name TimeFence */ + public static final String COLUMNNAME_TimeFence = "TimeFence"; + + /** Set Time Fence */ + public void setTimeFence (BigDecimal TimeFence); + + /** Get Time Fence */ + public BigDecimal getTimeFence(); + + /** Column name TransfertTime */ + public static final String COLUMNNAME_TransfertTime = "TransfertTime"; + + /** Set Transfert Time */ + public void setTransfertTime (BigDecimal TransfertTime); + + /** Get Transfert Time */ + public BigDecimal getTransfertTime(); + + /** Column name WorkingTime */ + public static final String COLUMNNAME_WorkingTime = "WorkingTime"; + + /** Set Working Time. + * Workflow Simulation Execution Time + */ + public void setWorkingTime (BigDecimal WorkingTime); + + /** Get Working Time. + * Workflow Simulation Execution Time + */ + public BigDecimal getWorkingTime(); + + /** Column name Yield */ + public static final String COLUMNNAME_Yield = "Yield"; + + /** Set Yield */ + public void setYield (int Yield); + + /** Get Yield */ + public int getYield(); +} diff --git a/base/src/org/eevolution/model/I_PP_WF_Node_Asset.java b/base/src/org/eevolution/model/I_PP_WF_Node_Asset.java new file mode 100644 index 0000000000..d91a84bea8 --- /dev/null +++ b/base/src/org/eevolution/model/I_PP_WF_Node_Asset.java @@ -0,0 +1,113 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for PP_WF_Node_Asset + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_PP_WF_Node_Asset +{ + + /** TableName=PP_WF_Node_Asset */ + public static final String Table_Name = "PP_WF_Node_Asset"; + + /** AD_Table_ID=53017 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_WF_Node_ID */ + public static final String COLUMNNAME_AD_WF_Node_ID = "AD_WF_Node_ID"; + + /** Set Node. + * Workflow Node (activity), step or process + */ + public void setAD_WF_Node_ID (int AD_WF_Node_ID); + + /** Get Node. + * Workflow Node (activity), step or process + */ + public int getAD_WF_Node_ID(); + + public I_AD_WF_Node getAD_WF_Node() throws Exception; + + /** Column name A_Asset_ID */ + public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID"; + + /** Set Asset. + * Asset used internally or by customers + */ + public void setA_Asset_ID (int A_Asset_ID); + + /** Get Asset. + * Asset used internally or by customers + */ + public int getA_Asset_ID(); + + public I_A_Asset getA_Asset() throws Exception; + + /** Column name PP_WF_Node_Asset_ID */ + public static final String COLUMNNAME_PP_WF_Node_Asset_ID = "PP_WF_Node_Asset_ID"; + + /** Set PP_WF_Node_Asset_ID */ + public void setPP_WF_Node_Asset_ID (int PP_WF_Node_Asset_ID); + + /** Get PP_WF_Node_Asset_ID */ + public int getPP_WF_Node_Asset_ID(); + + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; + + /** Set Sequence. + * Method of ordering records; + lowest number comes first + */ + public void setSeqNo (int SeqNo); + + /** Get Sequence. + * Method of ordering records; + lowest number comes first + */ + public int getSeqNo(); +} diff --git a/base/src/org/compiere/model/I_M_ForecastLine.java b/base/src/org/eevolution/model/I_PP_WF_Node_Product.java similarity index 57% rename from base/src/org/compiere/model/I_M_ForecastLine.java rename to base/src/org/eevolution/model/I_PP_WF_Node_Product.java index 8d79e34008..f12c0bdf6e 100644 --- a/base/src/org/compiere/model/I_M_ForecastLine.java +++ b/base/src/org/eevolution/model/I_PP_WF_Node_Product.java @@ -30,74 +30,75 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; +package org.eevolution.model; import java.math.BigDecimal; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Interface for M_ForecastLine +/** Generated Interface for PP_WF_Node_Product * @author Trifon Trifonov (generated) - * @version Release 3.4.0s + * @version Release 3.5.1a */ -public interface I_M_ForecastLine +public interface I_PP_WF_Node_Product { - /** TableName=M_ForecastLine */ - public static final String Table_Name = "M_ForecastLine"; + /** TableName=PP_WF_Node_Product */ + public static final String Table_Name = "PP_WF_Node_Product"; - /** AD_Table_ID=722 */ + /** AD_Table_ID=53016 */ public static final int Table_ID = MTable.getTable_ID(Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - /** AccessLevel = 2 - Client + /** AccessLevel = 3 - Client - Org */ - BigDecimal accessLevel = BigDecimal.valueOf(2); + BigDecimal accessLevel = BigDecimal.valueOf(3); /** Load Meta Data */ - /** Column name C_Period_ID */ - public static final String COLUMNNAME_C_Period_ID = "C_Period_ID"; + /** Column name AD_WF_Node_ID */ + public static final String COLUMNNAME_AD_WF_Node_ID = "AD_WF_Node_ID"; - /** Set Period. - * Period of the Calendar + /** Set Node. + * Workflow Node (activity), step or process */ - public void setC_Period_ID (int C_Period_ID); + public void setAD_WF_Node_ID (int AD_WF_Node_ID); - /** Get Period. - * Period of the Calendar + /** Get Node. + * Workflow Node (activity), step or process */ - public int getC_Period_ID(); + public int getAD_WF_Node_ID(); - public I_C_Period getC_Period() throws Exception; + public I_AD_WF_Node getAD_WF_Node() throws Exception; - /** Column name M_ForecastLine_ID */ - public static final String COLUMNNAME_M_ForecastLine_ID = "M_ForecastLine_ID"; + /** Column name ConfigurationLevel */ + public static final String COLUMNNAME_ConfigurationLevel = "ConfigurationLevel"; - /** Set Forecast Line. - * Forecast Line + /** Set Configuration Level. + * Configuration Level for this parameter */ - public void setM_ForecastLine_ID (int M_ForecastLine_ID); + public void setConfigurationLevel (String ConfigurationLevel); - /** Get Forecast Line. - * Forecast Line + /** Get Configuration Level. + * Configuration Level for this parameter */ - public int getM_ForecastLine_ID(); + public String getConfigurationLevel(); - /** Column name M_Forecast_ID */ - public static final String COLUMNNAME_M_Forecast_ID = "M_Forecast_ID"; + /** Column name EntityType */ + public static final String COLUMNNAME_EntityType = "EntityType"; - /** Set Forecast. - * Material Forecast + /** Set Entity Type. + * Dictionary Entity Type; + Determines ownership and synchronization */ - public void setM_Forecast_ID (int M_Forecast_ID); + public void setEntityType (String EntityType); - /** Get Forecast. - * Material Forecast + /** Get Entity Type. + * Dictionary Entity Type; + Determines ownership and synchronization */ - public int getM_Forecast_ID(); - - public I_M_Forecast getM_Forecast() throws Exception; + public String getEntityType(); /** Column name M_Product_ID */ public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; @@ -114,6 +115,15 @@ public interface I_M_ForecastLine public I_M_Product getM_Product() throws Exception; + /** Column name PP_WF_Node_Product_ID */ + public static final String COLUMNNAME_PP_WF_Node_Product_ID = "PP_WF_Node_Product_ID"; + + /** Set PP_WF_Node_Product_ID */ + public void setPP_WF_Node_Product_ID (int PP_WF_Node_Product_ID); + + /** Get PP_WF_Node_Product_ID */ + public int getPP_WF_Node_Product_ID(); + /** Column name Qty */ public static final String COLUMNNAME_Qty = "Qty"; @@ -127,16 +137,18 @@ public interface I_M_ForecastLine */ public BigDecimal getQty(); - /** Column name QtyCalculated */ - public static final String COLUMNNAME_QtyCalculated = "QtyCalculated"; + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; - /** Set Calculated Quantity. - * Calculated Quantity + /** Set Sequence. + * Method of ordering records; + lowest number comes first */ - public void setQtyCalculated (BigDecimal QtyCalculated); + public void setSeqNo (int SeqNo); - /** Get Calculated Quantity. - * Calculated Quantity + /** Get Sequence. + * Method of ordering records; + lowest number comes first */ - public BigDecimal getQtyCalculated(); + public int getSeqNo(); } diff --git a/base/src/org/eevolution/model/I_QM_Specification.java b/base/src/org/eevolution/model/I_QM_Specification.java new file mode 100644 index 0000000000..ae2bf06224 --- /dev/null +++ b/base/src/org/eevolution/model/I_QM_Specification.java @@ -0,0 +1,194 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for QM_Specification + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_QM_Specification +{ + + /** TableName=QM_Specification */ + public static final String Table_Name = "QM_Specification"; + + /** AD_Table_ID=53040 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_Workflow_ID */ + public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID"; + + /** Set Workflow. + * Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID); + + /** Get Workflow. + * Workflow or combination of tasks + */ + public int getAD_Workflow_ID(); + + public I_AD_Workflow getAD_Workflow() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name M_AttributeSet_ID */ + public static final String COLUMNNAME_M_AttributeSet_ID = "M_AttributeSet_ID"; + + /** Set Attribute Set. + * Product Attribute Set + */ + public void setM_AttributeSet_ID (int M_AttributeSet_ID); + + /** Get Attribute Set. + * Product Attribute Set + */ + public int getM_AttributeSet_ID(); + + public I_M_AttributeSet getM_AttributeSet() throws Exception; + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name PP_Product_BOM_ID */ + public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; + + /** Set BOM & Formula. + * BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID); + + /** Get BOM & Formula. + * BOM & Formula + */ + public int getPP_Product_BOM_ID(); + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception; + + /** Column name QM_Specification_ID */ + public static final String COLUMNNAME_QM_Specification_ID = "QM_Specification_ID"; + + /** Set QM_Specification_ID */ + public void setQM_Specification_ID (int QM_Specification_ID); + + /** Get QM_Specification_ID */ + public int getQM_Specification_ID(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_QM_SpecificationLine.java b/base/src/org/eevolution/model/I_QM_SpecificationLine.java new file mode 100644 index 0000000000..eacba89536 --- /dev/null +++ b/base/src/org/eevolution/model/I_QM_SpecificationLine.java @@ -0,0 +1,175 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for QM_SpecificationLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_QM_SpecificationLine +{ + + /** TableName=QM_SpecificationLine */ + public static final String Table_Name = "QM_SpecificationLine"; + + /** AD_Table_ID=53041 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AndOr */ + public static final String COLUMNNAME_AndOr = "AndOr"; + + /** Set And/Or. + * Logical operation: AND or OR + */ + public void setAndOr (String AndOr); + + /** Get And/Or. + * Logical operation: AND or OR + */ + public String getAndOr(); + + /** Column name M_Attribute_ID */ + public static final String COLUMNNAME_M_Attribute_ID = "M_Attribute_ID"; + + /** Set Attribute. + * Product Attribute + */ + public void setM_Attribute_ID (int M_Attribute_ID); + + /** Get Attribute. + * Product Attribute + */ + public int getM_Attribute_ID(); + + public I_M_Attribute getM_Attribute() throws Exception; + + /** Column name Operation */ + public static final String COLUMNNAME_Operation = "Operation"; + + /** Set Operation. + * Compare Operation + */ + public void setOperation (String Operation); + + /** Get Operation. + * Compare Operation + */ + public String getOperation(); + + /** Column name QM_SpecificationLine_ID */ + public static final String COLUMNNAME_QM_SpecificationLine_ID = "QM_SpecificationLine_ID"; + + /** Set QM_SpecificationLine_ID */ + public void setQM_SpecificationLine_ID (int QM_SpecificationLine_ID); + + /** Get QM_SpecificationLine_ID */ + public int getQM_SpecificationLine_ID(); + + /** Column name QM_Specification_ID */ + public static final String COLUMNNAME_QM_Specification_ID = "QM_Specification_ID"; + + /** Set QM_Specification_ID */ + public void setQM_Specification_ID (int QM_Specification_ID); + + /** Get QM_Specification_ID */ + public int getQM_Specification_ID(); + + public org.eevolution.model.I_QM_Specification getQM_Specification() throws Exception; + + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; + + /** Set Sequence. + * Method of ordering records; + lowest number comes first + */ + public void setSeqNo (int SeqNo); + + /** Get Sequence. + * Method of ordering records; + lowest number comes first + */ + public int getSeqNo(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (String ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public String getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); +} diff --git a/base/src/org/eevolution/model/I_RV_PP_Product_BOMLine.java b/base/src/org/eevolution/model/I_RV_PP_Product_BOMLine.java new file mode 100644 index 0000000000..dd4a6b5ed0 --- /dev/null +++ b/base/src/org/eevolution/model/I_RV_PP_Product_BOMLine.java @@ -0,0 +1,310 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for RV_PP_Product_BOMLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.0 + */ +public interface I_RV_PP_Product_BOMLine +{ + + /** TableName=RV_PP_Product_BOMLine */ + public static final String Table_Name = "RV_PP_Product_BOMLine"; + + /** AD_Table_ID=53063 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 7 - System - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(7); + + /** Load Meta Data */ + + /** Column name AD_PInstance_ID */ + public static final String COLUMNNAME_AD_PInstance_ID = "AD_PInstance_ID"; + + /** Set Process Instance. + * Instance of the process + */ + public void setAD_PInstance_ID (int AD_PInstance_ID); + + /** Get Process Instance. + * Instance of the process + */ + public int getAD_PInstance_ID(); + + public I_AD_PInstance getAD_PInstance() throws Exception; + + /** Column name ComponentType */ + public static final String COLUMNNAME_ComponentType = "ComponentType"; + + /** Set ComponentType */ + public void setComponentType (String ComponentType); + + /** Get ComponentType */ + public String getComponentType(); + + /** Column name C_UOM_ID */ + public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; + + /** Set UOM. + * Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID); + + /** Get UOM. + * Unit of Measure + */ + public int getC_UOM_ID(); + + public I_C_UOM getC_UOM() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Implotion */ + public static final String COLUMNNAME_Implotion = "Implotion"; + + /** Set Implotion */ + public void setImplotion (boolean Implotion); + + /** Get Implotion */ + public boolean isImplotion(); + + /** Column name IsCritical */ + public static final String COLUMNNAME_IsCritical = "IsCritical"; + + /** Set IsCritical */ + public void setIsCritical (boolean IsCritical); + + /** Get IsCritical */ + public boolean isCritical(); + + /** Column name IsQtyPercentage */ + public static final String COLUMNNAME_IsQtyPercentage = "IsQtyPercentage"; + + /** Set IsQtyPercentage */ + public void setIsQtyPercentage (boolean IsQtyPercentage); + + /** Get IsQtyPercentage */ + public boolean isQtyPercentage(); + + /** Column name IssueMethod */ + public static final String COLUMNNAME_IssueMethod = "IssueMethod"; + + /** Set IssueMethod */ + public void setIssueMethod (String IssueMethod); + + /** Get IssueMethod */ + public String getIssueMethod(); + + /** Column name LevelNo */ + public static final String COLUMNNAME_LevelNo = "LevelNo"; + + /** Set Level no */ + public void setLevelNo (int LevelNo); + + /** Get Level no */ + public int getLevelNo(); + + /** Column name Levels */ + public static final String COLUMNNAME_Levels = "Levels"; + + /** Set Levels */ + public void setLevels (String Levels); + + /** Get Levels */ + public String getLevels(); + + /** Column name Line */ + public static final String COLUMNNAME_Line = "Line"; + + /** Set Line No. + * Unique line for this document + */ + public void setLine (int Line); + + /** Get Line No. + * Unique line for this document + */ + public int getLine(); + + /** Column name M_AttributeSetInstance_ID */ + public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; + + /** Set Attribute Set Instance. + * Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID); + + /** Get Attribute Set Instance. + * Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID(); + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name PP_Product_BOM_ID */ + public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; + + /** Set BOM & Formaula */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID); + + /** Get BOM & Formaula */ + public int getPP_Product_BOM_ID(); + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception; + + /** Column name PP_Product_BOMLine_ID */ + public static final String COLUMNNAME_PP_Product_BOMLine_ID = "PP_Product_BOMLine_ID"; + + /** Set PP_Product_BOMLine_ID */ + public void setPP_Product_BOMLine_ID (int PP_Product_BOMLine_ID); + + /** Get PP_Product_BOMLine_ID */ + public int getPP_Product_BOMLine_ID(); + + public org.eevolution.model.I_PP_Product_BOMLine getPP_Product_BOMLine() throws Exception; + + /** Column name QtyBatch */ + public static final String COLUMNNAME_QtyBatch = "QtyBatch"; + + /** Set QtyBatch */ + public void setQtyBatch (BigDecimal QtyBatch); + + /** Get QtyBatch */ + public BigDecimal getQtyBatch(); + + /** Column name QtyBOM */ + public static final String COLUMNNAME_QtyBOM = "QtyBOM"; + + /** Set QtyBOM */ + public void setQtyBOM (BigDecimal QtyBOM); + + /** Get QtyBOM */ + public BigDecimal getQtyBOM(); + + /** Column name Scrap */ + public static final String COLUMNNAME_Scrap = "Scrap"; + + /** Set Scrap */ + public void setScrap (BigDecimal Scrap); + + /** Get Scrap */ + public BigDecimal getScrap(); + + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; + + /** Set Sequence. + * Method of ordering records; + lowest number comes first + */ + public void setSeqNo (int SeqNo); + + /** Get Sequence. + * Method of ordering records; + lowest number comes first + */ + public int getSeqNo(); + + /** Column name TM_Product_ID */ + public static final String COLUMNNAME_TM_Product_ID = "TM_Product_ID"; + + /** Set TM_Product_ID. + * Product, Service, Item + */ + public void setTM_Product_ID (int TM_Product_ID); + + /** Get TM_Product_ID. + * Product, Service, Item + */ + public int getTM_Product_ID(); + + /** Column name ValidFrom */ + public static final String COLUMNNAME_ValidFrom = "ValidFrom"; + + /** Set Valid from. + * Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom); + + /** Get Valid from. + * Valid from including this date (first day) + */ + public Timestamp getValidFrom(); + + /** Column name ValidTo */ + public static final String COLUMNNAME_ValidTo = "ValidTo"; + + /** Set Valid to. + * Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo); + + /** Get Valid to. + * Valid to including this date (last day) + */ + public Timestamp getValidTo(); +} diff --git a/base/src/org/eevolution/model/I_T_BOMLine.java b/base/src/org/eevolution/model/I_T_BOMLine.java new file mode 100644 index 0000000000..599d9bb37a --- /dev/null +++ b/base/src/org/eevolution/model/I_T_BOMLine.java @@ -0,0 +1,183 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for T_BOMLine + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_T_BOMLine +{ + + /** TableName=T_BOMLine */ + public static final String Table_Name = "T_BOMLine"; + + /** AD_Table_ID=53045 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 7 - System - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(7); + + /** Load Meta Data */ + + /** Column name AD_PInstance_ID */ + public static final String COLUMNNAME_AD_PInstance_ID = "AD_PInstance_ID"; + + /** Set Process Instance. + * Instance of the process + */ + public void setAD_PInstance_ID (int AD_PInstance_ID); + + /** Get Process Instance. + * Instance of the process + */ + public int getAD_PInstance_ID(); + + public I_AD_PInstance getAD_PInstance() throws Exception; + + /** Column name Implotion */ + public static final String COLUMNNAME_Implotion = "Implotion"; + + /** Set Implotion. + * Implosion of a Bill of Materials refers to finding all the BOM''s in which a component is used. + */ + public void setImplotion (boolean Implotion); + + /** Get Implotion. + * Implosion of a Bill of Materials refers to finding all the BOM''s in which a component is used. + */ + public boolean isImplotion(); + + /** Column name LevelNo */ + public static final String COLUMNNAME_LevelNo = "LevelNo"; + + /** Set Level no */ + public void setLevelNo (int LevelNo); + + /** Get Level no */ + public int getLevelNo(); + + /** Column name Levels */ + public static final String COLUMNNAME_Levels = "Levels"; + + /** Set Levels */ + public void setLevels (String Levels); + + /** Get Levels */ + public String getLevels(); + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws Exception; + + /** Column name PP_Product_BOMLine_ID */ + public static final String COLUMNNAME_PP_Product_BOMLine_ID = "PP_Product_BOMLine_ID"; + + /** Set BOM Line. + * BOM Line + */ + public void setPP_Product_BOMLine_ID (int PP_Product_BOMLine_ID); + + /** Get BOM Line. + * BOM Line + */ + public int getPP_Product_BOMLine_ID(); + + public org.eevolution.model.I_PP_Product_BOMLine getPP_Product_BOMLine() throws Exception; + + /** Column name PP_Product_BOM_ID */ + public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; + + /** Set BOM & Formula. + * BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID); + + /** Get BOM & Formula. + * BOM & Formula + */ + public int getPP_Product_BOM_ID(); + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception; + + /** Column name Sel_Product_ID */ + public static final String COLUMNNAME_Sel_Product_ID = "Sel_Product_ID"; + + /** Set Sel_Product_ID */ + public void setSel_Product_ID (int Sel_Product_ID); + + /** Get Sel_Product_ID */ + public int getSel_Product_ID(); + + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; + + /** Set Sequence. + * Method of ordering records; + lowest number comes first + */ + public void setSeqNo (int SeqNo); + + /** Get Sequence. + * Method of ordering records; + lowest number comes first + */ + public int getSeqNo(); + + /** Column name T_BOMLine_ID */ + public static final String COLUMNNAME_T_BOMLine_ID = "T_BOMLine_ID"; + + /** Set T_BOMLine_ID */ + public void setT_BOMLine_ID (int T_BOMLine_ID); + + /** Get T_BOMLine_ID */ + public int getT_BOMLine_ID(); +} diff --git a/base/src/org/eevolution/model/I_T_MRP_CRP.java b/base/src/org/eevolution/model/I_T_MRP_CRP.java new file mode 100644 index 0000000000..86396ac686 --- /dev/null +++ b/base/src/org/eevolution/model/I_T_MRP_CRP.java @@ -0,0 +1,111 @@ +/********************************************************************** + * This file is part of Adempiere ERP Bazaar * + * http://www.adempiere.org * + * * + * Copyright (C) Trifon Trifonov. * + * Copyright (C) Contributors * + * * + * This program is free software; + you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; + either version 2 * + * of the License, or (at your option) any later version. * + * * + * 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., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301, USA. * + * * + * Contributors: * + * - Trifon Trifonov (trifonnt@users.sourceforge.net) * + * * + * Sponsors: * + * - Company (http://www.site.com) * + **********************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for T_MRP_CRP + * @author Trifon Trifonov (generated) + * @version Release 3.5.1a + */ +public interface I_T_MRP_CRP +{ + + /** TableName=T_MRP_CRP */ + public static final String Table_Name = "T_MRP_CRP"; + + /** AD_Table_ID=53044 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 3 - Client - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(3); + + /** Load Meta Data */ + + /** Column name AD_PInstance_ID */ + public static final String COLUMNNAME_AD_PInstance_ID = "AD_PInstance_ID"; + + /** Set Process Instance. + * Instance of the process + */ + public void setAD_PInstance_ID (int AD_PInstance_ID); + + /** Get Process Instance. + * Instance of the process + */ + public int getAD_PInstance_ID(); + + public I_AD_PInstance getAD_PInstance() throws Exception; + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name SeqNo */ + public static final String COLUMNNAME_SeqNo = "SeqNo"; + + /** Set Sequence. + * Method of ordering records; + lowest number comes first + */ + public void setSeqNo (int SeqNo); + + /** Get Sequence. + * Method of ordering records; + lowest number comes first + */ + public int getSeqNo(); + + /** Column name T_MRP_CRP_ID */ + public static final String COLUMNNAME_T_MRP_CRP_ID = "T_MRP_CRP_ID"; + + /** Set T_MRP_CRP_ID */ + public void setT_MRP_CRP_ID (int T_MRP_CRP_ID); + + /** Get T_MRP_CRP_ID */ + public int getT_MRP_CRP_ID(); +} diff --git a/base/src/org/compiere/model/X_AD_SysConfig.java b/base/src/org/eevolution/model/X_C_TaxBase.java similarity index 56% rename from base/src/org/compiere/model/X_AD_SysConfig.java rename to base/src/org/eevolution/model/X_C_TaxBase.java index 6c66e901e2..2434fb8917 100644 --- a/base/src/org/compiere/model/X_AD_SysConfig.java +++ b/base/src/org/eevolution/model/X_C_TaxBase.java @@ -15,16 +15,17 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.sql.ResultSet; import java.util.Properties; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Model for AD_SysConfig +/** Generated Model for C_TaxBase * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_AD_SysConfig extends PO implements I_AD_SysConfig, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_C_TaxBase extends PO implements I_C_TaxBase, I_Persistent { /** @@ -33,27 +34,25 @@ public class X_AD_SysConfig extends PO implements I_AD_SysConfig, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_AD_SysConfig (Properties ctx, int AD_SysConfig_ID, String trxName) + public X_C_TaxBase (Properties ctx, int C_TaxBase_ID, String trxName) { - super (ctx, AD_SysConfig_ID, trxName); - /** if (AD_SysConfig_ID == 0) + super (ctx, C_TaxBase_ID, trxName); + /** if (C_TaxBase_ID == 0) { - setAD_SysConfig_ID (0); - setEntityType (null); -// U + setC_TaxBase_ID (0); setName (null); setValue (null); } */ } /** Load Constructor */ - public X_AD_SysConfig (Properties ctx, ResultSet rs, String trxName) + public X_C_TaxBase (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } /** AccessLevel - * @return 6 - System - Client + * @return 3 - Client - Org */ protected int get_AccessLevel() { @@ -69,62 +68,62 @@ public class X_AD_SysConfig extends PO implements I_AD_SysConfig, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_AD_SysConfig[") + StringBuffer sb = new StringBuffer ("X_C_TaxBase[") .append(get_ID()).append("]"); return sb.toString(); } - /** Set System Configurator. - @param AD_SysConfig_ID System Configurator */ - public void setAD_SysConfig_ID (int AD_SysConfig_ID) + /** Base AD_Reference_ID=53240 */ + public static final int BASE_AD_Reference_ID=53240; + /** Cost = C */ + public static final String BASE_Cost = "C"; + /** Price = P */ + public static final String BASE_Price = "P"; + /** Quantity = Q */ + public static final String BASE_Quantity = "Q"; + /** Set Base. + @param Base + Calculation Base + */ + public void setBase (String Base) { - if (AD_SysConfig_ID < 1) - throw new IllegalArgumentException ("AD_SysConfig_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_SysConfig_ID, Integer.valueOf(AD_SysConfig_ID)); + + if (Base == null || Base.equals("C") || Base.equals("P") || Base.equals("Q")); else throw new IllegalArgumentException ("Base Invalid value - " + Base + " - Reference_ID=53240 - C - P - Q"); + if (Base != null && Base.length() > 1) + { + log.warning("Length > 1 - truncated"); + Base = Base.substring(0, 1); + } + set_Value (COLUMNNAME_Base, Base); } - /** Get System Configurator. - @return System Configurator */ - public int getAD_SysConfig_ID () + /** Get Base. + @return Calculation Base + */ + public String getBase () { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_SysConfig_ID); + return (String)get_Value(COLUMNNAME_Base); + } + + /** Set C_TaxBase_ID. + @param C_TaxBase_ID C_TaxBase_ID */ + public void setC_TaxBase_ID (int C_TaxBase_ID) + { + if (C_TaxBase_ID < 1) + throw new IllegalArgumentException ("C_TaxBase_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_TaxBase_ID, Integer.valueOf(C_TaxBase_ID)); + } + + /** Get C_TaxBase_ID. + @return C_TaxBase_ID */ + public int getC_TaxBase_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxBase_ID); if (ii == null) return 0; return ii.intValue(); } - /** ConfigurationLevel AD_Reference_ID=53222 */ - public static final int CONFIGURATIONLEVEL_AD_Reference_ID=53222; - /** System = S */ - public static final String CONFIGURATIONLEVEL_System = "S"; - /** Client = C */ - public static final String CONFIGURATIONLEVEL_Client = "C"; - /** Organization = O */ - public static final String CONFIGURATIONLEVEL_Organization = "O"; - /** Set Configuration LEVEL. - @param ConfigurationLevel - Configuration Level for this parameter - */ - public void setConfigurationLevel (String ConfigurationLevel) - { - - if (ConfigurationLevel == null || ConfigurationLevel.equals("S") || ConfigurationLevel.equals("C") || ConfigurationLevel.equals("O")); else throw new IllegalArgumentException ("ConfigurationLevel Invalid value - " + ConfigurationLevel + " - Reference_ID=53222 - S - C - O"); - if (ConfigurationLevel != null && ConfigurationLevel.length() > 1) - { - log.warning("Length > 1 - truncated"); - ConfigurationLevel = ConfigurationLevel.substring(0, 1); - } - set_Value (COLUMNNAME_ConfigurationLevel, ConfigurationLevel); - } - - /** Get Configuration LEVEL. - @return Configuration Level for this parameter - */ - public String getConfigurationLevel () - { - return (String)get_Value(COLUMNNAME_ConfigurationLevel); - } - /** Set Description. @param Description Optional short description of the record @@ -148,29 +147,27 @@ public class X_AD_SysConfig extends PO implements I_AD_SysConfig, I_Persistent return (String)get_Value(COLUMNNAME_Description); } - /** EntityType AD_Reference_ID=389 */ - public static final int ENTITYTYPE_AD_Reference_ID=389; - /** Set Entity Type. - @param EntityType - Dictionary Entity Type; Determines ownership and synchronization + /** Set Comment/Help. + @param Help + Comment or Hint */ - public void setEntityType (String EntityType) + public void setHelp (String Help) { - if (EntityType.length() > 40) + if (Help != null && Help.length() > 2000) { - log.warning("Length > 40 - truncated"); - EntityType = EntityType.substring(0, 40); + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); } - set_Value (COLUMNNAME_EntityType, EntityType); + set_Value (COLUMNNAME_Help, Help); } - /** Get Entity Type. - @return Dictionary Entity Type; Determines ownership and synchronization + /** Get Comment/Help. + @return Comment or Hint */ - public String getEntityType () + public String getHelp () { - return (String)get_Value(COLUMNNAME_EntityType); + return (String)get_Value(COLUMNNAME_Help); } /** Set Name. @@ -182,10 +179,10 @@ public class X_AD_SysConfig extends PO implements I_AD_SysConfig, I_Persistent if (Name == null) throw new IllegalArgumentException ("Name is mandatory."); - if (Name.length() > 100) + if (Name.length() > 60) { - log.warning("Length > 100 - truncated"); - Name = Name.substring(0, 100); + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); } set_Value (COLUMNNAME_Name, Name); } @@ -206,6 +203,26 @@ public class X_AD_SysConfig extends PO implements I_AD_SysConfig, I_Persistent return new KeyNamePair(get_ID(), getName()); } + /** Set Percentage. + @param Percentage + Percent of the entire amount + */ + public void setPercentage (int Percentage) + { + set_Value (COLUMNNAME_Percentage, Integer.valueOf(Percentage)); + } + + /** Get Percentage. + @return Percent of the entire amount + */ + public int getPercentage () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Percentage); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Search Key. @param Value Search key for the record in the format required - must be unique @@ -215,10 +232,10 @@ public class X_AD_SysConfig extends PO implements I_AD_SysConfig, I_Persistent if (Value == null) throw new IllegalArgumentException ("Value is mandatory."); - if (Value.length() > 255) + if (Value.length() > 40) { - log.warning("Length > 255 - truncated"); - Value = Value.substring(0, 255); + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); } set_Value (COLUMNNAME_Value, Value); } diff --git a/base/src/org/eevolution/model/X_C_TaxDefinition.java b/base/src/org/eevolution/model/X_C_TaxDefinition.java new file mode 100644 index 0000000000..36e756f911 --- /dev/null +++ b/base/src/org/eevolution/model/X_C_TaxDefinition.java @@ -0,0 +1,694 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for C_TaxDefinition + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_C_TaxDefinition extends PO implements I_C_TaxDefinition, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_C_TaxDefinition (Properties ctx, int C_TaxDefinition_ID, String trxName) + { + super (ctx, C_TaxDefinition_ID, trxName); + /** if (C_TaxDefinition_ID == 0) + { + setC_TaxDefinition_ID (0); + setName (null); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_C_TaxDefinition (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() + { + StringBuffer sb = new StringBuffer ("X_C_TaxDefinition[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_OrgType getAD_OrgType() throws Exception + { + Class clazz = MTable.getClass(I_AD_OrgType.Table_Name); + I_AD_OrgType result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_OrgType)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_OrgType_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Organization Type. + @param AD_OrgType_ID + Organization Type allows you to categorize your organizations + */ + public void setAD_OrgType_ID (int AD_OrgType_ID) + { + if (AD_OrgType_ID < 1) + set_Value (COLUMNNAME_AD_OrgType_ID, null); + else + set_Value (COLUMNNAME_AD_OrgType_ID, Integer.valueOf(AD_OrgType_ID)); + } + + /** Get Organization Type. + @return Organization Type allows you to categorize your organizations + */ + public int getAD_OrgType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_BP_Group getC_BP_Group() throws Exception + { + Class clazz = MTable.getClass(I_C_BP_Group.Table_Name); + I_C_BP_Group result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BP_Group)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BP_Group_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Business Partner Group. + @param C_BP_Group_ID + Business Partner Group + */ + public void setC_BP_Group_ID (int C_BP_Group_ID) + { + if (C_BP_Group_ID < 1) + set_Value (COLUMNNAME_C_BP_Group_ID, null); + else + set_Value (COLUMNNAME_C_BP_Group_ID, Integer.valueOf(C_BP_Group_ID)); + } + + /** Get Business Partner Group. + @return Business Partner Group + */ + public int getC_BP_Group_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_Group_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_BPartner getC_BPartner() throws Exception + { + Class clazz = MTable.getClass(I_C_BPartner.Table_Name); + I_C_BPartner result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + } + + /** 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 org.eevolution.model.I_C_TaxBase getC_TaxBase() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_C_TaxBase.Table_Name); + org.eevolution.model.I_C_TaxBase result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_C_TaxBase)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_TaxBase_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set C_TaxBase_ID. + @param C_TaxBase_ID C_TaxBase_ID */ + public void setC_TaxBase_ID (int C_TaxBase_ID) + { + if (C_TaxBase_ID < 1) + set_Value (COLUMNNAME_C_TaxBase_ID, null); + else + set_Value (COLUMNNAME_C_TaxBase_ID, Integer.valueOf(C_TaxBase_ID)); + } + + /** Get C_TaxBase_ID. + @return C_TaxBase_ID */ + public int getC_TaxBase_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxBase_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_TaxCategory getC_TaxCategory() throws Exception + { + Class clazz = MTable.getClass(I_C_TaxCategory.Table_Name); + I_C_TaxCategory result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_TaxCategory)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_TaxCategory_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Tax Category. + @param C_TaxCategory_ID + Tax Category + */ + public void setC_TaxCategory_ID (int C_TaxCategory_ID) + { + if (C_TaxCategory_ID < 1) + set_Value (COLUMNNAME_C_TaxCategory_ID, null); + else + set_Value (COLUMNNAME_C_TaxCategory_ID, Integer.valueOf(C_TaxCategory_ID)); + } + + /** Get Tax Category. + @return Tax Category + */ + public int getC_TaxCategory_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxCategory_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set C_TaxDefinition_ID. + @param C_TaxDefinition_ID C_TaxDefinition_ID */ + public void setC_TaxDefinition_ID (int C_TaxDefinition_ID) + { + if (C_TaxDefinition_ID < 1) + throw new IllegalArgumentException ("C_TaxDefinition_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_TaxDefinition_ID, Integer.valueOf(C_TaxDefinition_ID)); + } + + /** Get C_TaxDefinition_ID. + @return C_TaxDefinition_ID */ + public int getC_TaxDefinition_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxDefinition_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_C_TaxGroup getC_TaxGroup() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_C_TaxGroup.Table_Name); + org.eevolution.model.I_C_TaxGroup result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_C_TaxGroup)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_TaxGroup_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Tax Group. + @param C_TaxGroup_ID Tax Group */ + public void setC_TaxGroup_ID (int C_TaxGroup_ID) + { + if (C_TaxGroup_ID < 1) + set_Value (COLUMNNAME_C_TaxGroup_ID, null); + else + set_Value (COLUMNNAME_C_TaxGroup_ID, Integer.valueOf(C_TaxGroup_ID)); + } + + /** Get Tax Group. + @return Tax Group */ + public int getC_TaxGroup_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxGroup_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_C_TaxType getC_TaxType() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_C_TaxType.Table_Name); + org.eevolution.model.I_C_TaxType result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_C_TaxType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_TaxType_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set C_TaxType_ID. + @param C_TaxType_ID C_TaxType_ID */ + public void setC_TaxType_ID (int C_TaxType_ID) + { + if (C_TaxType_ID < 1) + set_Value (COLUMNNAME_C_TaxType_ID, null); + else + set_Value (COLUMNNAME_C_TaxType_ID, Integer.valueOf(C_TaxType_ID)); + } + + /** Get C_TaxType_ID. + @return C_TaxType_ID */ + public int getC_TaxType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Tax getC_Tax() throws Exception + { + Class clazz = MTable.getClass(I_C_Tax.Table_Name); + I_C_Tax result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Tax)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Tax_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Tax. + @param C_Tax_ID + Tax identifier + */ + public void setC_Tax_ID (int C_Tax_ID) + { + if (C_Tax_ID < 1) + set_Value (COLUMNNAME_C_Tax_ID, null); + else + set_Value (COLUMNNAME_C_Tax_ID, Integer.valueOf(C_Tax_ID)); + } + + /** Get Tax. + @return Tax identifier + */ + public int getC_Tax_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Tax_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Invoiced. + @param IsInvoiced + Is this invoiced? + */ + public void setIsInvoiced (boolean IsInvoiced) + { + set_Value (COLUMNNAME_IsInvoiced, Boolean.valueOf(IsInvoiced)); + } + + /** Get Invoiced. + @return Is this invoiced? + */ + public boolean isInvoiced () + { + Object oo = get_Value(COLUMNNAME_IsInvoiced); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + public I_M_Product_Category getM_Product_Category() throws Exception + { + Class clazz = MTable.getClass(I_M_Product_Category.Table_Name); + I_M_Product_Category result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_Category_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product Category. + @param M_Product_Category_ID + Category of a Product + */ + public void setM_Product_Category_ID (int M_Product_Category_ID) + { + if (M_Product_Category_ID < 1) + set_Value (COLUMNNAME_M_Product_Category_ID, null); + else + set_Value (COLUMNNAME_M_Product_Category_ID, Integer.valueOf(M_Product_Category_ID)); + } + + /** Get Product Category. + @return Category of a Product + */ + public int getM_Product_Category_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Category_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + set_Value (COLUMNNAME_M_Product_ID, null); + else + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set MaxTaxable. + @param MaxTaxable MaxTaxable */ + public void setMaxTaxable (int MaxTaxable) + { + set_Value (COLUMNNAME_MaxTaxable, Integer.valueOf(MaxTaxable)); + } + + /** Get MaxTaxable. + @return MaxTaxable */ + public int getMaxTaxable () + { + Integer ii = (Integer)get_Value(COLUMNNAME_MaxTaxable); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set MinTaxable. + @param MinTaxable MinTaxable */ + public void setMinTaxable (int MinTaxable) + { + set_Value (COLUMNNAME_MinTaxable, Integer.valueOf(MinTaxable)); + } + + /** Get MinTaxable. + @return MinTaxable */ + public int getMinTaxable () + { + Integer ii = (Integer)get_Value(COLUMNNAME_MinTaxable); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first + */ + public void setSeqNo (int SeqNo) + { + set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); + } + + /** Get Sequence. + @return Method of ordering records; lowest number comes first + */ + public int getSeqNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_ReplicationStrategy.java b/base/src/org/eevolution/model/X_C_TaxGroup.java similarity index 67% rename from base/src/org/compiere/model/X_AD_ReplicationStrategy.java rename to base/src/org/eevolution/model/X_C_TaxGroup.java index 9936b1c052..4c822292d5 100644 --- a/base/src/org/compiere/model/X_AD_ReplicationStrategy.java +++ b/base/src/org/eevolution/model/X_C_TaxGroup.java @@ -15,16 +15,17 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.sql.ResultSet; import java.util.Properties; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Model for AD_ReplicationStrategy +/** Generated Model for C_TaxGroup * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_AD_ReplicationStrategy extends PO implements I_AD_ReplicationStrategy, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_C_TaxGroup extends PO implements I_C_TaxGroup, I_Persistent { /** @@ -33,26 +34,25 @@ public class X_AD_ReplicationStrategy extends PO implements I_AD_ReplicationStra private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_AD_ReplicationStrategy (Properties ctx, int AD_ReplicationStrategy_ID, String trxName) + public X_C_TaxGroup (Properties ctx, int C_TaxGroup_ID, String trxName) { - super (ctx, AD_ReplicationStrategy_ID, trxName); - /** if (AD_ReplicationStrategy_ID == 0) + super (ctx, C_TaxGroup_ID, trxName); + /** if (C_TaxGroup_ID == 0) { - setAD_ReplicationStrategy_ID (0); - setEntityType (null); -// U + setC_TaxGroup_ID (0); setName (null); + setValue (null); } */ } /** Load Constructor */ - public X_AD_ReplicationStrategy (Properties ctx, ResultSet rs, String trxName) + public X_C_TaxGroup (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } /** AccessLevel - * @return 6 - System - Client + * @return 3 - Client - Org */ protected int get_AccessLevel() { @@ -68,28 +68,25 @@ public class X_AD_ReplicationStrategy extends PO implements I_AD_ReplicationStra public String toString() { - StringBuffer sb = new StringBuffer ("X_AD_ReplicationStrategy[") + StringBuffer sb = new StringBuffer ("X_C_TaxGroup[") .append(get_ID()).append("]"); return sb.toString(); } - /** Set Replication Strategy. - @param AD_ReplicationStrategy_ID - Data Replication Strategy - */ - public void setAD_ReplicationStrategy_ID (int AD_ReplicationStrategy_ID) + /** Set Tax Group. + @param C_TaxGroup_ID Tax Group */ + public void setC_TaxGroup_ID (int C_TaxGroup_ID) { - if (AD_ReplicationStrategy_ID < 1) - throw new IllegalArgumentException ("AD_ReplicationStrategy_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_ReplicationStrategy_ID, Integer.valueOf(AD_ReplicationStrategy_ID)); + if (C_TaxGroup_ID < 1) + throw new IllegalArgumentException ("C_TaxGroup_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_TaxGroup_ID, Integer.valueOf(C_TaxGroup_ID)); } - /** Get Replication Strategy. - @return Data Replication Strategy - */ - public int getAD_ReplicationStrategy_ID () + /** Get Tax Group. + @return Tax Group */ + public int getC_TaxGroup_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_ReplicationStrategy_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxGroup_ID); if (ii == null) return 0; return ii.intValue(); @@ -118,31 +115,6 @@ public class X_AD_ReplicationStrategy extends PO implements I_AD_ReplicationStra return (String)get_Value(COLUMNNAME_Description); } - /** EntityType AD_Reference_ID=389 */ - public static final int ENTITYTYPE_AD_Reference_ID=389; - /** Set Entity Type. - @param EntityType - Dictionary Entity Type; Determines ownership and synchronization - */ - public void setEntityType (String EntityType) - { - - if (EntityType.length() > 40) - { - log.warning("Length > 40 - truncated"); - EntityType = EntityType.substring(0, 40); - } - set_Value (COLUMNNAME_EntityType, EntityType); - } - - /** Get Entity Type. - @return Dictionary Entity Type; Determines ownership and synchronization - */ - public String getEntityType () - { - return (String)get_Value(COLUMNNAME_EntityType); - } - /** Set Comment/Help. @param Help Comment or Hint @@ -198,4 +170,29 @@ public class X_AD_ReplicationStrategy extends PO implements I_AD_ReplicationStra { return new KeyNamePair(get_ID(), getName()); } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } } \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_Warehouse.java b/base/src/org/eevolution/model/X_C_TaxType.java similarity index 54% rename from base/src/org/compiere/model/X_M_Warehouse.java rename to base/src/org/eevolution/model/X_C_TaxType.java index aec89da105..34a96e5ab9 100644 --- a/base/src/org/compiere/model/X_M_Warehouse.java +++ b/base/src/org/eevolution/model/X_C_TaxType.java @@ -15,16 +15,17 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.sql.ResultSet; import java.util.Properties; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Model for M_Warehouse +/** Generated Model for C_TaxType * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_Warehouse extends PO implements I_M_Warehouse, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_C_TaxType extends PO implements I_C_TaxType, I_Persistent { /** @@ -33,22 +34,19 @@ public class X_M_Warehouse extends PO implements I_M_Warehouse, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_M_Warehouse (Properties ctx, int M_Warehouse_ID, String trxName) + public X_C_TaxType (Properties ctx, int C_TaxType_ID, String trxName) { - super (ctx, M_Warehouse_ID, trxName); - /** if (M_Warehouse_ID == 0) + super (ctx, C_TaxType_ID, trxName); + /** if (C_TaxType_ID == 0) { - setC_Location_ID (0); - setM_Warehouse_ID (0); + setC_TaxType_ID (0); setName (null); - setSeparator (null); -// * setValue (null); } */ } /** Load Constructor */ - public X_M_Warehouse (Properties ctx, ResultSet rs, String trxName) + public X_C_TaxType (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } @@ -70,28 +68,25 @@ public class X_M_Warehouse extends PO implements I_M_Warehouse, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_M_Warehouse[") + StringBuffer sb = new StringBuffer ("X_C_TaxType[") .append(get_ID()).append("]"); return sb.toString(); } - /** Set Address. - @param C_Location_ID - Location or Address - */ - public void setC_Location_ID (int C_Location_ID) + /** Set C_TaxType_ID. + @param C_TaxType_ID C_TaxType_ID */ + public void setC_TaxType_ID (int C_TaxType_ID) { - if (C_Location_ID < 1) - throw new IllegalArgumentException ("C_Location_ID is mandatory."); - set_Value (COLUMNNAME_C_Location_ID, Integer.valueOf(C_Location_ID)); + if (C_TaxType_ID < 1) + throw new IllegalArgumentException ("C_TaxType_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_TaxType_ID, Integer.valueOf(C_TaxType_ID)); } - /** Get Address. - @return Location or Address - */ - public int getC_Location_ID () + /** Get C_TaxType_ID. + @return C_TaxType_ID */ + public int getC_TaxType_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Location_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxType_ID); if (ii == null) return 0; return ii.intValue(); @@ -120,51 +115,27 @@ public class X_M_Warehouse extends PO implements I_M_Warehouse, I_Persistent return (String)get_Value(COLUMNNAME_Description); } - /** M_WarehouseSource_ID AD_Reference_ID=197 */ - public static final int M_WAREHOUSESOURCE_ID_AD_Reference_ID=197; - /** Set Source Warehouse. - @param M_WarehouseSource_ID - Optional Warehouse to replenish from + /** Set Comment/Help. + @param Help + Comment or Hint */ - public void setM_WarehouseSource_ID (int M_WarehouseSource_ID) + public void setHelp (String Help) { - if (M_WarehouseSource_ID < 1) - set_Value (COLUMNNAME_M_WarehouseSource_ID, null); - else - set_Value (COLUMNNAME_M_WarehouseSource_ID, Integer.valueOf(M_WarehouseSource_ID)); + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); } - /** Get Source Warehouse. - @return Optional Warehouse to replenish from + /** Get Comment/Help. + @return Comment or Hint */ - public int getM_WarehouseSource_ID () + public String getHelp () { - Integer ii = (Integer)get_Value(COLUMNNAME_M_WarehouseSource_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Warehouse. - @param M_Warehouse_ID - Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID) - { - if (M_Warehouse_ID < 1) - throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); - } - - /** 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(); + return (String)get_Value(COLUMNNAME_Help); } /** Set Name. @@ -200,54 +171,6 @@ public class X_M_Warehouse extends PO implements I_M_Warehouse, I_Persistent return new KeyNamePair(get_ID(), getName()); } - /** Set Replenishment Class. - @param ReplenishmentClass - Custom class to calculate Quantity to Order - */ - public void setReplenishmentClass (String ReplenishmentClass) - { - - if (ReplenishmentClass != null && ReplenishmentClass.length() > 60) - { - log.warning("Length > 60 - truncated"); - ReplenishmentClass = ReplenishmentClass.substring(0, 60); - } - set_Value (COLUMNNAME_ReplenishmentClass, ReplenishmentClass); - } - - /** Get Replenishment Class. - @return Custom class to calculate Quantity to Order - */ - public String getReplenishmentClass () - { - return (String)get_Value(COLUMNNAME_ReplenishmentClass); - } - - /** Set Element Separator. - @param Separator - Element Separator - */ - public void setSeparator (String Separator) - { - if (Separator == null) - throw new IllegalArgumentException ("Separator is mandatory."); - - if (Separator.length() > 1) - { - log.warning("Length > 1 - truncated"); - Separator = Separator.substring(0, 1); - } - set_Value (COLUMNNAME_Separator, Separator); - } - - /** Get Element Separator. - @return Element Separator - */ - public String getSeparator () - { - return (String)get_Value(COLUMNNAME_Separator); - } - /** Set Search Key. @param Value Search key for the record in the format required - must be unique diff --git a/base/src/org/eevolution/model/X_DD_NetworkDistribution.java b/base/src/org/eevolution/model/X_DD_NetworkDistribution.java new file mode 100644 index 0000000000..9fdf4a7a1d --- /dev/null +++ b/base/src/org/eevolution/model/X_DD_NetworkDistribution.java @@ -0,0 +1,361 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for DD_NetworkDistribution + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_DD_NetworkDistribution extends PO implements I_DD_NetworkDistribution, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_DD_NetworkDistribution (Properties ctx, int DD_NetworkDistribution_ID, String trxName) + { + super (ctx, DD_NetworkDistribution_ID, trxName); + /** if (DD_NetworkDistribution_ID == 0) + { + setDD_NetworkDistribution_ID (0); + setName (null); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_DD_NetworkDistribution (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() + { + StringBuffer sb = new StringBuffer ("X_DD_NetworkDistribution[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Copy From. + @param CopyFrom + Copy From Record + */ + public void setCopyFrom (String CopyFrom) + { + + if (CopyFrom != null && CopyFrom.length() > 1) + { + log.warning("Length > 1 - truncated"); + CopyFrom = CopyFrom.substring(0, 1); + } + set_Value (COLUMNNAME_CopyFrom, CopyFrom); + } + + /** Get Copy From. + @return Copy From Record + */ + public String getCopyFrom () + { + return (String)get_Value(COLUMNNAME_CopyFrom); + } + + /** Set Network Distribution. + @param DD_NetworkDistribution_ID Network Distribution */ + public void setDD_NetworkDistribution_ID (int DD_NetworkDistribution_ID) + { + if (DD_NetworkDistribution_ID < 1) + throw new IllegalArgumentException ("DD_NetworkDistribution_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_DD_NetworkDistribution_ID, Integer.valueOf(DD_NetworkDistribution_ID)); + } + + /** Get Network Distribution. + @return Network Distribution */ + public int getDD_NetworkDistribution_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_DD_NetworkDistribution_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Document No. + @param DocumentNo + Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo) + { + + if (DocumentNo != null && DocumentNo.length() > 22) + { + log.warning("Length > 22 - truncated"); + DocumentNo = DocumentNo.substring(0, 22); + } + set_Value (COLUMNNAME_DocumentNo, DocumentNo); + } + + /** Get Document No. + @return Document sequence number of the document + */ + public String getDocumentNo () + { + return (String)get_Value(COLUMNNAME_DocumentNo); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception + { + Class clazz = MTable.getClass(I_M_ChangeNotice.Table_Name); + I_M_ChangeNotice result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_ChangeNotice)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_ChangeNotice_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Change Notice. + @param M_ChangeNotice_ID + Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID) + { + if (M_ChangeNotice_ID < 1) + set_Value (COLUMNNAME_M_ChangeNotice_ID, null); + else + set_Value (COLUMNNAME_M_ChangeNotice_ID, Integer.valueOf(M_ChangeNotice_ID)); + } + + /** Get Change Notice. + @return Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_ChangeNotice_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** 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; + } + + /** Set Revision. + @param Revision Revision */ + public void setRevision (String Revision) + { + + if (Revision != null && Revision.length() > 10) + { + log.warning("Length > 10 - truncated"); + Revision = Revision.substring(0, 10); + } + set_Value (COLUMNNAME_Revision, Revision); + } + + /** Get Revision. + @return Revision */ + public String getRevision () + { + return (String)get_Value(COLUMNNAME_Revision); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 80) + { + log.warning("Length > 80 - truncated"); + Value = Value.substring(0, 80); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getValue()); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_DD_NetworkDistributionLine.java b/base/src/org/eevolution/model/X_DD_NetworkDistributionLine.java new file mode 100644 index 0000000000..f9ffd627b8 --- /dev/null +++ b/base/src/org/eevolution/model/X_DD_NetworkDistributionLine.java @@ -0,0 +1,313 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; + +/** Generated Model for DD_NetworkDistributionLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_DD_NetworkDistributionLine extends PO implements I_DD_NetworkDistributionLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_DD_NetworkDistributionLine (Properties ctx, int DD_NetworkDistributionLine_ID, String trxName) + { + super (ctx, DD_NetworkDistributionLine_ID, trxName); + /** if (DD_NetworkDistributionLine_ID == 0) + { + setDD_NetworkDistributionLine_ID (0); + setDD_NetworkDistribution_ID (0); + setM_WarehouseSource_ID (0); + setM_Warehouse_ID (0); +// @M_Warehouse_ID@ + } */ + } + + /** Load Constructor */ + public X_DD_NetworkDistributionLine (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() + { + StringBuffer sb = new StringBuffer ("X_DD_NetworkDistributionLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set DD_NetworkDistributionLine_ID. + @param DD_NetworkDistributionLine_ID DD_NetworkDistributionLine_ID */ + public void setDD_NetworkDistributionLine_ID (int DD_NetworkDistributionLine_ID) + { + if (DD_NetworkDistributionLine_ID < 1) + throw new IllegalArgumentException ("DD_NetworkDistributionLine_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_DD_NetworkDistributionLine_ID, Integer.valueOf(DD_NetworkDistributionLine_ID)); + } + + /** Get DD_NetworkDistributionLine_ID. + @return DD_NetworkDistributionLine_ID */ + public int getDD_NetworkDistributionLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_DD_NetworkDistributionLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_DD_NetworkDistribution getDD_NetworkDistribution() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_DD_NetworkDistribution.Table_Name); + org.eevolution.model.I_DD_NetworkDistribution result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_DD_NetworkDistribution)constructor.newInstance(new Object[] {getCtx(), new Integer(getDD_NetworkDistribution_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Network Distribution. + @param DD_NetworkDistribution_ID Network Distribution */ + public void setDD_NetworkDistribution_ID (int DD_NetworkDistribution_ID) + { + if (DD_NetworkDistribution_ID < 1) + throw new IllegalArgumentException ("DD_NetworkDistribution_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_DD_NetworkDistribution_ID, Integer.valueOf(DD_NetworkDistribution_ID)); + } + + /** Get Network Distribution. + @return Network Distribution */ + public int getDD_NetworkDistribution_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_DD_NetworkDistribution_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Shipper getM_Shipper() throws Exception + { + Class clazz = MTable.getClass(I_M_Shipper.Table_Name); + I_M_Shipper result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Shipper)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Shipper_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Shipper. + @param M_Shipper_ID + Method or manner of product delivery + */ + public void setM_Shipper_ID (int M_Shipper_ID) + { + if (M_Shipper_ID < 1) + set_Value (COLUMNNAME_M_Shipper_ID, null); + else + set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID)); + } + + /** Get Shipper. + @return Method or manner of product delivery + */ + public int getM_Shipper_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** M_WarehouseSource_ID AD_Reference_ID=197 */ + public static final int M_WAREHOUSESOURCE_ID_AD_Reference_ID=197; + /** Set Source Warehouse. + @param M_WarehouseSource_ID + Optional Warehouse to replenish from + */ + public void setM_WarehouseSource_ID (int M_WarehouseSource_ID) + { + if (M_WarehouseSource_ID < 1) + throw new IllegalArgumentException ("M_WarehouseSource_ID is mandatory."); + set_Value (COLUMNNAME_M_WarehouseSource_ID, Integer.valueOf(M_WarehouseSource_ID)); + } + + /** Get Source Warehouse. + @return Optional Warehouse to replenish from + */ + public int getM_WarehouseSource_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_WarehouseSource_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** M_Warehouse_ID AD_Reference_ID=197 */ + public static final int M_WAREHOUSE_ID_AD_Reference_ID=197; + /** Set Warehouse. + @param M_Warehouse_ID + Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + if (M_Warehouse_ID < 1) + throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); + set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); + } + + /** 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 Percent. + @param Percent + Percentage + */ + public void setPercent (BigDecimal Percent) + { + set_Value (COLUMNNAME_Percent, Percent); + } + + /** Get Percent. + @return Percentage + */ + public BigDecimal getPercent () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Percent); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Relative Priority. + @param PriorityNo + Where inventory should be picked from first + */ + public void setPriorityNo (int PriorityNo) + { + set_Value (COLUMNNAME_PriorityNo, Integer.valueOf(PriorityNo)); + } + + /** Get Relative Priority. + @return Where inventory should be picked from first + */ + public int getPriorityNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PriorityNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Transfert Time. + @param TransfertTime Transfert Time */ + public void setTransfertTime (BigDecimal TransfertTime) + { + set_Value (COLUMNNAME_TransfertTime, TransfertTime); + } + + /** Get Transfert Time. + @return Transfert Time */ + public BigDecimal getTransfertTime () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TransfertTime); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_InOut.java b/base/src/org/eevolution/model/X_DD_Order.java similarity index 87% rename from base/src/org/compiere/model/X_M_InOut.java rename to base/src/org/eevolution/model/X_DD_Order.java index b466951aa7..5eaeb5ee95 100644 --- a/base/src/org/compiere/model/X_M_InOut.java +++ b/base/src/org/eevolution/model/X_DD_Order.java @@ -15,7 +15,7 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.lang.reflect.Constructor; import java.math.BigDecimal; @@ -23,13 +23,14 @@ import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Properties; import java.util.logging.Level; +import org.compiere.model.*; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; -/** Generated Model for M_InOut +/** Generated Model for DD_Order * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_InOut extends PO implements I_M_InOut, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_DD_Order extends PO implements I_DD_Order, I_Persistent { /** @@ -38,16 +39,13 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_M_InOut (Properties ctx, int M_InOut_ID, String trxName) + public X_DD_Order (Properties ctx, int DD_Order_ID, String trxName) { - super (ctx, M_InOut_ID, trxName); - /** if (M_InOut_ID == 0) + super (ctx, DD_Order_ID, trxName); + /** if (DD_Order_ID == 0) { - setC_BPartner_ID (0); - setC_BPartner_Location_ID (0); setC_DocType_ID (0); - setDateAcct (new Timestamp(System.currentTimeMillis())); -// @#Date@ + setDD_Order_ID (0); setDeliveryRule (null); // A setDeliveryViaRule (null); @@ -65,11 +63,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent setIsPrinted (false); setIsSOTrx (false); // @IsSOTrx@ - setM_InOut_ID (0); setM_Warehouse_ID (0); - setMovementDate (new Timestamp(System.currentTimeMillis())); -// @#Date@ - setMovementType (null); setPosted (false); setPriorityRule (null); // 5 @@ -79,7 +73,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent } /** Load Constructor */ - public X_M_InOut (Properties ctx, ResultSet rs, String trxName) + public X_DD_Order (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } @@ -101,7 +95,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_M_InOut[") + StringBuffer sb = new StringBuffer ("X_DD_Order[") .append(get_ID()).append("]"); return sb.toString(); } @@ -231,9 +225,10 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent */ public void setC_BPartner_ID (int C_BPartner_ID) { - if (C_BPartner_ID < 1) - throw new IllegalArgumentException ("C_BPartner_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); } /** Get Business Partner . @@ -269,9 +264,10 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent */ public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) { - if (C_BPartner_Location_ID < 1) - throw new IllegalArgumentException ("C_BPartner_Location_ID is mandatory."); - set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID)); + if (C_BPartner_Location_ID < 1) + set_Value (COLUMNNAME_C_BPartner_Location_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID)); } /** Get Partner Location. @@ -349,8 +345,22 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent return ii.intValue(); } - /** C_DocType_ID AD_Reference_ID=170 */ - public static final int C_DOCTYPE_ID_AD_Reference_ID=170; + public I_C_DocType getC_DocType() throws Exception + { + Class clazz = MTable.getClass(I_C_DocType.Table_Name); + I_C_DocType result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + /** Set Document Type. @param C_DocType_ID Document type or rules @@ -573,23 +583,23 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent return (String)get_Value(COLUMNNAME_CreatePackage); } - /** Set Account Date. - @param DateAcct - Accounting Date - */ - public void setDateAcct (Timestamp DateAcct) + /** Set Distribution Order. + @param DD_Order_ID Distribution Order */ + public void setDD_Order_ID (int DD_Order_ID) { - if (DateAcct == null) - throw new IllegalArgumentException ("DateAcct is mandatory."); - set_Value (COLUMNNAME_DateAcct, DateAcct); + if (DD_Order_ID < 1) + throw new IllegalArgumentException ("DD_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_DD_Order_ID, Integer.valueOf(DD_Order_ID)); } - /** Get Account Date. - @return Accounting Date - */ - public Timestamp getDateAcct () + /** Get Distribution Order. + @return Distribution Order */ + public int getDD_Order_ID () { - return (Timestamp)get_Value(COLUMNNAME_DateAcct); + Integer ii = (Integer)get_Value(COLUMNNAME_DD_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); } /** Set Date Ordered. @@ -626,6 +636,23 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent return (Timestamp)get_Value(COLUMNNAME_DatePrinted); } + /** 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 Date received. @param DateReceived Date a product was received @@ -974,6 +1001,51 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent return false; } + /** 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 Drop Shipment. + @param IsDropShip + Drop Shipments are sent from the Vendor directly to the Customer + */ + public void setIsDropShip (boolean IsDropShip) + { + set_Value (COLUMNNAME_IsDropShip, Boolean.valueOf(IsDropShip)); + } + + /** Get Drop Shipment. + @return Drop Shipments are sent from the Vendor directly to the Customer + */ + public boolean isDropShip () + { + Object oo = get_Value(COLUMNNAME_IsDropShip); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set In Dispute. @param IsInDispute Document is in dispute @@ -1070,65 +1142,25 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent return false; } - /** Set Shipment/Receipt. - @param M_InOut_ID - Material Shipment Document - */ - public void setM_InOut_ID (int M_InOut_ID) + /** Set Selected. + @param IsSelected Selected */ + public void setIsSelected (boolean IsSelected) { - if (M_InOut_ID < 1) - throw new IllegalArgumentException ("M_InOut_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_InOut_ID, Integer.valueOf(M_InOut_ID)); + set_Value (COLUMNNAME_IsSelected, Boolean.valueOf(IsSelected)); } - /** Get Shipment/Receipt. - @return Material Shipment Document - */ - public int getM_InOut_ID () + /** Get Selected. + @return Selected */ + public boolean isSelected () { - Integer ii = (Integer)get_Value(COLUMNNAME_M_InOut_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_M_RMA getM_RMA() throws Exception - { - Class clazz = MTable.getClass(I_M_RMA.Table_Name); - I_M_RMA result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_RMA)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_RMA_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set RMA. - @param M_RMA_ID - Return Material Authorization - */ - public void setM_RMA_ID (int M_RMA_ID) - { - if (M_RMA_ID < 1) - set_Value (COLUMNNAME_M_RMA_ID, null); - else - set_Value (COLUMNNAME_M_RMA_ID, Integer.valueOf(M_RMA_ID)); - } - - /** Get RMA. - @return Return Material Authorization - */ - public int getM_RMA_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_RMA_ID); - if (ii == null) - return 0; - return ii.intValue(); + Object oo = get_Value(COLUMNNAME_IsSelected); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; } public I_M_Shipper getM_Shipper() throws Exception @@ -1208,75 +1240,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent return ii.intValue(); } - /** Set Movement Date. - @param MovementDate - Date a product was moved in or out of inventory - */ - public void setMovementDate (Timestamp MovementDate) - { - if (MovementDate == null) - throw new IllegalArgumentException ("MovementDate is mandatory."); - set_Value (COLUMNNAME_MovementDate, MovementDate); - } - - /** Get Movement Date. - @return Date a product was moved in or out of inventory - */ - public Timestamp getMovementDate () - { - return (Timestamp)get_Value(COLUMNNAME_MovementDate); - } - - /** MovementType AD_Reference_ID=189 */ - public static final int MOVEMENTTYPE_AD_Reference_ID=189; - /** Customer Shipment = C- */ - public static final String MOVEMENTTYPE_CustomerShipment = "C-"; - /** Customer Returns = C+ */ - public static final String MOVEMENTTYPE_CustomerReturns = "C+"; - /** Vendor Receipts = V+ */ - public static final String MOVEMENTTYPE_VendorReceipts = "V+"; - /** Vendor Returns = V- */ - public static final String MOVEMENTTYPE_VendorReturns = "V-"; - /** Inventory Out = I- */ - public static final String MOVEMENTTYPE_InventoryOut = "I-"; - /** Inventory In = I+ */ - public static final String MOVEMENTTYPE_InventoryIn = "I+"; - /** Movement From = M- */ - public static final String MOVEMENTTYPE_MovementFrom = "M-"; - /** Movement To = M+ */ - public static final String MOVEMENTTYPE_MovementTo = "M+"; - /** Production + = P+ */ - public static final String MOVEMENTTYPE_ProductionPlus = "P+"; - /** Production - = P- */ - public static final String MOVEMENTTYPE_Production_ = "P-"; - /** Work Order + = W+ */ - public static final String MOVEMENTTYPE_WorkOrderPlus = "W+"; - /** Work Order - = W- */ - public static final String MOVEMENTTYPE_WorkOrder_ = "W-"; - /** Set Movement Type. - @param MovementType - Method of moving the inventory - */ - public void setMovementType (String MovementType) - { - if (MovementType == null) throw new IllegalArgumentException ("MovementType is mandatory"); - if (MovementType.equals("C-") || MovementType.equals("C+") || MovementType.equals("V+") || MovementType.equals("V-") || MovementType.equals("I-") || MovementType.equals("I+") || MovementType.equals("M-") || MovementType.equals("M+") || MovementType.equals("P+") || MovementType.equals("P-") || MovementType.equals("W+") || MovementType.equals("W-")); else throw new IllegalArgumentException ("MovementType Invalid value - " + MovementType + " - Reference_ID=189 - C- - C+ - V+ - V- - I- - I+ - M- - M+ - P+ - P- - W+ - W-"); - if (MovementType.length() > 2) - { - log.warning("Length > 2 - truncated"); - MovementType = MovementType.substring(0, 2); - } - set_ValueNoCheck (COLUMNNAME_MovementType, MovementType); - } - - /** Get Movement Type. - @return Method of moving the inventory - */ - public String getMovementType () - { - return (String)get_Value(COLUMNNAME_MovementType); - } - /** Set No Packages. @param NoPackages Number of packages shipped @@ -1442,21 +1405,24 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent return false; } - /** Set Referenced Shipment. - @param Ref_InOut_ID Referenced Shipment */ - public void setRef_InOut_ID (int Ref_InOut_ID) + /** Set Referenced Order. + @param Ref_Order_ID + Reference to corresponding Sales/Purchase Order + */ + public void setRef_Order_ID (int Ref_Order_ID) { - if (Ref_InOut_ID < 1) - set_Value (COLUMNNAME_Ref_InOut_ID, null); + if (Ref_Order_ID < 1) + set_Value (COLUMNNAME_Ref_Order_ID, null); else - set_Value (COLUMNNAME_Ref_InOut_ID, Integer.valueOf(Ref_InOut_ID)); + set_Value (COLUMNNAME_Ref_Order_ID, Integer.valueOf(Ref_Order_ID)); } - /** Get Referenced Shipment. - @return Referenced Shipment */ - public int getRef_InOut_ID () + /** Get Referenced Order. + @return Reference to corresponding Sales/Purchase Order + */ + public int getRef_Order_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_Ref_InOut_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_Ref_Order_ID); if (ii == null) return 0; return ii.intValue(); diff --git a/base/src/org/eevolution/model/X_DD_OrderLine.java b/base/src/org/eevolution/model/X_DD_OrderLine.java new file mode 100644 index 0000000000..32c6167258 --- /dev/null +++ b/base/src/org/eevolution/model/X_DD_OrderLine.java @@ -0,0 +1,927 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; + +/** Generated Model for DD_OrderLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_DD_OrderLine extends PO implements I_DD_OrderLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_DD_OrderLine (Properties ctx, int DD_OrderLine_ID, String trxName) + { + super (ctx, DD_OrderLine_ID, trxName); + /** if (DD_OrderLine_ID == 0) + { + setC_UOM_ID (0); +// @#C_UOM_ID@ + setDD_OrderLine_ID (0); + setDD_Order_ID (0); + setIsDescription (false); +// N + setIsInvoiced (false); + setLine (0); +// @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM DD_OrderLine WHERE DD_OrderLine_ID=@DD_OrderLine_ID@ + setM_LocatorTo_ID (0); + setM_Locator_ID (0); + setProcessed (false); + setQtyEntered (Env.ZERO); +// 1 + setQtyOrdered (Env.ZERO); +// 1 + } */ + } + + /** Load Constructor */ + public X_DD_OrderLine (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 1 - 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() + { + StringBuffer sb = new StringBuffer ("X_DD_OrderLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** AD_OrgTrx_ID AD_Reference_ID=130 */ + public static final int AD_ORGTRX_ID_AD_Reference_ID=130; + /** Set Trx Organization. + @param AD_OrgTrx_ID + Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) + { + if (AD_OrgTrx_ID < 1) + set_Value (COLUMNNAME_AD_OrgTrx_ID, null); + else + set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); + } + + /** Get Trx Organization. + @return Performing or initiating organization + */ + public int getAD_OrgTrx_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Activity getC_Activity() throws Exception + { + Class clazz = MTable.getClass(I_C_Activity.Table_Name); + I_C_Activity result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Activity. + @param C_Activity_ID + Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID) + { + if (C_Activity_ID < 1) + set_Value (COLUMNNAME_C_Activity_ID, null); + else + set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); + } + + /** Get Activity. + @return Business Activity + */ + public int getC_Activity_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Campaign getC_Campaign() throws Exception + { + Class clazz = MTable.getClass(I_C_Campaign.Table_Name); + I_C_Campaign result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Campaign. + @param C_Campaign_ID + Marketing Campaign + */ + public void setC_Campaign_ID (int C_Campaign_ID) + { + if (C_Campaign_ID < 1) + set_Value (COLUMNNAME_C_Campaign_ID, null); + else + set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); + } + + /** Get Campaign. + @return Marketing Campaign + */ + public int getC_Campaign_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Charge getC_Charge() throws Exception + { + Class clazz = MTable.getClass(I_C_Charge.Table_Name); + I_C_Charge result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Charge. + @param C_Charge_ID + Additional document charges + */ + public void setC_Charge_ID (int C_Charge_ID) + { + if (C_Charge_ID < 1) + set_Value (COLUMNNAME_C_Charge_ID, null); + else + set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); + } + + /** Get Charge. + @return Additional document charges + */ + public int getC_Charge_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Project getC_Project() throws Exception + { + Class clazz = MTable.getClass(I_C_Project.Table_Name); + I_C_Project result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Project. + @param C_Project_ID + Financial Project + */ + public void setC_Project_ID (int C_Project_ID) + { + if (C_Project_ID < 1) + set_Value (COLUMNNAME_C_Project_ID, null); + else + set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); + } + + /** Get Project. + @return Financial Project + */ + public int getC_Project_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_UOM getC_UOM() throws Exception + { + Class clazz = MTable.getClass(I_C_UOM.Table_Name); + I_C_UOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set UOM. + @param C_UOM_ID + Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID) + { + if (C_UOM_ID < 1) + throw new IllegalArgumentException ("C_UOM_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); + } + + /** Get UOM. + @return Unit of Measure + */ + public int getC_UOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Confirmed Quantity. + @param ConfirmedQty + Confirmation of a received quantity + */ + public void setConfirmedQty (BigDecimal ConfirmedQty) + { + set_Value (COLUMNNAME_ConfirmedQty, ConfirmedQty); + } + + /** Get Confirmed Quantity. + @return Confirmation of a received quantity + */ + public BigDecimal getConfirmedQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ConfirmedQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Distribution Order Line. + @param DD_OrderLine_ID Distribution Order Line */ + public void setDD_OrderLine_ID (int DD_OrderLine_ID) + { + if (DD_OrderLine_ID < 1) + throw new IllegalArgumentException ("DD_OrderLine_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_DD_OrderLine_ID, Integer.valueOf(DD_OrderLine_ID)); + } + + /** Get Distribution Order Line. + @return Distribution Order Line */ + public int getDD_OrderLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_DD_OrderLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_DD_Order getDD_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_DD_Order.Table_Name); + org.eevolution.model.I_DD_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_DD_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getDD_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Distribution Order. + @param DD_Order_ID Distribution Order */ + public void setDD_Order_ID (int DD_Order_ID) + { + if (DD_Order_ID < 1) + throw new IllegalArgumentException ("DD_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_DD_Order_ID, Integer.valueOf(DD_Order_ID)); + } + + /** Get Distribution Order. + @return Distribution Order */ + public int getDD_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_DD_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Date Delivered. + @param DateDelivered + Date when the product was delivered + */ + public void setDateDelivered (Timestamp DateDelivered) + { + set_Value (COLUMNNAME_DateDelivered, DateDelivered); + } + + /** Get Date Delivered. + @return Date when the product was delivered + */ + public Timestamp getDateDelivered () + { + return (Timestamp)get_Value(COLUMNNAME_DateDelivered); + } + + /** Set Date Ordered. + @param DateOrdered + Date of Order + */ + public void setDateOrdered (Timestamp DateOrdered) + { + set_Value (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) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Freight Amount. + @param FreightAmt + Freight Amount + */ + public void setFreightAmt (BigDecimal FreightAmt) + { + set_Value (COLUMNNAME_FreightAmt, FreightAmt); + } + + /** Get Freight Amount. + @return Freight Amount + */ + public BigDecimal getFreightAmt () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FreightAmt); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Description Only. + @param IsDescription + if true, the line is just description and no transaction + */ + public void setIsDescription (boolean IsDescription) + { + set_Value (COLUMNNAME_IsDescription, Boolean.valueOf(IsDescription)); + } + + /** Get Description Only. + @return if true, the line is just description and no transaction + */ + public boolean isDescription () + { + Object oo = get_Value(COLUMNNAME_IsDescription); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Invoiced. + @param IsInvoiced + Is this invoiced? + */ + public void setIsInvoiced (boolean IsInvoiced) + { + set_Value (COLUMNNAME_IsInvoiced, Boolean.valueOf(IsInvoiced)); + } + + /** Get Invoiced. + @return Is this invoiced? + */ + public boolean isInvoiced () + { + Object oo = get_Value(COLUMNNAME_IsInvoiced); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Line No. + @param Line + Unique line for this document + */ + public void setLine (int Line) + { + set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); + } + + /** Get Line No. + @return Unique line for this document + */ + public int getLine () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Line); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getLine())); + } + + /** Set Line Amount. + @param LineNetAmt + Line Extended Amount (Quantity * Actual Price) without Freight and Charges + */ + public void setLineNetAmt (BigDecimal LineNetAmt) + { + set_Value (COLUMNNAME_LineNetAmt, LineNetAmt); + } + + /** Get Line Amount. + @return Line Extended Amount (Quantity * Actual Price) without Freight and Charges + */ + public BigDecimal getLineNetAmt () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_LineNetAmt); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Attribute Set Instance To. + @param M_AttributeSetInstanceTo_ID + Target Product Attribute Set Instance + */ + public void setM_AttributeSetInstanceTo_ID (int M_AttributeSetInstanceTo_ID) + { + if (M_AttributeSetInstanceTo_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstanceTo_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstanceTo_ID, Integer.valueOf(M_AttributeSetInstanceTo_ID)); + } + + /** Get Attribute Set Instance To. + @return Target Product Attribute Set Instance + */ + public int getM_AttributeSetInstanceTo_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstanceTo_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** M_LocatorTo_ID AD_Reference_ID=191 */ + public static final int M_LOCATORTO_ID_AD_Reference_ID=191; + /** Set Locator To. + @param M_LocatorTo_ID + Location inventory is moved to + */ + public void setM_LocatorTo_ID (int M_LocatorTo_ID) + { + if (M_LocatorTo_ID < 1) + throw new IllegalArgumentException ("M_LocatorTo_ID is mandatory."); + set_Value (COLUMNNAME_M_LocatorTo_ID, Integer.valueOf(M_LocatorTo_ID)); + } + + /** Get Locator To. + @return Location inventory is moved to + */ + public int getM_LocatorTo_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_LocatorTo_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** M_Locator_ID AD_Reference_ID=191 */ + public static final int M_LOCATOR_ID_AD_Reference_ID=191; + /** Set Locator. + @param M_Locator_ID + Warehouse Locator + */ + public void setM_Locator_ID (int M_Locator_ID) + { + if (M_Locator_ID < 1) + throw new IllegalArgumentException ("M_Locator_ID is mandatory."); + set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID)); + } + + /** Get Locator. + @return Warehouse Locator + */ + public int getM_Locator_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** M_Product_ID AD_Reference_ID=171 */ + public static final int M_PRODUCT_ID_AD_Reference_ID=171; + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + set_Value (COLUMNNAME_M_Product_ID, null); + else + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Picked Quantity. + @param PickedQty Picked Quantity */ + public void setPickedQty (BigDecimal PickedQty) + { + set_Value (COLUMNNAME_PickedQty, PickedQty); + } + + /** Get Picked Quantity. + @return Picked Quantity */ + public BigDecimal getPickedQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PickedQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Delivered Quantity. + @param QtyDelivered + Delivered Quantity + */ + public void setQtyDelivered (BigDecimal QtyDelivered) + { + set_Value (COLUMNNAME_QtyDelivered, QtyDelivered); + } + + /** Get Delivered Quantity. + @return Delivered Quantity + */ + public BigDecimal getQtyDelivered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyDelivered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Quantity. + @param QtyEntered + The Quantity Entered is based on the selected UoM + */ + public void setQtyEntered (BigDecimal QtyEntered) + { + if (QtyEntered == null) + throw new IllegalArgumentException ("QtyEntered is mandatory."); + set_Value (COLUMNNAME_QtyEntered, QtyEntered); + } + + /** Get Quantity. + @return The Quantity Entered is based on the selected UoM + */ + public BigDecimal getQtyEntered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyEntered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyInTransit. + @param QtyInTransit QtyInTransit */ + public void setQtyInTransit (BigDecimal QtyInTransit) + { + set_Value (COLUMNNAME_QtyInTransit, QtyInTransit); + } + + /** Get QtyInTransit. + @return QtyInTransit */ + public BigDecimal getQtyInTransit () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInTransit); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Ordered Quantity. + @param QtyOrdered + Ordered Quantity + */ + public void setQtyOrdered (BigDecimal QtyOrdered) + { + if (QtyOrdered == null) + throw new IllegalArgumentException ("QtyOrdered is mandatory."); + set_Value (COLUMNNAME_QtyOrdered, QtyOrdered); + } + + /** Get Ordered Quantity. + @return Ordered Quantity + */ + public BigDecimal getQtyOrdered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Reserved Quantity. + @param QtyReserved + Reserved Quantity + */ + public void setQtyReserved (BigDecimal QtyReserved) + { + set_Value (COLUMNNAME_QtyReserved, QtyReserved); + } + + /** Get Reserved Quantity. + @return Reserved Quantity + */ + public BigDecimal getQtyReserved () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Scrapped Quantity. + @param ScrappedQty + The Quantity scrapped due to QA issues + */ + public void setScrappedQty (BigDecimal ScrappedQty) + { + set_Value (COLUMNNAME_ScrappedQty, ScrappedQty); + } + + /** Get Scrapped Quantity. + @return The Quantity scrapped due to QA issues + */ + public BigDecimal getScrappedQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ScrappedQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Target Quantity. + @param TargetQty + Target Movement Quantity + */ + public void setTargetQty (BigDecimal TargetQty) + { + set_Value (COLUMNNAME_TargetQty, TargetQty); + } + + /** Get Target Quantity. + @return Target Movement Quantity + */ + public BigDecimal getTargetQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TargetQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** User1_ID AD_Reference_ID=134 */ + public static final int USER1_ID_AD_Reference_ID=134; + /** Set User List 1. + @param User1_ID + User defined list element #1 + */ + public void setUser1_ID (int User1_ID) + { + if (User1_ID < 1) + set_Value (COLUMNNAME_User1_ID, null); + else + set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); + } + + /** Get User List 1. + @return User defined list element #1 + */ + public int getUser1_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** User2_ID AD_Reference_ID=137 */ + public static final int USER2_ID_AD_Reference_ID=137; + /** Set User List 2. + @param User2_ID + User defined list element #2 + */ + public void setUser2_ID (int User2_ID) + { + if (User2_ID < 1) + set_Value (COLUMNNAME_User2_ID, null); + else + set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); + } + + /** Get User List 2. + @return User defined list element #2 + */ + public int getUser2_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_EXP_Format.java b/base/src/org/eevolution/model/X_EXP_Format.java new file mode 100644 index 0000000000..c355fb2ae1 --- /dev/null +++ b/base/src/org/eevolution/model/X_EXP_Format.java @@ -0,0 +1,340 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for EXP_Format + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_EXP_Format extends PO implements I_EXP_Format, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_EXP_Format (Properties ctx, int EXP_Format_ID, String trxName) + { + super (ctx, EXP_Format_ID, trxName); + /** if (EXP_Format_ID == 0) + { + setAD_Table_ID (0); + setEXP_Format_ID (0); + setName (null); + setValue (null); + setVersion (null); + } */ + } + + /** Load Constructor */ + public X_EXP_Format (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + 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() + { + StringBuffer sb = new StringBuffer ("X_EXP_Format[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Table getAD_Table() throws Exception + { + Class clazz = MTable.getClass(I_AD_Table.Table_Name); + I_AD_Table result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Table)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Table_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Table. + @param AD_Table_ID + Database Table information + */ + public void setAD_Table_ID (int AD_Table_ID) + { + if (AD_Table_ID < 1) + throw new IllegalArgumentException ("AD_Table_ID is mandatory."); + set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID)); + } + + /** Get Table. + @return Database Table information + */ + public int getAD_Table_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Export Format ID. + @param EXP_Format_ID Export Format ID */ + public void setEXP_Format_ID (int EXP_Format_ID) + { + if (EXP_Format_ID < 1) + throw new IllegalArgumentException ("EXP_Format_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_EXP_Format_ID, Integer.valueOf(EXP_Format_ID)); + } + + /** Get Export Format ID. + @return Export Format ID */ + public int getEXP_Format_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_Format_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** 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; + } + + /** Set Test Export Model. + @param TestExportModel Test Export Model */ + public void setTestExportModel (String TestExportModel) + { + + if (TestExportModel != null && TestExportModel.length() > 1) + { + log.warning("Length > 1 - truncated"); + TestExportModel = TestExportModel.substring(0, 1); + } + set_Value (COLUMNNAME_TestExportModel, TestExportModel); + } + + /** Get Test Export Model. + @return Test Export Model */ + public String getTestExportModel () + { + return (String)get_Value(COLUMNNAME_TestExportModel); + } + + /** Set TestImportModel. + @param TestImportModel TestImportModel */ + public void setTestImportModel (String TestImportModel) + { + + if (TestImportModel != null && TestImportModel.length() > 1) + { + log.warning("Length > 1 - truncated"); + TestImportModel = TestImportModel.substring(0, 1); + } + set_Value (COLUMNNAME_TestImportModel, TestImportModel); + } + + /** Get TestImportModel. + @return TestImportModel */ + public String getTestImportModel () + { + return (String)get_Value(COLUMNNAME_TestImportModel); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + /** Set Version. + @param Version + Version of the table definition + */ + public void setVersion (String Version) + { + if (Version == null) + throw new IllegalArgumentException ("Version is mandatory."); + + if (Version.length() > 40) + { + log.warning("Length > 40 - truncated"); + Version = Version.substring(0, 40); + } + set_Value (COLUMNNAME_Version, Version); + } + + /** Get Version. + @return Version of the table definition + */ + public String getVersion () + { + return (String)get_Value(COLUMNNAME_Version); + } + + /** Set Sql WHERE. + @param WhereClause + Fully qualified SQL WHERE clause + */ + public void setWhereClause (String WhereClause) + { + + if (WhereClause != null && WhereClause.length() > 255) + { + log.warning("Length > 255 - truncated"); + WhereClause = WhereClause.substring(0, 255); + } + set_Value (COLUMNNAME_WhereClause, WhereClause); + } + + /** Get Sql WHERE. + @return Fully qualified SQL WHERE clause + */ + public String getWhereClause () + { + return (String)get_Value(COLUMNNAME_WhereClause); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_EXP_FormatLine.java b/base/src/org/eevolution/model/X_EXP_FormatLine.java new file mode 100644 index 0000000000..57d5538a30 --- /dev/null +++ b/base/src/org/eevolution/model/X_EXP_FormatLine.java @@ -0,0 +1,430 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for EXP_FormatLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_EXP_FormatLine extends PO implements I_EXP_FormatLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_EXP_FormatLine (Properties ctx, int EXP_FormatLine_ID, String trxName) + { + super (ctx, EXP_FormatLine_ID, trxName); + /** if (EXP_FormatLine_ID == 0) + { + setAD_Column_ID (0); + setEXP_FormatLine_ID (0); + setName (null); + setType (null); +// E + setValue (null); + } */ + } + + /** Load Constructor */ + public X_EXP_FormatLine (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + 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() + { + StringBuffer sb = new StringBuffer ("X_EXP_FormatLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Column getAD_Column() throws Exception + { + Class clazz = MTable.getClass(I_AD_Column.Table_Name); + I_AD_Column result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Column)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Column_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Column. + @param AD_Column_ID + Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID) + { + if (AD_Column_ID < 1) + throw new IllegalArgumentException ("AD_Column_ID is mandatory."); + set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID)); + } + + /** Get Column. + @return Column in the table + */ + public int getAD_Column_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** AD_Reference_ID AD_Reference_ID=1 */ + public static final int AD_REFERENCE_ID_AD_Reference_ID=1; + /** Set Reference. + @param AD_Reference_ID + System Reference and Validation + */ + public void setAD_Reference_ID (int AD_Reference_ID) + { + throw new IllegalArgumentException ("AD_Reference_ID is virtual column"); } + + /** Get Reference. + @return System Reference and Validation + */ + public int getAD_Reference_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Reference_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Date Format. + @param DateFormat + Date format used in the imput format + */ + public void setDateFormat (String DateFormat) + { + + if (DateFormat != null && DateFormat.length() > 40) + { + log.warning("Length > 40 - truncated"); + DateFormat = DateFormat.substring(0, 40); + } + set_Value (COLUMNNAME_DateFormat, DateFormat); + } + + /** Get Date Format. + @return Date format used in the imput format + */ + public String getDateFormat () + { + return (String)get_Value(COLUMNNAME_DateFormat); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** EXP_EmbeddedFormat_ID AD_Reference_ID=53242 */ + public static final int EXP_EMBEDDEDFORMAT_ID_AD_Reference_ID=53242; + /** Set EXP_EmbeddedFormat_ID. + @param EXP_EmbeddedFormat_ID EXP_EmbeddedFormat_ID */ + public void setEXP_EmbeddedFormat_ID (int EXP_EmbeddedFormat_ID) + { + if (EXP_EmbeddedFormat_ID < 1) + set_Value (COLUMNNAME_EXP_EmbeddedFormat_ID, null); + else + set_Value (COLUMNNAME_EXP_EmbeddedFormat_ID, Integer.valueOf(EXP_EmbeddedFormat_ID)); + } + + /** Get EXP_EmbeddedFormat_ID. + @return EXP_EmbeddedFormat_ID */ + public int getEXP_EmbeddedFormat_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_EmbeddedFormat_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set EXP_FormatLine_ID. + @param EXP_FormatLine_ID EXP_FormatLine_ID */ + public void setEXP_FormatLine_ID (int EXP_FormatLine_ID) + { + if (EXP_FormatLine_ID < 1) + throw new IllegalArgumentException ("EXP_FormatLine_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_EXP_FormatLine_ID, Integer.valueOf(EXP_FormatLine_ID)); + } + + /** Get EXP_FormatLine_ID. + @return EXP_FormatLine_ID */ + public int getEXP_FormatLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_FormatLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_EXP_Format getEXP_Format() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_EXP_Format.Table_Name); + org.eevolution.model.I_EXP_Format result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_EXP_Format)constructor.newInstance(new Object[] {getCtx(), new Integer(getEXP_Format_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Export Format ID. + @param EXP_Format_ID Export Format ID */ + public void setEXP_Format_ID (int EXP_Format_ID) + { + if (EXP_Format_ID < 1) + set_ValueNoCheck (COLUMNNAME_EXP_Format_ID, null); + else + set_ValueNoCheck (COLUMNNAME_EXP_Format_ID, Integer.valueOf(EXP_Format_ID)); + } + + /** Get Export Format ID. + @return Export Format ID */ + public int getEXP_Format_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_Format_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Mandatory. + @param IsMandatory + Data entry is required in this column + */ + public void setIsMandatory (boolean IsMandatory) + { + set_Value (COLUMNNAME_IsMandatory, Boolean.valueOf(IsMandatory)); + } + + /** Get Mandatory. + @return Data entry is required in this column + */ + public boolean isMandatory () + { + Object oo = get_Value(COLUMNNAME_IsMandatory); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set IsPartUniqueIndex. + @param IsPartUniqueIndex IsPartUniqueIndex */ + public void setIsPartUniqueIndex (boolean IsPartUniqueIndex) + { + set_Value (COLUMNNAME_IsPartUniqueIndex, Boolean.valueOf(IsPartUniqueIndex)); + } + + /** Get IsPartUniqueIndex. + @return IsPartUniqueIndex */ + public boolean isPartUniqueIndex () + { + Object oo = get_Value(COLUMNNAME_IsPartUniqueIndex); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set Position. + @param Position Position */ + public void setPosition (int Position) + { + set_Value (COLUMNNAME_Position, Integer.valueOf(Position)); + } + + /** Get Position. + @return Position */ + public int getPosition () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Position); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Type AD_Reference_ID=53241 */ + public static final int TYPE_AD_Reference_ID=53241; + /** XML Element = E */ + public static final String TYPE_XMLElement = "E"; + /** XML Attribute = A */ + public static final String TYPE_XMLAttribute = "A"; + /** Embedded EXP Format = M */ + public static final String TYPE_EmbeddedEXPFormat = "M"; + /** Referenced EXP Format = R */ + public static final String TYPE_ReferencedEXPFormat = "R"; + /** Set Type. + @param Type + Type of Validation (SQL, Java Script, Java Language) + */ + public void setType (String Type) + { + if (Type == null) throw new IllegalArgumentException ("Type is mandatory"); + if (Type.equals("E") || Type.equals("A") || Type.equals("M") || Type.equals("R")); else throw new IllegalArgumentException ("Type Invalid value - " + Type + " - Reference_ID=53241 - E - A - M - R"); + if (Type.length() > 1) + { + log.warning("Length > 1 - truncated"); + Type = Type.substring(0, 1); + } + set_Value (COLUMNNAME_Type, Type); + } + + /** Get Type. + @return Type of Validation (SQL, Java Script, Java Language) + */ + public String getType () + { + return (String)get_Value(COLUMNNAME_Type); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_EXP_Processor.java b/base/src/org/eevolution/model/X_EXP_Processor.java new file mode 100644 index 0000000000..a75d23005f --- /dev/null +++ b/base/src/org/eevolution/model/X_EXP_Processor.java @@ -0,0 +1,304 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for EXP_Processor + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_EXP_Processor extends PO implements I_EXP_Processor, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_EXP_Processor (Properties ctx, int EXP_Processor_ID, String trxName) + { + super (ctx, EXP_Processor_ID, trxName); + /** if (EXP_Processor_ID == 0) + { + setEXP_Processor_ID (0); + setEXP_Processor_Type_ID (0); + setName (null); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_EXP_Processor (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 7 - System - 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() + { + StringBuffer sb = new StringBuffer ("X_EXP_Processor[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Account. + @param Account Account */ + public void setAccount (String Account) + { + + if (Account != null && Account.length() > 255) + { + log.warning("Length > 255 - truncated"); + Account = Account.substring(0, 255); + } + set_Value (COLUMNNAME_Account, Account); + } + + /** Get Account. + @return Account */ + public String getAccount () + { + return (String)get_Value(COLUMNNAME_Account); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set EXP_Processor_ID. + @param EXP_Processor_ID EXP_Processor_ID */ + public void setEXP_Processor_ID (int EXP_Processor_ID) + { + if (EXP_Processor_ID < 1) + throw new IllegalArgumentException ("EXP_Processor_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_EXP_Processor_ID, Integer.valueOf(EXP_Processor_ID)); + } + + /** Get EXP_Processor_ID. + @return EXP_Processor_ID */ + public int getEXP_Processor_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_Processor_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_EXP_Processor_Type getEXP_Processor_Type() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_EXP_Processor_Type.Table_Name); + org.eevolution.model.I_EXP_Processor_Type result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_EXP_Processor_Type)constructor.newInstance(new Object[] {getCtx(), new Integer(getEXP_Processor_Type_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set EXP_Processor_Type_ID. + @param EXP_Processor_Type_ID EXP_Processor_Type_ID */ + public void setEXP_Processor_Type_ID (int EXP_Processor_Type_ID) + { + if (EXP_Processor_Type_ID < 1) + throw new IllegalArgumentException ("EXP_Processor_Type_ID is mandatory."); + set_Value (COLUMNNAME_EXP_Processor_Type_ID, Integer.valueOf(EXP_Processor_Type_ID)); + } + + /** Get EXP_Processor_Type_ID. + @return EXP_Processor_Type_ID */ + public int getEXP_Processor_Type_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_Processor_Type_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Host. + @param Host Host */ + public void setHost (String Host) + { + + if (Host != null && Host.length() > 255) + { + log.warning("Length > 255 - truncated"); + Host = Host.substring(0, 255); + } + set_Value (COLUMNNAME_Host, Host); + } + + /** Get Host. + @return Host */ + public String getHost () + { + return (String)get_Value(COLUMNNAME_Host); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set PasswordInfo. + @param PasswordInfo PasswordInfo */ + public void setPasswordInfo (String PasswordInfo) + { + + if (PasswordInfo != null && PasswordInfo.length() > 255) + { + log.warning("Length > 255 - truncated"); + PasswordInfo = PasswordInfo.substring(0, 255); + } + set_Value (COLUMNNAME_PasswordInfo, PasswordInfo); + } + + /** Get PasswordInfo. + @return PasswordInfo */ + public String getPasswordInfo () + { + return (String)get_Value(COLUMNNAME_PasswordInfo); + } + + /** Set Port. + @param Port Port */ + public void setPort (int Port) + { + set_Value (COLUMNNAME_Port, Integer.valueOf(Port)); + } + + /** Get Port. + @return Port */ + public int getPort () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Port); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_EXP_ProcessorParameter.java b/base/src/org/eevolution/model/X_EXP_ProcessorParameter.java new file mode 100644 index 0000000000..00d934ace1 --- /dev/null +++ b/base/src/org/eevolution/model/X_EXP_ProcessorParameter.java @@ -0,0 +1,247 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for EXP_ProcessorParameter + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_EXP_ProcessorParameter extends PO implements I_EXP_ProcessorParameter, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_EXP_ProcessorParameter (Properties ctx, int EXP_ProcessorParameter_ID, String trxName) + { + super (ctx, EXP_ProcessorParameter_ID, trxName); + /** if (EXP_ProcessorParameter_ID == 0) + { + setEXP_ProcessorParameter_ID (0); + setEXP_Processor_ID (0); + setName (null); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_EXP_ProcessorParameter (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 7 - System - 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() + { + StringBuffer sb = new StringBuffer ("X_EXP_ProcessorParameter[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set EXP_ProcessorParameter_ID. + @param EXP_ProcessorParameter_ID EXP_ProcessorParameter_ID */ + public void setEXP_ProcessorParameter_ID (int EXP_ProcessorParameter_ID) + { + if (EXP_ProcessorParameter_ID < 1) + throw new IllegalArgumentException ("EXP_ProcessorParameter_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_EXP_ProcessorParameter_ID, Integer.valueOf(EXP_ProcessorParameter_ID)); + } + + /** Get EXP_ProcessorParameter_ID. + @return EXP_ProcessorParameter_ID */ + public int getEXP_ProcessorParameter_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_ProcessorParameter_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_EXP_Processor getEXP_Processor() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_EXP_Processor.Table_Name); + org.eevolution.model.I_EXP_Processor result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_EXP_Processor)constructor.newInstance(new Object[] {getCtx(), new Integer(getEXP_Processor_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set EXP_Processor_ID. + @param EXP_Processor_ID EXP_Processor_ID */ + public void setEXP_Processor_ID (int EXP_Processor_ID) + { + if (EXP_Processor_ID < 1) + throw new IllegalArgumentException ("EXP_Processor_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_EXP_Processor_ID, Integer.valueOf(EXP_Processor_ID)); + } + + /** Get EXP_Processor_ID. + @return EXP_Processor_ID */ + public int getEXP_Processor_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_Processor_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set ParameterValue. + @param ParameterValue ParameterValue */ + public void setParameterValue (String ParameterValue) + { + + if (ParameterValue != null && ParameterValue.length() > 60) + { + log.warning("Length > 60 - truncated"); + ParameterValue = ParameterValue.substring(0, 60); + } + set_Value (COLUMNNAME_ParameterValue, ParameterValue); + } + + /** Get ParameterValue. + @return ParameterValue */ + public String getParameterValue () + { + return (String)get_Value(COLUMNNAME_ParameterValue); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_EXP_Processor_Type.java b/base/src/org/eevolution/model/X_EXP_Processor_Type.java new file mode 100644 index 0000000000..67a84d6efb --- /dev/null +++ b/base/src/org/eevolution/model/X_EXP_Processor_Type.java @@ -0,0 +1,212 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.model.*; + +/** Generated Model for EXP_Processor_Type + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_EXP_Processor_Type extends PO implements I_EXP_Processor_Type, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_EXP_Processor_Type (Properties ctx, int EXP_Processor_Type_ID, String trxName) + { + super (ctx, EXP_Processor_Type_ID, trxName); + /** if (EXP_Processor_Type_ID == 0) + { + setEXP_Processor_Type_ID (0); + setJavaClass (null); + setName (null); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_EXP_Processor_Type (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 7 - System - 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() + { + StringBuffer sb = new StringBuffer ("X_EXP_Processor_Type[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set EXP_Processor_Type_ID. + @param EXP_Processor_Type_ID EXP_Processor_Type_ID */ + public void setEXP_Processor_Type_ID (int EXP_Processor_Type_ID) + { + if (EXP_Processor_Type_ID < 1) + throw new IllegalArgumentException ("EXP_Processor_Type_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_EXP_Processor_Type_ID, Integer.valueOf(EXP_Processor_Type_ID)); + } + + /** Get EXP_Processor_Type_ID. + @return EXP_Processor_Type_ID */ + public int getEXP_Processor_Type_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_EXP_Processor_Type_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set JavaClass. + @param JavaClass JavaClass */ + public void setJavaClass (String JavaClass) + { + if (JavaClass == null) + throw new IllegalArgumentException ("JavaClass is mandatory."); + + if (JavaClass.length() > 255) + { + log.warning("Length > 255 - truncated"); + JavaClass = JavaClass.substring(0, 255); + } + set_Value (COLUMNNAME_JavaClass, JavaClass); + } + + /** Get JavaClass. + @return JavaClass */ + public String getJavaClass () + { + return (String)get_Value(COLUMNNAME_JavaClass); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Attribute.java b/base/src/org/eevolution/model/X_HR_Attribute.java new file mode 100644 index 0000000000..6b05285deb --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Attribute.java @@ -0,0 +1,600 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; + +/** Generated Model for HR_Attribute + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Attribute extends PO implements I_HR_Attribute, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Attribute (Properties ctx, int HR_Attribute_ID, String trxName) + { + super (ctx, HR_Attribute_ID, trxName); + /** if (HR_Attribute_ID == 0) + { + setHR_Attribute_ID (0); + setHR_Concept_ID (0); + setValidFrom (new Timestamp(System.currentTimeMillis())); + } */ + } + + /** Load Constructor */ + public X_HR_Attribute (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Attribute[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Rule getAD_Rule() throws Exception + { + Class clazz = MTable.getClass(I_AD_Rule.Table_Name); + I_AD_Rule result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Rule)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Rule_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Rule. + @param AD_Rule_ID Rule */ + public void setAD_Rule_ID (int AD_Rule_ID) + { + if (AD_Rule_ID < 1) + set_Value (COLUMNNAME_AD_Rule_ID, null); + else + set_Value (COLUMNNAME_AD_Rule_ID, Integer.valueOf(AD_Rule_ID)); + } + + /** Get Rule. + @return Rule */ + public int getAD_Rule_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Rule_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Amount. + @param Amount + Amount in a defined currency + */ + public void setAmount (BigDecimal Amount) + { + set_Value (COLUMNNAME_Amount, Amount); + } + + /** Get Amount. + @return Amount in a defined currency + */ + public BigDecimal getAmount () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amount); + if (bd == null) + return Env.ZERO; + return bd; + } + + public I_C_BPartner getC_BPartner() throws Exception + { + Class clazz = MTable.getClass(I_C_BPartner.Table_Name); + I_C_BPartner result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + } + + /** 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(); + } + + /** ColumnType AD_Reference_ID=53243 */ + public static final int COLUMNTYPE_AD_Reference_ID=53243; + /** Amount = A */ + public static final String COLUMNTYPE_Amount = "A"; + /** Date = D */ + public static final String COLUMNTYPE_Date = "D"; + /** Quantity = Q */ + public static final String COLUMNTYPE_Quantity = "Q"; + /** Text = T */ + public static final String COLUMNTYPE_Text = "T"; + /** Set Column Type. + @param ColumnType Column Type */ + public void setColumnType (String ColumnType) + { + + if (ColumnType == null || ColumnType.equals("A") || ColumnType.equals("D") || ColumnType.equals("Q") || ColumnType.equals("T")); else throw new IllegalArgumentException ("ColumnType Invalid value - " + ColumnType + " - Reference_ID=53243 - A - D - Q - T"); + if (ColumnType != null && ColumnType.length() > 1) + { + log.warning("Length > 1 - truncated"); + ColumnType = ColumnType.substring(0, 1); + } + set_Value (COLUMNNAME_ColumnType, ColumnType); + } + + /** Get Column Type. + @return Column Type */ + public String getColumnType () + { + return (String)get_Value(COLUMNNAME_ColumnType); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Account Payroll Employee Attribute. + @param HR_Attribute_Acct + Account for Employee Attribute + */ + public void setHR_Attribute_Acct (int HR_Attribute_Acct) + { + set_Value (COLUMNNAME_HR_Attribute_Acct, Integer.valueOf(HR_Attribute_Acct)); + } + + /** Get Account Payroll Employee Attribute. + @return Account for Employee Attribute + */ + public int getHR_Attribute_Acct () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Attribute_Acct); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll Employee Attribute. + @param HR_Attribute_ID Payroll Employee Attribute */ + public void setHR_Attribute_ID (int HR_Attribute_ID) + { + if (HR_Attribute_ID < 1) + throw new IllegalArgumentException ("HR_Attribute_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Attribute_ID, Integer.valueOf(HR_Attribute_ID)); + } + + /** Get Payroll Employee Attribute. + @return Payroll Employee Attribute */ + public int getHR_Attribute_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Attribute_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Concept getHR_Concept() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Concept.Table_Name); + org.eevolution.model.I_HR_Concept result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Concept)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Concept_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Concept. + @param HR_Concept_ID Concept */ + public void setHR_Concept_ID (int HR_Concept_ID) + { + if (HR_Concept_ID < 1) + throw new IllegalArgumentException ("HR_Concept_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Concept_ID, Integer.valueOf(HR_Concept_ID)); + } + + /** Get Concept. + @return Concept */ + public int getHR_Concept_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Department.Table_Name); + org.eevolution.model.I_HR_Department result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Department)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Department_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Department. + @param HR_Department_ID Department */ + public void setHR_Department_ID (int HR_Department_ID) + { + if (HR_Department_ID < 1) + set_Value (COLUMNNAME_HR_Department_ID, null); + else + set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID)); + } + + /** Get Department. + @return Department */ + public int getHR_Department_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Employee getHR_Employee() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Employee.Table_Name); + org.eevolution.model.I_HR_Employee result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Employee)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Employee_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Employee. + @param HR_Employee_ID Employee */ + public void setHR_Employee_ID (int HR_Employee_ID) + { + if (HR_Employee_ID < 1) + set_Value (COLUMNNAME_HR_Employee_ID, null); + else + set_Value (COLUMNNAME_HR_Employee_ID, Integer.valueOf(HR_Employee_ID)); + } + + /** Get Employee. + @return Employee */ + public int getHR_Employee_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Employee_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Job.Table_Name); + org.eevolution.model.I_HR_Job result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Job)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Job_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Job. + @param HR_Job_ID Job */ + public void setHR_Job_ID (int HR_Job_ID) + { + if (HR_Job_ID < 1) + set_Value (COLUMNNAME_HR_Job_ID, null); + else + set_Value (COLUMNNAME_HR_Job_ID, Integer.valueOf(HR_Job_ID)); + } + + /** Get Job. + @return Job */ + public int getHR_Job_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Job_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Payroll.Table_Name); + org.eevolution.model.I_HR_Payroll result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Payroll)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Payroll_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + set_Value (COLUMNNAME_HR_Payroll_ID, null); + else + set_Value (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); + } + + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Printed. + @param IsPrinted + Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted) + { + set_Value (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted)); + } + + /** Get Printed. + @return Indicates if this document / line is printed + */ + public boolean isPrinted () + { + Object oo = get_Value(COLUMNNAME_IsPrinted); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set MaxValue. + @param MaxValue MaxValue */ + public void setMaxValue (int MaxValue) + { + set_Value (COLUMNNAME_MaxValue, Integer.valueOf(MaxValue)); + } + + /** Get MaxValue. + @return MaxValue */ + public int getMaxValue () + { + Integer ii = (Integer)get_Value(COLUMNNAME_MaxValue); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set MinValue. + @param MinValue MinValue */ + public void setMinValue (int MinValue) + { + set_Value (COLUMNNAME_MinValue, Integer.valueOf(MinValue)); + } + + /** Get MinValue. + @return MinValue */ + public int getMinValue () + { + Integer ii = (Integer)get_Value(COLUMNNAME_MinValue); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Quantity. + @param Qty + Quantity + */ + public void setQty (BigDecimal Qty) + { + set_Value (COLUMNNAME_Qty, Qty); + } + + /** Get Quantity. + @return Quantity + */ + public BigDecimal getQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Service date. + @param ServiceDate + Date service was provided + */ + public void setServiceDate (Timestamp ServiceDate) + { + set_Value (COLUMNNAME_ServiceDate, ServiceDate); + } + + /** Get Service date. + @return Date service was provided + */ + public Timestamp getServiceDate () + { + return (Timestamp)get_Value(COLUMNNAME_ServiceDate); + } + + /** Set Text Message. + @param TextMsg + Text Message + */ + public void setTextMsg (String TextMsg) + { + + if (TextMsg != null && TextMsg.length() > 255) + { + log.warning("Length > 255 - truncated"); + TextMsg = TextMsg.substring(0, 255); + } + set_Value (COLUMNNAME_TextMsg, TextMsg); + } + + /** Get Text Message. + @return Text Message + */ + public String getTextMsg () + { + return (String)get_Value(COLUMNNAME_TextMsg); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + if (ValidFrom == null) + throw new IllegalArgumentException ("ValidFrom is mandatory."); + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Concept.java b/base/src/org/eevolution/model/X_HR_Concept.java new file mode 100644 index 0000000000..5a7beda97a --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Concept.java @@ -0,0 +1,620 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_Concept + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Concept extends PO implements I_HR_Concept, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Concept (Properties ctx, int HR_Concept_ID, String trxName) + { + super (ctx, HR_Concept_ID, trxName); + /** if (HR_Concept_ID == 0) + { + setColumnType (null); + setHR_Concept_ID (0); + setName (null); + setType (null); + } */ + } + + /** Load Constructor */ + public X_HR_Concept (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Concept[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** AccountSign AD_Reference_ID=118 */ + public static final int ACCOUNTSIGN_AD_Reference_ID=118; + /** Natural = N */ + public static final String ACCOUNTSIGN_Natural = "N"; + /** Debit = D */ + public static final String ACCOUNTSIGN_Debit = "D"; + /** Credit = C */ + public static final String ACCOUNTSIGN_Credit = "C"; + /** Set Account Sign. + @param AccountSign + Indicates the Natural Sign of the Account as a Debit or Credit + */ + public void setAccountSign (String AccountSign) + { + + if (AccountSign == null || AccountSign.equals("N") || AccountSign.equals("D") || AccountSign.equals("C")); else throw new IllegalArgumentException ("AccountSign Invalid value - " + AccountSign + " - Reference_ID=118 - N - D - C"); + if (AccountSign != null && AccountSign.length() > 1) + { + log.warning("Length > 1 - truncated"); + AccountSign = AccountSign.substring(0, 1); + } + set_Value (COLUMNNAME_AccountSign, AccountSign); + } + + /** Get Account Sign. + @return Indicates the Natural Sign of the Account as a Debit or Credit + */ + public String getAccountSign () + { + return (String)get_Value(COLUMNNAME_AccountSign); + } + + /** ColumnType AD_Reference_ID=53243 */ + public static final int COLUMNTYPE_AD_Reference_ID=53243; + /** Amount = A */ + public static final String COLUMNTYPE_Amount = "A"; + /** Date = D */ + public static final String COLUMNTYPE_Date = "D"; + /** Quantity = Q */ + public static final String COLUMNTYPE_Quantity = "Q"; + /** Text = T */ + public static final String COLUMNTYPE_Text = "T"; + /** Set Column Type. + @param ColumnType Column Type */ + public void setColumnType (String ColumnType) + { + if (ColumnType == null) throw new IllegalArgumentException ("ColumnType is mandatory"); + if (ColumnType.equals("A") || ColumnType.equals("D") || ColumnType.equals("Q") || ColumnType.equals("T")); else throw new IllegalArgumentException ("ColumnType Invalid value - " + ColumnType + " - Reference_ID=53243 - A - D - Q - T"); + if (ColumnType.length() > 1) + { + log.warning("Length > 1 - truncated"); + ColumnType = ColumnType.substring(0, 1); + } + set_Value (COLUMNNAME_ColumnType, ColumnType); + } + + /** Get Column Type. + @return Column Type */ + public String getColumnType () + { + return (String)get_Value(COLUMNNAME_ColumnType); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + public org.eevolution.model.I_HR_Concept_Category getHR_Concept_Category() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Concept_Category.Table_Name); + org.eevolution.model.I_HR_Concept_Category result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Concept_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Concept_Category_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll Concept Category. + @param HR_Concept_Category_ID Payroll Concept Category */ + public void setHR_Concept_Category_ID (int HR_Concept_Category_ID) + { + if (HR_Concept_Category_ID < 1) + set_Value (COLUMNNAME_HR_Concept_Category_ID, null); + else + set_Value (COLUMNNAME_HR_Concept_Category_ID, Integer.valueOf(HR_Concept_Category_ID)); + } + + /** Get Payroll Concept Category. + @return Payroll Concept Category */ + public int getHR_Concept_Category_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_Category_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Concept. + @param HR_Concept_ID Concept */ + public void setHR_Concept_ID (int HR_Concept_ID) + { + if (HR_Concept_ID < 1) + throw new IllegalArgumentException ("HR_Concept_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Concept_ID, Integer.valueOf(HR_Concept_ID)); + } + + /** Get Concept. + @return Concept */ + public int getHR_Concept_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Department.Table_Name); + org.eevolution.model.I_HR_Department result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Department)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Department_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Department. + @param HR_Department_ID Department */ + public void setHR_Department_ID (int HR_Department_ID) + { + if (HR_Department_ID < 1) + set_Value (COLUMNNAME_HR_Department_ID, null); + else + set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID)); + } + + /** Get Department. + @return Department */ + public int getHR_Department_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Job.Table_Name); + org.eevolution.model.I_HR_Job result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Job)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Job_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Job. + @param HR_Job_ID Job */ + public void setHR_Job_ID (int HR_Job_ID) + { + if (HR_Job_ID < 1) + set_Value (COLUMNNAME_HR_Job_ID, null); + else + set_Value (COLUMNNAME_HR_Job_ID, Integer.valueOf(HR_Job_ID)); + } + + /** Get Job. + @return Job */ + public int getHR_Job_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Job_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Payroll.Table_Name); + org.eevolution.model.I_HR_Payroll result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Payroll)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Payroll_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + set_Value (COLUMNNAME_HR_Payroll_ID, null); + else + set_Value (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); + } + + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Default. + @param IsDefault + Default value + */ + public void setIsDefault (boolean IsDefault) + { + set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); + } + + /** Get Default. + @return Default value + */ + public boolean isDefault () + { + Object oo = get_Value(COLUMNNAME_IsDefault); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Employee. + @param IsEmployee + Indicates if this Business Partner is an employee + */ + public void setIsEmployee (boolean IsEmployee) + { + set_Value (COLUMNNAME_IsEmployee, Boolean.valueOf(IsEmployee)); + } + + /** Get Employee. + @return Indicates if this Business Partner is an employee + */ + public boolean isEmployee () + { + Object oo = get_Value(COLUMNNAME_IsEmployee); + 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 Printed. + @param IsPrinted + Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted) + { + set_Value (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted)); + } + + /** Get Printed. + @return Indicates if this document / line is printed + */ + public boolean isPrinted () + { + Object oo = get_Value(COLUMNNAME_IsPrinted); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Read Write. + @param IsReadWrite + Field is read / write + */ + public void setIsReadWrite (boolean IsReadWrite) + { + set_Value (COLUMNNAME_IsReadWrite, Boolean.valueOf(IsReadWrite)); + } + + /** Get Read Write. + @return Field is read / write + */ + public boolean isReadWrite () + { + Object oo = get_Value(COLUMNNAME_IsReadWrite); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Receipt. + @param IsReceipt + This is a sales transaction (receipt) + */ + public void setIsReceipt (boolean IsReceipt) + { + set_Value (COLUMNNAME_IsReceipt, Boolean.valueOf(IsReceipt)); + } + + /** Get Receipt. + @return This is a sales transaction (receipt) + */ + public boolean isReceipt () + { + Object oo = get_Value(COLUMNNAME_IsReceipt); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Registered. + @param IsRegistered + The application is registered. + */ + public void setIsRegistered (boolean IsRegistered) + { + set_Value (COLUMNNAME_IsRegistered, Boolean.valueOf(IsRegistered)); + } + + /** Get Registered. + @return The application is registered. + */ + public boolean isRegistered () + { + Object oo = get_Value(COLUMNNAME_IsRegistered); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Type AD_Reference_ID=53245 */ + public static final int TYPE_AD_Reference_ID=53245; + /** Concept = C */ + public static final String TYPE_Concept = "C"; + /** Rule Engine = E */ + public static final String TYPE_RuleEngine = "E"; + /** Information = I */ + public static final String TYPE_Information = "I"; + /** Reference = R */ + public static final String TYPE_Reference = "R"; + /** Set Type. + @param Type + Type of Validation (SQL, Java Script, Java Language) + */ + public void setType (String Type) + { + if (Type == null) throw new IllegalArgumentException ("Type is mandatory"); + if (Type.equals("C") || Type.equals("E") || Type.equals("I") || Type.equals("R")); else throw new IllegalArgumentException ("Type Invalid value - " + Type + " - Reference_ID=53245 - C - E - I - R"); + if (Type.length() > 1) + { + log.warning("Length > 1 - truncated"); + Type = Type.substring(0, 1); + } + set_Value (COLUMNNAME_Type, Type); + } + + /** Get Type. + @return Type of Validation (SQL, Java Script, Java Language) + */ + public String getType () + { + return (String)get_Value(COLUMNNAME_Type); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getValue()); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Concept_Acct.java b/base/src/org/eevolution/model/X_HR_Concept_Acct.java new file mode 100644 index 0000000000..97949c2a95 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Concept_Acct.java @@ -0,0 +1,315 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for HR_Concept_Acct + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Concept_Acct extends PO implements I_HR_Concept_Acct, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Concept_Acct (Properties ctx, int HR_Concept_Acct_ID, String trxName) + { + super (ctx, HR_Concept_Acct_ID, trxName); + /** if (HR_Concept_Acct_ID == 0) + { + setC_AcctSchema_ID (0); + setHR_Concept_Acct_ID (0); + setHR_Concept_ID (0); + setHR_Expense_Acct (0); + setHR_Revenue_Acct (0); + } */ + } + + /** Load Constructor */ + public X_HR_Concept_Acct (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Concept_Acct[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_C_AcctSchema getC_AcctSchema() throws Exception + { + Class clazz = MTable.getClass(I_C_AcctSchema.Table_Name); + I_C_AcctSchema result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Accounting Schema. + @param C_AcctSchema_ID + Rules for accounting + */ + public void setC_AcctSchema_ID (int C_AcctSchema_ID) + { + if (C_AcctSchema_ID < 1) + throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory."); + set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID)); + } + + /** Get Accounting Schema. + @return Rules for accounting + */ + public int getC_AcctSchema_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_BP_Group getC_BP_Group() throws Exception + { + Class clazz = MTable.getClass(I_C_BP_Group.Table_Name); + I_C_BP_Group result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BP_Group)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BP_Group_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Business Partner Group. + @param C_BP_Group_ID + Business Partner Group + */ + public void setC_BP_Group_ID (int C_BP_Group_ID) + { + if (C_BP_Group_ID < 1) + set_Value (COLUMNNAME_C_BP_Group_ID, null); + else + set_Value (COLUMNNAME_C_BP_Group_ID, Integer.valueOf(C_BP_Group_ID)); + } + + /** Get Business Partner Group. + @return Business Partner Group + */ + public int getC_BP_Group_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_Group_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set HR_Concept_Acct_ID. + @param HR_Concept_Acct_ID HR_Concept_Acct_ID */ + public void setHR_Concept_Acct_ID (int HR_Concept_Acct_ID) + { + if (HR_Concept_Acct_ID < 1) + throw new IllegalArgumentException ("HR_Concept_Acct_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Concept_Acct_ID, Integer.valueOf(HR_Concept_Acct_ID)); + } + + /** Get HR_Concept_Acct_ID. + @return HR_Concept_Acct_ID */ + public int getHR_Concept_Acct_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_Acct_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Concept getHR_Concept() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Concept.Table_Name); + org.eevolution.model.I_HR_Concept result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Concept)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Concept_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Concept. + @param HR_Concept_ID Concept */ + public void setHR_Concept_ID (int HR_Concept_ID) + { + if (HR_Concept_ID < 1) + throw new IllegalArgumentException ("HR_Concept_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Concept_ID, Integer.valueOf(HR_Concept_ID)); + } + + /** Get Concept. + @return Concept */ + public int getHR_Concept_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set HR_Expense_Acct. + @param HR_Expense_Acct HR_Expense_Acct */ + public void setHR_Expense_Acct (int HR_Expense_Acct) + { + set_Value (COLUMNNAME_HR_Expense_Acct, Integer.valueOf(HR_Expense_Acct)); + } + + /** Get HR_Expense_Acct. + @return HR_Expense_Acct */ + public int getHR_Expense_Acct () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Expense_Acct); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set HR_Revenue_Acct. + @param HR_Revenue_Acct HR_Revenue_Acct */ + public void setHR_Revenue_Acct (int HR_Revenue_Acct) + { + set_Value (COLUMNNAME_HR_Revenue_Acct, Integer.valueOf(HR_Revenue_Acct)); + } + + /** Get HR_Revenue_Acct. + @return HR_Revenue_Acct */ + public int getHR_Revenue_Acct () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Revenue_Acct); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Balancing. + @param IsBalancing + All transactions within an element value must balance (e.g. cost centers) + */ + public void setIsBalancing (boolean IsBalancing) + { + set_Value (COLUMNNAME_IsBalancing, Boolean.valueOf(IsBalancing)); + } + + /** Get Balancing. + @return All transactions within an element value must balance (e.g. cost centers) + */ + public boolean isBalancing () + { + Object oo = get_Value(COLUMNNAME_IsBalancing); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** User1_ID AD_Reference_ID=134 */ + public static final int USER1_ID_AD_Reference_ID=134; + /** Set User List 1. + @param User1_ID + User defined list element #1 + */ + public void setUser1_ID (int User1_ID) + { + if (User1_ID < 1) + set_Value (COLUMNNAME_User1_ID, null); + else + set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); + } + + /** Get User List 1. + @return User defined list element #1 + */ + public int getUser1_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set User List 2. + @param User2_ID + User defined list element #2 + */ + public void setUser2_ID (int User2_ID) + { + if (User2_ID < 1) + set_Value (COLUMNNAME_User2_ID, null); + else + set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); + } + + /** Get User List 2. + @return User defined list element #2 + */ + public int getUser2_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Concept_Category.java b/base/src/org/eevolution/model/X_HR_Concept_Category.java new file mode 100644 index 0000000000..4f5fe679c2 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Concept_Category.java @@ -0,0 +1,213 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_Concept_Category + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Concept_Category extends PO implements I_HR_Concept_Category, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Concept_Category (Properties ctx, int HR_Concept_Category_ID, String trxName) + { + super (ctx, HR_Concept_Category_ID, trxName); + /** if (HR_Concept_Category_ID == 0) + { + setHR_Concept_Category_ID (0); + setName (null); + } */ + } + + /** Load Constructor */ + public X_HR_Concept_Category (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Concept_Category[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set HR_Concept_Acct. + @param HR_Concept_Acct HR_Concept_Acct */ + public void setHR_Concept_Acct (int HR_Concept_Acct) + { + set_Value (COLUMNNAME_HR_Concept_Acct, Integer.valueOf(HR_Concept_Acct)); + } + + /** Get HR_Concept_Acct. + @return HR_Concept_Acct */ + public int getHR_Concept_Acct () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_Acct); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll Concept Category. + @param HR_Concept_Category_ID Payroll Concept Category */ + public void setHR_Concept_Category_ID (int HR_Concept_Category_ID) + { + if (HR_Concept_Category_ID < 1) + throw new IllegalArgumentException ("HR_Concept_Category_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Concept_Category_ID, Integer.valueOf(HR_Concept_Category_ID)); + } + + /** Get Payroll Concept Category. + @return Payroll Concept Category */ + public int getHR_Concept_Category_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_Category_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Default. + @param IsDefault + Default value + */ + public void setIsDefault (boolean IsDefault) + { + set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); + } + + /** Get Default. + @return Default value + */ + public boolean isDefault () + { + Object oo = get_Value(COLUMNNAME_IsDefault); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_S_Resource.java b/base/src/org/eevolution/model/X_HR_Contract.java similarity index 56% rename from base/src/org/compiere/model/X_S_Resource.java rename to base/src/org/eevolution/model/X_HR_Contract.java index dfa8075970..9a2a073768 100644 --- a/base/src/org/compiere/model/X_S_Resource.java +++ b/base/src/org/eevolution/model/X_HR_Contract.java @@ -15,20 +15,20 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.lang.reflect.Constructor; -import java.math.BigDecimal; import java.sql.ResultSet; +import java.sql.Timestamp; import java.util.Properties; import java.util.logging.Level; -import org.compiere.util.Env; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Model for S_Resource +/** Generated Model for HR_Contract * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_S_Resource extends PO implements I_S_Resource, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Contract extends PO implements I_HR_Contract, I_Persistent { /** @@ -37,23 +37,18 @@ public class X_S_Resource extends PO implements I_S_Resource, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_S_Resource (Properties ctx, int S_Resource_ID, String trxName) + public X_HR_Contract (Properties ctx, int HR_Contract_ID, String trxName) { - super (ctx, S_Resource_ID, trxName); - /** if (S_Resource_ID == 0) + super (ctx, HR_Contract_ID, trxName); + /** if (HR_Contract_ID == 0) { - setIsAvailable (true); -// Y - setM_Warehouse_ID (0); + setHR_Contract_ID (0); setName (null); - setS_ResourceType_ID (0); - setS_Resource_ID (0); - setValue (null); } */ } /** Load Constructor */ - public X_S_Resource (Properties ctx, ResultSet rs, String trxName) + public X_HR_Contract (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } @@ -75,19 +70,19 @@ public class X_S_Resource extends PO implements I_S_Resource, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_S_Resource[") + StringBuffer sb = new StringBuffer ("X_HR_Contract[") .append(get_ID()).append("]"); return sb.toString(); } - public I_AD_User getAD_User() throws Exception + public I_C_BPartner getC_BPartner() throws Exception { - Class clazz = MTable.getClass(I_AD_User.Table_Name); - I_AD_User result = null; + Class clazz = MTable.getClass(I_C_BPartner.Table_Name); + I_C_BPartner result = null; try { Constructor constructor = null; constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()}); + result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); @@ -96,44 +91,105 @@ public class X_S_Resource extends PO implements I_S_Resource, I_Persistent return result; } - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner */ - public void setAD_User_ID (int AD_User_ID) + public void setC_BPartner_ID (int C_BPartner_ID) { - if (AD_User_ID < 1) - set_Value (COLUMNNAME_AD_User_ID, null); + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); } - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact + /** Get Business Partner . + @return Identifies a Business Partner */ - public int getAD_User_ID () + public int getC_BPartner_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); if (ii == null) return 0; return ii.intValue(); } - /** Set Chargeable Quantity. - @param ChargeableQty Chargeable Quantity */ - public void setChargeableQty (BigDecimal ChargeableQty) + public I_C_Campaign getC_Campaign() throws Exception + { + Class clazz = MTable.getClass(I_C_Campaign.Table_Name); + I_C_Campaign result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Campaign. + @param C_Campaign_ID + Marketing Campaign + */ + public void setC_Campaign_ID (int C_Campaign_ID) { - set_Value (COLUMNNAME_ChargeableQty, ChargeableQty); + if (C_Campaign_ID < 1) + set_Value (COLUMNNAME_C_Campaign_ID, null); + else + set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); } - /** Get Chargeable Quantity. - @return Chargeable Quantity */ - public BigDecimal getChargeableQty () + /** Get Campaign. + @return Marketing Campaign + */ + public int getC_Campaign_ID () { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeableQty); - if (bd == null) - return Env.ZERO; - return bd; + Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Project getC_Project() throws Exception + { + Class clazz = MTable.getClass(I_C_Project.Table_Name); + I_C_Project result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Project. + @param C_Project_ID + Financial Project + */ + public void setC_Project_ID (int C_Project_ID) + { + if (C_Project_ID < 1) + set_Value (COLUMNNAME_C_Project_ID, null); + else + set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); + } + + /** Get Project. + @return Financial Project + */ + public int getC_Project_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); + if (ii == null) + return 0; + return ii.intValue(); } /** Set Description. @@ -159,63 +215,20 @@ public class X_S_Resource extends PO implements I_S_Resource, I_Persistent return (String)get_Value(COLUMNNAME_Description); } - /** Set Available. - @param IsAvailable - Resource is available - */ - public void setIsAvailable (boolean IsAvailable) + /** Set Payroll Contract. + @param HR_Contract_ID Payroll Contract */ + public void setHR_Contract_ID (int HR_Contract_ID) { - set_Value (COLUMNNAME_IsAvailable, Boolean.valueOf(IsAvailable)); + if (HR_Contract_ID < 1) + throw new IllegalArgumentException ("HR_Contract_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Contract_ID, Integer.valueOf(HR_Contract_ID)); } - /** Get Available. - @return Resource is available - */ - public boolean isAvailable () + /** Get Payroll Contract. + @return Payroll Contract */ + public int getHR_Contract_ID () { - Object oo = get_Value(COLUMNNAME_IsAvailable); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - public I_M_Warehouse getM_Warehouse() throws Exception - { - Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); - I_M_Warehouse result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Warehouse. - @param M_Warehouse_ID - Storage Warehouse and Service Point - */ - public void setM_Warehouse_ID (int M_Warehouse_ID) - { - if (M_Warehouse_ID < 1) - throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); - set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); - } - - /** Get Warehouse. - @return Storage Warehouse and Service Point - */ - public int getM_Warehouse_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Contract_ID); if (ii == null) return 0; return ii.intValue(); @@ -254,61 +267,58 @@ public class X_S_Resource extends PO implements I_S_Resource, I_Persistent return new KeyNamePair(get_ID(), getName()); } - public I_S_ResourceType getS_ResourceType() throws Exception - { - Class clazz = MTable.getClass(I_S_ResourceType.Table_Name); - I_S_ResourceType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_S_ResourceType)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_ResourceType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Resource Type. - @param S_ResourceType_ID Resource Type */ - public void setS_ResourceType_ID (int S_ResourceType_ID) + /** Set Net Days. + @param NetDays + Net Days in which payment is due + */ + public void setNetDays (int NetDays) { - if (S_ResourceType_ID < 1) - throw new IllegalArgumentException ("S_ResourceType_ID is mandatory."); - set_Value (COLUMNNAME_S_ResourceType_ID, Integer.valueOf(S_ResourceType_ID)); + set_Value (COLUMNNAME_NetDays, Integer.valueOf(NetDays)); } - /** Get Resource Type. - @return Resource Type */ - public int getS_ResourceType_ID () + /** Get Net Days. + @return Net Days in which payment is due + */ + public int getNetDays () { - Integer ii = (Integer)get_Value(COLUMNNAME_S_ResourceType_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_NetDays); if (ii == null) return 0; return ii.intValue(); } - /** Set Resource. - @param S_Resource_ID - Resource + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) */ - public void setS_Resource_ID (int S_Resource_ID) + public void setValidFrom (Timestamp ValidFrom) { - if (S_Resource_ID < 1) - throw new IllegalArgumentException ("S_Resource_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); + set_Value (COLUMNNAME_ValidFrom, ValidFrom); } - /** Get Resource. - @return Resource + /** Get Valid from. + @return Valid from including this date (first day) */ - public int getS_Resource_ID () + public Timestamp getValidFrom () { - Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); - if (ii == null) - return 0; - return ii.intValue(); + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); } /** Set Search Key. @@ -317,10 +327,8 @@ public class X_S_Resource extends PO implements I_S_Resource, I_Persistent */ public void setValue (String Value) { - if (Value == null) - throw new IllegalArgumentException ("Value is mandatory."); - if (Value.length() > 40) + if (Value != null && Value.length() > 40) { log.warning("Length > 40 - truncated"); Value = Value.substring(0, 40); diff --git a/base/src/org/eevolution/model/X_HR_Department.java b/base/src/org/eevolution/model/X_HR_Department.java new file mode 100644 index 0000000000..4678d0cf9e --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Department.java @@ -0,0 +1,172 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_Department + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Department extends PO implements I_HR_Department, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Department (Properties ctx, int HR_Department_ID, String trxName) + { + super (ctx, HR_Department_ID, trxName); + /** if (HR_Department_ID == 0) + { + setHR_Department_ID (0); + setName (null); + } */ + } + + /** Load Constructor */ + public X_HR_Department (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Department[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Department. + @param HR_Department_ID Department */ + public void setHR_Department_ID (int HR_Department_ID) + { + if (HR_Department_ID < 1) + throw new IllegalArgumentException ("HR_Department_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID)); + } + + /** Get Department. + @return Department */ + public int getHR_Department_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Employee.java b/base/src/org/eevolution/model/X_HR_Employee.java new file mode 100644 index 0000000000..93d13f3ab4 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Employee.java @@ -0,0 +1,452 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_Employee + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Employee extends PO implements I_HR_Employee, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Employee (Properties ctx, int HR_Employee_ID, String trxName) + { + super (ctx, HR_Employee_ID, trxName); + /** if (HR_Employee_ID == 0) + { + setHR_Department_ID (0); + setHR_Employee_ID (0); + setHR_Job_ID (0); + setStartDate (new Timestamp(System.currentTimeMillis())); + } */ + } + + /** Load Constructor */ + public X_HR_Employee (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Employee[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_C_Activity getC_Activity() throws Exception + { + Class clazz = MTable.getClass(I_C_Activity.Table_Name); + I_C_Activity result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Activity. + @param C_Activity_ID + Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID) + { + if (C_Activity_ID < 1) + set_Value (COLUMNNAME_C_Activity_ID, null); + else + set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); + } + + /** Get Activity. + @return Business Activity + */ + public int getC_Activity_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_BPartner getC_BPartner() throws Exception + { + Class clazz = MTable.getClass(I_C_BPartner.Table_Name); + I_C_BPartner result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + } + + /** 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(); + } + + /** Set Validation code. + @param Code + Validation Code + */ + public void setCode (String Code) + { + + if (Code != null && Code.length() > 1) + { + log.warning("Length > 1 - truncated"); + Code = Code.substring(0, 1); + } + set_Value (COLUMNNAME_Code, Code); + } + + /** Get Validation code. + @return Validation Code + */ + public String getCode () + { + return (String)get_Value(COLUMNNAME_Code); + } + + /** Set End Date. + @param EndDate + Last effective date (inclusive) + */ + public void setEndDate (Timestamp EndDate) + { + set_Value (COLUMNNAME_EndDate, EndDate); + } + + /** Get End Date. + @return Last effective date (inclusive) + */ + public Timestamp getEndDate () + { + return (Timestamp)get_Value(COLUMNNAME_EndDate); + } + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Department.Table_Name); + org.eevolution.model.I_HR_Department result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Department)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Department_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Department. + @param HR_Department_ID Department */ + public void setHR_Department_ID (int HR_Department_ID) + { + if (HR_Department_ID < 1) + throw new IllegalArgumentException ("HR_Department_ID is mandatory."); + set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID)); + } + + /** Get Department. + @return Department */ + public int getHR_Department_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Employee. + @param HR_Employee_ID Employee */ + public void setHR_Employee_ID (int HR_Employee_ID) + { + if (HR_Employee_ID < 1) + throw new IllegalArgumentException ("HR_Employee_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Employee_ID, Integer.valueOf(HR_Employee_ID)); + } + + /** Get Employee. + @return Employee */ + public int getHR_Employee_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Employee_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Job.Table_Name); + org.eevolution.model.I_HR_Job result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Job)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Job_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Job. + @param HR_Job_ID Job */ + public void setHR_Job_ID (int HR_Job_ID) + { + if (HR_Job_ID < 1) + throw new IllegalArgumentException ("HR_Job_ID is mandatory."); + set_Value (COLUMNNAME_HR_Job_ID, Integer.valueOf(HR_Job_ID)); + } + + /** Get Job. + @return Job */ + public int getHR_Job_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Job_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Payroll.Table_Name); + org.eevolution.model.I_HR_Payroll result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Payroll)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Payroll_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + set_Value (COLUMNNAME_HR_Payroll_ID, null); + else + set_Value (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); + } + + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Image URL. + @param ImageURL + URL of image + */ + public void setImageURL (byte[] ImageURL) + { + set_Value (COLUMNNAME_ImageURL, ImageURL); + } + + /** Get Image URL. + @return URL of image + */ + public byte[] getImageURL () + { + return (byte[])get_Value(COLUMNNAME_ImageURL); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + + if (Name != null && Name.length() > 30) + { + log.warning("Length > 30 - truncated"); + Name = Name.substring(0, 30); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Name 2. + @param Name2 + Additional Name + */ + public void setName2 (String Name2) + { + + if (Name2 != null && Name2.length() > 30) + { + log.warning("Length > 30 - truncated"); + Name2 = Name2.substring(0, 30); + } + set_Value (COLUMNNAME_Name2, Name2); + } + + /** Get Name 2. + @return Additional Name + */ + public String getName2 () + { + return (String)get_Value(COLUMNNAME_Name2); + } + + /** Set National Code. + @param NationalCode National Code */ + public void setNationalCode (String NationalCode) + { + + if (NationalCode != null && NationalCode.length() > 60) + { + log.warning("Length > 60 - truncated"); + NationalCode = NationalCode.substring(0, 60); + } + set_Value (COLUMNNAME_NationalCode, NationalCode); + } + + /** Get National Code. + @return National Code */ + public String getNationalCode () + { + return (String)get_Value(COLUMNNAME_NationalCode); + } + + /** Set Social Security Code. + @param SSCode Social Security Code */ + public void setSSCode (String SSCode) + { + + if (SSCode != null && SSCode.length() > 60) + { + log.warning("Length > 60 - truncated"); + SSCode = SSCode.substring(0, 60); + } + set_Value (COLUMNNAME_SSCode, SSCode); + } + + /** Get Social Security Code. + @return Social Security Code */ + public String getSSCode () + { + return (String)get_Value(COLUMNNAME_SSCode); + } + + /** Set Start Date. + @param StartDate + First effective day (inclusive) + */ + public void setStartDate (Timestamp StartDate) + { + if (StartDate == null) + throw new IllegalArgumentException ("StartDate is mandatory."); + set_Value (COLUMNNAME_StartDate, StartDate); + } + + /** Get Start Date. + @return First effective day (inclusive) + */ + public Timestamp getStartDate () + { + return (Timestamp)get_Value(COLUMNNAME_StartDate); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Job.java b/base/src/org/eevolution/model/X_HR_Job.java new file mode 100644 index 0000000000..8b5075c046 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Job.java @@ -0,0 +1,298 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_Job + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Job extends PO implements I_HR_Job, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Job (Properties ctx, int HR_Job_ID, String trxName) + { + super (ctx, HR_Job_ID, trxName); + /** if (HR_Job_ID == 0) + { + setHR_Department_ID (0); + setHR_Job_ID (0); + setName (null); + } */ + } + + /** Load Constructor */ + public X_HR_Job (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Job[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Department.Table_Name); + org.eevolution.model.I_HR_Department result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Department)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Department_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Department. + @param HR_Department_ID Department */ + public void setHR_Department_ID (int HR_Department_ID) + { + if (HR_Department_ID < 1) + throw new IllegalArgumentException ("HR_Department_ID is mandatory."); + set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID)); + } + + /** Get Department. + @return Department */ + public int getHR_Department_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Job. + @param HR_Job_ID Job */ + public void setHR_Job_ID (int HR_Job_ID) + { + if (HR_Job_ID < 1) + throw new IllegalArgumentException ("HR_Job_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Job_ID, Integer.valueOf(HR_Job_ID)); + } + + /** Get Job. + @return Job */ + public int getHR_Job_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Job_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Parent link column. + @param IsParent + This column is a link to the parent table (e.g. header from lines) - incl. Association key columns + */ + public void setIsParent (boolean IsParent) + { + set_Value (COLUMNNAME_IsParent, Boolean.valueOf(IsParent)); + } + + /** Get Parent link column. + @return This column is a link to the parent table (e.g. header from lines) - incl. Association key columns + */ + public boolean isParent () + { + Object oo = get_Value(COLUMNNAME_IsParent); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Job Cant. + @param JobCant Job Cant */ + public void setJobCant (int JobCant) + { + set_Value (COLUMNNAME_JobCant, Integer.valueOf(JobCant)); + } + + /** Get Job Cant. + @return Job Cant */ + public int getJobCant () + { + Integer ii = (Integer)get_Value(COLUMNNAME_JobCant); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Next_Job_ID AD_Reference_ID=53244 */ + public static final int NEXT_JOB_ID_AD_Reference_ID=53244; + /** Set Next Job. + @param Next_Job_ID Next Job */ + public void setNext_Job_ID (int Next_Job_ID) + { + if (Next_Job_ID < 1) + set_Value (COLUMNNAME_Next_Job_ID, null); + else + set_Value (COLUMNNAME_Next_Job_ID, Integer.valueOf(Next_Job_ID)); + } + + /** Get Next Job. + @return Next Job */ + public int getNext_Job_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Next_Job_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Supervisor_ID AD_Reference_ID=286 */ + public static final int SUPERVISOR_ID_AD_Reference_ID=286; + /** Set Supervisor. + @param Supervisor_ID + Supervisor for this user/organization - used for escalation and approval + */ + public void setSupervisor_ID (int Supervisor_ID) + { + if (Supervisor_ID < 1) + set_Value (COLUMNNAME_Supervisor_ID, null); + else + set_Value (COLUMNNAME_Supervisor_ID, Integer.valueOf(Supervisor_ID)); + } + + /** Get Supervisor. + @return Supervisor for this user/organization - used for escalation and approval + */ + public int getSupervisor_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Supervisor_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_List.java b/base/src/org/eevolution/model/X_HR_List.java new file mode 100644 index 0000000000..6eb2fcaac7 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_List.java @@ -0,0 +1,360 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_List + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_List extends PO implements I_HR_List, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_List (Properties ctx, int HR_List_ID, String trxName) + { + super (ctx, HR_List_ID, trxName); + /** if (HR_List_ID == 0) + { + setHR_List_ID (0); + setName (null); + } */ + } + + /** Load Constructor */ + public X_HR_List (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() + { + StringBuffer sb = new StringBuffer ("X_HR_List[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Department.Table_Name); + org.eevolution.model.I_HR_Department result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Department)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Department_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Department. + @param HR_Department_ID Department */ + public void setHR_Department_ID (int HR_Department_ID) + { + if (HR_Department_ID < 1) + set_Value (COLUMNNAME_HR_Department_ID, null); + else + set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID)); + } + + /** Get Department. + @return Department */ + public int getHR_Department_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Employee getHR_Employee() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Employee.Table_Name); + org.eevolution.model.I_HR_Employee result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Employee)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Employee_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Employee. + @param HR_Employee_ID Employee */ + public void setHR_Employee_ID (int HR_Employee_ID) + { + if (HR_Employee_ID < 1) + set_Value (COLUMNNAME_HR_Employee_ID, null); + else + set_Value (COLUMNNAME_HR_Employee_ID, Integer.valueOf(HR_Employee_ID)); + } + + /** Get Employee. + @return Employee */ + public int getHR_Employee_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Employee_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_ListType getHR_ListType() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_ListType.Table_Name); + org.eevolution.model.I_HR_ListType result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_ListType)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_ListType_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll List Type. + @param HR_ListType_ID Payroll List Type */ + public void setHR_ListType_ID (int HR_ListType_ID) + { + if (HR_ListType_ID < 1) + set_Value (COLUMNNAME_HR_ListType_ID, null); + else + set_Value (COLUMNNAME_HR_ListType_ID, Integer.valueOf(HR_ListType_ID)); + } + + /** Get Payroll List Type. + @return Payroll List Type */ + public int getHR_ListType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_ListType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll List. + @param HR_List_ID Payroll List */ + public void setHR_List_ID (int HR_List_ID) + { + if (HR_List_ID < 1) + throw new IllegalArgumentException ("HR_List_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_List_ID, Integer.valueOf(HR_List_ID)); + } + + /** Get Payroll List. + @return Payroll List */ + public int getHR_List_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_List_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Payroll.Table_Name); + org.eevolution.model.I_HR_Payroll result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Payroll)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Payroll_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + set_Value (COLUMNNAME_HR_Payroll_ID, null); + else + set_Value (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); + } + + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Employee. + @param IsEmployee + Indicates if this Business Partner is an employee + */ + public void setIsEmployee (boolean IsEmployee) + { + set_Value (COLUMNNAME_IsEmployee, Boolean.valueOf(IsEmployee)); + } + + /** Get Employee. + @return Indicates if this Business Partner is an employee + */ + public boolean isEmployee () + { + Object oo = get_Value(COLUMNNAME_IsEmployee); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_ListLine.java b/base/src/org/eevolution/model/X_HR_ListLine.java new file mode 100644 index 0000000000..8ea0918799 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_ListLine.java @@ -0,0 +1,333 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_ListLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_ListLine extends PO implements I_HR_ListLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_ListLine (Properties ctx, int HR_ListLine_ID, String trxName) + { + super (ctx, HR_ListLine_ID, trxName); + /** if (HR_ListLine_ID == 0) + { + setHR_ListLine_ID (0); + } */ + } + + /** Load Constructor */ + public X_HR_ListLine (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() + { + StringBuffer sb = new StringBuffer ("X_HR_ListLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Col_1. + @param Col_1 Col_1 */ + public void setCol_1 (BigDecimal Col_1) + { + set_Value (COLUMNNAME_Col_1, Col_1); + } + + /** Get Col_1. + @return Col_1 */ + public BigDecimal getCol_1 () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_1); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Col_2. + @param Col_2 Col_2 */ + public void setCol_2 (BigDecimal Col_2) + { + set_Value (COLUMNNAME_Col_2, Col_2); + } + + /** Get Col_2. + @return Col_2 */ + public BigDecimal getCol_2 () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_2); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Col_3. + @param Col_3 Col_3 */ + public void setCol_3 (BigDecimal Col_3) + { + set_Value (COLUMNNAME_Col_3, Col_3); + } + + /** Get Col_3. + @return Col_3 */ + public BigDecimal getCol_3 () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_3); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Col_4. + @param Col_4 Col_4 */ + public void setCol_4 (BigDecimal Col_4) + { + set_Value (COLUMNNAME_Col_4, Col_4); + } + + /** Get Col_4. + @return Col_4 */ + public BigDecimal getCol_4 () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_4); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Col_5. + @param Col_5 Col_5 */ + public void setCol_5 (BigDecimal Col_5) + { + set_Value (COLUMNNAME_Col_5, Col_5); + } + + /** Get Col_5. + @return Col_5 */ + public BigDecimal getCol_5 () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_5); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Col_6. + @param Col_6 Col_6 */ + public void setCol_6 (BigDecimal Col_6) + { + set_Value (COLUMNNAME_Col_6, Col_6); + } + + /** Get Col_6. + @return Col_6 */ + public BigDecimal getCol_6 () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_6); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Col_7. + @param Col_7 Col_7 */ + public void setCol_7 (BigDecimal Col_7) + { + set_Value (COLUMNNAME_Col_7, Col_7); + } + + /** Get Col_7. + @return Col_7 */ + public BigDecimal getCol_7 () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_7); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Col_8. + @param Col_8 Col_8 */ + public void setCol_8 (BigDecimal Col_8) + { + set_Value (COLUMNNAME_Col_8, Col_8); + } + + /** Get Col_8. + @return Col_8 */ + public BigDecimal getCol_8 () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_8); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Payroll List Line. + @param HR_ListLine_ID Payroll List Line */ + public void setHR_ListLine_ID (int HR_ListLine_ID) + { + if (HR_ListLine_ID < 1) + throw new IllegalArgumentException ("HR_ListLine_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_ListLine_ID, Integer.valueOf(HR_ListLine_ID)); + } + + /** Get Payroll List Line. + @return Payroll List Line */ + public int getHR_ListLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_ListLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_ListVersion getHR_ListVersion() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_ListVersion.Table_Name); + org.eevolution.model.I_HR_ListVersion result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_ListVersion)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_ListVersion_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll List Version. + @param HR_ListVersion_ID Payroll List Version */ + public void setHR_ListVersion_ID (int HR_ListVersion_ID) + { + if (HR_ListVersion_ID < 1) + set_ValueNoCheck (COLUMNNAME_HR_ListVersion_ID, null); + else + set_ValueNoCheck (COLUMNNAME_HR_ListVersion_ID, Integer.valueOf(HR_ListVersion_ID)); + } + + /** Get Payroll List Version. + @return Payroll List Version */ + public int getHR_ListVersion_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_ListVersion_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set MaxValue. + @param MaxValue MaxValue */ + public void setMaxValue (BigDecimal MaxValue) + { + set_Value (COLUMNNAME_MaxValue, MaxValue); + } + + /** Get MaxValue. + @return MaxValue */ + public BigDecimal getMaxValue () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MaxValue); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set MinValue. + @param MinValue MinValue */ + public void setMinValue (BigDecimal MinValue) + { + set_Value (COLUMNNAME_MinValue, MinValue); + } + + /** Get MinValue. + @return MinValue */ + public BigDecimal getMinValue () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MinValue); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + + if (Name != null && Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_ListType.java b/base/src/org/eevolution/model/X_HR_ListType.java new file mode 100644 index 0000000000..6a4c99ffbc --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_ListType.java @@ -0,0 +1,172 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_ListType + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_ListType extends PO implements I_HR_ListType, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_ListType (Properties ctx, int HR_ListType_ID, String trxName) + { + super (ctx, HR_ListType_ID, trxName); + /** if (HR_ListType_ID == 0) + { + setHR_ListType_ID (0); + setName (null); + } */ + } + + /** Load Constructor */ + public X_HR_ListType (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() + { + StringBuffer sb = new StringBuffer ("X_HR_ListType[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Payroll List Type. + @param HR_ListType_ID Payroll List Type */ + public void setHR_ListType_ID (int HR_ListType_ID) + { + if (HR_ListType_ID < 1) + throw new IllegalArgumentException ("HR_ListType_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_ListType_ID, Integer.valueOf(HR_ListType_ID)); + } + + /** Get Payroll List Type. + @return Payroll List Type */ + public int getHR_ListType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_ListType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_ListVersion.java b/base/src/org/eevolution/model/X_HR_ListVersion.java new file mode 100644 index 0000000000..3fe8f4eb07 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_ListVersion.java @@ -0,0 +1,244 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_ListVersion + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_ListVersion extends PO implements I_HR_ListVersion, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_ListVersion (Properties ctx, int HR_ListVersion_ID, String trxName) + { + super (ctx, HR_ListVersion_ID, trxName); + /** if (HR_ListVersion_ID == 0) + { + setHR_ListVersion_ID (0); + setHR_List_ID (0); + setName (null); + } */ + } + + /** Load Constructor */ + public X_HR_ListVersion (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() + { + StringBuffer sb = new StringBuffer ("X_HR_ListVersion[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** HR_ListBase_ID AD_Reference_ID=53246 */ + public static final int HR_LISTBASE_ID_AD_Reference_ID=53246; + /** Set Payroll List Base. + @param HR_ListBase_ID Payroll List Base */ + public void setHR_ListBase_ID (int HR_ListBase_ID) + { + if (HR_ListBase_ID < 1) + set_Value (COLUMNNAME_HR_ListBase_ID, null); + else + set_Value (COLUMNNAME_HR_ListBase_ID, Integer.valueOf(HR_ListBase_ID)); + } + + /** Get Payroll List Base. + @return Payroll List Base */ + public int getHR_ListBase_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_ListBase_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll List Version. + @param HR_ListVersion_ID Payroll List Version */ + public void setHR_ListVersion_ID (int HR_ListVersion_ID) + { + if (HR_ListVersion_ID < 1) + throw new IllegalArgumentException ("HR_ListVersion_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_ListVersion_ID, Integer.valueOf(HR_ListVersion_ID)); + } + + /** Get Payroll List Version. + @return Payroll List Version */ + public int getHR_ListVersion_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_ListVersion_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_List getHR_List() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_List.Table_Name); + org.eevolution.model.I_HR_List result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_List)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_List_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll List. + @param HR_List_ID Payroll List */ + public void setHR_List_ID (int HR_List_ID) + { + if (HR_List_ID < 1) + throw new IllegalArgumentException ("HR_List_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_List_ID, Integer.valueOf(HR_List_ID)); + } + + /** Get Payroll List. + @return Payroll List */ + public int getHR_List_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_List_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Movement.java b/base/src/org/eevolution/model/X_HR_Movement.java new file mode 100644 index 0000000000..8f8c50cf34 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Movement.java @@ -0,0 +1,667 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_Movement + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Movement extends PO implements I_HR_Movement, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Movement (Properties ctx, int HR_Movement_ID, String trxName) + { + super (ctx, HR_Movement_ID, trxName); + /** if (HR_Movement_ID == 0) + { + setHR_Concept_ID (0); + setHR_Movement_ID (0); + setProcessed (false); + setValidFrom (new Timestamp(System.currentTimeMillis())); + } */ + } + + /** Load Constructor */ + public X_HR_Movement (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Movement[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Rule getAD_Rule() throws Exception + { + Class clazz = MTable.getClass(I_AD_Rule.Table_Name); + I_AD_Rule result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Rule)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Rule_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Rule. + @param AD_Rule_ID Rule */ + public void setAD_Rule_ID (int AD_Rule_ID) + { + if (AD_Rule_ID < 1) + set_Value (COLUMNNAME_AD_Rule_ID, null); + else + set_Value (COLUMNNAME_AD_Rule_ID, Integer.valueOf(AD_Rule_ID)); + } + + /** Get Rule. + @return Rule */ + public int getAD_Rule_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Rule_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Amount. + @param Amount + Amount in a defined currency + */ + public void setAmount (BigDecimal Amount) + { + set_Value (COLUMNNAME_Amount, Amount); + } + + /** Get Amount. + @return Amount in a defined currency + */ + public BigDecimal getAmount () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amount); + if (bd == null) + return Env.ZERO; + return bd; + } + + public I_C_Activity getC_Activity() throws Exception + { + Class clazz = MTable.getClass(I_C_Activity.Table_Name); + I_C_Activity result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Activity. + @param C_Activity_ID + Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID) + { + if (C_Activity_ID < 1) + set_Value (COLUMNNAME_C_Activity_ID, null); + else + set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); + } + + /** Get Activity. + @return Business Activity + */ + public int getC_Activity_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_BPartner getC_BPartner() throws Exception + { + Class clazz = MTable.getClass(I_C_BPartner.Table_Name); + I_C_BPartner result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + } + + /** 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(); + } + + /** ColumnType AD_Reference_ID=53243 */ + public static final int COLUMNTYPE_AD_Reference_ID=53243; + /** Amount = A */ + public static final String COLUMNTYPE_Amount = "A"; + /** Date = D */ + public static final String COLUMNTYPE_Date = "D"; + /** Quantity = Q */ + public static final String COLUMNTYPE_Quantity = "Q"; + /** Text = T */ + public static final String COLUMNTYPE_Text = "T"; + /** Set Column Type. + @param ColumnType Column Type */ + public void setColumnType (String ColumnType) + { + + if (ColumnType == null || ColumnType.equals("A") || ColumnType.equals("D") || ColumnType.equals("Q") || ColumnType.equals("T")); else throw new IllegalArgumentException ("ColumnType Invalid value - " + ColumnType + " - Reference_ID=53243 - A - D - Q - T"); + if (ColumnType != null && ColumnType.length() > 1) + { + log.warning("Length > 1 - truncated"); + ColumnType = ColumnType.substring(0, 1); + } + set_Value (COLUMNNAME_ColumnType, ColumnType); + } + + /** Get Column Type. + @return Column Type */ + public String getColumnType () + { + return (String)get_Value(COLUMNNAME_ColumnType); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + public org.eevolution.model.I_HR_Concept_Category getHR_Concept_Category() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Concept_Category.Table_Name); + org.eevolution.model.I_HR_Concept_Category result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Concept_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Concept_Category_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll Concept Category. + @param HR_Concept_Category_ID Payroll Concept Category */ + public void setHR_Concept_Category_ID (int HR_Concept_Category_ID) + { + if (HR_Concept_Category_ID < 1) + set_Value (COLUMNNAME_HR_Concept_Category_ID, null); + else + set_Value (COLUMNNAME_HR_Concept_Category_ID, Integer.valueOf(HR_Concept_Category_ID)); + } + + /** Get Payroll Concept Category. + @return Payroll Concept Category */ + public int getHR_Concept_Category_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_Category_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Concept getHR_Concept() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Concept.Table_Name); + org.eevolution.model.I_HR_Concept result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Concept)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Concept_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Concept. + @param HR_Concept_ID Concept */ + public void setHR_Concept_ID (int HR_Concept_ID) + { + if (HR_Concept_ID < 1) + throw new IllegalArgumentException ("HR_Concept_ID is mandatory."); + set_Value (COLUMNNAME_HR_Concept_ID, Integer.valueOf(HR_Concept_ID)); + } + + /** Get Concept. + @return Concept */ + public int getHR_Concept_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Department.Table_Name); + org.eevolution.model.I_HR_Department result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Department)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Department_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Department. + @param HR_Department_ID Department */ + public void setHR_Department_ID (int HR_Department_ID) + { + if (HR_Department_ID < 1) + set_Value (COLUMNNAME_HR_Department_ID, null); + else + set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID)); + } + + /** Get Department. + @return Department */ + public int getHR_Department_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Job.Table_Name); + org.eevolution.model.I_HR_Job result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Job)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Job_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Job. + @param HR_Job_ID Job */ + public void setHR_Job_ID (int HR_Job_ID) + { + if (HR_Job_ID < 1) + set_Value (COLUMNNAME_HR_Job_ID, null); + else + set_Value (COLUMNNAME_HR_Job_ID, Integer.valueOf(HR_Job_ID)); + } + + /** Get Job. + @return Job */ + public int getHR_Job_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Job_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll Movement. + @param HR_Movement_ID Payroll Movement */ + public void setHR_Movement_ID (int HR_Movement_ID) + { + if (HR_Movement_ID < 1) + throw new IllegalArgumentException ("HR_Movement_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Movement_ID, Integer.valueOf(HR_Movement_ID)); + } + + /** Get Payroll Movement. + @return Payroll Movement */ + public int getHR_Movement_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Movement_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Process getHR_Process() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Process.Table_Name); + org.eevolution.model.I_HR_Process result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Process)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Process_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll Process. + @param HR_Process_ID Payroll Process */ + public void setHR_Process_ID (int HR_Process_ID) + { + if (HR_Process_ID < 1) + set_Value (COLUMNNAME_HR_Process_ID, null); + else + set_Value (COLUMNNAME_HR_Process_ID, Integer.valueOf(HR_Process_ID)); + } + + /** Get Payroll Process. + @return Payroll Process */ + public int getHR_Process_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Process_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getHR_Process_ID())); + } + + /** Set Printed. + @param IsPrinted + Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted) + { + set_Value (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted)); + } + + /** Get Printed. + @return Indicates if this document / line is printed + */ + public boolean isPrinted () + { + Object oo = get_Value(COLUMNNAME_IsPrinted); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Registered. + @param IsRegistered + The application is registered. + */ + public void setIsRegistered (boolean IsRegistered) + { + set_Value (COLUMNNAME_IsRegistered, Boolean.valueOf(IsRegistered)); + } + + /** Get Registered. + @return The application is registered. + */ + public boolean isRegistered () + { + Object oo = get_Value(COLUMNNAME_IsRegistered); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Posted. + @param Posted + Posting status + */ + public void setPosted (boolean Posted) + { + set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); + } + + /** Get Posted. + @return Posting status + */ + public boolean isPosted () + { + Object oo = get_Value(COLUMNNAME_Posted); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Quantity. + @param Qty + Quantity + */ + public void setQty (BigDecimal Qty) + { + set_Value (COLUMNNAME_Qty, Qty); + } + + /** Get Quantity. + @return Quantity + */ + public BigDecimal getQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Service date. + @param ServiceDate + Date service was provided + */ + public void setServiceDate (Timestamp ServiceDate) + { + set_Value (COLUMNNAME_ServiceDate, ServiceDate); + } + + /** Get Service date. + @return Date service was provided + */ + public Timestamp getServiceDate () + { + return (Timestamp)get_Value(COLUMNNAME_ServiceDate); + } + + /** Set Text Message. + @param TextMsg + Text Message + */ + public void setTextMsg (String TextMsg) + { + + if (TextMsg != null && TextMsg.length() > 255) + { + log.warning("Length > 255 - truncated"); + TextMsg = TextMsg.substring(0, 255); + } + set_Value (COLUMNNAME_TextMsg, TextMsg); + } + + /** Get Text Message. + @return Text Message + */ + public String getTextMsg () + { + return (String)get_Value(COLUMNNAME_TextMsg); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + if (ValidFrom == null) + throw new IllegalArgumentException ("ValidFrom is mandatory."); + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Payroll.java b/base/src/org/eevolution/model/X_HR_Payroll.java new file mode 100644 index 0000000000..9b31d6d7d1 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Payroll.java @@ -0,0 +1,370 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_Payroll + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Payroll extends PO implements I_HR_Payroll, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Payroll (Properties ctx, int HR_Payroll_ID, String trxName) + { + super (ctx, HR_Payroll_ID, trxName); + /** if (HR_Payroll_ID == 0) + { + setHR_Contract_ID (0); + setHR_Payroll_ID (0); + setName (null); + setPaymentRule (null); + } */ + } + + /** Load Constructor */ + public X_HR_Payroll (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Payroll[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_PrintFormat getAD_PrintFormat() throws Exception + { + Class clazz = MTable.getClass(I_AD_PrintFormat.Table_Name); + I_AD_PrintFormat result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_PrintFormat)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_PrintFormat_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Print Format. + @param AD_PrintFormat_ID + Data Print Format + */ + public void setAD_PrintFormat_ID (int AD_PrintFormat_ID) + { + if (AD_PrintFormat_ID < 1) + set_Value (COLUMNNAME_AD_PrintFormat_ID, null); + else + set_Value (COLUMNNAME_AD_PrintFormat_ID, Integer.valueOf(AD_PrintFormat_ID)); + } + + /** Get Print Format. + @return Data Print Format + */ + public int getAD_PrintFormat_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_PrintFormat_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Charge getC_Charge() throws Exception + { + Class clazz = MTable.getClass(I_C_Charge.Table_Name); + I_C_Charge result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Charge. + @param C_Charge_ID + Additional document charges + */ + public void setC_Charge_ID (int C_Charge_ID) + { + if (C_Charge_ID < 1) + set_Value (COLUMNNAME_C_Charge_ID, null); + else + set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); + } + + /** Get Charge. + @return Additional document charges + */ + public int getC_Charge_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + public org.eevolution.model.I_HR_Contract getHR_Contract() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Contract.Table_Name); + org.eevolution.model.I_HR_Contract result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Contract)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Contract_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll Contract. + @param HR_Contract_ID Payroll Contract */ + public void setHR_Contract_ID (int HR_Contract_ID) + { + if (HR_Contract_ID < 1) + throw new IllegalArgumentException ("HR_Contract_ID is mandatory."); + set_Value (COLUMNNAME_HR_Contract_ID, Integer.valueOf(HR_Contract_ID)); + } + + /** Get Payroll Contract. + @return Payroll Contract */ + public int getHR_Contract_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Contract_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + throw new IllegalArgumentException ("HR_Payroll_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); + } + + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** PaymentRule AD_Reference_ID=214 */ + public static final int PAYMENTRULE_AD_Reference_ID=214; + /** Credit Card = C */ + public static final String PAYMENTRULE_CreditCard = "C"; + /** Check = K */ + public static final String PAYMENTRULE_Check = "K"; + /** Direct Deposit = A */ + public static final String PAYMENTRULE_DirectDeposit = "A"; + /** Direct Debit = D */ + public static final String PAYMENTRULE_DirectDebit = "D"; + /** Account = T */ + public static final String PAYMENTRULE_Account = "T"; + /** Set Payment Rule. + @param PaymentRule + How you pay the invoice + */ + public void setPaymentRule (String PaymentRule) + { + if (PaymentRule == null) throw new IllegalArgumentException ("PaymentRule is mandatory"); + if (PaymentRule.equals("C") || PaymentRule.equals("K") || PaymentRule.equals("A") || PaymentRule.equals("D") || PaymentRule.equals("T")); else throw new IllegalArgumentException ("PaymentRule Invalid value - " + PaymentRule + " - Reference_ID=214 - C - K - A - D - T"); + if (PaymentRule.length() > 1) + { + log.warning("Length > 1 - truncated"); + PaymentRule = PaymentRule.substring(0, 1); + } + set_Value (COLUMNNAME_PaymentRule, PaymentRule); + } + + /** Get Payment Rule. + @return How you pay the invoice + */ + public String getPaymentRule () + { + return (String)get_Value(COLUMNNAME_PaymentRule); + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** 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; + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_PayrollConcept.java b/base/src/org/eevolution/model/X_HR_PayrollConcept.java new file mode 100644 index 0000000000..a430a86c81 --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_PayrollConcept.java @@ -0,0 +1,325 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_PayrollConcept + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_PayrollConcept extends PO implements I_HR_PayrollConcept, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_PayrollConcept (Properties ctx, int HR_PayrollConcept_ID, String trxName) + { + super (ctx, HR_PayrollConcept_ID, trxName); + /** if (HR_PayrollConcept_ID == 0) + { + setHR_PayrollConcept_ID (0); + } */ + } + + /** Load Constructor */ + public X_HR_PayrollConcept (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() + { + StringBuffer sb = new StringBuffer ("X_HR_PayrollConcept[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Rule getAD_Rule() throws Exception + { + Class clazz = MTable.getClass(I_AD_Rule.Table_Name); + I_AD_Rule result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Rule)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Rule_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Rule. + @param AD_Rule_ID Rule */ + public void setAD_Rule_ID (int AD_Rule_ID) + { + if (AD_Rule_ID < 1) + set_Value (COLUMNNAME_AD_Rule_ID, null); + else + set_Value (COLUMNNAME_AD_Rule_ID, Integer.valueOf(AD_Rule_ID)); + } + + /** Get Rule. + @return Rule */ + public int getAD_Rule_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Rule_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Concept getHR_Concept() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Concept.Table_Name); + org.eevolution.model.I_HR_Concept result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Concept)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Concept_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Concept. + @param HR_Concept_ID Concept */ + public void setHR_Concept_ID (int HR_Concept_ID) + { + if (HR_Concept_ID < 1) + set_Value (COLUMNNAME_HR_Concept_ID, null); + else + set_Value (COLUMNNAME_HR_Concept_ID, Integer.valueOf(HR_Concept_ID)); + } + + /** Get Concept. + @return Concept */ + public int getHR_Concept_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Concept_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll Concept. + @param HR_PayrollConcept_ID Payroll Concept */ + public void setHR_PayrollConcept_ID (int HR_PayrollConcept_ID) + { + if (HR_PayrollConcept_ID < 1) + throw new IllegalArgumentException ("HR_PayrollConcept_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_PayrollConcept_ID, Integer.valueOf(HR_PayrollConcept_ID)); + } + + /** Get Payroll Concept. + @return Payroll Concept */ + public int getHR_PayrollConcept_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_PayrollConcept_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Payroll.Table_Name); + org.eevolution.model.I_HR_Payroll result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Payroll)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Payroll_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + set_ValueNoCheck (COLUMNNAME_HR_Payroll_ID, null); + else + set_ValueNoCheck (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); + } + + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Displayed. + @param IsDisplayed + Determines, if this field is displayed + */ + public void setIsDisplayed (boolean IsDisplayed) + { + set_Value (COLUMNNAME_IsDisplayed, Boolean.valueOf(IsDisplayed)); + } + + /** Get Displayed. + @return Determines, if this field is displayed + */ + public boolean isDisplayed () + { + Object oo = get_Value(COLUMNNAME_IsDisplayed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Included. + @param IsInclude + Defines whether this content / template is included into another one + */ + public void setIsInclude (boolean IsInclude) + { + set_Value (COLUMNNAME_IsInclude, Boolean.valueOf(IsInclude)); + } + + /** Get Included. + @return Defines whether this content / template is included into another one + */ + public boolean isInclude () + { + Object oo = get_Value(COLUMNNAME_IsInclude); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Printed. + @param IsPrinted + Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted) + { + set_Value (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted)); + } + + /** Get Printed. + @return Indicates if this document / line is printed + */ + public boolean isPrinted () + { + Object oo = get_Value(COLUMNNAME_IsPrinted); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + + if (Name != null && Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first + */ + public void setSeqNo (int SeqNo) + { + set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); + } + + /** Get Sequence. + @return Method of ordering records; lowest number comes first + */ + public int getSeqNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_HR_Period.java b/base/src/org/eevolution/model/X_HR_Period.java new file mode 100644 index 0000000000..4eb1b4eede --- /dev/null +++ b/base/src/org/eevolution/model/X_HR_Period.java @@ -0,0 +1,471 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for HR_Period + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Period extends PO implements I_HR_Period, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_HR_Period (Properties ctx, int HR_Period_ID, String trxName) + { + super (ctx, HR_Period_ID, trxName); + /** if (HR_Period_ID == 0) + { + setC_Period_ID (0); + setC_Year_ID (0); + setDateAcct (new Timestamp(System.currentTimeMillis())); + setHR_Payroll_ID (0); + setHR_Period_ID (0); + setName (null); + setPeriodNo (0); + setStartDate (new Timestamp(System.currentTimeMillis())); + } */ + } + + /** Load Constructor */ + public X_HR_Period (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() + { + StringBuffer sb = new StringBuffer ("X_HR_Period[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_C_Period getC_Period() throws Exception + { + Class clazz = MTable.getClass(I_C_Period.Table_Name); + I_C_Period result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Period)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Period_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Period. + @param C_Period_ID + Period of the Calendar + */ + public void setC_Period_ID (int C_Period_ID) + { + if (C_Period_ID < 1) + throw new IllegalArgumentException ("C_Period_ID is mandatory."); + set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID)); + } + + /** Get Period. + @return Period of the Calendar + */ + public int getC_Period_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Year getC_Year() throws Exception + { + Class clazz = MTable.getClass(I_C_Year.Table_Name); + I_C_Year result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Year)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Year_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Year. + @param C_Year_ID + Calendar Year + */ + public void setC_Year_ID (int C_Year_ID) + { + if (C_Year_ID < 1) + throw new IllegalArgumentException ("C_Year_ID is mandatory."); + set_Value (COLUMNNAME_C_Year_ID, Integer.valueOf(C_Year_ID)); + } + + /** Get Year. + @return Calendar Year + */ + public int getC_Year_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Year_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Account Date. + @param DateAcct + Accounting Date + */ + public void setDateAcct (Timestamp DateAcct) + { + if (DateAcct == null) + throw new IllegalArgumentException ("DateAcct is mandatory."); + set_Value (COLUMNNAME_DateAcct, DateAcct); + } + + /** Get Account Date. + @return Accounting Date + */ + public Timestamp getDateAcct () + { + return (Timestamp)get_Value(COLUMNNAME_DateAcct); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set End Date. + @param EndDate + Last effective date (inclusive) + */ + public void setEndDate (Timestamp EndDate) + { + set_Value (COLUMNNAME_EndDate, EndDate); + } + + /** Get End Date. + @return Last effective date (inclusive) + */ + public Timestamp getEndDate () + { + return (Timestamp)get_Value(COLUMNNAME_EndDate); + } + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Payroll.Table_Name); + org.eevolution.model.I_HR_Payroll result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Payroll)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Payroll_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + throw new IllegalArgumentException ("HR_Payroll_ID is mandatory."); + set_Value (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); + } + + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll Period. + @param HR_Period_ID Payroll Period */ + public void setHR_Period_ID (int HR_Period_ID) + { + if (HR_Period_ID < 1) + throw new IllegalArgumentException ("HR_Period_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Period_ID, Integer.valueOf(HR_Period_ID)); + } + + /** Get Payroll Period. + @return Payroll Period */ + public int getHR_Period_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Period_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Year getHR_Year() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Year.Table_Name); + org.eevolution.model.I_HR_Year result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Year)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Year_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll Year. + @param HR_Year_ID Payroll Year */ + public void setHR_Year_ID (int HR_Year_ID) + { + if (HR_Year_ID < 1) + set_ValueNoCheck (COLUMNNAME_HR_Year_ID, null); + else + set_ValueNoCheck (COLUMNNAME_HR_Year_ID, Integer.valueOf(HR_Year_ID)); + } + + /** Get Payroll Year. + @return Payroll Year */ + public int getHR_Year_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Year_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 40) + { + log.warning("Length > 40 - truncated"); + Name = Name.substring(0, 40); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Period Action. + @param PeriodAction + Action taken for this period + */ + public void setPeriodAction (String PeriodAction) + { + + if (PeriodAction != null && PeriodAction.length() > 1) + { + log.warning("Length > 1 - truncated"); + PeriodAction = PeriodAction.substring(0, 1); + } + set_Value (COLUMNNAME_PeriodAction, PeriodAction); + } + + /** Get Period Action. + @return Action taken for this period + */ + public String getPeriodAction () + { + return (String)get_Value(COLUMNNAME_PeriodAction); + } + + /** Set Period No. + @param PeriodNo + Unique Period Number + */ + public void setPeriodNo (int PeriodNo) + { + set_Value (COLUMNNAME_PeriodNo, Integer.valueOf(PeriodNo)); + } + + /** Get Period No. + @return Unique Period Number + */ + public int getPeriodNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PeriodNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Period Status. + @param PeriodStatus + Current state of this period + */ + public void setPeriodStatus (String PeriodStatus) + { + + if (PeriodStatus != null && PeriodStatus.length() > 1) + { + log.warning("Length > 1 - truncated"); + PeriodStatus = PeriodStatus.substring(0, 1); + } + set_Value (COLUMNNAME_PeriodStatus, PeriodStatus); + } + + /** Get Period Status. + @return Current state of this period + */ + public String getPeriodStatus () + { + return (String)get_Value(COLUMNNAME_PeriodStatus); + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** 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; + } + + /** Set Start Date. + @param StartDate + First effective day (inclusive) + */ + public void setStartDate (Timestamp StartDate) + { + if (StartDate == null) + throw new IllegalArgumentException ("StartDate is mandatory."); + set_Value (COLUMNNAME_StartDate, StartDate); + } + + /** Get Start Date. + @return First effective day (inclusive) + */ + public Timestamp getStartDate () + { + return (Timestamp)get_Value(COLUMNNAME_StartDate); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_GL_Journal.java b/base/src/org/eevolution/model/X_HR_Process.java similarity index 50% rename from base/src/org/compiere/model/X_GL_Journal.java rename to base/src/org/eevolution/model/X_HR_Process.java index 6ec86cac9e..e53fc9a5c9 100644 --- a/base/src/org/compiere/model/X_GL_Journal.java +++ b/base/src/org/eevolution/model/X_HR_Process.java @@ -15,21 +15,20 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.lang.reflect.Constructor; -import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Properties; import java.util.logging.Level; -import org.compiere.util.Env; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Model for GL_Journal +/** Generated Model for HR_Process * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Process extends PO implements I_HR_Process, I_Persistent { /** @@ -38,58 +37,33 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_GL_Journal (Properties ctx, int GL_Journal_ID, String trxName) + public X_HR_Process (Properties ctx, int HR_Process_ID, String trxName) { - super (ctx, GL_Journal_ID, trxName); - /** if (GL_Journal_ID == 0) + super (ctx, HR_Process_ID, trxName); + /** if (HR_Process_ID == 0) { - setC_AcctSchema_ID (0); -// @$C_AcctSchema_ID@ - setC_ConversionType_ID (0); - setC_Currency_ID (0); -// @C_Currency_ID@ - setC_DocType_ID (0); -// @C_DocType_ID@ - setC_Period_ID (0); -// @C_Period_ID@ - setCurrencyRate (Env.ZERO); -// 1 + setC_DocTypeTarget_ID (0); setDateAcct (new Timestamp(System.currentTimeMillis())); -// @DateAcct@ - setDateDoc (new Timestamp(System.currentTimeMillis())); -// @DateDoc@ - setDescription (null); setDocAction (null); // CO setDocStatus (null); // DR - setDocumentNo (null); - setGL_Category_ID (0); -// @GL_Category_ID@ - setGL_Journal_ID (0); - setIsApproved (true); -// Y - setIsPrinted (false); -// N + setHR_Payroll_ID (0); + setName (null); setPosted (false); // N - setPostingType (null); -// @PostingType@ - setTotalCr (Env.ZERO); -// 0 - setTotalDr (Env.ZERO); -// 0 + setProcessed (false); } */ } /** Load Constructor */ - public X_GL_Journal (Properties ctx, ResultSet rs, String trxName) + public X_HR_Process (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } /** AccessLevel - * @return 1 - Org + * @return 3 - Client - Org */ protected int get_AccessLevel() { @@ -105,19 +79,19 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_GL_Journal[") + StringBuffer sb = new StringBuffer ("X_HR_Process[") .append(get_ID()).append("]"); return sb.toString(); } - public I_C_AcctSchema getC_AcctSchema() throws Exception + public I_AD_PrintFormat getAD_PrintFormat() throws Exception { - Class clazz = MTable.getClass(I_C_AcctSchema.Table_Name); - I_C_AcctSchema result = null; + Class clazz = MTable.getClass(I_AD_PrintFormat.Table_Name); + I_AD_PrintFormat result = null; try { Constructor constructor = null; constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_ID()), get_TrxName()}); + result = (I_AD_PrintFormat)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_PrintFormat_ID()), get_TrxName()}); } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); @@ -126,36 +100,37 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return result; } - /** Set Accounting Schema. - @param C_AcctSchema_ID - Rules for accounting + /** Set Print Format. + @param AD_PrintFormat_ID + Data Print Format */ - public void setC_AcctSchema_ID (int C_AcctSchema_ID) + public void setAD_PrintFormat_ID (int AD_PrintFormat_ID) { - if (C_AcctSchema_ID < 1) - throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID)); + if (AD_PrintFormat_ID < 1) + set_Value (COLUMNNAME_AD_PrintFormat_ID, null); + else + set_Value (COLUMNNAME_AD_PrintFormat_ID, Integer.valueOf(AD_PrintFormat_ID)); } - /** Get Accounting Schema. - @return Rules for accounting + /** Get Print Format. + @return Data Print Format */ - public int getC_AcctSchema_ID () + public int getAD_PrintFormat_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_AD_PrintFormat_ID); if (ii == null) return 0; return ii.intValue(); } - public I_C_ConversionType getC_ConversionType() throws Exception + public I_AD_Workflow getAD_Workflow() throws Exception { - Class clazz = MTable.getClass(I_C_ConversionType.Table_Name); - I_C_ConversionType result = null; + Class clazz = MTable.getClass(I_AD_Workflow.Table_Name); + I_AD_Workflow result = null; try { Constructor constructor = null; constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_ConversionType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_ConversionType_ID()), get_TrxName()}); + result = (I_AD_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Workflow_ID()), get_TrxName()}); } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); @@ -164,36 +139,37 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return result; } - /** Set Currency Type. - @param C_ConversionType_ID - Currency Conversion Rate Type + /** Set Workflow. + @param AD_Workflow_ID + Workflow or combination of tasks */ - public void setC_ConversionType_ID (int C_ConversionType_ID) + public void setAD_Workflow_ID (int AD_Workflow_ID) { - if (C_ConversionType_ID < 1) - throw new IllegalArgumentException ("C_ConversionType_ID is mandatory."); - set_Value (COLUMNNAME_C_ConversionType_ID, Integer.valueOf(C_ConversionType_ID)); + if (AD_Workflow_ID < 1) + set_Value (COLUMNNAME_AD_Workflow_ID, null); + else + set_Value (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); } - /** Get Currency Type. - @return Currency Conversion Rate Type + /** Get Workflow. + @return Workflow or combination of tasks */ - public int getC_ConversionType_ID () + public int getAD_Workflow_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workflow_ID); if (ii == null) return 0; return ii.intValue(); } - public I_C_Currency getC_Currency() throws Exception + public I_C_BPartner getC_BPartner() throws Exception { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; + Class clazz = MTable.getClass(I_C_BPartner.Table_Name); + I_C_BPartner result = null; try { Constructor constructor = null; constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); + result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); @@ -202,23 +178,87 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return result; } - /** Set Currency. - @param C_Currency_ID - The Currency for this record + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner */ - public void setC_Currency_ID (int C_Currency_ID) + public void setC_BPartner_ID (int C_BPartner_ID) { - if (C_Currency_ID < 1) - throw new IllegalArgumentException ("C_Currency_ID is mandatory."); - set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); } - /** Get Currency. - @return The Currency for this record + /** Get Business Partner . + @return Identifies a Business Partner */ - public int getC_Currency_ID () + public int getC_BPartner_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Charge getC_Charge() throws Exception + { + Class clazz = MTable.getClass(I_C_Charge.Table_Name); + I_C_Charge result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Charge. + @param C_Charge_ID + Additional document charges + */ + public void setC_Charge_ID (int C_Charge_ID) + { + if (C_Charge_ID < 1) + set_Value (COLUMNNAME_C_Charge_ID, null); + else + set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); + } + + /** Get Charge. + @return Additional document charges + */ + public int getC_Charge_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** C_DocTypeTarget_ID AD_Reference_ID=170 */ + public static final int C_DOCTYPETARGET_ID_AD_Reference_ID=170; + /** Set Target Document Type. + @param C_DocTypeTarget_ID + Target document type for conversing documents + */ + public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID) + { + if (C_DocTypeTarget_ID < 1) + throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory."); + set_Value (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID)); + } + + /** 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(); @@ -246,9 +286,10 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent */ public void setC_DocType_ID (int C_DocType_ID) { - if (C_DocType_ID < 0) - throw new IllegalArgumentException ("C_DocType_ID is mandatory."); - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); + if (C_DocType_ID < 1) + set_ValueNoCheck (COLUMNNAME_C_DocType_ID, null); + else + set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); } /** Get Document Type. @@ -262,70 +303,66 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return ii.intValue(); } - /** C_Period_ID AD_Reference_ID=275 */ - public static final int C_PERIOD_ID_AD_Reference_ID=275; - /** Set Period. - @param C_Period_ID - Period of the Calendar + public I_C_PaySelection getC_PaySelection() throws Exception + { + Class clazz = MTable.getClass(I_C_PaySelection.Table_Name); + I_C_PaySelection result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_PaySelection)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaySelection_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payment Selection. + @param C_PaySelection_ID + Payment Selection */ - public void setC_Period_ID (int C_Period_ID) + public void setC_PaySelection_ID (int C_PaySelection_ID) { - if (C_Period_ID < 1) - throw new IllegalArgumentException ("C_Period_ID is mandatory."); - set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID)); + if (C_PaySelection_ID < 1) + set_Value (COLUMNNAME_C_PaySelection_ID, null); + else + set_Value (COLUMNNAME_C_PaySelection_ID, Integer.valueOf(C_PaySelection_ID)); } - /** Get Period. - @return Period of the Calendar + /** Get Payment Selection. + @return Payment Selection */ - public int getC_Period_ID () + public int getC_PaySelection_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_C_PaySelection_ID); if (ii == null) return 0; return ii.intValue(); } - /** Set Control Amount. - @param ControlAmt - If not zero, the Debit amount of the document must be equal this amount + /** Set Column SQL. + @param ColumnSQL + Virtual Column (r/o) */ - public void setControlAmt (BigDecimal ControlAmt) + public void setColumnSQL (String ColumnSQL) { - set_Value (COLUMNNAME_ControlAmt, ControlAmt); + + if (ColumnSQL != null && ColumnSQL.length() > 255) + { + log.warning("Length > 255 - truncated"); + ColumnSQL = ColumnSQL.substring(0, 255); + } + set_Value (COLUMNNAME_ColumnSQL, ColumnSQL); } - /** Get Control Amount. - @return If not zero, the Debit amount of the document must be equal this amount + /** Get Column SQL. + @return Virtual Column (r/o) */ - public BigDecimal getControlAmt () + public String getColumnSQL () { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ControlAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Rate. - @param CurrencyRate - Currency Conversion Rate - */ - public void setCurrencyRate (BigDecimal CurrencyRate) - { - if (CurrencyRate == null) - throw new IllegalArgumentException ("CurrencyRate is mandatory."); - set_Value (COLUMNNAME_CurrencyRate, CurrencyRate); - } - - /** Get Rate. - @return Currency Conversion Rate - */ - public BigDecimal getCurrencyRate () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrencyRate); - if (bd == null) - return Env.ZERO; - return bd; + return (String)get_Value(COLUMNNAME_ColumnSQL); } /** Set Account Date. @@ -336,7 +373,7 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent { if (DateAcct == null) throw new IllegalArgumentException ("DateAcct is mandatory."); - set_Value (COLUMNNAME_DateAcct, DateAcct); + set_ValueNoCheck (COLUMNNAME_DateAcct, DateAcct); } /** Get Account Date. @@ -347,50 +384,6 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return (Timestamp)get_Value(COLUMNNAME_DateAcct); } - /** Set Document Date. - @param DateDoc - Date of the Document - */ - public void setDateDoc (Timestamp DateDoc) - { - if (DateDoc == null) - throw new IllegalArgumentException ("DateDoc is mandatory."); - set_Value (COLUMNNAME_DateDoc, DateDoc); - } - - /** Get Document Date. - @return Date of the Document - */ - public Timestamp getDateDoc () - { - return (Timestamp)get_Value(COLUMNNAME_DateDoc); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - if (Description == null) - throw new IllegalArgumentException ("Description is mandatory."); - - if (Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - /** DocAction AD_Reference_ID=135 */ public static final int DOCACTION_AD_Reference_ID=135; /** Complete = CO */ @@ -501,13 +494,11 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent */ public void setDocumentNo (String DocumentNo) { - if (DocumentNo == null) - throw new IllegalArgumentException ("DocumentNo is mandatory."); - if (DocumentNo.length() > 30) + if (DocumentNo != null && DocumentNo.length() > 90) { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 30); + log.warning("Length > 90 - truncated"); + DocumentNo = DocumentNo.substring(0, 90); } set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo); } @@ -520,207 +511,245 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return (String)get_Value(COLUMNNAME_DocumentNo); } + public org.eevolution.model.I_HR_Department getHR_Department() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Department.Table_Name); + org.eevolution.model.I_HR_Department result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Department)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Department_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Department. + @param HR_Department_ID Department */ + public void setHR_Department_ID (int HR_Department_ID) + { + if (HR_Department_ID < 1) + set_Value (COLUMNNAME_HR_Department_ID, null); + else + set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID)); + } + + /** Get Department. + @return Department */ + public int getHR_Department_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Employee getHR_Employee() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Employee.Table_Name); + org.eevolution.model.I_HR_Employee result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Employee)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Employee_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Employee. + @param HR_Employee_ID Employee */ + public void setHR_Employee_ID (int HR_Employee_ID) + { + if (HR_Employee_ID < 1) + set_Value (COLUMNNAME_HR_Employee_ID, null); + else + set_Value (COLUMNNAME_HR_Employee_ID, Integer.valueOf(HR_Employee_ID)); + } + + /** Get Employee. + @return Employee */ + public int getHR_Employee_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Employee_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Job getHR_Job() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Job.Table_Name); + org.eevolution.model.I_HR_Job result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Job)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Job_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Job. + @param HR_Job_ID Job */ + public void setHR_Job_ID (int HR_Job_ID) + { + if (HR_Job_ID < 1) + set_Value (COLUMNNAME_HR_Job_ID, null); + else + set_Value (COLUMNNAME_HR_Job_ID, Integer.valueOf(HR_Job_ID)); + } + + /** Get Job. + @return Job */ + public int getHR_Job_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Job_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Payroll.Table_Name); + org.eevolution.model.I_HR_Payroll result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Payroll)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Payroll_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + throw new IllegalArgumentException ("HR_Payroll_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); + } + + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_HR_Period getHR_Period() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Period.Table_Name); + org.eevolution.model.I_HR_Period result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Period)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Period_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payroll Period. + @param HR_Period_ID Payroll Period */ + public void setHR_Period_ID (int HR_Period_ID) + { + if (HR_Period_ID < 1) + set_ValueNoCheck (COLUMNNAME_HR_Period_ID, null); + else + set_ValueNoCheck (COLUMNNAME_HR_Period_ID, Integer.valueOf(HR_Period_ID)); + } + + /** Get Payroll Period. + @return Payroll Period */ + public int getHR_Period_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Period_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Payroll Process. + @param HR_Process_ID Payroll Process */ + public void setHR_Process_ID (int HR_Process_ID) + { + if (HR_Process_ID < 1) + set_ValueNoCheck (COLUMNNAME_HR_Process_ID, null); + else + set_ValueNoCheck (COLUMNNAME_HR_Process_ID, Integer.valueOf(HR_Process_ID)); + } + + /** Get Payroll Process. + @return Payroll Process */ + public int getHR_Process_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Process_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { - return new KeyNamePair(get_ID(), getDocumentNo()); + return new KeyNamePair(get_ID(), getName()); } - public I_GL_Budget getGL_Budget() throws Exception - { - Class clazz = MTable.getClass(I_GL_Budget.Table_Name); - I_GL_Budget result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_GL_Budget)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Budget_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Budget. - @param GL_Budget_ID - General Ledger Budget - */ - public void setGL_Budget_ID (int GL_Budget_ID) - { - if (GL_Budget_ID < 1) - set_Value (COLUMNNAME_GL_Budget_ID, null); - else - set_Value (COLUMNNAME_GL_Budget_ID, Integer.valueOf(GL_Budget_ID)); - } - - /** Get Budget. - @return General Ledger Budget - */ - public int getGL_Budget_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_Budget_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_GL_Category getGL_Category() throws Exception - { - Class clazz = MTable.getClass(I_GL_Category.Table_Name); - I_GL_Category result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_GL_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Category_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set GL Category. - @param GL_Category_ID - General Ledger Category - */ - public void setGL_Category_ID (int GL_Category_ID) - { - if (GL_Category_ID < 1) - throw new IllegalArgumentException ("GL_Category_ID is mandatory."); - set_Value (COLUMNNAME_GL_Category_ID, Integer.valueOf(GL_Category_ID)); - } - - /** Get GL Category. - @return General Ledger Category - */ - public int getGL_Category_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_Category_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_GL_JournalBatch getGL_JournalBatch() throws Exception - { - Class clazz = MTable.getClass(I_GL_JournalBatch.Table_Name); - I_GL_JournalBatch result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_GL_JournalBatch)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_JournalBatch_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Journal Batch. - @param GL_JournalBatch_ID - General Ledger Journal Batch - */ - public void setGL_JournalBatch_ID (int GL_JournalBatch_ID) - { - if (GL_JournalBatch_ID < 1) - set_ValueNoCheck (COLUMNNAME_GL_JournalBatch_ID, null); - else - set_ValueNoCheck (COLUMNNAME_GL_JournalBatch_ID, Integer.valueOf(GL_JournalBatch_ID)); - } - - /** Get Journal Batch. - @return General Ledger Journal Batch - */ - public int getGL_JournalBatch_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_JournalBatch_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Journal. - @param GL_Journal_ID - General Ledger Journal - */ - public void setGL_Journal_ID (int GL_Journal_ID) - { - if (GL_Journal_ID < 1) - throw new IllegalArgumentException ("GL_Journal_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_GL_Journal_ID, Integer.valueOf(GL_Journal_ID)); - } - - /** Get Journal. - @return General Ledger Journal - */ - public int getGL_Journal_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_GL_Journal_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Approved. - @param IsApproved - Indicates if this document requires approval - */ - public void setIsApproved (boolean IsApproved) - { - set_ValueNoCheck (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); - } - - /** Get Approved. - @return Indicates if this document requires approval - */ - public boolean isApproved () - { - Object oo = get_Value(COLUMNNAME_IsApproved); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Printed. - @param IsPrinted - Indicates if this document / line is printed - */ - public void setIsPrinted (boolean IsPrinted) - { - set_ValueNoCheck (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted)); - } - - /** Get Printed. - @return Indicates if this document / line is printed - */ - public boolean isPrinted () - { - Object oo = get_Value(COLUMNNAME_IsPrinted); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - /** Set Posted. @param Posted Posting status */ public void setPosted (boolean Posted) { - set_ValueNoCheck (COLUMNNAME_Posted, Boolean.valueOf(Posted)); + set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); } /** Get Posted. @@ -738,42 +767,6 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return false; } - /** PostingType AD_Reference_ID=125 */ - public static final int POSTINGTYPE_AD_Reference_ID=125; - /** Actual = A */ - public static final String POSTINGTYPE_Actual = "A"; - /** Budget = B */ - public static final String POSTINGTYPE_Budget = "B"; - /** Commitment = E */ - public static final String POSTINGTYPE_Commitment = "E"; - /** Statistical = S */ - public static final String POSTINGTYPE_Statistical = "S"; - /** Reservation = R */ - public static final String POSTINGTYPE_Reservation = "R"; - /** Set PostingType. - @param PostingType - The type of posted amount for the transaction - */ - public void setPostingType (String PostingType) - { - if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory"); - if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R"); - if (PostingType.length() > 1) - { - log.warning("Length > 1 - truncated"); - PostingType = PostingType.substring(0, 1); - } - set_Value (COLUMNNAME_PostingType, PostingType); - } - - /** Get PostingType. - @return The type of posted amount for the transaction - */ - public String getPostingType () - { - return (String)get_Value(COLUMNNAME_PostingType); - } - /** Set Processed. @param Processed The document has been processed @@ -819,47 +812,28 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return false; } - /** Set Total Credit. - @param TotalCr - Total Credit in document currency + /** Reversal_ID AD_Reference_ID=53253 */ + public static final int REVERSAL_ID_AD_Reference_ID=53253; + /** Set Reversal ID. + @param Reversal_ID + ID of document reversal */ - public void setTotalCr (BigDecimal TotalCr) + public void setReversal_ID (int Reversal_ID) { - if (TotalCr == null) - throw new IllegalArgumentException ("TotalCr is mandatory."); - set_ValueNoCheck (COLUMNNAME_TotalCr, TotalCr); + if (Reversal_ID < 1) + set_Value (COLUMNNAME_Reversal_ID, null); + else + set_Value (COLUMNNAME_Reversal_ID, Integer.valueOf(Reversal_ID)); } - /** Get Total Credit. - @return Total Credit in document currency + /** Get Reversal ID. + @return ID of document reversal */ - public BigDecimal getTotalCr () + public int getReversal_ID () { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalCr); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Total Debit. - @param TotalDr - Total debit in document currency - */ - public void setTotalDr (BigDecimal TotalDr) - { - if (TotalDr == null) - throw new IllegalArgumentException ("TotalDr is mandatory."); - set_ValueNoCheck (COLUMNNAME_TotalDr, TotalDr); - } - - /** Get Total Debit. - @return Total debit in document currency - */ - public BigDecimal getTotalDr () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalDr); - if (bd == null) - return Env.ZERO; - return bd; + Integer ii = (Integer)get_Value(COLUMNNAME_Reversal_ID); + if (ii == null) + return 0; + return ii.intValue(); } } \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_Forecast.java b/base/src/org/eevolution/model/X_HR_Year.java similarity index 54% rename from base/src/org/compiere/model/X_M_Forecast.java rename to base/src/org/eevolution/model/X_HR_Year.java index 01398d8b7f..57038a5dc7 100644 --- a/base/src/org/compiere/model/X_M_Forecast.java +++ b/base/src/org/eevolution/model/X_HR_Year.java @@ -15,18 +15,19 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.lang.reflect.Constructor; import java.sql.ResultSet; +import java.sql.Timestamp; import java.util.Properties; import java.util.logging.Level; -import org.compiere.util.KeyNamePair; +import org.compiere.model.*; -/** Generated Model for M_Forecast +/** Generated Model for HR_Year * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_Forecast extends PO implements I_M_Forecast, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_HR_Year extends PO implements I_HR_Year, I_Persistent { /** @@ -35,27 +36,28 @@ public class X_M_Forecast extends PO implements I_M_Forecast, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_M_Forecast (Properties ctx, int M_Forecast_ID, String trxName) + public X_HR_Year (Properties ctx, int HR_Year_ID, String trxName) { - super (ctx, M_Forecast_ID, trxName); - /** if (M_Forecast_ID == 0) + super (ctx, HR_Year_ID, trxName); + /** if (HR_Year_ID == 0) { - setC_Calendar_ID (0); setC_Year_ID (0); - setIsDefault (false); - setM_Forecast_ID (0); - setName (null); + setHR_Payroll_ID (0); + setHR_Year_ID (0); + setNetDays (0); + setQty (0); + setStartDate (new Timestamp(System.currentTimeMillis())); } */ } /** Load Constructor */ - public X_M_Forecast (Properties ctx, ResultSet rs, String trxName) + public X_HR_Year (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } /** AccessLevel - * @return 2 - Client + * @return 3 - Client - Org */ protected int get_AccessLevel() { @@ -71,49 +73,11 @@ public class X_M_Forecast extends PO implements I_M_Forecast, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_M_Forecast[") + StringBuffer sb = new StringBuffer ("X_HR_Year[") .append(get_ID()).append("]"); return sb.toString(); } - public I_C_Calendar getC_Calendar() throws Exception - { - Class clazz = MTable.getClass(I_C_Calendar.Table_Name); - I_C_Calendar result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Calendar)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Calendar_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Calendar. - @param C_Calendar_ID - Accounting Calendar Name - */ - public void setC_Calendar_ID (int C_Calendar_ID) - { - if (C_Calendar_ID < 1) - throw new IllegalArgumentException ("C_Calendar_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Calendar_ID, Integer.valueOf(C_Calendar_ID)); - } - - /** Get Calendar. - @return Accounting Calendar Name - */ - public int getC_Calendar_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Calendar_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - public I_C_Year getC_Year() throws Exception { Class clazz = MTable.getClass(I_C_Year.Table_Name); @@ -138,7 +102,7 @@ public class X_M_Forecast extends PO implements I_M_Forecast, I_Persistent { if (C_Year_ID < 1) throw new IllegalArgumentException ("C_Year_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Year_ID, Integer.valueOf(C_Year_ID)); + set_Value (COLUMNNAME_C_Year_ID, Integer.valueOf(C_Year_ID)); } /** Get Year. @@ -152,67 +116,95 @@ public class X_M_Forecast extends PO implements I_M_Forecast, I_Persistent return ii.intValue(); } - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { + public org.eevolution.model.I_HR_Payroll getHR_Payroll() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_HR_Payroll.Table_Name); + org.eevolution.model.I_HR_Payroll result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_HR_Payroll)constructor.newInstance(new Object[] {getCtx(), new Integer(getHR_Payroll_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 255); - } - set_Value (COLUMNNAME_Description, Description); + /** Set Payroll. + @param HR_Payroll_ID Payroll */ + public void setHR_Payroll_ID (int HR_Payroll_ID) + { + if (HR_Payroll_ID < 1) + throw new IllegalArgumentException ("HR_Payroll_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID)); } - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () + /** Get Payroll. + @return Payroll */ + public int getHR_Payroll_ID () { - return (String)get_Value(COLUMNNAME_Description); + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Payroll_ID); + if (ii == null) + return 0; + return ii.intValue(); } - /** Set Comment/Help. - @param Help - Comment or Hint - */ - public void setHelp (String Help) + /** Set Payroll Year. + @param HR_Year_ID Payroll Year */ + public void setHR_Year_ID (int HR_Year_ID) { - - if (Help != null && Help.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - Help = Help.substring(0, 2000); - } - set_Value (COLUMNNAME_Help, Help); + if (HR_Year_ID < 1) + throw new IllegalArgumentException ("HR_Year_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_HR_Year_ID, Integer.valueOf(HR_Year_ID)); } - /** Get Comment/Help. - @return Comment or Hint - */ - public String getHelp () + /** Get Payroll Year. + @return Payroll Year */ + public int getHR_Year_ID () { - return (String)get_Value(COLUMNNAME_Help); + Integer ii = (Integer)get_Value(COLUMNNAME_HR_Year_ID); + if (ii == null) + return 0; + return ii.intValue(); } - /** Set Default. - @param IsDefault - Default value + /** Set Net Days. + @param NetDays + Net Days in which payment is due */ - public void setIsDefault (boolean IsDefault) + public void setNetDays (int NetDays) { - set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault)); + set_Value (COLUMNNAME_NetDays, Integer.valueOf(NetDays)); } - /** Get Default. - @return Default value + /** Get Net Days. + @return Net Days in which payment is due */ - public boolean isDefault () + public int getNetDays () { - Object oo = get_Value(COLUMNNAME_IsDefault); + Integer ii = (Integer)get_Value(COLUMNNAME_NetDays); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) @@ -222,61 +214,6 @@ public class X_M_Forecast extends PO implements I_M_Forecast, I_Persistent return false; } - /** Set Forecast. - @param M_Forecast_ID - Material Forecast - */ - public void setM_Forecast_ID (int M_Forecast_ID) - { - if (M_Forecast_ID < 1) - throw new IllegalArgumentException ("M_Forecast_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Forecast_ID, Integer.valueOf(M_Forecast_ID)); - } - - /** Get Forecast. - @return Material Forecast - */ - public int getM_Forecast_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Forecast_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name == null) - throw new IllegalArgumentException ("Name is mandatory."); - - if (Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 60); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) @@ -297,4 +234,43 @@ public class X_M_Forecast extends PO implements I_M_Forecast, I_Persistent } return false; } + + /** Set Quantity. + @param Qty + Quantity + */ + public void setQty (int Qty) + { + set_Value (COLUMNNAME_Qty, Integer.valueOf(Qty)); + } + + /** Get Quantity. + @return Quantity + */ + public int getQty () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Qty); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Start Date. + @param StartDate + First effective day (inclusive) + */ + public void setStartDate (Timestamp StartDate) + { + if (StartDate == null) + throw new IllegalArgumentException ("StartDate is mandatory."); + set_Value (COLUMNNAME_StartDate, StartDate); + } + + /** Get Start Date. + @return First effective day (inclusive) + */ + public Timestamp getStartDate () + { + return (Timestamp)get_Value(COLUMNNAME_StartDate); + } } \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_IMP_Processor.java b/base/src/org/eevolution/model/X_IMP_Processor.java new file mode 100644 index 0000000000..118f5cb5f5 --- /dev/null +++ b/base/src/org/eevolution/model/X_IMP_Processor.java @@ -0,0 +1,436 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for IMP_Processor + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_IMP_Processor extends PO implements I_IMP_Processor, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_IMP_Processor (Properties ctx, int IMP_Processor_ID, String trxName) + { + super (ctx, IMP_Processor_ID, trxName); + /** if (IMP_Processor_ID == 0) + { + setFrequency (0); + setFrequencyType (null); + setIMP_Processor_ID (0); + setIMP_Processor_Type_ID (0); + setKeepLogDays (0); +// 7 + setName (null); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_IMP_Processor (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + 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() + { + StringBuffer sb = new StringBuffer ("X_IMP_Processor[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Account. + @param Account Account */ + public void setAccount (String Account) + { + + if (Account != null && Account.length() > 255) + { + log.warning("Length > 255 - truncated"); + Account = Account.substring(0, 255); + } + set_Value (COLUMNNAME_Account, Account); + } + + /** Get Account. + @return Account */ + public String getAccount () + { + return (String)get_Value(COLUMNNAME_Account); + } + + /** Set Date last run. + @param DateLastRun + Date the process was last run. + */ + public void setDateLastRun (Timestamp DateLastRun) + { + set_Value (COLUMNNAME_DateLastRun, DateLastRun); + } + + /** Get Date last run. + @return Date the process was last run. + */ + public Timestamp getDateLastRun () + { + return (Timestamp)get_Value(COLUMNNAME_DateLastRun); + } + + /** Set Date next run. + @param DateNextRun + Date the process will run next + */ + public void setDateNextRun (Timestamp DateNextRun) + { + set_Value (COLUMNNAME_DateNextRun, DateNextRun); + } + + /** Get Date next run. + @return Date the process will run next + */ + public Timestamp getDateNextRun () + { + return (Timestamp)get_Value(COLUMNNAME_DateNextRun); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Frequency. + @param Frequency + Frequency of events + */ + public void setFrequency (int Frequency) + { + set_Value (COLUMNNAME_Frequency, Integer.valueOf(Frequency)); + } + + /** Get Frequency. + @return Frequency of events + */ + public int getFrequency () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Frequency); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** FrequencyType AD_Reference_ID=221 */ + public static final int FREQUENCYTYPE_AD_Reference_ID=221; + /** Minute = M */ + public static final String FREQUENCYTYPE_Minute = "M"; + /** Hour = H */ + public static final String FREQUENCYTYPE_Hour = "H"; + /** Day = D */ + public static final String FREQUENCYTYPE_Day = "D"; + /** Set Frequency Type. + @param FrequencyType + Frequency of event + */ + public void setFrequencyType (String FrequencyType) + { + if (FrequencyType == null) throw new IllegalArgumentException ("FrequencyType is mandatory"); + if (FrequencyType.equals("M") || FrequencyType.equals("H") || FrequencyType.equals("D")); else throw new IllegalArgumentException ("FrequencyType Invalid value - " + FrequencyType + " - Reference_ID=221 - M - H - D"); + if (FrequencyType.length() > 1) + { + log.warning("Length > 1 - truncated"); + FrequencyType = FrequencyType.substring(0, 1); + } + set_Value (COLUMNNAME_FrequencyType, FrequencyType); + } + + /** Get Frequency Type. + @return Frequency of event + */ + public String getFrequencyType () + { + return (String)get_Value(COLUMNNAME_FrequencyType); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Host. + @param Host Host */ + public void setHost (String Host) + { + + if (Host != null && Host.length() > 255) + { + log.warning("Length > 255 - truncated"); + Host = Host.substring(0, 255); + } + set_Value (COLUMNNAME_Host, Host); + } + + /** Get Host. + @return Host */ + public String getHost () + { + return (String)get_Value(COLUMNNAME_Host); + } + + /** Set IMP_Processor_ID. + @param IMP_Processor_ID IMP_Processor_ID */ + public void setIMP_Processor_ID (int IMP_Processor_ID) + { + if (IMP_Processor_ID < 1) + throw new IllegalArgumentException ("IMP_Processor_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_IMP_Processor_ID, Integer.valueOf(IMP_Processor_ID)); + } + + /** Get IMP_Processor_ID. + @return IMP_Processor_ID */ + public int getIMP_Processor_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_IMP_Processor_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_IMP_Processor_Type getIMP_Processor_Type() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_IMP_Processor_Type.Table_Name); + org.eevolution.model.I_IMP_Processor_Type result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_IMP_Processor_Type)constructor.newInstance(new Object[] {getCtx(), new Integer(getIMP_Processor_Type_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set IMP_Processor_Type_ID. + @param IMP_Processor_Type_ID IMP_Processor_Type_ID */ + public void setIMP_Processor_Type_ID (int IMP_Processor_Type_ID) + { + if (IMP_Processor_Type_ID < 1) + throw new IllegalArgumentException ("IMP_Processor_Type_ID is mandatory."); + set_Value (COLUMNNAME_IMP_Processor_Type_ID, Integer.valueOf(IMP_Processor_Type_ID)); + } + + /** Get IMP_Processor_Type_ID. + @return IMP_Processor_Type_ID */ + public int getIMP_Processor_Type_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_IMP_Processor_Type_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Days to keep Log. + @param KeepLogDays + Number of days to keep the log entries + */ + public void setKeepLogDays (int KeepLogDays) + { + set_Value (COLUMNNAME_KeepLogDays, Integer.valueOf(KeepLogDays)); + } + + /** Get Days to keep Log. + @return Number of days to keep the log entries + */ + public int getKeepLogDays () + { + Integer ii = (Integer)get_Value(COLUMNNAME_KeepLogDays); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set PasswordInfo. + @param PasswordInfo PasswordInfo */ + public void setPasswordInfo (String PasswordInfo) + { + + if (PasswordInfo != null && PasswordInfo.length() > 255) + { + log.warning("Length > 255 - truncated"); + PasswordInfo = PasswordInfo.substring(0, 255); + } + set_Value (COLUMNNAME_PasswordInfo, PasswordInfo); + } + + /** Get PasswordInfo. + @return PasswordInfo */ + public String getPasswordInfo () + { + return (String)get_Value(COLUMNNAME_PasswordInfo); + } + + /** Set Port. + @param Port Port */ + public void setPort (int Port) + { + set_Value (COLUMNNAME_Port, Integer.valueOf(Port)); + } + + /** Get Port. + @return Port */ + public int getPort () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Port); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** 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; + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_IMP_ProcessorLog.java b/base/src/org/eevolution/model/X_IMP_ProcessorLog.java new file mode 100644 index 0000000000..a735a0156c --- /dev/null +++ b/base/src/org/eevolution/model/X_IMP_ProcessorLog.java @@ -0,0 +1,287 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for IMP_ProcessorLog + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_IMP_ProcessorLog extends PO implements I_IMP_ProcessorLog, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_IMP_ProcessorLog (Properties ctx, int IMP_ProcessorLog_ID, String trxName) + { + super (ctx, IMP_ProcessorLog_ID, trxName); + /** if (IMP_ProcessorLog_ID == 0) + { + setIMP_ProcessorLog_ID (0); + setIMP_Processor_ID (0); + setIsError (true); +// 'Y' + } */ + } + + /** Load Constructor */ + public X_IMP_ProcessorLog (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() + { + StringBuffer sb = new StringBuffer ("X_IMP_ProcessorLog[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set BinaryData. + @param BinaryData + Binary Data + */ + public void setBinaryData (byte[] BinaryData) + { + set_Value (COLUMNNAME_BinaryData, BinaryData); + } + + /** Get BinaryData. + @return Binary Data + */ + public byte[] getBinaryData () + { + return (byte[])get_Value(COLUMNNAME_BinaryData); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set IMP_ProcessorLog_ID. + @param IMP_ProcessorLog_ID IMP_ProcessorLog_ID */ + public void setIMP_ProcessorLog_ID (int IMP_ProcessorLog_ID) + { + if (IMP_ProcessorLog_ID < 1) + throw new IllegalArgumentException ("IMP_ProcessorLog_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_IMP_ProcessorLog_ID, Integer.valueOf(IMP_ProcessorLog_ID)); + } + + /** Get IMP_ProcessorLog_ID. + @return IMP_ProcessorLog_ID */ + public int getIMP_ProcessorLog_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_IMP_ProcessorLog_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_IMP_Processor getIMP_Processor() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_IMP_Processor.Table_Name); + org.eevolution.model.I_IMP_Processor result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_IMP_Processor)constructor.newInstance(new Object[] {getCtx(), new Integer(getIMP_Processor_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set IMP_Processor_ID. + @param IMP_Processor_ID IMP_Processor_ID */ + public void setIMP_Processor_ID (int IMP_Processor_ID) + { + if (IMP_Processor_ID < 1) + throw new IllegalArgumentException ("IMP_Processor_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_IMP_Processor_ID, Integer.valueOf(IMP_Processor_ID)); + } + + /** Get IMP_Processor_ID. + @return IMP_Processor_ID */ + public int getIMP_Processor_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_IMP_Processor_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Error. + @param IsError + An Error occured in the execution + */ + public void setIsError (boolean IsError) + { + set_Value (COLUMNNAME_IsError, Boolean.valueOf(IsError)); + } + + /** Get Error. + @return An Error occured in the execution + */ + public boolean isError () + { + Object oo = get_Value(COLUMNNAME_IsError); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Reference. + @param Reference + Reference for this record + */ + public void setReference (String Reference) + { + + if (Reference != null && Reference.length() > 60) + { + log.warning("Length > 60 - truncated"); + Reference = Reference.substring(0, 60); + } + set_Value (COLUMNNAME_Reference, Reference); + } + + /** Get Reference. + @return Reference for this record + */ + public String getReference () + { + return (String)get_Value(COLUMNNAME_Reference); + } + + /** Set Summary. + @param Summary + Textual summary of this request + */ + public void setSummary (String Summary) + { + + if (Summary != null && Summary.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Summary = Summary.substring(0, 2000); + } + set_Value (COLUMNNAME_Summary, Summary); + } + + /** Get Summary. + @return Textual summary of this request + */ + public String getSummary () + { + return (String)get_Value(COLUMNNAME_Summary); + } + + /** Set Text Message. + @param TextMsg + Text Message + */ + public void setTextMsg (String TextMsg) + { + + if (TextMsg != null && TextMsg.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + TextMsg = TextMsg.substring(0, 2000); + } + set_Value (COLUMNNAME_TextMsg, TextMsg); + } + + /** Get Text Message. + @return Text Message + */ + public String getTextMsg () + { + return (String)get_Value(COLUMNNAME_TextMsg); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_IMP_ProcessorParameter.java b/base/src/org/eevolution/model/X_IMP_ProcessorParameter.java new file mode 100644 index 0000000000..f653dc25b7 --- /dev/null +++ b/base/src/org/eevolution/model/X_IMP_ProcessorParameter.java @@ -0,0 +1,247 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for IMP_ProcessorParameter + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_IMP_ProcessorParameter extends PO implements I_IMP_ProcessorParameter, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_IMP_ProcessorParameter (Properties ctx, int IMP_ProcessorParameter_ID, String trxName) + { + super (ctx, IMP_ProcessorParameter_ID, trxName); + /** if (IMP_ProcessorParameter_ID == 0) + { + setIMP_ProcessorParameter_ID (0); + setIMP_Processor_ID (0); + setName (null); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_IMP_ProcessorParameter (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 7 - System - 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() + { + StringBuffer sb = new StringBuffer ("X_IMP_ProcessorParameter[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set IMP_ProcessorParameter_ID. + @param IMP_ProcessorParameter_ID IMP_ProcessorParameter_ID */ + public void setIMP_ProcessorParameter_ID (int IMP_ProcessorParameter_ID) + { + if (IMP_ProcessorParameter_ID < 1) + throw new IllegalArgumentException ("IMP_ProcessorParameter_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_IMP_ProcessorParameter_ID, Integer.valueOf(IMP_ProcessorParameter_ID)); + } + + /** Get IMP_ProcessorParameter_ID. + @return IMP_ProcessorParameter_ID */ + public int getIMP_ProcessorParameter_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_IMP_ProcessorParameter_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_IMP_Processor getIMP_Processor() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_IMP_Processor.Table_Name); + org.eevolution.model.I_IMP_Processor result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_IMP_Processor)constructor.newInstance(new Object[] {getCtx(), new Integer(getIMP_Processor_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set IMP_Processor_ID. + @param IMP_Processor_ID IMP_Processor_ID */ + public void setIMP_Processor_ID (int IMP_Processor_ID) + { + if (IMP_Processor_ID < 1) + throw new IllegalArgumentException ("IMP_Processor_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_IMP_Processor_ID, Integer.valueOf(IMP_Processor_ID)); + } + + /** Get IMP_Processor_ID. + @return IMP_Processor_ID */ + public int getIMP_Processor_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_IMP_Processor_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set ParameterValue. + @param ParameterValue ParameterValue */ + public void setParameterValue (String ParameterValue) + { + + if (ParameterValue != null && ParameterValue.length() > 60) + { + log.warning("Length > 60 - truncated"); + ParameterValue = ParameterValue.substring(0, 60); + } + set_Value (COLUMNNAME_ParameterValue, ParameterValue); + } + + /** Get ParameterValue. + @return ParameterValue */ + public String getParameterValue () + { + return (String)get_Value(COLUMNNAME_ParameterValue); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_IMP_Processor_Type.java b/base/src/org/eevolution/model/X_IMP_Processor_Type.java new file mode 100644 index 0000000000..bf3789b59e --- /dev/null +++ b/base/src/org/eevolution/model/X_IMP_Processor_Type.java @@ -0,0 +1,212 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.model.*; + +/** Generated Model for IMP_Processor_Type + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_IMP_Processor_Type extends PO implements I_IMP_Processor_Type, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_IMP_Processor_Type (Properties ctx, int IMP_Processor_Type_ID, String trxName) + { + super (ctx, IMP_Processor_Type_ID, trxName); + /** if (IMP_Processor_Type_ID == 0) + { + setIMP_Processor_Type_ID (0); + setJavaClass (null); + setName (null); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_IMP_Processor_Type (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 7 - System - 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() + { + StringBuffer sb = new StringBuffer ("X_IMP_Processor_Type[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set IMP_Processor_Type_ID. + @param IMP_Processor_Type_ID IMP_Processor_Type_ID */ + public void setIMP_Processor_Type_ID (int IMP_Processor_Type_ID) + { + if (IMP_Processor_Type_ID < 1) + throw new IllegalArgumentException ("IMP_Processor_Type_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_IMP_Processor_Type_ID, Integer.valueOf(IMP_Processor_Type_ID)); + } + + /** Get IMP_Processor_Type_ID. + @return IMP_Processor_Type_ID */ + public int getIMP_Processor_Type_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_IMP_Processor_Type_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set JavaClass. + @param JavaClass JavaClass */ + public void setJavaClass (String JavaClass) + { + if (JavaClass == null) + throw new IllegalArgumentException ("JavaClass is mandatory."); + + if (JavaClass.length() > 255) + { + log.warning("Length > 255 - truncated"); + JavaClass = JavaClass.substring(0, 255); + } + set_Value (COLUMNNAME_JavaClass, JavaClass); + } + + /** Get JavaClass. + @return JavaClass */ + public String getJavaClass () + { + return (String)get_Value(COLUMNNAME_JavaClass); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Cost_Collector.java b/base/src/org/eevolution/model/X_PP_Cost_Collector.java new file mode 100644 index 0000000000..ea976856db --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Cost_Collector.java @@ -0,0 +1,1163 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; + +/** Generated Model for PP_Cost_Collector + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Cost_Collector (Properties ctx, int PP_Cost_Collector_ID, String trxName) + { + super (ctx, PP_Cost_Collector_ID, trxName); + /** if (PP_Cost_Collector_ID == 0) + { + setC_DocTypeTarget_ID (0); + setC_DocType_ID (0); + setDateAcct (new Timestamp(System.currentTimeMillis())); +// @#Date@ + setM_Locator_ID (0); + setM_Product_ID (0); + setM_Warehouse_ID (0); + setMovementDate (new Timestamp(System.currentTimeMillis())); +// @#Date@ + setMovementQty (Env.ZERO); +// 0 + setPP_Cost_Collector_ID (0); + setPP_Order_ID (0); + setPosted (false); + setProcessed (false); + setS_Resource_ID (0); + } */ + } + + /** Load Constructor */ + public X_PP_Cost_Collector (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 1 - 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() + { + StringBuffer sb = new StringBuffer ("X_PP_Cost_Collector[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** AD_OrgTrx_ID AD_Reference_ID=130 */ + public static final int AD_ORGTRX_ID_AD_Reference_ID=130; + /** Set Trx Organization. + @param AD_OrgTrx_ID + Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) + { + if (AD_OrgTrx_ID < 1) + set_Value (COLUMNNAME_AD_OrgTrx_ID, null); + else + set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); + } + + /** Get Trx Organization. + @return Performing or initiating organization + */ + public int getAD_OrgTrx_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_AD_User getAD_User() throws Exception + { + Class clazz = MTable.getClass(I_AD_User.Table_Name); + I_AD_User result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set User/Contact. + @param AD_User_ID + User within the system - Internal or Business Partner Contact + */ + public void setAD_User_ID (int AD_User_ID) + { + if (AD_User_ID < 1) + set_Value (COLUMNNAME_AD_User_ID, null); + else + set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); + } + + /** Get User/Contact. + @return User within the system - Internal or Business Partner Contact + */ + public int getAD_User_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Activity getC_Activity() throws Exception + { + Class clazz = MTable.getClass(I_C_Activity.Table_Name); + I_C_Activity result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Activity. + @param C_Activity_ID + Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID) + { + if (C_Activity_ID < 1) + set_Value (COLUMNNAME_C_Activity_ID, null); + else + set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); + } + + /** Get Activity. + @return Business Activity + */ + public int getC_Activity_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Campaign getC_Campaign() throws Exception + { + Class clazz = MTable.getClass(I_C_Campaign.Table_Name); + I_C_Campaign result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Campaign. + @param C_Campaign_ID + Marketing Campaign + */ + public void setC_Campaign_ID (int C_Campaign_ID) + { + if (C_Campaign_ID < 1) + set_Value (COLUMNNAME_C_Campaign_ID, null); + else + set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); + } + + /** Get Campaign. + @return Marketing Campaign + */ + public int getC_Campaign_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** C_DocTypeTarget_ID AD_Reference_ID=53233 */ + public static final int C_DOCTYPETARGET_ID_AD_Reference_ID=53233; + /** Set Target Document Type. + @param C_DocTypeTarget_ID + Target document type for conversing documents + */ + public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID) + { + if (C_DocTypeTarget_ID < 1) + throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID)); + } + + /** 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(); + } + + /** C_DocType_ID AD_Reference_ID=53233 */ + public static final int C_DOCTYPE_ID_AD_Reference_ID=53233; + /** Set Document Type. + @param C_DocType_ID + Document type or rules + */ + public void setC_DocType_ID (int C_DocType_ID) + { + if (C_DocType_ID < 0) + throw new IllegalArgumentException ("C_DocType_ID is mandatory."); + set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); + } + + /** Get Document Type. + @return Document type or rules + */ + public int getC_DocType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Project getC_Project() throws Exception + { + Class clazz = MTable.getClass(I_C_Project.Table_Name); + I_C_Project result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Project. + @param C_Project_ID + Financial Project + */ + public void setC_Project_ID (int C_Project_ID) + { + if (C_Project_ID < 1) + set_Value (COLUMNNAME_C_Project_ID, null); + else + set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); + } + + /** Get Project. + @return Financial Project + */ + public int getC_Project_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_UOM getC_UOM() throws Exception + { + Class clazz = MTable.getClass(I_C_UOM.Table_Name); + I_C_UOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set UOM. + @param C_UOM_ID + Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID) + { + if (C_UOM_ID < 1) + set_Value (COLUMNNAME_C_UOM_ID, null); + else + set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); + } + + /** Get UOM. + @return Unit of Measure + */ + public int getC_UOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Account Date. + @param DateAcct + Accounting Date + */ + public void setDateAcct (Timestamp DateAcct) + { + if (DateAcct == null) + throw new IllegalArgumentException ("DateAcct is mandatory."); + set_Value (COLUMNNAME_DateAcct, DateAcct); + } + + /** Get Account Date. + @return Accounting Date + */ + public Timestamp getDateAcct () + { + return (Timestamp)get_Value(COLUMNNAME_DateAcct); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** DocAction AD_Reference_ID=135 */ + public static final int DOCACTION_AD_Reference_ID=135; + /** Complete = CO */ + public static final String DOCACTION_Complete = "CO"; + /** Approve = AP */ + public static final String DOCACTION_Approve = "AP"; + /** Reject = RJ */ + public static final String DOCACTION_Reject = "RJ"; + /** Post = PO */ + public static final String DOCACTION_Post = "PO"; + /** Void = VO */ + public static final String DOCACTION_Void = "VO"; + /** Close = CL */ + public static final String DOCACTION_Close = "CL"; + /** Reverse - Correct = RC */ + public static final String DOCACTION_Reverse_Correct = "RC"; + /** Reverse - Accrual = RA */ + public static final String DOCACTION_Reverse_Accrual = "RA"; + /** Invalidate = IN */ + public static final String DOCACTION_Invalidate = "IN"; + /** Re-activate = RE */ + public static final String DOCACTION_Re_Activate = "RE"; + /** = -- */ + public static final String DOCACTION_None = "--"; + /** Prepare = PR */ + public static final String DOCACTION_Prepare = "PR"; + /** Unlock = XL */ + public static final String DOCACTION_Unlock = "XL"; + /** Wait Complete = WC */ + public static final String DOCACTION_WaitComplete = "WC"; + /** Set Document Action. + @param DocAction + The targeted status of the document + */ + public void setDocAction (String DocAction) + { + + if (DocAction == null || 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("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC"); + if (DocAction != null && DocAction.length() > 2) + { + log.warning("Length > 2 - truncated"); + DocAction = DocAction.substring(0, 2); + } + set_Value (COLUMNNAME_DocAction, DocAction); + } + + /** Get Document Action. + @return The targeted status of the document + */ + public String getDocAction () + { + return (String)get_Value(COLUMNNAME_DocAction); + } + + /** DocStatus AD_Reference_ID=131 */ + public static final int DOCSTATUS_AD_Reference_ID=131; + /** Drafted = DR */ + public static final String DOCSTATUS_Drafted = "DR"; + /** Completed = CO */ + public static final String DOCSTATUS_Completed = "CO"; + /** Approved = AP */ + public static final String DOCSTATUS_Approved = "AP"; + /** Not Approved = NA */ + public static final String DOCSTATUS_NotApproved = "NA"; + /** Voided = VO */ + public static final String DOCSTATUS_Voided = "VO"; + /** Invalid = IN */ + public static final String DOCSTATUS_Invalid = "IN"; + /** Reversed = RE */ + public static final String DOCSTATUS_Reversed = "RE"; + /** Closed = CL */ + public static final String DOCSTATUS_Closed = "CL"; + /** Unknown = ?? */ + public static final String DOCSTATUS_Unknown = "??"; + /** In Progress = IP */ + public static final String DOCSTATUS_InProgress = "IP"; + /** Waiting Payment = WP */ + public static final String DOCSTATUS_WaitingPayment = "WP"; + /** Waiting Confirmation = WC */ + public static final String DOCSTATUS_WaitingConfirmation = "WC"; + /** Set Document Status. + @param DocStatus + The current status of the document + */ + public void setDocStatus (String DocStatus) + { + + if (DocStatus == null || DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); + if (DocStatus != null && DocStatus.length() > 2) + { + log.warning("Length > 2 - truncated"); + DocStatus = DocStatus.substring(0, 2); + } + set_Value (COLUMNNAME_DocStatus, DocStatus); + } + + /** Get Document Status. + @return The current status of the document + */ + public String getDocStatus () + { + return (String)get_Value(COLUMNNAME_DocStatus); + } + + /** Set DurationReal. + @param DurationReal DurationReal */ + public void setDurationReal (BigDecimal DurationReal) + { + set_Value (COLUMNNAME_DurationReal, DurationReal); + } + + /** Get DurationReal. + @return DurationReal */ + public BigDecimal getDurationReal () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DurationReal); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set IsBatchTime. + @param IsBatchTime IsBatchTime */ + public void setIsBatchTime (boolean IsBatchTime) + { + set_Value (COLUMNNAME_IsBatchTime, Boolean.valueOf(IsBatchTime)); + } + + /** Get IsBatchTime. + @return IsBatchTime */ + public boolean isBatchTime () + { + Object oo = get_Value(COLUMNNAME_IsBatchTime); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Locator. + @param M_Locator_ID + Warehouse Locator + */ + public void setM_Locator_ID (int M_Locator_ID) + { + if (M_Locator_ID < 1) + throw new IllegalArgumentException ("M_Locator_ID is mandatory."); + set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID)); + } + + /** Get Locator. + @return Warehouse Locator + */ + public int getM_Locator_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getM_Product_ID())); + } + + public I_M_Warehouse getM_Warehouse() throws Exception + { + Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); + I_M_Warehouse result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Warehouse. + @param M_Warehouse_ID + Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + if (M_Warehouse_ID < 1) + throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); + set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); + } + + /** 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 Movement Date. + @param MovementDate + Date a product was moved in or out of inventory + */ + public void setMovementDate (Timestamp MovementDate) + { + if (MovementDate == null) + throw new IllegalArgumentException ("MovementDate is mandatory."); + set_Value (COLUMNNAME_MovementDate, MovementDate); + } + + /** Get Movement Date. + @return Date a product was moved in or out of inventory + */ + public Timestamp getMovementDate () + { + return (Timestamp)get_Value(COLUMNNAME_MovementDate); + } + + /** Set Movement Quantity. + @param MovementQty + Quantity of a product moved. + */ + public void setMovementQty (BigDecimal MovementQty) + { + if (MovementQty == null) + throw new IllegalArgumentException ("MovementQty is mandatory."); + set_Value (COLUMNNAME_MovementQty, MovementQty); + } + + /** Get Movement Quantity. + @return Quantity of a product moved. + */ + public BigDecimal getMovementQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MovementQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** MovementType AD_Reference_ID=189 */ + public static final int MOVEMENTTYPE_AD_Reference_ID=189; + /** Customer Shipment = C- */ + public static final String MOVEMENTTYPE_CustomerShipment = "C-"; + /** Customer Returns = C+ */ + public static final String MOVEMENTTYPE_CustomerReturns = "C+"; + /** Vendor Receipts = V+ */ + public static final String MOVEMENTTYPE_VendorReceipts = "V+"; + /** Vendor Returns = V- */ + public static final String MOVEMENTTYPE_VendorReturns = "V-"; + /** Inventory Out = I- */ + public static final String MOVEMENTTYPE_InventoryOut = "I-"; + /** Inventory In = I+ */ + public static final String MOVEMENTTYPE_InventoryIn = "I+"; + /** Movement From = M- */ + public static final String MOVEMENTTYPE_MovementFrom = "M-"; + /** Movement To = M+ */ + public static final String MOVEMENTTYPE_MovementTo = "M+"; + /** Production + = P+ */ + public static final String MOVEMENTTYPE_ProductionPlus = "P+"; + /** Production - = P- */ + public static final String MOVEMENTTYPE_Production_ = "P-"; + /** Work Order + = W+ */ + public static final String MOVEMENTTYPE_WorkOrderPlus = "W+"; + /** Work Order - = W- */ + public static final String MOVEMENTTYPE_WorkOrder_ = "W-"; + /** Set Movement Type. + @param MovementType + Method of moving the inventory + */ + public void setMovementType (String MovementType) + { + + if (MovementType == null || MovementType.equals("C-") || MovementType.equals("C+") || MovementType.equals("V+") || MovementType.equals("V-") || MovementType.equals("I-") || MovementType.equals("I+") || MovementType.equals("M-") || MovementType.equals("M+") || MovementType.equals("P+") || MovementType.equals("P-") || MovementType.equals("W+") || MovementType.equals("W-")); else throw new IllegalArgumentException ("MovementType Invalid value - " + MovementType + " - Reference_ID=189 - C- - C+ - V+ - V- - I- - I+ - M- - M+ - P+ - P- - W+ - W-"); + if (MovementType != null && MovementType.length() > 2) + { + log.warning("Length > 2 - truncated"); + MovementType = MovementType.substring(0, 2); + } + set_Value (COLUMNNAME_MovementType, MovementType); + } + + /** Get Movement Type. + @return Method of moving the inventory + */ + public String getMovementType () + { + return (String)get_Value(COLUMNNAME_MovementType); + } + + /** Set PP_Cost_Collector_ID. + @param PP_Cost_Collector_ID PP_Cost_Collector_ID */ + public void setPP_Cost_Collector_ID (int PP_Cost_Collector_ID) + { + if (PP_Cost_Collector_ID < 1) + throw new IllegalArgumentException ("PP_Cost_Collector_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Cost_Collector_ID, Integer.valueOf(PP_Cost_Collector_ID)); + } + + /** Get PP_Cost_Collector_ID. + @return PP_Cost_Collector_ID */ + public int getPP_Cost_Collector_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Cost_Collector_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_BOMLine getPP_Order_BOMLine() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_BOMLine.Table_Name); + org.eevolution.model.I_PP_Order_BOMLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_BOMLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_BOMLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_BOMLine_ID. + @param PP_Order_BOMLine_ID PP_Order_BOMLine_ID */ + public void setPP_Order_BOMLine_ID (int PP_Order_BOMLine_ID) + { + if (PP_Order_BOMLine_ID < 1) + set_Value (COLUMNNAME_PP_Order_BOMLine_ID, null); + else + set_Value (COLUMNNAME_PP_Order_BOMLine_ID, Integer.valueOf(PP_Order_BOMLine_ID)); + } + + /** Get PP_Order_BOMLine_ID. + @return PP_Order_BOMLine_ID */ + public int getPP_Order_BOMLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_BOMLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_Value (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Node.Table_Name); + org.eevolution.model.I_PP_Order_Node result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Node_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Node_ID. + @param PP_Order_Node_ID PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID) + { + if (PP_Order_Node_ID < 1) + set_Value (COLUMNNAME_PP_Order_Node_ID, null); + else + set_Value (COLUMNNAME_PP_Order_Node_ID, Integer.valueOf(PP_Order_Node_ID)); + } + + /** Get PP_Order_Node_ID. + @return PP_Order_Node_ID */ + public int getPP_Order_Node_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Workflow.Table_Name); + org.eevolution.model.I_PP_Order_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Workflow_ID. + @param PP_Order_Workflow_ID PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID) + { + if (PP_Order_Workflow_ID < 1) + set_Value (COLUMNNAME_PP_Order_Workflow_ID, null); + else + set_Value (COLUMNNAME_PP_Order_Workflow_ID, Integer.valueOf(PP_Order_Workflow_ID)); + } + + /** Get PP_Order_Workflow_ID. + @return PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Posted. + @param Posted + Posting status + */ + public void setPosted (boolean Posted) + { + set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); + } + + /** Get Posted. + @return Posting status + */ + public boolean isPosted () + { + Object oo = get_Value(COLUMNNAME_Posted); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** 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; + } + + /** Set QtyReject. + @param QtyReject QtyReject */ + public void setQtyReject (BigDecimal QtyReject) + { + set_Value (COLUMNNAME_QtyReject, QtyReject); + } + + /** Get QtyReject. + @return QtyReject */ + public BigDecimal getQtyReject () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReject); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Reversal_ID AD_Reference_ID=53254 */ + public static final int REVERSAL_ID_AD_Reference_ID=53254; + /** Set Reversal ID. + @param Reversal_ID + ID of document reversal + */ + public void setReversal_ID (int Reversal_ID) + { + if (Reversal_ID < 1) + set_Value (COLUMNNAME_Reversal_ID, null); + else + set_Value (COLUMNNAME_Reversal_ID, Integer.valueOf(Reversal_ID)); + } + + /** Get Reversal ID. + @return ID of document reversal + */ + public int getReversal_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Reversal_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_S_Resource getS_Resource() throws Exception + { + Class clazz = MTable.getClass(I_S_Resource.Table_Name); + I_S_Resource result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_S_Resource)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_Resource_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Resource. + @param S_Resource_ID + Resource + */ + public void setS_Resource_ID (int S_Resource_ID) + { + if (S_Resource_ID < 1) + throw new IllegalArgumentException ("S_Resource_ID is mandatory."); + set_Value (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); + } + + /** Get Resource. + @return Resource + */ + public int getS_Resource_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Scrapped Quantity. + @param ScrappedQty + The Quantity scrapped due to QA issues + */ + public void setScrappedQty (BigDecimal ScrappedQty) + { + set_Value (COLUMNNAME_ScrappedQty, ScrappedQty); + } + + /** Get Scrapped Quantity. + @return The Quantity scrapped due to QA issues + */ + public BigDecimal getScrappedQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ScrappedQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set SetupTimeReal. + @param SetupTimeReal SetupTimeReal */ + public void setSetupTimeReal (BigDecimal SetupTimeReal) + { + set_Value (COLUMNNAME_SetupTimeReal, SetupTimeReal); + } + + /** Get SetupTimeReal. + @return SetupTimeReal */ + public BigDecimal getSetupTimeReal () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SetupTimeReal); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** User1_ID AD_Reference_ID=286 */ + public static final int USER1_ID_AD_Reference_ID=286; + /** Set User List 1. + @param User1_ID + User defined list element #1 + */ + public void setUser1_ID (int User1_ID) + { + if (User1_ID < 1) + set_Value (COLUMNNAME_User1_ID, null); + else + set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); + } + + /** Get User List 1. + @return User defined list element #1 + */ + public int getUser1_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** User2_ID AD_Reference_ID=286 */ + public static final int USER2_ID_AD_Reference_ID=286; + /** Set User List 2. + @param User2_ID + User defined list element #2 + */ + public void setUser2_ID (int User2_ID) + { + if (User2_ID < 1) + set_Value (COLUMNNAME_User2_ID, null); + else + set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); + } + + /** Get User List 2. + @return User defined list element #2 + */ + public int getUser2_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_MRP.java b/base/src/org/eevolution/model/X_PP_MRP.java new file mode 100644 index 0000000000..3727f01e54 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_MRP.java @@ -0,0 +1,924 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; + +/** Generated Model for PP_MRP + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_MRP extends PO implements I_PP_MRP, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_MRP (Properties ctx, int PP_MRP_ID, String trxName) + { + super (ctx, PP_MRP_ID, trxName); + /** if (PP_MRP_ID == 0) + { + setDateOrdered (new Timestamp(System.currentTimeMillis())); + setDatePromised (new Timestamp(System.currentTimeMillis())); + setM_Warehouse_ID (0); + setPP_MRP_ID (0); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_PP_MRP (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() + { + StringBuffer sb = new StringBuffer ("X_PP_MRP[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_C_BPartner getC_BPartner() throws Exception + { + Class clazz = MTable.getClass(I_C_BPartner.Table_Name); + I_C_BPartner result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + } + + /** 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 I_C_OrderLine getC_OrderLine() throws Exception + { + Class clazz = MTable.getClass(I_C_OrderLine.Table_Name); + I_C_OrderLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_OrderLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_OrderLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Sales Order Line. + @param C_OrderLine_ID + Sales Order Line + */ + public void setC_OrderLine_ID (int C_OrderLine_ID) + { + if (C_OrderLine_ID < 1) + set_Value (COLUMNNAME_C_OrderLine_ID, null); + else + set_Value (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID)); + } + + /** Get Sales Order Line. + @return Sales Order Line + */ + public int getC_OrderLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Order getC_Order() throws Exception + { + Class clazz = MTable.getClass(I_C_Order.Table_Name); + I_C_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Order. + @param C_Order_ID + Order + */ + public void setC_Order_ID (int C_Order_ID) + { + if (C_Order_ID < 1) + set_Value (COLUMNNAME_C_Order_ID, null); + else + set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID)); + } + + /** 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 DateConfirm. + @param DateConfirm DateConfirm */ + public void setDateConfirm (Timestamp DateConfirm) + { + set_Value (COLUMNNAME_DateConfirm, DateConfirm); + } + + /** Get DateConfirm. + @return DateConfirm */ + public Timestamp getDateConfirm () + { + return (Timestamp)get_Value(COLUMNNAME_DateConfirm); + } + + /** Set DateFinishSchedule. + @param DateFinishSchedule DateFinishSchedule */ + public void setDateFinishSchedule (Timestamp DateFinishSchedule) + { + set_Value (COLUMNNAME_DateFinishSchedule, DateFinishSchedule); + } + + /** Get DateFinishSchedule. + @return DateFinishSchedule */ + public Timestamp getDateFinishSchedule () + { + return (Timestamp)get_Value(COLUMNNAME_DateFinishSchedule); + } + + /** Set Date Ordered. + @param DateOrdered + Date of Order + */ + public void setDateOrdered (Timestamp DateOrdered) + { + if (DateOrdered == null) + throw new IllegalArgumentException ("DateOrdered is mandatory."); + set_Value (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) + { + if (DatePromised == null) + throw new IllegalArgumentException ("DatePromised is mandatory."); + set_Value (COLUMNNAME_DatePromised, DatePromised); + } + + /** Get Date Promised. + @return Date Order was promised + */ + public Timestamp getDatePromised () + { + return (Timestamp)get_Value(COLUMNNAME_DatePromised); + } + + /** Set DateSimulation. + @param DateSimulation DateSimulation */ + public void setDateSimulation (Timestamp DateSimulation) + { + set_Value (COLUMNNAME_DateSimulation, DateSimulation); + } + + /** Get DateSimulation. + @return DateSimulation */ + public Timestamp getDateSimulation () + { + return (Timestamp)get_Value(COLUMNNAME_DateSimulation); + } + + /** Set DateStart. + @param DateStart DateStart */ + public void setDateStart (Timestamp DateStart) + { + set_Value (COLUMNNAME_DateStart, DateStart); + } + + /** Get DateStart. + @return DateStart */ + public Timestamp getDateStart () + { + return (Timestamp)get_Value(COLUMNNAME_DateStart); + } + + /** Set DateStartSchedule. + @param DateStartSchedule DateStartSchedule */ + public void setDateStartSchedule (Timestamp DateStartSchedule) + { + set_Value (COLUMNNAME_DateStartSchedule, DateStartSchedule); + } + + /** Get DateStartSchedule. + @return DateStartSchedule */ + public Timestamp getDateStartSchedule () + { + return (Timestamp)get_Value(COLUMNNAME_DateStartSchedule); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 1020) + { + log.warning("Length > 1020 - truncated"); + Description = Description.substring(0, 1020); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Document Status. + @param DocStatus + The current status of the document + */ + public void setDocStatus (String DocStatus) + { + + if (DocStatus != null && DocStatus.length() > 2) + { + log.warning("Length > 2 - truncated"); + DocStatus = DocStatus.substring(0, 2); + } + set_Value (COLUMNNAME_DocStatus, DocStatus); + } + + /** Get Document Status. + @return The current status of the document + */ + public String getDocStatus () + { + return (String)get_Value(COLUMNNAME_DocStatus); + } + + /** Set Available. + @param IsAvailable + Resource is available + */ + public void setIsAvailable (boolean IsAvailable) + { + set_Value (COLUMNNAME_IsAvailable, Boolean.valueOf(IsAvailable)); + } + + /** Get Available. + @return Resource is available + */ + public boolean isAvailable () + { + Object oo = get_Value(COLUMNNAME_IsAvailable); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + public I_M_ForecastLine getM_ForecastLine() throws Exception + { + Class clazz = MTable.getClass(I_M_ForecastLine.Table_Name); + I_M_ForecastLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_ForecastLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_ForecastLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Forecast Line. + @param M_ForecastLine_ID + Forecast Line + */ + public void setM_ForecastLine_ID (int M_ForecastLine_ID) + { + if (M_ForecastLine_ID < 1) + set_Value (COLUMNNAME_M_ForecastLine_ID, null); + else + set_Value (COLUMNNAME_M_ForecastLine_ID, Integer.valueOf(M_ForecastLine_ID)); + } + + /** Get Forecast Line. + @return Forecast Line + */ + public int getM_ForecastLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_ForecastLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Forecast getM_Forecast() throws Exception + { + Class clazz = MTable.getClass(I_M_Forecast.Table_Name); + I_M_Forecast result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Forecast)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Forecast_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Forecast. + @param M_Forecast_ID + Material Forecast + */ + public void setM_Forecast_ID (int M_Forecast_ID) + { + if (M_Forecast_ID < 1) + set_Value (COLUMNNAME_M_Forecast_ID, null); + else + set_Value (COLUMNNAME_M_Forecast_ID, Integer.valueOf(M_Forecast_ID)); + } + + /** Get Forecast. + @return Material Forecast + */ + public int getM_Forecast_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Forecast_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + set_Value (COLUMNNAME_M_Product_ID, null); + else + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_RequisitionLine getM_RequisitionLine() throws Exception + { + Class clazz = MTable.getClass(I_M_RequisitionLine.Table_Name); + I_M_RequisitionLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_RequisitionLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_RequisitionLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Requisition Line. + @param M_RequisitionLine_ID + Material Requisition Line + */ + public void setM_RequisitionLine_ID (int M_RequisitionLine_ID) + { + if (M_RequisitionLine_ID < 1) + set_Value (COLUMNNAME_M_RequisitionLine_ID, null); + else + set_Value (COLUMNNAME_M_RequisitionLine_ID, Integer.valueOf(M_RequisitionLine_ID)); + } + + /** Get Requisition Line. + @return Material Requisition Line + */ + public int getM_RequisitionLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_RequisitionLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Requisition getM_Requisition() throws Exception + { + Class clazz = MTable.getClass(I_M_Requisition.Table_Name); + I_M_Requisition result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Requisition)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Requisition_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Requisition. + @param M_Requisition_ID + Material Requisition + */ + public void setM_Requisition_ID (int M_Requisition_ID) + { + if (M_Requisition_ID < 1) + set_Value (COLUMNNAME_M_Requisition_ID, null); + else + set_Value (COLUMNNAME_M_Requisition_ID, Integer.valueOf(M_Requisition_ID)); + } + + /** Get Requisition. + @return Material Requisition + */ + public int getM_Requisition_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Requisition_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Warehouse getM_Warehouse() throws Exception + { + Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); + I_M_Warehouse result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Warehouse. + @param M_Warehouse_ID + Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + if (M_Warehouse_ID < 1) + throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); + set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); + } + + /** 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 Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + + if (Name != null && Name.length() > 120) + { + log.warning("Length > 120 - truncated"); + Name = Name.substring(0, 120); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set PP_MRP_ID. + @param PP_MRP_ID PP_MRP_ID */ + public void setPP_MRP_ID (int PP_MRP_ID) + { + if (PP_MRP_ID < 1) + throw new IllegalArgumentException ("PP_MRP_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_MRP_ID, Integer.valueOf(PP_MRP_ID)); + } + + /** Get PP_MRP_ID. + @return PP_MRP_ID */ + public int getPP_MRP_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_MRP_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_BOMLine getPP_Order_BOMLine() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_BOMLine.Table_Name); + org.eevolution.model.I_PP_Order_BOMLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_BOMLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_BOMLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_BOMLine_ID. + @param PP_Order_BOMLine_ID PP_Order_BOMLine_ID */ + public void setPP_Order_BOMLine_ID (int PP_Order_BOMLine_ID) + { + if (PP_Order_BOMLine_ID < 1) + set_Value (COLUMNNAME_PP_Order_BOMLine_ID, null); + else + set_Value (COLUMNNAME_PP_Order_BOMLine_ID, Integer.valueOf(PP_Order_BOMLine_ID)); + } + + /** Get PP_Order_BOMLine_ID. + @return PP_Order_BOMLine_ID */ + public int getPP_Order_BOMLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_BOMLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + set_Value (COLUMNNAME_PP_Order_ID, null); + else + set_Value (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Planner_ID AD_Reference_ID=286 */ + public static final int PLANNER_ID_AD_Reference_ID=286; + /** Set Planner. + @param Planner_ID Planner */ + public void setPlanner_ID (int Planner_ID) + { + if (Planner_ID < 1) + set_Value (COLUMNNAME_Planner_ID, null); + else + set_Value (COLUMNNAME_Planner_ID, Integer.valueOf(Planner_ID)); + } + + /** Get Planner. + @return Planner */ + public int getPlanner_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Planner_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Priority. + @param Priority + Indicates if this request is of a high, medium or low priority. + */ + public void setPriority (String Priority) + { + + if (Priority != null && Priority.length() > 10) + { + log.warning("Length > 10 - truncated"); + Priority = Priority.substring(0, 10); + } + set_Value (COLUMNNAME_Priority, Priority); + } + + /** Get Priority. + @return Indicates if this request is of a high, medium or low priority. + */ + public String getPriority () + { + return (String)get_Value(COLUMNNAME_Priority); + } + + /** Set Quantity. + @param Qty + Quantity + */ + public void setQty (BigDecimal Qty) + { + set_Value (COLUMNNAME_Qty, Qty); + } + + /** Get Quantity. + @return Quantity + */ + public BigDecimal getQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); + if (bd == null) + return Env.ZERO; + return bd; + } + + public I_S_Resource getS_Resource() throws Exception + { + Class clazz = MTable.getClass(I_S_Resource.Table_Name); + I_S_Resource result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_S_Resource)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_Resource_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Resource. + @param S_Resource_ID + Resource + */ + public void setS_Resource_ID (int S_Resource_ID) + { + if (S_Resource_ID < 1) + set_Value (COLUMNNAME_S_Resource_ID, null); + else + set_Value (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); + } + + /** Get Resource. + @return Resource + */ + public int getS_Resource_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Type. + @param Type + Type of Validation (SQL, Java Script, Java Language) + */ + public void setType (String Type) + { + + if (Type != null && Type.length() > 1) + { + log.warning("Length > 1 - truncated"); + Type = Type.substring(0, 1); + } + set_Value (COLUMNNAME_Type, Type); + } + + /** Get Type. + @return Type of Validation (SQL, Java Script, Java Language) + */ + public String getType () + { + return (String)get_Value(COLUMNNAME_Type); + } + + /** Set TypeMRP. + @param TypeMRP TypeMRP */ + public void setTypeMRP (String TypeMRP) + { + + if (TypeMRP != null && TypeMRP.length() > 3) + { + log.warning("Length > 3 - truncated"); + TypeMRP = TypeMRP.substring(0, 3); + } + set_Value (COLUMNNAME_TypeMRP, TypeMRP); + } + + /** Get TypeMRP. + @return TypeMRP */ + public String getTypeMRP () + { + return (String)get_Value(COLUMNNAME_TypeMRP); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 80) + { + log.warning("Length > 80 - truncated"); + Value = Value.substring(0, 80); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + /** Set Version. + @param Version + Version of the table definition + */ + public void setVersion (BigDecimal Version) + { + set_Value (COLUMNNAME_Version, Version); + } + + /** Get Version. + @return Version of the table definition + */ + public BigDecimal getVersion () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Version); + if (bd == null) + return Env.ZERO; + return bd; + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Order.java b/base/src/org/eevolution/model/X_PP_Order.java new file mode 100644 index 0000000000..ebef35839b --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Order.java @@ -0,0 +1,1564 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; + +/** Generated Model for PP_Order + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order extends PO implements I_PP_Order, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Order (Properties ctx, int PP_Order_ID, String trxName) + { + super (ctx, PP_Order_ID, trxName); + /** if (PP_Order_ID == 0) + { + setAD_Workflow_ID (0); + setC_DocTypeTarget_ID (0); +// 0 + setC_UOM_ID (0); +// @UOMConversion@=Y | @Processed@='Y' + setDateOrdered (new Timestamp(System.currentTimeMillis())); +// @#Date@ + setDatePromised (new Timestamp(System.currentTimeMillis())); + setDateStartSchedule (new Timestamp(System.currentTimeMillis())); +// @#Date@ + setDocAction (null); +// -- + setDocStatus (null); +// DR + setDocumentNo (null); + setIsApproved (false); +// N + setIsPrinted (false); +// N + setIsSOTrx (false); +// N + setIsSelected (false); +// N + setLine (0); + setM_Product_ID (0); + setM_Warehouse_ID (0); + setPP_Order_ID (0); + setPP_Product_BOM_ID (0); + setPriorityRule (null); + setProcessed (false); +// N + setQtyDelivered (Env.ZERO); +// 0 + setQtyOrdered (Env.ZERO); +// 1 + setQtyReject (Env.ZERO); +// 0 + setQtyScrap (Env.ZERO); +// 0 + setS_Resource_ID (0); + setYield (Env.ZERO); +// 100 + } */ + } + + /** Load Constructor */ + public X_PP_Order (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 1 - 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() + { + StringBuffer sb = new StringBuffer ("X_PP_Order[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** AD_OrgTrx_ID AD_Reference_ID=130 */ + public static final int AD_ORGTRX_ID_AD_Reference_ID=130; + /** Set Trx Organization. + @param AD_OrgTrx_ID + Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) + { + if (AD_OrgTrx_ID < 1) + set_Value (COLUMNNAME_AD_OrgTrx_ID, null); + else + set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); + } + + /** Get Trx Organization. + @return Performing or initiating organization + */ + public int getAD_OrgTrx_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_AD_Workflow getAD_Workflow() throws Exception + { + Class clazz = MTable.getClass(I_AD_Workflow.Table_Name); + I_AD_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Workflow. + @param AD_Workflow_ID + Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID) + { + if (AD_Workflow_ID < 1) + throw new IllegalArgumentException ("AD_Workflow_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); + } + + /** Get Workflow. + @return Workflow or combination of tasks + */ + public int getAD_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Quantity Assay. + @param Assay + Indicated the Quantity Assay to use into Quality Order + */ + public void setAssay (BigDecimal Assay) + { + set_Value (COLUMNNAME_Assay, Assay); + } + + /** Get Quantity Assay. + @return Indicated the Quantity Assay to use into Quality Order + */ + public BigDecimal getAssay () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Assay); + if (bd == null) + return Env.ZERO; + return bd; + } + + public I_C_Activity getC_Activity() throws Exception + { + Class clazz = MTable.getClass(I_C_Activity.Table_Name); + I_C_Activity result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Activity. + @param C_Activity_ID + Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID) + { + if (C_Activity_ID < 1) + set_Value (COLUMNNAME_C_Activity_ID, null); + else + set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); + } + + /** Get Activity. + @return Business Activity + */ + public int getC_Activity_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Campaign getC_Campaign() throws Exception + { + Class clazz = MTable.getClass(I_C_Campaign.Table_Name); + I_C_Campaign result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Campaign. + @param C_Campaign_ID + Marketing Campaign + */ + public void setC_Campaign_ID (int C_Campaign_ID) + { + if (C_Campaign_ID < 1) + set_Value (COLUMNNAME_C_Campaign_ID, null); + else + set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); + } + + /** Get Campaign. + @return Marketing Campaign + */ + public int getC_Campaign_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** C_DocTypeTarget_ID AD_Reference_ID=53233 */ + public static final int C_DOCTYPETARGET_ID_AD_Reference_ID=53233; + /** Set Target Document Type. + @param C_DocTypeTarget_ID + Target document type for conversing documents + */ + public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID) + { + if (C_DocTypeTarget_ID < 1) + throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID)); + } + + /** 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(); + } + + /** C_DocType_ID AD_Reference_ID=53233 */ + public static final int C_DOCTYPE_ID_AD_Reference_ID=53233; + /** Set Document Type. + @param C_DocType_ID + Document type or rules + */ + public void setC_DocType_ID (int C_DocType_ID) + { + if (C_DocType_ID < 1) + set_Value (COLUMNNAME_C_DocType_ID, null); + else + set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); + } + + /** Get Document Type. + @return Document type or rules + */ + public int getC_DocType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_OrderLine getC_OrderLine() throws Exception + { + Class clazz = MTable.getClass(I_C_OrderLine.Table_Name); + I_C_OrderLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_OrderLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_OrderLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Sales Order Line. + @param C_OrderLine_ID + Sales Order Line + */ + public void setC_OrderLine_ID (int C_OrderLine_ID) + { + if (C_OrderLine_ID < 1) + set_Value (COLUMNNAME_C_OrderLine_ID, null); + else + set_Value (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID)); + } + + /** Get Sales Order Line. + @return Sales Order Line + */ + public int getC_OrderLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Project getC_Project() throws Exception + { + Class clazz = MTable.getClass(I_C_Project.Table_Name); + I_C_Project result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Project. + @param C_Project_ID + Financial Project + */ + public void setC_Project_ID (int C_Project_ID) + { + if (C_Project_ID < 1) + set_Value (COLUMNNAME_C_Project_ID, null); + else + set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); + } + + /** Get Project. + @return Financial Project + */ + public int getC_Project_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_UOM getC_UOM() throws Exception + { + Class clazz = MTable.getClass(I_C_UOM.Table_Name); + I_C_UOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set UOM. + @param C_UOM_ID + Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID) + { + if (C_UOM_ID < 1) + throw new IllegalArgumentException ("C_UOM_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); + } + + /** Get UOM. + @return Unit of Measure + */ + public int getC_UOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Copy From. + @param CopyFrom + Copy From Record + */ + public void setCopyFrom (String CopyFrom) + { + + if (CopyFrom != null && CopyFrom.length() > 1) + { + log.warning("Length > 1 - truncated"); + CopyFrom = CopyFrom.substring(0, 1); + } + set_Value (COLUMNNAME_CopyFrom, CopyFrom); + } + + /** Get Copy From. + @return Copy From Record + */ + public String getCopyFrom () + { + return (String)get_Value(COLUMNNAME_CopyFrom); + } + + /** Set DateConfirm. + @param DateConfirm DateConfirm */ + public void setDateConfirm (Timestamp DateConfirm) + { + set_ValueNoCheck (COLUMNNAME_DateConfirm, DateConfirm); + } + + /** Get DateConfirm. + @return DateConfirm */ + public Timestamp getDateConfirm () + { + return (Timestamp)get_Value(COLUMNNAME_DateConfirm); + } + + /** Set Date Delivered. + @param DateDelivered + Date when the product was delivered + */ + public void setDateDelivered (Timestamp DateDelivered) + { + set_ValueNoCheck (COLUMNNAME_DateDelivered, DateDelivered); + } + + /** Get Date Delivered. + @return Date when the product was delivered + */ + public Timestamp getDateDelivered () + { + return (Timestamp)get_Value(COLUMNNAME_DateDelivered); + } + + /** Set Finish Date. + @param DateFinish + Finish or (planned) completion date + */ + public void setDateFinish (Timestamp DateFinish) + { + set_ValueNoCheck (COLUMNNAME_DateFinish, DateFinish); + } + + /** Get Finish Date. + @return Finish or (planned) completion date + */ + public Timestamp getDateFinish () + { + return (Timestamp)get_Value(COLUMNNAME_DateFinish); + } + + /** Set DateFinishSchedule. + @param DateFinishSchedule DateFinishSchedule */ + public void setDateFinishSchedule (Timestamp DateFinishSchedule) + { + set_Value (COLUMNNAME_DateFinishSchedule, DateFinishSchedule); + } + + /** Get DateFinishSchedule. + @return DateFinishSchedule */ + public Timestamp getDateFinishSchedule () + { + return (Timestamp)get_Value(COLUMNNAME_DateFinishSchedule); + } + + /** Set Date Ordered. + @param DateOrdered + Date of Order + */ + public void setDateOrdered (Timestamp DateOrdered) + { + if (DateOrdered == null) + throw new IllegalArgumentException ("DateOrdered is mandatory."); + set_Value (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) + { + if (DatePromised == null) + throw new IllegalArgumentException ("DatePromised is mandatory."); + set_Value (COLUMNNAME_DatePromised, DatePromised); + } + + /** Get Date Promised. + @return Date Order was promised + */ + public Timestamp getDatePromised () + { + return (Timestamp)get_Value(COLUMNNAME_DatePromised); + } + + /** Set DateStart. + @param DateStart DateStart */ + public void setDateStart (Timestamp DateStart) + { + set_ValueNoCheck (COLUMNNAME_DateStart, DateStart); + } + + /** Get DateStart. + @return DateStart */ + public Timestamp getDateStart () + { + return (Timestamp)get_Value(COLUMNNAME_DateStart); + } + + /** Set DateStartSchedule. + @param DateStartSchedule DateStartSchedule */ + public void setDateStartSchedule (Timestamp DateStartSchedule) + { + if (DateStartSchedule == null) + throw new IllegalArgumentException ("DateStartSchedule is mandatory."); + set_Value (COLUMNNAME_DateStartSchedule, DateStartSchedule); + } + + /** Get DateStartSchedule. + @return DateStartSchedule */ + public Timestamp getDateStartSchedule () + { + return (Timestamp)get_Value(COLUMNNAME_DateStartSchedule); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 510) + { + log.warning("Length > 510 - truncated"); + Description = Description.substring(0, 510); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** DocAction AD_Reference_ID=135 */ + public static final int DOCACTION_AD_Reference_ID=135; + /** Complete = CO */ + public static final String DOCACTION_Complete = "CO"; + /** Approve = AP */ + public static final String DOCACTION_Approve = "AP"; + /** Reject = RJ */ + public static final String DOCACTION_Reject = "RJ"; + /** Post = PO */ + public static final String DOCACTION_Post = "PO"; + /** Void = VO */ + public static final String DOCACTION_Void = "VO"; + /** Close = CL */ + public static final String DOCACTION_Close = "CL"; + /** Reverse - Correct = RC */ + public static final String DOCACTION_Reverse_Correct = "RC"; + /** Reverse - Accrual = RA */ + public static final String DOCACTION_Reverse_Accrual = "RA"; + /** Invalidate = IN */ + public static final String DOCACTION_Invalidate = "IN"; + /** Re-activate = RE */ + public static final String DOCACTION_Re_Activate = "RE"; + /** = -- */ + public static final String DOCACTION_None = "--"; + /** Prepare = PR */ + public static final String DOCACTION_Prepare = "PR"; + /** Unlock = XL */ + public static final String DOCACTION_Unlock = "XL"; + /** Wait Complete = WC */ + public static final String DOCACTION_WaitComplete = "WC"; + /** Set Document Action. + @param DocAction + The targeted status of the document + */ + public void setDocAction (String DocAction) + { + if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory"); + 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("IN") || DocAction.equals("RE") || DocAction.equals("--") || DocAction.equals("PR") || DocAction.equals("XL") || DocAction.equals("WC")); else throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - CO - AP - RJ - PO - VO - CL - RC - RA - IN - RE - -- - PR - XL - WC"); + if (DocAction.length() > 2) + { + log.warning("Length > 2 - truncated"); + DocAction = DocAction.substring(0, 2); + } + set_Value (COLUMNNAME_DocAction, DocAction); + } + + /** Get Document Action. + @return The targeted status of the document + */ + public String getDocAction () + { + return (String)get_Value(COLUMNNAME_DocAction); + } + + /** DocStatus AD_Reference_ID=131 */ + public static final int DOCSTATUS_AD_Reference_ID=131; + /** Drafted = DR */ + public static final String DOCSTATUS_Drafted = "DR"; + /** Completed = CO */ + public static final String DOCSTATUS_Completed = "CO"; + /** Approved = AP */ + public static final String DOCSTATUS_Approved = "AP"; + /** Not Approved = NA */ + public static final String DOCSTATUS_NotApproved = "NA"; + /** Voided = VO */ + public static final String DOCSTATUS_Voided = "VO"; + /** Invalid = IN */ + public static final String DOCSTATUS_Invalid = "IN"; + /** Reversed = RE */ + public static final String DOCSTATUS_Reversed = "RE"; + /** Closed = CL */ + public static final String DOCSTATUS_Closed = "CL"; + /** Unknown = ?? */ + public static final String DOCSTATUS_Unknown = "??"; + /** In Progress = IP */ + public static final String DOCSTATUS_InProgress = "IP"; + /** Waiting Payment = WP */ + public static final String DOCSTATUS_WaitingPayment = "WP"; + /** Waiting Confirmation = WC */ + public static final String DOCSTATUS_WaitingConfirmation = "WC"; + /** Set Document Status. + @param DocStatus + The current status of the document + */ + public void setDocStatus (String DocStatus) + { + if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory"); + if (DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); + if (DocStatus.length() > 2) + { + log.warning("Length > 2 - truncated"); + DocStatus = DocStatus.substring(0, 2); + } + set_Value (COLUMNNAME_DocStatus, DocStatus); + } + + /** Get Document Status. + @return The current status of the document + */ + public String getDocStatus () + { + return (String)get_Value(COLUMNNAME_DocStatus); + } + + /** Set Document No. + @param DocumentNo + Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo) + { + if (DocumentNo == null) + throw new IllegalArgumentException ("DocumentNo is mandatory."); + + if (DocumentNo.length() > 60) + { + log.warning("Length > 60 - truncated"); + DocumentNo = DocumentNo.substring(0, 60); + } + set_Value (COLUMNNAME_DocumentNo, DocumentNo); + } + + /** Get Document No. + @return Document sequence number of the document + */ + public String getDocumentNo () + { + return (String)get_Value(COLUMNNAME_DocumentNo); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getDocumentNo()); + } + + /** Set FloatAfter. + @param FloatAfter FloatAfter */ + public void setFloatAfter (BigDecimal FloatAfter) + { + set_Value (COLUMNNAME_FloatAfter, FloatAfter); + } + + /** Get FloatAfter. + @return FloatAfter */ + public BigDecimal getFloatAfter () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FloatAfter); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set FloatBefored. + @param FloatBefored FloatBefored */ + public void setFloatBefored (BigDecimal FloatBefored) + { + set_Value (COLUMNNAME_FloatBefored, FloatBefored); + } + + /** Get FloatBefored. + @return FloatBefored */ + public BigDecimal getFloatBefored () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FloatBefored); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Approved. + @param IsApproved + Indicates if this document requires approval + */ + public void setIsApproved (boolean IsApproved) + { + set_Value (COLUMNNAME_IsApproved, Boolean.valueOf(IsApproved)); + } + + /** Get Approved. + @return Indicates if this document requires approval + */ + public boolean isApproved () + { + Object oo = get_Value(COLUMNNAME_IsApproved); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Printed. + @param IsPrinted + Indicates if this document / line is printed + */ + public void setIsPrinted (boolean IsPrinted) + { + set_Value (COLUMNNAME_IsPrinted, Boolean.valueOf(IsPrinted)); + } + + /** Get Printed. + @return Indicates if this document / line is printed + */ + public boolean isPrinted () + { + Object oo = get_Value(COLUMNNAME_IsPrinted); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Is Qty Percentage. + @param IsQtyPercentage + Indicate that this component is based in % Quantity + */ + public void setIsQtyPercentage (boolean IsQtyPercentage) + { + set_Value (COLUMNNAME_IsQtyPercentage, Boolean.valueOf(IsQtyPercentage)); + } + + /** Get Is Qty Percentage. + @return Indicate that this component is based in % Quantity + */ + public boolean isQtyPercentage () + { + Object oo = get_Value(COLUMNNAME_IsQtyPercentage); + 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_Value (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 Selected. + @param IsSelected Selected */ + public void setIsSelected (boolean IsSelected) + { + set_Value (COLUMNNAME_IsSelected, Boolean.valueOf(IsSelected)); + } + + /** Get Selected. + @return Selected */ + public boolean isSelected () + { + Object oo = get_Value(COLUMNNAME_IsSelected); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Line No. + @param Line + Unique line for this document + */ + public void setLine (int Line) + { + set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); + } + + /** Get Line No. + @return Unique line for this document + */ + public int getLine () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Line); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Lot No. + @param Lot + Lot number (alphanumeric) + */ + public void setLot (String Lot) + { + + if (Lot != null && Lot.length() > 20) + { + log.warning("Length > 20 - truncated"); + Lot = Lot.substring(0, 20); + } + set_Value (COLUMNNAME_Lot, Lot); + } + + /** Get Lot No. + @return Lot number (alphanumeric) + */ + public String getLot () + { + return (String)get_Value(COLUMNNAME_Lot); + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Warehouse getM_Warehouse() throws Exception + { + Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); + I_M_Warehouse result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Warehouse. + @param M_Warehouse_ID + Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + if (M_Warehouse_ID < 1) + throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); + } + + /** 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 OrderType. + @param OrderType OrderType */ + public void setOrderType (String OrderType) + { + + if (OrderType != null && OrderType.length() > 1) + { + log.warning("Length > 1 - truncated"); + OrderType = OrderType.substring(0, 1); + } + set_Value (COLUMNNAME_OrderType, OrderType); + } + + /** Get OrderType. + @return OrderType */ + public String getOrderType () + { + return (String)get_Value(COLUMNNAME_OrderType); + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOM.Table_Name); + org.eevolution.model.I_PP_Product_BOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Product_BOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Product_BOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set BOM & Formula. + @param PP_Product_BOM_ID + BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) + { + if (PP_Product_BOM_ID < 1) + throw new IllegalArgumentException ("PP_Product_BOM_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID)); + } + + /** Get BOM & Formula. + @return BOM & Formula + */ + public int getPP_Product_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Planner_ID AD_Reference_ID=286 */ + public static final int PLANNER_ID_AD_Reference_ID=286; + /** Set Planner. + @param Planner_ID Planner */ + public void setPlanner_ID (int Planner_ID) + { + if (Planner_ID < 1) + set_Value (COLUMNNAME_Planner_ID, null); + else + set_Value (COLUMNNAME_Planner_ID, Integer.valueOf(Planner_ID)); + } + + /** Get Planner. + @return Planner */ + public int getPlanner_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Planner_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Posted. + @param Posted + Posting status + */ + public void setPosted (boolean Posted) + { + set_Value (COLUMNNAME_Posted, Boolean.valueOf(Posted)); + } + + /** Get Posted. + @return Posting status + */ + public boolean isPosted () + { + Object oo = get_Value(COLUMNNAME_Posted); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** PriorityRule AD_Reference_ID=154 */ + public static final int PRIORITYRULE_AD_Reference_ID=154; + /** High = 3 */ + public static final String PRIORITYRULE_High = "3"; + /** Medium = 5 */ + public static final String PRIORITYRULE_Medium = "5"; + /** Low = 7 */ + public static final String PRIORITYRULE_Low = "7"; + /** Urgent = 1 */ + public static final String PRIORITYRULE_Urgent = "1"; + /** Minor = 9 */ + public static final String PRIORITYRULE_Minor = "9"; + /** Set Priority. + @param PriorityRule + Priority of a document + */ + public void setPriorityRule (String PriorityRule) + { + if (PriorityRule == null) throw new IllegalArgumentException ("PriorityRule is mandatory"); + if (PriorityRule.equals("3") || PriorityRule.equals("5") || PriorityRule.equals("7") || PriorityRule.equals("1") || PriorityRule.equals("9")); else throw new IllegalArgumentException ("PriorityRule Invalid value - " + PriorityRule + " - Reference_ID=154 - 3 - 5 - 7 - 1 - 9"); + if (PriorityRule.length() > 1) + { + log.warning("Length > 1 - truncated"); + PriorityRule = PriorityRule.substring(0, 1); + } + set_Value (COLUMNNAME_PriorityRule, PriorityRule); + } + + /** Get Priority. + @return Priority of a document + */ + public String getPriorityRule () + { + return (String)get_Value(COLUMNNAME_PriorityRule); + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** 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; + } + + /** Set QtyBatchSize. + @param QtyBatchSize QtyBatchSize */ + public void setQtyBatchSize (BigDecimal QtyBatchSize) + { + set_ValueNoCheck (COLUMNNAME_QtyBatchSize, QtyBatchSize); + } + + /** Get QtyBatchSize. + @return QtyBatchSize */ + public BigDecimal getQtyBatchSize () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBatchSize); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyBatchs. + @param QtyBatchs QtyBatchs */ + public void setQtyBatchs (BigDecimal QtyBatchs) + { + set_ValueNoCheck (COLUMNNAME_QtyBatchs, QtyBatchs); + } + + /** Get QtyBatchs. + @return QtyBatchs */ + public BigDecimal getQtyBatchs () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBatchs); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Delivered Quantity. + @param QtyDelivered + Delivered Quantity + */ + public void setQtyDelivered (BigDecimal QtyDelivered) + { + if (QtyDelivered == null) + throw new IllegalArgumentException ("QtyDelivered is mandatory."); + set_Value (COLUMNNAME_QtyDelivered, QtyDelivered); + } + + /** Get Delivered Quantity. + @return Delivered Quantity + */ + public BigDecimal getQtyDelivered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyDelivered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Quantity. + @param QtyEntered + The Quantity Entered is based on the selected UoM + */ + public void setQtyEntered (BigDecimal QtyEntered) + { + set_Value (COLUMNNAME_QtyEntered, QtyEntered); + } + + /** Get Quantity. + @return The Quantity Entered is based on the selected UoM + */ + public BigDecimal getQtyEntered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyEntered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Ordered Quantity. + @param QtyOrdered + Ordered Quantity + */ + public void setQtyOrdered (BigDecimal QtyOrdered) + { + if (QtyOrdered == null) + throw new IllegalArgumentException ("QtyOrdered is mandatory."); + set_ValueNoCheck (COLUMNNAME_QtyOrdered, QtyOrdered); + } + + /** Get Ordered Quantity. + @return Ordered Quantity + */ + public BigDecimal getQtyOrdered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyReject. + @param QtyReject QtyReject */ + public void setQtyReject (BigDecimal QtyReject) + { + if (QtyReject == null) + throw new IllegalArgumentException ("QtyReject is mandatory."); + set_Value (COLUMNNAME_QtyReject, QtyReject); + } + + /** Get QtyReject. + @return QtyReject */ + public BigDecimal getQtyReject () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReject); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Reserved Quantity. + @param QtyReserved + Reserved Quantity + */ + public void setQtyReserved (BigDecimal QtyReserved) + { + set_Value (COLUMNNAME_QtyReserved, QtyReserved); + } + + /** Get Reserved Quantity. + @return Reserved Quantity + */ + public BigDecimal getQtyReserved () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyScrap. + @param QtyScrap QtyScrap */ + public void setQtyScrap (BigDecimal QtyScrap) + { + if (QtyScrap == null) + throw new IllegalArgumentException ("QtyScrap is mandatory."); + set_Value (COLUMNNAME_QtyScrap, QtyScrap); + } + + /** Get QtyScrap. + @return QtyScrap */ + public BigDecimal getQtyScrap () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyScrap); + if (bd == null) + return Env.ZERO; + return bd; + } + + public I_S_Resource getS_Resource() throws Exception + { + Class clazz = MTable.getClass(I_S_Resource.Table_Name); + I_S_Resource result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_S_Resource)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_Resource_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Resource. + @param S_Resource_ID + Resource + */ + public void setS_Resource_ID (int S_Resource_ID) + { + if (S_Resource_ID < 1) + throw new IllegalArgumentException ("S_Resource_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); + } + + /** Get Resource. + @return Resource + */ + public int getS_Resource_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Schedule Type. + @param ScheduleType + Type of schedule + */ + public void setScheduleType (String ScheduleType) + { + + if (ScheduleType != null && ScheduleType.length() > 1) + { + log.warning("Length > 1 - truncated"); + ScheduleType = ScheduleType.substring(0, 1); + } + set_Value (COLUMNNAME_ScheduleType, ScheduleType); + } + + /** Get Schedule Type. + @return Type of schedule + */ + public String getScheduleType () + { + return (String)get_Value(COLUMNNAME_ScheduleType); + } + + /** Set Serial No. + @param SerNo + Product Serial Number + */ + public void setSerNo (String SerNo) + { + + if (SerNo != null && SerNo.length() > 20) + { + log.warning("Length > 20 - truncated"); + SerNo = SerNo.substring(0, 20); + } + set_Value (COLUMNNAME_SerNo, SerNo); + } + + /** Get Serial No. + @return Product Serial Number + */ + public String getSerNo () + { + return (String)get_Value(COLUMNNAME_SerNo); + } + + /** User1_ID AD_Reference_ID=134 */ + public static final int USER1_ID_AD_Reference_ID=134; + /** Set User List 1. + @param User1_ID + User defined list element #1 + */ + public void setUser1_ID (int User1_ID) + { + if (User1_ID < 1) + set_Value (COLUMNNAME_User1_ID, null); + else + set_Value (COLUMNNAME_User1_ID, Integer.valueOf(User1_ID)); + } + + /** Get User List 1. + @return User defined list element #1 + */ + public int getUser1_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** User2_ID AD_Reference_ID=137 */ + public static final int USER2_ID_AD_Reference_ID=137; + /** Set User List 2. + @param User2_ID + User defined list element #2 + */ + public void setUser2_ID (int User2_ID) + { + if (User2_ID < 1) + set_Value (COLUMNNAME_User2_ID, null); + else + set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); + } + + /** Get User List 2. + @return User defined list element #2 + */ + public int getUser2_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Yield. + @param Yield Yield */ + public void setYield (BigDecimal Yield) + { + if (Yield == null) + throw new IllegalArgumentException ("Yield is mandatory."); + set_Value (COLUMNNAME_Yield, Yield); + } + + /** Get Yield. + @return Yield */ + public BigDecimal getYield () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Yield); + if (bd == null) + return Env.ZERO; + return bd; + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Order_BOM.java b/base/src/org/eevolution/model/X_PP_Order_BOM.java new file mode 100644 index 0000000000..2063ae6b8c --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Order_BOM.java @@ -0,0 +1,579 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for PP_Order_BOM + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_BOM extends PO implements I_PP_Order_BOM, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Order_BOM (Properties ctx, int PP_Order_BOM_ID, String trxName) + { + super (ctx, PP_Order_BOM_ID, trxName); + /** if (PP_Order_BOM_ID == 0) + { + setC_UOM_ID (0); + setM_Product_ID (0); + setName (null); + setPP_Order_BOM_ID (0); + setPP_Order_ID (0); + setValidFrom (new Timestamp(System.currentTimeMillis())); + setValue (null); + } */ + } + + /** Load Constructor */ + public X_PP_Order_BOM (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Order_BOM[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** BOMType AD_Reference_ID=347 */ + public static final int BOMTYPE_AD_Reference_ID=347; + /** Current Active = A */ + public static final String BOMTYPE_CurrentActive = "A"; + /** Make-To-Order = O */ + public static final String BOMTYPE_Make_To_Order = "O"; + /** Previous = P */ + public static final String BOMTYPE_Previous = "P"; + /** Previous, Spare = S */ + public static final String BOMTYPE_PreviousSpare = "S"; + /** Future = F */ + public static final String BOMTYPE_Future = "F"; + /** Maintenance = M */ + public static final String BOMTYPE_Maintenance = "M"; + /** Repair = R */ + public static final String BOMTYPE_Repair = "R"; + /** Product Configure = C */ + public static final String BOMTYPE_ProductConfigure = "C"; + /** Set BOM Type. + @param BOMType + Type of BOM + */ + public void setBOMType (String BOMType) + { + + if (BOMType == null || BOMType.equals("A") || BOMType.equals("O") || BOMType.equals("P") || BOMType.equals("S") || BOMType.equals("F") || BOMType.equals("M") || BOMType.equals("R") || BOMType.equals("C")); else throw new IllegalArgumentException ("BOMType Invalid value - " + BOMType + " - Reference_ID=347 - A - O - P - S - F - M - R - C"); + if (BOMType != null && BOMType.length() > 1) + { + log.warning("Length > 1 - truncated"); + BOMType = BOMType.substring(0, 1); + } + set_Value (COLUMNNAME_BOMType, BOMType); + } + + /** Get BOM Type. + @return Type of BOM + */ + public String getBOMType () + { + return (String)get_Value(COLUMNNAME_BOMType); + } + + /** BOMUse AD_Reference_ID=348 */ + public static final int BOMUSE_AD_Reference_ID=348; + /** Master = A */ + public static final String BOMUSE_Master = "A"; + /** Engineering = E */ + public static final String BOMUSE_Engineering = "E"; + /** Manufacturing = M */ + public static final String BOMUSE_Manufacturing = "M"; + /** Planning = P */ + public static final String BOMUSE_Planning = "P"; + /** Quality = Q */ + public static final String BOMUSE_Quality = "Q"; + /** Set BOM Use. + @param BOMUse + The use of the Bill of Material + */ + public void setBOMUse (String BOMUse) + { + + if (BOMUse == null || BOMUse.equals("A") || BOMUse.equals("E") || BOMUse.equals("M") || BOMUse.equals("P") || BOMUse.equals("Q")); else throw new IllegalArgumentException ("BOMUse Invalid value - " + BOMUse + " - Reference_ID=348 - A - E - M - P - Q"); + if (BOMUse != null && BOMUse.length() > 1) + { + log.warning("Length > 1 - truncated"); + BOMUse = BOMUse.substring(0, 1); + } + set_Value (COLUMNNAME_BOMUse, BOMUse); + } + + /** Get BOM Use. + @return The use of the Bill of Material + */ + public String getBOMUse () + { + return (String)get_Value(COLUMNNAME_BOMUse); + } + + public I_C_UOM getC_UOM() throws Exception + { + Class clazz = MTable.getClass(I_C_UOM.Table_Name); + I_C_UOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set UOM. + @param C_UOM_ID + Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID) + { + if (C_UOM_ID < 1) + throw new IllegalArgumentException ("C_UOM_ID is mandatory."); + set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); + } + + /** Get UOM. + @return Unit of Measure + */ + public int getC_UOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Copy From. + @param CopyFrom + Copy From Record + */ + public void setCopyFrom (String CopyFrom) + { + + if (CopyFrom != null && CopyFrom.length() > 1) + { + log.warning("Length > 1 - truncated"); + CopyFrom = CopyFrom.substring(0, 1); + } + set_Value (COLUMNNAME_CopyFrom, CopyFrom); + } + + /** Get Copy From. + @return Copy From Record + */ + public String getCopyFrom () + { + return (String)get_Value(COLUMNNAME_CopyFrom); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Document No. + @param DocumentNo + Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo) + { + + if (DocumentNo != null && DocumentNo.length() > 20) + { + log.warning("Length > 20 - truncated"); + DocumentNo = DocumentNo.substring(0, 20); + } + set_Value (COLUMNNAME_DocumentNo, DocumentNo); + } + + /** Get Document No. + @return Document sequence number of the document + */ + public String getDocumentNo () + { + return (String)get_Value(COLUMNNAME_DocumentNo); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception + { + Class clazz = MTable.getClass(I_M_ChangeNotice.Table_Name); + I_M_ChangeNotice result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_ChangeNotice)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_ChangeNotice_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Change Notice. + @param M_ChangeNotice_ID + Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID) + { + if (M_ChangeNotice_ID < 1) + set_Value (COLUMNNAME_M_ChangeNotice_ID, null); + else + set_Value (COLUMNNAME_M_ChangeNotice_ID, Integer.valueOf(M_ChangeNotice_ID)); + } + + /** Get Change Notice. + @return Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_ChangeNotice_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + if (Name == null) + throw new IllegalArgumentException ("Name is mandatory."); + + if (Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set PP_Order_BOM_ID. + @param PP_Order_BOM_ID PP_Order_BOM_ID */ + public void setPP_Order_BOM_ID (int PP_Order_BOM_ID) + { + if (PP_Order_BOM_ID < 1) + throw new IllegalArgumentException ("PP_Order_BOM_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_BOM_ID, Integer.valueOf(PP_Order_BOM_ID)); + } + + /** Get PP_Order_BOM_ID. + @return PP_Order_BOM_ID */ + public int getPP_Order_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** 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; + } + + /** Set Revision. + @param Revision Revision */ + public void setRevision (String Revision) + { + + if (Revision != null && Revision.length() > 10) + { + log.warning("Length > 10 - truncated"); + Revision = Revision.substring(0, 10); + } + set_Value (COLUMNNAME_Revision, Revision); + } + + /** Get Revision. + @return Revision */ + public String getRevision () + { + return (String)get_Value(COLUMNNAME_Revision); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + if (ValidFrom == null) + throw new IllegalArgumentException ("ValidFrom is mandatory."); + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 80) + { + log.warning("Length > 80 - truncated"); + Value = Value.substring(0, 80); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Order_BOMLine.java b/base/src/org/eevolution/model/X_PP_Order_BOMLine.java new file mode 100644 index 0000000000..12d3fa6392 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Order_BOMLine.java @@ -0,0 +1,963 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; + +/** Generated Model for PP_Order_BOMLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_BOMLine extends PO implements I_PP_Order_BOMLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Order_BOMLine (Properties ctx, int PP_Order_BOMLine_ID, String trxName) + { + super (ctx, PP_Order_BOMLine_ID, trxName); + /** if (PP_Order_BOMLine_ID == 0) + { + setC_UOM_ID (0); + setIsCritical (false); + setLine (0); +// @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM PP_Order_BOMLine WHERE PP_Order_ID=@PP_Order_ID@ + setM_Product_ID (0); + setM_Warehouse_ID (0); + setPP_Order_BOMLine_ID (0); + setPP_Order_BOM_ID (0); + setPP_Order_ID (0); + setQtyBOM (Env.ZERO); + setQtyBatch (Env.ZERO); + setQtyDelivered (Env.ZERO); + setQtyPost (Env.ZERO); + setQtyReject (Env.ZERO); + setQtyRequiered (Env.ZERO); + setQtyReserved (Env.ZERO); + setQtyScrap (Env.ZERO); + setValidFrom (new Timestamp(System.currentTimeMillis())); +// @#Date@ + } */ + } + + /** Load Constructor */ + public X_PP_Order_BOMLine (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Order_BOMLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Quantity Assay. + @param Assay + Indicated the Quantity Assay to use into Quality Order + */ + public void setAssay (BigDecimal Assay) + { + set_ValueNoCheck (COLUMNNAME_Assay, Assay); + } + + /** Get Quantity Assay. + @return Indicated the Quantity Assay to use into Quality Order + */ + public BigDecimal getAssay () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Assay); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Backflush Group. + @param BackflushGroup + The Grouping Components to the Backflush + */ + public void setBackflushGroup (String BackflushGroup) + { + + if (BackflushGroup != null && BackflushGroup.length() > 30) + { + log.warning("Length > 30 - truncated"); + BackflushGroup = BackflushGroup.substring(0, 30); + } + set_ValueNoCheck (COLUMNNAME_BackflushGroup, BackflushGroup); + } + + /** Get Backflush Group. + @return The Grouping Components to the Backflush + */ + public String getBackflushGroup () + { + return (String)get_Value(COLUMNNAME_BackflushGroup); + } + + public I_C_UOM getC_UOM() throws Exception + { + Class clazz = MTable.getClass(I_C_UOM.Table_Name); + I_C_UOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set UOM. + @param C_UOM_ID + Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID) + { + if (C_UOM_ID < 1) + throw new IllegalArgumentException ("C_UOM_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); + } + + /** Get UOM. + @return Unit of Measure + */ + public int getC_UOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** ComponentType AD_Reference_ID=53225 */ + public static final int COMPONENTTYPE_AD_Reference_ID=53225; + /** By Product = BY */ + public static final String COMPONENTTYPE_ByProduct = "BY"; + /** Component = CO */ + public static final String COMPONENTTYPE_Component = "CO"; + /** Phantom = PH */ + public static final String COMPONENTTYPE_Phantom = "PH"; + /** Packing = PK */ + public static final String COMPONENTTYPE_Packing = "PK"; + /** Planning = PL */ + public static final String COMPONENTTYPE_Planning = "PL"; + /** Tools = TL */ + public static final String COMPONENTTYPE_Tools = "TL"; + /** Option = OP */ + public static final String COMPONENTTYPE_Option = "OP"; + /** Variant = VA */ + public static final String COMPONENTTYPE_Variant = "VA"; + /** Set Component Type. + @param ComponentType + Component Type for a Bill of Material or Formula + */ + public void setComponentType (String ComponentType) + { + + if (ComponentType == null || ComponentType.equals("BY") || ComponentType.equals("CO") || ComponentType.equals("PH") || ComponentType.equals("PK") || ComponentType.equals("PL") || ComponentType.equals("TL") || ComponentType.equals("OP") || ComponentType.equals("VA")); else throw new IllegalArgumentException ("ComponentType Invalid value - " + ComponentType + " - Reference_ID=53225 - BY - CO - PH - PK - PL - TL - OP - VA"); + if (ComponentType != null && ComponentType.length() > 2) + { + log.warning("Length > 2 - truncated"); + ComponentType = ComponentType.substring(0, 2); + } + set_Value (COLUMNNAME_ComponentType, ComponentType); + } + + /** Get Component Type. + @return Component Type for a Bill of Material or Formula + */ + public String getComponentType () + { + return (String)get_Value(COLUMNNAME_ComponentType); + } + + /** Set Date Delivered. + @param DateDelivered + Date when the product was delivered + */ + public void setDateDelivered (Timestamp DateDelivered) + { + set_Value (COLUMNNAME_DateDelivered, DateDelivered); + } + + /** Get Date Delivered. + @return Date when the product was delivered + */ + public Timestamp getDateDelivered () + { + return (Timestamp)get_Value(COLUMNNAME_DateDelivered); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Feature. + @param Feature + Indicated the Feature for Product Configure + */ + public void setFeature (String Feature) + { + + if (Feature != null && Feature.length() > 30) + { + log.warning("Length > 30 - truncated"); + Feature = Feature.substring(0, 30); + } + set_Value (COLUMNNAME_Feature, Feature); + } + + /** Get Feature. + @return Indicated the Feature for Product Configure + */ + public String getFeature () + { + return (String)get_Value(COLUMNNAME_Feature); + } + + /** Set Forecast. + @param Forecast + Indicated the % of participation this component into a of the BOM Planning + */ + public void setForecast (BigDecimal Forecast) + { + set_ValueNoCheck (COLUMNNAME_Forecast, Forecast); + } + + /** Get Forecast. + @return Indicated the % of participation this component into a of the BOM Planning + */ + public BigDecimal getForecast () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Forecast); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Is Critical Component. + @param IsCritical + Indicate that a Manufacturing Order can not begin without have this component + */ + public void setIsCritical (boolean IsCritical) + { + set_Value (COLUMNNAME_IsCritical, Boolean.valueOf(IsCritical)); + } + + /** Get Is Critical Component. + @return Indicate that a Manufacturing Order can not begin without have this component + */ + public boolean isCritical () + { + Object oo = get_Value(COLUMNNAME_IsCritical); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Is Qty Percentage. + @param IsQtyPercentage + Indicate that this component is based in % Quantity + */ + public void setIsQtyPercentage (boolean IsQtyPercentage) + { + set_ValueNoCheck (COLUMNNAME_IsQtyPercentage, Boolean.valueOf(IsQtyPercentage)); + } + + /** Get Is Qty Percentage. + @return Indicate that this component is based in % Quantity + */ + public boolean isQtyPercentage () + { + Object oo = get_Value(COLUMNNAME_IsQtyPercentage); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** IssueMethod AD_Reference_ID=53226 */ + public static final int ISSUEMETHOD_AD_Reference_ID=53226; + /** Issue = 0 */ + public static final String ISSUEMETHOD_Issue = "0"; + /** BackFlush = 1 */ + public static final String ISSUEMETHOD_BackFlush = "1"; + /** Set Issue Method. + @param IssueMethod + There are two methods for issue the components to Manufacturing Order + */ + public void setIssueMethod (String IssueMethod) + { + + if (IssueMethod == null || IssueMethod.equals("0") || IssueMethod.equals("1")); else throw new IllegalArgumentException ("IssueMethod Invalid value - " + IssueMethod + " - Reference_ID=53226 - 0 - 1"); + if (IssueMethod != null && IssueMethod.length() > 1) + { + log.warning("Length > 1 - truncated"); + IssueMethod = IssueMethod.substring(0, 1); + } + set_Value (COLUMNNAME_IssueMethod, IssueMethod); + } + + /** Get Issue Method. + @return There are two methods for issue the components to Manufacturing Order + */ + public String getIssueMethod () + { + return (String)get_Value(COLUMNNAME_IssueMethod); + } + + /** Set Lead Time Offset. + @param LeadTimeOffset + Optional Lead Time offest before starting production + */ + public void setLeadTimeOffset (int LeadTimeOffset) + { + set_Value (COLUMNNAME_LeadTimeOffset, Integer.valueOf(LeadTimeOffset)); + } + + /** Get Lead Time Offset. + @return Optional Lead Time offest before starting production + */ + public int getLeadTimeOffset () + { + Integer ii = (Integer)get_Value(COLUMNNAME_LeadTimeOffset); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Line No. + @param Line + Unique line for this document + */ + public void setLine (int Line) + { + set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); + } + + /** Get Line No. + @return Unique line for this document + */ + public int getLine () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Line); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 1) + set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception + { + Class clazz = MTable.getClass(I_M_ChangeNotice.Table_Name); + I_M_ChangeNotice result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_ChangeNotice)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_ChangeNotice_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Change Notice. + @param M_ChangeNotice_ID + Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID) + { + if (M_ChangeNotice_ID < 1) + set_Value (COLUMNNAME_M_ChangeNotice_ID, null); + else + set_Value (COLUMNNAME_M_ChangeNotice_ID, Integer.valueOf(M_ChangeNotice_ID)); + } + + /** Get Change Notice. + @return Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_ChangeNotice_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Locator. + @param M_Locator_ID + Warehouse Locator + */ + public void setM_Locator_ID (int M_Locator_ID) + { + if (M_Locator_ID < 1) + set_Value (COLUMNNAME_M_Locator_ID, null); + else + set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID)); + } + + /** Get Locator. + @return Warehouse Locator + */ + public int getM_Locator_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getM_Product_ID())); + } + + public I_M_Warehouse getM_Warehouse() throws Exception + { + Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); + I_M_Warehouse result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Warehouse. + @param M_Warehouse_ID + Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + if (M_Warehouse_ID < 1) + throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); + set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); + } + + /** 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 PP_Order_BOMLine_ID. + @param PP_Order_BOMLine_ID PP_Order_BOMLine_ID */ + public void setPP_Order_BOMLine_ID (int PP_Order_BOMLine_ID) + { + if (PP_Order_BOMLine_ID < 1) + throw new IllegalArgumentException ("PP_Order_BOMLine_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_BOMLine_ID, Integer.valueOf(PP_Order_BOMLine_ID)); + } + + /** Get PP_Order_BOMLine_ID. + @return PP_Order_BOMLine_ID */ + public int getPP_Order_BOMLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_BOMLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_BOM getPP_Order_BOM() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_BOM.Table_Name); + org.eevolution.model.I_PP_Order_BOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_BOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_BOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_BOM_ID. + @param PP_Order_BOM_ID PP_Order_BOM_ID */ + public void setPP_Order_BOM_ID (int PP_Order_BOM_ID) + { + if (PP_Order_BOM_ID < 1) + throw new IllegalArgumentException ("PP_Order_BOM_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_BOM_ID, Integer.valueOf(PP_Order_BOM_ID)); + } + + /** Get PP_Order_BOM_ID. + @return PP_Order_BOM_ID */ + public int getPP_Order_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Quantity. + @param QtyBOM + Indicate the Quantity use in this BOM + */ + public void setQtyBOM (BigDecimal QtyBOM) + { + if (QtyBOM == null) + throw new IllegalArgumentException ("QtyBOM is mandatory."); + set_ValueNoCheck (COLUMNNAME_QtyBOM, QtyBOM); + } + + /** Get Quantity. + @return Indicate the Quantity use in this BOM + */ + public BigDecimal getQtyBOM () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBOM); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Quantity %. + @param QtyBatch + Indicate the Quantity % use in this Formula + */ + public void setQtyBatch (BigDecimal QtyBatch) + { + if (QtyBatch == null) + throw new IllegalArgumentException ("QtyBatch is mandatory."); + set_ValueNoCheck (COLUMNNAME_QtyBatch, QtyBatch); + } + + /** Get Quantity %. + @return Indicate the Quantity % use in this Formula + */ + public BigDecimal getQtyBatch () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBatch); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Delivered Quantity. + @param QtyDelivered + Delivered Quantity + */ + public void setQtyDelivered (BigDecimal QtyDelivered) + { + if (QtyDelivered == null) + throw new IllegalArgumentException ("QtyDelivered is mandatory."); + set_ValueNoCheck (COLUMNNAME_QtyDelivered, QtyDelivered); + } + + /** Get Delivered Quantity. + @return Delivered Quantity + */ + public BigDecimal getQtyDelivered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyDelivered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Quantity. + @param QtyEntered + The Quantity Entered is based on the selected UoM + */ + public void setQtyEntered (BigDecimal QtyEntered) + { + set_ValueNoCheck (COLUMNNAME_QtyEntered, QtyEntered); + } + + /** Get Quantity. + @return The Quantity Entered is based on the selected UoM + */ + public BigDecimal getQtyEntered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyEntered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyPost. + @param QtyPost QtyPost */ + public void setQtyPost (BigDecimal QtyPost) + { + if (QtyPost == null) + throw new IllegalArgumentException ("QtyPost is mandatory."); + set_ValueNoCheck (COLUMNNAME_QtyPost, QtyPost); + } + + /** Get QtyPost. + @return QtyPost */ + public BigDecimal getQtyPost () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyPost); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyReject. + @param QtyReject QtyReject */ + public void setQtyReject (BigDecimal QtyReject) + { + if (QtyReject == null) + throw new IllegalArgumentException ("QtyReject is mandatory."); + set_ValueNoCheck (COLUMNNAME_QtyReject, QtyReject); + } + + /** Get QtyReject. + @return QtyReject */ + public BigDecimal getQtyReject () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReject); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyRequiered. + @param QtyRequiered QtyRequiered */ + public void setQtyRequiered (BigDecimal QtyRequiered) + { + if (QtyRequiered == null) + throw new IllegalArgumentException ("QtyRequiered is mandatory."); + set_Value (COLUMNNAME_QtyRequiered, QtyRequiered); + } + + /** Get QtyRequiered. + @return QtyRequiered */ + public BigDecimal getQtyRequiered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyRequiered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Reserved Quantity. + @param QtyReserved + Reserved Quantity + */ + public void setQtyReserved (BigDecimal QtyReserved) + { + if (QtyReserved == null) + throw new IllegalArgumentException ("QtyReserved is mandatory."); + set_ValueNoCheck (COLUMNNAME_QtyReserved, QtyReserved); + } + + /** Get Reserved Quantity. + @return Reserved Quantity + */ + public BigDecimal getQtyReserved () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyScrap. + @param QtyScrap QtyScrap */ + public void setQtyScrap (BigDecimal QtyScrap) + { + if (QtyScrap == null) + throw new IllegalArgumentException ("QtyScrap is mandatory."); + set_ValueNoCheck (COLUMNNAME_QtyScrap, QtyScrap); + } + + /** Get QtyScrap. + @return QtyScrap */ + public BigDecimal getQtyScrap () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyScrap); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Scrap. + @param Scrap + Indicate the Scrap Quantity that is generate in a manufacturing process + */ + public void setScrap (BigDecimal Scrap) + { + set_ValueNoCheck (COLUMNNAME_Scrap, Scrap); + } + + /** Get Scrap. + @return Indicate the Scrap Quantity that is generate in a manufacturing process + */ + public BigDecimal getScrap () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Scrap); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** UserID AD_Reference_ID=286 */ + public static final int USERID_AD_Reference_ID=286; + /** Set User ID. + @param UserID + User ID or account number + */ + public void setUserID (int UserID) + { + set_Value (COLUMNNAME_UserID, Integer.valueOf(UserID)); + } + + /** Get User ID. + @return User ID or account number + */ + public int getUserID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_UserID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + if (ValidFrom == null) + throw new IllegalArgumentException ("ValidFrom is mandatory."); + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Order_BOMLineMA.java b/base/src/org/eevolution/model/X_PP_Order_BOMLineMA.java new file mode 100644 index 0000000000..416959f4a7 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Order_BOMLineMA.java @@ -0,0 +1,177 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; + +/** Generated Model for PP_Order_BOMLineMA + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_BOMLineMA extends PO implements I_PP_Order_BOMLineMA, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Order_BOMLineMA (Properties ctx, int PP_Order_BOMLineMA_ID, String trxName) + { + super (ctx, PP_Order_BOMLineMA_ID, trxName); + /** if (PP_Order_BOMLineMA_ID == 0) + { + setM_AttributeSetInstance_ID (0); + setMovementQty (Env.ZERO); + setPP_Order_BOMLineMA_ID (0); + setPP_Order_BOMLine_ID (0); + } */ + } + + /** Load Constructor */ + public X_PP_Order_BOMLineMA (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Order_BOMLineMA[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 0) + throw new IllegalArgumentException ("M_AttributeSetInstance_ID is mandatory."); + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Movement Quantity. + @param MovementQty + Quantity of a product moved. + */ + public void setMovementQty (BigDecimal MovementQty) + { + if (MovementQty == null) + throw new IllegalArgumentException ("MovementQty is mandatory."); + set_Value (COLUMNNAME_MovementQty, MovementQty); + } + + /** Get Movement Quantity. + @return Quantity of a product moved. + */ + public BigDecimal getMovementQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MovementQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set PP_Order_BOMLineMA_ID. + @param PP_Order_BOMLineMA_ID PP_Order_BOMLineMA_ID */ + public void setPP_Order_BOMLineMA_ID (int PP_Order_BOMLineMA_ID) + { + if (PP_Order_BOMLineMA_ID < 1) + throw new IllegalArgumentException ("PP_Order_BOMLineMA_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_BOMLineMA_ID, Integer.valueOf(PP_Order_BOMLineMA_ID)); + } + + /** Get PP_Order_BOMLineMA_ID. + @return PP_Order_BOMLineMA_ID */ + public int getPP_Order_BOMLineMA_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_BOMLineMA_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_BOMLine getPP_Order_BOMLine() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_BOMLine.Table_Name); + org.eevolution.model.I_PP_Order_BOMLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_BOMLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_BOMLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_BOMLine_ID. + @param PP_Order_BOMLine_ID PP_Order_BOMLine_ID */ + public void setPP_Order_BOMLine_ID (int PP_Order_BOMLine_ID) + { + if (PP_Order_BOMLine_ID < 1) + throw new IllegalArgumentException ("PP_Order_BOMLine_ID is mandatory."); + set_Value (COLUMNNAME_PP_Order_BOMLine_ID, Integer.valueOf(PP_Order_BOMLine_ID)); + } + + /** Get PP_Order_BOMLine_ID. + @return PP_Order_BOMLine_ID */ + public int getPP_Order_BOMLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_BOMLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Order_Cost.java b/base/src/org/eevolution/model/X_PP_Order_Cost.java new file mode 100644 index 0000000000..198c8dbe0b --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Order_Cost.java @@ -0,0 +1,524 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; + +/** Generated Model for PP_Order_Cost + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_Cost extends PO implements I_PP_Order_Cost, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Order_Cost (Properties ctx, int PP_Order_Cost_ID, String trxName) + { + super (ctx, PP_Order_Cost_ID, trxName); + /** if (PP_Order_Cost_ID == 0) + { + setC_AcctSchema_ID (0); + setM_Product_ID (0); + setPP_Order_Cost_ID (0); + setPP_Order_ID (0); + } */ + } + + /** Load Constructor */ + public X_PP_Order_Cost (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Order_Cost[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Workflow getAD_Workflow() throws Exception + { + Class clazz = MTable.getClass(I_AD_Workflow.Table_Name); + I_AD_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Workflow. + @param AD_Workflow_ID + Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID) + { + if (AD_Workflow_ID < 1) + set_Value (COLUMNNAME_AD_Workflow_ID, null); + else + set_Value (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); + } + + /** Get Workflow. + @return Workflow or combination of tasks + */ + public int getAD_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_AcctSchema getC_AcctSchema() throws Exception + { + Class clazz = MTable.getClass(I_C_AcctSchema.Table_Name); + I_C_AcctSchema result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Accounting Schema. + @param C_AcctSchema_ID + Rules for accounting + */ + public void setC_AcctSchema_ID (int C_AcctSchema_ID) + { + if (C_AcctSchema_ID < 1) + throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory."); + set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID)); + } + + /** Get Accounting Schema. + @return Rules for accounting + */ + public int getC_AcctSchema_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** CostingMethod AD_Reference_ID=122 */ + public static final int COSTINGMETHOD_AD_Reference_ID=122; + /** Standard Costing = S */ + public static final String COSTINGMETHOD_StandardCosting = "S"; + /** Average PO = A */ + public static final String COSTINGMETHOD_AveragePO = "A"; + /** Lifo = L */ + public static final String COSTINGMETHOD_Lifo = "L"; + /** Fifo = F */ + public static final String COSTINGMETHOD_Fifo = "F"; + /** Last PO Price = p */ + public static final String COSTINGMETHOD_LastPOPrice = "p"; + /** Average Invoice = I */ + public static final String COSTINGMETHOD_AverageInvoice = "I"; + /** Last Invoice = i */ + public static final String COSTINGMETHOD_LastInvoice = "i"; + /** User Defined = U */ + public static final String COSTINGMETHOD_UserDefined = "U"; + /** _ = x */ + public static final String COSTINGMETHOD__ = "x"; + /** Set Costing Method. + @param CostingMethod + Indicates how Costs will be calculated + */ + public void setCostingMethod (String CostingMethod) + { + + if (CostingMethod == null || CostingMethod.equals("S") || CostingMethod.equals("A") || CostingMethod.equals("L") || CostingMethod.equals("F") || CostingMethod.equals("p") || CostingMethod.equals("I") || CostingMethod.equals("i") || CostingMethod.equals("U") || CostingMethod.equals("x")); else throw new IllegalArgumentException ("CostingMethod Invalid value - " + CostingMethod + " - Reference_ID=122 - S - A - L - F - p - I - i - U - x"); + if (CostingMethod != null && CostingMethod.length() > 1) + { + log.warning("Length > 1 - truncated"); + CostingMethod = CostingMethod.substring(0, 1); + } + set_ValueNoCheck (COLUMNNAME_CostingMethod, CostingMethod); + } + + /** Get Costing Method. + @return Indicates how Costs will be calculated + */ + public String getCostingMethod () + { + return (String)get_Value(COLUMNNAME_CostingMethod); + } + + /** Set Accumulated Amt. + @param CumulatedAmt + Total Amount + */ + public void setCumulatedAmt (BigDecimal CumulatedAmt) + { + set_ValueNoCheck (COLUMNNAME_CumulatedAmt, CumulatedAmt); + } + + /** Get Accumulated Amt. + @return Total Amount + */ + public BigDecimal getCumulatedAmt () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CumulatedAmt); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set CumulatedAmtPost. + @param CumulatedAmtPost CumulatedAmtPost */ + public void setCumulatedAmtPost (BigDecimal CumulatedAmtPost) + { + set_ValueNoCheck (COLUMNNAME_CumulatedAmtPost, CumulatedAmtPost); + } + + /** Get CumulatedAmtPost. + @return CumulatedAmtPost */ + public BigDecimal getCumulatedAmtPost () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CumulatedAmtPost); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Accumulated Qty. + @param CumulatedQty + Total Quantity + */ + public void setCumulatedQty (BigDecimal CumulatedQty) + { + set_ValueNoCheck (COLUMNNAME_CumulatedQty, CumulatedQty); + } + + /** Get Accumulated Qty. + @return Total Quantity + */ + public BigDecimal getCumulatedQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CumulatedQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set CumulatedQtyPost. + @param CumulatedQtyPost CumulatedQtyPost */ + public void setCumulatedQtyPost (BigDecimal CumulatedQtyPost) + { + set_ValueNoCheck (COLUMNNAME_CumulatedQtyPost, CumulatedQtyPost); + } + + /** Get CumulatedQtyPost. + @return CumulatedQtyPost */ + public BigDecimal getCumulatedQtyPost () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CumulatedQtyPost); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Current Cost Price. + @param CurrentCostPrice + The currently used cost price + */ + public void setCurrentCostPrice (BigDecimal CurrentCostPrice) + { + set_ValueNoCheck (COLUMNNAME_CurrentCostPrice, CurrentCostPrice); + } + + /** Get Current Cost Price. + @return The currently used cost price + */ + public BigDecimal getCurrentCostPrice () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPrice); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set CurrentCostPriceLL. + @param CurrentCostPriceLL CurrentCostPriceLL */ + public void setCurrentCostPriceLL (BigDecimal CurrentCostPriceLL) + { + set_ValueNoCheck (COLUMNNAME_CurrentCostPriceLL, CurrentCostPriceLL); + } + + /** Get CurrentCostPriceLL. + @return CurrentCostPriceLL */ + public BigDecimal getCurrentCostPriceLL () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPriceLL); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Current Quantity. + @param CurrentQty + Current Quantity + */ + public void setCurrentQty (BigDecimal CurrentQty) + { + set_Value (COLUMNNAME_CurrentQty, CurrentQty); + } + + /** Get Current Quantity. + @return Current Quantity + */ + public BigDecimal getCurrentQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentQty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_CostElement getM_CostElement() throws Exception + { + Class clazz = MTable.getClass(I_M_CostElement.Table_Name); + I_M_CostElement result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_CostElement)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_CostElement_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Cost Element. + @param M_CostElement_ID + Product Cost Element + */ + public void setM_CostElement_ID (int M_CostElement_ID) + { + if (M_CostElement_ID < 1) + set_ValueNoCheck (COLUMNNAME_M_CostElement_ID, null); + else + set_ValueNoCheck (COLUMNNAME_M_CostElement_ID, Integer.valueOf(M_CostElement_ID)); + } + + /** Get Cost Element. + @return Product Cost Element + */ + public int getM_CostElement_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_CostElement_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_CostType getM_CostType() throws Exception + { + Class clazz = MTable.getClass(I_M_CostType.Table_Name); + I_M_CostType result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_CostType)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_CostType_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Cost Type. + @param M_CostType_ID + Type of Cost (e.g. Current, Plan, Future) + */ + public void setM_CostType_ID (int M_CostType_ID) + { + if (M_CostType_ID < 1) + set_Value (COLUMNNAME_M_CostType_ID, null); + else + set_Value (COLUMNNAME_M_CostType_ID, Integer.valueOf(M_CostType_ID)); + } + + /** Get Cost Type. + @return Type of Cost (e.g. Current, Plan, Future) + */ + public int getM_CostType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_CostType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set PP_Order_Cost_ID. + @param PP_Order_Cost_ID PP_Order_Cost_ID */ + public void setPP_Order_Cost_ID (int PP_Order_Cost_ID) + { + if (PP_Order_Cost_ID < 1) + throw new IllegalArgumentException ("PP_Order_Cost_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Cost_ID, Integer.valueOf(PP_Order_Cost_ID)); + } + + /** Get PP_Order_Cost_ID. + @return PP_Order_Cost_ID */ + public int getPP_Order_Cost_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Cost_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_WF_Node.java b/base/src/org/eevolution/model/X_PP_Order_Node.java similarity index 65% rename from base/src/org/compiere/model/X_AD_WF_Node.java rename to base/src/org/eevolution/model/X_PP_Order_Node.java index 70c4febb5e..cd13973323 100644 --- a/base/src/org/compiere/model/X_AD_WF_Node.java +++ b/base/src/org/eevolution/model/X_PP_Order_Node.java @@ -15,20 +15,22 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.lang.reflect.Constructor; import java.math.BigDecimal; import java.sql.ResultSet; +import java.sql.Timestamp; import java.util.Properties; import java.util.logging.Level; +import org.compiere.model.*; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; -/** Generated Model for AD_WF_Node +/** Generated Model for PP_Order_Node * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_Node extends PO implements I_PP_Order_Node, I_Persistent { /** @@ -37,42 +39,45 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_AD_WF_Node (Properties ctx, int AD_WF_Node_ID, String trxName) + public X_PP_Order_Node (Properties ctx, int PP_Order_Node_ID, String trxName) { - super (ctx, AD_WF_Node_ID, trxName); - /** if (AD_WF_Node_ID == 0) + super (ctx, PP_Order_Node_ID, trxName); + /** if (PP_Order_Node_ID == 0) { setAD_WF_Node_ID (0); setAD_Workflow_ID (0); setAction (null); // N setCost (Env.ZERO); - setDuration (0); setEntityType (null); // U - setIsCentrallyMaintained (true); -// Y + setIsCentrallyMaintained (false); setJoinElement (null); // X setLimit (0); setName (null); + setPP_Order_ID (0); + setPP_Order_Node_ID (0); + setPP_Order_Workflow_ID (0); + setPriority (0); setSplitElement (null); // X setValue (null); setWaitingTime (0); + setWorkingTime (0); setXPosition (0); setYPosition (0); } */ } /** Load Constructor */ - public X_AD_WF_Node (Properties ctx, ResultSet rs, String trxName) + public X_PP_Order_Node (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } /** AccessLevel - * @return 6 - System - Client + * @return 3 - Client - Org */ protected int get_AccessLevel() { @@ -88,7 +93,7 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_AD_WF_Node[") + StringBuffer sb = new StringBuffer ("X_PP_Order_Node[") .append(get_ID()).append("]"); return sb.toString(); } @@ -327,6 +332,22 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return ii.intValue(); } + public I_AD_WF_Node getAD_WF_Node() throws Exception + { + Class clazz = MTable.getClass(I_AD_WF_Node.Table_Name); + I_AD_WF_Node result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_WF_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_WF_Node_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + /** Set Node. @param AD_WF_Node_ID Workflow Node (activity), step or process @@ -335,7 +356,7 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent { if (AD_WF_Node_ID < 1) throw new IllegalArgumentException ("AD_WF_Node_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_WF_Node_ID, Integer.valueOf(AD_WF_Node_ID)); + set_Value (COLUMNNAME_AD_WF_Node_ID, Integer.valueOf(AD_WF_Node_ID)); } /** Get Node. @@ -451,7 +472,7 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent { if (AD_Workflow_ID < 1) throw new IllegalArgumentException ("AD_Workflow_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); + set_Value (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); } /** Get Workflow. @@ -489,6 +510,8 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent public static final String ACTION_DocumentAction = "D"; /** EMail = M */ public static final String ACTION_EMail = "M"; + /** User Workbench = B */ + public static final String ACTION_UserWorkbench = "B"; /** Set Action. @param Action Indicates the Action to be performed @@ -496,7 +519,7 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent public void setAction (String Action) { if (Action == null) throw new IllegalArgumentException ("Action is mandatory"); - if (Action.equals("Z") || Action.equals("C") || Action.equals("F") || Action.equals("V") || Action.equals("W") || Action.equals("X") || Action.equals("T") || Action.equals("R") || Action.equals("P") || Action.equals("D") || Action.equals("M")); else throw new IllegalArgumentException ("Action Invalid value - " + Action + " - Reference_ID=302 - Z - C - F - V - W - X - T - R - P - D - M"); + if (Action.equals("Z") || Action.equals("C") || Action.equals("F") || Action.equals("V") || Action.equals("W") || Action.equals("X") || Action.equals("T") || Action.equals("R") || Action.equals("P") || Action.equals("D") || Action.equals("M") || Action.equals("B")); else throw new IllegalArgumentException ("Action Invalid value - " + Action + " - Reference_ID=302 - Z - C - F - V - W - X - T - R - P - D - M - B"); if (Action.length() > 1) { log.warning("Length > 1 - truncated"); @@ -559,6 +582,45 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return (String)get_Value(COLUMNNAME_AttributeValue); } + public I_C_BPartner getC_BPartner() throws Exception + { + Class clazz = MTable.getClass(I_C_BPartner.Table_Name); + I_C_BPartner result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BPartner)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + } + + /** 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(); + } + /** Set Cost. @param Cost Cost information @@ -581,6 +643,65 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return bd; } + /** Set Finish Date. + @param DateFinish + Finish or (planned) completion date + */ + public void setDateFinish (Timestamp DateFinish) + { + set_Value (COLUMNNAME_DateFinish, DateFinish); + } + + /** Get Finish Date. + @return Finish or (planned) completion date + */ + public Timestamp getDateFinish () + { + return (Timestamp)get_Value(COLUMNNAME_DateFinish); + } + + /** Set DateFinishSchedule. + @param DateFinishSchedule DateFinishSchedule */ + public void setDateFinishSchedule (Timestamp DateFinishSchedule) + { + set_Value (COLUMNNAME_DateFinishSchedule, DateFinishSchedule); + } + + /** Get DateFinishSchedule. + @return DateFinishSchedule */ + public Timestamp getDateFinishSchedule () + { + return (Timestamp)get_Value(COLUMNNAME_DateFinishSchedule); + } + + /** Set DateStart. + @param DateStart DateStart */ + public void setDateStart (Timestamp DateStart) + { + set_Value (COLUMNNAME_DateStart, DateStart); + } + + /** Get DateStart. + @return DateStart */ + public Timestamp getDateStart () + { + return (Timestamp)get_Value(COLUMNNAME_DateStart); + } + + /** Set DateStartSchedule. + @param DateStartSchedule DateStartSchedule */ + public void setDateStartSchedule (Timestamp DateStartSchedule) + { + set_Value (COLUMNNAME_DateStartSchedule, DateStartSchedule); + } + + /** Get DateStartSchedule. + @return DateStartSchedule */ + public Timestamp getDateStartSchedule () + { + return (Timestamp)get_Value(COLUMNNAME_DateStartSchedule); + } + /** Set Description. @param Description Optional short description of the record @@ -658,6 +779,56 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return (String)get_Value(COLUMNNAME_DocAction); } + /** DocStatus AD_Reference_ID=131 */ + public static final int DOCSTATUS_AD_Reference_ID=131; + /** Drafted = DR */ + public static final String DOCSTATUS_Drafted = "DR"; + /** Completed = CO */ + public static final String DOCSTATUS_Completed = "CO"; + /** Approved = AP */ + public static final String DOCSTATUS_Approved = "AP"; + /** Not Approved = NA */ + public static final String DOCSTATUS_NotApproved = "NA"; + /** Voided = VO */ + public static final String DOCSTATUS_Voided = "VO"; + /** Invalid = IN */ + public static final String DOCSTATUS_Invalid = "IN"; + /** Reversed = RE */ + public static final String DOCSTATUS_Reversed = "RE"; + /** Closed = CL */ + public static final String DOCSTATUS_Closed = "CL"; + /** Unknown = ?? */ + public static final String DOCSTATUS_Unknown = "??"; + /** In Progress = IP */ + public static final String DOCSTATUS_InProgress = "IP"; + /** Waiting Payment = WP */ + public static final String DOCSTATUS_WaitingPayment = "WP"; + /** Waiting Confirmation = WC */ + public static final String DOCSTATUS_WaitingConfirmation = "WC"; + /** Set Document Status. + @param DocStatus + The current status of the document + */ + public void setDocStatus (String DocStatus) + { + + if (DocStatus == null || DocStatus.equals("DR") || DocStatus.equals("CO") || DocStatus.equals("AP") || DocStatus.equals("NA") || DocStatus.equals("VO") || DocStatus.equals("IN") || DocStatus.equals("RE") || DocStatus.equals("CL") || DocStatus.equals("??") || DocStatus.equals("IP") || DocStatus.equals("WP") || DocStatus.equals("WC")); else throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - DR - CO - AP - NA - VO - IN - RE - CL - ?? - IP - WP - WC"); + if (DocStatus != null && DocStatus.length() > 2) + { + log.warning("Length > 2 - truncated"); + DocStatus = DocStatus.substring(0, 2); + } + set_Value (COLUMNNAME_DocStatus, DocStatus); + } + + /** Get Document Status. + @return The current status of the document + */ + public String getDocStatus () + { + return (String)get_Value(COLUMNNAME_DocStatus); + } + /** Set Duration. @param Duration Normal Duration in Duration Unit @@ -678,111 +849,38 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return ii.intValue(); } - /** Set Dynamic Priority Change. - @param DynPriorityChange - Change of priority when Activity is suspended waiting for user - */ - public void setDynPriorityChange (BigDecimal DynPriorityChange) + /** Set DurationReal. + @param DurationReal DurationReal */ + public void setDurationReal (int DurationReal) { - set_Value (COLUMNNAME_DynPriorityChange, DynPriorityChange); + set_Value (COLUMNNAME_DurationReal, Integer.valueOf(DurationReal)); } - /** Get Dynamic Priority Change. - @return Change of priority when Activity is suspended waiting for user - */ - public BigDecimal getDynPriorityChange () + /** Get DurationReal. + @return DurationReal */ + public int getDurationReal () { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DynPriorityChange); - if (bd == null) - return Env.ZERO; - return bd; + Integer ii = (Integer)get_Value(COLUMNNAME_DurationReal); + if (ii == null) + return 0; + return ii.intValue(); } - /** DynPriorityUnit AD_Reference_ID=221 */ - public static final int DYNPRIORITYUNIT_AD_Reference_ID=221; - /** Minute = M */ - public static final String DYNPRIORITYUNIT_Minute = "M"; - /** Hour = H */ - public static final String DYNPRIORITYUNIT_Hour = "H"; - /** Day = D */ - public static final String DYNPRIORITYUNIT_Day = "D"; - /** Set Dynamic Priority Unit. - @param DynPriorityUnit - Change of priority when Activity is suspended waiting for user - */ - public void setDynPriorityUnit (String DynPriorityUnit) + /** Set DurationRequiered. + @param DurationRequiered DurationRequiered */ + public void setDurationRequiered (int DurationRequiered) { - - if (DynPriorityUnit == null || DynPriorityUnit.equals("M") || DynPriorityUnit.equals("H") || DynPriorityUnit.equals("D")); else throw new IllegalArgumentException ("DynPriorityUnit Invalid value - " + DynPriorityUnit + " - Reference_ID=221 - M - H - D"); - if (DynPriorityUnit != null && DynPriorityUnit.length() > 1) - { - log.warning("Length > 1 - truncated"); - DynPriorityUnit = DynPriorityUnit.substring(0, 1); - } - set_Value (COLUMNNAME_DynPriorityUnit, DynPriorityUnit); + set_Value (COLUMNNAME_DurationRequiered, Integer.valueOf(DurationRequiered)); } - /** Get Dynamic Priority Unit. - @return Change of priority when Activity is suspended waiting for user - */ - public String getDynPriorityUnit () + /** Get DurationRequiered. + @return DurationRequiered */ + public int getDurationRequiered () { - return (String)get_Value(COLUMNNAME_DynPriorityUnit); - } - - /** Set EMail Address. - @param EMail - Electronic Mail Address - */ - public void setEMail (String EMail) - { - - if (EMail != null && EMail.length() > 60) - { - log.warning("Length > 60 - truncated"); - EMail = EMail.substring(0, 60); - } - set_Value (COLUMNNAME_EMail, EMail); - } - - /** Get EMail Address. - @return Electronic Mail Address - */ - public String getEMail () - { - return (String)get_Value(COLUMNNAME_EMail); - } - - /** EMailRecipient AD_Reference_ID=363 */ - public static final int EMAILRECIPIENT_AD_Reference_ID=363; - /** Document Owner = D */ - public static final String EMAILRECIPIENT_DocumentOwner = "D"; - /** Document Business Partner = B */ - public static final String EMAILRECIPIENT_DocumentBusinessPartner = "B"; - /** WF Responsible = R */ - public static final String EMAILRECIPIENT_WFResponsible = "R"; - /** Set EMail Recipient. - @param EMailRecipient - Recipient of the EMail - */ - public void setEMailRecipient (String EMailRecipient) - { - - if (EMailRecipient == null || EMailRecipient.equals("D") || EMailRecipient.equals("B") || EMailRecipient.equals("R")); else throw new IllegalArgumentException ("EMailRecipient Invalid value - " + EMailRecipient + " - Reference_ID=363 - D - B - R"); - if (EMailRecipient != null && EMailRecipient.length() > 1) - { - log.warning("Length > 1 - truncated"); - EMailRecipient = EMailRecipient.substring(0, 1); - } - set_Value (COLUMNNAME_EMailRecipient, EMailRecipient); - } - - /** Get EMail Recipient. - @return Recipient of the EMail - */ - public String getEMailRecipient () - { - return (String)get_Value(COLUMNNAME_EMailRecipient); + Integer ii = (Integer)get_Value(COLUMNNAME_DurationRequiered); + if (ii == null) + return 0; + return ii.intValue(); } /** EntityType AD_Reference_ID=389 */ @@ -887,6 +985,48 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return false; } + /** Set IsMilestone. + @param IsMilestone IsMilestone */ + public void setIsMilestone (boolean IsMilestone) + { + set_Value (COLUMNNAME_IsMilestone, Boolean.valueOf(IsMilestone)); + } + + /** Get IsMilestone. + @return IsMilestone */ + public boolean isMilestone () + { + Object oo = get_Value(COLUMNNAME_IsMilestone); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set IsSubcontracting. + @param IsSubcontracting IsSubcontracting */ + public void setIsSubcontracting (boolean IsSubcontracting) + { + set_Value (COLUMNNAME_IsSubcontracting, Boolean.valueOf(IsSubcontracting)); + } + + /** Get IsSubcontracting. + @return IsSubcontracting */ + public boolean isSubcontracting () + { + Object oo = get_Value(COLUMNNAME_IsSubcontracting); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** JoinElement AD_Reference_ID=301 */ public static final int JOINELEMENT_AD_Reference_ID=301; /** AND = A */ @@ -937,6 +1077,23 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return ii.intValue(); } + /** Set MovingTime. + @param MovingTime MovingTime */ + public void setMovingTime (int MovingTime) + { + set_Value (COLUMNNAME_MovingTime, Integer.valueOf(MovingTime)); + } + + /** Get MovingTime. + @return MovingTime */ + public int getMovingTime () + { + Integer ii = (Integer)get_Value(COLUMNNAME_MovingTime); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Name. @param Name Alphanumeric identifier of the entity @@ -970,6 +1127,112 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return new KeyNamePair(get_ID(), getName()); } + /** Set OverlapUnits. + @param OverlapUnits OverlapUnits */ + public void setOverlapUnits (int OverlapUnits) + { + set_Value (COLUMNNAME_OverlapUnits, Integer.valueOf(OverlapUnits)); + } + + /** Get OverlapUnits. + @return OverlapUnits */ + public int getOverlapUnits () + { + Integer ii = (Integer)get_Value(COLUMNNAME_OverlapUnits); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set PP_Order_Node_ID. + @param PP_Order_Node_ID PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID) + { + if (PP_Order_Node_ID < 1) + throw new IllegalArgumentException ("PP_Order_Node_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Node_ID, Integer.valueOf(PP_Order_Node_ID)); + } + + /** Get PP_Order_Node_ID. + @return PP_Order_Node_ID */ + public int getPP_Order_Node_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Workflow.Table_Name); + org.eevolution.model.I_PP_Order_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Workflow_ID. + @param PP_Order_Workflow_ID PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID) + { + if (PP_Order_Workflow_ID < 1) + throw new IllegalArgumentException ("PP_Order_Workflow_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Workflow_ID, Integer.valueOf(PP_Order_Workflow_ID)); + } + + /** Get PP_Order_Workflow_ID. + @return PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Priority. @param Priority Indicates if this request is of a high, medium or low priority. @@ -990,14 +1253,102 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return ii.intValue(); } - public I_R_MailText getR_MailText() throws Exception + /** Set Delivered Quantity. + @param QtyDelivered + Delivered Quantity + */ + public void setQtyDelivered (BigDecimal QtyDelivered) + { + set_Value (COLUMNNAME_QtyDelivered, QtyDelivered); + } + + /** Get Delivered Quantity. + @return Delivered Quantity + */ + public BigDecimal getQtyDelivered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyDelivered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyReject. + @param QtyReject QtyReject */ + public void setQtyReject (BigDecimal QtyReject) + { + set_Value (COLUMNNAME_QtyReject, QtyReject); + } + + /** Get QtyReject. + @return QtyReject */ + public BigDecimal getQtyReject () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReject); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyRequiered. + @param QtyRequiered QtyRequiered */ + public void setQtyRequiered (BigDecimal QtyRequiered) + { + set_Value (COLUMNNAME_QtyRequiered, QtyRequiered); + } + + /** Get QtyRequiered. + @return QtyRequiered */ + public BigDecimal getQtyRequiered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyRequiered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyScrap. + @param QtyScrap QtyScrap */ + public void setQtyScrap (BigDecimal QtyScrap) + { + set_Value (COLUMNNAME_QtyScrap, QtyScrap); + } + + /** Get QtyScrap. + @return QtyScrap */ + public BigDecimal getQtyScrap () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyScrap); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QueuingTime. + @param QueuingTime QueuingTime */ + public void setQueuingTime (int QueuingTime) + { + set_Value (COLUMNNAME_QueuingTime, Integer.valueOf(QueuingTime)); + } + + /** Get QueuingTime. + @return QueuingTime */ + public int getQueuingTime () + { + Integer ii = (Integer)get_Value(COLUMNNAME_QueuingTime); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_S_Resource getS_Resource() throws Exception { - Class clazz = MTable.getClass(I_R_MailText.Table_Name); - I_R_MailText result = null; + Class clazz = MTable.getClass(I_S_Resource.Table_Name); + I_S_Resource result = null; try { Constructor constructor = null; constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_R_MailText)constructor.newInstance(new Object[] {getCtx(), new Integer(getR_MailText_ID()), get_TrxName()}); + result = (I_S_Resource)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_Resource_ID()), get_TrxName()}); } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); @@ -1006,24 +1357,78 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return result; } - /** Set Mail Template. - @param R_MailText_ID - Text templates for mailings + /** Set Resource. + @param S_Resource_ID + Resource */ - public void setR_MailText_ID (int R_MailText_ID) + public void setS_Resource_ID (int S_Resource_ID) { - if (R_MailText_ID < 1) - set_Value (COLUMNNAME_R_MailText_ID, null); + if (S_Resource_ID < 1) + set_Value (COLUMNNAME_S_Resource_ID, null); else - set_Value (COLUMNNAME_R_MailText_ID, Integer.valueOf(R_MailText_ID)); + set_Value (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); } - /** Get Mail Template. - @return Text templates for mailings + /** Get Resource. + @return Resource */ - public int getR_MailText_ID () + public int getS_Resource_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_R_MailText_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Setup Time. + @param SetupTime + Setup time before starting Production + */ + public void setSetupTime (int SetupTime) + { + set_Value (COLUMNNAME_SetupTime, Integer.valueOf(SetupTime)); + } + + /** Get Setup Time. + @return Setup time before starting Production + */ + public int getSetupTime () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SetupTime); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set SetupTimeReal. + @param SetupTimeReal SetupTimeReal */ + public void setSetupTimeReal (int SetupTimeReal) + { + set_Value (COLUMNNAME_SetupTimeReal, Integer.valueOf(SetupTimeReal)); + } + + /** Get SetupTimeReal. + @return SetupTimeReal */ + public int getSetupTimeReal () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SetupTimeReal); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set SetupTimeRequiered. + @param SetupTimeRequiered SetupTimeRequiered */ + public void setSetupTimeRequiered (int SetupTimeRequiered) + { + set_Value (COLUMNNAME_SetupTimeRequiered, Integer.valueOf(SetupTimeRequiered)); + } + + /** Get SetupTimeRequiered. + @return SetupTimeRequiered */ + public int getSetupTimeRequiered () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SetupTimeRequiered); if (ii == null) return 0; return ii.intValue(); @@ -1119,6 +1524,57 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return (String)get_Value(COLUMNNAME_SubflowExecution); } + /** Set UnitsCycles. + @param UnitsCycles UnitsCycles */ + public void setUnitsCycles (int UnitsCycles) + { + set_Value (COLUMNNAME_UnitsCycles, Integer.valueOf(UnitsCycles)); + } + + /** Get UnitsCycles. + @return UnitsCycles */ + public int getUnitsCycles () + { + Integer ii = (Integer)get_Value(COLUMNNAME_UnitsCycles); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } + /** Set Search Key. @param Value Search key for the record in the format required - must be unique @@ -1144,26 +1600,6 @@ public class X_AD_WF_Node extends PO implements I_AD_WF_Node, I_Persistent return (String)get_Value(COLUMNNAME_Value); } - /** Set Wait Time. - @param WaitTime - Time in minutes to wait (sleep) - */ - public void setWaitTime (int WaitTime) - { - set_Value (COLUMNNAME_WaitTime, Integer.valueOf(WaitTime)); - } - - /** Get Wait Time. - @return Time in minutes to wait (sleep) - */ - public int getWaitTime () - { - Integer ii = (Integer)get_Value(COLUMNNAME_WaitTime); - if (ii == null) - return 0; - return ii.intValue(); - } - /** Set Waiting Time. @param WaitingTime Workflow Simulation Waiting time diff --git a/base/src/org/eevolution/model/X_PP_Order_NodeNext.java b/base/src/org/eevolution/model/X_PP_Order_NodeNext.java new file mode 100644 index 0000000000..d95d544833 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Order_NodeNext.java @@ -0,0 +1,372 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for PP_Order_NodeNext + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_NodeNext extends PO implements I_PP_Order_NodeNext, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Order_NodeNext (Properties ctx, int PP_Order_NodeNext_ID, String trxName) + { + super (ctx, PP_Order_NodeNext_ID, trxName); + /** if (PP_Order_NodeNext_ID == 0) + { + setAD_WF_Node_ID (0); + setEntityType (null); +// U + setPP_Order_ID (0); + setPP_Order_Node_ID (0); + setSeqNo (0); +// 10 + } */ + } + + /** Load Constructor */ + public X_PP_Order_NodeNext (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Order_NodeNext[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** AD_WF_Next_ID AD_Reference_ID=109 */ + public static final int AD_WF_NEXT_ID_AD_Reference_ID=109; + /** Set Next Node. + @param AD_WF_Next_ID + Next Node in workflow + */ + public void setAD_WF_Next_ID (int AD_WF_Next_ID) + { + if (AD_WF_Next_ID < 1) + set_Value (COLUMNNAME_AD_WF_Next_ID, null); + else + set_Value (COLUMNNAME_AD_WF_Next_ID, Integer.valueOf(AD_WF_Next_ID)); + } + + /** Get Next Node. + @return Next Node in workflow + */ + public int getAD_WF_Next_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_WF_Next_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_AD_WF_Node getAD_WF_Node() throws Exception + { + Class clazz = MTable.getClass(I_AD_WF_Node.Table_Name); + I_AD_WF_Node result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_WF_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_WF_Node_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Node. + @param AD_WF_Node_ID + Workflow Node (activity), step or process + */ + public void setAD_WF_Node_ID (int AD_WF_Node_ID) + { + if (AD_WF_Node_ID < 1) + throw new IllegalArgumentException ("AD_WF_Node_ID is mandatory."); + set_Value (COLUMNNAME_AD_WF_Node_ID, Integer.valueOf(AD_WF_Node_ID)); + } + + /** Get Node. + @return Workflow Node (activity), step or process + */ + public int getAD_WF_Node_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_WF_Node_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** EntityType AD_Reference_ID=389 */ + public static final int ENTITYTYPE_AD_Reference_ID=389; + /** Set Entity Type. + @param EntityType + Dictionary Entity Type; Determines ownership and synchronization + */ + public void setEntityType (String EntityType) + { + + if (EntityType.length() > 40) + { + log.warning("Length > 40 - truncated"); + EntityType = EntityType.substring(0, 40); + } + set_Value (COLUMNNAME_EntityType, EntityType); + } + + /** Get Entity Type. + @return Dictionary Entity Type; Determines ownership and synchronization + */ + public String getEntityType () + { + return (String)get_Value(COLUMNNAME_EntityType); + } + + /** Set Std User Workflow. + @param IsStdUserWorkflow + Standard Manual User Approval Workflow + */ + public void setIsStdUserWorkflow (boolean IsStdUserWorkflow) + { + set_Value (COLUMNNAME_IsStdUserWorkflow, Boolean.valueOf(IsStdUserWorkflow)); + } + + /** Get Std User Workflow. + @return Standard Manual User Approval Workflow + */ + public boolean isStdUserWorkflow () + { + Object oo = get_Value(COLUMNNAME_IsStdUserWorkflow); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** PP_Order_Next_ID AD_Reference_ID=53232 */ + public static final int PP_ORDER_NEXT_ID_AD_Reference_ID=53232; + /** Set PP_Order_Next_ID. + @param PP_Order_Next_ID PP_Order_Next_ID */ + public void setPP_Order_Next_ID (int PP_Order_Next_ID) + { + if (PP_Order_Next_ID < 1) + set_Value (COLUMNNAME_PP_Order_Next_ID, null); + else + set_Value (COLUMNNAME_PP_Order_Next_ID, Integer.valueOf(PP_Order_Next_ID)); + } + + /** Get PP_Order_Next_ID. + @return PP_Order_Next_ID */ + public int getPP_Order_Next_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Next_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set PP_Order_NodeNext_ID. + @param PP_Order_NodeNext_ID PP_Order_NodeNext_ID */ + public void setPP_Order_NodeNext_ID (int PP_Order_NodeNext_ID) + { + if (PP_Order_NodeNext_ID < 1) + set_ValueNoCheck (COLUMNNAME_PP_Order_NodeNext_ID, null); + else + set_ValueNoCheck (COLUMNNAME_PP_Order_NodeNext_ID, Integer.valueOf(PP_Order_NodeNext_ID)); + } + + /** Get PP_Order_NodeNext_ID. + @return PP_Order_NodeNext_ID */ + public int getPP_Order_NodeNext_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_NodeNext_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Node.Table_Name); + org.eevolution.model.I_PP_Order_Node result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Node_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Node_ID. + @param PP_Order_Node_ID PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID) + { + if (PP_Order_Node_ID < 1) + throw new IllegalArgumentException ("PP_Order_Node_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Node_ID, Integer.valueOf(PP_Order_Node_ID)); + } + + /** Get PP_Order_Node_ID. + @return PP_Order_Node_ID */ + public int getPP_Order_Node_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** SeqNo AD_Reference_ID=110 */ + public static final int SEQNO_AD_Reference_ID=110; + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first + */ + public void setSeqNo (int SeqNo) + { + set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); + } + + /** Get Sequence. + @return Method of ordering records; lowest number comes first + */ + public int getSeqNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Transition Code. + @param TransitionCode + Code resulting in TRUE of FALSE + */ + public void setTransitionCode (String TransitionCode) + { + + if (TransitionCode != null && TransitionCode.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + TransitionCode = TransitionCode.substring(0, 2000); + } + set_Value (COLUMNNAME_TransitionCode, TransitionCode); + } + + /** Get Transition Code. + @return Code resulting in TRUE of FALSE + */ + public String getTransitionCode () + { + return (String)get_Value(COLUMNNAME_TransitionCode); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Order_Node_Asset.java b/base/src/org/eevolution/model/X_PP_Order_Node_Asset.java new file mode 100644 index 0000000000..1273b9e2e7 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Order_Node_Asset.java @@ -0,0 +1,240 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for PP_Order_Node_Asset + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_Node_Asset extends PO implements I_PP_Order_Node_Asset, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Order_Node_Asset (Properties ctx, int PP_Order_Node_Asset_ID, String trxName) + { + super (ctx, PP_Order_Node_Asset_ID, trxName); + /** if (PP_Order_Node_Asset_ID == 0) + { + setA_Asset_ID (0); + setPP_Order_ID (0); + setPP_Order_Node_Asset_ID (0); + setPP_Order_Node_ID (0); + setPP_Order_Workflow_ID (0); + } */ + } + + /** Load Constructor */ + public X_PP_Order_Node_Asset (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Order_Node_Asset[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_A_Asset getA_Asset() throws Exception + { + Class clazz = MTable.getClass(I_A_Asset.Table_Name); + I_A_Asset result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_A_Asset)constructor.newInstance(new Object[] {getCtx(), new Integer(getA_Asset_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Asset. + @param A_Asset_ID + Asset used internally or by customers + */ + public void setA_Asset_ID (int A_Asset_ID) + { + if (A_Asset_ID < 1) + throw new IllegalArgumentException ("A_Asset_ID is mandatory."); + set_Value (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID)); + } + + /** Get Asset. + @return Asset used internally or by customers + */ + public int getA_Asset_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set PP_Order_Node_Asset_ID. + @param PP_Order_Node_Asset_ID PP_Order_Node_Asset_ID */ + public void setPP_Order_Node_Asset_ID (int PP_Order_Node_Asset_ID) + { + if (PP_Order_Node_Asset_ID < 1) + throw new IllegalArgumentException ("PP_Order_Node_Asset_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Node_Asset_ID, Integer.valueOf(PP_Order_Node_Asset_ID)); + } + + /** Get PP_Order_Node_Asset_ID. + @return PP_Order_Node_Asset_ID */ + public int getPP_Order_Node_Asset_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_Asset_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Node.Table_Name); + org.eevolution.model.I_PP_Order_Node result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Node_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Node_ID. + @param PP_Order_Node_ID PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID) + { + if (PP_Order_Node_ID < 1) + throw new IllegalArgumentException ("PP_Order_Node_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Node_ID, Integer.valueOf(PP_Order_Node_ID)); + } + + /** Get PP_Order_Node_ID. + @return PP_Order_Node_ID */ + public int getPP_Order_Node_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Workflow.Table_Name); + org.eevolution.model.I_PP_Order_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Workflow_ID. + @param PP_Order_Workflow_ID PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID) + { + if (PP_Order_Workflow_ID < 1) + throw new IllegalArgumentException ("PP_Order_Workflow_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Workflow_ID, Integer.valueOf(PP_Order_Workflow_ID)); + } + + /** Get PP_Order_Workflow_ID. + @return PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Order_Node_Product.java b/base/src/org/eevolution/model/X_PP_Order_Node_Product.java new file mode 100644 index 0000000000..e6fdddf648 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Order_Node_Product.java @@ -0,0 +1,257 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for PP_Order_Node_Product + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Product, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Order_Node_Product (Properties ctx, int PP_Order_Node_Product_ID, String trxName) + { + super (ctx, PP_Order_Node_Product_ID, trxName); + /** if (PP_Order_Node_Product_ID == 0) + { + setM_Product_ID (0); + setPP_Order_ID (0); + setPP_Order_Node_ID (0); + setPP_Order_Node_Product_ID (0); + setPP_Order_Workflow_ID (0); + } */ + } + + /** Load Constructor */ + public X_PP_Order_Node_Product (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Order_Node_Product[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Node.Table_Name); + org.eevolution.model.I_PP_Order_Node result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Node_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Node_ID. + @param PP_Order_Node_ID PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID) + { + if (PP_Order_Node_ID < 1) + throw new IllegalArgumentException ("PP_Order_Node_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Node_ID, Integer.valueOf(PP_Order_Node_ID)); + } + + /** Get PP_Order_Node_ID. + @return PP_Order_Node_ID */ + public int getPP_Order_Node_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set PP_Order_Node_Product_ID. + @param PP_Order_Node_Product_ID PP_Order_Node_Product_ID */ + public void setPP_Order_Node_Product_ID (int PP_Order_Node_Product_ID) + { + if (PP_Order_Node_Product_ID < 1) + throw new IllegalArgumentException ("PP_Order_Node_Product_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Node_Product_ID, Integer.valueOf(PP_Order_Node_Product_ID)); + } + + /** Get PP_Order_Node_Product_ID. + @return PP_Order_Node_Product_ID */ + public int getPP_Order_Node_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Workflow.Table_Name); + org.eevolution.model.I_PP_Order_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Workflow_ID. + @param PP_Order_Workflow_ID PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID) + { + if (PP_Order_Workflow_ID < 1) + throw new IllegalArgumentException ("PP_Order_Workflow_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Workflow_ID, Integer.valueOf(PP_Order_Workflow_ID)); + } + + /** Get PP_Order_Workflow_ID. + @return PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Yield. + @param Yield Yield */ + public void setYield (int Yield) + { + set_Value (COLUMNNAME_Yield, Integer.valueOf(Yield)); + } + + /** Get Yield. + @return Yield */ + public int getYield () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Yield); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_AD_Workflow.java b/base/src/org/eevolution/model/X_PP_Order_Workflow.java similarity index 64% rename from base/src/org/compiere/model/X_AD_Workflow.java rename to base/src/org/eevolution/model/X_PP_Order_Workflow.java index e1e06a35aa..c363ea2d24 100644 --- a/base/src/org/compiere/model/X_AD_Workflow.java +++ b/base/src/org/eevolution/model/X_PP_Order_Workflow.java @@ -15,19 +15,22 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.lang.reflect.Constructor; +import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Properties; import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; import org.compiere.util.KeyNamePair; -/** Generated Model for AD_Workflow +/** Generated Model for PP_Order_Workflow * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Order_Workflow extends PO implements I_PP_Order_Workflow, I_Persistent { /** @@ -36,40 +39,42 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_AD_Workflow (Properties ctx, int AD_Workflow_ID, String trxName) + public X_PP_Order_Workflow (Properties ctx, int PP_Order_Workflow_ID, String trxName) { - super (ctx, AD_Workflow_ID, trxName); - /** if (AD_Workflow_ID == 0) + super (ctx, PP_Order_Workflow_ID, trxName); + /** if (PP_Order_Workflow_ID == 0) { setAD_Workflow_ID (0); setAccessLevel (null); setAuthor (null); setCost (0); setDuration (0); +// 0 + setDurationUnit (null); +// h setEntityType (null); // U - setIsDefault (false); - setIsValid (false); + setLimit (0); setName (null); + setPP_Order_ID (0); + setPP_Order_Workflow_ID (0); + setPriority (0); setPublishStatus (null); // U - setValue (null); + setValidateWorkflow (null); setVersion (0); setWaitingTime (0); - setWorkflowType (null); -// G - setWorkingTime (0); } */ } /** Load Constructor */ - public X_AD_Workflow (Properties ctx, ResultSet rs, String trxName) + public X_PP_Order_Workflow (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } /** AccessLevel - * @return 6 - System - Client + * @return 3 - Client - Org */ protected int get_AccessLevel() { @@ -85,7 +90,7 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_AD_Workflow[") + StringBuffer sb = new StringBuffer ("X_PP_Order_Workflow[") .append(get_ID()).append("]"); return sb.toString(); } @@ -246,6 +251,22 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent return ii.intValue(); } + public I_AD_Workflow getAD_Workflow() throws Exception + { + Class clazz = MTable.getClass(I_AD_Workflow.Table_Name); + I_AD_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + /** Set Workflow. @param AD_Workflow_ID Workflow or combination of tasks @@ -254,7 +275,7 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent { if (AD_Workflow_ID < 1) throw new IllegalArgumentException ("AD_Workflow_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); + set_Value (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); } /** Get Workflow. @@ -374,27 +395,27 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent return (String)get_Value(COLUMNNAME_Description); } - /** Set Document Value Logic. - @param DocValueLogic - Logic to determine Workflow Start - If true, a workflow process is started for the document + /** Set Document No. + @param DocumentNo + Document sequence number of the document */ - public void setDocValueLogic (String DocValueLogic) + public void setDocumentNo (String DocumentNo) { - if (DocValueLogic != null && DocValueLogic.length() > 2000) + if (DocumentNo != null && DocumentNo.length() > 32) { - log.warning("Length > 2000 - truncated"); - DocValueLogic = DocValueLogic.substring(0, 2000); + log.warning("Length > 32 - truncated"); + DocumentNo = DocumentNo.substring(0, 32); } - set_Value (COLUMNNAME_DocValueLogic, DocValueLogic); + set_Value (COLUMNNAME_DocumentNo, DocumentNo); } - /** Get Document Value Logic. - @return Logic to determine Workflow Start - If true, a workflow process is started for the document + /** Get Document No. + @return Document sequence number of the document */ - public String getDocValueLogic () + public String getDocumentNo () { - return (String)get_Value(COLUMNNAME_DocValueLogic); + return (String)get_Value(COLUMNNAME_DocumentNo); } /** Set Duration. @@ -437,9 +458,9 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent */ public void setDurationUnit (String DurationUnit) { - - if (DurationUnit == null || DurationUnit.equals("Y") || DurationUnit.equals("M") || DurationUnit.equals("D") || DurationUnit.equals("h") || DurationUnit.equals("m") || DurationUnit.equals("s")); else throw new IllegalArgumentException ("DurationUnit Invalid value - " + DurationUnit + " - Reference_ID=299 - Y - M - D - h - m - s"); - if (DurationUnit != null && DurationUnit.length() > 1) + if (DurationUnit == null) throw new IllegalArgumentException ("DurationUnit is mandatory"); + if (DurationUnit.equals("Y") || DurationUnit.equals("M") || DurationUnit.equals("D") || DurationUnit.equals("h") || DurationUnit.equals("m") || DurationUnit.equals("s")); else throw new IllegalArgumentException ("DurationUnit Invalid value - " + DurationUnit + " - Reference_ID=299 - Y - M - D - h - m - s"); + if (DurationUnit.length() > 1) { log.warning("Length > 1 - truncated"); DurationUnit = DurationUnit.substring(0, 1); @@ -527,30 +548,6 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent 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 Duration Limit. @param Limit Maximum Duration in Duration Unit @@ -571,6 +568,23 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent return ii.intValue(); } + /** Set MovingTime. + @param MovingTime MovingTime */ + public void setMovingTime (int MovingTime) + { + set_Value (COLUMNNAME_MovingTime, Integer.valueOf(MovingTime)); + } + + /** Get MovingTime. + @return MovingTime */ + public int getMovingTime () + { + Integer ii = (Integer)get_Value(COLUMNNAME_MovingTime); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Name. @param Name Alphanumeric identifier of the entity @@ -604,6 +618,96 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent return new KeyNamePair(get_ID(), getName()); } + public org.eevolution.model.I_PP_Order getPP_Order() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name); + org.eevolution.model.I_PP_Order result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_ID. + @param PP_Order_ID PP_Order_ID */ + public void setPP_Order_ID (int PP_Order_ID) + { + if (PP_Order_ID < 1) + throw new IllegalArgumentException ("PP_Order_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID)); + } + + /** Get PP_Order_ID. + @return PP_Order_ID */ + public int getPP_Order_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Node.Table_Name); + org.eevolution.model.I_PP_Order_Node result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Order_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Order_Node_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Order_Node_ID. + @param PP_Order_Node_ID PP_Order_Node_ID */ + public void setPP_Order_Node_ID (int PP_Order_Node_ID) + { + if (PP_Order_Node_ID < 1) + set_Value (COLUMNNAME_PP_Order_Node_ID, null); + else + set_Value (COLUMNNAME_PP_Order_Node_ID, Integer.valueOf(PP_Order_Node_ID)); + } + + /** Get PP_Order_Node_ID. + @return PP_Order_Node_ID */ + public int getPP_Order_Node_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set PP_Order_Workflow_ID. + @param PP_Order_Workflow_ID PP_Order_Workflow_ID */ + public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID) + { + if (PP_Order_Workflow_ID < 1) + throw new IllegalArgumentException ("PP_Order_Workflow_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Order_Workflow_ID, Integer.valueOf(PP_Order_Workflow_ID)); + } + + /** Get PP_Order_Workflow_ID. + @return PP_Order_Workflow_ID */ + public int getPP_Order_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Priority. @param Priority Indicates if this request is of a high, medium or low priority. @@ -624,6 +728,41 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent return ii.intValue(); } + /** ProcessType AD_Reference_ID=53224 */ + public static final int PROCESSTYPE_AD_Reference_ID=53224; + /** Batch Flow = BF */ + public static final String PROCESSTYPE_BatchFlow = "BF"; + /** Continuous Flow = CF */ + public static final String PROCESSTYPE_ContinuousFlow = "CF"; + /** Dedicate Repetititive Flow = DR */ + public static final String PROCESSTYPE_DedicateRepetititiveFlow = "DR"; + /** Job Shop = JS */ + public static final String PROCESSTYPE_JobShop = "JS"; + /** Mixed Repetitive Flow = MR */ + public static final String PROCESSTYPE_MixedRepetitiveFlow = "MR"; + /** Plant = PL */ + public static final String PROCESSTYPE_Plant = "PL"; + /** Set ProcessType. + @param ProcessType ProcessType */ + public void setProcessType (String ProcessType) + { + + if (ProcessType == null || ProcessType.equals("BF") || ProcessType.equals("CF") || ProcessType.equals("DR") || ProcessType.equals("JS") || ProcessType.equals("MR") || ProcessType.equals("PL")); else throw new IllegalArgumentException ("ProcessType Invalid value - " + ProcessType + " - Reference_ID=53224 - BF - CF - DR - JS - MR - PL"); + if (ProcessType != null && ProcessType.length() > 2) + { + log.warning("Length > 2 - truncated"); + ProcessType = ProcessType.substring(0, 2); + } + set_Value (COLUMNNAME_ProcessType, ProcessType); + } + + /** Get ProcessType. + @return ProcessType */ + public String getProcessType () + { + return (String)get_Value(COLUMNNAME_ProcessType); + } + /** PublishStatus AD_Reference_ID=310 */ public static final int PUBLISHSTATUS_AD_Reference_ID=310; /** Released = R */ @@ -658,6 +797,99 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent return (String)get_Value(COLUMNNAME_PublishStatus); } + /** Set QtyBatchSize. + @param QtyBatchSize QtyBatchSize */ + public void setQtyBatchSize (BigDecimal QtyBatchSize) + { + set_Value (COLUMNNAME_QtyBatchSize, QtyBatchSize); + } + + /** Get QtyBatchSize. + @return QtyBatchSize */ + public BigDecimal getQtyBatchSize () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBatchSize); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QueuingTime. + @param QueuingTime QueuingTime */ + public void setQueuingTime (int QueuingTime) + { + set_Value (COLUMNNAME_QueuingTime, Integer.valueOf(QueuingTime)); + } + + /** Get QueuingTime. + @return QueuingTime */ + public int getQueuingTime () + { + Integer ii = (Integer)get_Value(COLUMNNAME_QueuingTime); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_S_Resource getS_Resource() throws Exception + { + Class clazz = MTable.getClass(I_S_Resource.Table_Name); + I_S_Resource result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_S_Resource)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_Resource_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Resource. + @param S_Resource_ID + Resource + */ + public void setS_Resource_ID (int S_Resource_ID) + { + if (S_Resource_ID < 1) + set_Value (COLUMNNAME_S_Resource_ID, null); + else + set_Value (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); + } + + /** Get Resource. + @return Resource + */ + public int getS_Resource_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Setup Time. + @param SetupTime + Setup time before starting Production + */ + public void setSetupTime (int SetupTime) + { + set_Value (COLUMNNAME_SetupTime, Integer.valueOf(SetupTime)); + } + + /** Get Setup Time. + @return Setup time before starting Production + */ + public int getSetupTime () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SetupTime); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Valid from. @param ValidFrom Valid from including this date (first day) @@ -696,8 +928,10 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent @param ValidateWorkflow Validate Workflow */ public void setValidateWorkflow (String ValidateWorkflow) { + if (ValidateWorkflow == null) + throw new IllegalArgumentException ("ValidateWorkflow is mandatory."); - if (ValidateWorkflow != null && ValidateWorkflow.length() > 1) + if (ValidateWorkflow.length() > 1) { log.warning("Length > 1 - truncated"); ValidateWorkflow = ValidateWorkflow.substring(0, 1); @@ -718,13 +952,11 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent */ public void setValue (String Value) { - if (Value == null) - throw new IllegalArgumentException ("Value is mandatory."); - if (Value.length() > 40) + if (Value != null && Value.length() > 240) { - log.warning("Length > 40 - truncated"); - Value = Value.substring(0, 40); + log.warning("Length > 240 - truncated"); + Value = Value.substring(0, 240); } set_Value (COLUMNNAME_Value, Value); } @@ -777,23 +1009,25 @@ public class X_AD_Workflow extends PO implements I_AD_Workflow, I_Persistent return ii.intValue(); } - /** WorkflowType AD_Reference_ID=328 */ - public static final int WORKFLOWTYPE_AD_Reference_ID=328; - /** General = G */ - public static final String WORKFLOWTYPE_General = "G"; - /** Document Process = P */ - public static final String WORKFLOWTYPE_DocumentProcess = "P"; - /** Document Value = V */ - public static final String WORKFLOWTYPE_DocumentValue = "V"; + /** WorkflowType AD_Reference_ID=108 */ + public static final int WORKFLOWTYPE_AD_Reference_ID=108; + /** Single Record = S */ + public static final String WORKFLOWTYPE_SingleRecord = "S"; + /** Maintain = M */ + public static final String WORKFLOWTYPE_Maintain = "M"; + /** Transaction = T */ + public static final String WORKFLOWTYPE_Transaction = "T"; + /** Query Only = Q */ + public static final String WORKFLOWTYPE_QueryOnly = "Q"; /** Set Workflow Type. @param WorkflowType Type of Worflow */ public void setWorkflowType (String WorkflowType) { - if (WorkflowType == null) throw new IllegalArgumentException ("WorkflowType is mandatory"); - if (WorkflowType.equals("G") || WorkflowType.equals("P") || WorkflowType.equals("V")); else throw new IllegalArgumentException ("WorkflowType Invalid value - " + WorkflowType + " - Reference_ID=328 - G - P - V"); - if (WorkflowType.length() > 1) + + if (WorkflowType == null || WorkflowType.equals("S") || WorkflowType.equals("M") || WorkflowType.equals("T") || WorkflowType.equals("Q")); else throw new IllegalArgumentException ("WorkflowType Invalid value - " + WorkflowType + " - Reference_ID=108 - S - M - T - Q"); + if (WorkflowType != null && WorkflowType.length() > 1) { log.warning("Length > 1 - truncated"); WorkflowType = WorkflowType.substring(0, 1); diff --git a/base/src/org/compiere/model/X_M_BOM.java b/base/src/org/eevolution/model/X_PP_Product_BOM.java similarity index 56% rename from base/src/org/compiere/model/X_M_BOM.java rename to base/src/org/eevolution/model/X_PP_Product_BOM.java index 087ce21bf5..932813f06d 100644 --- a/base/src/org/compiere/model/X_M_BOM.java +++ b/base/src/org/eevolution/model/X_PP_Product_BOM.java @@ -15,18 +15,20 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.lang.reflect.Constructor; import java.sql.ResultSet; +import java.sql.Timestamp; import java.util.Properties; import java.util.logging.Level; +import org.compiere.model.*; import org.compiere.util.KeyNamePair; -/** Generated Model for M_BOM +/** Generated Model for PP_Product_BOM * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_BOM extends PO implements I_M_BOM, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Product_BOM extends PO implements I_PP_Product_BOM, I_Persistent { /** @@ -35,23 +37,22 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_M_BOM (Properties ctx, int M_BOM_ID, String trxName) + public X_PP_Product_BOM (Properties ctx, int PP_Product_BOM_ID, String trxName) { - super (ctx, M_BOM_ID, trxName); - /** if (M_BOM_ID == 0) + super (ctx, PP_Product_BOM_ID, trxName); + /** if (PP_Product_BOM_ID == 0) { - setBOMType (null); -// A - setBOMUse (null); -// A - setM_BOM_ID (0); setM_Product_ID (0); setName (null); + setPP_Product_BOM_ID (0); + setValidFrom (new Timestamp(System.currentTimeMillis())); +// @#Date@ + setValue (null); } */ } /** Load Constructor */ - public X_M_BOM (Properties ctx, ResultSet rs, String trxName) + public X_PP_Product_BOM (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } @@ -73,7 +74,7 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent public String toString() { - StringBuffer sb = new StringBuffer ("X_M_BOM[") + StringBuffer sb = new StringBuffer ("X_PP_Product_BOM[") .append(get_ID()).append("]"); return sb.toString(); } @@ -94,15 +95,17 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent public static final String BOMTYPE_Maintenance = "M"; /** Repair = R */ public static final String BOMTYPE_Repair = "R"; + /** Product Configure = C */ + public static final String BOMTYPE_ProductConfigure = "C"; /** Set BOM Type. @param BOMType Type of BOM */ public void setBOMType (String BOMType) { - if (BOMType == null) throw new IllegalArgumentException ("BOMType is mandatory"); - if (BOMType.equals("A") || BOMType.equals("O") || BOMType.equals("P") || BOMType.equals("S") || BOMType.equals("F") || BOMType.equals("M") || BOMType.equals("R")); else throw new IllegalArgumentException ("BOMType Invalid value - " + BOMType + " - Reference_ID=347 - A - O - P - S - F - M - R"); - if (BOMType.length() > 1) + + if (BOMType == null || BOMType.equals("A") || BOMType.equals("O") || BOMType.equals("P") || BOMType.equals("S") || BOMType.equals("F") || BOMType.equals("M") || BOMType.equals("R") || BOMType.equals("C")); else throw new IllegalArgumentException ("BOMType Invalid value - " + BOMType + " - Reference_ID=347 - A - O - P - S - F - M - R - C"); + if (BOMType != null && BOMType.length() > 1) { log.warning("Length > 1 - truncated"); BOMType = BOMType.substring(0, 1); @@ -128,15 +131,17 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent public static final String BOMUSE_Manufacturing = "M"; /** Planning = P */ public static final String BOMUSE_Planning = "P"; + /** Quality = Q */ + public static final String BOMUSE_Quality = "Q"; /** Set BOM Use. @param BOMUse The use of the Bill of Material */ public void setBOMUse (String BOMUse) { - if (BOMUse == null) throw new IllegalArgumentException ("BOMUse is mandatory"); - if (BOMUse.equals("A") || BOMUse.equals("E") || BOMUse.equals("M") || BOMUse.equals("P")); else throw new IllegalArgumentException ("BOMUse Invalid value - " + BOMUse + " - Reference_ID=348 - A - E - M - P"); - if (BOMUse.length() > 1) + + if (BOMUse == null || BOMUse.equals("A") || BOMUse.equals("E") || BOMUse.equals("M") || BOMUse.equals("P") || BOMUse.equals("Q")); else throw new IllegalArgumentException ("BOMUse Invalid value - " + BOMUse + " - Reference_ID=348 - A - E - M - P - Q"); + if (BOMUse != null && BOMUse.length() > 1) { log.warning("Length > 1 - truncated"); BOMUse = BOMUse.substring(0, 1); @@ -152,6 +157,68 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent return (String)get_Value(COLUMNNAME_BOMUse); } + public I_C_UOM getC_UOM() throws Exception + { + Class clazz = MTable.getClass(I_C_UOM.Table_Name); + I_C_UOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set UOM. + @param C_UOM_ID + Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID) + { + if (C_UOM_ID < 1) + set_Value (COLUMNNAME_C_UOM_ID, null); + else + set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); + } + + /** Get UOM. + @return Unit of Measure + */ + public int getC_UOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Copy From. + @param CopyFrom + Copy From Record + */ + public void setCopyFrom (String CopyFrom) + { + + if (CopyFrom != null && CopyFrom.length() > 1) + { + log.warning("Length > 1 - truncated"); + CopyFrom = CopyFrom.substring(0, 1); + } + set_Value (COLUMNNAME_CopyFrom, CopyFrom); + } + + /** Get Copy From. + @return Copy From Record + */ + public String getCopyFrom () + { + return (String)get_Value(COLUMNNAME_CopyFrom); + } + /** Set Description. @param Description Optional short description of the record @@ -175,6 +242,29 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent return (String)get_Value(COLUMNNAME_Description); } + /** Set Document No. + @param DocumentNo + Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo) + { + + if (DocumentNo != null && DocumentNo.length() > 22) + { + log.warning("Length > 22 - truncated"); + DocumentNo = DocumentNo.substring(0, 22); + } + set_Value (COLUMNNAME_DocumentNo, DocumentNo); + } + + /** Get Document No. + @return Document sequence number of the document + */ + public String getDocumentNo () + { + return (String)get_Value(COLUMNNAME_DocumentNo); + } + /** Set Comment/Help. @param Help Comment or Hint @@ -198,23 +288,24 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent return (String)get_Value(COLUMNNAME_Help); } - /** Set BOM. - @param M_BOM_ID - Bill of Material + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance */ - public void setM_BOM_ID (int M_BOM_ID) + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) { - if (M_BOM_ID < 1) - throw new IllegalArgumentException ("M_BOM_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_BOM_ID, Integer.valueOf(M_BOM_ID)); + if (M_AttributeSetInstance_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); } - /** Get BOM. - @return Bill of Material + /** Get Attribute Set Instance. + @return Product Attribute Set Instance */ - public int getM_BOM_ID () + public int getM_AttributeSetInstance_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_M_BOM_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); if (ii == null) return 0; return ii.intValue(); @@ -283,7 +374,7 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent { if (M_Product_ID < 1) throw new IllegalArgumentException ("M_Product_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Product. @@ -322,13 +413,27 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent return (String)get_Value(COLUMNNAME_Name); } - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } + /** Set BOM & Formula. + @param PP_Product_BOM_ID + BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) + { + if (PP_Product_BOM_ID < 1) + throw new IllegalArgumentException ("PP_Product_BOM_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID)); + } + + /** Get BOM & Formula. + @return BOM & Formula + */ + public int getPP_Product_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } /** Set Process Now. @param Processing Process Now */ @@ -350,4 +455,93 @@ public class X_M_BOM extends PO implements I_M_BOM, I_Persistent } return false; } + + /** Set Revision. + @param Revision Revision */ + public void setRevision (String Revision) + { + + if (Revision != null && Revision.length() > 10) + { + log.warning("Length > 10 - truncated"); + Revision = Revision.substring(0, 10); + } + set_Value (COLUMNNAME_Revision, Revision); + } + + /** Get Revision. + @return Revision */ + public String getRevision () + { + return (String)get_Value(COLUMNNAME_Revision); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + if (ValidFrom == null) + throw new IllegalArgumentException ("ValidFrom is mandatory."); + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + if (Value == null) + throw new IllegalArgumentException ("Value is mandatory."); + + if (Value.length() > 80) + { + log.warning("Length > 80 - truncated"); + Value = Value.substring(0, 80); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getValue()); + } } \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Product_BOMLine.java b/base/src/org/eevolution/model/X_PP_Product_BOMLine.java new file mode 100644 index 0000000000..90ce2b85d3 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Product_BOMLine.java @@ -0,0 +1,672 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; + +/** Generated Model for PP_Product_BOMLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Product_BOMLine extends PO implements I_PP_Product_BOMLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Product_BOMLine (Properties ctx, int PP_Product_BOMLine_ID, String trxName) + { + super (ctx, PP_Product_BOMLine_ID, trxName); + /** if (PP_Product_BOMLine_ID == 0) + { + setIssueMethod (null); +// 1 + setLine (0); +// @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM PP_Product_BOMLine WHERE PP_Product_BOM_ID=@PP_Product_BOM_ID@ + setM_Product_ID (0); + setPP_Product_BOMLine_ID (0); + setPP_Product_BOM_ID (0); + setValidFrom (new Timestamp(System.currentTimeMillis())); +// @#Date@ + } */ + } + + /** Load Constructor */ + public X_PP_Product_BOMLine (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Product_BOMLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Quantity Assay. + @param Assay + Indicated the Quantity Assay to use into Quality Order + */ + public void setAssay (BigDecimal Assay) + { + set_Value (COLUMNNAME_Assay, Assay); + } + + /** Get Quantity Assay. + @return Indicated the Quantity Assay to use into Quality Order + */ + public BigDecimal getAssay () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Assay); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Backflush Group. + @param BackflushGroup + The Grouping Components to the Backflush + */ + public void setBackflushGroup (String BackflushGroup) + { + + if (BackflushGroup != null && BackflushGroup.length() > 20) + { + log.warning("Length > 20 - truncated"); + BackflushGroup = BackflushGroup.substring(0, 20); + } + set_Value (COLUMNNAME_BackflushGroup, BackflushGroup); + } + + /** Get Backflush Group. + @return The Grouping Components to the Backflush + */ + public String getBackflushGroup () + { + return (String)get_Value(COLUMNNAME_BackflushGroup); + } + + public I_C_UOM getC_UOM() throws Exception + { + Class clazz = MTable.getClass(I_C_UOM.Table_Name); + I_C_UOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set UOM. + @param C_UOM_ID + Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID) + { + if (C_UOM_ID < 1) + set_Value (COLUMNNAME_C_UOM_ID, null); + else + set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); + } + + /** Get UOM. + @return Unit of Measure + */ + public int getC_UOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** ComponentType AD_Reference_ID=53225 */ + public static final int COMPONENTTYPE_AD_Reference_ID=53225; + /** By Product = BY */ + public static final String COMPONENTTYPE_ByProduct = "BY"; + /** Component = CO */ + public static final String COMPONENTTYPE_Component = "CO"; + /** Phantom = PH */ + public static final String COMPONENTTYPE_Phantom = "PH"; + /** Packing = PK */ + public static final String COMPONENTTYPE_Packing = "PK"; + /** Planning = PL */ + public static final String COMPONENTTYPE_Planning = "PL"; + /** Tools = TL */ + public static final String COMPONENTTYPE_Tools = "TL"; + /** Option = OP */ + public static final String COMPONENTTYPE_Option = "OP"; + /** Variant = VA */ + public static final String COMPONENTTYPE_Variant = "VA"; + /** Set Component Type. + @param ComponentType + Component Type for a Bill of Material or Formula + */ + public void setComponentType (String ComponentType) + { + + if (ComponentType == null || ComponentType.equals("BY") || ComponentType.equals("CO") || ComponentType.equals("PH") || ComponentType.equals("PK") || ComponentType.equals("PL") || ComponentType.equals("TL") || ComponentType.equals("OP") || ComponentType.equals("VA")); else throw new IllegalArgumentException ("ComponentType Invalid value - " + ComponentType + " - Reference_ID=53225 - BY - CO - PH - PK - PL - TL - OP - VA"); + if (ComponentType != null && ComponentType.length() > 2) + { + log.warning("Length > 2 - truncated"); + ComponentType = ComponentType.substring(0, 2); + } + set_Value (COLUMNNAME_ComponentType, ComponentType); + } + + /** Get Component Type. + @return Component Type for a Bill of Material or Formula + */ + public String getComponentType () + { + return (String)get_Value(COLUMNNAME_ComponentType); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Feature. + @param Feature + Indicated the Feature for Product Configure + */ + public void setFeature (String Feature) + { + + if (Feature != null && Feature.length() > 30) + { + log.warning("Length > 30 - truncated"); + Feature = Feature.substring(0, 30); + } + set_Value (COLUMNNAME_Feature, Feature); + } + + /** Get Feature. + @return Indicated the Feature for Product Configure + */ + public String getFeature () + { + return (String)get_Value(COLUMNNAME_Feature); + } + + /** Set Forecast. + @param Forecast + Indicated the % of participation this component into a of the BOM Planning + */ + public void setForecast (BigDecimal Forecast) + { + set_Value (COLUMNNAME_Forecast, Forecast); + } + + /** Get Forecast. + @return Indicated the % of participation this component into a of the BOM Planning + */ + public BigDecimal getForecast () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Forecast); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + + if (Help != null && Help.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + Help = Help.substring(0, 2000); + } + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Is Critical Component. + @param IsCritical + Indicate that a Manufacturing Order can not begin without have this component + */ + public void setIsCritical (boolean IsCritical) + { + set_Value (COLUMNNAME_IsCritical, Boolean.valueOf(IsCritical)); + } + + /** Get Is Critical Component. + @return Indicate that a Manufacturing Order can not begin without have this component + */ + public boolean isCritical () + { + Object oo = get_Value(COLUMNNAME_IsCritical); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Is Qty Percentage. + @param IsQtyPercentage + Indicate that this component is based in % Quantity + */ + public void setIsQtyPercentage (boolean IsQtyPercentage) + { + set_Value (COLUMNNAME_IsQtyPercentage, Boolean.valueOf(IsQtyPercentage)); + } + + /** Get Is Qty Percentage. + @return Indicate that this component is based in % Quantity + */ + public boolean isQtyPercentage () + { + Object oo = get_Value(COLUMNNAME_IsQtyPercentage); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** IssueMethod AD_Reference_ID=53226 */ + public static final int ISSUEMETHOD_AD_Reference_ID=53226; + /** Issue = 0 */ + public static final String ISSUEMETHOD_Issue = "0"; + /** BackFlush = 1 */ + public static final String ISSUEMETHOD_BackFlush = "1"; + /** Set Issue Method. + @param IssueMethod + There are two methods for issue the components to Manufacturing Order + */ + public void setIssueMethod (String IssueMethod) + { + if (IssueMethod == null) throw new IllegalArgumentException ("IssueMethod is mandatory"); + if (IssueMethod.equals("0") || IssueMethod.equals("1")); else throw new IllegalArgumentException ("IssueMethod Invalid value - " + IssueMethod + " - Reference_ID=53226 - 0 - 1"); + if (IssueMethod.length() > 1) + { + log.warning("Length > 1 - truncated"); + IssueMethod = IssueMethod.substring(0, 1); + } + set_Value (COLUMNNAME_IssueMethod, IssueMethod); + } + + /** Get Issue Method. + @return There are two methods for issue the components to Manufacturing Order + */ + public String getIssueMethod () + { + return (String)get_Value(COLUMNNAME_IssueMethod); + } + + /** Set Lead Time Offset. + @param LeadTimeOffset + Optional Lead Time offest before starting production + */ + public void setLeadTimeOffset (int LeadTimeOffset) + { + set_Value (COLUMNNAME_LeadTimeOffset, Integer.valueOf(LeadTimeOffset)); + } + + /** Get Lead Time Offset. + @return Optional Lead Time offest before starting production + */ + public int getLeadTimeOffset () + { + Integer ii = (Integer)get_Value(COLUMNNAME_LeadTimeOffset); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Line No. + @param Line + Unique line for this document + */ + public void setLine (int Line) + { + set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); + } + + /** Get Line No. + @return Unique line for this document + */ + public int getLine () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Line); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_ChangeNotice getM_ChangeNotice() throws Exception + { + Class clazz = MTable.getClass(I_M_ChangeNotice.Table_Name); + I_M_ChangeNotice result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_ChangeNotice)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_ChangeNotice_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Change Notice. + @param M_ChangeNotice_ID + Bill of Materials (Engineering) Change Notice (Version) + */ + public void setM_ChangeNotice_ID (int M_ChangeNotice_ID) + { + if (M_ChangeNotice_ID < 1) + set_Value (COLUMNNAME_M_ChangeNotice_ID, null); + else + set_Value (COLUMNNAME_M_ChangeNotice_ID, Integer.valueOf(M_ChangeNotice_ID)); + } + + /** Get Change Notice. + @return Bill of Materials (Engineering) Change Notice (Version) + */ + public int getM_ChangeNotice_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_ChangeNotice_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set BOM Line. + @param PP_Product_BOMLine_ID + BOM Line + */ + public void setPP_Product_BOMLine_ID (int PP_Product_BOMLine_ID) + { + if (PP_Product_BOMLine_ID < 1) + throw new IllegalArgumentException ("PP_Product_BOMLine_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Product_BOMLine_ID, Integer.valueOf(PP_Product_BOMLine_ID)); + } + + /** Get BOM Line. + @return BOM Line + */ + public int getPP_Product_BOMLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOMLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOM.Table_Name); + org.eevolution.model.I_PP_Product_BOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Product_BOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Product_BOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set BOM & Formula. + @param PP_Product_BOM_ID + BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) + { + if (PP_Product_BOM_ID < 1) + throw new IllegalArgumentException ("PP_Product_BOM_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID)); + } + + /** Get BOM & Formula. + @return BOM & Formula + */ + public int getPP_Product_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Quantity. + @param QtyBOM + Indicate the Quantity use in this BOM + */ + public void setQtyBOM (BigDecimal QtyBOM) + { + set_Value (COLUMNNAME_QtyBOM, QtyBOM); + } + + /** Get Quantity. + @return Indicate the Quantity use in this BOM + */ + public BigDecimal getQtyBOM () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBOM); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Quantity %. + @param QtyBatch + Indicate the Quantity % use in this Formula + */ + public void setQtyBatch (BigDecimal QtyBatch) + { + set_Value (COLUMNNAME_QtyBatch, QtyBatch); + } + + /** Get Quantity %. + @return Indicate the Quantity % use in this Formula + */ + public BigDecimal getQtyBatch () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBatch); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Scrap. + @param Scrap + Indicate the Scrap Quantity that is generate in a manufacturing process + */ + public void setScrap (BigDecimal Scrap) + { + set_Value (COLUMNNAME_Scrap, Scrap); + } + + /** Get Scrap. + @return Indicate the Scrap Quantity that is generate in a manufacturing process + */ + public BigDecimal getScrap () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Scrap); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + if (ValidFrom == null) + throw new IllegalArgumentException ("ValidFrom is mandatory."); + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Product_Planning.java b/base/src/org/eevolution/model/X_PP_Product_Planning.java new file mode 100644 index 0000000000..75bffad6bf --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_Product_Planning.java @@ -0,0 +1,714 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; + +/** Generated Model for PP_Product_Planning + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_Product_Planning (Properties ctx, int PP_Product_Planning_ID, String trxName) + { + super (ctx, PP_Product_Planning_ID, trxName); + /** if (PP_Product_Planning_ID == 0) + { + setIsCreatePlan (false); + setIsIssue (true); +// Y + setIsPhantom (false); + setIsRequiredDRP (false); + setIsRequiredMRP (false); + setM_Product_ID (0); + setPP_Product_Planning_ID (0); + } */ + } + + /** Load Constructor */ + public X_PP_Product_Planning (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() + { + StringBuffer sb = new StringBuffer ("X_PP_Product_Planning[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Workflow getAD_Workflow() throws Exception + { + Class clazz = MTable.getClass(I_AD_Workflow.Table_Name); + I_AD_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Workflow. + @param AD_Workflow_ID + Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID) + { + if (AD_Workflow_ID < 1) + set_Value (COLUMNNAME_AD_Workflow_ID, null); + else + set_Value (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); + } + + /** Get Workflow. + @return Workflow or combination of tasks + */ + public int getAD_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_DD_NetworkDistribution getDD_NetworkDistribution() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_DD_NetworkDistribution.Table_Name); + org.eevolution.model.I_DD_NetworkDistribution result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_DD_NetworkDistribution)constructor.newInstance(new Object[] {getCtx(), new Integer(getDD_NetworkDistribution_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Network Distribution. + @param DD_NetworkDistribution_ID Network Distribution */ + public void setDD_NetworkDistribution_ID (int DD_NetworkDistribution_ID) + { + if (DD_NetworkDistribution_ID < 1) + set_Value (COLUMNNAME_DD_NetworkDistribution_ID, null); + else + set_Value (COLUMNNAME_DD_NetworkDistribution_ID, Integer.valueOf(DD_NetworkDistribution_ID)); + } + + /** Get Network Distribution. + @return Network Distribution */ + public int getDD_NetworkDistribution_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_DD_NetworkDistribution_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Promised Delivery Time. + @param DeliveryTime_Promised + Promised days between order and delivery + */ + public void setDeliveryTime_Promised (BigDecimal DeliveryTime_Promised) + { + set_Value (COLUMNNAME_DeliveryTime_Promised, DeliveryTime_Promised); + } + + /** Get Promised Delivery Time. + @return Promised days between order and delivery + */ + public BigDecimal getDeliveryTime_Promised () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DeliveryTime_Promised); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Is Create Plan. + @param IsCreatePlan Is Create Plan */ + public void setIsCreatePlan (boolean IsCreatePlan) + { + set_Value (COLUMNNAME_IsCreatePlan, Boolean.valueOf(IsCreatePlan)); + } + + /** Get Is Create Plan. + @return Is Create Plan */ + public boolean isCreatePlan () + { + Object oo = get_Value(COLUMNNAME_IsCreatePlan); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Is Issue. + @param IsIssue Is Issue */ + public void setIsIssue (boolean IsIssue) + { + set_Value (COLUMNNAME_IsIssue, Boolean.valueOf(IsIssue)); + } + + /** Get Is Issue. + @return Is Issue */ + public boolean isIssue () + { + Object oo = get_Value(COLUMNNAME_IsIssue); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Is MPS. + @param IsMPS Is MPS */ + public void setIsMPS (boolean IsMPS) + { + set_Value (COLUMNNAME_IsMPS, Boolean.valueOf(IsMPS)); + } + + /** Get Is MPS. + @return Is MPS */ + public boolean isMPS () + { + Object oo = get_Value(COLUMNNAME_IsMPS); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Phantom. + @param IsPhantom + Phantom Component + */ + public void setIsPhantom (boolean IsPhantom) + { + set_Value (COLUMNNAME_IsPhantom, Boolean.valueOf(IsPhantom)); + } + + /** Get Phantom. + @return Phantom Component + */ + public boolean isPhantom () + { + Object oo = get_Value(COLUMNNAME_IsPhantom); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Required Calculate DRP. + @param IsRequiredDRP Required Calculate DRP */ + public void setIsRequiredDRP (boolean IsRequiredDRP) + { + set_ValueNoCheck (COLUMNNAME_IsRequiredDRP, Boolean.valueOf(IsRequiredDRP)); + } + + /** Get Required Calculate DRP. + @return Required Calculate DRP */ + public boolean isRequiredDRP () + { + Object oo = get_Value(COLUMNNAME_IsRequiredDRP); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Required Calculate MRP. + @param IsRequiredMRP Required Calculate MRP */ + public void setIsRequiredMRP (boolean IsRequiredMRP) + { + set_ValueNoCheck (COLUMNNAME_IsRequiredMRP, Boolean.valueOf(IsRequiredMRP)); + } + + /** Get Required Calculate MRP. + @return Required Calculate MRP */ + public boolean isRequiredMRP () + { + Object oo = get_Value(COLUMNNAME_IsRequiredMRP); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Warehouse getM_Warehouse() throws Exception + { + Class clazz = MTable.getClass(I_M_Warehouse.Table_Name); + I_M_Warehouse result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Warehouse. + @param M_Warehouse_ID + Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + if (M_Warehouse_ID < 1) + set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, null); + else + set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); + } + + /** 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 Order_Max. + @param Order_Max Order_Max */ + public void setOrder_Max (BigDecimal Order_Max) + { + set_Value (COLUMNNAME_Order_Max, Order_Max); + } + + /** Get Order_Max. + @return Order_Max */ + public BigDecimal getOrder_Max () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Max); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Minimum Order Qty. + @param Order_Min + Minimum order quantity in UOM + */ + public void setOrder_Min (BigDecimal Order_Min) + { + set_Value (COLUMNNAME_Order_Min, Order_Min); + } + + /** Get Minimum Order Qty. + @return Minimum order quantity in UOM + */ + public BigDecimal getOrder_Min () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Min); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Order Pack Qty. + @param Order_Pack + Package order size in UOM (e.g. order set of 5 units) + */ + public void setOrder_Pack (BigDecimal Order_Pack) + { + set_Value (COLUMNNAME_Order_Pack, Order_Pack); + } + + /** Get Order Pack Qty. + @return Package order size in UOM (e.g. order set of 5 units) + */ + public BigDecimal getOrder_Pack () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Pack); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Order Period. + @param Order_Period Order Period */ + public void setOrder_Period (BigDecimal Order_Period) + { + set_Value (COLUMNNAME_Order_Period, Order_Period); + } + + /** Get Order Period. + @return Order Period */ + public BigDecimal getOrder_Period () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Period); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Order_Policy AD_Reference_ID=53228 */ + public static final int ORDER_POLICY_AD_Reference_ID=53228; + /** Order Fixed Quantity = FQ */ + public static final String ORDER_POLICY_OrderFixedQuantity = "FQ"; + /** Lote For Lote = LFL */ + public static final String ORDER_POLICY_LoteForLote = "LFL"; + /** Period Order Quantity = POQ */ + public static final String ORDER_POLICY_PeriodOrderQuantity = "POQ"; + /** Set Order Policy. + @param Order_Policy Order Policy */ + public void setOrder_Policy (String Order_Policy) + { + + if (Order_Policy == null || Order_Policy.equals("FQ") || Order_Policy.equals("LFL") || Order_Policy.equals("POQ")); else throw new IllegalArgumentException ("Order_Policy Invalid value - " + Order_Policy + " - Reference_ID=53228 - FQ - LFL - POQ"); + if (Order_Policy != null && Order_Policy.length() > 3) + { + log.warning("Length > 3 - truncated"); + Order_Policy = Order_Policy.substring(0, 3); + } + set_Value (COLUMNNAME_Order_Policy, Order_Policy); + } + + /** Get Order Policy. + @return Order Policy */ + public String getOrder_Policy () + { + return (String)get_Value(COLUMNNAME_Order_Policy); + } + + /** Set Order Qty. + @param Order_Qty Order Qty */ + public void setOrder_Qty (BigDecimal Order_Qty) + { + set_Value (COLUMNNAME_Order_Qty, Order_Qty); + } + + /** Get Order Qty. + @return Order Qty */ + public BigDecimal getOrder_Qty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Qty); + if (bd == null) + return Env.ZERO; + return bd; + } + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOM.Table_Name); + org.eevolution.model.I_PP_Product_BOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Product_BOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Product_BOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set BOM & Formula. + @param PP_Product_BOM_ID + BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) + { + if (PP_Product_BOM_ID < 1) + set_Value (COLUMNNAME_PP_Product_BOM_ID, null); + else + set_Value (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID)); + } + + /** Get BOM & Formula. + @return BOM & Formula + */ + public int getPP_Product_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set PP_Product_Planning_ID. + @param PP_Product_Planning_ID PP_Product_Planning_ID */ + public void setPP_Product_Planning_ID (int PP_Product_Planning_ID) + { + if (PP_Product_Planning_ID < 1) + throw new IllegalArgumentException ("PP_Product_Planning_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_Product_Planning_ID, Integer.valueOf(PP_Product_Planning_ID)); + } + + /** Get PP_Product_Planning_ID. + @return PP_Product_Planning_ID */ + public int getPP_Product_Planning_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_Planning_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Planner_ID AD_Reference_ID=110 */ + public static final int PLANNER_ID_AD_Reference_ID=110; + /** Set Planner. + @param Planner_ID Planner */ + public void setPlanner_ID (int Planner_ID) + { + if (Planner_ID < 1) + set_Value (COLUMNNAME_Planner_ID, null); + else + set_Value (COLUMNNAME_Planner_ID, Integer.valueOf(Planner_ID)); + } + + /** Get Planner. + @return Planner */ + public int getPlanner_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Planner_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_S_Resource getS_Resource() throws Exception + { + Class clazz = MTable.getClass(I_S_Resource.Table_Name); + I_S_Resource result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_S_Resource)constructor.newInstance(new Object[] {getCtx(), new Integer(getS_Resource_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Resource. + @param S_Resource_ID + Resource + */ + public void setS_Resource_ID (int S_Resource_ID) + { + if (S_Resource_ID < 1) + set_ValueNoCheck (COLUMNNAME_S_Resource_ID, null); + else + set_ValueNoCheck (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); + } + + /** Get Resource. + @return Resource + */ + public int getS_Resource_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Safety Stock Qty. + @param SafetyStock + Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public void setSafetyStock (BigDecimal SafetyStock) + { + set_Value (COLUMNNAME_SafetyStock, SafetyStock); + } + + /** Get Safety Stock Qty. + @return Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public BigDecimal getSafetyStock () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SafetyStock); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Time Fence. + @param TimeFence Time Fence */ + public void setTimeFence (BigDecimal TimeFence) + { + set_Value (COLUMNNAME_TimeFence, TimeFence); + } + + /** Get Time Fence. + @return Time Fence */ + public BigDecimal getTimeFence () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TimeFence); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Transfert Time. + @param TransfertTime Transfert Time */ + public void setTransfertTime (BigDecimal TransfertTime) + { + set_Value (COLUMNNAME_TransfertTime, TransfertTime); + } + + /** Get Transfert Time. + @return Transfert Time */ + public BigDecimal getTransfertTime () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TransfertTime); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Working Time. + @param WorkingTime + Workflow Simulation Execution Time + */ + public void setWorkingTime (BigDecimal WorkingTime) + { + set_Value (COLUMNNAME_WorkingTime, WorkingTime); + } + + /** Get Working Time. + @return Workflow Simulation Execution Time + */ + public BigDecimal getWorkingTime () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WorkingTime); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Yield. + @param Yield Yield */ + public void setYield (int Yield) + { + set_Value (COLUMNNAME_Yield, Integer.valueOf(Yield)); + } + + /** Get Yield. + @return Yield */ + public int getYield () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Yield); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_ProfileBOM.java b/base/src/org/eevolution/model/X_PP_ProfileBOM.java new file mode 100644 index 0000000000..da62bf3072 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_ProfileBOM.java @@ -0,0 +1,536 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import org.compiere.model.*; +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +/** Generated Model for PP_ProfileBOM + * @author Adempiere (generated) + * @version Release 3.3.0 - $Id$ */ +public class X_PP_ProfileBOM extends PO +{ +/** Standard Constructor +@param ctx context +@param PP_ProfileBOM_ID id +@param trxName transaction +*/ +public X_PP_ProfileBOM (Properties ctx, int PP_ProfileBOM_ID, String trxName) +{ +super (ctx, PP_ProfileBOM_ID, trxName); +/** if (PP_ProfileBOM_ID == 0) +{ +setM_Product_Category_ID (0); +setName (null); +setPP_ProfileBOM_ID (0); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_PP_ProfileBOM (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** TableName=PP_ProfileBOM */ +public static final String Table_Name="PP_ProfileBOM"; + +/** AD_Table_ID=50011 */ +public static final int Table_ID=MTable.getTable_ID(Table_Name); + +protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_PP_ProfileBOM[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set Business Partner . +@param C_BPartner_ID Identifies a Business Partner */ +public void setC_BPartner_ID (int C_BPartner_ID) +{ +if (C_BPartner_ID <= 0) set_Value ("C_BPartner_ID", null); + else +set_Value ("C_BPartner_ID", Integer.valueOf(C_BPartner_ID)); +} +/** Get Business Partner . +@return Identifies a Business Partner */ +public int getC_BPartner_ID() +{ +Integer ii = (Integer)get_Value("C_BPartner_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name C_BPartner_ID */ +public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; +/** Set Order. +@param C_Order_ID Order */ +public void setC_Order_ID (String C_Order_ID) +{ +if (C_Order_ID != null && C_Order_ID.length() > 22) +{ +log.warning("Length > 22 - truncated"); +C_Order_ID = C_Order_ID.substring(0,21); +} +set_Value ("C_Order_ID", C_Order_ID); +} +/** Get Order. +@return Order */ +public String getC_Order_ID() +{ +return (String)get_Value("C_Order_ID"); +} +/** Column name C_Order_ID */ +public static final String COLUMNNAME_C_Order_ID = "C_Order_ID"; +/** Set UOM. +@param C_UOM_ID Unit of Measure */ +public void setC_UOM_ID (int C_UOM_ID) +{ +if (C_UOM_ID <= 0) set_Value ("C_UOM_ID", null); + else +set_Value ("C_UOM_ID", Integer.valueOf(C_UOM_ID)); +} +/** Get UOM. +@return Unit of Measure */ +public int getC_UOM_ID() +{ +Integer ii = (Integer)get_Value("C_UOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name C_UOM_ID */ +public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; +/** Set Copy From. +@param CopyFrom Copy From Record */ +public void setCopyFrom (String CopyFrom) +{ +if (CopyFrom != null && CopyFrom.length() > 1) +{ +log.warning("Length > 1 - truncated"); +CopyFrom = CopyFrom.substring(0,0); +} +set_Value ("CopyFrom", CopyFrom); +} +/** Get Copy From. +@return Copy From Record */ +public String getCopyFrom() +{ +return (String)get_Value("CopyFrom"); +} +/** Column name CopyFrom */ +public static final String COLUMNNAME_CopyFrom = "CopyFrom"; +/** Set CopyToNutrients. +@param CopyToNutrients CopyToNutrients */ +public void setCopyToNutrients (String CopyToNutrients) +{ +if (CopyToNutrients != null && CopyToNutrients.length() > 1) +{ +log.warning("Length > 1 - truncated"); +CopyToNutrients = CopyToNutrients.substring(0,0); +} +set_Value ("CopyToNutrients", CopyToNutrients); +} +/** Get CopyToNutrients. +@return CopyToNutrients */ +public String getCopyToNutrients() +{ +return (String)get_Value("CopyToNutrients"); +} +/** Column name CopyToNutrients */ +public static final String COLUMNNAME_CopyToNutrients = "CopyToNutrients"; +/** Set Rate. +@param CurrencyRate Currency Conversion Rate */ +public void setCurrencyRate (BigDecimal CurrencyRate) +{ +set_Value ("CurrencyRate", CurrencyRate); +} +/** Get Rate. +@return Currency Conversion Rate */ +public BigDecimal getCurrencyRate() +{ +BigDecimal bd = (BigDecimal)get_Value("CurrencyRate"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name CurrencyRate */ +public static final String COLUMNNAME_CurrencyRate = "CurrencyRate"; +/** Set Document Date. +@param DateDoc Date of the Document */ +public void setDateDoc (Timestamp DateDoc) +{ +set_Value ("DateDoc", DateDoc); +} +/** Get Document Date. +@return Date of the Document */ +public Timestamp getDateDoc() +{ +return (Timestamp)get_Value("DateDoc"); +} +/** Column name DateDoc */ +public static final String COLUMNNAME_DateDoc = "DateDoc"; +/** Set Description. +@param Description Optional short description of the record */ +public void setDescription (String Description) +{ +if (Description != null && Description.length() > 250) +{ +log.warning("Length > 250 - truncated"); +Description = Description.substring(0,249); +} +set_Value ("Description", Description); +} +/** Get Description. +@return Optional short description of the record */ +public String getDescription() +{ +return (String)get_Value("Description"); +} +/** Column name Description */ +public static final String COLUMNNAME_Description = "Description"; +/** Set Generate To. +@param GenerateTo Generate To */ +public void setGenerateTo (String GenerateTo) +{ +if (GenerateTo != null && GenerateTo.length() > 1) +{ +log.warning("Length > 1 - truncated"); +GenerateTo = GenerateTo.substring(0,0); +} +set_Value ("GenerateTo", GenerateTo); +} +/** Get Generate To. +@return Generate To */ +public String getGenerateTo() +{ +return (String)get_Value("GenerateTo"); +} +/** Column name GenerateTo */ +public static final String COLUMNNAME_GenerateTo = "GenerateTo"; +/** Set Published. +@param IsPublished The Topic is published and can be viewed */ +public void setIsPublished (boolean IsPublished) +{ +set_Value ("IsPublished", Boolean.valueOf(IsPublished)); +} +/** Get Published. +@return The Topic is published and can be viewed */ +public boolean isPublished() +{ +Object oo = get_Value("IsPublished"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsPublished */ +public static final String COLUMNNAME_IsPublished = "IsPublished"; +/** Set Line Amount. +@param LineNetAmt Line Extended Amount (Quantity * Actual Price) without Freight and Charges */ +public void setLineNetAmt (BigDecimal LineNetAmt) +{ +set_Value ("LineNetAmt", LineNetAmt); +} +/** Get Line Amount. +@return Line Extended Amount (Quantity * Actual Price) without Freight and Charges */ +public BigDecimal getLineNetAmt() +{ +BigDecimal bd = (BigDecimal)get_Value("LineNetAmt"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name LineNetAmt */ +public static final String COLUMNNAME_LineNetAmt = "LineNetAmt"; +/** Set Attribute Set Instance. +@param M_AttributeSetInstance_ID Product Attribute Set Instance */ +public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) +{ +if (M_AttributeSetInstance_ID <= 0) set_Value ("M_AttributeSetInstance_ID", null); + else +set_Value ("M_AttributeSetInstance_ID", Integer.valueOf(M_AttributeSetInstance_ID)); +} +/** Get Attribute Set Instance. +@return Product Attribute Set Instance */ +public int getM_AttributeSetInstance_ID() +{ +Integer ii = (Integer)get_Value("M_AttributeSetInstance_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_AttributeSetInstance_ID */ +public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID"; +/** Set Product Category. +@param M_Product_Category_ID Category of a Product */ +public void setM_Product_Category_ID (int M_Product_Category_ID) +{ +if (M_Product_Category_ID < 1) throw new IllegalArgumentException ("M_Product_Category_ID is mandatory."); +set_Value ("M_Product_Category_ID", Integer.valueOf(M_Product_Category_ID)); +} +/** Get Product Category. +@return Category of a Product */ +public int getM_Product_Category_ID() +{ +Integer ii = (Integer)get_Value("M_Product_Category_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_Product_Category_ID */ +public static final String COLUMNNAME_M_Product_Category_ID = "M_Product_Category_ID"; +/** Set Product. +@param M_Product_ID Product, Service, Item */ +public void setM_Product_ID (int M_Product_ID) +{ +if (M_Product_ID <= 0) set_Value ("M_Product_ID", null); + else +set_Value ("M_Product_ID", Integer.valueOf(M_Product_ID)); +} +/** Get Product. +@return Product, Service, Item */ +public int getM_Product_ID() +{ +Integer ii = (Integer)get_Value("M_Product_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_Product_ID */ +public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; +/** Set Margin %. +@param Margin Margin for a product as a percentage */ +public void setMargin (BigDecimal Margin) +{ +set_Value ("Margin", Margin); +} +/** Get Margin %. +@return Margin for a product as a percentage */ +public BigDecimal getMargin() +{ +BigDecimal bd = (BigDecimal)get_Value("Margin"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name Margin */ +public static final String COLUMNNAME_Margin = "Margin"; +/** Set Name. +@param Name Alphanumeric identifier of the entity */ +public void setName (String Name) +{ +if (Name == null) throw new IllegalArgumentException ("Name is mandatory."); +if (Name.length() > 60) +{ +log.warning("Length > 60 - truncated"); +Name = Name.substring(0,59); +} +set_Value ("Name", Name); +} +/** Get Name. +@return Alphanumeric identifier of the entity */ +public String getName() +{ +return (String)get_Value("Name"); +} +/** Column name Name */ +public static final String COLUMNNAME_Name = "Name"; +/** Set Old Value. +@param OldValue The old file data */ +public void setOldValue (String OldValue) +{ +if (OldValue != null && OldValue.length() > 40) +{ +log.warning("Length > 40 - truncated"); +OldValue = OldValue.substring(0,39); +} +set_Value ("OldValue", OldValue); +} +/** Get Old Value. +@return The old file data */ +public String getOldValue() +{ +return (String)get_Value("OldValue"); +} +/** Column name OldValue */ +public static final String COLUMNNAME_OldValue = "OldValue"; +/** Set BOM. +@param PP_Product_BOM_ID BOM */ +public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) +{ +if (PP_Product_BOM_ID <= 0) set_Value ("PP_Product_BOM_ID", null); + else +set_Value ("PP_Product_BOM_ID", Integer.valueOf(PP_Product_BOM_ID)); +} +/** Get BOM. +@return BOM */ +public int getPP_Product_BOM_ID() +{ +Integer ii = (Integer)get_Value("PP_Product_BOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_Product_BOM_ID */ +public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; +/** Set Profile BOM. +@param PP_ProfileBOM_ID Profile BOM */ +public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID) +{ +if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID)); +} +/** Get Profile BOM. +@return Profile BOM */ +public int getPP_ProfileBOM_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID"; +/** Set List Price. +@param PriceList List Price */ +public void setPriceList (BigDecimal PriceList) +{ +set_Value ("PriceList", PriceList); +} +/** Get List Price. +@return List Price */ +public BigDecimal getPriceList() +{ +BigDecimal bd = (BigDecimal)get_Value("PriceList"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name PriceList */ +public static final String COLUMNNAME_PriceList = "PriceList"; +/** Set Process Now. +@param Processing Process Now */ +public void setProcessing (boolean Processing) +{ +set_Value ("Processing", Boolean.valueOf(Processing)); +} +/** Get Process Now. +@return Process Now */ +public boolean isProcessing() +{ +Object oo = get_Value("Processing"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name Processing */ +public static final String COLUMNNAME_Processing = "Processing"; +/** Set Quantity. +@param Qty Quantity */ +public void setQty (BigDecimal Qty) +{ +set_Value ("Qty", Qty); +} +/** Get Quantity. +@return Quantity */ +public BigDecimal getQty() +{ +BigDecimal bd = (BigDecimal)get_Value("Qty"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name Qty */ +public static final String COLUMNNAME_Qty = "Qty"; +/** Set Valid from. +@param ValidFrom Valid from including this date (first day) */ +public void setValidFrom (Timestamp ValidFrom) +{ +set_Value ("ValidFrom", ValidFrom); +} +/** Get Valid from. +@return Valid from including this date (first day) */ +public Timestamp getValidFrom() +{ +return (Timestamp)get_Value("ValidFrom"); +} +/** Column name ValidFrom */ +public static final String COLUMNNAME_ValidFrom = "ValidFrom"; +/** Set Valid to. +@param ValidTo Valid to including this date (last day) */ +public void setValidTo (Timestamp ValidTo) +{ +set_Value ("ValidTo", ValidTo); +} +/** Get Valid to. +@return Valid to including this date (last day) */ +public Timestamp getValidTo() +{ +return (Timestamp)get_Value("ValidTo"); +} +/** Column name ValidTo */ +public static final String COLUMNNAME_ValidTo = "ValidTo"; +/** Set Search Key. +@param Value Search key for the record in the format required - must be unique */ +public void setValue (String Value) +{ +if (Value != null && Value.length() > 22) +{ +log.warning("Length > 22 - truncated"); +Value = Value.substring(0,21); +} +set_Value ("Value", Value); +} +/** Get Search Key. +@return Search key for the record in the format required - must be unique */ +public String getValue() +{ +return (String)get_Value("Value"); +} +/** Get Record ID/ColumnName +@return ID/ColumnName pair +*/public KeyNamePair getKeyNamePair() +{ +return new KeyNamePair(get_ID(), getValue()); +} +/** Column name Value */ +public static final String COLUMNNAME_Value = "Value"; +} diff --git a/base/src/org/eevolution/model/X_PP_ProfileBOMCost.java b/base/src/org/eevolution/model/X_PP_ProfileBOMCost.java new file mode 100644 index 0000000000..152bfc1f0f --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_ProfileBOMCost.java @@ -0,0 +1,366 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import org.compiere.model.*; +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +/** Generated Model for PP_ProfileBOMCost + * @author Adempiere (generated) + * @version Release 3.3.0 - $Id$ */ +public class X_PP_ProfileBOMCost extends PO +{ +/** Standard Constructor +@param ctx context +@param PP_ProfileBOMCost_ID id +@param trxName transaction +*/ +public X_PP_ProfileBOMCost (Properties ctx, int PP_ProfileBOMCost_ID, String trxName) +{ +super (ctx, PP_ProfileBOMCost_ID, trxName); +/** if (PP_ProfileBOMCost_ID == 0) +{ +setPP_ProfileBOMCost_ID (0); +setPP_ProfileBOM_ID (0); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_PP_ProfileBOMCost (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** TableName=PP_ProfileBOMCost */ +public static final String Table_Name="PP_ProfileBOMCost"; + +/** AD_Table_ID=50015 */ +public static final int Table_ID=MTable.getTable_ID(Table_Name); + +protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_PP_ProfileBOMCost[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set Date Ordered. +@param DateOrdered Date of Order */ +public void setDateOrdered (Timestamp DateOrdered) +{ +set_Value ("DateOrdered", DateOrdered); +} +/** Get Date Ordered. +@return Date of Order */ +public Timestamp getDateOrdered() +{ +return (Timestamp)get_Value("DateOrdered"); +} +/** Column name DateOrdered */ +public static final String COLUMNNAME_DateOrdered = "DateOrdered"; +/** Set Description. +@param Description Optional short description of the record */ +public void setDescription (String Description) +{ +if (Description != null && Description.length() > 255) +{ +log.warning("Length > 255 - truncated"); +Description = Description.substring(0,254); +} +set_Value ("Description", Description); +} +/** Get Description. +@return Optional short description of the record */ +public String getDescription() +{ +return (String)get_Value("Description"); +} +/** Column name Description */ +public static final String COLUMNNAME_Description = "Description"; +/** Set Generate To. +@param GenerateTo Generate To */ +public void setGenerateTo (String GenerateTo) +{ +if (GenerateTo != null && GenerateTo.length() > 1) +{ +log.warning("Length > 1 - truncated"); +GenerateTo = GenerateTo.substring(0,0); +} +set_Value ("GenerateTo", GenerateTo); +} +/** Get Generate To. +@return Generate To */ +public String getGenerateTo() +{ +return (String)get_Value("GenerateTo"); +} +/** Column name GenerateTo */ +public static final String COLUMNNAME_GenerateTo = "GenerateTo"; +/** Set IsPacking. +@param IsPacking IsPacking */ +public void setIsPacking (boolean IsPacking) +{ +set_Value ("IsPacking", Boolean.valueOf(IsPacking)); +} +/** Get IsPacking. +@return IsPacking */ +public boolean isPacking() +{ +Object oo = get_Value("IsPacking"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsPacking */ +public static final String COLUMNNAME_IsPacking = "IsPacking"; +/** Set IsUSD. +@param IsUSD IsUSD */ +public void setIsUSD (boolean IsUSD) +{ +set_Value ("IsUSD", Boolean.valueOf(IsUSD)); +} +/** Get IsUSD. +@return IsUSD */ +public boolean isUSD() +{ +Object oo = get_Value("IsUSD"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsUSD */ +public static final String COLUMNNAME_IsUSD = "IsUSD"; +/** Set Line Amount. +@param LineNetAmt Line Extended Amount (Quantity * Actual Price) without Freight and Charges */ +public void setLineNetAmt (BigDecimal LineNetAmt) +{ +set_Value ("LineNetAmt", LineNetAmt); +} +/** Get Line Amount. +@return Line Extended Amount (Quantity * Actual Price) without Freight and Charges */ +public BigDecimal getLineNetAmt() +{ +BigDecimal bd = (BigDecimal)get_Value("LineNetAmt"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name LineNetAmt */ +public static final String COLUMNNAME_LineNetAmt = "LineNetAmt"; +/** Set Line Total. +@param LineTotalAmt Total line amount incl. Tax */ +public void setLineTotalAmt (BigDecimal LineTotalAmt) +{ +set_Value ("LineTotalAmt", LineTotalAmt); +} +/** Get Line Total. +@return Total line amount incl. Tax */ +public BigDecimal getLineTotalAmt() +{ +BigDecimal bd = (BigDecimal)get_Value("LineTotalAmt"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name LineTotalAmt */ +public static final String COLUMNNAME_LineTotalAmt = "LineTotalAmt"; +/** Set Price List. +@param M_PriceList_ID Unique identifier of a Price List */ +public void setM_PriceList_ID (int M_PriceList_ID) +{ +if (M_PriceList_ID <= 0) set_Value ("M_PriceList_ID", null); + else +set_Value ("M_PriceList_ID", Integer.valueOf(M_PriceList_ID)); +} +/** Get Price List. +@return Unique identifier of a Price List */ +public int getM_PriceList_ID() +{ +Integer ii = (Integer)get_Value("M_PriceList_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_PriceList_ID */ +public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; +/** Set M_ProductEt_ID. +@param M_ProductEt_ID M_ProductEt_ID */ +public void setM_ProductEt_ID (int M_ProductEt_ID) +{ +if (M_ProductEt_ID <= 0) set_Value ("M_ProductEt_ID", null); + else +set_Value ("M_ProductEt_ID", Integer.valueOf(M_ProductEt_ID)); +} +/** Get M_ProductEt_ID. +@return M_ProductEt_ID */ +public int getM_ProductEt_ID() +{ +Integer ii = (Integer)get_Value("M_ProductEt_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_ProductEt_ID */ +public static final String COLUMNNAME_M_ProductEt_ID = "M_ProductEt_ID"; +/** Set Margin %. +@param Margin Margin for a product as a percentage */ +public void setMargin (BigDecimal Margin) +{ +set_Value ("Margin", Margin); +} +/** Get Margin %. +@return Margin for a product as a percentage */ +public BigDecimal getMargin() +{ +BigDecimal bd = (BigDecimal)get_Value("Margin"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name Margin */ +public static final String COLUMNNAME_Margin = "Margin"; +/** Set Offer Amount. +@param OfferAmt Amount of the Offer */ +public void setOfferAmt (BigDecimal OfferAmt) +{ +set_Value ("OfferAmt", OfferAmt); +} +/** Get Offer Amount. +@return Amount of the Offer */ +public BigDecimal getOfferAmt() +{ +BigDecimal bd = (BigDecimal)get_Value("OfferAmt"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name OfferAmt */ +public static final String COLUMNNAME_OfferAmt = "OfferAmt"; +/** Set Profile BOM Cost. +@param PP_ProfileBOMCost_ID Profile BOM Cost */ +public void setPP_ProfileBOMCost_ID (int PP_ProfileBOMCost_ID) +{ +if (PP_ProfileBOMCost_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOMCost_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOMCost_ID", Integer.valueOf(PP_ProfileBOMCost_ID)); +} +/** Get Profile BOM Cost. +@return Profile BOM Cost */ +public int getPP_ProfileBOMCost_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOMCost_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOMCost_ID */ +public static final String COLUMNNAME_PP_ProfileBOMCost_ID = "PP_ProfileBOMCost_ID"; +/** Set Profile BOM. +@param PP_ProfileBOM_ID Profile BOM */ +public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID) +{ +if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID)); +} +/** Get Profile BOM. +@return Profile BOM */ +public int getPP_ProfileBOM_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID"; +/** Set QtyEt. +@param QtyEt QtyEt */ +public void setQtyEt (BigDecimal QtyEt) +{ +set_Value ("QtyEt", QtyEt); +} +/** Get QtyEt. +@return QtyEt */ +public BigDecimal getQtyEt() +{ +BigDecimal bd = (BigDecimal)get_Value("QtyEt"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name QtyEt */ +public static final String COLUMNNAME_QtyEt = "QtyEt"; +/** Set Ordered Quantity. +@param QtyOrdered Ordered Quantity */ +public void setQtyOrdered (BigDecimal QtyOrdered) +{ +set_Value ("QtyOrdered", QtyOrdered); +} +/** Get Ordered Quantity. +@return Ordered Quantity */ +public BigDecimal getQtyOrdered() +{ +BigDecimal bd = (BigDecimal)get_Value("QtyOrdered"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name QtyOrdered */ +public static final String COLUMNNAME_QtyOrdered = "QtyOrdered"; +/** Set Resource. +@param S_Resource_ID Resource */ +public void setS_Resource_ID (int S_Resource_ID) +{ +if (S_Resource_ID <= 0) set_Value ("S_Resource_ID", null); + else +set_Value ("S_Resource_ID", Integer.valueOf(S_Resource_ID)); +} +/** Get Resource. +@return Resource */ +public int getS_Resource_ID() +{ +Integer ii = (Integer)get_Value("S_Resource_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name S_Resource_ID */ +public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; +} diff --git a/base/src/org/eevolution/model/X_PP_ProfileBOMLine.java b/base/src/org/eevolution/model/X_PP_ProfileBOMLine.java new file mode 100644 index 0000000000..9c2920a590 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_ProfileBOMLine.java @@ -0,0 +1,213 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import org.compiere.model.*; +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +/** Generated Model for PP_ProfileBOMLine + * @author Adempiere (generated) + * @version Release 3.3.0 - $Id$ */ +public class X_PP_ProfileBOMLine extends PO +{ +/** Standard Constructor +@param ctx context +@param PP_ProfileBOMLine_ID id +@param trxName transaction +*/ +public X_PP_ProfileBOMLine (Properties ctx, int PP_ProfileBOMLine_ID, String trxName) +{ +super (ctx, PP_ProfileBOMLine_ID, trxName); +/** if (PP_ProfileBOMLine_ID == 0) +{ +setM_Attribute_ID (0); +setPP_ProfileBOMLine_ID (0); +setPP_ProfileBOM_ID (0); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_PP_ProfileBOMLine (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** TableName=PP_ProfileBOMLine */ +public static final String Table_Name="PP_ProfileBOMLine"; + +/** AD_Table_ID=50016 */ +public static final int Table_ID=MTable.getTable_ID(Table_Name); + +protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_PP_ProfileBOMLine[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set Printed. +@param IsPrinted Indicates if this document / line is printed */ +public void setIsPrinted (boolean IsPrinted) +{ +set_Value ("IsPrinted", Boolean.valueOf(IsPrinted)); +} +/** Get Printed. +@return Indicates if this document / line is printed */ +public boolean isPrinted() +{ +Object oo = get_Value("IsPrinted"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsPrinted */ +public static final String COLUMNNAME_IsPrinted = "IsPrinted"; +/** Set Attribute. +@param M_Attribute_ID Product Attribute */ +public void setM_Attribute_ID (int M_Attribute_ID) +{ +if (M_Attribute_ID < 1) throw new IllegalArgumentException ("M_Attribute_ID is mandatory."); +set_Value ("M_Attribute_ID", Integer.valueOf(M_Attribute_ID)); +} +/** Get Attribute. +@return Product Attribute */ +public int getM_Attribute_ID() +{ +Integer ii = (Integer)get_Value("M_Attribute_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_Attribute_ID */ +public static final String COLUMNNAME_M_Attribute_ID = "M_Attribute_ID"; +/** Set Profile BOM Line. +@param PP_ProfileBOMLine_ID Profile BOM Line */ +public void setPP_ProfileBOMLine_ID (int PP_ProfileBOMLine_ID) +{ +if (PP_ProfileBOMLine_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOMLine_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOMLine_ID", Integer.valueOf(PP_ProfileBOMLine_ID)); +} +/** Get Profile BOM Line. +@return Profile BOM Line */ +public int getPP_ProfileBOMLine_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOMLine_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOMLine_ID */ +public static final String COLUMNNAME_PP_ProfileBOMLine_ID = "PP_ProfileBOMLine_ID"; +/** Set Profile BOM. +@param PP_ProfileBOM_ID Profile BOM */ +public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID) +{ +if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID)); +} +/** Get Profile BOM. +@return Profile BOM */ +public int getPP_ProfileBOM_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID"; +/** Set Search Key. +@param Value Search key for the record in the format required - must be unique */ +public void setValue (String Value) +{ +if (Value != null && Value.length() > 40) +{ +log.warning("Length > 40 - truncated"); +Value = Value.substring(0,39); +} +set_Value ("Value", Value); +} +/** Get Search Key. +@return Search key for the record in the format required - must be unique */ +public String getValue() +{ +return (String)get_Value("Value"); +} +/** Column name Value */ +public static final String COLUMNNAME_Value = "Value"; +/** Set Max. Value. +@param ValueMax Maximum Value for a field */ +public void setValueMax (BigDecimal ValueMax) +{ +set_Value ("ValueMax", ValueMax); +} +/** Get Max. Value. +@return Maximum Value for a field */ +public BigDecimal getValueMax() +{ +BigDecimal bd = (BigDecimal)get_Value("ValueMax"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name ValueMax */ +public static final String COLUMNNAME_ValueMax = "ValueMax"; +/** Set Min. Value. +@param ValueMin Minimum Value for a field */ +public void setValueMin (BigDecimal ValueMin) +{ +set_Value ("ValueMin", ValueMin); +} +/** Get Min. Value. +@return Minimum Value for a field */ +public BigDecimal getValueMin() +{ +BigDecimal bd = (BigDecimal)get_Value("ValueMin"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name ValueMin */ +public static final String COLUMNNAME_ValueMin = "ValueMin"; +} diff --git a/base/src/org/eevolution/model/X_PP_ProfileBOM_Product.java b/base/src/org/eevolution/model/X_PP_ProfileBOM_Product.java new file mode 100644 index 0000000000..952c2a10e1 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_ProfileBOM_Product.java @@ -0,0 +1,338 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import org.compiere.model.*; +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +/** Generated Model for PP_ProfileBOM_Product + * @author Adempiere (generated) + * @version Release 3.3.0 - $Id$ */ +public class X_PP_ProfileBOM_Product extends PO +{ +/** Standard Constructor +@param ctx context +@param PP_ProfileBOM_Product_ID id +@param trxName transaction +*/ +public X_PP_ProfileBOM_Product (Properties ctx, int PP_ProfileBOM_Product_ID, String trxName) +{ +super (ctx, PP_ProfileBOM_Product_ID, trxName); +/** if (PP_ProfileBOM_Product_ID == 0) +{ +setM_Product_ID (0); +setPP_ProfileBOM_ID (0); +setPP_ProfileBOM_Product_ID (0); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_PP_ProfileBOM_Product (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** TableName=PP_ProfileBOM_Product */ +public static final String Table_Name="PP_ProfileBOM_Product"; + +/** AD_Table_ID=50012 */ +public static final int Table_ID=MTable.getTable_ID(Table_Name); + +protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_PP_ProfileBOM_Product[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set Alias. +@param Alias Defines an alternate method of indicating an account combination. */ +public void setAlias (boolean Alias) +{ +set_Value ("Alias", Boolean.valueOf(Alias)); +} +/** Get Alias. +@return Defines an alternate method of indicating an account combination. */ +public boolean isAlias() +{ +Object oo = get_Value("Alias"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name Alias */ +public static final String COLUMNNAME_Alias = "Alias"; +/** Set UOM. +@param C_UOM_ID Unit of Measure */ +public void setC_UOM_ID (int C_UOM_ID) +{ +if (C_UOM_ID <= 0) set_Value ("C_UOM_ID", null); + else +set_Value ("C_UOM_ID", Integer.valueOf(C_UOM_ID)); +} +/** Get UOM. +@return Unit of Measure */ +public int getC_UOM_ID() +{ +Integer ii = (Integer)get_Value("C_UOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name C_UOM_ID */ +public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; +/** Set Generate To. +@param GenerateTo Generate To */ +public void setGenerateTo (String GenerateTo) +{ +if (GenerateTo != null && GenerateTo.length() > 1) +{ +log.warning("Length > 1 - truncated"); +GenerateTo = GenerateTo.substring(0,0); +} +set_Value ("GenerateTo", GenerateTo); +} +/** Get Generate To. +@return Generate To */ +public String getGenerateTo() +{ +return (String)get_Value("GenerateTo"); +} +/** Column name GenerateTo */ +public static final String COLUMNNAME_GenerateTo = "GenerateTo"; +/** Set Printed. +@param IsPrinted Indicates if this document / line is printed */ +public void setIsPrinted (boolean IsPrinted) +{ +set_Value ("IsPrinted", Boolean.valueOf(IsPrinted)); +} +/** Get Printed. +@return Indicates if this document / line is printed */ +public boolean isPrinted() +{ +Object oo = get_Value("IsPrinted"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsPrinted */ +public static final String COLUMNNAME_IsPrinted = "IsPrinted"; +/** Set Line No. +@param Line Unique line for this document */ +public void setLine (int Line) +{ +set_Value ("Line", Integer.valueOf(Line)); +} +/** Get Line No. +@return Unique line for this document */ +public int getLine() +{ +Integer ii = (Integer)get_Value("Line"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name Line */ +public static final String COLUMNNAME_Line = "Line"; +/** Set Product. +@param M_Product_ID Product, Service, Item */ +public void setM_Product_ID (int M_Product_ID) +{ +if (M_Product_ID < 1) throw new IllegalArgumentException ("M_Product_ID is mandatory."); +set_Value ("M_Product_ID", Integer.valueOf(M_Product_ID)); +} +/** Get Product. +@return Product, Service, Item */ +public int getM_Product_ID() +{ +Integer ii = (Integer)get_Value("M_Product_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_Product_ID */ +public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; +/** Set Maximum Length. +@param MaxLength Maximum Length of Data */ +public void setMaxLength (BigDecimal MaxLength) +{ +set_Value ("MaxLength", MaxLength); +} +/** Get Maximum Length. +@return Maximum Length of Data */ +public BigDecimal getMaxLength() +{ +BigDecimal bd = (BigDecimal)get_Value("MaxLength"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name MaxLength */ +public static final String COLUMNNAME_MaxLength = "MaxLength"; +/** Set Minimum Quantity. +@param MinQty Minimum quantity for the business partner */ +public void setMinQty (BigDecimal MinQty) +{ +set_Value ("MinQty", MinQty); +} +/** Get Minimum Quantity. +@return Minimum quantity for the business partner */ +public BigDecimal getMinQty() +{ +BigDecimal bd = (BigDecimal)get_Value("MinQty"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name MinQty */ +public static final String COLUMNNAME_MinQty = "MinQty"; +/** Set Profile BOM. +@param PP_ProfileBOM_ID Profile BOM */ +public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID) +{ +if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID)); +} +/** Get Profile BOM. +@return Profile BOM */ +public int getPP_ProfileBOM_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID"; +/** Set Profile BOM Product. +@param PP_ProfileBOM_Product_ID Profile BOM Product */ +public void setPP_ProfileBOM_Product_ID (int PP_ProfileBOM_Product_ID) +{ +if (PP_ProfileBOM_Product_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_Product_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_Product_ID", Integer.valueOf(PP_ProfileBOM_Product_ID)); +} +/** Get Profile BOM Product. +@return Profile BOM Product */ +public int getPP_ProfileBOM_Product_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_Product_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_Product_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_Product_ID = "PP_ProfileBOM_Product_ID"; +/** Set List Price. +@param PriceList List Price */ +public void setPriceList (BigDecimal PriceList) +{ +set_Value ("PriceList", PriceList); +} +/** Get List Price. +@return List Price */ +public BigDecimal getPriceList() +{ +BigDecimal bd = (BigDecimal)get_Value("PriceList"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name PriceList */ +public static final String COLUMNNAME_PriceList = "PriceList"; +/** Set Process Now. +@param Processing Process Now */ +public void setProcessing (boolean Processing) +{ +set_Value ("Processing", Boolean.valueOf(Processing)); +} +/** Get Process Now. +@return Process Now */ +public boolean isProcessing() +{ +Object oo = get_Value("Processing"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name Processing */ +public static final String COLUMNNAME_Processing = "Processing"; +/** Set Quantity. +@param Qty Quantity */ +public void setQty (BigDecimal Qty) +{ +set_Value ("Qty", Qty); +} +/** Get Quantity. +@return Quantity */ +public BigDecimal getQty() +{ +BigDecimal bd = (BigDecimal)get_Value("Qty"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name Qty */ +public static final String COLUMNNAME_Qty = "Qty"; +/** Set Search Key. +@param Value Search key for the record in the format required - must be unique */ +public void setValue (String Value) +{ +if (Value != null && Value.length() > 80) +{ +log.warning("Length > 80 - truncated"); +Value = Value.substring(0,79); +} +set_Value ("Value", Value); +} +/** Get Search Key. +@return Search key for the record in the format required - must be unique */ +public String getValue() +{ +return (String)get_Value("Value"); +} +/** Column name Value */ +public static final String COLUMNNAME_Value = "Value"; +} diff --git a/base/src/org/eevolution/model/X_PP_ProfileBOM_Real.java b/base/src/org/eevolution/model/X_PP_ProfileBOM_Real.java new file mode 100644 index 0000000000..547cc944d9 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_ProfileBOM_Real.java @@ -0,0 +1,229 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import org.compiere.model.*; +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +/** Generated Model for PP_ProfileBOM_Real + * @author Adempiere (generated) + * @version Release 3.3.0 - $Id$ */ +public class X_PP_ProfileBOM_Real extends PO +{ +/** Standard Constructor +@param ctx context +@param PP_ProfileBOM_Real_ID id +@param trxName transaction +*/ +public X_PP_ProfileBOM_Real (Properties ctx, int PP_ProfileBOM_Real_ID, String trxName) +{ +super (ctx, PP_ProfileBOM_Real_ID, trxName); +/** if (PP_ProfileBOM_Real_ID == 0) +{ +setM_Attribute_ID (0); +setPP_ProfileBOM_ID (0); +setPP_ProfileBOM_Real_ID (0); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_PP_ProfileBOM_Real (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** TableName=PP_ProfileBOM_Real */ +public static final String Table_Name="PP_ProfileBOM_Real"; + +/** AD_Table_ID=50014 */ +public static final int Table_ID=MTable.getTable_ID(Table_Name); + +protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_PP_ProfileBOM_Real[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set Printed. +@param IsPrinted Indicates if this document / line is printed */ +public void setIsPrinted (boolean IsPrinted) +{ +set_Value ("IsPrinted", Boolean.valueOf(IsPrinted)); +} +/** Get Printed. +@return Indicates if this document / line is printed */ +public boolean isPrinted() +{ +Object oo = get_Value("IsPrinted"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsPrinted */ +public static final String COLUMNNAME_IsPrinted = "IsPrinted"; +/** Set Attribute. +@param M_Attribute_ID Product Attribute */ +public void setM_Attribute_ID (int M_Attribute_ID) +{ +if (M_Attribute_ID < 1) throw new IllegalArgumentException ("M_Attribute_ID is mandatory."); +set_Value ("M_Attribute_ID", Integer.valueOf(M_Attribute_ID)); +} +/** Get Attribute. +@return Product Attribute */ +public int getM_Attribute_ID() +{ +Integer ii = (Integer)get_Value("M_Attribute_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_Attribute_ID */ +public static final String COLUMNNAME_M_Attribute_ID = "M_Attribute_ID"; +/** Set Max Height. +@param MaxHeight Maximum Height in 1/72 if an inch - 0 = no restriction */ +public void setMaxHeight (BigDecimal MaxHeight) +{ +set_Value ("MaxHeight", MaxHeight); +} +/** Get Max Height. +@return Maximum Height in 1/72 if an inch - 0 = no restriction */ +public BigDecimal getMaxHeight() +{ +BigDecimal bd = (BigDecimal)get_Value("MaxHeight"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name MaxHeight */ +public static final String COLUMNNAME_MaxHeight = "MaxHeight"; +/** Set Minimum Quantity. +@param MinQty Minimum quantity for the business partner */ +public void setMinQty (BigDecimal MinQty) +{ +set_Value ("MinQty", MinQty); +} +/** Get Minimum Quantity. +@return Minimum quantity for the business partner */ +public BigDecimal getMinQty() +{ +BigDecimal bd = (BigDecimal)get_Value("MinQty"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name MinQty */ +public static final String COLUMNNAME_MinQty = "MinQty"; +/** Set Profile BOM. +@param PP_ProfileBOM_ID Profile BOM */ +public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID) +{ +if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID)); +} +/** Get Profile BOM. +@return Profile BOM */ +public int getPP_ProfileBOM_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID"; +/** Set Profile BOM Real. +@param PP_ProfileBOM_Real_ID Profile BOM Real */ +public void setPP_ProfileBOM_Real_ID (int PP_ProfileBOM_Real_ID) +{ +if (PP_ProfileBOM_Real_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_Real_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_Real_ID", Integer.valueOf(PP_ProfileBOM_Real_ID)); +} +/** Get Profile BOM Real. +@return Profile BOM Real */ +public int getPP_ProfileBOM_Real_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_Real_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_Real_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_Real_ID = "PP_ProfileBOM_Real_ID"; +/** Set Quantity. +@param Qty Quantity */ +public void setQty (BigDecimal Qty) +{ +set_Value ("Qty", Qty); +} +/** Get Quantity. +@return Quantity */ +public BigDecimal getQty() +{ +BigDecimal bd = (BigDecimal)get_Value("Qty"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name Qty */ +public static final String COLUMNNAME_Qty = "Qty"; +/** Set Search Key. +@param Value Search key for the record in the format required - must be unique */ +public void setValue (String Value) +{ +if (Value != null && Value.length() > 40) +{ +log.warning("Length > 40 - truncated"); +Value = Value.substring(0,39); +} +set_Value ("Value", Value); +} +/** Get Search Key. +@return Search key for the record in the format required - must be unique */ +public String getValue() +{ +return (String)get_Value("Value"); +} +/** Column name Value */ +public static final String COLUMNNAME_Value = "Value"; +} diff --git a/base/src/org/eevolution/model/X_PP_ProfileBOM_Selected.java b/base/src/org/eevolution/model/X_PP_ProfileBOM_Selected.java new file mode 100644 index 0000000000..f903ed4860 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_ProfileBOM_Selected.java @@ -0,0 +1,342 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import org.compiere.model.*; +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +/** Generated Model for PP_ProfileBOM_Selected + * @author Adempiere (generated) + * @version Release 3.3.0 - $Id$ */ +public class X_PP_ProfileBOM_Selected extends PO +{ +/** Standard Constructor +@param ctx context +@param PP_ProfileBOM_Selected_ID id +@param trxName transaction +*/ +public X_PP_ProfileBOM_Selected (Properties ctx, int PP_ProfileBOM_Selected_ID, String trxName) +{ +super (ctx, PP_ProfileBOM_Selected_ID, trxName); +/** if (PP_ProfileBOM_Selected_ID == 0) +{ +setPP_ProfileBOM_ID (0); +setPP_ProfileBOM_Selected_ID (0); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_PP_ProfileBOM_Selected (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** TableName=PP_ProfileBOM_Selected */ +public static final String Table_Name="PP_ProfileBOM_Selected"; + +/** AD_Table_ID=50013 */ +public static final int Table_ID=MTable.getTable_ID(Table_Name); + +protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_PP_ProfileBOM_Selected[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set Alias. +@param Alias Defines an alternate method of indicating an account combination. */ +public void setAlias (boolean Alias) +{ +set_Value ("Alias", Boolean.valueOf(Alias)); +} +/** Get Alias. +@return Defines an alternate method of indicating an account combination. */ +public boolean isAlias() +{ +Object oo = get_Value("Alias"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name Alias */ +public static final String COLUMNNAME_Alias = "Alias"; +/** Set UOM. +@param C_UOM_ID Unit of Measure */ +public void setC_UOM_ID (int C_UOM_ID) +{ +if (C_UOM_ID <= 0) set_Value ("C_UOM_ID", null); + else +set_Value ("C_UOM_ID", Integer.valueOf(C_UOM_ID)); +} +/** Get UOM. +@return Unit of Measure */ +public int getC_UOM_ID() +{ +Integer ii = (Integer)get_Value("C_UOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name C_UOM_ID */ +public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID"; +/** Set Generate To. +@param GenerateTo Generate To */ +public void setGenerateTo (String GenerateTo) +{ +if (GenerateTo != null && GenerateTo.length() > 1) +{ +log.warning("Length > 1 - truncated"); +GenerateTo = GenerateTo.substring(0,0); +} +set_Value ("GenerateTo", GenerateTo); +} +/** Get Generate To. +@return Generate To */ +public String getGenerateTo() +{ +return (String)get_Value("GenerateTo"); +} +/** Column name GenerateTo */ +public static final String COLUMNNAME_GenerateTo = "GenerateTo"; +/** Set IsCritical. +@param IsCritical IsCritical */ +public void setIsCritical (boolean IsCritical) +{ +set_Value ("IsCritical", Boolean.valueOf(IsCritical)); +} +/** Get IsCritical. +@return IsCritical */ +public boolean isCritical() +{ +Object oo = get_Value("IsCritical"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsCritical */ +public static final String COLUMNNAME_IsCritical = "IsCritical"; +/** Set Printed. +@param IsPrinted Indicates if this document / line is printed */ +public void setIsPrinted (boolean IsPrinted) +{ +set_Value ("IsPrinted", Boolean.valueOf(IsPrinted)); +} +/** Get Printed. +@return Indicates if this document / line is printed */ +public boolean isPrinted() +{ +Object oo = get_Value("IsPrinted"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsPrinted */ +public static final String COLUMNNAME_IsPrinted = "IsPrinted"; +/** Set Line No. +@param Line Unique line for this document */ +public void setLine (int Line) +{ +set_Value ("Line", Integer.valueOf(Line)); +} +/** Get Line No. +@return Unique line for this document */ +public int getLine() +{ +Integer ii = (Integer)get_Value("Line"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name Line */ +public static final String COLUMNNAME_Line = "Line"; +/** Set Product. +@param M_Product_ID Product, Service, Item */ +public void setM_Product_ID (int M_Product_ID) +{ +if (M_Product_ID <= 0) set_Value ("M_Product_ID", null); + else +set_Value ("M_Product_ID", Integer.valueOf(M_Product_ID)); +} +/** Get Product. +@return Product, Service, Item */ +public int getM_Product_ID() +{ +Integer ii = (Integer)get_Value("M_Product_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_Product_ID */ +public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; +/** Set Profile BOM. +@param PP_ProfileBOM_ID Profile BOM */ +public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID) +{ +if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID)); +} +/** Get Profile BOM. +@return Profile BOM */ +public int getPP_ProfileBOM_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID"; +/** Set Profile BOM Selected. +@param PP_ProfileBOM_Selected_ID Profile BOM Selected */ +public void setPP_ProfileBOM_Selected_ID (int PP_ProfileBOM_Selected_ID) +{ +if (PP_ProfileBOM_Selected_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_Selected_ID is mandatory."); +set_ValueNoCheck ("PP_ProfileBOM_Selected_ID", Integer.valueOf(PP_ProfileBOM_Selected_ID)); +} +/** Get Profile BOM Selected. +@return Profile BOM Selected */ +public int getPP_ProfileBOM_Selected_ID() +{ +Integer ii = (Integer)get_Value("PP_ProfileBOM_Selected_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name PP_ProfileBOM_Selected_ID */ +public static final String COLUMNNAME_PP_ProfileBOM_Selected_ID = "PP_ProfileBOM_Selected_ID"; +/** Set Percent. +@param Percent Percentage */ +public void setPercent (BigDecimal Percent) +{ +set_Value ("Percent", Percent); +} +/** Get Percent. +@return Percentage */ +public BigDecimal getPercent() +{ +BigDecimal bd = (BigDecimal)get_Value("Percent"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name Percent */ +public static final String COLUMNNAME_Percent = "Percent"; +/** Set List Price. +@param PriceList List Price */ +public void setPriceList (BigDecimal PriceList) +{ +set_Value ("PriceList", PriceList); +} +/** Get List Price. +@return List Price */ +public BigDecimal getPriceList() +{ +BigDecimal bd = (BigDecimal)get_Value("PriceList"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name PriceList */ +public static final String COLUMNNAME_PriceList = "PriceList"; +/** Set Process Now. +@param Processing Process Now */ +public void setProcessing (boolean Processing) +{ +set_Value ("Processing", Boolean.valueOf(Processing)); +} +/** Get Process Now. +@return Process Now */ +public boolean isProcessing() +{ +Object oo = get_Value("Processing"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name Processing */ +public static final String COLUMNNAME_Processing = "Processing"; +/** Set Quantity. +@param Qty Quantity */ +public void setQty (BigDecimal Qty) +{ +set_Value ("Qty", Qty); +} +/** Get Quantity. +@return Quantity */ +public BigDecimal getQty() +{ +BigDecimal bd = (BigDecimal)get_Value("Qty"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name Qty */ +public static final String COLUMNNAME_Qty = "Qty"; +/** Set Search Key. +@param Value Search key for the record in the format required - must be unique */ +public void setValue (String Value) +{ +if (Value != null && Value.length() > 80) +{ +log.warning("Length > 80 - truncated"); +Value = Value.substring(0,79); +} +set_Value ("Value", Value); +} +/** Get Search Key. +@return Search key for the record in the format required - must be unique */ +public String getValue() +{ +return (String)get_Value("Value"); +} +/** Column name Value */ +public static final String COLUMNNAME_Value = "Value"; +} diff --git a/base/src/org/eevolution/model/X_PP_WF_Node_Asset.java b/base/src/org/eevolution/model/X_PP_WF_Node_Asset.java new file mode 100644 index 0000000000..8596976393 --- /dev/null +++ b/base/src/org/eevolution/model/X_PP_WF_Node_Asset.java @@ -0,0 +1,191 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for PP_WF_Node_Asset + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_PP_WF_Node_Asset extends PO implements I_PP_WF_Node_Asset, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_PP_WF_Node_Asset (Properties ctx, int PP_WF_Node_Asset_ID, String trxName) + { + super (ctx, PP_WF_Node_Asset_ID, trxName); + /** if (PP_WF_Node_Asset_ID == 0) + { + setAD_WF_Node_ID (0); + setA_Asset_ID (0); + setPP_WF_Node_Asset_ID (0); + } */ + } + + /** Load Constructor */ + public X_PP_WF_Node_Asset (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() + { + StringBuffer sb = new StringBuffer ("X_PP_WF_Node_Asset[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_WF_Node getAD_WF_Node() throws Exception + { + Class clazz = MTable.getClass(I_AD_WF_Node.Table_Name); + I_AD_WF_Node result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_WF_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_WF_Node_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Node. + @param AD_WF_Node_ID + Workflow Node (activity), step or process + */ + public void setAD_WF_Node_ID (int AD_WF_Node_ID) + { + if (AD_WF_Node_ID < 1) + throw new IllegalArgumentException ("AD_WF_Node_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_AD_WF_Node_ID, Integer.valueOf(AD_WF_Node_ID)); + } + + /** Get Node. + @return Workflow Node (activity), step or process + */ + public int getAD_WF_Node_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_WF_Node_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_A_Asset getA_Asset() throws Exception + { + Class clazz = MTable.getClass(I_A_Asset.Table_Name); + I_A_Asset result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_A_Asset)constructor.newInstance(new Object[] {getCtx(), new Integer(getA_Asset_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Asset. + @param A_Asset_ID + Asset used internally or by customers + */ + public void setA_Asset_ID (int A_Asset_ID) + { + if (A_Asset_ID < 1) + throw new IllegalArgumentException ("A_Asset_ID is mandatory."); + set_Value (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID)); + } + + /** Get Asset. + @return Asset used internally or by customers + */ + public int getA_Asset_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set PP_WF_Node_Asset_ID. + @param PP_WF_Node_Asset_ID PP_WF_Node_Asset_ID */ + public void setPP_WF_Node_Asset_ID (int PP_WF_Node_Asset_ID) + { + if (PP_WF_Node_Asset_ID < 1) + throw new IllegalArgumentException ("PP_WF_Node_Asset_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_WF_Node_Asset_ID, Integer.valueOf(PP_WF_Node_Asset_ID)); + } + + /** Get PP_WF_Node_Asset_ID. + @return PP_WF_Node_Asset_ID */ + public int getPP_WF_Node_Asset_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_WF_Node_Asset_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first + */ + public void setSeqNo (int SeqNo) + { + set_ValueNoCheck (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); + } + + /** Get Sequence. + @return Method of ordering records; lowest number comes first + */ + public int getSeqNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/compiere/model/X_M_ForecastLine.java b/base/src/org/eevolution/model/X_PP_WF_Node_Product.java similarity index 51% rename from base/src/org/compiere/model/X_M_ForecastLine.java rename to base/src/org/eevolution/model/X_PP_WF_Node_Product.java index defa73a42a..fdc9a7a868 100644 --- a/base/src/org/compiere/model/X_M_ForecastLine.java +++ b/base/src/org/eevolution/model/X_PP_WF_Node_Product.java @@ -15,20 +15,20 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.compiere.model; +package org.eevolution.model; import java.lang.reflect.Constructor; import java.math.BigDecimal; import java.sql.ResultSet; import java.util.Properties; import java.util.logging.Level; +import org.compiere.model.*; import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; -/** Generated Model for M_ForecastLine +/** Generated Model for PP_WF_Node_Product * @author Adempiere (generated) - * @version Release 3.4.0s - $Id$ */ -public class X_M_ForecastLine extends PO implements I_M_ForecastLine, I_Persistent + * @version Release 3.5.1a - $Id$ */ +public class X_PP_WF_Node_Product extends PO implements I_PP_WF_Node_Product, I_Persistent { /** @@ -37,28 +37,27 @@ public class X_M_ForecastLine extends PO implements I_M_ForecastLine, I_Persiste private static final long serialVersionUID = 1L; /** Standard Constructor */ - public X_M_ForecastLine (Properties ctx, int M_ForecastLine_ID, String trxName) + public X_PP_WF_Node_Product (Properties ctx, int PP_WF_Node_Product_ID, String trxName) { - super (ctx, M_ForecastLine_ID, trxName); - /** if (M_ForecastLine_ID == 0) + super (ctx, PP_WF_Node_Product_ID, trxName); + /** if (PP_WF_Node_Product_ID == 0) { - setC_Period_ID (0); - setM_ForecastLine_ID (0); - setM_Forecast_ID (0); + setAD_WF_Node_ID (0); + setEntityType (null); +// U setM_Product_ID (0); - setQty (Env.ZERO); - setQtyCalculated (Env.ZERO); + setPP_WF_Node_Product_ID (0); } */ } /** Load Constructor */ - public X_M_ForecastLine (Properties ctx, ResultSet rs, String trxName) + public X_PP_WF_Node_Product (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } /** AccessLevel - * @return 2 - Client + * @return 3 - Client - Org */ protected int get_AccessLevel() { @@ -74,19 +73,19 @@ public class X_M_ForecastLine extends PO implements I_M_ForecastLine, I_Persiste public String toString() { - StringBuffer sb = new StringBuffer ("X_M_ForecastLine[") + StringBuffer sb = new StringBuffer ("X_PP_WF_Node_Product[") .append(get_ID()).append("]"); return sb.toString(); } - public I_C_Period getC_Period() throws Exception + public I_AD_WF_Node getAD_WF_Node() throws Exception { - Class clazz = MTable.getClass(I_C_Period.Table_Name); - I_C_Period result = null; + Class clazz = MTable.getClass(I_AD_WF_Node.Table_Name); + I_AD_WF_Node result = null; try { Constructor constructor = null; constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Period)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Period_ID()), get_TrxName()}); + result = (I_AD_WF_Node)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_WF_Node_ID()), get_TrxName()}); } catch (Exception e) { log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); @@ -95,94 +94,83 @@ public class X_M_ForecastLine extends PO implements I_M_ForecastLine, I_Persiste return result; } - /** Set Period. - @param C_Period_ID - Period of the Calendar + /** Set Node. + @param AD_WF_Node_ID + Workflow Node (activity), step or process */ - public void setC_Period_ID (int C_Period_ID) + public void setAD_WF_Node_ID (int AD_WF_Node_ID) { - if (C_Period_ID < 1) - throw new IllegalArgumentException ("C_Period_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID)); + if (AD_WF_Node_ID < 1) + throw new IllegalArgumentException ("AD_WF_Node_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_AD_WF_Node_ID, Integer.valueOf(AD_WF_Node_ID)); } - /** Get Period. - @return Period of the Calendar + /** Get Node. + @return Workflow Node (activity), step or process */ - public int getC_Period_ID () + public int getAD_WF_Node_ID () { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID); + Integer ii = (Integer)get_Value(COLUMNNAME_AD_WF_Node_ID); if (ii == null) return 0; return ii.intValue(); } - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), String.valueOf(getC_Period_ID())); - } - - /** Set Forecast Line. - @param M_ForecastLine_ID - Forecast Line + /** ConfigurationLevel AD_Reference_ID=53222 */ + public static final int CONFIGURATIONLEVEL_AD_Reference_ID=53222; + /** System = S */ + public static final String CONFIGURATIONLEVEL_System = "S"; + /** Client = C */ + public static final String CONFIGURATIONLEVEL_Client = "C"; + /** Organization = O */ + public static final String CONFIGURATIONLEVEL_Organization = "O"; + /** Set Configuration Level. + @param ConfigurationLevel + Configuration Level for this parameter */ - public void setM_ForecastLine_ID (int M_ForecastLine_ID) + public void setConfigurationLevel (String ConfigurationLevel) { - if (M_ForecastLine_ID < 1) - throw new IllegalArgumentException ("M_ForecastLine_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_ForecastLine_ID, Integer.valueOf(M_ForecastLine_ID)); + + if (ConfigurationLevel == null || ConfigurationLevel.equals("S") || ConfigurationLevel.equals("C") || ConfigurationLevel.equals("O")); else throw new IllegalArgumentException ("ConfigurationLevel Invalid value - " + ConfigurationLevel + " - Reference_ID=53222 - S - C - O"); + if (ConfigurationLevel != null && ConfigurationLevel.length() > 1) + { + log.warning("Length > 1 - truncated"); + ConfigurationLevel = ConfigurationLevel.substring(0, 1); + } + set_Value (COLUMNNAME_ConfigurationLevel, ConfigurationLevel); } - /** Get Forecast Line. - @return Forecast Line + /** Get Configuration Level. + @return Configuration Level for this parameter */ - public int getM_ForecastLine_ID () + public String getConfigurationLevel () { - Integer ii = (Integer)get_Value(COLUMNNAME_M_ForecastLine_ID); - if (ii == null) - return 0; - return ii.intValue(); + return (String)get_Value(COLUMNNAME_ConfigurationLevel); } - public I_M_Forecast getM_Forecast() throws Exception - { - Class clazz = MTable.getClass(I_M_Forecast.Table_Name); - I_M_Forecast result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_Forecast)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Forecast_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Forecast. - @param M_Forecast_ID - Material Forecast + /** EntityType AD_Reference_ID=389 */ + public static final int ENTITYTYPE_AD_Reference_ID=389; + /** Set Entity Type. + @param EntityType + Dictionary Entity Type; Determines ownership and synchronization */ - public void setM_Forecast_ID (int M_Forecast_ID) + public void setEntityType (String EntityType) { - if (M_Forecast_ID < 1) - throw new IllegalArgumentException ("M_Forecast_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Forecast_ID, Integer.valueOf(M_Forecast_ID)); + + if (EntityType.length() > 40) + { + log.warning("Length > 40 - truncated"); + EntityType = EntityType.substring(0, 40); + } + set_Value (COLUMNNAME_EntityType, EntityType); } - /** Get Forecast. - @return Material Forecast + /** Get Entity Type. + @return Dictionary Entity Type; Determines ownership and synchronization */ - public int getM_Forecast_ID () + public String getEntityType () { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Forecast_ID); - if (ii == null) - return 0; - return ii.intValue(); + return (String)get_Value(COLUMNNAME_EntityType); } public I_M_Product getM_Product() throws Exception @@ -209,7 +197,7 @@ public class X_M_ForecastLine extends PO implements I_M_ForecastLine, I_Persiste { if (M_Product_ID < 1) throw new IllegalArgumentException ("M_Product_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Product. @@ -223,14 +211,31 @@ public class X_M_ForecastLine extends PO implements I_M_ForecastLine, I_Persiste return ii.intValue(); } + /** Set PP_WF_Node_Product_ID. + @param PP_WF_Node_Product_ID PP_WF_Node_Product_ID */ + public void setPP_WF_Node_Product_ID (int PP_WF_Node_Product_ID) + { + if (PP_WF_Node_Product_ID < 1) + throw new IllegalArgumentException ("PP_WF_Node_Product_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_PP_WF_Node_Product_ID, Integer.valueOf(PP_WF_Node_Product_ID)); + } + + /** Get PP_WF_Node_Product_ID. + @return PP_WF_Node_Product_ID */ + public int getPP_WF_Node_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_WF_Node_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Quantity. @param Qty Quantity */ public void setQty (BigDecimal Qty) { - if (Qty == null) - throw new IllegalArgumentException ("Qty is mandatory."); set_Value (COLUMNNAME_Qty, Qty); } @@ -245,25 +250,23 @@ public class X_M_ForecastLine extends PO implements I_M_ForecastLine, I_Persiste return bd; } - /** Set Calculated Quantity. - @param QtyCalculated - Calculated Quantity + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first */ - public void setQtyCalculated (BigDecimal QtyCalculated) + public void setSeqNo (int SeqNo) { - if (QtyCalculated == null) - throw new IllegalArgumentException ("QtyCalculated is mandatory."); - set_Value (COLUMNNAME_QtyCalculated, QtyCalculated); + set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } - /** Get Calculated Quantity. - @return Calculated Quantity + /** Get Sequence. + @return Method of ordering records; lowest number comes first */ - public BigDecimal getQtyCalculated () + public int getSeqNo () { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyCalculated); - if (bd == null) - return Env.ZERO; - return bd; + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); } } \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_QM_Specification.java b/base/src/org/eevolution/model/X_QM_Specification.java new file mode 100644 index 0000000000..5ada81635b --- /dev/null +++ b/base/src/org/eevolution/model/X_QM_Specification.java @@ -0,0 +1,353 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for QM_Specification + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_QM_Specification extends PO implements I_QM_Specification, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_QM_Specification (Properties ctx, int QM_Specification_ID, String trxName) + { + super (ctx, QM_Specification_ID, trxName); + /** if (QM_Specification_ID == 0) + { + setM_AttributeSet_ID (0); + setM_Product_ID (0); + setQM_Specification_ID (0); + } */ + } + + /** Load Constructor */ + public X_QM_Specification (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() + { + StringBuffer sb = new StringBuffer ("X_QM_Specification[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Workflow getAD_Workflow() throws Exception + { + Class clazz = MTable.getClass(I_AD_Workflow.Table_Name); + I_AD_Workflow result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_Workflow)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Workflow_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Workflow. + @param AD_Workflow_ID + Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID) + { + if (AD_Workflow_ID < 1) + set_Value (COLUMNNAME_AD_Workflow_ID, null); + else + set_Value (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); + } + + /** Get Workflow. + @return Workflow or combination of tasks + */ + public int getAD_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 255); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + public I_M_AttributeSet getM_AttributeSet() throws Exception + { + Class clazz = MTable.getClass(I_M_AttributeSet.Table_Name); + I_M_AttributeSet result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_AttributeSet)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_AttributeSet_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Attribute Set. + @param M_AttributeSet_ID + Product Attribute Set + */ + public void setM_AttributeSet_ID (int M_AttributeSet_ID) + { + if (M_AttributeSet_ID < 0) + throw new IllegalArgumentException ("M_AttributeSet_ID is mandatory."); + set_Value (COLUMNNAME_M_AttributeSet_ID, Integer.valueOf(M_AttributeSet_ID)); + } + + /** Get Attribute Set. + @return Product Attribute Set + */ + public int getM_AttributeSet_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSet_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + throw new IllegalArgumentException ("M_Product_ID is mandatory."); + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + + if (Name != null && Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 60); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOM.Table_Name); + org.eevolution.model.I_PP_Product_BOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Product_BOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Product_BOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set BOM & Formula. + @param PP_Product_BOM_ID + BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) + { + if (PP_Product_BOM_ID < 1) + set_Value (COLUMNNAME_PP_Product_BOM_ID, null); + else + set_Value (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID)); + } + + /** Get BOM & Formula. + @return BOM & Formula + */ + public int getPP_Product_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set QM_Specification_ID. + @param QM_Specification_ID QM_Specification_ID */ + public void setQM_Specification_ID (int QM_Specification_ID) + { + if (QM_Specification_ID < 1) + throw new IllegalArgumentException ("QM_Specification_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_QM_Specification_ID, Integer.valueOf(QM_Specification_ID)); + } + + /** Get QM_Specification_ID. + @return QM_Specification_ID */ + public int getQM_Specification_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_QM_Specification_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_QM_SpecificationLine.java b/base/src/org/eevolution/model/X_QM_SpecificationLine.java new file mode 100644 index 0000000000..d603a16b4d --- /dev/null +++ b/base/src/org/eevolution/model/X_QM_SpecificationLine.java @@ -0,0 +1,328 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for QM_SpecificationLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_QM_SpecificationLine extends PO implements I_QM_SpecificationLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_QM_SpecificationLine (Properties ctx, int QM_SpecificationLine_ID, String trxName) + { + super (ctx, QM_SpecificationLine_ID, trxName); + /** if (QM_SpecificationLine_ID == 0) + { + setAndOr (null); + setM_Attribute_ID (0); + setOperation (null); + setQM_SpecificationLine_ID (0); + } */ + } + + /** Load Constructor */ + public X_QM_SpecificationLine (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() + { + StringBuffer sb = new StringBuffer ("X_QM_SpecificationLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** AndOr AD_Reference_ID=204 */ + public static final int ANDOR_AD_Reference_ID=204; + /** And = A */ + public static final String ANDOR_And = "A"; + /** Or = O */ + public static final String ANDOR_Or = "O"; + /** Set And/Or. + @param AndOr + Logical operation: AND or OR + */ + public void setAndOr (String AndOr) + { + if (AndOr == null) throw new IllegalArgumentException ("AndOr is mandatory"); + if (AndOr.equals("A") || AndOr.equals("O")); else throw new IllegalArgumentException ("AndOr Invalid value - " + AndOr + " - Reference_ID=204 - A - O"); + if (AndOr.length() > 1) + { + log.warning("Length > 1 - truncated"); + AndOr = AndOr.substring(0, 1); + } + set_Value (COLUMNNAME_AndOr, AndOr); + } + + /** Get And/Or. + @return Logical operation: AND or OR + */ + public String getAndOr () + { + return (String)get_Value(COLUMNNAME_AndOr); + } + + public I_M_Attribute getM_Attribute() throws Exception + { + Class clazz = MTable.getClass(I_M_Attribute.Table_Name); + I_M_Attribute result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Attribute)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Attribute_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Attribute. + @param M_Attribute_ID + Product Attribute + */ + public void setM_Attribute_ID (int M_Attribute_ID) + { + if (M_Attribute_ID < 1) + throw new IllegalArgumentException ("M_Attribute_ID is mandatory."); + set_Value (COLUMNNAME_M_Attribute_ID, Integer.valueOf(M_Attribute_ID)); + } + + /** Get Attribute. + @return Product Attribute + */ + public int getM_Attribute_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Attribute_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Operation AD_Reference_ID=205 */ + public static final int OPERATION_AD_Reference_ID=205; + /** = = == */ + public static final String OPERATION_Eq = "=="; + /** >= = >= */ + public static final String OPERATION_GtEq = ">="; + /** > = >> */ + public static final String OPERATION_Gt = ">>"; + /** < = << */ + public static final String OPERATION_Le = "<<"; + /** ~ = ~~ */ + public static final String OPERATION_Like = "~~"; + /** <= = <= */ + public static final String OPERATION_LeEq = "<="; + /** || = AB */ + public static final String OPERATION_X = "AB"; + /** sql = SQ */ + public static final String OPERATION_Sql = "SQ"; + /** != = != */ + public static final String OPERATION_NotEq = "!="; + /** Set Operation. + @param Operation + Compare Operation + */ + public void setOperation (String Operation) + { + if (Operation == null) throw new IllegalArgumentException ("Operation is mandatory"); + if (Operation.equals("==") || Operation.equals(">=") || Operation.equals(">>") || Operation.equals("<<") || Operation.equals("~~") || Operation.equals("<=") || Operation.equals("AB") || Operation.equals("SQ") || Operation.equals("!=")); else throw new IllegalArgumentException ("Operation Invalid value - " + Operation + " - Reference_ID=205 - == - >= - >> - << - ~~ - <= - AB - SQ - !="); + if (Operation.length() > 2) + { + log.warning("Length > 2 - truncated"); + Operation = Operation.substring(0, 2); + } + set_Value (COLUMNNAME_Operation, Operation); + } + + /** Get Operation. + @return Compare Operation + */ + public String getOperation () + { + return (String)get_Value(COLUMNNAME_Operation); + } + + /** Set QM_SpecificationLine_ID. + @param QM_SpecificationLine_ID QM_SpecificationLine_ID */ + public void setQM_SpecificationLine_ID (int QM_SpecificationLine_ID) + { + if (QM_SpecificationLine_ID < 1) + throw new IllegalArgumentException ("QM_SpecificationLine_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_QM_SpecificationLine_ID, Integer.valueOf(QM_SpecificationLine_ID)); + } + + /** Get QM_SpecificationLine_ID. + @return QM_SpecificationLine_ID */ + public int getQM_SpecificationLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_QM_SpecificationLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_QM_Specification getQM_Specification() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_QM_Specification.Table_Name); + org.eevolution.model.I_QM_Specification result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_QM_Specification)constructor.newInstance(new Object[] {getCtx(), new Integer(getQM_Specification_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set QM_Specification_ID. + @param QM_Specification_ID QM_Specification_ID */ + public void setQM_Specification_ID (int QM_Specification_ID) + { + if (QM_Specification_ID < 1) + set_ValueNoCheck (COLUMNNAME_QM_Specification_ID, null); + else + set_ValueNoCheck (COLUMNNAME_QM_Specification_ID, Integer.valueOf(QM_Specification_ID)); + } + + /** Get QM_Specification_ID. + @return QM_Specification_ID */ + public int getQM_Specification_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_QM_Specification_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first + */ + public void setSeqNo (int SeqNo) + { + set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); + } + + /** Get Sequence. + @return Method of ordering records; lowest number comes first + */ + public int getSeqNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (String ValidFrom) + { + + if (ValidFrom != null && ValidFrom.length() > 22) + { + log.warning("Length > 22 - truncated"); + ValidFrom = ValidFrom.substring(0, 22); + } + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public String getValidFrom () + { + return (String)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + + if (Value != null && Value.length() > 40) + { + log.warning("Length > 40 - truncated"); + Value = Value.substring(0, 40); + } + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_RV_PP_Order_BOMLine.java b/base/src/org/eevolution/model/X_RV_PP_Order_BOMLine.java new file mode 100644 index 0000000000..64eeca9643 --- /dev/null +++ b/base/src/org/eevolution/model/X_RV_PP_Order_BOMLine.java @@ -0,0 +1,106 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +import org.compiere.model.*; +/** Generated Model for RV_PP_Order_BOMLine + * @author Adempiere (generated) + * @version Release 3.1.5 - $Id$ */ +public class X_RV_PP_Order_BOMLine extends PO +{ +/** Standard Constructor +@param ctx context +@param RV_PP_Order_BOMLine_ID id +@param trxName transaction +*/ +public X_RV_PP_Order_BOMLine (Properties ctx, int RV_PP_Order_BOMLine_ID, String trxName) +{ +super (ctx, RV_PP_Order_BOMLine_ID, trxName); +/** if (RV_PP_Order_BOMLine_ID == 0) +{ +setRV_PP_Order_BOMLine_ID (0); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_RV_PP_Order_BOMLine (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** AD_Table_ID=50056 */ +public static final int Table_ID=MTable.getTable_ID("RV_PP_Order_BOMLine"); + +/** TableName=RV_PP_Order_BOMLine */ +public static final String Table_Name="RV_PP_Order_BOMLine"; + +protected static KeyNamePair Model = new KeyNamePair(Table_ID,"RV_PP_Order_BOMLine"); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_RV_PP_Order_BOMLine[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set RV_PP_Order_BOMLine. +@param RV_PP_Order_BOMLine_ID RV_PP_Order_BOMLine */ +public void setRV_PP_Order_BOMLine_ID (int RV_PP_Order_BOMLine_ID) +{ +if (RV_PP_Order_BOMLine_ID < 1) throw new IllegalArgumentException ("RV_PP_Order_BOMLine_ID is mandatory."); +set_ValueNoCheck ("RV_PP_Order_BOMLine_ID", Integer.valueOf(RV_PP_Order_BOMLine_ID)); +} +/** Get RV_PP_Order_BOMLine. +@return RV_PP_Order_BOMLine */ +public int getRV_PP_Order_BOMLine_ID() +{ +Integer ii = (Integer)get_Value("RV_PP_Order_BOMLine_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name RV_PP_Order_BOMLine_ID */ +public static final String COLUMNNAME_RV_PP_Order_BOMLine_ID = "RV_PP_Order_BOMLine_ID"; +} diff --git a/base/src/org/eevolution/model/X_RV_PP_Order_Storage.java b/base/src/org/eevolution/model/X_RV_PP_Order_Storage.java new file mode 100644 index 0000000000..ed10d92011 --- /dev/null +++ b/base/src/org/eevolution/model/X_RV_PP_Order_Storage.java @@ -0,0 +1,106 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +import org.compiere.model.*; +/** Generated Model for RV_PP_Order_Storage + * @author Adempiere (generated) + * @version Release 3.1.5 - $Id$ */ +public class X_RV_PP_Order_Storage extends PO +{ +/** Standard Constructor +@param ctx context +@param RV_PP_Order_Storage_ID id +@param trxName transaction +*/ +public X_RV_PP_Order_Storage (Properties ctx, int RV_PP_Order_Storage_ID, String trxName) +{ +super (ctx, RV_PP_Order_Storage_ID, trxName); +/** if (RV_PP_Order_Storage_ID == 0) +{ +setRV_PP_Order_Storage_ID (0); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_RV_PP_Order_Storage (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** AD_Table_ID=50057 */ +public static final int Table_ID=MTable.getTable_ID("RV_PP_Order_Storage"); + +/** TableName=RV_PP_Order_Storage */ +public static final String Table_Name="RV_PP_Order_Storage"; + +protected static KeyNamePair Model = new KeyNamePair(Table_ID,"RV_PP_Order_Storage"); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_RV_PP_Order_Storage[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set RV_PP_Order_Storage. +@param RV_PP_Order_Storage_ID RV_PP_Order_Storage */ +public void setRV_PP_Order_Storage_ID (int RV_PP_Order_Storage_ID) +{ +if (RV_PP_Order_Storage_ID < 1) throw new IllegalArgumentException ("RV_PP_Order_Storage_ID is mandatory."); +set_ValueNoCheck ("RV_PP_Order_Storage_ID", Integer.valueOf(RV_PP_Order_Storage_ID)); +} +/** Get RV_PP_Order_Storage. +@return RV_PP_Order_Storage */ +public int getRV_PP_Order_Storage_ID() +{ +Integer ii = (Integer)get_Value("RV_PP_Order_Storage_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name RV_PP_Order_Storage_ID */ +public static final String COLUMNNAME_RV_PP_Order_Storage_ID = "RV_PP_Order_Storage_ID"; +} diff --git a/base/src/org/eevolution/model/X_RV_PP_Product_BOMLine.java b/base/src/org/eevolution/model/X_RV_PP_Product_BOMLine.java new file mode 100644 index 0000000000..d9749ff8f7 --- /dev/null +++ b/base/src/org/eevolution/model/X_RV_PP_Product_BOMLine.java @@ -0,0 +1,631 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; +import org.compiere.util.Env; + +/** Generated Model for RV_PP_Product_BOMLine + * @author Adempiere (generated) + * @version Release 3.5.0 - $Id$ */ +public class X_RV_PP_Product_BOMLine extends PO implements I_RV_PP_Product_BOMLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_RV_PP_Product_BOMLine (Properties ctx, int RV_PP_Product_BOMLine_ID, String trxName) + { + super (ctx, RV_PP_Product_BOMLine_ID, trxName); + /** if (RV_PP_Product_BOMLine_ID == 0) + { + setLine (0); + setQtyBatch (Env.ZERO); + } */ + } + + /** Load Constructor */ + public X_RV_PP_Product_BOMLine (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 7 - System - 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() + { + StringBuffer sb = new StringBuffer ("X_RV_PP_Product_BOMLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_PInstance getAD_PInstance() throws Exception + { + Class clazz = MTable.getClass(I_AD_PInstance.Table_Name); + I_AD_PInstance result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_PInstance)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_PInstance_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Process Instance. + @param AD_PInstance_ID + Instance of the process + */ + public void setAD_PInstance_ID (int AD_PInstance_ID) + { + if (AD_PInstance_ID < 1) + set_Value (COLUMNNAME_AD_PInstance_ID, null); + else + set_Value (COLUMNNAME_AD_PInstance_ID, Integer.valueOf(AD_PInstance_ID)); + } + + /** Get Process Instance. + @return Instance of the process + */ + public int getAD_PInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** ComponentType AD_Reference_ID=53225 */ + public static final int COMPONENTTYPE_AD_Reference_ID=53225; + /** By Product = BY */ + public static final String COMPONENTTYPE_ByProduct = "BY"; + /** Component = CO */ + public static final String COMPONENTTYPE_Component = "CO"; + /** Phantom = PH */ + public static final String COMPONENTTYPE_Phantom = "PH"; + /** Packing = PK */ + public static final String COMPONENTTYPE_Packing = "PK"; + /** Planning = PL */ + public static final String COMPONENTTYPE_Planning = "PL"; + /** Tools = TL */ + public static final String COMPONENTTYPE_Tools = "TL"; + /** Option = OP */ + public static final String COMPONENTTYPE_Option = "OP"; + /** Variant = VA */ + public static final String COMPONENTTYPE_Variant = "VA"; + /** Set ComponentType. + @param ComponentType ComponentType */ + public void setComponentType (String ComponentType) + { + + if (ComponentType == null || ComponentType.equals("BY") || ComponentType.equals("CO") || ComponentType.equals("PH") || ComponentType.equals("PK") || ComponentType.equals("PL") || ComponentType.equals("TL") || ComponentType.equals("OP") || ComponentType.equals("VA")); else throw new IllegalArgumentException ("ComponentType Invalid value - " + ComponentType + " - Reference_ID=53225 - BY - CO - PH - PK - PL - TL - OP - VA"); + if (ComponentType != null && ComponentType.length() > 2) + { + log.warning("Length > 2 - truncated"); + ComponentType = ComponentType.substring(0, 2); + } + set_Value (COLUMNNAME_ComponentType, ComponentType); + } + + /** Get ComponentType. + @return ComponentType */ + public String getComponentType () + { + return (String)get_Value(COLUMNNAME_ComponentType); + } + + public I_C_UOM getC_UOM() throws Exception + { + Class clazz = MTable.getClass(I_C_UOM.Table_Name); + I_C_UOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_UOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_UOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set UOM. + @param C_UOM_ID + Unit of Measure + */ + public void setC_UOM_ID (int C_UOM_ID) + { + if (C_UOM_ID < 1) + set_Value (COLUMNNAME_C_UOM_ID, null); + else + set_Value (COLUMNNAME_C_UOM_ID, Integer.valueOf(C_UOM_ID)); + } + + /** Get UOM. + @return Unit of Measure + */ + public int getC_UOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_UOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 510) + { + log.warning("Length > 510 - truncated"); + Description = Description.substring(0, 510); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Implotion. + @param Implotion Implotion */ + public void setImplotion (boolean Implotion) + { + set_Value (COLUMNNAME_Implotion, Boolean.valueOf(Implotion)); + } + + /** Get Implotion. + @return Implotion */ + public boolean isImplotion () + { + Object oo = get_Value(COLUMNNAME_Implotion); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set IsCritical. + @param IsCritical IsCritical */ + public void setIsCritical (boolean IsCritical) + { + set_Value (COLUMNNAME_IsCritical, Boolean.valueOf(IsCritical)); + } + + /** Get IsCritical. + @return IsCritical */ + public boolean isCritical () + { + Object oo = get_Value(COLUMNNAME_IsCritical); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set IsQtyPercentage. + @param IsQtyPercentage IsQtyPercentage */ + public void setIsQtyPercentage (boolean IsQtyPercentage) + { + set_Value (COLUMNNAME_IsQtyPercentage, Boolean.valueOf(IsQtyPercentage)); + } + + /** Get IsQtyPercentage. + @return IsQtyPercentage */ + public boolean isQtyPercentage () + { + Object oo = get_Value(COLUMNNAME_IsQtyPercentage); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** IssueMethod AD_Reference_ID=53226 */ + public static final int ISSUEMETHOD_AD_Reference_ID=53226; + /** Issue = 0 */ + public static final String ISSUEMETHOD_Issue = "0"; + /** BackFlush = 1 */ + public static final String ISSUEMETHOD_BackFlush = "1"; + /** Set IssueMethod. + @param IssueMethod IssueMethod */ + public void setIssueMethod (String IssueMethod) + { + + if (IssueMethod == null || IssueMethod.equals("0") || IssueMethod.equals("1")); else throw new IllegalArgumentException ("IssueMethod Invalid value - " + IssueMethod + " - Reference_ID=53226 - 0 - 1"); + if (IssueMethod != null && IssueMethod.length() > 1) + { + log.warning("Length > 1 - truncated"); + IssueMethod = IssueMethod.substring(0, 1); + } + set_Value (COLUMNNAME_IssueMethod, IssueMethod); + } + + /** Get IssueMethod. + @return IssueMethod */ + public String getIssueMethod () + { + return (String)get_Value(COLUMNNAME_IssueMethod); + } + + /** Set Level no. + @param LevelNo Level no */ + public void setLevelNo (int LevelNo) + { + set_Value (COLUMNNAME_LevelNo, Integer.valueOf(LevelNo)); + } + + /** Get Level no. + @return Level no */ + public int getLevelNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_LevelNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Levels. + @param Levels Levels */ + public void setLevels (String Levels) + { + + if (Levels != null && Levels.length() > 250) + { + log.warning("Length > 250 - truncated"); + Levels = Levels.substring(0, 250); + } + set_Value (COLUMNNAME_Levels, Levels); + } + + /** Get Levels. + @return Levels */ + public String getLevels () + { + return (String)get_Value(COLUMNNAME_Levels); + } + + /** Set Line No. + @param Line + Unique line for this document + */ + public void setLine (int Line) + { + set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); + } + + /** Get Line No. + @return Unique line for this document + */ + public int getLine () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Line); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Attribute Set Instance. + @param M_AttributeSetInstance_ID + Product Attribute Set Instance + */ + public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) + { + if (M_AttributeSetInstance_ID < 1) + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); + else + set_Value (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID)); + } + + /** Get Attribute Set Instance. + @return Product Attribute Set Instance + */ + public int getM_AttributeSetInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + set_Value (COLUMNNAME_M_Product_ID, null); + else + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOM.Table_Name); + org.eevolution.model.I_PP_Product_BOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Product_BOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Product_BOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set BOM & Formaula. + @param PP_Product_BOM_ID BOM & Formaula */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) + { + if (PP_Product_BOM_ID < 1) + set_Value (COLUMNNAME_PP_Product_BOM_ID, null); + else + set_Value (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID)); + } + + /** Get BOM & Formaula. + @return BOM & Formaula */ + public int getPP_Product_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Product_BOMLine getPP_Product_BOMLine() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOMLine.Table_Name); + org.eevolution.model.I_PP_Product_BOMLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Product_BOMLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Product_BOMLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set PP_Product_BOMLine_ID. + @param PP_Product_BOMLine_ID PP_Product_BOMLine_ID */ + public void setPP_Product_BOMLine_ID (int PP_Product_BOMLine_ID) + { + if (PP_Product_BOMLine_ID < 1) + set_Value (COLUMNNAME_PP_Product_BOMLine_ID, null); + else + set_Value (COLUMNNAME_PP_Product_BOMLine_ID, Integer.valueOf(PP_Product_BOMLine_ID)); + } + + /** Get PP_Product_BOMLine_ID. + @return PP_Product_BOMLine_ID */ + public int getPP_Product_BOMLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOMLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set QtyBatch. + @param QtyBatch QtyBatch */ + public void setQtyBatch (BigDecimal QtyBatch) + { + if (QtyBatch == null) + throw new IllegalArgumentException ("QtyBatch is mandatory."); + set_Value (COLUMNNAME_QtyBatch, QtyBatch); + } + + /** Get QtyBatch. + @return QtyBatch */ + public BigDecimal getQtyBatch () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBatch); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set QtyBOM. + @param QtyBOM QtyBOM */ + public void setQtyBOM (BigDecimal QtyBOM) + { + set_Value (COLUMNNAME_QtyBOM, QtyBOM); + } + + /** Get QtyBOM. + @return QtyBOM */ + public BigDecimal getQtyBOM () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyBOM); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Scrap. + @param Scrap Scrap */ + public void setScrap (BigDecimal Scrap) + { + set_Value (COLUMNNAME_Scrap, Scrap); + } + + /** Get Scrap. + @return Scrap */ + public BigDecimal getScrap () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Scrap); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first + */ + public void setSeqNo (int SeqNo) + { + set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); + } + + /** Get Sequence. + @return Method of ordering records; lowest number comes first + */ + public int getSeqNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** TM_Product_ID AD_Reference_ID=162 */ + public static final int TM_PRODUCT_ID_AD_Reference_ID=162; + /** Set TM_Product_ID. + @param TM_Product_ID + Product, Service, Item + */ + public void setTM_Product_ID (int TM_Product_ID) + { + if (TM_Product_ID < 1) + set_Value (COLUMNNAME_TM_Product_ID, null); + else + set_Value (COLUMNNAME_TM_Product_ID, Integer.valueOf(TM_Product_ID)); + } + + /** Get TM_Product_ID. + @return Product, Service, Item + */ + public int getTM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_TM_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Valid from. + @param ValidFrom + Valid from including this date (first day) + */ + public void setValidFrom (Timestamp ValidFrom) + { + set_Value (COLUMNNAME_ValidFrom, ValidFrom); + } + + /** Get Valid from. + @return Valid from including this date (first day) + */ + public Timestamp getValidFrom () + { + return (Timestamp)get_Value(COLUMNNAME_ValidFrom); + } + + /** Set Valid to. + @param ValidTo + Valid to including this date (last day) + */ + public void setValidTo (Timestamp ValidTo) + { + set_Value (COLUMNNAME_ValidTo, ValidTo); + } + + /** Get Valid to. + @return Valid to including this date (last day) + */ + public Timestamp getValidTo () + { + return (Timestamp)get_Value(COLUMNNAME_ValidTo); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_S_Resource.java b/base/src/org/eevolution/model/X_S_Resource.java new file mode 100644 index 0000000000..3aba686ef6 --- /dev/null +++ b/base/src/org/eevolution/model/X_S_Resource.java @@ -0,0 +1,381 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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 * + *****************************************************************************/ +package org.eevolution.model; + +/** Generated Model - DO NOT CHANGE */ +import java.util.*; +import java.sql.*; +import java.math.*; +import org.compiere.util.*; +import org.compiere.util.*; +import org.compiere.model.*; +/** Generated Model for S_Resource + * @author Adempiere (generated) + * @version Release 3.1.5 - $Id$ */ +public class X_S_Resource extends PO +{ +/** Standard Constructor +@param ctx context +@param S_Resource_ID id +@param trxName transaction +*/ +public X_S_Resource (Properties ctx, int S_Resource_ID, String trxName) +{ +super (ctx, S_Resource_ID, trxName); +/** if (S_Resource_ID == 0) +{ +setIsAvailable (true); // Y +setM_Warehouse_ID (0); +setName (null); +setS_ResourceType_ID (0); +setS_Resource_ID (0); +setValue (null); +} + */ +} +/** Load Constructor +@param ctx context +@param rs result set +@param trxName transaction +*/ +public X_S_Resource (Properties ctx, ResultSet rs, String trxName) +{ +super (ctx, rs, trxName); +} +/** AD_Table_ID=487 */ +public static final int Table_ID=MTable.getTable_ID("S_Resource"); + +/** TableName=S_Resource */ +public static final String Table_Name="S_Resource"; + +protected static KeyNamePair Model = new KeyNamePair(Table_ID,"S_Resource"); + +protected BigDecimal accessLevel = BigDecimal.valueOf(3); +/** AccessLevel +@return 3 - Client - Org +*/ +protected int get_AccessLevel() +{ +return accessLevel.intValue(); +} +/** Load Meta Data +@param ctx context +@return PO Info +*/ +protected POInfo initPO (Properties ctx) +{ +POInfo poi = POInfo.getPOInfo (ctx, Table_ID); +return poi; +} +/** Info +@return info +*/ +public String toString() +{ +StringBuffer sb = new StringBuffer ("X_S_Resource[").append(get_ID()).append("]"); +return sb.toString(); +} +/** Set User/Contact. +@param AD_User_ID User within the system - Internal or Business Partner Contact */ +public void setAD_User_ID (int AD_User_ID) +{ +if (AD_User_ID <= 0) set_Value ("AD_User_ID", null); + else +set_Value ("AD_User_ID", Integer.valueOf(AD_User_ID)); +} +/** Get User/Contact. +@return User within the system - Internal or Business Partner Contact */ +public int getAD_User_ID() +{ +Integer ii = (Integer)get_Value("AD_User_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name AD_User_ID */ +public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; +/** Set Chargeable Quantity. +@param ChargeableQty Chargeable Quantity */ +public void setChargeableQty (BigDecimal ChargeableQty) +{ +set_Value ("ChargeableQty", ChargeableQty); +} +/** Get Chargeable Quantity. +@return Chargeable Quantity */ +public BigDecimal getChargeableQty() +{ +BigDecimal bd = (BigDecimal)get_Value("ChargeableQty"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name ChargeableQty */ +public static final String COLUMNNAME_ChargeableQty = "ChargeableQty"; +/** Set DailyCapacity. +@param DailyCapacity DailyCapacity */ +public void setDailyCapacity (BigDecimal DailyCapacity) +{ +set_Value ("DailyCapacity", DailyCapacity); +} +/** Get DailyCapacity. +@return DailyCapacity */ +public BigDecimal getDailyCapacity() +{ +BigDecimal bd = (BigDecimal)get_Value("DailyCapacity"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name DailyCapacity */ +public static final String COLUMNNAME_DailyCapacity = "DailyCapacity"; +/** Set Description. +@param Description Optional short description of the record */ +public void setDescription (String Description) +{ +if (Description != null && Description.length() > 255) +{ +log.warning("Length > 255 - truncated"); +Description = Description.substring(0,254); +} +set_Value ("Description", Description); +} +/** Get Description. +@return Optional short description of the record */ +public String getDescription() +{ +return (String)get_Value("Description"); +} +/** Column name Description */ +public static final String COLUMNNAME_Description = "Description"; +/** Set Available. +@param IsAvailable Resource is available */ +public void setIsAvailable (boolean IsAvailable) +{ +set_Value ("IsAvailable", Boolean.valueOf(IsAvailable)); +} +/** Get Available. +@return Resource is available */ +public boolean isAvailable() +{ +Object oo = get_Value("IsAvailable"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsAvailable */ +public static final String COLUMNNAME_IsAvailable = "IsAvailable"; +/** Set IsManufacturingResource. +@param IsManufacturingResource IsManufacturingResource */ +public void setIsManufacturingResource (boolean IsManufacturingResource) +{ +set_Value ("IsManufacturingResource", Boolean.valueOf(IsManufacturingResource)); +} +/** Get IsManufacturingResource. +@return IsManufacturingResource */ +public boolean isManufacturingResource() +{ +Object oo = get_Value("IsManufacturingResource"); +if (oo != null) +{ + if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); +} +return false; +} +/** Column name IsManufacturingResource */ +public static final String COLUMNNAME_IsManufacturingResource = "IsManufacturingResource"; +/** Set Warehouse. +@param M_Warehouse_ID Storage Warehouse and Service Point */ +public void setM_Warehouse_ID (int M_Warehouse_ID) +{ +if (M_Warehouse_ID < 1) throw new IllegalArgumentException ("M_Warehouse_ID is mandatory."); +set_Value ("M_Warehouse_ID", Integer.valueOf(M_Warehouse_ID)); +} +/** Get Warehouse. +@return Storage Warehouse and Service Point */ +public int getM_Warehouse_ID() +{ +Integer ii = (Integer)get_Value("M_Warehouse_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name M_Warehouse_ID */ +public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; + +/** ManufacturingResourceType AD_Reference_ID=50008 */ +public static final int MANUFACTURINGRESOURCETYPE_AD_Reference_ID=50008; +/** Production Line = PL */ +public static final String MANUFACTURINGRESOURCETYPE_ProductionLine = "PL"; +/** Plant = PT */ +public static final String MANUFACTURINGRESOURCETYPE_Plant = "PT"; +/** Work Center = WC */ +public static final String MANUFACTURINGRESOURCETYPE_WorkCenter = "WC"; +/** Work Station = WS */ +public static final String MANUFACTURINGRESOURCETYPE_WorkStation = "WS"; +/** Set ManufacturingResourceType. +@param ManufacturingResourceType ManufacturingResourceType */ +public void setManufacturingResourceType (String ManufacturingResourceType) +{ +if (ManufacturingResourceType == null || ManufacturingResourceType.equals("PL") || ManufacturingResourceType.equals("PT") || ManufacturingResourceType.equals("WC") || ManufacturingResourceType.equals("WS")); + else throw new IllegalArgumentException ("ManufacturingResourceType Invalid value - " + ManufacturingResourceType + " - Reference_ID=50008 - PL - PT - WC - WS"); +if (ManufacturingResourceType != null && ManufacturingResourceType.length() > 2) +{ +log.warning("Length > 2 - truncated"); +ManufacturingResourceType = ManufacturingResourceType.substring(0,1); +} +set_Value ("ManufacturingResourceType", ManufacturingResourceType); +} +/** Get ManufacturingResourceType. +@return ManufacturingResourceType */ +public String getManufacturingResourceType() +{ +return (String)get_Value("ManufacturingResourceType"); +} +/** Column name ManufacturingResourceType */ +public static final String COLUMNNAME_ManufacturingResourceType = "ManufacturingResourceType"; +/** Set Name. +@param Name Alphanumeric identifier of the entity */ +public void setName (String Name) +{ +if (Name == null) throw new IllegalArgumentException ("Name is mandatory."); +if (Name.length() > 60) +{ +log.warning("Length > 60 - truncated"); +Name = Name.substring(0,59); +} +set_Value ("Name", Name); +} +/** Get Name. +@return Alphanumeric identifier of the entity */ +public String getName() +{ +return (String)get_Value("Name"); +} +/** Get Record ID/ColumnName +@return ID/ColumnName pair +*/public KeyNamePair getKeyNamePair() +{ +return new KeyNamePair(get_ID(), getName()); +} +/** Column name Name */ +public static final String COLUMNNAME_Name = "Name"; +/** Set PercentUtillization. +@param PercentUtillization PercentUtillization */ +public void setPercentUtillization (BigDecimal PercentUtillization) +{ +set_Value ("PercentUtillization", PercentUtillization); +} +/** Get PercentUtillization. +@return PercentUtillization */ +public BigDecimal getPercentUtillization() +{ +BigDecimal bd = (BigDecimal)get_Value("PercentUtillization"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name PercentUtillization */ +public static final String COLUMNNAME_PercentUtillization = "PercentUtillization"; +/** Set Queuing Time. +@param QueuingTime Queuing Time */ +public void setQueuingTime (BigDecimal QueuingTime) +{ +set_Value ("QueuingTime", QueuingTime); +} +/** Get Queuing Time. +@return Queuing Time */ +public BigDecimal getQueuingTime() +{ +BigDecimal bd = (BigDecimal)get_Value("QueuingTime"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name QueuingTime */ +public static final String COLUMNNAME_QueuingTime = "QueuingTime"; +/** Set Resource Type. +@param S_ResourceType_ID Resource Type */ +public void setS_ResourceType_ID (int S_ResourceType_ID) +{ +if (S_ResourceType_ID < 1) throw new IllegalArgumentException ("S_ResourceType_ID is mandatory."); +set_Value ("S_ResourceType_ID", Integer.valueOf(S_ResourceType_ID)); +} +/** Get Resource Type. +@return Resource Type */ +public int getS_ResourceType_ID() +{ +Integer ii = (Integer)get_Value("S_ResourceType_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name S_ResourceType_ID */ +public static final String COLUMNNAME_S_ResourceType_ID = "S_ResourceType_ID"; +/** Set Resource. +@param S_Resource_ID Resource */ +public void setS_Resource_ID (int S_Resource_ID) +{ +if (S_Resource_ID < 1) throw new IllegalArgumentException ("S_Resource_ID is mandatory."); +set_ValueNoCheck ("S_Resource_ID", Integer.valueOf(S_Resource_ID)); +} +/** Get Resource. +@return Resource */ +public int getS_Resource_ID() +{ +Integer ii = (Integer)get_Value("S_Resource_ID"); +if (ii == null) return 0; +return ii.intValue(); +} +/** Column name S_Resource_ID */ +public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; +/** Set Search Key. +@param Value Search key for the record in the format required - must be unique */ +public void setValue (String Value) +{ +if (Value == null) throw new IllegalArgumentException ("Value is mandatory."); +if (Value.length() > 40) +{ +log.warning("Length > 40 - truncated"); +Value = Value.substring(0,39); +} +set_Value ("Value", Value); +} +/** Get Search Key. +@return Search key for the record in the format required - must be unique */ +public String getValue() +{ +return (String)get_Value("Value"); +} +/** Column name Value */ +public static final String COLUMNNAME_Value = "Value"; +/** Set Waiting Time. +@param WaitingTime Workflow Simulation Waiting time */ +public void setWaitingTime (BigDecimal WaitingTime) +{ +set_Value ("WaitingTime", WaitingTime); +} +/** Get Waiting Time. +@return Workflow Simulation Waiting time */ +public BigDecimal getWaitingTime() +{ +BigDecimal bd = (BigDecimal)get_Value("WaitingTime"); +if (bd == null) return Env.ZERO; +return bd; +} +/** Column name WaitingTime */ +public static final String COLUMNNAME_WaitingTime = "WaitingTime"; +} diff --git a/base/src/org/eevolution/model/X_T_BOMLine.java b/base/src/org/eevolution/model/X_T_BOMLine.java new file mode 100644 index 0000000000..1613c39a3d --- /dev/null +++ b/base/src/org/eevolution/model/X_T_BOMLine.java @@ -0,0 +1,350 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for T_BOMLine + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_T_BOMLine extends PO implements I_T_BOMLine, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_T_BOMLine (Properties ctx, int T_BOMLine_ID, String trxName) + { + super (ctx, T_BOMLine_ID, trxName); + /** if (T_BOMLine_ID == 0) + { + setSel_Product_ID (0); + setT_BOMLine_ID (0); + } */ + } + + /** Load Constructor */ + public X_T_BOMLine (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 7 - System - 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() + { + StringBuffer sb = new StringBuffer ("X_T_BOMLine[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_PInstance getAD_PInstance() throws Exception + { + Class clazz = MTable.getClass(I_AD_PInstance.Table_Name); + I_AD_PInstance result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_PInstance)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_PInstance_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Process Instance. + @param AD_PInstance_ID + Instance of the process + */ + public void setAD_PInstance_ID (int AD_PInstance_ID) + { + if (AD_PInstance_ID < 1) + set_Value (COLUMNNAME_AD_PInstance_ID, null); + else + set_Value (COLUMNNAME_AD_PInstance_ID, Integer.valueOf(AD_PInstance_ID)); + } + + /** Get Process Instance. + @return Instance of the process + */ + public int getAD_PInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Implotion. + @param Implotion + Implosion of a Bill of Materials refers to finding all the BOM''s in which a component is used. + */ + public void setImplotion (boolean Implotion) + { + set_Value (COLUMNNAME_Implotion, Boolean.valueOf(Implotion)); + } + + /** Get Implotion. + @return Implosion of a Bill of Materials refers to finding all the BOM''s in which a component is used. + */ + public boolean isImplotion () + { + Object oo = get_Value(COLUMNNAME_Implotion); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Level no. + @param LevelNo Level no */ + public void setLevelNo (int LevelNo) + { + set_Value (COLUMNNAME_LevelNo, Integer.valueOf(LevelNo)); + } + + /** Get Level no. + @return Level no */ + public int getLevelNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_LevelNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Levels. + @param Levels Levels */ + public void setLevels (String Levels) + { + + if (Levels != null && Levels.length() > 250) + { + log.warning("Length > 250 - truncated"); + Levels = Levels.substring(0, 250); + } + set_Value (COLUMNNAME_Levels, Levels); + } + + /** Get Levels. + @return Levels */ + public String getLevels () + { + return (String)get_Value(COLUMNNAME_Levels); + } + + public I_M_Product getM_Product() throws Exception + { + Class clazz = MTable.getClass(I_M_Product.Table_Name); + I_M_Product result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_Product)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Product_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + set_Value (COLUMNNAME_M_Product_ID, null); + else + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Product_BOMLine getPP_Product_BOMLine() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOMLine.Table_Name); + org.eevolution.model.I_PP_Product_BOMLine result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Product_BOMLine)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Product_BOMLine_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set BOM Line. + @param PP_Product_BOMLine_ID + BOM Line + */ + public void setPP_Product_BOMLine_ID (int PP_Product_BOMLine_ID) + { + if (PP_Product_BOMLine_ID < 1) + set_Value (COLUMNNAME_PP_Product_BOMLine_ID, null); + else + set_Value (COLUMNNAME_PP_Product_BOMLine_ID, Integer.valueOf(PP_Product_BOMLine_ID)); + } + + /** Get BOM Line. + @return BOM Line + */ + public int getPP_Product_BOMLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOMLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception + { + Class clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOM.Table_Name); + org.eevolution.model.I_PP_Product_BOM result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (org.eevolution.model.I_PP_Product_BOM)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Product_BOM_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set BOM & Formula. + @param PP_Product_BOM_ID + BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) + { + if (PP_Product_BOM_ID < 1) + set_Value (COLUMNNAME_PP_Product_BOM_ID, null); + else + set_Value (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID)); + } + + /** Get BOM & Formula. + @return BOM & Formula + */ + public int getPP_Product_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Sel_Product_ID. + @param Sel_Product_ID Sel_Product_ID */ + public void setSel_Product_ID (int Sel_Product_ID) + { + if (Sel_Product_ID < 1) + throw new IllegalArgumentException ("Sel_Product_ID is mandatory."); + set_Value (COLUMNNAME_Sel_Product_ID, Integer.valueOf(Sel_Product_ID)); + } + + /** Get Sel_Product_ID. + @return Sel_Product_ID */ + public int getSel_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Sel_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first + */ + public void setSeqNo (int SeqNo) + { + set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); + } + + /** Get Sequence. + @return Method of ordering records; lowest number comes first + */ + public int getSeqNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set T_BOMLine_ID. + @param T_BOMLine_ID T_BOMLine_ID */ + public void setT_BOMLine_ID (int T_BOMLine_ID) + { + if (T_BOMLine_ID < 1) + throw new IllegalArgumentException ("T_BOMLine_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_T_BOMLine_ID, Integer.valueOf(T_BOMLine_ID)); + } + + /** Get T_BOMLine_ID. + @return T_BOMLine_ID */ + public int getT_BOMLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_T_BOMLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_T_MRP_CRP.java b/base/src/org/eevolution/model/X_T_MRP_CRP.java new file mode 100644 index 0000000000..3900b152bc --- /dev/null +++ b/base/src/org/eevolution/model/X_T_MRP_CRP.java @@ -0,0 +1,175 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 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.eevolution.model; + +import java.lang.reflect.Constructor; +import java.sql.ResultSet; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.model.*; + +/** Generated Model for T_MRP_CRP + * @author Adempiere (generated) + * @version Release 3.5.1a - $Id$ */ +public class X_T_MRP_CRP extends PO implements I_T_MRP_CRP, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_T_MRP_CRP (Properties ctx, int T_MRP_CRP_ID, String trxName) + { + super (ctx, T_MRP_CRP_ID, trxName); + /** if (T_MRP_CRP_ID == 0) + { + setT_MRP_CRP_ID (0); + } */ + } + + /** Load Constructor */ + public X_T_MRP_CRP (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() + { + StringBuffer sb = new StringBuffer ("X_T_MRP_CRP[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_PInstance getAD_PInstance() throws Exception + { + Class clazz = MTable.getClass(I_AD_PInstance.Table_Name); + I_AD_PInstance result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_PInstance)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_PInstance_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Process Instance. + @param AD_PInstance_ID + Instance of the process + */ + public void setAD_PInstance_ID (int AD_PInstance_ID) + { + if (AD_PInstance_ID < 1) + set_Value (COLUMNNAME_AD_PInstance_ID, null); + else + set_Value (COLUMNNAME_AD_PInstance_ID, Integer.valueOf(AD_PInstance_ID)); + } + + /** Get Process Instance. + @return Instance of the process + */ + public int getAD_PInstance_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 50) + { + log.warning("Length > 50 - truncated"); + Description = Description.substring(0, 50); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Sequence. + @param SeqNo + Method of ordering records; lowest number comes first + */ + public void setSeqNo (int SeqNo) + { + set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); + } + + /** Get Sequence. + @return Method of ordering records; lowest number comes first + */ + public int getSeqNo () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set T_MRP_CRP_ID. + @param T_MRP_CRP_ID T_MRP_CRP_ID */ + public void setT_MRP_CRP_ID (int T_MRP_CRP_ID) + { + if (T_MRP_CRP_ID < 1) + throw new IllegalArgumentException ("T_MRP_CRP_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_T_MRP_CRP_ID, Integer.valueOf(T_MRP_CRP_ID)); + } + + /** Get T_MRP_CRP_ID. + @return T_MRP_CRP_ID */ + public int getT_MRP_CRP_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_T_MRP_CRP_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/client/src/org/compiere/apps/AEnv.java b/client/src/org/compiere/apps/AEnv.java new file mode 100644 index 0000000000..0eda330bb3 --- /dev/null +++ b/client/src/org/compiere/apps/AEnv.java @@ -0,0 +1,1081 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.apps; + +import java.awt.*; +import java.awt.event.*; +import java.io.*; +import java.rmi.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import javax.swing.*; + +import org.compiere.apps.form.FormFrame; +import org.compiere.db.*; +import org.compiere.grid.ed.Calculator; +import org.compiere.interfaces.*; +import org.compiere.model.*; +import org.compiere.swing.*; +import org.compiere.util.*; + +/** + * Windows Application Environment and utilities + * + * @author Jorg Janke + * @version $Id: AEnv.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $ + * + * @author Colin Rooney (croo) & kstan_79 RFE#1670185 + * @author victor.perez@e-evolution.com + * @see FR [ 1966328 ] New Window Info to MRP and CRP into View http://sourceforge.net/tracker/index.php?func=detail&aid=1966328&group_id=176962&atid=879335 + * + */ +public final class AEnv +{ + /** + * Show window: de-iconify and bring it to front + * @author teo_sarca [ 1707221 ] + */ + public static void showWindow(Window window) { + window.setVisible(true); + if (window instanceof Frame) { + Frame f = (Frame)window; + int state = f.getExtendedState(); + if ((state & Frame.ICONIFIED) > 0) + f.setExtendedState(state & ~Frame.ICONIFIED); + } + window.toFront(); + } + + /** + * Show in the center of the screen. + * (pack, set location and set visibility) + * @param window Window to position + */ + public static void showCenterScreen(Window window) + { + positionCenterScreen(window); + showWindow(window); + } // showCenterScreen + + /** + * Show frame as maximized. + * @param frame + */ + public static void showMaximized(Frame frame) + { + frame.pack(); + frame.setExtendedState(Frame.MAXIMIZED_BOTH); + frame.setVisible(true); + frame.toFront(); + } + + /** + * Position window in center of the screen + * @param window Window to position + */ + public static void positionCenterScreen(Window window) + { + positionScreen (window, SwingConstants.CENTER); + } // positionCenterScreen + + /** + * Show in the center of the screen. + * (pack, set location and set visibility) + * @param window Window to position + * @param position SwingConstants + */ + public static void showScreen(Window window, int position) + { + positionScreen(window, position); + showWindow(window); + } // showScreen + + + /** + * Position window in center of the screen + * @param window Window to position + * @param position SwingConstants + */ + public static void positionScreen (Window window, int position) + { + window.pack(); + Dimension sSize = Toolkit.getDefaultToolkit().getScreenSize(); + // take into account task bar and other adornments + GraphicsConfiguration config = window.getGraphicsConfiguration(); + Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(config); + sSize.width -= (insets.left + insets.right); + sSize.height -= (insets.top + insets.bottom); + + Dimension wSize = window.getSize(); + // fit on window + if (wSize.height > sSize.height) + wSize.height = sSize.height; + if (wSize.width > sSize.width) + wSize.width = sSize.width; + window.setSize(wSize); + // Center + int x = (sSize.width - wSize.width) / 2; + int y = (sSize.height - wSize.height) / 2; + if (position == SwingConstants.CENTER) + ; + else if (position == SwingConstants.NORTH_WEST) + { + x = 0; + y = 0; + } + else if (position == SwingConstants.NORTH) + { + y = 0; + } + else if (position == SwingConstants.NORTH_EAST) + { + x = (sSize.width - wSize.width); + y = 0; + } + else if (position == SwingConstants.WEST) + { + x = 0; + } + else if (position == SwingConstants.EAST) + { + x = (sSize.width - wSize.width); + } + else if (position == SwingConstants.SOUTH) + { + y = (sSize.height - wSize.height); + } + else if (position == SwingConstants.SOUTH_WEST) + { + x = 0; + y = (sSize.height - wSize.height); + } + else if (position == SwingConstants.SOUTH_EAST) + { + x = (sSize.width - wSize.width); + y = (sSize.height - wSize.height); + } + // + window.setLocation(x + insets.left, y + insets.top); + } // positionScreen + + /** + * Position in center of the parent window. + * (pack, set location and set visibility) + * @param parent Parent Window + * @param window Window to position + */ + public static void showCenterWindow(Window parent, Window window) + { + positionCenterWindow(parent, window); + showWindow(window); + } // showCenterWindow + + /** + * Position in center of the parent window + * + * @param parent Parent Window + * @param window Window to position + */ + public static void positionCenterWindow(Window parent, Window window) + { + if (parent == null) + { + positionCenterScreen(window); + return; + } + window.pack(); + // + Dimension sSize = Toolkit.getDefaultToolkit().getScreenSize(); + // take into account task bar and other adornments + GraphicsConfiguration config = window.getGraphicsConfiguration(); + Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(config); + sSize.width -= (insets.left + insets.right); + sSize.height -= (insets.top + insets.bottom); + + Dimension wSize = window.getSize(); + // fit on window + if (wSize.height > sSize.height) + wSize.height = sSize.height; + if (wSize.width > sSize.width) + wSize.width = sSize.width; + window.setSize(wSize); + // center in parent + Rectangle pBounds = parent.getBounds(); + // Parent is in upper left corner + if (pBounds.x == pBounds.y && pBounds.x == 0) + { + positionCenterScreen(window); + return; + } + // Find middle + int x = pBounds.x + ((pBounds.width-wSize.width)/2); + if (x < 0) + x = 0; + int y = pBounds.y + ((pBounds.height-wSize.height)/2); + if (y < 0) + y = 0; + + // Is it on Screen? + if (x + wSize.width > sSize.width) + x = sSize.width - wSize.width; + if (y + wSize.height > sSize.height) + y = sSize.height - wSize.height; + // + // System.out.println("Position: x=" + x + " y=" + y + " w=" + wSize.getWidth() + " h=" + wSize.getHeight() + // + " - Parent loc x=" + pLoc.x + " y=" + y + " w=" + pSize.getWidth() + " h=" + pSize.getHeight()); + window.setLocation(x + insets.left, y + insets.top); + } // positionCenterScreen + + + /************************************************************************* + * Get Button + * @param iconName + * @return button + */ + public static CButton getButton (String iconName) + { + CButton button = new CButton(Env.getImageIcon(iconName + "16.gif")); + button.setMargin(new Insets (0, 0, 0, 0)); + button.setToolTipText(Msg.getMsg(Env.getCtx(), iconName)); + button.setDefaultCapable(false); + return button; + } // getButton + + + /** + * Create Menu Title (translate it and set Mnemonics). + * Based on MS notation of &Help => H is Mnemonics + * + * @param AD_Message message + * @return JMenu + */ + public static JMenu getMenu (String AD_Message) + { + JMenu menu = new JMenu(); + String text = Msg.getMsg(Env.getCtx(), AD_Message); + int pos = text.indexOf('&'); + if (pos != -1 && text.length() > pos) // We have a nemonic + { + char ch = text.toUpperCase().charAt(pos+1); + if (ch != ' ') + { + text = text.substring(0, pos) + text.substring(pos+1); + menu.setMnemonic(ch); + } + } + menu.setText(text); + return menu; + } // getMenu + + /** + * Create Menu Item. + * @param actionName action command + * @param iconName optional name of the icon, defaults to action if null + * @param ks optional key stroke + * @param menu menu to add menu item to + * @param al action listener to register + * @return MenuItem + */ + public static JMenuItem addMenuItem (String actionName, String iconName, KeyStroke ks, + JMenu menu, ActionListener al) + { + if (iconName == null) + iconName = actionName; + String text = Msg.getMsg(Env.getCtx(), actionName); + ImageIcon icon = Env.getImageIcon2(iconName + "16"); + CMenuItem mi = new CMenuItem(text, icon); + mi.setActionCommand(actionName); + if (ks != null) + mi.setAccelerator(ks); + if (menu != null) + menu.add(mi); + if (al != null) + mi.addActionListener(al); + return mi; + } // addMenuItem + + /** + * Perform action command for common menu items. + * Created in AMenu.createMenu(), APanel.createMenu(), FormFrame.createMenu() + * @param actionCommand known action command + * @param WindowNo window no + * @param c Container parent + * @return true if actionCommand was found and performed + */ + public static boolean actionPerformed (String actionCommand, int WindowNo, Container c) + { + MRole role = MRole.getDefault(); + // File Menu ------------------------ + if (actionCommand.equals("PrintScreen")) + { + PrintScreenPainter.printScreen (Env.getFrame(c)); + } + else if (actionCommand.equals("ScreenShot")) + { + ScreenShot.createJPEG(Env.getFrame(c), null); + } + // else if (actionCommand.equals("Report")) + // { + // AEnv.showCenterScreen (new ProcessStart()); + // } + else if (actionCommand.equals("Exit")) + { + if (ADialog.ask(WindowNo, c, "ExitApplication?")) + { + AMenu aMenu = (AMenu)Env.getWindow(0); + aMenu.dispose() ; + } + } + else if (actionCommand.equals("Logout")) + { + AMenu aMenu = (AMenu)Env.getWindow(0); + aMenu.logout(); + } + + // View Menu ------------------------ + else if (actionCommand.equals("InfoProduct") && AEnv.canAccessInfo("PRODUCT")) + { + org.compiere.apps.search.Info.showProduct (Env.getFrame(c), WindowNo); + } + else if (actionCommand.equals("InfoBPartner") && AEnv.canAccessInfo("BPARTNER")) + { + org.compiere.apps.search.Info.showBPartner (Env.getFrame(c), WindowNo); + } + else if (actionCommand.equals("InfoAsset") && AEnv.canAccessInfo("ASSET")) + { + org.compiere.apps.search.Info.showAsset (Env.getFrame(c), WindowNo); + } + else if (actionCommand.equals("InfoAccount") && + MRole.getDefault().isShowAcct() && + AEnv.canAccessInfo("ACCOUNT")) + { + new org.compiere.acct.AcctViewer(); + } + else if (actionCommand.equals("InfoSchedule") && AEnv.canAccessInfo("SCHEDULE")) + { + new org.compiere.apps.search.InfoSchedule (Env.getFrame(c), null, false); + } + //FR [ 1966328 ] + else if (actionCommand.equals("InfoMRP") && AEnv.canAccessInfo("MRP")) + { + CFrame frame = (CFrame) Env.getFrame(c); + int m_menu_id = MMenu.getMenu_ID("MRP Info"); + AMenu menu = AEnv.getAMenu(frame); + AMenuStartItem form = new AMenuStartItem (m_menu_id, true, Msg.translate(Env.getCtx(), "MRP Info"), menu); // async load + form.start(); + } + else if (actionCommand.equals("InfoCRP") && AEnv.canAccessInfo("CRP")) + { + CFrame frame = (CFrame) Env.getFrame(c); + int m_menu_id = MMenu.getMenu_ID("CRP Info"); + AMenu menu = AEnv.getAMenu(frame); + AMenuStartItem form = new AMenuStartItem (m_menu_id, true, Msg.translate(Env.getCtx(), "CRP Info"), menu); // async load + form.start(); + } + else if (actionCommand.equals("InfoOrder") && AEnv.canAccessInfo("ORDER")) + { + org.compiere.apps.search.Info.showOrder (Env.getFrame(c), WindowNo, ""); + } + else if (actionCommand.equals("InfoInvoice") && AEnv.canAccessInfo("INVOICE")) + { + org.compiere.apps.search.Info.showInvoice (Env.getFrame(c), WindowNo, ""); + } + else if (actionCommand.equals("InfoInOut") && AEnv.canAccessInfo("INOUT")) + { + org.compiere.apps.search.Info.showInOut (Env.getFrame(c), WindowNo, ""); + } + else if (actionCommand.equals("InfoPayment") && AEnv.canAccessInfo("PAYMENT")) + { + org.compiere.apps.search.Info.showPayment (Env.getFrame(c), WindowNo, ""); + } + else if (actionCommand.equals("InfoCashLine") && AEnv.canAccessInfo("CASHJOURNAL")) + { + org.compiere.apps.search.Info.showCashLine (Env.getFrame(c), WindowNo, ""); + } + else if (actionCommand.equals("InfoAssignment") && AEnv.canAccessInfo("RESOURCE")) + { + org.compiere.apps.search.Info.showAssignment (Env.getFrame(c), WindowNo, ""); + } + + + // Go Menu ------------------------ + else if (actionCommand.equals("WorkFlow")) + { + startWorkflowProcess(0,0); + } + else if (actionCommand.equals("Home")) + { + showWindow(Env.getWindow(0)); + } + + // Tools Menu ------------------------ + else if (actionCommand.equals("Calculator")) + { + Calculator calc = new org.compiere.grid.ed.Calculator(Env.getFrame(c)); + calc.setDisposeOnEqual(false); + AEnv.showCenterScreen (calc); + } + else if (actionCommand.equals("Calendar")) + { + AEnv.showCenterScreen (new org.compiere.grid.ed.Calendar(Env.getFrame(c))); + } + else if (actionCommand.equals("Editor")) + { + AEnv.showCenterScreen (new org.compiere.grid.ed.Editor(Env.getFrame(c))); + } + else if (actionCommand.equals("Script")) + { + new BeanShellEditor(Env.getFrame(c)); + } + else if (actionCommand.equals("Preference")) + { + if (role.isShowPreference()) { + AEnv.showCenterScreen(new Preference (Env.getFrame(c), WindowNo)); + } + } + + // Help Menu ------------------------ + else if (actionCommand.equals("Online")) + { + Env.startBrowser(org.compiere.Adempiere.getOnlineHelpURL()); + } + else if (actionCommand.equals("EMailSupport")) + { + ADialog.createSupportEMail(Env.getFrame(c), Env.getFrame(c).getTitle(), "\n\n"); + } + else if (actionCommand.equals("About")) + { + AEnv.showCenterScreen(new AboutBox(Env.getFrame(c))); + } + else + return false; + // + return true; + } // actionPerformed + + /** + * Set Text and Mnemonic for Button. + * Create Mnemonics of text containing '&'. + * Based on MS notation of &Help => H is Mnemonics + * @param b The button + * @param text The text with optional Mnemonics + */ + public static void setTextMnemonic (JButton b, String text) + { + if (text == null || b == null) + return; + int pos = text.indexOf('&'); + if (pos != -1) // We have a nemonic + { + char ch = text.charAt(pos+1); + b.setMnemonic(ch); + b.setText(text.substring(0, pos) + text.substring(pos+1)); + } + b.setText(text); + } // setTextMnemonic + + /** + * Get Mnemonic character from text. + * @param text text with '&' + * @return Mnemonic or 0 + */ + public static char getMnemonic (String text) + { + int pos = text.indexOf('&'); + if (pos != -1) // We have a nemonic + return text.charAt(pos+1); + return 0; + } // getMnemonic + + + /************************************************************************* + * Zoom + * @param AD_Table_ID + * @param Record_ID + */ + public static void zoom (int AD_Table_ID, int Record_ID) + { + String TableName = null; + int AD_Window_ID = 0; + int PO_Window_ID = 0; + String sql = "SELECT TableName, AD_Window_ID, PO_Window_ID FROM AD_Table WHERE AD_Table_ID=?"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, AD_Table_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + TableName = rs.getString(1); + AD_Window_ID = rs.getInt(2); + PO_Window_ID = rs.getInt(3); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + // Nothing to Zoom to + if (TableName == null || AD_Window_ID == 0) + return; + + // PO Zoom ? + boolean isSOTrx = true; + if (PO_Window_ID != 0) + { + String whereClause = TableName + "_ID=" + Record_ID; + isSOTrx = DB.isSOTrx(TableName, whereClause); + if (!isSOTrx) + AD_Window_ID = PO_Window_ID; + } + + log.config(TableName + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")"); + AWindow frame = new AWindow(); + if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID))) + return; + addToWindowManager(frame); + if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED)) + { + AEnv.showMaximized(frame); + } + else + { + AEnv.showCenterScreen(frame); + } + frame = null; + } // zoom + + /** + * Zoom + * @param query query + */ + public static void zoom (MQuery query) + { + if (query == null || query.getTableName() == null || query.getTableName().length() == 0) + return; + String TableName = query.getTableName(); + int AD_Window_ID = 0; + int PO_Window_ID = 0; + String sql = "SELECT AD_Window_ID, PO_Window_ID FROM AD_Table WHERE TableName=?"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setString(1, TableName); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + AD_Window_ID = rs.getInt(1); + PO_Window_ID = rs.getInt(2); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + // Nothing to Zoom to + if (AD_Window_ID == 0) + return; + + // PO Zoom ? + boolean isSOTrx = true; + if (PO_Window_ID != 0) + { + isSOTrx = DB.isSOTrx(TableName, query.getWhereClause(false)); + if (!isSOTrx) + AD_Window_ID = PO_Window_ID; + } + + log.config(query + " (IsSOTrx=" + isSOTrx + ")"); + AWindow frame = new AWindow(); + if (!frame.initWindow(AD_Window_ID, query)) + return; + addToWindowManager(frame); + if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED)) + { + AEnv.showMaximized(frame); + } + else + { + AEnv.showCenterScreen(frame); + } + frame = null; + } // zoom + + /** + * Track open frame in window manager + * @param frame + */ + public static void addToWindowManager(CFrame frame) + { + JFrame top = Env.getWindow(0); + if (top instanceof AMenu) + { + ((AMenu)top).getWindowManager().add(frame); + } + } + + /** + * FR [ 1966328 ] + * get AMenu + * @param frame + */ + public static AMenu getAMenu(CFrame frame) + { + JFrame top = Env.getWindow(0); + if (top instanceof AMenu) + { + return (AMenu)top; + } + return null; + } + /** + * Exit System + * @param status System exit status (usually 0 for no error) + */ + public static void exit (int status) + { + if (s_server != null) + { + try + { + s_server.remove(); + } + catch (Exception ex) + { + } + } + Env.exitEnv(status); + } // exit + + public static void logout() + { + if (s_server != null) + { + try + { + s_server.remove(); + } + catch (Exception ex) + { + } + } + Env.logout(); + + Splash.getSplash().setVisible(true); + + //reload + new AMenu(); + } + + /** + * Is Workflow Process view enabled. + * @return true if enabled + */ + public static boolean isWorkflowProcess () + { + if (s_workflow == null) + { + s_workflow = Boolean.FALSE; + int AD_Table_ID = 645; // AD_WF_Process + if (MRole.getDefault().isTableAccess (AD_Table_ID, true)) // RO + s_workflow = Boolean.TRUE; + else + { + AD_Table_ID = 644; // AD_WF_Activity + if (MRole.getDefault().isTableAccess (AD_Table_ID, true)) // RO + s_workflow = Boolean.TRUE; + else + log.config(s_workflow.toString()); + } + // Get Window + if (s_workflow.booleanValue()) + { + s_workflow_Window_ID = DB.getSQLValue (null, + "SELECT AD_Window_ID FROM AD_Table WHERE AD_Table_ID=?", AD_Table_ID); + if (s_workflow_Window_ID == 0) + s_workflow_Window_ID = 297; // fallback HARDCODED + // s_workflow = Boolean.FALSE; + log.config(s_workflow + ", Window=" + s_workflow_Window_ID); + } + } + return s_workflow.booleanValue(); + } // isWorkflowProcess + + + /** + * Start Workflow Process Window + * @param AD_Table_ID optional table + * @param Record_ID optional record + */ + public static void startWorkflowProcess (int AD_Table_ID, int Record_ID) + { + if (s_workflow_Window_ID == 0) + return; + // + MQuery query = null; + if (AD_Table_ID != 0 && Record_ID != 0) + { + query = new MQuery("AD_WF_Process"); + query.addRestriction("AD_Table_ID", MQuery.EQUAL, AD_Table_ID); + query.addRestriction("Record_ID", MQuery.EQUAL, Record_ID); + } + // + AWindow frame = new AWindow(); + if (!frame.initWindow(s_workflow_Window_ID, query)) + return; + addToWindowManager(frame); + if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) ) { + frame.pack(); + frame.setExtendedState(Frame.MAXIMIZED_BOTH); + frame.setVisible(true); + frame.toFront(); + } else + AEnv.showCenterScreen(frame); + frame = null; + } // startWorkflowProcess + + + /*************************************************************************/ + + /** Workflow Menu */ + private static Boolean s_workflow = null; + /** Workflow Menu */ + private static int s_workflow_Window_ID = 0; + + /** Server Re-tries */ + private static int s_serverTries = 0; + /** Server Session */ + private static Server s_server = null; + /** Logger */ + private static CLogger log = CLogger.getCLogger(AEnv.class); + + /** + * Is AppsServer Active ? + * @return true if active + */ + public static boolean isServerActive() + { + boolean contactAgain = s_server == null && s_serverTries == 0; + boolean ok = CConnection.get().isAppsServerOK(contactAgain); + if (ok) + { + s_serverTries = 0; + return true; + } + if (s_serverTries > 1) // try twice + return false; + + // Try to connect + CLogMgt.enable(false); + try + { + s_serverTries++; + log.config("try #" + s_serverTries); + ok = CConnection.get().isAppsServerOK(true); + if (ok) + s_serverTries = 0; + } + catch (Exception ex) + { + ok = false; + s_server = null; + } + CLogMgt.enable(true); + // + return ok; + } // isServerActive + + /** + * Get Server Version + * @return Apps Server Version + * @see ALogin#checkVersion + */ + public static String getServerVersion () + { + return CConnection.get().getServerVersion(); + } // getServerVersion + + /** Window Cache */ + private static CCache s_windows + = new CCache("AD_Window", 10); + + /** + * Get Window Model + * + * @param WindowNo Window No + * @param AD_Window_ID window + * @param AD_Menu_ID menu + * @return Model Window Value Obkect + */ + public static GridWindowVO getMWindowVO (int WindowNo, int AD_Window_ID, int AD_Menu_ID) + { + log.config("Window=" + WindowNo + ", AD_Window_ID=" + AD_Window_ID); + GridWindowVO mWindowVO = null; + if (AD_Window_ID != 0 && Ini.isCacheWindow()) // try cache + { + mWindowVO = s_windows.get(AD_Window_ID); + if (mWindowVO != null) + { + mWindowVO = mWindowVO.clone(WindowNo); + log.info("Cached=" + mWindowVO); + } + } + // try to get from Server when enabled + if (mWindowVO == null && DB.isRemoteObjects() && isServerActive()) + { + log.config("trying server"); + try + { + s_server = CConnection.get().getServer(); + if (s_server != null) + { + mWindowVO = s_server.getWindowVO(Env.getCtx(), WindowNo, AD_Window_ID, AD_Menu_ID); + log.config("from Server: success"); + } + } + catch (RemoteException e) + { + log.log(Level.SEVERE, "(RE)", e); + mWindowVO = null; + s_server = null; + } + catch (Exception e) + { + Throwable tt = e.getCause(); + if (tt != null && tt instanceof InvalidClassException) + log.log(Level.SEVERE, "(Server<>Client class) " + tt); + else if (tt != null && tt instanceof NotSerializableException) + log.log(Level.SEVERE, "Serialization: " + tt.getMessage(), e); + else + log.log(Level.SEVERE, "ex", e); + mWindowVO = null; + s_server = null; + } + catch (Throwable t) + { + log.log(Level.SEVERE, t.toString()); + mWindowVO = null; + s_server = null; + } + if (mWindowVO != null) + s_windows.put(AD_Window_ID, mWindowVO); + } // from Server + + // Create Window Model on Client + if (mWindowVO == null) + { + log.config("create local"); + mWindowVO = GridWindowVO.create (Env.getCtx(), WindowNo, AD_Window_ID, AD_Menu_ID); + if (mWindowVO != null) + s_windows.put(AD_Window_ID, mWindowVO); + } // from Client + if (mWindowVO == null) + return null; + + // Check (remote) context + if (!mWindowVO.ctx.equals(Env.getCtx())) + { + // Remote Context is called by value, not reference + // Add Window properties to context + Enumeration keyEnum = mWindowVO.ctx.keys(); + while (keyEnum.hasMoreElements()) + { + String key = (String)keyEnum.nextElement(); + if (key.startsWith(WindowNo+"|")) + { + String value = mWindowVO.ctx.getProperty (key); + Env.setContext(Env.getCtx(), key, value); + } + } + // Sync Context + mWindowVO.setCtx(Env.getCtx()); + } + return mWindowVO; + } // getWindow + + /** + * Post Immediate + * @param WindowNo window + * @param AD_Table_ID Table ID of Document + * @param AD_Client_ID Client ID of Document + * @param Record_ID Record ID of this document + * @param force force posting + * @return null if success, otherwise error + */ + public static String postImmediate (int WindowNo, int AD_Client_ID, + int AD_Table_ID, int Record_ID, boolean force) + { + log.config("Window=" + WindowNo + + ", AD_Table_ID=" + AD_Table_ID + "/" + Record_ID + + ", Force=" + force); + + String error = null; + // try to get from Server when enabled + if (isServerActive()) + { + log.config("trying server"); + try + { + s_server = CConnection.get().getServer(); + if (s_server != null) + { + error = s_server.postImmediate(Env.getCtx(), AD_Client_ID, + AD_Table_ID, Record_ID, force, null); + log.config("from Server: " + error== null ? "OK" : error); + } + else + { + ADialog.error(WindowNo, null, "NoAppsServer"); + return "NoAppsServer"; + } + } + catch (RemoteException e) + { + log.log(Level.WARNING, "(RE)", e); + error = e.getMessage(); + s_server = null; + } + catch (Exception e) + { + log.log(Level.WARNING, "ex", e); + error = e.getMessage(); + s_server = null; + } + } + else + { + ADialog.error(WindowNo, null, "NoAppsServer"); + return "NoAppsServer"; + } + return error; + } // postImmediate + + /** + * Cache Reset + * @param tableName table name + * @param Record_ID record id + */ + public static void cacheReset (String tableName, int Record_ID) + { + log.config("TableName=" + tableName + ", Record_ID=" + Record_ID); + + // try to get from Server when enabled + if (isServerActive()) + { + log.config("trying server"); + try + { + Server server = CConnection.get().getServer(); + if (server != null) + { + server.cacheReset(tableName, Record_ID); + } + } + catch (RemoteException e) + { + log.log(Level.SEVERE, "(RE)", e); + s_server = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, "ex", e); + s_server = null; + } + } + } // cacheReset + + /** + * Update all windows after look and feel changes. + * @since 2006-11-27 + */ + public static void updateUI() + { + Set updated = Env.updateUI(); + JFrame top = Env.getWindow(0); + if (top instanceof AMenu) + { + CFrame[] frames = ((AMenu)top).getWindowManager().getWindows(); + for (CFrame f : frames) + { + if (updated.contains(f)) continue; + SwingUtilities.updateComponentTreeUI(f); + f.validate(); + RepaintManager mgr = RepaintManager.currentManager(f); + Component childs[] = f.getComponents(); + for (Component c : childs) { + if (c instanceof JComponent) + mgr.markCompletelyDirty((JComponent)c); + } + f.repaint(); + updated.add(f); + } + } + } + + /** + * Validate permissions to access Info queries on the view menu + * @author kstan_79 + * @return true if access is allowed + */ + + public static boolean canAccessInfo(String infoWindowName) + { + boolean result=false; + int roleid= Env.getAD_Role_ID(Env.getCtx()); + String sqlRolePermission="Select COUNT(AD_ROLE_ID) AS ROWCOUNT FROM AD_ROLE WHERE AD_ROLE_ID=" + roleid + + " AND ALLOW_INFO_" + infoWindowName + "='Y'"; + + log.config(sqlRolePermission); + PreparedStatement prolestmt = null; + ResultSet rs = null; + try + { + prolestmt = DB.prepareStatement (sqlRolePermission, null); + + rs = prolestmt.executeQuery (); + + rs.next(); + + if (rs.getInt("ROWCOUNT")>0) + { + result=true; + } + else + { + return false; + } + } + catch (Exception e) + { + System.out.println(e); + log.log(Level.SEVERE, "(1)", e); + } + finally + { + DB.close(rs, prolestmt); + rs = null; prolestmt = null; + } + + return result; + } // canAccessInfo + +} // AEnv diff --git a/client/src/org/compiere/apps/AMenu.java b/client/src/org/compiere/apps/AMenu.java new file mode 100644 index 0000000000..71ee78c2fe --- /dev/null +++ b/client/src/org/compiere/apps/AMenu.java @@ -0,0 +1,800 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.apps; + +import java.awt.BorderLayout; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Event; +import java.awt.Frame; +import java.awt.GridLayout; +import java.awt.Insets; +import java.awt.KeyboardFocusManager; +import java.awt.Point; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.math.BigDecimal; +import java.text.MessageFormat; +import java.util.Properties; +import java.util.logging.Level; + +import javax.swing.BorderFactory; +import javax.swing.Box; +import javax.swing.JComponent; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JProgressBar; +import javax.swing.KeyStroke; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import org.adempiere.apps.graph.PAPanel; +import org.compiere.Adempiere; +import org.compiere.apps.wf.WFActivity; +import org.compiere.apps.wf.WFPanel; +import org.compiere.grid.tree.VTreePanel; +import org.compiere.model.MRole; +import org.compiere.model.MSession; +import org.compiere.model.MSysConfig; +import org.compiere.model.MSystem; +import org.compiere.model.MTreeNode; +import org.compiere.model.MUser; +import org.compiere.swing.CButton; +import org.compiere.swing.CFrame; +import org.compiere.swing.CPanel; +import org.compiere.swing.CScrollPane; +import org.compiere.swing.CTabbedPane; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Ini; +import org.compiere.util.Language; +import org.compiere.util.Msg; +import org.compiere.util.Splash; +/** + * Application Menu Controller + * + * @author Jorg Janke + * @version $Id: AMenu.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $ + * + * @author Colin Rooney (croo) RFE#1670185 restrict access to info queries + * @author victor.perez@e-evolution.com + * @see FR [ 1966328 ] New Window Info to MRP and CRP into View http://sourceforge.net/tracker/index.php?func=detail&aid=1966328&group_id=176962&atid=879335 + * + */ +public final class AMenu extends CFrame + implements ActionListener, PropertyChangeListener, ChangeListener +{ + /** + * Application Start and Menu + */ + public AMenu () + { + super(); + log.info("CodeBase=" + Adempiere.getCodeBase()); + Splash splash = Splash.getSplash(); + // + m_WindowNo = Env.createWindowNo(this); + // Login + initSystem (splash); // login + splash.setText(Msg.getMsg(m_ctx, "Loading")); + splash.toFront(); + splash.paint(splash.getGraphics()); + + // + if (!Adempiere.startupEnvironment(true)) // Load Environment + System.exit(1); + MSession.get (Env.getCtx(), true); // Start Session + + // Setting close operation/listner - teo_sarca [ 1684168 ] + setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + addWindowListener(new WindowListener() { + public void windowClosing(WindowEvent e) { + if (!ADialog.ask(0, null, "ExitApplication?")) + return; + dispose(); + } + public void windowActivated(WindowEvent e) {} + public void windowClosed(WindowEvent e) {} + public void windowDeactivated(WindowEvent e) {} + public void windowDeiconified(WindowEvent e) {} + public void windowIconified(WindowEvent e) {} + public void windowOpened(WindowEvent e) {} + }); + + // Preparation + wfActivity = new WFActivity(this); + wfPanel = new WFPanel(this); + treePanel = new VTreePanel (m_WindowNo, true, false); // !editable & hasBar + + try + { + jbInit(); + createMenu(); + } + catch(Exception ex) + { + log.log(Level.SEVERE, "AMenu", ex); + } + + // initialize & load tree + int AD_Role_ID = Env.getAD_Role_ID(Env.getCtx()); + int AD_Tree_ID = DB.getSQLValue(null, + "SELECT COALESCE(r.AD_Tree_Menu_ID, ci.AD_Tree_Menu_ID)" + + "FROM AD_ClientInfo ci" + + " INNER JOIN AD_Role r ON (ci.AD_Client_ID=r.AD_Client_ID) " + + "WHERE AD_Role_ID=?", AD_Role_ID); + if (AD_Tree_ID <= 0) + AD_Tree_ID = 10; // Menu + treePanel.initTree(AD_Tree_ID); + + // Translate + Env.setContext(m_ctx, m_WindowNo, "WindowName", Msg.getMsg(m_ctx, "Menu")); + setTitle(Env.getHeader(m_ctx, m_WindowNo)); + + progressBar.setString(Msg.getMsg(m_ctx, "SelectProgram")); + + // Finish UI + Point loc = Ini.getWindowLocation(0); + if (loc == null) + loc = new Point(0,0); + this.setLocation(loc); + this.pack(); + this.setVisible(true); + if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED)) + this.setExtendedState(Frame.MAXIMIZED_BOTH); + else + this.setState(Frame.NORMAL); + this.validate(); + m_AD_User_ID = Env.getContextAsInt(m_ctx, "#AD_User_ID"); + m_AD_Role_ID = Env.getContextAsInt(m_ctx, "#AD_Role_ID"); + updateInfo(); + // + infoUpdater = new InfoUpdater(); + infoUpdaterThread = new Thread(infoUpdater, "InfoUpdater"); + infoUpdaterThread.start(); + // + splash.dispose(); + splash = null; + } // AMenu + + private int m_WindowNo; + private Properties m_ctx = Env.getCtx(); + private boolean m_startingItem = false; + /** The User */ + private int m_AD_User_ID; + /** The Role */ + private int m_AD_Role_ID; + + /** Center Tabbed Pane index: Menu */ + private int m_tabMenu = 0; + /** Center Tabbed Pane index: Activities */ + private int m_tabActivities = 1; + /** Center Tabbed Pane index: Workflow */ + private int m_tabWorkflow = 2; + + // Links + private int m_request_Menu_ID = 0; + private int m_note_Menu_ID = 0; + private String m_requestSQL = null; +// private DecimalFormat m_memoryFormat = DisplayType.getNumberFormat(DisplayType.Integer); + /** Logger */ + private static CLogger log = CLogger.getCLogger(AMenu.class); + + /** The Info Update instance **/ + private InfoUpdater infoUpdater = null; + /** The Info Update thread **/ + private Thread infoUpdaterThread = null; + + private WindowManager windowManager = new WindowManager(); + + + /************************************************************************** + * Init System. + * -- do not get Msg as environment not initialized yet -- + *
    +	 *	- Login - in not successful, exit
    +	 *  
    + * @param splash splash window + */ + private void initSystem (Splash splash) + { + // Default Image + this.setIconImage(Adempiere.getImage16()); + + // Focus Traversal + KeyboardFocusManager.setCurrentKeyboardFocusManager(AKeyboardFocusManager.get()); + // FocusManager.getCurrentManager().setDefaultFocusTraversalPolicy(AFocusTraversalPolicy.get()); + // this.setFocusTraversalPolicy(AFocusTraversalPolicy.get()); + + /** + * Show Login Screen - if not successful - exit + */ + log.finer("Login"); + + ALogin login = new ALogin(splash); + if (!login.initLogin()) // no automatic login + { + // Center the window + try + { + AEnv.showCenterScreen(login); // HTML load errors + } + catch (Exception ex) + { + log.severe(ex.toString()); + } + if (!login.isConnected() || !login.isOKpressed()) + AEnv.exit(1); + } + + // Check Build + if (!DB.isBuildOK(m_ctx)) + AEnv.exit(1); + + // Check DB (AppsServer Version checked in Login) + DB.isDatabaseOK(m_ctx); + } // initSystem + + // UI + private CPanel mainPanel = new CPanel(); + private BorderLayout mainLayout = new BorderLayout(); + private CTabbedPane centerPane = new CTabbedPane(); + private CPanel southPanel = new CPanel(); + private BorderLayout southLayout = new BorderLayout(); + private JMenuBar menuBar = new JMenuBar(); + protected JProgressBar progressBar = new JProgressBar(0,100); + private CPanel infoPanel = new CPanel(); + private CButton bNotes = new CButton(); + private CButton bRequests = new CButton(); + private GridLayout infoLayout = new GridLayout(); + private JProgressBar memoryBar = new JProgressBar(); + // Tabs + private PAPanel paPanel = null; + private VTreePanel treePanel = null; + private WFActivity wfActivity = null; + private WFPanel wfPanel = null; + private WindowMenu m_WindowMenu; + + /** + * Static Init. + *
    +	 *  - mainPanel
    +	 * 		- centerPane
    +	 *      	- treePanel
    +	 * 			- wfActivity
    +	 * 			- wfPanel
    +	 *      - southPanel
    +	 *          - infoPanel
    +	 *              - bNotes
    +	 *              - bTask
    +	 *              - memoryBar
    +	 *          - wfPanel
    +	 *          - progressBar
    +	 *  
    + * @throws Exception + */ + void jbInit() throws Exception + { + this.setName("Menu"); + this.setLocale(Language.getLoginLanguage().getLocale()); + this.setJMenuBar(menuBar); + // + mainPanel.setLayout(mainLayout); + mainLayout.setHgap(0); + mainLayout.setVgap(2); + // + treePanel.addPropertyChangeListener(VTreePanel.NODE_SELECTION, this); + // + infoPanel.setLayout(infoLayout); + infoLayout.setColumns(2); + infoLayout.setHgap(4); + infoLayout.setVgap(0); + // bNotes.setRequestFocusEnabled(false); + bNotes.setToolTipText(""); + bNotes.setActionCommand("Notes"); + bNotes.addActionListener(this); + bNotes.setIcon(Env.getImageIcon("GetMail24.gif")); + bNotes.setMargin(new Insets(0, 0, 0, 0)); + // bRequests.setRequestFocusEnabled(false); + bRequests.setActionCommand("Requests"); + bRequests.addActionListener(this); + bRequests.setIcon(Env.getImageIcon("Request24.gif")); + bRequests.setMargin(new Insets(0, 0, 0, 0)); + // + southLayout.setHgap(0); + southLayout.setVgap(1); + // + memoryBar.setStringPainted(true); + memoryBar.setOpaque(false); + memoryBar.setBorderPainted(false); + memoryBar.addMouseListener(new AMenu_MouseAdapter()); + // + progressBar.setStringPainted(true); + progressBar.setOpaque(false); + // + getContentPane().add(mainPanel); + mainPanel.add(centerPane, BorderLayout.CENTER); + mainPanel.add(southPanel, BorderLayout.SOUTH); + mainPanel.add(Box.createHorizontalStrut(3), BorderLayout.EAST); + mainPanel.add(Box.createHorizontalStrut(3), BorderLayout.WEST); + + // Tabs + centerPane.setFont(centerPane.getFont().deriveFont(centerPane.getFont().getSize2D()+1)); + paPanel = PAPanel.get(); + if (paPanel != null) + { + //centerPane.add(paPanel, Msg.getMsg(m_ctx, "PAPanel")); + centerPane.addTab(Msg.getMsg(m_ctx, "PAPanel"), Env.getImageIcon2("InfoAccount16"), paPanel); + m_tabMenu++; + m_tabActivities++; + m_tabWorkflow++; + } + treePanel.setBorder(BorderFactory.createEmptyBorder(2,3,2,3)); + //centerPane.add(treePanel, Msg.getMsg(m_ctx, "Menu")); + centerPane.addTab(Msg.getMsg(m_ctx, "Menu"), Env.getImageIcon2("Home16"), treePanel); + //centerPane.add(new CScrollPane(wfActivity), Msg.getMsg (m_ctx, "WorkflowActivities") + ": 0"); + centerPane.addTab(Msg.getMsg (m_ctx, "WorkflowActivities") + ": 0", Env.getImageIcon2("Assignment16"), new CScrollPane(wfActivity)); + //centerPane.add(new CScrollPane(wfPanel), Msg.getMsg (m_ctx, "WorkflowPanel")); + centerPane.addTab(Msg.getMsg (m_ctx, "WorkflowPanel"), Env.getImageIcon2("WorkFlow16"), new CScrollPane(wfPanel)); + centerPane.addChangeListener (this); + // + southPanel.setLayout(southLayout); + southPanel.add(infoPanel, BorderLayout.NORTH); + southPanel.add(progressBar, BorderLayout.SOUTH); + // + infoPanel.add(bNotes, null); + infoPanel.add(bRequests, null); + infoPanel.add(memoryBar, null); + // + int loc = Ini.getDividerLocation(); + if (loc > 0) + treePanel.setDividerLocation(loc); + } // jbInit + + /** + * Get Preferred Size + * @return preferred Size + */ + public Dimension getPreferredSize() + { + Dimension dim = Ini.getWindowDimension(0); + if (dim == null) + dim = new Dimension (350, 500); + return dim; + } // getPreferredSize + + + /** + * Create Menu + */ + private void createMenu() + { + // File + JMenu mFile = AEnv.getMenu("File"); + menuBar.add(mFile); + AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this); + AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, KeyEvent.SHIFT_MASK), mFile, this); + mFile.addSeparator(); + AEnv.addMenuItem("Logout", null, KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this); + AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this); + + // View + JMenu mView = AEnv.getMenu("View"); + menuBar.add(mView); + + if (MRole.getDefault().isAllow_Info_Product()) + { + AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this); + } + if (MRole.getDefault().isAllow_Info_BPartner()) + { + AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this); + } + if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account()) + { + AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this); + } + if (MRole.getDefault().isAllow_Info_Schedule()) + { + AEnv.addMenuItem("InfoSchedule", null, null, mView, this); + } + //FR [ 1966328 ] + if (MRole.getDefault().isAllow_Info_MRP()) + { + AEnv.addMenuItem("InfoMRP", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_CRP()) + { + AEnv.addMenuItem("InfoCRP", "Info", null, mView, this); + } + mView.addSeparator(); + if (MRole.getDefault().isAllow_Info_Order()) + { + AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Invoice()) + { + AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_InOut()) + { + AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Payment()) + { + AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_CashJournal()) + { + AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Resource()) + { + AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Asset()) + { + AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); + } + + // Tools + JMenu mTools = AEnv.getMenu("Tools"); + menuBar.add(mTools); + AEnv.addMenuItem("Calculator", null, null, mTools, this); + AEnv.addMenuItem("Calendar", null, null, mTools, this); + AEnv.addMenuItem("Editor", null, null, mTools, this); + MUser user = MUser.get(Env.getCtx()); + if (user.isAdministrator()) + AEnv.addMenuItem("Script", null, null, mTools, this); + if (AEnv.isWorkflowProcess()) + AEnv.addMenuItem("WorkFlow", null, null, mTools, this); + if (MRole.getDefault().isShowPreference()) + { + mTools.addSeparator(); + AEnv.addMenuItem("Preference", null, null, mTools, this); + } + + //Window Menu + m_WindowMenu = new WindowMenu(windowManager, this); + menuBar.add(m_WindowMenu); + KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK); + this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ks, "ShowAllWindow"); + AppsAction action = new AppsAction("ShowAllWindow", ks, false); + this.getRootPane().getActionMap().put("ShowAllWindow", action); + action.setDelegate(this); + + // Help + JMenu mHelp = AEnv.getMenu("Help"); + menuBar.add(mHelp); + AEnv.addMenuItem("Online", null, null, mHelp, this); + AEnv.addMenuItem("EMailSupport", null, null, mHelp, this); + AEnv.addMenuItem("About", null, null, mHelp, this); + } // createMenu + + /** + * Dispose - end system + */ + public void dispose() + { + preDispose(); + // + super.dispose(); + AEnv.exit(0); + } // dispose + + private void preDispose() { + // clean up - save window state + Ini.setWindowDimension(0, getSize()); + Ini.setDividerLocation(treePanel.getDividerLocation()); + Ini.setWindowLocation(0, getLocation()); + Ini.saveProperties(true); + // + infoUpdater.stop = true; + try { + infoUpdaterThread.join(50); + } catch(InterruptedException ire) { + } finally { + infoUpdaterThread = null; + infoUpdater = null; + } + } + + public void logout() + { + windowManager.close(); + preDispose(); + super.dispose(); + AEnv.logout(); + } + + /** + * Window Events - requestFocus + * @param e event + */ + protected void processWindowEvent(WindowEvent e) + { + super.processWindowEvent(e); + if (e.getID() == WindowEvent.WINDOW_OPENED) + { + treePanel.getSearchField().requestFocusInWindow(); + // this.toFront(); + } + } // processWindowEvent + + /** + * Set Busy + * @param value true if buzy + */ + protected void setBusy (boolean value) + { + m_startingItem = value; + if (value) + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + else + setCursor(Cursor.getDefaultCursor()); + // setEnabled (!value); // causes flicker + } // setBusy + + /** + * Selection in tree - launch Application + * @param e PropertyChangeEvent + */ + public void propertyChange(PropertyChangeEvent e) + { + MTreeNode nd = (MTreeNode)e.getNewValue(); + log.info(nd.getNode_ID() + " - " + nd.toString()); + + // ignore summary items & when loading + if (m_startingItem || nd.isSummary()) + return; + + String sta = nd.toString(); + progressBar.setString(sta); + int cmd = nd.getNode_ID(); + + (new AMenuStartItem(cmd, true, sta, this)).start(); // async load + //hengsin, updateInfo is call again in AMenuStartItem + //updateInfo(); + } // propertyChange + + + /************************************************************************** + * ActionListener + * @param e ActionEvent + */ + public void actionPerformed(ActionEvent e) + { + // Buttons + if (e.getSource() == bNotes) + gotoNotes(); + else if (e.getSource() == bRequests) + gotoRequests(); + else if (e.getActionCommand().equals("ShowAllWindow")) + m_WindowMenu.expose(); + else if (!AEnv.actionPerformed(e.getActionCommand(), m_WindowNo, this)) + log.log(Level.SEVERE, "unknown action=" + e.getActionCommand()); + //updateInfo(); + } // actionPerformed + + /** + * Get number of open Notes + * @return number of notes + */ + private int getNotes() + { + String sql = "SELECT COUNT(1) FROM AD_Note " + + "WHERE AD_Client_ID=? AND AD_User_ID IN (0,?)" + + " AND Processed='N'"; + int retValue = DB.getSQLValue(null, sql, Env.getAD_Client_ID(Env.getCtx()), m_AD_User_ID); + return retValue; + } // getNotes + + /** + * Open Note Window + */ + private void gotoNotes() + { + // AD_Table_ID for AD_Note = 389 HARDCODED + if (m_note_Menu_ID == 0) + m_note_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID " + + "FROM AD_Menu m" + + " INNER JOIN AD_TABLE t ON (t.AD_Window_ID=m.AD_Window_ID) " + + "WHERE t.AD_Table_ID=?", 389); + if (m_note_Menu_ID == 0) + m_note_Menu_ID = 233; // fallback HARDCODED + (new AMenuStartItem (m_note_Menu_ID, true, Msg.translate(m_ctx, "AD_Note_ID"), this)).start(); // async load + } // gotoMessage + + /** + * Ger Number of open Requests + * @return number of requests + */ + private int getRequests() + { + if (m_requestSQL == null) + m_requestSQL = MRole.getDefault().addAccessSQL ("SELECT COUNT(1) FROM R_Request " + + "WHERE (SalesRep_ID=? OR AD_Role_ID=?) AND Processed='N'" + + " AND (DateNextAction IS NULL OR TRUNC(DateNextAction) <= TRUNC(SysDate))" + + " AND (R_Status_ID IS NULL OR R_Status_ID IN (SELECT R_Status_ID FROM R_Status WHERE IsClosed='N'))", + "R_Request", false, true); // not qualified - RW + int retValue = DB.getSQLValue(null, m_requestSQL, m_AD_User_ID, m_AD_Role_ID); + return retValue; + } // getRequests + + /** + * Open Request Window + */ + private void gotoRequests() + { + // AD_Table_ID for R_Request = 417 HARDCODED + // if (m_request_Menu_ID == 0) // Goes to Request (all) + // m_request_Menu_ID = DB.getSQLValue (null, "SELECT AD_Menu_ID " + // + "FROM AD_Menu m" + // + " INNER JOIN AD_TABLE t ON (t.AD_Window_ID=m.AD_Window_ID) " + // + "WHERE t.AD_Table_ID=?", 417); + if (m_request_Menu_ID == 0) + m_request_Menu_ID = 237; // My Requests + (new AMenuStartItem (m_request_Menu_ID, true, Msg.translate(m_ctx, "R_Request_ID"), this)).start(); // async load + } // gotoRequests + + /** + * Show Memory Info - run GC if required - Update Requests/Memos/Activities + */ + public void updateInfo() + { + double total = Runtime.getRuntime().totalMemory() / 1024; + double free = Runtime.getRuntime().freeMemory() / 1024; + double used = total - free; + double percent = used * 100 / total; + // + memoryBar.setMaximum((int)total); + memoryBar.setValue((int)used); + String msg = MessageFormat.format("{0,number,integer} MB - {1,number,integer}%", + new Object[] {new BigDecimal(total / 1024), new BigDecimal(percent)}); + memoryBar.setString(msg); + // + // msg = MessageFormat.format("Total Memory {0,number,integer} kB - Free {1,number,integer} kB", + msg = Msg.getMsg(m_ctx, "MemoryInfo", + new Object[] {new BigDecimal(total), new BigDecimal(free)}); + memoryBar.setToolTipText(msg); + // progressBar.repaint(); + + // CarlosRuiz - globalqss - [ 1881285 ] Remove unnecessary calls to System.gc + // if (percent > 50) + // System.gc(); + + if (DB.isConnected()) + { + // Requests + int requests = getRequests(); + bRequests.setText(Msg.translate(m_ctx, "R_Request_ID") + ": " + requests); + // Memo + int notes = getNotes(); + bNotes.setText(Msg.translate(m_ctx, "AD_Note_ID") + ": " + notes); + // Activities + int activities = wfActivity.getActivitiesCount(); + centerPane.setTitleAt(m_tabActivities, Msg.getMsg (m_ctx, "WorkflowActivities") + ": " + activities); + /* + log.config(msg + + ", Processors=" + Runtime.getRuntime().availableProcessors() + + ", Requests=" + requests + ", Notes=" + notes + ", Activities=" + activities + + "," + CConnection.get().getStatus() + ); + */ + MSystem.get(m_ctx).info(); + } + } // updateInfo + + + /** + * Update Activities Label + */ + public void updateActivities(int act_length) + { + centerPane.setTitleAt(m_tabActivities, Msg.getMsg (m_ctx, "WorkflowActivities") + ": " + act_length); + } // updateInfo + + /************************************************************************* + * Start Workflow Activity + * @param AD_Workflow_ID id + */ + protected void startWorkFlow (int AD_Workflow_ID) + { + centerPane.setSelectedIndex(m_tabWorkflow); // switch + wfPanel.load(AD_Workflow_ID, false); + } // startWorkFlow + + + /** + * Change Listener (tab) + * @see javax.swing.event.ChangeListener#stateChanged(javax.swing.event.ChangeEvent) + * @param e event + */ + public void stateChanged (ChangeEvent e) + { + //updateInfo(); + // show activities + if (centerPane.getSelectedIndex() == m_tabActivities) + { + wfActivity.loadActivities(); + wfActivity.display(); + } + } // stateChanged + + public WindowManager getWindowManager() { + return windowManager; + } + + /************************************************************************** + * Mouse Listener + */ + class AMenu_MouseAdapter extends MouseAdapter + { + /** + * Invoked when the mouse has been clicked on a component. + * @param e evant + */ + public void mouseClicked(MouseEvent e) + { + if (e.getClickCount() > 1) + { + System.gc(); + //updateInfo(); + } + } + } // AMenu_MouseAdapter + + + /************************************************************************** + * OS Start + * @param args Array of String arguments (ignored) + */ + public static void main(String[] args) + { + Splash.getSplash(); + Adempiere.startup(true); // needs to be here for UI + new AMenu(); + } // main + + class InfoUpdater implements Runnable + { + boolean stop = false; + + public void run() + { + int sleep = MSysConfig.getIntValue("MENU_INFOUPDATER_SLEEP_MS", 60000, Env.getAD_Client_ID(Env.getCtx())); + while(stop == false) + { + updateInfo(); + + try { + Thread.sleep(sleep); + } catch(InterruptedException ire) { } + } + } + } + +} // AMenu diff --git a/client/src/org/compiere/apps/APanel.java b/client/src/org/compiere/apps/APanel.java new file mode 100644 index 0000000000..1197488627 --- /dev/null +++ b/client/src/org/compiere/apps/APanel.java @@ -0,0 +1,2515 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] + *****************************************************************************/ +package org.compiere.apps; + +import java.awt.*; +import java.awt.event.*; +import java.beans.PropertyChangeListener; +import java.util.*; +import java.util.logging.*; + +import javax.swing.*; +import javax.swing.event.*; +import org.compiere.apps.search.*; +import org.compiere.grid.*; +import org.compiere.grid.ed.*; +import org.compiere.model.*; +import org.compiere.plaf.*; +import org.compiere.print.*; +import org.compiere.process.*; +import org.compiere.swing.*; +import org.compiere.util.*; + +/** + * Main Panel of application window. + *
    + *  Structure:
    + *      (MenuBar) -> to be added to owning window
    + *		northPanel  (ToolBar)
    + *		tabPanel
    + *		southPanel  (StatusBar)
    + *  
    + * + * @author Jorg Janke + * @version $Id: APanel.java,v 1.4 2006/07/30 00:51:27 jjanke Exp $ + * + * Colin Rooney 2007/03/20 RFE#1670185 & related BUG#1684142 - Extend Sec to Info Queries + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] + * @contributor fer_luck@centuryon.com , FR [ 1757088 ] + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1824621 ] History button can't be canceled + *
  • BF [ 1941271 ] VTreePanel is modifying even if is save wasn't successfull + * @author victor.perez@e-evolution.com + * @see FR [ 1966328 ] New Window Info to MRP and CRP into View http://sourceforge.net/tracker/index.php?func=detail&aid=1966328&group_id=176962&atid=879335 + * + */ +public final class APanel extends CPanel + implements DataStatusListener, ChangeListener, ActionListener, ASyncProcess +{ + private boolean isNested = false; + + /** + * Constructs a new instance. + * Need to call initPanel for dynamic initialization + */ + //FR [ 1757088 ] + public APanel(GridController gc, int windowNo){ + super(); + isNested = true; + m_ctx = Env.getCtx(); + try{ + m_curGC = gc; + gc.addDataStatusListener(this); + m_curTab = gc.getMTab(); + + Component tabElement = null; + tabElement = gc; + VTabbedPane tabPane = new VTabbedPane(false); + tabPane.addTab(m_curTab.getName().toString(), m_curTab, tabElement); + m_curWinTab = tabPane; + m_curWindowNo = windowNo; + jbInit(); + initSwitchLineAction(); + } + catch(Exception e){ + log.log(Level.SEVERE, "", e); + } + + createMenu(); + + MRole role = MRole.getDefault(); + m_curGC.query (m_onlyCurrentRows, m_onlyCurrentDays, role.getMaxQueryRecords()); + m_curTab.navigateCurrent(); // updates counter + m_curGC.dynamicDisplay(0); + } + + public APanel(AWindow window) + { + super(); + m_window = window; + + m_ctx = Env.getCtx(); + // + try + { + jbInit(); + } + catch (Exception e) + { + log.log(Level.SEVERE, "", e); + } + createMenu(); + } // APanel + + /** Logger */ + private static CLogger log = CLogger.getCLogger(APanel.class); + + private AWindow m_window; + private boolean isCancel = false; //Goodwill + + /** + * Dispose + */ + public void dispose() + { + // log.config(""); + // ignore changes + m_disposing = true; + // + if (m_curAPanelTab != null) + { + m_curAPanelTab.unregisterPanel(); + m_curAPanelTab = null; + } + // close panels + tabPanel.dispose(this); + tabPanel = null; + // All Workbenches + for (int i = 0; i < m_mWorkbench.getWindowCount(); i++) + { + m_curWindowNo = m_mWorkbench.getWindowNo(i); + log.info("#" + m_curWindowNo); + Env.setAutoCommit(m_ctx, m_curWindowNo, false); + m_mWorkbench.dispose(i); + Env.clearWinContext(m_ctx, m_curWindowNo); + } // all Workbenchens + + // Get rid of remaining model + if (m_mWorkbench != null) + m_mWorkbench.dispose(); + m_mWorkbench = null; + // MenuBar + if (menuBar != null) + menuBar.removeAll(); + menuBar = null; + // ToolBar + if (toolBar != null) + toolBar.removeAll(); + toolBar = null; + // Prepare GC + this.removeAll(); + } // dispose + + /** + * The Layout. + */ + private BorderLayout mainLayout = new BorderLayout(); + private VTabbedPane tabPanel = new VTabbedPane(true); + private StatusBar statusBar = new StatusBar(); + private CPanel northPanel = new CPanel(); + private JToolBar toolBar = new JToolBar(); + private JMenuBar menuBar = new JMenuBar(); + private FlowLayout northLayout = new FlowLayout(); + + /** + * Initializes the state of this instance. + * @throws Exception + */ + private void jbInit() throws Exception + { + this.setLocale(Language.getLoginLanguage().getLocale()); + this.setLayout(mainLayout); + + // tabPanel + mainLayout.setHgap(2); + mainLayout.setVgap(2); + if (isNested) + this.add(m_curGC, BorderLayout.CENTER); + else + { + CPanel dummy = new CPanel(); + dummy.setLayout(new BorderLayout()); + dummy.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 2)); + dummy.add(tabPanel, BorderLayout.CENTER); + this.add(dummy, BorderLayout.CENTER); + } + // southPanel + this.add(statusBar, BorderLayout.SOUTH); + // northPanel + this.add(northPanel, BorderLayout.NORTH); + northPanel.setLayout(northLayout); + northLayout.setAlignment(FlowLayout.LEFT); + toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); + toolBar.setBorderPainted(false); + toolBar.setFloatable(false); // teo_sarca, [ 1666591 ] Toolbar should not be floatable + northPanel.add(toolBar, null); + } // jbInit + + private AppsAction aPrevious, aNext, aParent, aDetail, aFirst, aLast, + aNew, aCopy, aDelete, aPrint, aPrintPreview, + aRefresh, aHistory, aAttachment, aChat, aMulti, aFind, + aWorkflow, aZoomAcross, aRequest, aWinSize, aArchive; + /** Ignore Button */ + public AppsAction aIgnore; + /** Save Button */ + public AppsAction aSave; + /** Private Lock Button */ + public AppsAction aLock; + // Local (added to toolbar) + private AppsAction aReport, aEnd, aHome, aHelp, aProduct, aLogout, + aAccount, aCalculator, aCalendar, aEditor, aPreference, aScript, + aOnline, aMailSupport, aAbout, aPrintScr, aScrShot, aExit, aBPartner, + aDeleteSelection, aShowAllWindow; + + private SwitchAction aSwitchLinesDownAction, aSwitchLinesUpAction; + + private WindowMenu m_WindowMenu; + /************************************************************************** + * Create Menu and Toolbar and registers keyboard actions. + * - started from constructor + */ + private void createMenu() + { + /** + * Menu + */ + // menuBar.setHelpMenu(); + // File + JMenu mFile = AEnv.getMenu("File"); + menuBar.add(mFile); + aPrintScr = addAction("PrintScreen", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), false); + aScrShot = addAction("ScreenShot", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, Event.SHIFT_MASK), false); + aReport = addAction("Report", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0), false); + aPrint = addAction("Print", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), false); + aPrintPreview = addAction("PrintPreview", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.SHIFT_MASK+Event.ALT_MASK), false); + mFile.addSeparator(); + aEnd = addAction("End", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), false); + aLogout = addAction("Logout", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.SHIFT_MASK+Event.ALT_MASK), false); + aExit = addAction("Exit", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), false); + // Edit + JMenu mEdit = AEnv.getMenu("Edit"); + menuBar.add(mEdit); + aNew = addAction("New", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), false); + aSave = addAction("Save", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), false); + mEdit.addSeparator(); + aCopy = addAction("Copy", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F2, Event.SHIFT_MASK), false); + aDelete = addAction("Delete", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), false); + aDeleteSelection = addAction("DeleteSelection", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK), false); + aIgnore = addAction("Ignore", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), false); + aRefresh = addAction("Refresh", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0), false); + mEdit.addSeparator(); + aFind = addAction("Find", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), true); // toggle + if (m_isPersonalLock) + aLock = addAction("Lock", mEdit, null, true); // toggle + // View + JMenu mView = AEnv.getMenu("View"); + menuBar.add(mView); + if (MRole.getDefault().isAllow_Info_Product()) + { + aProduct = addAction("InfoProduct", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), false); + } + if (MRole.getDefault().isAllow_Info_BPartner()) + { + aBPartner = addAction("InfoBPartner", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.SHIFT_MASK+Event.ALT_MASK), false); + } + if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account()) + { + aAccount = addAction("InfoAccount",mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), false); + } + if (MRole.getDefault().isAllow_Info_Schedule()) + { + AEnv.addMenuItem("InfoSchedule", null, null, mView, this); + } + //FR [ 1966328 ] + if (MRole.getDefault().isAllow_Info_MRP()) + { + AEnv.addMenuItem("InfoMRP", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_CRP()) + { + AEnv.addMenuItem("InfoCRP", "Info", null, mView, this); + } + mView.addSeparator(); + if (MRole.getDefault().isAllow_Info_Order()) + { + AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Invoice()) + { + AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_InOut()) + { + AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Payment()) + { + AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_CashJournal()) + { + AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Resource()) + { + AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Asset()) + { + AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); + } + + + + mView.addSeparator(); + aAttachment = addAction("Attachment", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0), true); // toggle + aChat = addAction("Chat", mView, null, true); // toggle + aHistory = addAction("History", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0), true); // toggle + mView.addSeparator(); + aMulti = addAction("Multi", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F8, 0), true); // toggle + // Go + JMenu mGo = AEnv.getMenu("Go"); + menuBar.add(mGo); + aFirst = addAction("First", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.ALT_MASK), false); + aPrevious = addAction("Previous", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.ALT_MASK), false); + aNext = addAction("Next", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.ALT_MASK), false); + aLast = addAction("Last", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.ALT_MASK), false); + mGo.addSeparator(); + aParent = addAction("Parent", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Event.ALT_MASK), false); + aDetail = addAction("Detail", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Event.ALT_MASK), false); + mGo.addSeparator(); + aZoomAcross = addAction("ZoomAcross", mGo, null, false); + aRequest = addAction("Request", mGo, null, false); + aArchive = addAction("Archive", mGo, null, false); + aHome = addAction("Home", mGo, null, false); + // Tools + JMenu mTools = AEnv.getMenu("Tools"); + menuBar.add(mTools); + aCalculator = addAction("Calculator", mTools, null, false); + aCalendar = addAction("Calendar", mTools, null, false); + aEditor = addAction("Editor", mTools, null, false); + MUser user = MUser.get(Env.getCtx()); + if (user.isAdministrator()) + aScript = addAction("Script", mTools, null, false); + if ("Y".equals(Env.getContext(m_ctx, "#SysAdmin"))) // set in DB.loginDB + aWinSize = addAction("WinSize", mTools, null, false); + if (AEnv.isWorkflowProcess()) + aWorkflow = addAction("WorkFlow", mTools, null, false); + if (MRole.getDefault().isShowPreference()) + { + mTools.addSeparator(); + aPreference = addAction("Preference", mTools, null, false); + } + + //Window + AMenu aMenu = (AMenu)Env.getWindow(0); + m_WindowMenu = new WindowMenu(aMenu.getWindowManager(), m_window); + menuBar.add(m_WindowMenu); + aShowAllWindow = addAction("ShowAllWindow", null, KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK), false); + + // Help + JMenu mHelp = AEnv.getMenu("Help"); + menuBar.add(mHelp); + aHelp = addAction("Help", mHelp, KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), false); + aOnline = addAction("Online", mHelp, null, false); + aMailSupport = addAction("EMailSupport", mHelp, null, false); + aAbout = addAction("About", mHelp, null, false); + + /** + * ToolBar + */ + toolBar.add(aIgnore.getButton()); // ESC + toolBar.addSeparator(); + toolBar.add(aHelp.getButton()); // F1 + toolBar.add(aNew.getButton()); + toolBar.add(aDelete.getButton()); + toolBar.add(aDeleteSelection.getButton()); + toolBar.add(aSave.getButton()); + toolBar.addSeparator(); + toolBar.add(aRefresh.getButton()); // F5 + if (!isNested()) + toolBar.add(aFind.getButton()); + toolBar.add(aAttachment.getButton()); + toolBar.add(aChat.getButton()); + toolBar.add(aMulti.getButton()); + toolBar.addSeparator(); + //FR [ 1757088 ] + if((m_curGC == null) || (m_curGC != null && !m_curGC.isDetailGrid())){ + toolBar.add(aHistory.getButton()); // F9 + toolBar.add(aHome.getButton()); // F10 is Windows Menu Key + toolBar.add(aParent.getButton()); + toolBar.add(aDetail.getButton()); + toolBar.addSeparator(); + } + + toolBar.add(aFirst.getButton()); + toolBar.add(aPrevious.getButton()); + toolBar.add(aNext.getButton()); + toolBar.add(aLast.getButton()); + toolBar.addSeparator(); + toolBar.add(aReport.getButton()); + toolBar.add(aArchive.getButton()); + toolBar.add(aPrintPreview.getButton()); + toolBar.add(aPrint.getButton()); + // FR [ 1757088 ] + if((m_curGC == null) || (m_curGC != null && !m_curGC.isDetailGrid())){ + toolBar.addSeparator(); + if (m_isPersonalLock) + toolBar.add(aLock.getButton()); + toolBar.add(aZoomAcross.getButton()); + if (aWorkflow != null) + toolBar.add(aWorkflow.getButton()); + toolBar.add(aRequest.getButton()); + if (MRole.getDefault().isAllow_Info_Product()) + { + toolBar.add(aProduct.getButton()); + } + toolBar.addSeparator(); + toolBar.add(aEnd.getButton()); + } + + // + if (CLogMgt.isLevelAll()) + Util.printActionInputMap(this); + } // createMenu + + + /** + * Add (Toggle) Action to Toolbar and Menu + * @param actionName action name + * @param menu manu + * @param accelerator accelerator + * @param toggle toggle button + * @return AppsAction + */ + private AppsAction addAction (String actionName, JMenu menu, KeyStroke accelerator, boolean toggle) + { + AppsAction action = new AppsAction(actionName, accelerator, toggle); + if (menu != null) + menu.add(action.getMenuItem()); + action.setDelegate(this); + // AbstractButton b = action.getButton(); + // String s = null; + // if (b != null) + // s = b.getToolTipText(); + + // Key Strokes + if (accelerator != null) + { + getInputMap(WHEN_IN_FOCUSED_WINDOW).put(accelerator, actionName); + getActionMap().put(actionName, action); + } + // + return action; + } // addAction + + /** + * Return MenuBar + * @return JMenuBar + */ + public JMenuBar getMenuBar() + { + return menuBar; + } // getMenuBar + + /** + * Get Title of Window + * @return String with Title + */ + public String getTitle() + { + if (m_mWorkbench != null && m_mWorkbench.getWindowCount() > 1) + { + StringBuffer sb = new StringBuffer(); + sb.append(m_mWorkbench.getName()).append(" ") + .append(Env.getContext(m_ctx, "#AD_User_Name")).append("@") + .append(Env.getContext(m_ctx, "#AD_Client_Name")).append(".") + .append(Env.getContext(m_ctx, "#AD_Org_Name")).append(" [") + .append(Env.getContext(m_ctx, "#DB_UID")).append("]"); + return sb.toString(); + } + return Env.getHeader(m_ctx, m_curWindowNo); + } // getTitle + + + private Properties m_ctx; + + /** Workbench Model */ + private GridWorkbench m_mWorkbench; + /** Current MTab */ + private GridTab m_curTab; + /** Current GridController */ + private GridController m_curGC; + /** Current Window Panel */ + private JTabbedPane m_curWinTab = null; + /** Current Window No */ + private int m_curWindowNo; + /** Current Window Panel Index */ + private int m_curTabIndex = -1; + /** Current Tab Order */ + private APanelTab m_curAPanelTab = null; + + /** Dispose active */ + private boolean m_disposing = false; + /** Save Error Message indicator */ + private boolean m_errorDisplayed = false; + /** Only current row flag */ + private boolean m_onlyCurrentRows = true; + /** Number of days to show 0=all */ + private int m_onlyCurrentDays = 0; + /** Process Info */ + private boolean m_isLocked = false; + /** Show Personal Lock */ + private boolean m_isPersonalLock = MRole.getDefault().isPersonalLock(); + /** Last Modifier of Action Event */ + private int m_lastModifiers; + + + /************************************************************************** + * Dynamic Panel Initialization - either single window or workbench. + *
    +	 *  either
    +	 *  - Workbench tabPanel    (VTabbedPane)
    +	 *      - Tab               (GridController)
    +	 *  or
    +	 *  - Workbench tabPanel    (VTabbedPane)
    +	 *      - Window            (VTabbedPane)
    +	 *          - Tab           (GridController)
    +	 *  
    + * tabPanel + * @param AD_Workbench_ID if > 0 this is a workbench, AD_Window_ID ignored + * @param AD_Window_ID if not a workbench, Window ID + * @param query if not a Workbench, Zoom Query - additional SQL where clause + * @return true if Panel is initialized successfully + */ + public boolean initPanel (int AD_Workbench_ID, int AD_Window_ID, MQuery query) + { + log.info("WB=" + AD_Workbench_ID + ", Win=" + AD_Window_ID + ", Query=" + query); + this.setName("APanel" + AD_Window_ID); + + // Single Window + if (AD_Workbench_ID == 0) + m_mWorkbench = new GridWorkbench(m_ctx, AD_Window_ID); + else + // Workbench + { + // m_mWorkbench = new MWorkbench(m_ctx); + // if (!m_mWorkbench.initWorkbench (AD_Workbench_ID)) + // { + // log.log(Level.SEVERE, "APanel.initWindow - No Workbench Model"); + // return false; + // } + // tabPanel.setWorkbench(true); + // tabPanel.addChangeListener(this); + ADialog.warn(0, this, "","Not implemented yet"); + return false; + } + + Dimension windowSize = m_mWorkbench.getWindowSize(); + + /** + * WorkBench Loop + */ + for (int wb = 0; wb < m_mWorkbench.getWindowCount(); wb++) + { + // Get/set WindowNo + m_curWindowNo = Env.createWindowNo (this); // Timing: ca. 1.5 sec + m_mWorkbench.setWindowNo(wb, m_curWindowNo); + // Set AutoCommit for this Window + Env.setAutoCommit(m_ctx, m_curWindowNo, Env.isAutoCommit(m_ctx)); + boolean autoNew = Env.isAutoNew(m_ctx); + Env.setAutoNew(m_ctx, m_curWindowNo, autoNew); + + // Workbench Window + VTabbedPane window = null; + // just one window + if (m_mWorkbench.getWindowCount() == 1) + { + window = tabPanel; + window.setWorkbench(false); + } + else + { + VTabbedPane tp = new VTabbedPane(false); + window = tp; + } + // Window Init + window.addChangeListener(this); + + /** + * Init Model + */ + int wbType = m_mWorkbench.getWindowType(wb); + + /** + * Window + */ + if (wbType == GridWorkbench.TYPE_WINDOW) + { + HashMap includedMap = new HashMap(4); + // + GridWindowVO wVO = AEnv.getMWindowVO(m_curWindowNo, m_mWorkbench.getWindowID(wb), 0); + if (wVO == null) + { + ADialog.error(0, null, "AccessTableNoView", "(No Window Model Info)"); + return false; + } + GridWindow mWindow = new GridWindow (wVO); // Timing: ca. 0.3-1 sec + // Set SO/AutoNew for Window + Env.setContext(m_ctx, m_curWindowNo, "IsSOTrx", mWindow.isSOTrx()); + if (!autoNew && mWindow.isTransaction()) + Env.setAutoNew(m_ctx, m_curWindowNo, true); + m_mWorkbench.setMWindow(wb, mWindow); + if (wb == 0) + m_onlyCurrentRows = mWindow.isTransaction(); // default = only current + if (windowSize == null) + windowSize = mWindow.getWindowSize(); + + /** + * Window Tabs + */ + int tabSize = mWindow.getTabCount(); + boolean goSingleRow = query != null; // Zoom Query + for (int tab = 0; tab < tabSize; tab++) + { + boolean included = false; + // MTab + if (tab == 0) mWindow.initTab(0); + GridTab gTab = mWindow.getTab(tab); + Env.setContext(m_ctx, m_curWindowNo, tab, "TabLevel", Integer.toString(gTab.getTabLevel())); + // Query first tab + if (tab == 0) + { + // initial user query for single workbench tab + if (m_mWorkbench.getWindowCount() == 1) + { + isCancel = false; //Goodwill + query = initialQuery (query, gTab); + if (isCancel) return false; //Cancel opening window + if (query != null && query.getRecordCount() <= 1) + goSingleRow = true; + } + else if (wb != 0) + // workbench dynamic query for dependent windows + { + query = m_mWorkbench.getQuery(); + } + // Set initial Query on first tab + if (query != null) + { + m_onlyCurrentRows = false; // Query might involve history + gTab.setQuery(query); + } + if (wb == 0) + m_curTab = gTab; + } // query on first tab + + Component tabElement = null; + // GridController + if (gTab.isSortTab()) + { + VSortTab st = new VSortTab(m_curWindowNo, gTab.getAD_Table_ID(), + gTab.getAD_ColumnSortOrder_ID(), gTab.getAD_ColumnSortYesNo_ID()); + st.setTabLevel(gTab.getTabLevel()); + tabElement = st; + } + else // normal tab + { + GridController gc = new GridController(); // Timing: ca. .1 sec + CompiereColor cc = mWindow.getColor(); + if (cc != null) + gc.setBackgroundColor(cc); // set color on Window level + gc.initGrid(gTab, false, m_curWindowNo, this, mWindow, (tab != 0)); // will set color on Tab level + // Timing: ca. 6-7 sec for first .2 for next + gc.addDataStatusListener(this); + gc.registerESCAction(aIgnore); // register Escape Key + // Set First Tab + if (wb == 0 && tab == 0) + { + m_curGC = gc; + Dimension size = gc.getPreferredSize(); // Screen Sizing + size.width += 4; + size.height += 4; + gc.setPreferredSize(size); + } + tabElement = gc; + // If we have a zoom query, switch to single row + if (tab == 0 && goSingleRow) + gc.switchSingleRow(); + + // FR [ 1757088 ] + GridField[] fields = gc.getMTab().getFields(); + int m_tab_id = 0; + for(int f =0 ; f < fields.length ; f ++) + { + m_tab_id = fields[f].getIncluded_Tab_ID(); + if ( m_tab_id != 0) + { + includedMap.put(m_tab_id, gc); + } + } + + // Is this tab included? + if (includedMap.size() > 0) + { + GridController parent = (GridController)includedMap.get(new Integer(gTab.getAD_Tab_ID())); + if (parent != null) + { + // FR [ 1757088 ] + gc.removeDataStatusListener(this); + GridSynchronizer synchronizer = new GridSynchronizer(mWindow, parent, gc); + if (parent == m_curGC) + synchronizer.activateChild(); + included = parent.includeTab(gc,this,synchronizer); + } + } + initSwitchLineAction(); + } // normal tab + + if (!included) // Add to TabbedPane + { + StringBuffer tabName = new StringBuffer (); + tabName.append (""); + if (gTab.isReadOnly()) + tabName.append(""); + int pos = gTab.getName ().indexOf (" "); + if (pos == -1) + tabName.append (gTab.getName ()).append ("
     "); + else + { + tabName.append (gTab.getName().substring (0, pos)) + .append ("
    ") + .append (gTab.getName().substring(pos + 1)); + } + if (gTab.isReadOnly()) + tabName.append("
    "); + tabName.append (""); + // Add Tab - sets ALT- and Shift-ALT- + window.addTab (tabName.toString(), gTab, tabElement); + } + } // Tab Loop + // Tab background + // window.setBackgroundColor(new AdempiereColor(Color.magenta, Color.green)); + } // Type-MWindow + + // Single Workbench Window Tab + if (m_mWorkbench.getWindowCount() == 1) + { + window.setToolTipText(m_mWorkbench.getDescription(wb)); + } + else + // Add Workbench Window Tab + { + tabPanel.addTab(m_mWorkbench.getName(wb), m_mWorkbench.getIcon(wb), window, m_mWorkbench.getDescription(wb)); + } + // Used for Env.getHeader + Env.setContext(m_ctx, m_curWindowNo, "WindowName", m_mWorkbench.getName(wb)); + + } // Workbench Loop + + // stateChanged (<->) triggered + toolBar.setName(getTitle()); + m_curTab.getTableModel().setChanged(false); + // Set Detail Button + aDetail.setEnabled(0 != m_curWinTab.getTabCount()-1); + + // Enable/Disable Tabs dynamically + if (m_curWinTab instanceof VTabbedPane) + ((VTabbedPane)m_curWinTab).evaluate(null); + // Size + if (windowSize != null) + setPreferredSize(windowSize); + else + revalidate(); + Dimension size = getPreferredSize(); + log.info( "fini - " + size); + m_curWinTab.requestFocusInWindow(); + return true; + } // initPanel + + /** + * Get Current Window No + * @return win no + */ + public int getWindowNo() + { + return m_curWindowNo; + } // getWindowNo + + /** + * Initial Query + * @param query initial query + * @param mTab tab + * @return query or null + */ + private MQuery initialQuery (MQuery query, GridTab mTab) + { + // We have a (Zoom) query + if (query != null && query.isActive() && query.getRecordCount() < 10) + return query; + // + StringBuffer where = new StringBuffer(); + // Query automatically if high volume and no query + boolean require = mTab.isHighVolume(); + if (!require && !m_onlyCurrentRows) // No Trx Window + { + String wh1 = mTab.getWhereExtended(); + if (wh1 == null || wh1.length() == 0) + wh1 = mTab.getWhereClause(); + if (wh1 != null && wh1.length() > 0) + where.append(wh1); + // + if (query != null) + { + String wh2 = query.getWhereClause(); + if (wh2.length() > 0) + { + if (where.length() > 0) + where.append (" AND "); + where.append(wh2); + } + } + // + StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM ") + .append(mTab.getTableName()); + if (where.length() > 0) + sql.append(" WHERE ").append(where); + // Does not consider security + int no = DB.getSQLValue(null, sql.toString()); + // + require = MRole.getDefault().isQueryRequire(no); + } + // Show Query + if (require) + { + GridField[] findFields = mTab.getFields(); + Find find = new Find (Env.getFrame(this), m_curWindowNo, mTab.getName(), + mTab.getAD_Tab_ID(), mTab.getAD_Table_ID(), mTab.getTableName(), + where.toString(), findFields, 10); // no query below 10 + query = find.getQuery(); + isCancel = (query == null);//Goodwill + find.dispose(); + find = null; + } + return query; + } // initialQuery + + + /** + * Get Window Index + * @return Window Index + */ + private int getWindowIndex() + { + // only one window + if (m_mWorkbench.getWindowCount() == 1) + return 0; + // workbench + return tabPanel.getSelectedIndex(); + } // getWindowIndex + + /** + * Is first Tab (on Window) + * @return true if the panel displays the first tab + */ + private boolean isFirstTab() + { + return m_curWinTab.getSelectedIndex() == 0; + } // isFirstTab + + /** + * Get Window Image + * @return image or null + */ + public Image getImage() + { + return m_mWorkbench.getImage(getWindowIndex()); + } // getImage + + + /************************************************************************** + * Data Status Listener (row change) ^ | v + * @param e event + */ + public void dataStatusChanged (DataStatusEvent e) + { + if (m_disposing) + return; + log.info(e.getMessage()); + String dbInfo = e.getMessage(); + if (m_curTab != null && m_curTab.isQueryActive()) + dbInfo = "[ " + dbInfo + " ]"; + statusBar.setStatusDB(dbInfo, e); + if (!isNested) + m_window.setTitle(getTitle()); + + // Set Message / Info + if (e.getAD_Message() != null || e.getInfo() != null) + { + StringBuffer sb = new StringBuffer(); + String msg = e.getMessage(); + if (msg != null && msg.length() > 0) + sb.append(Msg.getMsg(m_ctx, e.getAD_Message())); + String info = e.getInfo(); + if (info != null && info.length() > 0) + { + if (sb.length() > 0 && !sb.toString().trim().endsWith(":")) + sb.append(": "); + sb.append(info); + } + if (sb.length() > 0) + { + int pos = sb.indexOf("\n"); + if (pos != -1) // replace CR/NL + sb.replace(pos, pos+1, " - "); + setStatusLine (sb.toString (), e.isError ()); + } + } + + // Confirm Error + if (e.isError() && !e.isConfirmed()) + { + ADialog.error(m_curWindowNo, this, e.getAD_Message(), e.getInfo()); + e.setConfirmed(true); // show just once - if MTable.setCurrentRow is involved the status event is re-issued + m_errorDisplayed = true; + } + // Confirm Warning + else if (e.isWarning() && !e.isConfirmed()) + { + ADialog.warn(m_curWindowNo, this, e.getAD_Message(), e.getInfo()); + e.setConfirmed(true); // show just once - if MTable.setCurrentRow is involved the status event is re-issued + } + + // update Navigation + boolean firstRow = e.isFirstRow(); + aFirst.setEnabled(!firstRow); + aPrevious.setEnabled(!firstRow); + boolean lastRow = e.isLastRow(); + aNext.setEnabled(!lastRow); + aLast.setEnabled(!lastRow); + + // update Change + boolean changed = e.isChanged() || e.isInserting(); + boolean readOnly = m_curTab.isReadOnly(); + boolean insertRecord = !readOnly; + if (insertRecord) + insertRecord = m_curTab.isInsertRecord(); + aNew.setEnabled(!changed && insertRecord); + aCopy.setEnabled(!changed && insertRecord); + aRefresh.setEnabled(!changed); + aDelete.setEnabled(!changed && !readOnly); + // + if (readOnly && m_curTab.isAlwaysUpdateField()) + readOnly = false; + aIgnore.setEnabled(changed && !readOnly); + aSave.setEnabled(changed && !readOnly); + // + // No Rows + if (e.getTotalRows() == 0 && insertRecord) { + aNew.setEnabled(true); + aDelete.setEnabled(false); + aDeleteSelection.setEnabled(false); + } else { + aDeleteSelection.setEnabled(true); + } + + // Single-Multi + aMulti.setPressed(!m_curGC.isSingleRow()); + + // History (on first Tab only) + if (isFirstTab()) + aHistory.setPressed(!m_curTab.isOnlyCurrentRows()); + + // Transaction info + String trxInfo = m_curTab.getTrxInfo(); + if (trxInfo != null) + statusBar.setInfo(trxInfo); + + // Check Attachment + boolean canHaveAttachment = m_curTab.canHaveAttachment(); // not single _ID column + // + if (canHaveAttachment && e.isLoading() && m_curTab.getCurrentRow() > e.getLoadedRows()) + canHaveAttachment = false; + if (canHaveAttachment && m_curTab.getRecord_ID() == -1) // No Key + canHaveAttachment = false; + if (canHaveAttachment) + { + aAttachment.setEnabled(true); + aAttachment.setPressed(m_curTab.hasAttachment()); + aChat.setEnabled(true); + aChat.setPressed(m_curTab.hasChat()); + } + else + { + aAttachment.setEnabled(false); + aChat.setEnabled(false); + } + // Lock Indicator + if (m_isPersonalLock) + aLock.setPressed(m_curTab.isLocked()); + + if (m_curWinTab instanceof VTabbedPane) + ((VTabbedPane)m_curWinTab).evaluate(e); + // log.info("- fini", e.getMessage()); + } // dataStatusChanged + + /** + * Set Status Line to text + * @param text clear text + * @param error error flag + */ + public void setStatusLine (String text, boolean error) + { + log.fine(text); + statusBar.setStatusLine(text, error); + } // setStatusLine + + /** + * Indicate Busy + * @param busy busy + * @param focus request focus + */ + private void setBusy (boolean busy, boolean focus) + { + m_isLocked = busy; + // + JFrame frame = Env.getFrame(this); + if (frame == null) // during init + return; + if (frame instanceof AWindow) + ((AWindow)frame).setBusy(busy); + // String processing = Msg.getMsg(m_ctx, "Processing"); + if (busy) + { + // setStatusLine(processing); + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + } + else + { + this.setCursor(Cursor.getDefaultCursor()); + frame.setCursor(Cursor.getDefaultCursor()); + if (focus) + m_curGC.requestFocus(); + // if (statusBar.getStatusLine().equals(processing)) + // statusBar.setStatusLine(""); + } + } // set Busy + + + /************************************************************************** + * Change Listener - (tab change) <-> + * @param e event + */ + public void stateChanged (ChangeEvent e) + { + if (m_disposing) + return; + log.info(e.toString()); + setBusy(true, true); + + VTabbedPane tp = (VTabbedPane)e.getSource(); + boolean back = false; + boolean isAPanelTab = false; + + int previousIndex = 0; + + // Workbench Tab Change + if (tp.isWorkbench()) + { + int WBIndex = tabPanel.getSelectedIndex(); + m_curWindowNo = m_mWorkbench.getWindowNo(WBIndex); + // Window Change + log.info("curWin=" + m_curWindowNo + " - Win=" + tp); + if (tp.getSelectedComponent() instanceof JTabbedPane) + m_curWinTab = (JTabbedPane)tp.getSelectedComponent(); + else + throw new java.lang.IllegalArgumentException("Window does not contain Tabs"); + if (m_curWinTab.getSelectedComponent() instanceof GridController) { + m_curGC = (GridController)m_curWinTab.getSelectedComponent(); + initSwitchLineAction(); + } + // else if (m_curWinTab.getSelectedComponent() instanceof APanelTab) + // isAPanelTab = true; + else + throw new java.lang.IllegalArgumentException("Window-Tab does not contain GridControler"); + // change pointers + m_curTabIndex = m_curWinTab.getSelectedIndex(); + } + else + { + // Just a Tab Change + log.info("Tab=" + tp); + m_curWinTab = tp; + int tpIndex = m_curWinTab.getSelectedIndex(); + // detect no tab change + if (tpIndex == m_curTabIndex) return; + back = tpIndex < m_curTabIndex; + GridController gc = null; + if (m_curWinTab.getSelectedComponent() instanceof GridController) + gc = (GridController)m_curWinTab.getSelectedComponent(); + else if (m_curWinTab.getSelectedComponent() instanceof APanelTab) + isAPanelTab = true; + else + throw new java.lang.IllegalArgumentException("Tab does not contain GridControler"); + // Save old Tab + if (m_curGC != null) + { + m_curGC.stopEditor(true); + // has anything changed? + if (m_curTab.needSave(true, false)) + { // do we have real change + if (m_curTab.needSave(true, true)) + { + // Automatic Save + if (Env.isAutoCommit(m_ctx, m_curWindowNo)) + { + if (!m_curTab.dataSave(true)) + { // there is a problem, so we go back + m_curWinTab.setSelectedIndex(m_curTabIndex); + setBusy(false, true); + return; + } + } + // explicitly ask when changing tabs + else if (ADialog.ask(m_curWindowNo, this, "SaveChanges?", m_curTab.getCommitWarning())) + { // yes we want to save + if (!m_curTab.dataSave(true)) + { // there is a problem, so we go back + m_curWinTab.setSelectedIndex(m_curTabIndex); + setBusy(false, true); + return; + } + } + else // Don't save + m_curTab.dataIgnore(); + } + else // new record, but nothing changed + m_curTab.dataIgnore(); + } // there is a change + } + if (m_curAPanelTab != null) + { + m_curAPanelTab.saveData(); + m_curAPanelTab.unregisterPanel(); + m_curAPanelTab = null; + } + + // new tab + // if (m_curTabIndex >= 0) + // m_curWinTab.setForegroundAt(m_curTabIndex, AdempierePLAF.getTextColor_Normal()); + // m_curWinTab.setForegroundAt(tpIndex, AdempierePLAF.getTextColor_OK()); + previousIndex = m_curTabIndex; + m_curTabIndex = tpIndex; + if (!isAPanelTab) { + m_curGC = gc; + initSwitchLineAction(); + } + } + + // Sort Tab Handling + if (isAPanelTab) + { + m_curAPanelTab = (APanelTab)m_curWinTab.getSelectedComponent(); + m_curAPanelTab.registerAPanel(this); + m_curAPanelTab.loadData(); + // Consider that APanelTab (e.g. VSortTab) is not navigable - teo_sarca [ 1705444 ] + aFirst.setEnabled(false); + aPrevious.setEnabled(false); + aNext.setEnabled(false); + aLast.setEnabled(false); + } + else // Cur Tab Setting + { + int gwTabIndex = m_mWorkbench.getMWindow(0).getTabIndex(m_curGC.getMTab()); + //boolean needValidate = false; + if (m_mWorkbench.getMWindow(0).isTabInitialized(gwTabIndex) == false) + { + m_mWorkbench.getMWindow(0).initTab(gwTabIndex); + //needValidate = true; + } + m_curGC.activate(); + m_curTab = m_curGC.getMTab(); + + // Refresh only current row when tab is current + if (back && m_curTab.isCurrent()) + m_curTab.dataRefresh(); + else // Requery & autoSize + { + MRole role = MRole.getDefault(); + m_curGC.query (m_onlyCurrentRows, m_onlyCurrentDays, role.getMaxQueryRecords()); + /* + if (m_curGC.isNeedToSaveParent()) + { + // there is a problem, so we go back + ADialog.error(m_curWindowNo, this, "SaveParentFirst"); + m_curWinTab.setSelectedIndex(previousIndex); + setBusy(false, true); + return; + }*/ + } + // Set initial record + if (m_curTab.getRowCount() == 0) + { + // Automatically create New Record, if none & tab not RO + if (!m_curTab.isReadOnly() + && (Env.isAutoNew(m_ctx, m_curWindowNo) || m_curTab.isQueryNewRecord())) + { + log.config("No record - New - AutoNew=" + Env.isAutoNew(m_ctx, m_curWindowNo) + + " - QueryNew=" + m_curTab.isQueryNewRecord()); + m_curTab.dataNew(false); + } + else // No Records found + { + aSave.setEnabled(false); + aDelete.setEnabled(false); + aDeleteSelection.setEnabled(false); + } + m_curTab.navigateCurrent(); // updates counter + m_curGC.dynamicDisplay(0); + } + /* + if (needValidate) + { + JFrame frame = Env.getFrame(APanel.this); + if (frame != null) + { + //not sure why, the following lines is needed to make dynamic resize work + //tested on jdk1.5, 1.6 using jgoodies look and feel + frame.getPreferredSize(); + + if (frame.getExtendedState() != JFrame.MAXIMIZED_BOTH) + { + frame.setMinimumSize(frame.getSize()); + revalidate(); + SwingUtilities.invokeLater(new Runnable() { + + public void run() { + JFrame frame = Env.getFrame(APanel.this); + frame.validate(); + AEnv.showCenterScreen(frame); + frame.setMinimumSize(null); + } + + }); + } + } + }*/ + // else ##CHANGE + // m_curTab.navigateCurrent(); + } + + // Update <-> Navigation + aDetail.setEnabled(m_curTabIndex != m_curWinTab.getTabCount()-1); + aParent.setEnabled(m_curTabIndex != 0 && m_curWinTab.getTabCount() > 1); + + // History (on first tab only) + if (m_mWorkbench.getMWindow(getWindowIndex()).isTransaction()) + aHistory.setEnabled(isFirstTab()); + else + { + aHistory.setPressed(false); + aHistory.setEnabled(false); + } + // Document Print + aPrint.setEnabled(m_curTab.isPrinted()); + aPrintPreview.setEnabled(m_curTab.isPrinted()); + // Query + aFind.setPressed(m_curTab.isQueryActive()); + + // Order Tab + if (isAPanelTab) + { + aMulti.setPressed(false); + aMulti.setEnabled(false); + aNew.setEnabled(false); + aDelete.setEnabled(false); + aDeleteSelection.setEnabled(false); + aFind.setEnabled(false); + aRefresh.setEnabled(false); + aAttachment.setEnabled(false); + aChat.setEnabled(false); + } + else // Grid Tab + { + aMulti.setEnabled(true); + aMulti.setPressed(!m_curGC.isSingleRow()); + aFind.setEnabled(true); + aRefresh.setEnabled(true); + aAttachment.setEnabled(true); + aChat.setEnabled(true); + } + // + m_curWinTab.requestFocusInWindow(); + setBusy(false, true); + log.config( "fini"); + } // stateChanged + + /** + * Navigate to Detail Tab -> + */ + private void cmd_detail() + { + int index = m_curWinTab.getSelectedIndex(); + if (index == m_curWinTab.getTabCount()-1) + return; + //hengsin, bug [ 1637763 ] + if (m_curWinTab instanceof VTabbedPane) + { + VTabbedPane tabPane = (VTabbedPane)m_curWinTab; + index++; + while ( index < tabPane.getTabCount() ) + { + if (tabPane.isEnabledAt(index)) + { + m_curGC.getTable().removeEditor(); + m_curGC.acceptEditorChanges(); + tabPane.setSelectedIndex(index); + break; + } + else + index++; + } + } + else + { + m_curGC.getTable().removeEditor(); + m_curGC.acceptEditorChanges(); + m_curWinTab.setSelectedIndex(index+1); + } + + } // navigateDetail + + /** + * Navigate to Parent Tab <- + */ + private void cmd_parent() + { + int index = m_curWinTab.getSelectedIndex(); + if (index == 0) + return; + //hengsin, bug [ 1637763 ] + if (m_curWinTab instanceof VTabbedPane) + { + VTabbedPane tabPane = (VTabbedPane)m_curWinTab; + index--; + while ( index >= 0 ) + { + if (tabPane.isEnabledAt(index)) + { + m_curGC.getTable().removeEditor(); + m_curGC.acceptEditorChanges(); + tabPane.setSelectedIndex(index); + break; + } + else + index--; + } + } + else + { + m_curGC.getTable().removeEditor(); + m_curGC.acceptEditorChanges(); + m_curWinTab.setSelectedIndex(index-1); + } + } // navigateParent + + + /************************************************************************** + * Action Listener + * @param e event + */ + public void actionPerformed (ActionEvent e) + { + log.info(e.getActionCommand() + " - " + e.getModifiers()); + // + " - " + new Timestamp(e.getWhen()) + " " + isUILocked()); + if (m_disposing || isUILocked()) + return; + + m_lastModifiers = e.getModifiers(); + String cmd = e.getActionCommand(); + // Do ScreenShot w/o busy + if (cmd.equals("ScreenShot")) + { + AEnv.actionPerformed (e.getActionCommand(), m_curWindowNo, this); + return; + } + + // Problem: doubleClick detection - can't disable button as clicking button may change button status + if (!cmd.equals(aShowAllWindow.getName())) + setBusy (true, true); + // Command Buttons + if (e.getSource() instanceof VButton) + { + setStatusLine(processButtonCallout((VButton)e.getSource()), true); + actionButton((VButton)e.getSource()); + setBusy(false, true); + return; + } + + try + { + // File + if (cmd.equals(aReport.getName())) + cmd_report(); + else if (cmd.equals(aPrint.getName())) + cmd_print(); + else if (cmd.equals(aPrintPreview.getName())) + cmd_print(true); + else if (cmd.equals(aEnd.getName())) + cmd_end(false); + else if (cmd.equals(aExit.getName())) + cmd_end(true); + // Edit + else if (cmd.equals(aNew.getName())) + cmd_new(false); + else if (cmd.equals(aSave.getName())) + cmd_save(true); + else if (cmd.equals(aCopy.getName())) + cmd_new(true); + else if (cmd.equals(aDelete.getName())) + cmd_delete(); + else if (cmd.equals(aDeleteSelection.getName())) + cmd_deleteSelection(); + else if (cmd.equals(aIgnore.getName())) + cmd_ignore(); + else if (cmd.equals(aRefresh.getName())) + cmd_refresh(); + else if (cmd.equals(aFind.getName())) + cmd_find(); + else if (m_isPersonalLock && cmd.equals(aLock.getName())) + cmd_lock(); + // View + else if (cmd.equals(aAttachment.getName())) + cmd_attachment(); + else if (cmd.equals(aChat.getName())) + cmd_chat(); + else if (cmd.equals(aHistory.getName())) + cmd_history(); + else if (cmd.equals(aMulti.getName())) + m_curGC.switchRowPresentation(); + // Go + else if (cmd.equals(aHome.getName())) { + // show main menu - teo_sarca [ 1706409, 1707221 ] + setBusy(false, false); + AEnv.showWindow(Env.getWindow(0)); + return; + } + else if (cmd.equals(aFirst.getName())) + { /*cmd_save(false);*/ + m_curGC.getTable().removeEditor(); + m_curGC.acceptEditorChanges(); + m_curTab.navigate(0); + } + else if (cmd.equals(aSwitchLinesUpAction.getName())) + { + //up-key + shift + m_curGC.getTable().removeEditor(); + m_curTab.switchRows(m_curTab.getCurrentRow(), m_curTab.getCurrentRow() - 1, m_curGC.getTable().getSortColumn(), m_curGC.getTable().isSortAscending()); + m_curGC.getTable().requestFocus(); + } + else if (cmd.equals(aPrevious.getName())) + { /* cmd_save(false); */ + //up-image + shift + m_curGC.getTable().removeEditor(); + m_curGC.acceptEditorChanges(); + if ((e.getModifiers() & ActionEvent.SHIFT_MASK) != 0) { + m_curTab.switchRows(m_curTab.getCurrentRow(), m_curTab.getCurrentRow() - 1, m_curGC.getTable().getSortColumn(), m_curGC.getTable().isSortAscending()); + } else { + m_curTab.navigateRelative(-1); + } + } + else if (cmd.equals(aSwitchLinesDownAction.getName())) + { + //down-key + shift + m_curGC.getTable().removeEditor(); + m_curTab.switchRows(m_curTab.getCurrentRow(), m_curTab.getCurrentRow() + 1, m_curGC.getTable().getSortColumn(), m_curGC.getTable().isSortAscending()); + m_curGC.getTable().requestFocus(); + } + else if (cmd.equals(aNext.getName())) + { /* cmd_save(false); */ + //down-image + shift + m_curGC.getTable().removeEditor(); + m_curGC.acceptEditorChanges(); + if ((e.getModifiers() & ActionEvent.SHIFT_MASK) != 0) { + m_curTab.switchRows(m_curTab.getCurrentRow(), m_curTab.getCurrentRow() + 1, m_curGC.getTable().getSortColumn(), m_curGC.getTable().isSortAscending()); + } else { + m_curTab.navigateRelative(+1); + } + } + else if (cmd.equals(aLast.getName())) + { /*cmd_save(false);*/ + m_curGC.getTable().removeEditor(); + m_curGC.acceptEditorChanges(); + m_curTab.navigate(m_curTab.getRowCount()-1); + } + else if (cmd.equals(aParent.getName())) + cmd_parent(); + else if (cmd.equals(aDetail.getName())) + cmd_detail(); + else if (cmd.equals(aZoomAcross.getName())) + cmd_zoomAcross(); + else if (cmd.equals(aRequest.getName())) + cmd_request(); + else if (cmd.equals(aArchive.getName())) + cmd_archive(); + // Tools + else if (aWorkflow != null && cmd.equals(aWorkflow.getName())) + { + if (m_curTab.getRecord_ID() <= 0) + ; + else if (m_curTab.getTabNo() == 0 && m_mWorkbench.getMWindow(getWindowIndex()).isTransaction()) + AEnv.startWorkflowProcess(m_curTab.getAD_Table_ID(), m_curTab.getRecord_ID()); + else + AEnv.startWorkflowProcess(m_curTab.getAD_Table_ID(), m_curTab.getRecord_ID()); + } + else if (aWinSize != null && cmd.equals(aWinSize.getName())) + cmd_winSize(); + // Help + else if (cmd.equals(aHelp.getName())) + cmd_help(); + // General Commands (Environment) + else if (cmd.equals(aLogout.getName())) + cmd_logout(); + else if (cmd.equals(aShowAllWindow.getName())) + m_WindowMenu.expose(); + else if (!AEnv.actionPerformed (e.getActionCommand(), m_curWindowNo, this)) + log.log(Level.SEVERE, "No action for: " + cmd); + } + catch (Exception ex) + { + log.log(Level.SEVERE, cmd, ex); + String msg = ex.getMessage(); + if (msg == null || msg.length() == 0) + msg = ex.toString(); + msg = Msg.parseTranslation(m_ctx, msg); + ADialog.error(m_curWindowNo, this, "Error", msg); + } + // + m_curWinTab.requestFocusInWindow(); + setBusy(false, true); + } // actionPerformed + + private void cmd_logout() { + JFrame top = Env.getWindow(0); + if (top instanceof AMenu) { + ((AMenu)top).logout(); + } + + } + + /************************************************************************** + * Process Callout(s). + *

    + * The Callout is in the string of + * "class.method;class.method;" + * If there is no class name, i.e. only a method name, the class is regarded + * as CalloutSystem. + * The class needs to comply with the Interface Callout. + * + * @param field field + * @return error message or "" + * @see org.compiere.model.Callout + */ + private String processButtonCallout (VButton button) + { + GridField field = m_curTab.getField(button.getColumnName()); + return m_curTab.processCallout(field); + } // processButtonCallout + + /** + * Create New Record + * @param copy true if current record is to be copied + */ + private void cmd_new (boolean copy) + { + log.config("copy=" + copy); + if (!m_curTab.isInsertRecord()) + { + log.warning("Insert Record disabled for Tab"); + return; + } + cmd_save(false); + m_curTab.dataNew (copy); + m_curGC.dynamicDisplay(0); + // m_curTab.getTableModel().setChanged(false); + } // cmd_new + + /** + * Confirm & delete record + */ + private void cmd_delete() + { + if (m_curTab.isReadOnly()) + return; + int keyID = m_curTab.getRecord_ID(); + if (ADialog.ask(m_curWindowNo, this, "DeleteRecord?")) + if (m_curTab.dataDelete()) + m_curGC.rowChanged(false, keyID); + m_curGC.dynamicDisplay(0); + } // cmd_delete + + /** + * Show a list to select one or more items to delete. + */ + private void cmd_deleteSelection(){ + if (m_curTab.isReadOnly()) + return; + //show table with deletion rows -> value, name... + JPanel messagePanel = new JPanel(); + JList list = new JList(); + JScrollPane scrollPane = new JScrollPane(list); + Vector data = new Vector(); + int noOfRows = m_curTab.getRowCount(); + for(int i=0; i parentColumnNames = m_curTab.getParentColumnNames(); + for (Iterator iter = parentColumnNames.iterator(); iter.hasNext();) { + String columnName = (String) iter.next(); + GridField field = m_curTab.getField(columnName); + if(field.isLookup()){ + Lookup lookup = field.getLookup(); + if (lookup != null){ + displayValue = displayValue.append(lookup.getDisplay(m_curTab.getValue(i,columnName))).append(" | "); + } else { + displayValue = displayValue.append(m_curTab.getValue(i,columnName)).append(" | "); + } + } else { + displayValue = displayValue.append(m_curTab.getValue(i,columnName)).append(" | "); + } + } + } else { + displayValue = displayValue.append(m_curTab.getValue(i,m_curTab.getKeyColumnName())); + } + if(m_curTab.getField("DocumentNo")!=null){ + displayValue = displayValue.append(" | ").append(m_curTab.getValue(i, "DocumentNo")); + } + if(m_curTab.getField("Line")!=null){ + displayValue = displayValue.append(" | ").append(m_curTab.getValue(i, "Line")); + } + if(m_curTab.getField("Value")!=null){ + displayValue = displayValue.append(" | ").append(m_curTab.getValue(i, "Value")); + } + if(m_curTab.getField("Name")!=null){ + displayValue = displayValue.append(" | ").append(m_curTab.getValue(i, "Name")); + } + data.add(displayValue.toString()); + } + list.setListData(data); + + + list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); + messagePanel.add(scrollPane); + + final JOptionPane pane = new JOptionPane( + messagePanel, // message + JOptionPane.QUESTION_MESSAGE, // messageType + JOptionPane.OK_CANCEL_OPTION); // optionType + final JDialog deleteDialog = pane.createDialog(this.getParent(), Msg.getMsg(m_ctx, "DeleteSelection")); + deleteDialog.setVisible(true); + Integer okCancel = (Integer) pane.getValue(); + if(okCancel!=null && okCancel==JOptionPane.OK_OPTION){ + log.fine("ok"); + Object[] selectedValues = list.getSelectedValues(); + for (int i = 0; i < selectedValues.length; i++) { + log.fine(selectedValues[i].toString()); + } + int[] indices = list.getSelectedIndices(); + Arrays.sort(indices); + int offset = 0; + for (int i = 0; i < indices.length; i++) { + //m_curTab.setCurrentRow(indices[i]-offset); + m_curTab.navigate(indices[i]-offset); + int keyID = m_curTab.getRecord_ID(); + if (m_curTab.dataDelete()){ + m_curGC.rowChanged(false, keyID); + offset++; + } + } + m_curGC.dynamicDisplay(0); + } else { + log.fine("cancel"); + } + }//cmd_deleteSelection + + /** + * If required ask if you want to save and save it + * @param manualCmd true if invoked manually (i.e. force) + * @return true if saved + */ + public boolean cmd_save (boolean manualCmd) + { + if (m_curAPanelTab != null) + manualCmd = false; + log.config("Manual=" + manualCmd); + m_errorDisplayed = false; + m_curGC.stopEditor(true); + m_curGC.acceptEditorChanges(); + + if (m_curAPanelTab != null) + { + m_curAPanelTab.saveData(); + aSave.setEnabled(false); // set explicitly + } + + if (m_curTab.getCommitWarning().length() > 0 && m_curTab.needSave(true, false)) + if (!ADialog.ask(m_curWindowNo, this, "SaveChanges?", m_curTab.getCommitWarning())) + return false; + + // manually initiated + boolean retValue = m_curTab.dataSave(manualCmd); + // if there is no previous error + if (manualCmd && !retValue && !m_errorDisplayed) + { + ADialog.error(m_curWindowNo, this, "SaveIgnored"); + setStatusLine(Msg.getMsg(m_ctx, "SaveIgnored"), true); + } + if (retValue) + m_curGC.rowChanged(true, m_curTab.getRecord_ID()); + if (manualCmd) { + m_curGC.dynamicDisplay(0); + if (!isNested) + m_window.setTitle(getTitle()); + } + + //BEGIN - [FR 1953734] + if(m_curGC.isDetailGrid() && retValue){ + m_curGC.getGCParent().refreshMTab(m_curGC); + } + //END - [FR 1953734] + + return retValue; + } // cmd_save + + /** + * Ignore + */ + private void cmd_ignore() + { + m_curGC.stopEditor(false); + // Ignore changes in APanelTab (e.g. VSortTab) - teo_sarca [ 1705429 ] + if (m_curAPanelTab != null) + { + m_curAPanelTab.loadData(); + } + m_curTab.dataIgnore(); + m_curGC.dynamicDisplay(0); + + } // cmd_ignore + + /** + * Refresh + */ + private void cmd_refresh() + { + cmd_save(false); + m_curTab.dataRefreshAll(); + m_curGC.dynamicDisplay(0); + } // cmd_refresh + + /** + * Print standard Report + */ + private void cmd_report () + { + log.info(""); + if (!MRole.getDefault().isCanReport(m_curTab.getAD_Table_ID())) + { + ADialog.error(m_curWindowNo, this, "AccessCannotReport"); + return; + } + + cmd_save(false); + + // Query + MQuery query = new MQuery(m_curTab.getTableName()); + // Link for detail records + String queryColumn = m_curTab.getLinkColumnName(); + // Current row otherwise + if (queryColumn.length() == 0) + queryColumn = m_curTab.getKeyColumnName(); + // Find display + String infoName = null; + String infoDisplay = null; + for (int i = 0; i < m_curTab.getFieldCount(); i++) + { + GridField field = m_curTab.getField(i); + if (field.isKey()) + infoName = field.getHeader(); + if ((field.getColumnName().equals("Name") || field.getColumnName().equals("DocumentNo") ) + && field.getValue() != null) + infoDisplay = field.getValue().toString(); + if (infoName != null && infoDisplay != null) + break; + } + if (queryColumn.length() != 0) + { + if (queryColumn.endsWith("_ID")) + query.addRestriction(queryColumn, MQuery.EQUAL, + new Integer(Env.getContextAsInt(m_ctx, m_curWindowNo, queryColumn)), + infoName, infoDisplay); + else + query.addRestriction(queryColumn, MQuery.EQUAL, + Env.getContext(m_ctx, m_curWindowNo, queryColumn), + infoName, infoDisplay); + } + + new AReport (m_curTab.getAD_Table_ID(), aReport.getButton(), query, this, m_curWindowNo); + } // cmd_report + + + /** + * Zoom Across Menu + */ + private void cmd_zoomAcross() + { + int record_ID = m_curTab.getRecord_ID(); + log.info("ID=" + record_ID); + if (record_ID <= 0) + return; + + // Query + MQuery query = new MQuery(); + // Current row + String link = m_curTab.getKeyColumnName(); + // Link for detail records + if (link.length() == 0) + link = m_curTab.getLinkColumnName(); + if (link.length() != 0) + { + if (link.endsWith("_ID")) + query.addRestriction(link, MQuery.EQUAL, + new Integer(Env.getContextAsInt(m_ctx, m_curWindowNo, link))); + else + query.addRestriction(link, MQuery.EQUAL, + Env.getContext(m_ctx, m_curWindowNo, link)); + } + new AZoomAcross (aZoomAcross.getButton(), + m_curTab.getTableName(), query); + } // cmd_zoom + + /** + * Open/View Request + */ + private void cmd_request() + { + int record_ID = m_curTab.getRecord_ID(); + log.info("ID=" + record_ID); + if (record_ID <= 0) + return; + + int AD_Table_ID = m_curTab.getAD_Table_ID(); + int C_BPartner_ID = 0; + Object BPartner_ID = m_curTab.getValue("C_BPartner_ID"); + if (BPartner_ID != null) + C_BPartner_ID = ((Integer)BPartner_ID).intValue(); + new ARequest (aRequest.getButton(), AD_Table_ID, record_ID, C_BPartner_ID); + } // cmd_request + + /** + * Open/View Archive + */ + private void cmd_archive() + { + int record_ID = m_curTab.getRecord_ID(); + log.info("ID=" + record_ID); + if (record_ID <= 0) + return; + + int AD_Table_ID = m_curTab.getAD_Table_ID(); + new AArchive (aArchive.getButton(), AD_Table_ID, record_ID); + } // cmd_archive + + /** + * Print specific Report - or start default Report + */ + private void cmd_print() + { + cmd_print(false); + } + + /** + * Print specific Report - or start default Report + */ + private void cmd_print(boolean printPreview) + { + // Get process defined for this tab + int AD_Process_ID = m_curTab.getAD_Process_ID(); + log.info("ID=" + AD_Process_ID); + + // No report defined + if (AD_Process_ID == 0) + { + cmd_report(); + return; + } + + cmd_save(false); + // + int table_ID = m_curTab.getAD_Table_ID(); + int record_ID = m_curTab.getRecord_ID(); + ProcessInfo pi = new ProcessInfo (getTitle(), AD_Process_ID, table_ID, record_ID); + pi.setAD_User_ID (Env.getAD_User_ID(m_ctx)); + pi.setAD_Client_ID (Env.getAD_Client_ID(m_ctx)); + pi.setPrintPreview(printPreview); + + ProcessCtl.process(this, m_curWindowNo, pi, null); // calls lockUI, unlockUI + } // cmd_print + + /** + * Find - Set Query + */ + private void cmd_find() + { + if (m_curTab == null) + return; + cmd_save(false); + // Gets Fields from AD_Field_v + GridField[] findFields = GridField.createFields(m_ctx, m_curWindowNo, 0, m_curTab.getAD_Tab_ID()); + Find find = new Find (Env.getFrame(this), m_curWindowNo, m_curTab.getName(), + m_curTab.getAD_Tab_ID(), m_curTab.getAD_Table_ID(), m_curTab.getTableName(), + m_curTab.getWhereExtended(), findFields, 1); + MQuery query = find.getQuery(); + find.dispose(); + find = null; + + // Confirmed query + if (query != null) + { + m_onlyCurrentRows = false; // search history too + m_curTab.setQuery(query); + m_curGC.query(m_onlyCurrentRows, m_onlyCurrentDays, 0); // autoSize + } + aFind.setPressed(m_curTab.isQueryActive()); + } // cmd_find + + /** + * Attachment + */ + private void cmd_attachment() + { + int record_ID = m_curTab.getRecord_ID(); + log.info("Record_ID=" + record_ID); + if (record_ID == -1) // No Key + { + aAttachment.setEnabled(false); + return; + } + + // Attachment va = + new Attachment (Env.getFrame(this), m_curWindowNo, + m_curTab.getAD_AttachmentID(), m_curTab.getAD_Table_ID(), record_ID, null); + // + m_curTab.loadAttachments(); // reload + aAttachment.setPressed(m_curTab.hasAttachment()); + } // attachment + + /** + * Chat + */ + private void cmd_chat() + { + int record_ID = m_curTab.getRecord_ID(); + log.info("Record_ID=" + record_ID); + if (record_ID == -1) // No Key + { + aChat.setEnabled(false); + return; + } + // Find display + String infoName = null; + String infoDisplay = null; + for (int i = 0; i < m_curTab.getFieldCount(); i++) + { + GridField field = m_curTab.getField(i); + if (field.isKey()) + infoName = field.getHeader(); + if ((field.getColumnName().equals("Name") || field.getColumnName().equals("DocumentNo") ) + && field.getValue() != null) + infoDisplay = field.getValue().toString(); + if (infoName != null && infoDisplay != null) + break; + } + String description = infoName + ": " + infoDisplay; + // + // AChat va = + new AChat (Env.getFrame(this), m_curWindowNo, + m_curTab.getCM_ChatID(), m_curTab.getAD_Table_ID(), record_ID, + description, null); + // + m_curTab.loadChats(); // reload + aChat.setPressed(m_curTab.hasChat()); + } // chat + + /** + * Lock + */ + private void cmd_lock() + { + log.info("Modifiers=" + m_lastModifiers); + if (!m_isPersonalLock) + return; + int record_ID = m_curTab.getRecord_ID(); + if (record_ID == -1) // No Key + return; + // Control Pressed + if ((m_lastModifiers & InputEvent.CTRL_MASK) != 0) + { + new RecordAccessDialog(Env.getFrame(this), m_curTab.getAD_Table_ID(), record_ID); + } + else + { + m_curTab.lock (Env.getCtx(), record_ID, aLock.getButton().isSelected()); + m_curTab.loadAttachments(); // reload + } + aLock.setPressed(m_curTab.isLocked()); + } // lock + + /** + * Toggle History + */ + private void cmd_history() + { + log.info(""); + if (m_mWorkbench.getMWindow(getWindowIndex()).isTransaction()) + { + if (m_curTab.needSave(true, true) && !cmd_save(false)) + return; + + Point pt = new Point (0, aHistory.getButton().getBounds().height); + SwingUtilities.convertPointToScreen(pt, aHistory.getButton()); + VOnlyCurrentDays ocd = new VOnlyCurrentDays(Env.getFrame(this), pt); + if (!ocd.isCancel()) { + m_onlyCurrentDays = ocd.getCurrentDays(); + if (m_onlyCurrentDays == 1) // Day + { + m_onlyCurrentRows = true; + m_onlyCurrentDays = 0; // no Created restriction + } + else + m_onlyCurrentRows = false; + // + m_curTab.setQuery(null); // reset previous queries + MRole role = MRole.getDefault(); + int maxRows = role.getMaxQueryRecords(); + // + log.config("OnlyCurrent=" + m_onlyCurrentRows + + ", Days=" + m_onlyCurrentDays + + ", MaxRows=" + maxRows); + m_curGC.query(m_onlyCurrentRows, m_onlyCurrentDays, maxRows ); // autoSize + } + // Restore history button's pressed status + else { + if (isFirstTab()) + aHistory.setPressed(!m_curTab.isOnlyCurrentRows()); + } + } + } // cmd_history + + /** + * Help + */ + private void cmd_help() + { + log.info(""); + Help hlp = new Help (Env.getFrame(this), this.getTitle(), m_mWorkbench.getMWindow(getWindowIndex())); + hlp.setVisible(true); + } // cmd_help + + /** + * Close this screen - after save + * @param exit ask if user wants to exit application + */ + private void cmd_end (boolean exit) + { + boolean exitSystem = false; + if (!cmd_save(false)) + return; + if (exit && ADialog.ask(m_curWindowNo, this, "ExitApplication?")) + exitSystem = true; + + Env.getFrame(this).dispose(); // calls this dispose + + if (exitSystem) + AEnv.exit(0); + } // cmd_end + + /** + * Set Window Size + */ + private void cmd_winSize() + { + Dimension size = getSize(); + if (!ADialog.ask(m_curWindowNo, this, "WinSizeSet", + "x=" + size.width + " - y=" + size.height)) + { + setPreferredSize(null); + SwingUtilities.getWindowAncestor(this).pack(); + size = new Dimension (0,0); + } + // + MWindow win = new MWindow(m_ctx, m_curTab.getAD_Window_ID(), null); + win.setWindowSize(size); + win.save(); + } // cmdWinSize + + + + /************************************************************************** + * Start Button Process + * @param vButton button + */ + private void actionButton (VButton vButton) + { + log.info(vButton.toString()); + + boolean startWOasking = false; + boolean batch = false; + String col = vButton.getColumnName(); + + // Zoom + if (col.equals("Record_ID")) + { + int AD_Table_ID = Env.getContextAsInt (m_ctx, m_curWindowNo, "AD_Table_ID"); + int Record_ID = Env.getContextAsInt (m_ctx, m_curWindowNo, "Record_ID"); + AEnv.zoom(AD_Table_ID, Record_ID); + return; + } // Zoom + + // save first --------------- + if (m_curTab.needSave(true, false)) + if (!cmd_save(true)) + return; + // + int table_ID = m_curTab.getAD_Table_ID(); + // Record_ID + int record_ID = m_curTab.getRecord_ID(); + // Record_ID - Language Handling + if (record_ID == -1 && m_curTab.getKeyColumnName().equals("AD_Language")) + record_ID = Env.getContextAsInt (m_ctx, m_curWindowNo, "AD_Language_ID"); + // Record_ID - Change Log ID + if (record_ID == -1 + && (vButton.getProcess_ID() == 306 || vButton.getProcess_ID() == 307)) + { + Integer id = (Integer)m_curTab.getValue("AD_ChangeLog_ID"); + record_ID = id.intValue(); + } + // Ensure it's saved + if (record_ID == -1 && m_curTab.getKeyColumnName().endsWith("_ID")) + { + ADialog.error(m_curWindowNo, this, "SaveErrorRowNotFound"); + return; + } + + // Pop up Payment Rules + if (col.equals("PaymentRule")) + { + VPayment vp = new VPayment(m_curWindowNo, m_curTab, vButton); + if (vp.isInitOK()) // may not be allowed + vp.setVisible(true); + vp.dispose(); + if (vp.needSave()) + { + cmd_save(false); + cmd_refresh(); + } + } // PaymentRule + + // Pop up Document Action (Workflow) + else if (col.equals("DocAction")) + { + VDocAction vda = new VDocAction(m_curWindowNo, m_curTab, vButton, record_ID); + // Something to select from? + if (vda.getNumberOfOptions() == 0) + { + vda.dispose (); + log.info("DocAction - No Options"); + return; + } + else + { + vda.setVisible(true); + if (!vda.isStartProcess()) + return; + batch = vda.isBatch(); + startWOasking = true; + vda.dispose(); + } + } // DocAction + + // Pop up Create From + else if (col.equals("CreateFrom")) + { + // m_curWindowNo + VCreateFrom vcf = VCreateFrom.create (m_curTab); + if (vcf != null) + { + if (vcf.isInitOK()) + { + vcf.setVisible(true); + vcf.dispose(); + m_curTab.dataRefresh(); + } + else + vcf.dispose(); + return; + } + // else may start process + } // CreateFrom + + // Posting ----- + else if (col.equals("Posted") && MRole.getDefault().isShowAcct()) + { + // Check Doc Status + String processed = Env.getContext(m_ctx, m_curWindowNo, "Processed"); + if (!processed.equals("Y")) + { + String docStatus = Env.getContext(m_ctx, m_curWindowNo, "DocStatus"); + if (DocAction.STATUS_Completed.equals(docStatus) + || DocAction.STATUS_Closed.equals(docStatus) + || DocAction.STATUS_Reversed.equals(docStatus) + || DocAction.STATUS_Voided.equals(docStatus)) + ; + else + { + ADialog.error(m_curWindowNo, this, "PostDocNotComplete"); + return; + } + } + + // Check Post Status + Object ps = m_curTab.getValue("Posted"); + if (ps != null && ps.equals("Y")) + { + new org.compiere.acct.AcctViewer (Env.getContextAsInt (m_ctx, m_curWindowNo, "AD_Client_ID"), + m_curTab.getAD_Table_ID(), m_curTab.getRecord_ID()); + } + else + { + if (ADialog.ask(m_curWindowNo, this, "PostImmediate?")) + { + boolean force = ps != null && !ps.equals ("N"); // force when problems + String error = AEnv.postImmediate (m_curWindowNo, Env.getAD_Client_ID(m_ctx), + m_curTab.getAD_Table_ID(), m_curTab.getRecord_ID(), force); + m_curTab.dataRefresh(); + if (error != null) + ADialog.error(m_curWindowNo, this, "PostingError-N", error); + } + } + return; + } // Posted + + /** + * Start Process ---- + */ + + log.config("Process_ID=" + vButton.getProcess_ID() + ", Record_ID=" + record_ID); + if (vButton.getProcess_ID() == 0) + return; + // Save item changed + if (m_curTab.needSave(true, false)) + if (!cmd_save(true)) + return; + + // hengsin - [ 1639242 ] Inconsistent appearance of Process/Report Dialog + // globalqss - Add support for Don't ShowHelp option in Process + // this code must be changed if integrated the parameters and help in only one window + /* + MProcess pr = new MProcess(m_ctx, vButton.getProcess_ID(), null); + if (pr.getShowHelp() != null && pr.getShowHelp().equals("N")) { + startWOasking = true; + } + // end globalqss + + // Ask user to start process, if Description and Help is not empty + + if (!startWOasking && !(vButton.getDescription().equals("") && vButton.getHelp().equals(""))) + if (!ADialog.ask(m_curWindowNo, this, "StartProcess?", + // "" + vButton.getText() + "
    " + + vButton.getDescription() + "\n" + vButton.getHelp())) + return; + // + String title = vButton.getDescription(); + if (title == null || title.length() == 0) + title = vButton.getName(); + ProcessInfo pi = new ProcessInfo (title, vButton.getProcess_ID(), table_ID, record_ID); + pi.setAD_User_ID (Env.getAD_User_ID(m_ctx)); + pi.setAD_Client_ID (Env.getAD_Client_ID(m_ctx)); + pi.setIsBatch(batch); + + // Trx trx = Trx.get(Trx.createTrxName("AppsPanel"), true); + ProcessCtl.process(this, m_curWindowNo, pi, null); // calls lockUI, unlockUI + */ + + ProcessModalDialog dialog = new ProcessModalDialog(m_ctx, Env.getWindow(m_curWindowNo), Env.getHeader(m_ctx, m_curWindowNo), + this, m_curWindowNo, vButton.getProcess_ID(), table_ID, + record_ID, startWOasking); + if (dialog.isValid()) + { + dialog.validate(); + dialog.pack(); + AEnv.showCenterWindow(Env.getWindow(m_curWindowNo), dialog); + } + } // actionButton + + + /************************************************************************** + * Lock User Interface. + * Called from the Worker before processing + * @param pi process info + */ + public void lockUI (ProcessInfo pi) + { + // log.fine("" + pi); + setBusy(true, false); + } // lockUI + + /** + * Unlock User Interface. + * Called from the Worker when processing is done + * @param pi of execute ASync call + */ + public void unlockUI (ProcessInfo pi) + { + // log.fine("" + pi); + boolean notPrint = pi != null + && pi.getAD_Process_ID() != m_curTab.getAD_Process_ID() + && pi.isReportingProcess() == false; + // + setBusy(false, notPrint); + // Process Result + if (notPrint) // refresh if not print + { + // Refresh data + m_curTab.dataRefresh(); + // Timeout + if (pi.isTimeout()) // set temporarily to R/O + Env.setContext(m_ctx, m_curWindowNo, "Processed", "Y"); + m_curGC.dynamicDisplay(0); + // Update Status Line + setStatusLine(pi.getSummary(), pi.isError()); + // Get Log Info + ProcessInfoUtil.setLogFromDB(pi); + String logInfo = pi.getLogInfo(); + if (logInfo.length() > 0) + ADialog.info(m_curWindowNo, this, Env.getHeader(m_ctx, m_curWindowNo), + pi.getTitle(), logInfo); // clear text + } + } // unlockUI + + /** + * Is the UI locked (Internal method) + * @return true, if UI is locked + */ + public boolean isUILocked() + { + return m_isLocked; + } // isLoacked + + /** + * Method to be executed async. + * Called from the ASyncProcess worker + * @param pi process info + */ + public void executeASync (ProcessInfo pi) + { + log.config("-"); + } // executeASync + + /** + * Get Current Tab + * @return current tab + */ + public GridTab getCurrentTab() + { + return m_curTab; + } // getCurrentTab + + /** + * Get the number of tabs in the panels JTabbedPane. + * @return no of tabs in the JTabbedPane of the panel + */ + public int noOfTabs() { + return m_curWinTab.getTabCount(); + } + + /** + * Get the selected tab index of the panels JTabbedPane. + * @return selected index of JTabbedPane + */ + public int getSelectedTabIndex() { + return m_curWinTab.getSelectedIndex(); + } + + /** + * Set the tab index of the panels JTabbedPane. + */ + public void setSelectedTabIndex(int index) { + m_curWinTab.setSelectedIndex(index); + } + + /** + * Get the name of the selected tab in the panels JTabbedPane. + * @return name of selected tab + */ + public String getSelectedTabName() { + String title = m_curWinTab.getTitleAt(m_curWinTab.getSelectedIndex()); + title = title.substring(title.indexOf("")+6); + title = title.substring(0,title.indexOf('<')); + return title; + } + + /** + * String representation + * @return String representation + */ + public String toString() + { + String s = "APanel[curWindowNo=" + m_curWindowNo; + if (m_mWorkbench != null) + s += ",WB=" + m_mWorkbench.toString(); + s += "]"; + return s; + } // toString + + /** + * Simple action class for the resort of tablelines (switch line no). Delegates actionPerformed + * to APanel. + * + * @author Karsten Thiemann, kthiemann@adempiere.org + * + */ + class SwitchAction extends AbstractAction { + + /** the action listener - APanel */ + private ActionListener al; + + /** action name */ + private String name; + + /** + * Constructor. + * @param name + * @param accelerator + * @param al + */ + SwitchAction(String name, KeyStroke accelerator, ActionListener al) { + super(name); + putValue(Action.NAME, name); // Display + putValue(Action.SHORT_DESCRIPTION, name); // Tooltip + putValue(Action.ACCELERATOR_KEY, accelerator); // KeyStroke + putValue(Action.ACTION_COMMAND_KEY, name); // ActionCammand + this.al = al; + this.name = name; + } + + public void actionPerformed(ActionEvent e) { + al.actionPerformed(e); + } // actionPerformed + + public String getName() { + return name; + } + } + + /** + * Removes the default KeyStroke action for the up/down keys and adds switch + * line actions. + */ + private void initSwitchLineAction() { + aSwitchLinesDownAction = new SwitchAction("switchLinesDown", KeyStroke.getKeyStroke( + KeyEvent.VK_DOWN, Event.SHIFT_MASK), this); + aSwitchLinesUpAction = new SwitchAction("switchLinesUp", KeyStroke.getKeyStroke( + KeyEvent.VK_UP, Event.SHIFT_MASK), this); + + JTable table = m_curGC.getTable(); + table.getInputMap(CPanel.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( + KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.SHIFT_MASK), "none"); + table.getInputMap(CPanel.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( + KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.SHIFT_MASK), "none"); + table.getInputMap(CPanel.WHEN_FOCUSED).put( + KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.SHIFT_MASK), "none"); + table.getInputMap(CPanel.WHEN_FOCUSED).put( + KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.SHIFT_MASK), "none"); + + getInputMap(CPanel.WHEN_IN_FOCUSED_WINDOW).put( + KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.SHIFT_MASK), + aSwitchLinesDownAction.getName()); + getActionMap().put(aSwitchLinesDownAction.getName(), aSwitchLinesDownAction); + getInputMap(CPanel.WHEN_IN_FOCUSED_WINDOW).put( + KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.SHIFT_MASK), + aSwitchLinesUpAction.getName()); + getActionMap().put(aSwitchLinesUpAction.getName(), aSwitchLinesUpAction); + } + + public boolean isNested() { + return isNested; + } + +} // APanel diff --git a/client/src/org/compiere/apps/AStart.java b/client/src/org/compiere/apps/AStart.java new file mode 100644 index 0000000000..4bb16df8d9 --- /dev/null +++ b/client/src/org/compiere/apps/AStart.java @@ -0,0 +1,144 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.apps; + +import java.awt.*; +import javax.swing.*; + +/** + * Applet Start + * + * @author Jorg Janke + * @version $Id: AStart.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $ + */ +public final class AStart extends JApplet +{ + boolean isStandalone = false; + + /** + * Get a parameter value + */ + public String getParameter(String key, String def) + { + return isStandalone ? System.getProperty(key, def) : + (getParameter(key) != null ? getParameter(key) : def); + } + + /** + * Construct the applet + */ + public AStart() + { + } + + /** + * Initialize the applet + */ + public void init() + { + try + { + jbInit(); + } + catch(Exception e) + { + e.printStackTrace(); + } + } + + /** + * Component initialization + */ + private void jbInit() throws Exception + { + this.setSize(new Dimension(400,300)); + } + + /** + * Start the applet + */ + public void start() + { + } + + /** + * Stop the applet + */ + public void stop() + { + } + + /** + * Destroy the applet + */ + public void destroy() + { + } + + /** + * Get Applet information + */ + public String getAppletInfo() + { + return "Start Applet"; + } + + /** + * Get parameter info + */ + public String[][] getParameterInfo() + { + return null; + } + + public void setStandAlone(boolean ok) + { + isStandalone=ok; + } + /** + * Main method + */ + public static void main(String[] args) + { + AStart applet = new AStart(); + applet.isStandalone = true; + JFrame frame = new JFrame(); + //EXIT_ON_CLOSE == 3 + frame.setDefaultCloseOperation(3); + frame.setTitle("Start Applet"); + frame.getContentPane().add(applet, BorderLayout.CENTER); + applet.init(); + applet.start(); + frame.setSize(400,320); + Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); + frame.setLocation((d.width - frame.getSize().width) / 2, (d.height - frame.getSize().height) / 2); + frame.setVisible(true); + } + + //static initializer for setting look & feel + static + { + try + { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); + } + catch(Exception e) + { + } + } +} // AStert diff --git a/client/src/org/compiere/apps/form/FormFrame.java b/client/src/org/compiere/apps/form/FormFrame.java new file mode 100644 index 0000000000..9572b36aee --- /dev/null +++ b/client/src/org/compiere/apps/form/FormFrame.java @@ -0,0 +1,445 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.apps.form; + +import java.awt.Cursor; +import java.awt.Event; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; +import java.util.logging.Level; + +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.KeyStroke; + +import org.compiere.apps.AEnv; +import org.compiere.apps.AGlassPane; +import org.compiere.apps.AMenu; +import org.compiere.apps.Help; +import org.compiere.apps.WindowMenu; +import org.compiere.model.MRole; +import org.compiere.model.MUser; +import org.compiere.swing.CFrame; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Trace; + +/** + * Form Framework + * + * @author Jorg Janke + * @version $Id: FormFrame.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $ + * + * Colin Rooney 2007/03/20 RFE#1670185 & BUG#1684142 + * Extend security to Info Queries + */ +public class FormFrame extends CFrame + implements ActionListener +{ + /** + * Create Form. + * Need to call openForm + */ + public FormFrame () + { + super(); + addWindowListener(new java.awt.event.WindowAdapter() + { + public void windowOpened(java.awt.event.WindowEvent evt) + { + formWindowOpened(evt); + } + }); + + m_WindowNo = Env.createWindowNo (this); + setGlassPane(m_glassPane); + try + { + jbInit(); + createMenu(); + } + catch(Exception e) + { + log.log(Level.SEVERE, "", e); + } + } // FormFrame + + /** WindowNo */ + private int m_WindowNo; + /** The GlassPane */ + private AGlassPane m_glassPane = new AGlassPane(); + /** Description */ + private String m_Description = null; + /** Help */ + private String m_Help = null; + /** Menu Bar */ + private JMenuBar menuBar = new JMenuBar(); + /** The Panel to be displayed */ + private FormPanel m_panel = null; + /** Maximize Window */ + public boolean m_maximize = false; + /** Logger */ + private static CLogger log = CLogger.getCLogger(FormFrame.class); + + /** Form ID */ + private int p_AD_Form_ID = 0; + + /** + * Static Init + * @throws Exception + */ + private void jbInit() throws Exception + { + this.setIconImage(org.compiere.Adempiere.getImage16()); + this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + this.setJMenuBar(menuBar); + } // jbInit + + /** + * Create Menu + */ + private void createMenu() + { + // File + JMenu mFile = AEnv.getMenu("File"); + menuBar.add(mFile); + AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this); + AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, Event.SHIFT_MASK), mFile, this); + AEnv.addMenuItem("Report", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.ALT_MASK), mFile, this); + mFile.addSeparator(); + AEnv.addMenuItem("End", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), mFile, this); + AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this); + + // View + JMenu mView = AEnv.getMenu("View"); + menuBar.add(mView); + + if (MRole.getDefault().isAllow_Info_Product()) + { + AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this); + } + if (MRole.getDefault().isAllow_Info_BPartner()) + { + AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this); + } + if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account()) + { + AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this); + } + if (MRole.getDefault().isAllow_Info_Schedule()) + { + AEnv.addMenuItem("InfoSchedule", null, null, mView, this); + } + mView.addSeparator(); + if (MRole.getDefault().isAllow_Info_Order()) + { + AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Invoice()) + { + AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_InOut()) + { + AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Payment()) + { + AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_CashJournal()) + { + AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Resource()) + { + AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Asset()) + { + AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); + } + // Tools + JMenu mTools = AEnv.getMenu("Tools"); + menuBar.add(mTools); + AEnv.addMenuItem("Calculator", null, null, mTools, this); + AEnv.addMenuItem("Calendar", null, null, mTools, this); + AEnv.addMenuItem("Editor", null, null, mTools, this); + MUser user = MUser.get(Env.getCtx()); + if (user.isAdministrator()) + AEnv.addMenuItem("Script", null, null, mTools, this); + if (MRole.getDefault().isShowPreference()) + { + mTools.addSeparator(); + AEnv.addMenuItem("Preference", null, null, mTools, this); + } + + // Window + AMenu aMenu = (AMenu)Env.getWindow(0); + JMenu mWindow = new WindowMenu(aMenu.getWindowManager(), this); + menuBar.add(mWindow); + + // Help + JMenu mHelp = AEnv.getMenu("Help"); + menuBar.add(mHelp); + AEnv.addMenuItem("Help", "Help", KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), mHelp, this); + AEnv.addMenuItem("Online", null, null, mHelp, this); + AEnv.addMenuItem("EMailSupport", null, null, mHelp, this); + AEnv.addMenuItem("About", null, null, mHelp, this); + } // createMenu + + /** + * Dispose + */ + public void dispose() + { + log.config(""); + // recursive calls + if (Trace.isCalledFrom("JFrame") && m_panel != null) // [x] close window pressed + m_panel.dispose(); + m_panel = null; + Env.clearWinContext(m_WindowNo); + super.dispose(); + } // dispose + + /** + * Open Form + * @param AD_Form_ID form + * @return true if form opened + */ + public boolean openForm (int AD_Form_ID) + { + Properties ctx = Env.getCtx(); + // + String name = null; + String className = null; + String sql = "SELECT Name, Description, ClassName, Help FROM AD_Form WHERE AD_Form_ID=?"; + boolean trl = !Env.isBaseLanguage(ctx, "AD_Form"); + if (trl) + sql = "SELECT t.Name, t.Description, f.ClassName, t.Help " + + "FROM AD_Form f INNER JOIN AD_Form_Trl t" + + " ON (f.AD_Form_ID=t.AD_Form_ID AND AD_Language=?)" + + "WHERE f.AD_Form_ID=?"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, null); + if (trl) + { + pstmt.setString(1, Env.getAD_Language(ctx)); + pstmt.setInt(2, AD_Form_ID); + } + else + pstmt.setInt(1, AD_Form_ID); + rs = pstmt.executeQuery(); + if (rs.next()) + { + name = rs.getString(1); + m_Description = rs.getString(2); + className = rs.getString(3); + m_Help = rs.getString(4); + } + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + if (className == null) + return false; + // + return openForm(AD_Form_ID, className, name); + } // openForm + + /** + * Open Form + * @param AD_Form_ID Form + * @param className class name + * @param name title + * @return true if started + */ + protected boolean openForm (int AD_Form_ID, String className, String name) + { + log.info("AD_Form_ID=" + AD_Form_ID + " - Class=" + className); + Properties ctx = Env.getCtx(); + Env.setContext(ctx, m_WindowNo, "WindowName", name); + setTitle(Env.getHeader(ctx, m_WindowNo)); + + try + { + // Create instance w/o parameters + m_panel = (FormPanel)Class.forName(className).newInstance(); + } + catch (Exception e) + { + log.log(Level.SEVERE, "Class=" + className + ", AD_Form_ID=" + AD_Form_ID, e); + return false; + } + // + m_panel.init(m_WindowNo, this); + p_AD_Form_ID = AD_Form_ID; + return true; + } // openForm + + /** + * Get Form Panel + * @return form panel + */ + public FormPanel getFormPanel() + { + return m_panel; + } // getFormPanel + + /** + * Action Listener + * @param e event + */ + public void actionPerformed(ActionEvent e) + { + String cmd = e.getActionCommand(); + if (cmd.equals("End")) + dispose(); + else if (cmd.equals("Help")) + actionHelp(); + else if (!AEnv.actionPerformed(cmd, m_WindowNo, this)) + log.log(Level.SEVERE, "Not handeled=" + cmd); + } // actionPerformed + + /** + * Show Help + */ + private void actionHelp() + { + StringBuffer sb = new StringBuffer(); + if (m_Description != null && m_Description.length() > 0) + sb.append("

    ").append(m_Description).append("

    "); + if (m_Help != null && m_Help.length() > 0) + sb.append("

    ").append(m_Help); + Help hlp = new Help (Env.getFrame(this), this.getTitle(), sb.toString()); + hlp.setVisible(true); + } // actionHelp + + + /************************************************************************* + * Set Window Busy + * @param busy busy + */ + public void setBusy (boolean busy) + { + if (busy == m_glassPane.isVisible()) + return; + log.info("Busy=" + busy); + if (busy) + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + else + setCursor(Cursor.getDefaultCursor()); + m_glassPane.setMessage(null); + m_glassPane.setVisible(busy); + m_glassPane.requestFocus(); + } // setBusy + + /** + * Set Busy Message + * @param AD_Message message + */ + public void setBusyMessage (String AD_Message) + { + m_glassPane.setMessage(AD_Message); + } // setBusyMessage + + /** + * Set and start Busy Counter + * @param time in seconds + */ + public void setBusyTimer (int time) + { + m_glassPane.setBusyTimer (time); + } // setBusyTimer + + + /** + * Set Maximize Window + * @param max maximize + */ + public void setMaximize (boolean max) + { + m_maximize = max; + } // setMaximize + + + /** + * Form Window Opened. + * Maximize window if required + * @param evt event + */ + private void formWindowOpened(java.awt.event.WindowEvent evt) + { + if (m_maximize == true) + { + super.setVisible(true); + super.setExtendedState(JFrame.MAXIMIZED_BOTH); + } + } // formWindowOpened + + /** + * Start Batch + * @param process + * @return running thread + */ + public Thread startBatch (final Runnable process) + { + Thread worker = new Thread() + { + public void run() + { + setBusy(true); + process.run(); + setBusy(false); + } + }; + worker.start(); + return worker; + } // startBatch + + /** + * @return Returns the AD_Form_ID. + */ + public int getAD_Form_ID () + { + return p_AD_Form_ID; + } // getAD_Window_ID + /** + * @return Returns the manuBar + */ + public JMenuBar getMenu() + { + return menuBar; + } + +} // FormFrame diff --git a/client/src/org/compiere/apps/form/VAllocation.java b/client/src/org/compiere/apps/form/VAllocation.java new file mode 100644 index 0000000000..7ef3d455c6 --- /dev/null +++ b/client/src/org/compiere/apps/form/VAllocation.java @@ -0,0 +1,1211 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.apps.form; + +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.math.*; +import java.sql.*; +import java.text.*; +import java.util.*; +import java.util.logging.*; +import javax.swing.*; +import javax.swing.event.*; +import javax.swing.table.*; + +import org.adempiere.plaf.AdempierePLAF; +import org.compiere.apps.*; +import org.compiere.grid.ed.*; +import org.compiere.minigrid.*; +import org.compiere.model.*; +import org.compiere.plaf.*; +import org.compiere.process.*; +import org.compiere.swing.*; +import org.compiere.util.*; + +/** + * Allocation Form + * + * @author Jorg Janke + * @version $Id: VAllocation.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $ + * + * Contributor : Fabian Aguilar - OFBConsulting - Multiallocation + */ +public class VAllocation extends CPanel + implements FormPanel, ActionListener, TableModelListener, VetoableChangeListener +{ + + /** + * Initialize Panel + * @param WindowNo window + * @param frame frame + */ + public void init (int WindowNo, FormFrame frame) + { + m_WindowNo = WindowNo; + m_frame = frame; + Env.setContext(Env.getCtx(), m_WindowNo, "IsSOTrx", "Y"); // defaults to no + m_C_Currency_ID = Env.getContextAsInt(Env.getCtx(), "$C_Currency_ID"); // default + // + log.info("Currency=" + m_C_Currency_ID); + try + { + dynInit(); + jbInit(); + calculate(); + frame.getContentPane().add(mainPanel, BorderLayout.CENTER); + frame.getContentPane().add(statusBar, BorderLayout.SOUTH); + } + catch(Exception e) + { + log.log(Level.SEVERE, "", e); + } + } // init + + /** Window No */ + private int m_WindowNo = 0; + /** FormFrame */ + private FormFrame m_frame; + /** Logger */ + private static CLogger log = CLogger.getCLogger(VAllocation.class); + + private boolean m_calculating = false; + private int m_C_Currency_ID = 0; + private int m_C_BPartner_ID = 0; + private int m_noInvoices = 0; + private int m_noPayments = 0; + private BigDecimal totalInv = new BigDecimal(0.0); + private BigDecimal totalPay = new BigDecimal(0.0); + private BigDecimal totalDiff = new BigDecimal(0.0); + + // Index changed if multi-currency + private int i_payment = 7; + // + private int i_open = 6; + private int i_discount = 7; + private int i_writeOff = 8; + private int i_overUnder = 9; + private int i_applied = 10; +// private int i_multiplier = 10; + // + private CPanel mainPanel = new CPanel(); + private BorderLayout mainLayout = new BorderLayout(); + private CPanel parameterPanel = new CPanel(); + private CPanel allocationPanel = new CPanel(); + private GridBagLayout parameterLayout = new GridBagLayout(); + private JLabel bpartnerLabel = new JLabel(); + private VLookup bpartnerSearch = null; + private MiniTable invoiceTable = new MiniTable(); + private MiniTable paymentTable = new MiniTable(); + private JSplitPane infoPanel = new JSplitPane(); + private CPanel paymentPanel = new CPanel(); + private CPanel invoicePanel = new CPanel(); + private JLabel paymentLabel = new JLabel(); + private JLabel invoiceLabel = new JLabel(); + private BorderLayout paymentLayout = new BorderLayout(); + private BorderLayout invoiceLayout = new BorderLayout(); + private JLabel paymentInfo = new JLabel(); + private JLabel invoiceInfo = new JLabel(); + private JScrollPane paymentScrollPane = new JScrollPane(); + private JScrollPane invoiceScrollPane = new JScrollPane(); + private GridBagLayout allocationLayout = new GridBagLayout(); + private JLabel differenceLabel = new JLabel(); + private CTextField differenceField = new CTextField(); + private JButton allocateButton = new JButton(); + private JLabel currencyLabel = new JLabel(); + private VLookup currencyPick = null; + private JCheckBox multiCurrency = new JCheckBox(); + private JLabel allocCurrencyLabel = new JLabel(); + private StatusBar statusBar = new StatusBar(); + private JLabel dateLabel = new JLabel(); + private VDate dateField = new VDate(); + private JCheckBox autoWriteOff = new JCheckBox(); + private int m_AD_Org_ID = 0; + private JLabel organizationLabel = new JLabel(); + private VLookup organizationPick = null; + + private ArrayList m_bpartnerCheck = new ArrayList(); + + /** + * Static Init + * @throws Exception + */ + private void jbInit() throws Exception + { + CompiereColor.setBackground(this); + // + mainPanel.setLayout(mainLayout); + dateLabel.setText(Msg.getMsg(Env.getCtx(), "Date")); + dateLabel.setToolTipText(Msg.getMsg(Env.getCtx(), "AllocDate", false)); + autoWriteOff.setSelected(false); + autoWriteOff.setText(Msg.getMsg(Env.getCtx(), "AutoWriteOff", true)); + autoWriteOff.setToolTipText(Msg.getMsg(Env.getCtx(), "AutoWriteOff", false)); + // + parameterPanel.setLayout(parameterLayout); + allocationPanel.setLayout(allocationLayout); + bpartnerLabel.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID")); + paymentLabel.setRequestFocusEnabled(false); + paymentLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Payment_ID")); + invoiceLabel.setRequestFocusEnabled(false); + invoiceLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Invoice_ID")); + paymentPanel.setLayout(paymentLayout); + invoicePanel.setLayout(invoiceLayout); + invoiceInfo.setHorizontalAlignment(SwingConstants.RIGHT); + invoiceInfo.setHorizontalTextPosition(SwingConstants.RIGHT); + invoiceInfo.setText("."); + paymentInfo.setHorizontalAlignment(SwingConstants.RIGHT); + paymentInfo.setHorizontalTextPosition(SwingConstants.RIGHT); + paymentInfo.setText("."); + differenceLabel.setText(Msg.getMsg(Env.getCtx(), "Difference")); + differenceField.setBackground(AdempierePLAF.getFieldBackground_Inactive()); + differenceField.setEditable(false); + differenceField.setText("0"); + differenceField.setColumns(8); + differenceField.setHorizontalAlignment(SwingConstants.RIGHT); + allocateButton.setText(Msg.getMsg(Env.getCtx(), "Process")); + allocateButton.addActionListener(this); + currencyLabel.setText(Msg.translate(Env.getCtx(), "C_Currency_ID")); + multiCurrency.setText(Msg.getMsg(Env.getCtx(), "MultiCurrency")); + multiCurrency.addActionListener(this); + allocCurrencyLabel.setText("."); + invoiceScrollPane.setPreferredSize(new Dimension(200, 200)); + paymentScrollPane.setPreferredSize(new Dimension(200, 200)); + mainPanel.add(parameterPanel, BorderLayout.NORTH); + + //org filter + organizationLabel.setText(Msg.translate(Env.getCtx(), "AD_Org_ID")); + parameterPanel.add(organizationLabel, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0, 0)); + parameterPanel.add(organizationPick, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5,5,5,5), 0, 0)); + + parameterPanel.add(bpartnerLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + parameterPanel.add(bpartnerSearch, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0)); + parameterPanel.add(dateLabel, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + parameterPanel.add(dateField, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0)); + parameterPanel.add(currencyLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + parameterPanel.add(currencyPick, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0)); + parameterPanel.add(multiCurrency, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0)); + parameterPanel.add(autoWriteOff, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + mainPanel.add(allocationPanel, BorderLayout.SOUTH); + allocationPanel.add(differenceLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0)); + allocationPanel.add(differenceField, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0)); + allocationPanel.add(allocateButton, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0)); + allocationPanel.add(allocCurrencyLabel, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); + paymentPanel.add(paymentLabel, BorderLayout.NORTH); + paymentPanel.add(paymentInfo, BorderLayout.SOUTH); + paymentPanel.add(paymentScrollPane, BorderLayout.CENTER); + paymentScrollPane.getViewport().add(paymentTable, null); + invoicePanel.add(invoiceLabel, BorderLayout.NORTH); + invoicePanel.add(invoiceInfo, BorderLayout.SOUTH); + invoicePanel.add(invoiceScrollPane, BorderLayout.CENTER); + invoiceScrollPane.getViewport().add(invoiceTable, null); + // + mainPanel.add(infoPanel, BorderLayout.CENTER); + infoPanel.setOrientation(JSplitPane.VERTICAL_SPLIT); + infoPanel.setBorder(BorderFactory.createEtchedBorder()); + infoPanel.setTopComponent(paymentPanel); + infoPanel.setBottomComponent(invoicePanel); + infoPanel.add(paymentPanel, JSplitPane.TOP); + infoPanel.add(invoicePanel, JSplitPane.BOTTOM); + infoPanel.setContinuousLayout(true); + infoPanel.setPreferredSize(new Dimension(800,250)); + infoPanel.setDividerLocation(110); + } // jbInit + + /** + * Dispose + */ + public void dispose() + { + if (m_frame != null) + m_frame.dispose(); + m_frame = null; + } // dispose + + /** + * Dynamic Init (prepare dynamic fields) + * @throws Exception if Lookups cannot be initialized + */ + private void dynInit() throws Exception + { + // Currency + int AD_Column_ID = 3505; // C_Invoice.C_Currency_ID + MLookup lookupCur = MLookupFactory.get (Env.getCtx(), m_WindowNo, 0, AD_Column_ID, DisplayType.TableDir); + currencyPick = new VLookup("C_Currency_ID", true, false, true, lookupCur); + currencyPick.setValue(new Integer(m_C_Currency_ID)); + currencyPick.addVetoableChangeListener(this); + + // Organization filter selection + AD_Column_ID = 839; //C_Period.AD_Org_ID (needed to allow org 0) + MLookup lookupOrg = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, AD_Column_ID, DisplayType.TableDir); + organizationPick = new VLookup("AD_Org_ID", true, false, true, lookupOrg); + organizationPick.setValue(Env.getAD_Org_ID(Env.getCtx())); + organizationPick.addVetoableChangeListener(this); + + m_AD_Org_ID = Env.getAD_Org_ID(Env.getCtx()); + + // BPartner + AD_Column_ID = 3499; // C_Invoice.C_BPartner_ID + MLookup lookupBP = MLookupFactory.get (Env.getCtx(), m_WindowNo, 0, AD_Column_ID, DisplayType.Search); + bpartnerSearch = new VLookup("C_BPartner_ID", true, false, true, lookupBP); + bpartnerSearch.addVetoableChangeListener(this); + + // Translation + statusBar.setStatusLine(Msg.getMsg(Env.getCtx(), "AllocateStatus")); + statusBar.setStatusDB(""); + + // Date set to Login Date + dateField.setValue(Env.getContextAsDate(Env.getCtx(), "#Date")); + dateField.addVetoableChangeListener(this); + } // dynInit + + /** + * Load Business Partner Info + * - Payments + * - Invoices + */ + private void loadBPartner () + { + log.config("BPartner=" + m_C_BPartner_ID + ", Cur=" + m_C_Currency_ID); + // Need to have both values + if (m_C_BPartner_ID == 0 || m_C_Currency_ID == 0) + return; + + // Async BPartner Test + Integer key = new Integer(m_C_BPartner_ID); + if (!m_bpartnerCheck.contains(key)) + { + new Thread() + { + public void run() + { + MPayment.setIsAllocated (Env.getCtx(), m_C_BPartner_ID, null); + MInvoice.setIsPaid (Env.getCtx(), m_C_BPartner_ID, null); + } + }.start(); + m_bpartnerCheck.add(key); + } + + /******************************** + * Load unallocated Payments + * 1-TrxDate, 2-DocumentNo, (3-Currency, 4-PayAmt,) + * 5-ConvAmt, 6-ConvOpen, 7-Allocated + */ + Vector> data = new Vector>(); + StringBuffer sql = new StringBuffer("SELECT p.DateTrx,p.DocumentNo,p.C_Payment_ID," // 1..3 + + "c.ISO_Code,p.PayAmt," // 4..5 + + "currencyConvert(p.PayAmt,p.C_Currency_ID,?,?,p.C_ConversionType_ID,p.AD_Client_ID,p.AD_Org_ID),"// 6 #1, #2 + + "currencyConvert(paymentAvailable(C_Payment_ID),p.C_Currency_ID,?,?,p.C_ConversionType_ID,p.AD_Client_ID,p.AD_Org_ID)," // 7 #3, #4 + + "p.MultiplierAP " + + "FROM C_Payment_v p" // Corrected for AP/AR + + " INNER JOIN C_Currency c ON (p.C_Currency_ID=c.C_Currency_ID) " + + "WHERE p.IsAllocated='N' AND p.Processed='Y'" + + " AND p.C_Charge_ID IS NULL" // Prepayments OK + + " AND p.C_BPartner_ID=?"); // #5 + if (!multiCurrency.isSelected()) + sql.append(" AND p.C_Currency_ID=?"); // #6 + if (m_AD_Org_ID != 0 ) + sql.append(" AND p.AD_Org_ID=" + m_AD_Org_ID); + sql.append(" ORDER BY p.DateTrx,p.DocumentNo"); + + // role security + sql = new StringBuffer( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "p", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) ); + + log.fine("PaySQL=" + sql.toString()); + try + { + PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null); + pstmt.setInt(1, m_C_Currency_ID); + pstmt.setTimestamp(2, (Timestamp)dateField.getValue()); + pstmt.setInt(3, m_C_Currency_ID); + pstmt.setTimestamp(4, (Timestamp)dateField.getValue()); + pstmt.setInt(5, m_C_BPartner_ID); + if (!multiCurrency.isSelected()) + pstmt.setInt(6, m_C_Currency_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + Vector line = new Vector(); + line.add(new Boolean(false)); // 0-Selection + line.add(rs.getTimestamp(1)); // 1-TrxDate + KeyNamePair pp = new KeyNamePair(rs.getInt(3), rs.getString(2)); + line.add(pp); // 2-DocumentNo + if (multiCurrency.isSelected()) + { + line.add(rs.getString(4)); // 3-Currency + line.add(rs.getBigDecimal(5)); // 4-PayAmt + } + line.add(rs.getBigDecimal(6)); // 3/5-ConvAmt + BigDecimal available = rs.getBigDecimal(7); + if (available == null || available.signum() == 0) // nothing available + continue; + line.add(available); // 4/6-ConvOpen/Available + line.add(Env.ZERO); // 5/7-Payment +// line.add(rs.getBigDecimal(8)); // 6/8-Multiplier + // + data.add(line); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql.toString(), e); + } + // Remove previous listeners + paymentTable.getModel().removeTableModelListener(this); + // Header Info + Vector columnNames = new Vector(); + columnNames.add(Msg.getMsg(Env.getCtx(), "Select")); + columnNames.add(Msg.translate(Env.getCtx(), "Date")); + columnNames.add(Util.cleanAmp(Msg.translate(Env.getCtx(), "DocumentNo"))); + if (multiCurrency.isSelected()) + { + columnNames.add(Msg.getMsg(Env.getCtx(), "TrxCurrency")); + columnNames.add(Msg.translate(Env.getCtx(), "Amount")); + } + columnNames.add(Msg.getMsg(Env.getCtx(), "ConvertedAmount")); + columnNames.add(Msg.getMsg(Env.getCtx(), "OpenAmt")); + columnNames.add(Msg.getMsg(Env.getCtx(), "AppliedAmt")); +// columnNames.add(" "); // Multiplier + + // Set Model + DefaultTableModel modelP = new DefaultTableModel(data, columnNames); + modelP.addTableModelListener(this); + paymentTable.setModel(modelP); + // + int i = 0; + paymentTable.setColumnClass(i++, Boolean.class, false); // 0-Selection + paymentTable.setColumnClass(i++, Timestamp.class, true); // 1-TrxDate + paymentTable.setColumnClass(i++, String.class, true); // 2-Value + if (multiCurrency.isSelected()) + { + paymentTable.setColumnClass(i++, String.class, true); // 3-Currency + paymentTable.setColumnClass(i++, BigDecimal.class, true); // 4-PayAmt + } + paymentTable.setColumnClass(i++, BigDecimal.class, true); // 5-ConvAmt + paymentTable.setColumnClass(i++, BigDecimal.class, true); // 6-ConvOpen + paymentTable.setColumnClass(i++, BigDecimal.class, false); // 7-Allocated +// paymentTable.setColumnClass(i++, BigDecimal.class, true); // 8-Multiplier + + // + i_payment = multiCurrency.isSelected() ? 7 : 5; + + + // Table UI + paymentTable.autoSize(); + + + /******************************** + * Load unpaid Invoices + * 1-TrxDate, 2-Value, (3-Currency, 4-InvAmt,) + * 5-ConvAmt, 6-ConvOpen, 7-ConvDisc, 8-WriteOff, 9-Applied + * + SELECT i.DateInvoiced,i.DocumentNo,i.C_Invoice_ID,c.ISO_Code, + i.GrandTotal*i.MultiplierAP "GrandTotal", + currencyConvert(i.GrandTotal*i.MultiplierAP,i.C_Currency_ID,i.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID) "GrandTotal $", + invoiceOpen(C_Invoice_ID,C_InvoicePaySchedule_ID) "Open", + currencyConvert(invoiceOpen(C_Invoice_ID,C_InvoicePaySchedule_ID),i.C_Currency_ID,i.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*i.MultiplierAP "Open $", + invoiceDiscount(i.C_Invoice_ID,SysDate,C_InvoicePaySchedule_ID) "Discount", + currencyConvert(invoiceDiscount(i.C_Invoice_ID,SysDate,C_InvoicePaySchedule_ID),i.C_Currency_ID,i.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*i.Multiplier*i.MultiplierAP "Discount $", + i.MultiplierAP, i.Multiplier + FROM C_Invoice_v i INNER JOIN C_Currency c ON (i.C_Currency_ID=c.C_Currency_ID) + WHERE -- i.IsPaid='N' AND i.Processed='Y' AND i.C_BPartner_ID=1000001 + */ + data = new Vector>(); + sql = new StringBuffer("SELECT i.DateInvoiced,i.DocumentNo,i.C_Invoice_ID," // 1..3 + + "c.ISO_Code,i.GrandTotal*i.MultiplierAP, " // 4..5 Orig Currency + + "currencyConvert(i.GrandTotal*i.MultiplierAP,i.C_Currency_ID,?,?,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID), " // 6 #1 Converted, #2 Date + + "currencyConvert(invoiceOpen(C_Invoice_ID,C_InvoicePaySchedule_ID),i.C_Currency_ID,?,?,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*i.MultiplierAP, " // 7 #3, #4 Converted Open + + "currencyConvert(invoiceDiscount" // 8 AllowedDiscount + + "(i.C_Invoice_ID,?,C_InvoicePaySchedule_ID),i.C_Currency_ID,?,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*i.Multiplier*i.MultiplierAP," // #5, #6 + + "i.MultiplierAP " + + "FROM C_Invoice_v i" // corrected for CM/Split + + " INNER JOIN C_Currency c ON (i.C_Currency_ID=c.C_Currency_ID) " + + "WHERE i.IsPaid='N' AND i.Processed='Y'" + + " AND i.C_BPartner_ID=?"); // #7 + if (!multiCurrency.isSelected()) + sql.append(" AND i.C_Currency_ID=?"); // #8 + if (m_AD_Org_ID != 0 ) + sql.append(" AND i.AD_Org_ID=" + m_AD_Org_ID); + sql.append(" ORDER BY i.DateInvoiced, i.DocumentNo"); + log.fine("InvSQL=" + sql.toString()); + + // role security + sql = new StringBuffer( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "i", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) ); + + try + { + PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null); + pstmt.setInt(1, m_C_Currency_ID); + pstmt.setTimestamp(2, (Timestamp)dateField.getValue()); + pstmt.setInt(3, m_C_Currency_ID); + pstmt.setTimestamp(4, (Timestamp)dateField.getValue()); + pstmt.setTimestamp(5, (Timestamp)dateField.getValue()); + pstmt.setInt(6, m_C_Currency_ID); + pstmt.setInt(7, m_C_BPartner_ID); + if (!multiCurrency.isSelected()) + pstmt.setInt(8, m_C_Currency_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + Vector line = new Vector(); + line.add(new Boolean(false)); // 0-Selection + line.add(rs.getTimestamp(1)); // 1-TrxDate + KeyNamePair pp = new KeyNamePair(rs.getInt(3), rs.getString(2)); + line.add(pp); // 2-Value + if (multiCurrency.isSelected()) + { + line.add(rs.getString(4)); // 3-Currency + line.add(rs.getBigDecimal(5)); // 4-Orig Amount + } + line.add(rs.getBigDecimal(6)); // 3/5-ConvAmt + BigDecimal open = rs.getBigDecimal(7); + if (open == null) // no conversion rate + open = Env.ZERO; + line.add(open); // 4/6-ConvOpen + BigDecimal discount = rs.getBigDecimal(8); + if (discount == null) // no concersion rate + discount = Env.ZERO; + line.add(discount); // 5/7-ConvAllowedDisc + line.add(Env.ZERO); // 6/8-WriteOff + line.add(Env.ZERO); // 7/9-OverUnder + line.add(Env.ZERO); // 8/10-Applied +// line.add(rs.getBigDecimal(9)); // 8/10-Multiplier + // Add when open <> 0 (i.e. not if no conversion rate) + if (Env.ZERO.compareTo(open) != 0) + data.add(line); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql.toString(), e); + } + + // Remove previous listeners + invoiceTable.getModel().removeTableModelListener(this); + // Header Info + columnNames = new Vector(); + columnNames.add(Msg.getMsg(Env.getCtx(), "Select")); + columnNames.add(Msg.translate(Env.getCtx(), "Date")); + columnNames.add(Util.cleanAmp(Msg.translate(Env.getCtx(), "DocumentNo"))); + if (multiCurrency.isSelected()) + { + columnNames.add(Msg.getMsg(Env.getCtx(), "TrxCurrency")); + columnNames.add(Msg.translate(Env.getCtx(), "Amount")); + } + columnNames.add(Msg.getMsg(Env.getCtx(), "ConvertedAmount")); + columnNames.add(Msg.getMsg(Env.getCtx(), "OpenAmt")); + columnNames.add(Msg.getMsg(Env.getCtx(), "Discount")); + columnNames.add(Msg.getMsg(Env.getCtx(), "WriteOff")); + columnNames.add(Msg.getMsg(Env.getCtx(), "OverUnderAmt")); + columnNames.add(Msg.getMsg(Env.getCtx(), "AppliedAmt")); +// columnNames.add(" "); // Multiplier + + // Set Model + DefaultTableModel modelI = new DefaultTableModel(data, columnNames); + modelI.addTableModelListener(this); + invoiceTable.setModel(modelI); + // + i = 0; + invoiceTable.setColumnClass(i++, Boolean.class, false); // 0-Selection + invoiceTable.setColumnClass(i++, Timestamp.class, true); // 1-TrxDate + invoiceTable.setColumnClass(i++, String.class, true); // 2-Value + if (multiCurrency.isSelected()) + { + invoiceTable.setColumnClass(i++, String.class, true); // 3-Currency + invoiceTable.setColumnClass(i++, BigDecimal.class, true); // 4-Amt + } + invoiceTable.setColumnClass(i++, BigDecimal.class, true); // 5-ConvAmt + invoiceTable.setColumnClass(i++, BigDecimal.class, true); // 6-ConvAmt Open + invoiceTable.setColumnClass(i++, BigDecimal.class, false); // 7-Conv Discount + invoiceTable.setColumnClass(i++, BigDecimal.class, false); // 8-Conv WriteOff + invoiceTable.setColumnClass(i++, BigDecimal.class, false); // 9-Conv OverUnder + invoiceTable.setColumnClass(i++, BigDecimal.class, false); // 10-Conv Applied +// invoiceTable.setColumnClass(i++, BigDecimal.class, true); // 10-Multiplier + // Table UI + invoiceTable.autoSize(); + + i_open = multiCurrency.isSelected() ? 6 : 4; + i_discount = multiCurrency.isSelected() ? 7 : 5; + i_writeOff = multiCurrency.isSelected() ? 8 : 6; + i_overUnder = multiCurrency.isSelected() ? 9 : 7; + i_applied = multiCurrency.isSelected() ? 10 : 8; +// i_multiplier = multiCurrency.isSelected() ? 10 : 8; + + // Calculate Totals + calculate(); + } // loadBPartner + + + + /************************************************************************** + * Action Listener. + * - MultiCurrency + * - Allocate + * @param e event + */ + public void actionPerformed(ActionEvent e) + { + log.config(""); + if (e.getSource().equals(multiCurrency)) + loadBPartner(); + // Allocate + else if (e.getSource().equals(allocateButton)) + { + allocateButton.setEnabled(false); + saveData(); + loadBPartner(); + allocateButton.setEnabled(true); + } + } // actionPerformed + + /** + * Table Model Listener. + * - Recalculate Totals + * @param e event + */ + public void tableChanged(TableModelEvent e) + { + boolean isUpdate = (e.getType() == TableModelEvent.UPDATE); + // Not a table update + if (!isUpdate) + { + calculate(); + return; + } + + + /** + * Setting defaults + */ + if (m_calculating) // Avoid recursive calls + return; + m_calculating = true; + int row = e.getFirstRow(); + int col = e.getColumn(); + boolean isInvoice = (e.getSource().equals(invoiceTable.getModel())); + log.config("Row=" + row + + ", Col=" + col + ", InvoiceTable=" + isInvoice); + + // Payments + if (!isInvoice) + { + TableModel payment = paymentTable.getModel(); + + BigDecimal open = (BigDecimal)payment.getValueAt(row, i_open); + BigDecimal applied = (BigDecimal)payment.getValueAt(row, i_payment); + + if (col == 0) + { + // selection of payment row + if (((Boolean)payment.getValueAt(row, 0)).booleanValue()) + { + applied = open; // Open Amount + if (totalDiff.abs().compareTo(applied.abs()) < 0 // where less is available to allocate than open + && totalDiff.signum() == -applied.signum() ) // and the available amount has the opposite sign + applied = totalDiff.negate(); // reduce the amount applied to what's available + + } + else // de-selected + applied = Env.ZERO; + } + + + if (col == i_payment) + { + if ( applied.signum() == -open.signum() ) + applied = applied.negate(); + if ( open.abs().compareTo( applied.abs() ) < 0 ) + applied = open; + } + + payment.setValueAt(applied, row, i_payment); + } + + // Invoice + else + { + TableModel invoice = invoiceTable.getModel(); + boolean selected = ((Boolean) invoice.getValueAt(row, 0)).booleanValue(); + BigDecimal open = (BigDecimal)invoice.getValueAt(row, i_open); + BigDecimal discount = (BigDecimal)invoice.getValueAt(row, i_discount); + BigDecimal applied = (BigDecimal)invoice.getValueAt(row, i_applied); + BigDecimal writeOff = (BigDecimal) invoice.getValueAt(row, i_writeOff); + BigDecimal overUnder = (BigDecimal) invoice.getValueAt(row, i_overUnder); + int openSign = open.signum(); + + if (col == 0) //selection + { + // selected - set applied amount + if ( selected ) + { + applied = open; // Open Amount + applied = applied.subtract(discount); + writeOff = Env.ZERO; // to be sure + overUnder = Env.ZERO; + + if (totalDiff.abs().compareTo(applied.abs()) < 0 // where less is available to allocate than open + && totalDiff.signum() == applied.signum() ) // and the available amount has the same sign + applied = totalDiff; // reduce the amount applied to what's available + + if ( autoWriteOff.isSelected() ) + writeOff = open.subtract(applied.add(discount)); + else + overUnder = open.subtract(applied.add(discount)); + } + else // de-selected + { + writeOff = Env.ZERO; + applied = Env.ZERO; + overUnder = Env.ZERO; + } + } + + // check entered values are sensible and possibly auto write-off + if ( selected && col != 0 ) + { + + // values should have same sign as open except over/under + if ( discount.signum() == -openSign ) + discount = discount.negate(); + if ( writeOff.signum() == -openSign) + writeOff = writeOff.negate(); + if ( applied.signum() == -openSign ) + applied = applied.negate(); + + // discount and write-off must be less than open amount + if ( discount.abs().compareTo(open.abs()) > 0) + discount = open; + if ( writeOff.abs().compareTo(open.abs()) > 0) + writeOff = open; + + // if overUnder has same sign as open it is an under payment -> less than open + if ( overUnder.signum() == openSign && overUnder.abs().compareTo(open.abs()) > 0) + overUnder = open; + + /* + * Three rules to maintain: + * 1) |overUnder + writeOff + discount| < open + * 2) |writeOff + discount| < open ( in case overUnder is 'negative') + * 3) discount + writeOff + overUnder + applied = 0 + * + * As only one column is edited at a time and the initial position was one of compliance + * with the rules, we only need to redistribute the increase/decrease in the edited column to + * the others. + */ + + // comply with rules 1 or 2 + BigDecimal amtOver; + if ( overUnder.signum() == -openSign ) + amtOver = (discount.add(writeOff)).subtract(open); + else + amtOver = (discount.add(writeOff.add(overUnder))).subtract(open); + + if ( amtOver.signum() == openSign ) + { + BigDecimal temp = Env.ZERO; + if ( col != i_overUnder && overUnder.signum() == openSign ) + { + temp = overUnder.subtract(amtOver); + if ( temp.signum() == -openSign ) + { + overUnder = Env.ZERO; + amtOver = temp.negate(); + } + else + { + overUnder = temp; + amtOver = Env.ZERO; + } + } + + if ( col != i_writeOff ) + { + temp = writeOff.subtract(amtOver); + if ( temp.signum() == -openSign ) + { + writeOff = Env.ZERO; + amtOver = temp.negate(); + } + else + { + writeOff = temp; + amtOver = Env.ZERO; + } + } + + if ( col != i_discount ) + { + temp = discount.subtract(amtOver); + if ( temp.signum() == -openSign ) + { + discount = Env.ZERO; + amtOver = temp.negate(); + } + else + { + discount = temp; + amtOver = Env.ZERO; + } + } + } + + + // make everything balance to open + BigDecimal remainder = open.subtract(discount.add(writeOff.add(overUnder.add(applied)))); + + // need to increase something + if ( remainder.signum() == openSign ) + { + BigDecimal temp = Env.ZERO; + BigDecimal amtUnder = amtOver.negate(); + + if ( autoWriteOff.isSelected() && col != i_writeOff ) + { + temp = writeOff.add(remainder); + + if ( temp.abs().compareTo(amtUnder.abs()) > 0 ) + { + writeOff = amtUnder; + remainder = temp.subtract(amtUnder); + } + else + { + writeOff = temp; + remainder = Env.ZERO; + } + } + + if ( col != i_overUnder ) + { + temp = overUnder.add(remainder); + if ( temp.abs().compareTo(amtUnder.abs()) > 0 ) + { + overUnder = amtUnder; + remainder = temp.subtract(amtUnder); + } + else + { + overUnder = temp; + remainder = Env.ZERO; + } + } + + if ( col != i_applied && remainder.signum() != 0 ) + { + applied = applied.add(remainder); + remainder = Env.ZERO; + } + } + + // need to decrease some amount/s + if ( remainder.signum() == -openSign ) + { + BigDecimal temp = Env.ZERO; + + + if ( autoWriteOff.isSelected() && col != i_writeOff ) + { + temp = writeOff.add(remainder); + + if ( temp.signum() == -openSign ) + { + writeOff = Env.ZERO; + remainder = temp; + } + else + { + writeOff = temp; + remainder = Env.ZERO; + } + } + + + + if ( col != i_overUnder && remainder.signum() != 0 ) + { + overUnder = overUnder.add(remainder); + remainder = Env.ZERO; + } + } + + } + + // Warning if write Off > 30% + if (autoWriteOff.isSelected() && writeOff.doubleValue()/open.doubleValue() > .30) + ADialog.warn(m_WindowNo, this, "AllocationWriteOffWarn"); + + + invoice.setValueAt(discount, row, i_discount); + invoice.setValueAt(applied, row, i_applied); + invoice.setValueAt(writeOff, row, i_writeOff); + invoice.setValueAt(overUnder, row, i_overUnder); + + invoiceTable.repaint(); // update r/o + + + + } + + m_calculating = false; + calculate(); + } // tableChanged + + /** + * Calculate Allocation info + */ + private void calculate () + { + log.config(""); + // + DecimalFormat format = DisplayType.getNumberFormat(DisplayType.Amount); + Timestamp allocDate = null; + + // Payment + TableModel payment = paymentTable.getModel(); + totalPay = new BigDecimal(0.0); + int rows = payment.getRowCount(); + m_noPayments = 0; + for (int i = 0; i < rows; i++) + { + if (((Boolean)payment.getValueAt(i, 0)).booleanValue()) + { + Timestamp ts = (Timestamp)payment.getValueAt(i, 1); + if ( !multiCurrency.isSelected() ) // the converted amounts are only valid for the selected date + allocDate = TimeUtil.max(allocDate, ts); + BigDecimal bd = (BigDecimal)payment.getValueAt(i, i_payment); + totalPay = totalPay.add(bd); // Applied Pay + m_noPayments++; + log.fine("Payment_" + i + " = " + bd + " - Total=" + totalPay); + } + } + paymentInfo.setText(String.valueOf(m_noPayments) + " - " + + Msg.getMsg(Env.getCtx(), "Sum") + " " + format.format(totalPay) + " "); + + // Invoices + TableModel invoice = invoiceTable.getModel(); + totalInv = new BigDecimal(0.0); + rows = invoice.getRowCount(); + m_noInvoices = 0; + + for (int i = 0; i < rows; i++) + { + if (((Boolean)invoice.getValueAt(i, 0)).booleanValue()) + { + Timestamp ts = (Timestamp)invoice.getValueAt(i, 1); + if ( !multiCurrency.isSelected() ) // converted amounts only valid for selected date + allocDate = TimeUtil.max(allocDate, ts); + BigDecimal bd = (BigDecimal)invoice.getValueAt(i, i_applied); + totalInv = totalInv.add(bd); // Applied Inv + m_noInvoices++; + log.fine("Invoice_" + i + " = " + bd + " - Total=" + totalPay); + } + } + invoiceInfo.setText(String.valueOf(m_noInvoices) + " - " + + Msg.getMsg(Env.getCtx(), "Sum") + " " + format.format(totalInv) + " "); + + // Set AllocationDate + if (allocDate != null) + dateField.setValue(allocDate); + // Set Allocation Currency + allocCurrencyLabel.setText(currencyPick.getDisplay()); + // Difference + totalDiff = totalPay.subtract(totalInv); + differenceField.setText(format.format(totalDiff)); + + if (totalDiff.compareTo(new BigDecimal(0.0)) == 0) + allocateButton.setEnabled(true); + else + allocateButton.setEnabled(false); + + } // calculate + + /** + * Vetoable Change Listener. + * - Business Partner + * - Currency + * - Date + * @param e event + */ + public void vetoableChange (PropertyChangeEvent e) + { + String name = e.getPropertyName(); + Object value = e.getNewValue(); + log.config(name + "=" + value); + + // Organization + if (name.equals("AD_Org_ID")) + { + if (value == null) + m_AD_Org_ID = 0; + else + m_AD_Org_ID = ((Integer) value).intValue(); + + loadBPartner(); + } + + if (value == null) + return; + + // BPartner + if (name.equals("C_BPartner_ID")) + { + bpartnerSearch.setValue(value); + m_C_BPartner_ID = ((Integer)value).intValue(); + loadBPartner(); + } + // Currency + else if (name.equals("C_Currency_ID")) + { + m_C_Currency_ID = ((Integer)value).intValue(); + loadBPartner(); + } + // Date for Multi-Currency + else if (name.equals("Date") && multiCurrency.isSelected()) + loadBPartner(); + } // vetoableChange + + + /************************************************************************** + * Save Data + */ + private void saveData() + { + if (m_noInvoices + m_noPayments == 0) + return; + + // fixed fields + int AD_Client_ID = Env.getContextAsInt(Env.getCtx(), m_WindowNo, "AD_Client_ID"); + int AD_Org_ID = Env.getContextAsInt(Env.getCtx(), m_WindowNo, "AD_Org_ID"); + int C_BPartner_ID = m_C_BPartner_ID; + int C_Order_ID = 0; + int C_CashLine_ID = 0; + Timestamp DateTrx = (Timestamp)dateField.getValue(); + int C_Currency_ID = m_C_Currency_ID; // the allocation currency + // + if (AD_Org_ID == 0) + { + ADialog.error(m_WindowNo, this, "Org0NotAllowed", null); + return; + } + // + log.config("Client=" + AD_Client_ID + ", Org=" + AD_Org_ID + + ", BPartner=" + C_BPartner_ID + ", Date=" + DateTrx); + + Trx trx = Trx.get(Trx.createTrxName("AL"), true); + + // Payment - Loop and add them to paymentList/amountList + int pRows = paymentTable.getRowCount(); + TableModel payment = paymentTable.getModel(); + ArrayList paymentList = new ArrayList(pRows); + ArrayList amountList = new ArrayList(pRows); + BigDecimal paymentAppliedAmt = Env.ZERO; + for (int i = 0; i < pRows; i++) + { + // Payment line is selected + if (((Boolean)payment.getValueAt(i, 0)).booleanValue()) + { + KeyNamePair pp = (KeyNamePair)payment.getValueAt(i, 2); // Value + // Payment variables + int C_Payment_ID = pp.getKey(); + paymentList.add(new Integer(C_Payment_ID)); + // + BigDecimal PaymentAmt = (BigDecimal)payment.getValueAt(i, i_payment); // Applied Payment + amountList.add(PaymentAmt); + // + paymentAppliedAmt = paymentAppliedAmt.add(PaymentAmt); + // + log.fine("C_Payment_ID=" + C_Payment_ID + + " - PaymentAmt=" + PaymentAmt); // + " * " + Multiplier + " = " + PaymentAmtAbs); + } + } + log.config("Number of Payments=" + paymentList.size() + " - Total=" + paymentAppliedAmt); + + // Invoices - Loop and generate allocations + int iRows = invoiceTable.getRowCount(); + TableModel invoice = invoiceTable.getModel(); + + // Create Allocation + MAllocationHdr alloc = new MAllocationHdr (Env.getCtx(), true, // manual + DateTrx, C_Currency_ID, Env.getContext(Env.getCtx(), "#AD_User_Name"), trx.getTrxName()); + alloc.setAD_Org_ID(AD_Org_ID); + if (!alloc.save()) + { + log.log(Level.SEVERE, "Allocation not created"); + return; + } + + // For all invoices + int invoiceLines = 0; + BigDecimal unmatchedApplied = Env.ZERO; + for (int i = 0; i < iRows; i++) + { + // Invoice line is selected + if (((Boolean)invoice.getValueAt(i, 0)).booleanValue()) + { + invoiceLines++; + KeyNamePair pp = (KeyNamePair)invoice.getValueAt(i, 2); // Value + // Invoice variables + int C_Invoice_ID = pp.getKey(); + BigDecimal AppliedAmt = (BigDecimal)invoice.getValueAt(i, i_applied); + // semi-fixed fields (reset after first invoice) + BigDecimal DiscountAmt = (BigDecimal)invoice.getValueAt(i, i_discount); + BigDecimal WriteOffAmt = (BigDecimal)invoice.getValueAt(i, i_writeOff); + // OverUnderAmt needs to be in Allocation Currency + BigDecimal OverUnderAmt = ((BigDecimal)invoice.getValueAt(i, i_open)) + .subtract(AppliedAmt).subtract(DiscountAmt).subtract(WriteOffAmt); + + log.config("Invoice #" + i + " - AppliedAmt=" + AppliedAmt);// + " -> " + AppliedAbs); + // loop through all payments until invoice applied + + for (int j = 0; j < paymentList.size() && AppliedAmt.signum() != 0; j++) + { + int C_Payment_ID = ((Integer)paymentList.get(j)).intValue(); + BigDecimal PaymentAmt = (BigDecimal)amountList.get(j); + if (PaymentAmt.signum() == AppliedAmt.signum()) // only match same sign (otherwise appliedAmt increases) + { // and not zero (appliedAmt was checked earlier) + log.config(".. with payment #" + j + ", Amt=" + PaymentAmt); + + BigDecimal amount = AppliedAmt; + if (amount.abs().compareTo(PaymentAmt.abs()) > 0) // if there's more open on the invoice + amount = PaymentAmt; // than left in the payment + + // Allocation Line + MAllocationLine aLine = new MAllocationLine (alloc, amount, + DiscountAmt, WriteOffAmt, OverUnderAmt); + aLine.setDocInfo(C_BPartner_ID, C_Order_ID, C_Invoice_ID); + aLine.setPaymentInfo(C_Payment_ID, C_CashLine_ID); + if (!aLine.save()) + log.log(Level.SEVERE, "Allocation Line not written - Invoice=" + C_Invoice_ID); + + // Apply Discounts and WriteOff only first time + DiscountAmt = Env.ZERO; + WriteOffAmt = Env.ZERO; + // subtract amount from Payment/Invoice + AppliedAmt = AppliedAmt.subtract(amount); + PaymentAmt = PaymentAmt.subtract(amount); + log.fine("Allocation Amount=" + amount + " - Remaining Applied=" + AppliedAmt + ", Payment=" + PaymentAmt); + amountList.set(j, PaymentAmt); // update + } // for all applied amounts + } // loop through payments for invoice + + if ( AppliedAmt.signum() == 0 && DiscountAmt.signum() == 0 && WriteOffAmt.signum() == 0) + continue; + else { // remainder will need to match against other invoices + int C_Payment_ID = 0; + + // Allocation Line + MAllocationLine aLine = new MAllocationLine (alloc, AppliedAmt, + DiscountAmt, WriteOffAmt, OverUnderAmt); + aLine.setDocInfo(C_BPartner_ID, C_Order_ID, C_Invoice_ID); + aLine.setPaymentInfo(C_Payment_ID, C_CashLine_ID); + if (!aLine.save(trx.getTrxName())) + log.log(Level.SEVERE, "Allocation Line not written - Invoice=" + C_Invoice_ID); + + log.fine("Allocation Amount=" + AppliedAmt); + unmatchedApplied = unmatchedApplied.add(AppliedAmt); + } + } // invoice selected + } // invoice loop + + // check for unapplied payment amounts (eg from payment reversals) + for (int i = 0; i < paymentList.size(); i++) { + BigDecimal payAmt = (BigDecimal) amountList.get(i); + if ( payAmt.signum() == 0 ) + continue; + int C_Payment_ID = ((Integer)paymentList.get(i)).intValue(); + log.fine("Payment=" + C_Payment_ID + + ", Amount=" + payAmt); + + // Allocation Line + MAllocationLine aLine = new MAllocationLine (alloc, payAmt, + Env.ZERO, Env.ZERO, Env.ZERO); + aLine.setDocInfo(C_BPartner_ID, 0, 0); + aLine.setPaymentInfo(C_Payment_ID, 0); + if (!aLine.save(trx.getTrxName())) + log.log(Level.SEVERE, "Allocation Line not saved - Payment=" + C_Payment_ID); + unmatchedApplied = unmatchedApplied.subtract(payAmt); + } + + if ( unmatchedApplied.signum() != 0 ) + log.log(Level.SEVERE, "Allocation not balanced -- out by " + unmatchedApplied ); + + // Should start WF + if (alloc.get_ID() != 0) + { + alloc.processIt(DocAction.ACTION_Complete); + alloc.save(); + } + + // Test/Set IsPaid for Invoice - requires that allocation is posted + for (int i = 0; i < iRows; i++) + { + // Invoice line is selected + if (((Boolean)invoice.getValueAt(i, 0)).booleanValue()) + { + KeyNamePair pp = (KeyNamePair)invoice.getValueAt(i, 2); // Value + // Invoice variables + int C_Invoice_ID = pp.getKey(); + String sql = "SELECT invoiceOpen(C_Invoice_ID, 0) " + + "FROM C_Invoice WHERE C_Invoice_ID=?"; + BigDecimal open = DB.getSQLValueBD(trx.getTrxName(), sql, C_Invoice_ID); + if (open != null && open.signum() == 0) { + sql = "UPDATE C_Invoice SET IsPaid='Y' " + + "WHERE C_Invoice_ID=" + C_Invoice_ID; + int no = DB.executeUpdate(sql, trx.getTrxName()); + log.config("Invoice #" + i + " is paid - updated=" + no); + } else + log.config("Invoice #" + i + " is not paid - " + open); + } + } + // Test/Set Payment is fully allocated + for (int i = 0; i < paymentList.size(); i++) + { + int C_Payment_ID = ((Integer)paymentList.get(i)).intValue(); + MPayment pay = new MPayment (Env.getCtx(), C_Payment_ID, trx.getTrxName()); + if (pay.testAllocation()) + pay.save(); + log.config("Payment #" + i + (pay.isAllocated() ? " not" : " is") + + " fully allocated"); + } + paymentList.clear(); + amountList.clear(); + trx.commit(); + trx.close(); + + statusBar.setStatusLine(alloc.getDocumentNo()); + } // saveData + + +} // VAllocation diff --git a/client/src/org/compiere/grid/GridController.java b/client/src/org/compiere/grid/GridController.java new file mode 100644 index 0000000000..a7649d32d1 --- /dev/null +++ b/client/src/org/compiere/grid/GridController.java @@ -0,0 +1,1398 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] + * @contributor fer_luck @ centuryon + *****************************************************************************/ +package org.compiere.grid; + +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.util.*; +import java.util.logging.*; +import javax.swing.*; +import javax.swing.event.*; +import javax.swing.table.*; + +import org.adempiere.plaf.AdempiereLookAndFeel; +import org.adempiere.plaf.AdempierePLAF; +import org.compiere.apps.*; +import org.compiere.grid.ed.*; +import org.compiere.grid.tree.*; +import org.compiere.model.*; +import org.compiere.swing.*; +import org.compiere.util.*; + +/** + * The Grid Controller is the panel for single and multi-row presentation + * and links to the Model Tab. + * + *
    + *  UI Structure:
    + *  this    (BorderLayout)
    + *      splitPane (JSplitPane)
    + *          left
    + *              graphicPanel
    + *          right
    + *              cardPanel   JPanel  (CardLayout)
    + *                  srPane  JSplitPane
    + * 						vPane	JScrollPane
    + *              	        vPanel  VPanel (GridBagLayout)
    + * 						vIncludedGC	GridController
    + *                  mrPane  JScrollPane
    + *                      vTable  VTable
    + *
    + *  DataBinding:
    + *  - MultiRow - is automatic between VTable and MTable
    + *  - SingleRow
    + *		- from VEditors via fireVetoableChange(m_columnName, null, getText());
    + *			(vetoableChange)
    + *		- to VEditors via updateSingleRow -> Editor.setValue(object)
    + *
    + *  Event Chains
    + *  -- Navigation --
    + *  (VTable selection -> GridController.valueChanged)
    + *  (APanel selection)
    + *      + MTab.navivate
    + *          + MTab.setCurrentRow
    + *              + Update all MFields
    + *                  + MField.setValue
    + *                      + setContext
    + *                      + fire PropertyChange "Value"
    + *                          + VEditor.propertyChange
    + *                              + VEditor.setValue
    + *              + MTab.fireProperyChange "CurrentRow"
    + *                  + VTable.propertyChange (setRowSelectionInterval)
    + *                      + GridController.valueChange
    + *                          + GridController.dynamicDisplay(complete)
    + *              + MTab.fireDataStatusChanged
    + *                  + APanel.statusChanged
    + *
    + *  -- ValueChanges --
    + *  VEditor.fireVetoableChange
    + *      + (VCellEditor.vetoableChange/getCellEditorValue)   -- multi-row source
    + *      + (GridController.vetoableChange)                   -- single-row source
    + *          + MTable.setValueAt
    + *              + MField.setValue
    + *                  + setContext
    + *                  + fire PropertyChange "Value"
    + *                      + VEditor.setValue
    + *              + MTable.fireDataStatusChanged
    + *                  + MTab.dataStatusChanged
    + *                      + MTab.fireDataStatusChanged
    + *                          + APanel.statusChanged
    + *                  + GridController.dataStatusChanged
    + *                      + GridController.dynamicDisplay(selective)
    + *  
    + * @author Jorg Janke + * @version $Id: GridController.java,v 1.8 2006/09/25 00:59:52 jjanke Exp $ + * + * @author Teo Sarca - BF [ 1742159 ], BF [ 1707876 ] + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] + * @contributor fer_luck @ centuryon FR [ 1757088 ] + */ +public class GridController extends CPanel + implements DataStatusListener, ListSelectionListener, Evaluatee, + VetoableChangeListener, PropertyChangeListener, MouseListener +{ + /** + * Constructor - you need to call initGrid for instanciation + */ + public GridController() + { + try + { + jbInit(); + } + catch(Exception e) + { + log.log(Level.SEVERE, "", e); + } + } // GridController + + /** + * toString + * @return string representation + */ + public String toString() + { + return "GridController for " + m_mTab; + } // toString + + /** Logger */ + private static CLogger log = CLogger.getCLogger(GridController.class); + + /** + * The Layout + */ + private BorderLayout mainLayout = new BorderLayout(); + private JSplitPane splitPane = new JSplitPane(); + private CPanel graphPanel = new CPanel(); + private BorderLayout graphLayout = new BorderLayout(); + private CPanel cardPanel = new CPanel(); + private CardLayout cardLayout = new CardLayout(); + //private JSplitPane srPane = new JSplitPane(); + + private JScrollPane vPane = new JScrollPane(); + private CScrollPane mrPane = new CScrollPane(); + private CPanel xPanel = new CPanel(); + private BorderLayout xLayout = new BorderLayout(); + private VTable vTable = new VTable(); + //FR [ 1757088 ] + private VPanel vPanel = null; + private boolean detailGrid = false; + + /** + * Static Layout init + * @throws Exception + */ + private void jbInit() throws Exception + { + this.setLayout(mainLayout); + this.add(splitPane, BorderLayout.CENTER); + splitPane.setOpaque(false); + graphPanel.setLayout(graphLayout); + // + splitPane.add(graphPanel, JSplitPane.LEFT); + splitPane.add(cardPanel, JSplitPane.RIGHT); + splitPane.setBorder(null); + splitPane.setName("gc_splitPane"); + // + cardPanel.setLayout(cardLayout); + cardPanel.add(vPane, "vPane"); // Sequence Important! + cardPanel.add(mrPane, "mrPane"); + cardPanel.setBorder(null); + cardPanel.setName("gc_cardPanel"); + // single row (w/o xPane it would be centered) + /* + srPane.setBorder(null); + srPane.setName("gc_srPane"); + srPane.setOrientation(JSplitPane.VERTICAL_SPLIT); + srPane.add(vPane, JSplitPane.TOP); + srPane.setTopComponent(vPane); + srPane.setBottomComponent(null); // otherwise a button is created/displayed + */ + //FR [ 1757088 ] vPane.getViewport().add(xPanel, null); + //FR [ 1757088 ] xPanel.add(vPanel); + xPanel.setLayout(xLayout); + xPanel.setName("gc_xPanel"); + xPanel.setBorder(BorderFactory.createEmptyBorder()); + //xLayout.setAlignment(FlowLayout.LEFT); + xLayout.setHgap(0); + xLayout.setVgap(0); + // multi-row + mrPane.setBorder(null); + mrPane.getViewport().add(vTable, null); + mrPane.setName("gc_mrPane"); + // + graphPanel.setBorder(null); + graphPanel.setName("gc_graphPanel"); + //srPane.setDividerLocation(200); + + vPane.setBorder(BorderFactory.createEmptyBorder()); + } // jbInit + + /** + * Displose + */ + public void dispose() + { + log.config( "(" + m_mTab.toString() + ")"); + // clear info + stopEditor(false); + if (m_mTab.isLoadComplete()) + { + if (m_mTab.needSave(true, false)) + m_mTab.dataIgnore(); + } + //FR [ 1757088 ] vIncludedGC = null; + + // Listeners + if (m_mTab.isLoadComplete()) + { + m_mTab.getTableModel().removeDataStatusListener(this); + m_mTab.getTableModel().removeVetoableChangeListener(this); + } + vTable.getSelectionModel().removeListSelectionListener(this); + m_mTab.removePropertyChangeListener(vTable); + + // editors + Component[] comp = vPanel.getComponentsRecursive(); + for (int i = 0; i < comp.length; i++) + { + if (comp[i] instanceof VEditor) + { + VEditor vEditor = (VEditor)comp[i]; + vEditor.removeVetoableChangeListener(this); + String columnName = comp[i].getName(); + GridField mField = m_mTab.getField(columnName); + if (mField != null) + mField.removePropertyChangeListener(vEditor); + vEditor.dispose(); + } + } + /** @todo Remove APanel Button listeners */ + + vTable.removeAll(); + vTable.setModel(new DefaultTableModel()); // remove reference + vTable = null; + vPanel.removeAll(); + vPanel = null; + //srPane.removeAll(); + //srPane = null; + splitPane.removeAll(); + splitPane = null; + m_mTab = null; + m_tree = null; + this.removeAll(); + } // dispose + + /** Model Tab */ + private GridTab m_mTab = null; + /** Window */ + private int m_WindowNo; + /** Only Multi-Row exist */ + private boolean m_onlyMultiRow = false; + /** Single/Multi Row indicator */ + private boolean m_singleRow = true; + /** Veto Active */ + private boolean m_vetoActive = false; + /** Tree Panel (optional) */ + private VTreePanel m_tree; + + private APanel m_aPanel; + + private boolean init; + + private ArrayList synchronizerList = new ArrayList(); + + public boolean initGrid (GridTab mTab, boolean onlyMultiRow, + int WindowNo, APanel aPanel, GridWindow mWindow) + { + return initGrid(mTab, onlyMultiRow, WindowNo, aPanel, mWindow, false); + } + + /************************************************************************** + * Init Grid. + *
    +	 *  - Map table to model
    +	 *  - Update (multi-row) table info with renderers/editors
    +	 *  - build single-row panel
    +	 *  - initialize display
    +	 *  
    + * @param mTab tab + * @param onlyMultiRow only table + * @param WindowNo window no + * @param aPanel optional Application Panel for adding button listeners + * @param mWindow parent Window Model + * @return true if initialized + */ + public boolean initGrid (GridTab mTab, boolean onlyMultiRow, + int WindowNo, APanel aPanel, GridWindow mWindow, boolean lazy) + { + log.config( "(" + mTab.toString() + ")"); + m_mTab = mTab; + m_WindowNo = WindowNo; + m_onlyMultiRow = onlyMultiRow; + m_aPanel = aPanel; + setName("GC-" + mTab); + //FR [ 1757088 ] + vPanel = new VPanel(mTab.getName(), m_WindowNo); + vPanel.putClientProperty(AdempiereLookAndFeel.HIDE_IF_ONE_TAB, Boolean.TRUE); + if (this.isDetailGrid()) + { + vPanel.setBorder(BorderFactory.createLineBorder(AdempierePLAF.getPrimary2())); + } + vPane.getViewport().add(xPanel, null); + xPanel.add(vPanel, BorderLayout.CENTER); + + setTabLevel(m_mTab.getTabLevel()); + + if (!lazy) + init(); + else + { + //Load tab meta data, needed for includeTab to work + m_mTab.initTab(false); + } + + + // log.config( "GridController.dynInit (" + mTab.toString() + ") - fini"); + return true; + } // initGrid + + private void init() + { + // Set up Multi Row Table + vTable.setModel(m_mTab.getTableModel()); + + // Update Table Info ------------------------------------------------- + int size = setupVTable (m_aPanel, m_mTab, vTable); + + // Set Color on Tab Level + // this.setBackgroundColor (mTab.getColor()); + + // Single Row ------------------------------------------------------- + if (!m_onlyMultiRow) + { + // Set Softcoded Mnemonic &x + for (int i = 0; i < size; i++) + { + GridField mField = m_mTab.getField(i); + if (mField.isDisplayed()) + vPanel.setMnemonic(mField); + } // for all fields + + // Add Fields + for (int i = 0; i < size; i++) + { + GridField mField = m_mTab.getField(i); + if (mField.isDisplayed()) + { + VEditor vEditor = VEditorFactory.getEditor(m_mTab, mField, false); + if (vEditor == null) + { + log.warning("Editor not created for " + mField.getColumnName()); + continue; + } + // MField => VEditor - New Field value to be updated to editor + mField.addPropertyChangeListener(vEditor); + // VEditor => this - New Editor value to be updated here (MTable) + vEditor.addVetoableChangeListener(this); + // Add to VPanel + vPanel.addField(vEditor, mField); + // APanel Listen to buttons + if (mField.getDisplayType() == DisplayType.Button && m_aPanel != null) + ((JButton)vEditor).addActionListener (m_aPanel); + } + } // for all fields + + // No Included Grid Controller + /* + srPane.setResizeWeight(1); // top part gets all + srPane.setDividerSize (0); + srPane.setDividerLocation (9999); + */ + // Use SR to size MR + mrPane.setPreferredSize(vPanel.getPreferredSize()); + } // Single-Row + + // Tree Graphics Layout + int AD_Tree_ID = 0; + if (m_mTab.isTreeTab()) + AD_Tree_ID = MTree.getDefaultAD_Tree_ID ( + Env.getAD_Client_ID(Env.getCtx()), m_mTab.getKeyColumnName()); + if (m_mTab.isTreeTab() && AD_Tree_ID != 0) + { + m_tree = new VTreePanel(m_WindowNo, false, true); + if (m_mTab.getTabNo() == 0) // initialize other tabs later + m_tree.initTree(AD_Tree_ID); + m_tree.addPropertyChangeListener(VTreePanel.NODE_SELECTION, this); + graphPanel.add(m_tree, BorderLayout.CENTER); + splitPane.setDividerLocation(250); + // splitPane.resetToPreferredSizes(); + } + else // No Graphics - hide + { + graphPanel.setPreferredSize(new Dimension(0,0)); + splitPane.setDividerSize(0); + splitPane.setDividerLocation(0); + } + + // Receive DataStatusChanged info from MTab + m_mTab.addDataStatusListener(this); + // Receive vetoableChange info from MTable when saving + m_mTab.getTableModel().addVetoableChangeListener(this); + // Selection Listener -> valueChanged + vTable.getSelectionModel().addListSelectionListener(this); + // Navigation (RowChanged) + m_mTab.addPropertyChangeListener(vTable); + + // Update UI + vTable.autoSize(true); + + // Set initial presentation + if (m_onlyMultiRow || !m_mTab.isSingleRow()) + switchMultiRow(); + else + switchSingleRow(); + + init = true; + } + + /** + * + * @return boolean + */ + public boolean isInit() + { + return init; + } + + /** + * Include Tab + * @param gc grid controller to add + * @return GridSynchronizer + */ + + //FR [ 1757088 ] + public boolean includeTab (GridController gc , APanel aPanel, GridSynchronizer sync) + { + GridController detail = gc; + int screenWidth = (int) Toolkit.getDefaultToolkit().getScreenSize().getWidth() - 630; + // Set screen dimension + //detail.setPreferredSize(new Dimension(screenWidth, 250)); + detail.setDetailGrid(true); + detail.addMouseListener(detail); + detail.enableEvents(AWTEvent.HIERARCHY_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK); + + vPanel.includeTab(detail); + //BEGIN - [FR 1953734] + gc.setGCParent(this); + //END - [FR 1953734] + synchronizerList.add(sync); + return true; + + } // IncludeTab + + //FR [ 1757088 ] + public void setDetailGrid(boolean value){ + detailGrid = value; + if (detailGrid && vPanel != null) + vPanel.setBorder(BorderFactory.createLineBorder(AdempierePLAF.getPrimary2())); + } + + public boolean isDetailGrid(){ + return detailGrid; + } + /** + * Get Title + * @return title + */ + public String getTitle () + { + return m_mTab.getName(); + } // getTitle + + /** + * Setup Multi-Row Table (add fields) + * @param aPanel Panel + * @param mTab Model Tab + * @param table JTable + * @return size + */ + private int setupVTable (APanel aPanel, GridTab mTab, VTable table) + { + if (!mTab.isDisplayed()) + return 0; + int size = mTab.getFieldCount (); + TableColumnModel tcm = table.getColumnModel(); + if (size != tcm.getColumnCount()) + throw new IllegalStateException("TableColumn Size <> TableModel"); + + for (int i = 0; i < size; i++) + { + GridField mField = mTab.getField (i); + TableColumn tc = tcm.getColumn(i); + tc.setMinWidth(30); + // + if (mField.getColumnName().equals(tc.getIdentifier().toString())) + { + //don't show included tab field in grid + if (mField.getIncluded_Tab_ID() > 0) + { + TableCellNone tcn = new TableCellNone(mField.getColumnName()); + tc.setCellRenderer (tcn); + tc.setCellEditor (tcn); + tc.setHeaderValue (null); + tc.setMinWidth (0); + tc.setMaxWidth (0); + tc.setPreferredWidth (0); + } + else if (mField.getDisplayType () == DisplayType.RowID) + { + tc.setCellRenderer (new VRowIDRenderer (false)); + tc.setCellEditor (new VRowIDEditor (false)); + tc.setHeaderValue (""); + tc.setMaxWidth (2); + } + else + { + // need to set CellEditor explicitly as default editor based on class causes problem (YesNo-> Boolean) + if (mField.isDisplayed ()) + { + tc.setCellRenderer (new VCellRenderer (mField)); + VCellEditor ce = new VCellEditor (mField); + tc.setCellEditor (ce); + // + tc.setHeaderValue (mField.getHeader ()); + tc.setPreferredWidth (Math.max (mField.getDisplayLength (), 30)); + tc.setHeaderRenderer (new VHeaderRenderer (mField.getDisplayType ())); + + // Enable Button actions in grid + if (mField.getDisplayType () == DisplayType.Button) + { + ce.setActionListener(aPanel); + } + } + else // column not displayed + { + TableCellNone tcn = new TableCellNone(mField.getColumnName()); + tc.setCellRenderer (tcn); + tc.setCellEditor (tcn); + tc.setHeaderValue (null); + tc.setMinWidth (0); + tc.setMaxWidth (0); + tc.setPreferredWidth (0); + } + } + // System.out.println ("TableColumnID " + tc.getIdentifier () + // + " Renderer=" + tc.getCellRenderer () + // + mField.getHeader ()); + + } // found field + else + log.log(Level.SEVERE, "TableColumn " + tc.getIdentifier () + + " <> MField " + mField.getColumnName() + mField.getHeader()); + } // for all fields + return size; + } // setupVTable + + /** + * Activate Grid Controller. + * Called by APanel when GridController is displayed (foreground) + */ + public void activate () + { + if (!init) init(); + + // Tree to be initiated on second/.. tab + if (m_mTab.isTreeTab() && m_mTab.getTabNo() != 0) + { + String keyColumnName = m_mTab.getKeyColumnName(); + String treeName = "AD_Tree_ID"; + if (keyColumnName.startsWith("CM")) + { + if (keyColumnName.equals("CM_Container_ID")) + treeName = "AD_TreeCMC_ID"; + else if (keyColumnName.equals("CM_CStage_ID")) + treeName = "AD_TreeCMS_ID"; + else if (keyColumnName.equals("CM_Template_ID")) + treeName = "AD_TreeCMT_ID"; + else if (keyColumnName.equals("CM_Media_ID")) + treeName = "AD_TreeCMM_ID"; + } + int AD_Tree_ID = Env.getContextAsInt (Env.getCtx(), m_WindowNo, treeName); + log.config(keyColumnName + " -> " + treeName + " = " + AD_Tree_ID); + if (AD_Tree_ID == 0) + AD_Tree_ID = MTree.getDefaultAD_Tree_ID ( + Env.getAD_Client_ID(Env.getCtx()), m_mTab.getKeyColumnName()); + if (m_tree != null) + m_tree.initTree (AD_Tree_ID); + } + + activateChilds(); + } // activate + + /** + * activate child grid controller ( included tab ) + */ + private void activateChilds() + { + for (GridSynchronizer s : synchronizerList ) + { + s.activateChild(); + } + } + + /** + * Register ESC Actions + * - overwrite VTable's Keystroks assigment for ESC + * @param aIgnore ignore + */ + public void registerESCAction (AppsAction aIgnore) + { + int c = VTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT; + vTable.getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), aIgnore.getName()); + vTable.getActionMap().put(aIgnore.getName(), aIgnore); + + // AEnv.printActionInputMap(vTable); + } // registerESCAction + + /** + * Query Tab and resize Table + * (called from APanel) + * @param onlyCurrentRows only current rows + * @param onlyCurrentDays how many days back + * @param maxRows maximim rows or 0 for all + */ + public void query (boolean onlyCurrentRows, int onlyCurrentDays, int maxRows) + { + // start loading while building screen + m_mTab.query(onlyCurrentRows, onlyCurrentDays, maxRows); + // Update UI + if (!isSingleRow()) + vTable.autoSize(true); + } // query + + /* + public boolean isNeedToSaveParent() + { + return m_mTab.isNeedToSaveParent(); + }*/ + + /************************************************************************** + * Switch from single to multi & vice versa + */ + public void switchRowPresentation() + { + stopEditor(true); + if (m_singleRow) + switchMultiRow(); + else + switchSingleRow(); + } // switchRowPresentation + + /** + * Switch to SingleRow Presentation + */ + public void switchSingleRow() + { + if (m_onlyMultiRow) + return; + cardLayout.first(cardPanel); + m_singleRow = true; + dynamicDisplay(0); + // vPanel.requestFocus(); + } // switchSingleRow + + /** + * Switch to MultiRow Presentation + */ + public void switchMultiRow() + { + cardLayout.last(cardPanel); + m_singleRow = false; + vTable.autoSize(true); // resizes + // vTable.requestFocus(); + } // switchSingleRow + + /** + * Is Single Row presentation + * @return true if Single Row is displayed + */ + public boolean isSingleRow() + { + return m_singleRow; + } // isSingleRow + + + /************************************************************************** + * Remove Listener - pass on to MTab + * @param l listener + */ + public synchronized void removeDataStatusListener(DataStatusListener l) + { + m_mTab.removeDataStatusListener(l); + } // removeDataStatusListener + + /** + * Add Data Status Listener - pass on to MTab + * @param l listener + */ + public synchronized void addDataStatusListener(DataStatusListener l) + { + m_mTab.addDataStatusListener(l); + } + + /** + * Data Status Listener - for MTab events. + *

    + * Callouts are processed here for GUI changes + * - same as in MTab.setValue for batch changes + *

    + * calls dynamicDisplay + * @param e event + */ + public void dataStatusChanged(DataStatusEvent e) + { + // if (e.getChangedColumn() == 0) + // return; + int col = e.getChangedColumn(); + log.config("(" + m_mTab + ") Col=" + col + ": " + e.toString()); + + // Process Callout + GridField mField = m_mTab.getField(col); + if (mField != null + && (mField.getCallout().length() > 0 || m_mTab.hasDependants(mField.getColumnName()))) + { + String msg = m_mTab.processFieldChange(mField); // Dependencies & Callout + if (msg.length() > 0) + ADialog.error(m_WindowNo, this, msg); + } + //if (col >= 0) + dynamicDisplay(col); + } // dataStatusChanged + + + /************************************************************************** + * List Selection Listener (VTable) - row changed + * @param e event + */ + public void valueChanged(ListSelectionEvent e) + { + // no rows + if (m_mTab.getRowCount() == 0) + return; + + // vTable.stopEditor(graphPanel); + int rowTable = vTable.getSelectedRow(); + int rowCurrent = m_mTab.getCurrentRow(); + log.config("(" + m_mTab.toString() + ") Row in Table=" + rowTable + ", in Model=" + rowCurrent); + /* BT [ 1972495 ] Multirow Automatic New Record loses context + // FR [ 1757088 ] + if(rowCurrent + 1 == vTable.getRowCount() && !isSingleRow() && Env.isAutoNew(Env.getCtx()) && m_mTab.getRecord_ID() != -1) + { + //stopEditor(true); + vTable.getSelectionModel().removeListSelectionListener(this); + m_mTab.dataNew(false); + dynamicDisplay(0); + vTable.getSelectionModel().addListSelectionListener(this); + return; + } */ + if (rowTable == -1) // nothing selected + { + if (rowCurrent >= 0) + { + vTable.setRowSelectionInterval(rowCurrent, rowCurrent); // causes this method to be called again + return; + } + } + else + { + if (rowTable != rowCurrent) { + //make sure table selection is consistent with model + int t = m_mTab.navigate(rowTable); + if (t != rowTable) { + rowTable = t; + vTable.setRowSelectionInterval(rowTable, rowTable); + } + } + dynamicDisplay(0); + } + + // TreeNavigation - Synchronize -- select node in tree + if (m_tree != null) + m_tree.setSelectedNode (m_mTab.getRecord_ID()); // ignores new (-1) + + // log.config( "GridController.valueChanged (" + m_mTab.toString() + ") - fini", + // "Row in Table=" + rowTable + ", in Model=" + rowCurrent); + + } // valueChanged + + /** + * PropertyChange Listener - Tree Panel - node selection + * @param e event + */ + public void propertyChange(PropertyChangeEvent e) + { + // System.out.println("propertyChange"); + // System.out.println(e); + if (e == null) + return; + Object value = e.getNewValue(); + if (value == null) + return; + log.config(e.getPropertyName() + "=" + value + + " - " + value.getClass().toString()); + if (!(value instanceof MTreeNode)) + return; + + // We Have a TreeNode + int nodeID = ((MTreeNode)value).getNode_ID(); + // root of tree selected - ignore + //if (nodeID == 0) + //return; + + // Search all rows for mode id + int size = m_mTab.getRowCount(); + int row = -1; + for (int i = 0; i < size; i++) + { + if (m_mTab.getKeyID(i) == nodeID) + { + row = i; + break; + } + } + if (row == -1) + { + if (nodeID > 0) + log.log(Level.WARNING, "Tab does not have ID with Node_ID=" + nodeID); + return; + } + + // Navigate to node row + m_mTab.navigate(row); + } // propertyChange + + /** + * Dynamic Display. + * - Single Row Screen layout and update of dynamic Lookups + *

    + * Single Row layout: + * the components's name is the ColumnName; if it matches, the + * MField.isDisplayed(true) is used to determine if it is visible + * if the component is a VEditor, setEnabled is set from the MField + *

    + * Multi Row layout is not changed: + * VCellRenderer calls JTable.isCellEditable -> checks MField.isEditable (Active, isDisplayed) + * VCellEditor.isCellEditable calls MField.isEditable(true)
    + * If a column is not displayed, the width is set to 0 in dynInit + *

    + * Dynamic update of data is handeled in VLookup.focusGained/Lost. + * When focus is gained the model is temporarily updated with the + * specific validated data, if lost, it is switched back to the + * unvalidated data (i.e. everything). This allows that the display + * methods have a lookup to display.
    + * Here: if the changed field has dependents and the dependent + * is a Lookup and this lookup has a dynamic dependence of the changed field, + * the value of that field is set to null (in MTab.processDependencies - + * otherwise it would show an invalid value). + * As Editors listen for value changed of their MField, the display is updated. + *

    + * Called from GridController.valueChanged/dataStatusChanged, APane;.stateChanged/unlock/cmd_... + * @param col selective column number or 0 if all + */ + public void dynamicDisplay (int col) + { + // log.config( "GridController.dynamicDisplay (" + m_mTab.toString() + ") SingleRow=" + isSingleRow() + ", OnlyMultiRow=" + m_onlyMultiRow); + // Don't update if multi-row + if (!isSingleRow() || m_onlyMultiRow) + return; + if (!m_mTab.isOpen()) + return; + // Selective + if (col > 0) + { + GridField changedField = m_mTab.getField(col); + String columnName = changedField.getColumnName(); + ArrayList dependants = m_mTab.getDependantFields(columnName); + log.config("(" + m_mTab.toString() + ") " + + columnName + " - Dependents=" + dependants.size()); + // No Dependents and no Callout - Set just Background + if (dependants.size() == 0 && changedField.getCallout().length() > 0) + { + Component[] comp = vPanel.getComponentsRecursive(); + for (int i = 0; i < comp.length; i++) + { + if (columnName.equals(comp[i].getName ()) && comp[i] instanceof VEditor) + { + VEditor ve = (VEditor)comp[i]; + boolean manMissing = false; + boolean noValue = changedField.getValue() == null || changedField.getValue().toString().length() == 0; + if (noValue && changedField.isEditable(true) && changedField.isMandatory(true)) // check context + manMissing = true; + ve.setBackground(manMissing || changedField.isError()); + break; + } + } + return; + } + } // selective + + + // complete single row re-display + boolean noData = m_mTab.getRowCount() == 0; + log.config(m_mTab.toString() + " - Rows=" + m_mTab.getRowCount()); + // All Components in vPanel (Single Row) + + Set hiddens = new HashSet(); + Component[] comps = vPanel.getComponentsRecursive(); + for (int i = 0; i < comps.length; i++) + { + Component comp = comps[i]; + String columnName = comp.getName(); + + if (columnName != null && columnName.length() > 0) + { + GridField mField = m_mTab.getField(columnName); + if (mField != null) + { + if (mField.isDisplayed(true)) // check context + { + if (!comp.isVisible()) + comp.setVisible(true); // visibility + /** + * Feature Request [1707462] + * Enable runtime change of VFormat + * @author fer_luck + */ + if (comp instanceof VString){ + VString vs = (VString)comp; + if ((vs.getVFormat() != null && vs.getVFormat().length() > 0 && mField.getVFormat() == null) + || (vs.getVFormat() == null && mField.getVFormat() != null && mField.getVFormat().length() > 0) + || (vs.getVFormat() != null && mField.getVFormat() != null && !vs.getVFormat().equals(mField.getVFormat()))) { + vs.setVFormat(mField.getVFormat()); + } + } + //End Feature Request [1707462] + if (comp instanceof VEditor) + { + VEditor ve = (VEditor)comp; + if (noData) + ve.setReadWrite(false); + else + { + boolean rw = mField.isEditable(true); // r/w - check Context + ve.setReadWrite(rw); + // log.log(Level.FINEST, "RW=" + rw + " " + mField); + boolean manMissing = false; + // least expensive operations first // missing mandatory + if (rw && mField.getValue() == null && mField.isMandatory(true)) // check context + manMissing = true; + ve.setBackground(manMissing || mField.isError()); + } + } + } + else + { + if (comp.isVisible()) + comp.setVisible(false); + hiddens.add(columnName); + } + } + } + } // all components + + // hide empty field group based on the environment + for (int i = 0; i < comps.length; i++) { + Component comp = comps[i]; + + if (comp instanceof CollapsiblePanel) + { + if (comp.getName() == null || comp.getName().startsWith("IncludedTab#")) + continue; + else + { + boolean hasVisible = false; + Component[] childs = ((CollapsiblePanel)comp).getCollapsiblePane().getContentPane().getComponents(); + for (int j = 0; j < childs.length; j++) { + if (childs[j].isVisible()) + { + String columnName = childs[j].getName(); + if (columnName != null && columnName.length() > 0) + { + GridField mField = m_mTab.getField(columnName); + if (mField != null) + { + hasVisible = true; + break; + } + } + } + } + if (comp.isVisible() != hasVisible) + comp.setVisible(hasVisible); + } + } + } + + // + + log.config(m_mTab.toString() + " - fini - " + + (col <= 0 ? "complete" : "seletive")); + } // dynamicDisplay + + /** + * Row Changed - synchronize with Tree + * + * @param save true the row was saved (changed/added), false if the row was deleted + * @param keyID the ID of the row changed + */ + public void rowChanged (boolean save, int keyID) + { + if (m_tree == null || keyID <= 0) + return; + String name = (String)m_mTab.getValue("Name"); + String description = (String)m_mTab.getValue("Description"); + Boolean IsSummary = (Boolean)m_mTab.getValue("IsSummary"); + boolean summary = IsSummary != null && IsSummary.booleanValue(); + String imageIndicator = (String)m_mTab.getValue("Action"); // Menu - Action + // + m_tree.nodeChanged(save, keyID, name, description, + summary, imageIndicator); + } // rowChanged + + + /************************************************************************** + * Save Multiple records - Clone a record and assign new values to each + * clone for a specific column. + * @param ctx context + * @param tableName Table Name + * @param columnName Column for which value need to be changed + * @param recordId Record to clone + * @param values Values to be assigned to clones for the specified column + * @param trxName Transaction + * @throws Exception If error is occured when loading the PO or saving clones + * + * @author ashley + */ + protected void saveMultipleRecords(Properties ctx, String tableName, + String columnName, int recordId, Integer[] values, + String trxName) throws Exception + { + if (values == null) + { + return ; + } + + int oldRow = m_mTab.getCurrentRow(); + GridField lineField = m_mTab.getField("Line"); + + for (int i = 0; i < values.length; i++) + { + if (!m_mTab.dataNew(true)) + { + throw new IllegalStateException("Could not clone tab"); + } + + m_mTab.setValue(columnName, values[i]); + + if (lineField != null) + { + m_mTab.setValue(lineField, 0); + } + + if (!m_mTab.dataSave(false)) + { + throw new IllegalStateException("Could not update tab"); + } + + m_mTab.setCurrentRow(oldRow); + } + } + + /************************************************************************** + * Vetoable Change Listener. + * Called from VEditor + *

    +	 *  - for Save Confirmation dialog
    +	 *  - for Single Row from VEditor: Update MTable
    +	 *  
    + * @param e event + * @throws PropertyVetoException + */ + public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException + { + if (m_mTab.isProcessed() || !m_mTab.isActive()) // only active records + { + Object source = e.getSource(); + if (source instanceof VEditor) + { + if (!((VEditor)source).isReadWrite()) + { + log.config("(" + m_mTab.toString() + ") " + e.getPropertyName()); + return; + } + } + else + { + log.config("(" + m_mTab.toString() + ") " + e.getPropertyName()); + return; + } + } // processed + log.config("(" + m_mTab.toString() + ") " + + e.getPropertyName() + "=" + e.getNewValue() + " (" + e.getOldValue() + ") " + + (e.getOldValue() == null ? "" : e.getOldValue().getClass().getName())); + + + // Save Confirmation dialog MTable-RowSave + if (e.getPropertyName().equals(GridTable.PROPERTY)) + { + // throw new PropertyVetoException calls this method (??) again + if (m_vetoActive) + { + m_vetoActive = false; + return; + } + if (!Env.isAutoCommit(Env.getCtx(), m_WindowNo) || m_mTab.getCommitWarning().length() > 0) + { + if (!ADialog.ask(m_WindowNo, this, "SaveChanges?", m_mTab.getCommitWarning())) + { + m_vetoActive = true; + throw new PropertyVetoException ("UserDeniedSave", e); + } + } + return; + } // saveConfirmation + + + // Get Row/Col Info + GridTable mTable = m_mTab.getTableModel(); + int row = m_mTab.getCurrentRow(); + int col = mTable.findColumn(e.getPropertyName()); + // + if (e.getNewValue() == null && e.getOldValue() != null + && e.getOldValue().toString().length() > 0) // some editors return "" instead of null + mTable.setChanged (true); + else + { + // mTable.setValueAt (e.getNewValue(), row, col, true); + /* + * Changes: Added the logic below to handle multiple values for a single field + * due to multiple selection in Lookup (Info). + * @author ashley + */ + Object newValue = e.getNewValue(); + Integer newValues[] = null; + + if (newValue instanceof Integer[]) + { + newValues = ((Integer[])newValue); + newValue = newValues[0]; + + if (newValues.length > 1) + { + Integer valuesCopy[] = new Integer[newValues.length - 1]; + System.arraycopy(newValues, 1, valuesCopy, 0, valuesCopy.length); + newValues = valuesCopy; + } + else + { + newValues = null; + } + } + else if (newValue instanceof Object[]) + { + log.severe("Multiple values can only be processed for IDs (Integer)"); + throw new PropertyVetoException("Multiple Selection values not available for this field", e); + } + + mTable.setValueAt (newValue, row, col); // -> dataStatusChanged -> dynamicDisplay + + // Force Callout + if (e.getPropertyName().equals("S_ResourceAssignment_ID")) + { + GridField mField = m_mTab.getField(col); + if (mField != null && mField.getCallout().length() > 0) + m_mTab.processFieldChange(mField); // Dependencies & Callout + } + + if (newValues != null && newValues.length > 0) + { + // Save data, since record need to be used for generating clones. + if (!m_mTab.dataSave(false)) + { + throw new PropertyVetoException("SaveError", e); + } + + // Retrieve the current record ID + int recordId = m_mTab.getKeyID(m_mTab.getCurrentRow()); + + Trx trx = Trx.get(Trx.createTrxName(), true); + trx.start(); + try + { + saveMultipleRecords(Env.getCtx(), mTable.getTableName(), e.getPropertyName(), recordId, newValues, trx.getTrxName()); + trx.commit(); + m_mTab.dataRefreshAll(); + } + catch(Exception ex) + { + trx.rollback(); + log.severe(ex.getMessage()); + throw new PropertyVetoException("SaveError", e); + } + finally + { + trx.close(); + } + } + } + + // log.config( "GridController.vetoableChange (" + m_mTab.toString() + ") - fini", e.getPropertyName() + "=" + e.getNewValue()); + } // vetoableChange + + + /************************************************************************** + * Get Model Tab + * @return Model Tab + */ + public GridTab getMTab() + { + return m_mTab; + } // getMTab + + /** + * Get Display Logic + * @return Display Logic + */ + public String getDisplayLogic() + { + return m_mTab.getDisplayLogic(); + } // getDisplayLogic + + /** + * Get VTable + * @return VTable + */ + public VTable getTable() + { + return vTable; + } // getTable + + + /** + * Set Window level Mnemonics + * @param set true if set otherwise unregiser + */ + public void setMnemonics (boolean set) + { + if (vPanel != null) + vPanel.setMnemonics(set); + } // setMnemonics + + /** + * Stop Table & SR Editors and move focus to graphPanel + * @param saveValue save value + */ + public void stopEditor (boolean saveValue) + { + log.config("(" + m_mTab.toString() + ") TableEditing=" + vTable.isEditing()); + + // MultiRow - remove editors + vTable.stopEditor(saveValue); + + // SingleRow - stop editors by changing focus + if (m_singleRow) + vPanel.transferFocus(); + // graphPanel.requestFocus(); + // + // log.config( "GridController.stopEditor (" + m_mTab.toString() + ") - fini", + // "Editing=" + vTable.isEditing()); + } // stopEditors + + /** + * Mouse Clicked + * @param e event + */ + public void mouseClicked(MouseEvent e) + { + if (CLogMgt.isLevelFinest()) + log.finest("" + this + " - " + e); + } + /** + * Mouse Pressed + * @param e event + */ + public void mousePressed(MouseEvent e) + { + if (CLogMgt.isLevelFinest()) + log.finest("" + this + " - " + e); + } + /** + * Mouse Released + * @param e event + */ + public void mouseReleased(MouseEvent e) + { + if (CLogMgt.isLevelFinest()) + log.finest("" + this + " - " + e); + } + /** + * Mouse Entered + * @param e event + */ + public void mouseEntered(MouseEvent e) + { + if (CLogMgt.isLevelFinest()) + log.finest("" + this + " - " + e); + } + /** + * Mouse Exited + * @param e event + */ + public void mouseExited(MouseEvent e) + { + if (CLogMgt.isLevelFinest()) + log.finest("" + this + " - " + e); + } + + /** + * Get Variable Value + * @param variableName name + * @return value + */ + public String get_ValueAsString (String variableName) + { + return Env.getContext(Env.getCtx(), m_WindowNo, variableName); + } // get_ValueAsString + + /** + * Is controller data not stale + * @return boolean + */ + public boolean isCurrent() + { + return m_mTab != null ? m_mTab.isCurrent() : false; + } + + //FR [ 1757088 ] + public VPanel getvPanel() + { + return vPanel; + } + + //BEGIN - [FR 1953734] + GridController m_Parent; + public void setGCParent(GridController gc){ + m_Parent = gc; + } + public GridController getGCParent(){ + return m_Parent; + } + public void refreshMTab(GridController includedTab){ + int m_CurrentRowBeforeSave = includedTab.m_mTab.getCurrentRow(); + m_mTab.dataRefresh(m_mTab.getCurrentRow()); + includedTab.m_mTab.setCurrentRow(m_CurrentRowBeforeSave); + } + //END - [FR 1953734] + + /** + * Accept pending editor changes. + */ + public void acceptEditorChanges() + { + if (isSingleRow()) + { + Component c = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); + if (c != null && this.isAncestorOf(c)) + { + Component t = c; + while (t != null && t != this) + { + if (t instanceof VManagedEditor) + { + ((VManagedEditor)t).commitChanges(); + return; + } + t = t.getParent(); + } + } + } + } +} // GridController diff --git a/client/src/org/compiere/grid/ed/VLocationDialog.java b/client/src/org/compiere/grid/ed/VLocationDialog.java new file mode 100644 index 0000000000..6ca9ba95ae --- /dev/null +++ b/client/src/org/compiere/grid/ed/VLocationDialog.java @@ -0,0 +1,534 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.grid.ed; + +import java.awt.*; +import java.awt.event.*; +import java.util.*; +import java.util.logging.*; +import javax.swing.*; +import org.compiere.apps.*; +import org.compiere.model.*; +import org.compiere.swing.*; +import org.compiere.util.*; + +import com.akunagroup.uk.postcode.*; +import org.adempiere.model.*; + +/** + * Dialog to enter Location Info (Address) + * + * @author Jorg Janke + * @version $Id: VLocationDialog.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $ + * + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1831060 ] Location dialog should use Address1, Address2 ... elements + * @author Michael Judd, Akuna Ltd (UK) + *
  • FR [ 1741222 ] - Webservice connector for address lookups + */ +public class VLocationDialog extends CDialog + implements ActionListener +{ + + /** Lookup result */ + //private Object[][] data = null; + + /** Lookup result header */ + private Object[] header = null; + + //private int m_WindowNo = 0; + + /** + * Constructor + * + * @param frame parent + * @param title title (field name) + * @param location Model Location + */ + public VLocationDialog (Frame frame, String title, MLocation location) + { + super(frame, title, true); + //m_WindowNo = WindowNo; + try + { + jbInit(); + } + catch(Exception ex) + { + log.log(Level.SEVERE, ex.getMessage()); + } + m_location = location; + if (m_location == null) + m_location = new MLocation (Env.getCtx(), 0, null); + // Overwrite title + if (m_location.getC_Location_ID() == 0) + setTitle(Msg.getMsg(Env.getCtx(), "LocationNew")); + else + setTitle(Msg.getMsg(Env.getCtx(), "LocationUpdate")); + + // Current Country + MCountry.setDisplayLanguage(Env.getAD_Language(Env.getCtx())); + fCountry = new CComboBox(MCountry.getCountries(Env.getCtx())); + fCountry.setSelectedItem(m_location.getCountry()); + m_origCountry_ID = m_location.getC_Country_ID(); + // Current Region + fRegion = new CComboBox(MRegion.getRegions(Env.getCtx(), m_origCountry_ID)); + if (m_location.getCountry().isHasRegion()) + lRegion.setText(m_location.getCountry().getRegionName()); // name for region + fRegion.setSelectedItem(m_location.getRegion()); + // + initLocation(); + fCountry.addActionListener(this); + fOnline.addActionListener(this); + AEnv.positionCenterWindow(frame, this); + + + } // VLocationDialog + + private boolean m_change = false; + private MLocation m_location; + private int m_origCountry_ID; + private int s_oldCountry_ID = 0; + /** Logger */ + private static CLogger log = CLogger.getCLogger(VLocationDialog.class); + + private CPanel panel = new CPanel(); + private CPanel mainPanel = new CPanel(); + private CPanel southPanel = new CPanel(); + private BorderLayout panelLayout = new BorderLayout(); + private GridBagLayout gridBagLayout = new GridBagLayout(); + private ConfirmPanel confirmPanel = new ConfirmPanel(true); + private BorderLayout southLayout = new BorderLayout(); + // + private CLabel lAddress1 = new CLabel(Msg.getElement(Env.getCtx(), "Address1")); + private CLabel lAddress2 = new CLabel(Msg.getElement(Env.getCtx(), "Address2")); + private CLabel lAddress3 = new CLabel(Msg.getElement(Env.getCtx(), "Address3")); + private CLabel lAddress4 = new CLabel(Msg.getElement(Env.getCtx(), "Address4")); + private CLabel lCity = new CLabel(Msg.getMsg(Env.getCtx(), "City")); + private CLabel lCountry = new CLabel(Msg.getMsg(Env.getCtx(), "Country")); + private CLabel lRegion = new CLabel(Msg.getMsg(Env.getCtx(), "Region")); + private CLabel lPostal = new CLabel(Msg.getMsg(Env.getCtx(), "Postal")); + private CLabel lPostalAdd = new CLabel(Msg.getMsg(Env.getCtx(), "PostalAdd")); + private CLabel lOnline = new CLabel(""); + private CTextField fAddress1 = new CTextField(20); // length=60 + private CTextField fAddress2 = new CTextField(20); // length=60 + private CTextField fAddress3 = new CTextField(20); // length=60 + private CTextField fAddress4 = new CTextField(20); // length=60 + private CTextField fCity = new CTextField(15); // length=60 + private CComboBox fCountry; + private CComboBox fRegion; + private CTextField fPostal = new CTextField(5); // length=10 + private CTextField fPostalAdd = new CTextField(5); // length=10 + private CButton fOnline = new CButton(); + // + private GridBagConstraints gbc = new GridBagConstraints(); + private Insets labelInsets = new Insets(2,15,2,0); // top,left,bottom,right + private Insets fieldInsets = new Insets(2,5,2,10); + + /** + * Static component init + * @throws Exception + */ + void jbInit() throws Exception + { + panel.setLayout(panelLayout); + southPanel.setLayout(southLayout); + mainPanel.setLayout(gridBagLayout); + panelLayout.setHgap(5); + panelLayout.setVgap(10); + getContentPane().add(panel); + panel.add(mainPanel, BorderLayout.CENTER); + panel.add(southPanel, BorderLayout.SOUTH); + southPanel.add(confirmPanel, BorderLayout.NORTH); + // + confirmPanel.addActionListener(this); + } // jbInit + + /** + * Dynanmic Init & fill fields - Called when Country changes! + */ + private void initLocation() + { + MCountry country = m_location.getCountry(); + log.fine(country.getName() + ", Region=" + country.isHasRegion() + " " + country.getDisplaySequence() + + ", C_Location_ID=" + m_location.getC_Location_ID()); + // new Region + if (m_location.getC_Country_ID() != s_oldCountry_ID && country.isHasRegion()) + { + fRegion = new CComboBox(MRegion.getRegions(Env.getCtx(), country.getC_Country_ID())); + if (m_location.getRegion() != null) + fRegion.setSelectedItem(m_location.getRegion()); + lRegion.setText(country.getRegionName()); + s_oldCountry_ID = m_location.getC_Country_ID(); + } + + gbc.anchor = GridBagConstraints.NORTHWEST; + gbc.gridy = 0; // line + gbc.gridx = 0; + gbc.gridwidth = 1; + gbc.insets = fieldInsets; + gbc.fill = GridBagConstraints.HORIZONTAL; + gbc.weightx = 0; + gbc.weighty = 0; + + mainPanel.add(Box.createVerticalStrut(5), gbc); // top gap + + int line = 1; + addLine(line++, lAddress1, fAddress1); + addLine(line++, lAddress2, fAddress2); + addLine(line++, lAddress3, fAddress3); + addLine(line++, lAddress4, fAddress4); + + // sequence of City Postal Region - @P@ @C@ - @C@, @R@ @P@ + String ds = country.getDisplaySequence(); + if (ds == null || ds.length() == 0) + { + log.log(Level.SEVERE, "DisplaySequence empty - " + country); + ds = ""; // @C@, @P@ + } + StringTokenizer st = new StringTokenizer(ds, "@", false); + while (st.hasMoreTokens()) + { + String s = st.nextToken(); + if (s.startsWith("C")) + addLine(line++, lCity, fCity); + else if (s.startsWith("P")) + addLine(line++, lPostal, fPostal); + else if (s.startsWith("A")) + addLine(line++, lPostalAdd, fPostalAdd); + else if (s.startsWith("R") && m_location.getCountry().isHasRegion()) + addLine(line++, lRegion, fRegion); + } + + + addLine(line++, lOnline, fOnline); + fOnline.setText(Msg.getMsg(Env.getCtx(), "Online")); + + // Country Last + addLine(line++, lCountry, fCountry); + + // Fill it + if (m_location.getC_Location_ID() != 0) + { + fAddress1.setText(m_location.getAddress1()); + fAddress2.setText(m_location.getAddress2()); + fAddress3.setText(m_location.getAddress3()); + fAddress4.setText(m_location.getAddress4()); + fCity.setText(m_location.getCity()); + fPostal.setText(m_location.getPostal()); + fPostalAdd.setText(m_location.getPostal_Add()); + if (m_location.getCountry().isHasRegion()) + { + lRegion.setText(m_location.getCountry().getRegionName()); + fRegion.setSelectedItem(m_location.getRegion()); + } + + // disable online if this country doesn't have post code lookup + if (m_location.getCountry().isPostcodeLookup()) { + fOnline.setEnabled(true); + fOnline.setVisible(true); + } + else { + fOnline.setEnabled(false); + fOnline.setVisible(false); + } + + fCountry.setSelectedItem(country); + } + // Update UI + pack(); + } // initLocation + + /** + * Add Line to screen + * + * @param line line number (zero based) + * @param label label + * @param field field + */ + private void addLine(int line, JLabel label, JComponent field) + { + gbc.gridy = line; + // label + gbc.insets = labelInsets; + gbc.gridx = 0; + gbc.weightx = 0.0; + gbc.fill = GridBagConstraints.HORIZONTAL; + label.setHorizontalAlignment(SwingConstants.RIGHT); + mainPanel.add(label, gbc); + // Field + gbc.insets = fieldInsets; + gbc.gridx = 1; + gbc.weightx = 1.0; + gbc.fill = GridBagConstraints.NONE; + gbc.insets = fieldInsets; + mainPanel.add(field, gbc); + + } // addLine + + + /** + * ActionListener + * @param e ActionEvent + */ + public void actionPerformed(ActionEvent e) + { + if (e.getActionCommand().equals(ConfirmPanel.A_OK)) + { + action_OK(); + m_change = true; + dispose(); + } + else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) + { + m_change = false; + dispose(); + } + + // Country Changed - display in new Format + else if (e.getSource() == fCountry) + { + // Modifier for Mouse selection is 16 - for any key selection 0 + MCountry c = (MCountry)fCountry.getSelectedItem(); + m_location.setCountry(c); + + // refresh online button for new country + if (c.isPostcodeLookup()) { + fOnline.setEnabled(true); + fOnline.setVisible(true); + } + else { + fOnline.setEnabled(false); + fOnline.setVisible(false); + } + + // update the region name if regions are enabled for this country + if (c.isHasRegion()) + { + lRegion.setText(c.getRegionName()); + fRegion.setSelectedItem(m_location.getRegion()); + + // TODO: fix bug that occurs when the new region name is shorter than the old region name + } + + // refresh + mainPanel.removeAll(); + + initLocation(); + fCountry.requestFocus(); // allows to use Keybord selection + } + else if (e.getSource() == fOnline) + { + + // check to see if we have a postcode lookup plugin for this country + MCountry c = (MCountry)fCountry.getSelectedItem(); + if (c.isPostcodeLookup()) + { + lookupPostcode(c, fPostal.getText()); + } + } + } // actionPerformed + + /** + * OK - check for changes (save them) & Exit + */ + private void action_OK() + { + m_location.setAddress1(fAddress1.getText()); + m_location.setAddress2(fAddress2.getText()); + m_location.setAddress3(fAddress3.getText()); + m_location.setAddress4(fAddress4.getText()); + m_location.setCity(fCity.getText()); + m_location.setPostal(fPostal.getText()); + m_location.setPostal_Add(fPostalAdd.getText()); + // Country/Region + MCountry c = (MCountry)fCountry.getSelectedItem(); + m_location.setCountry(c); + if (m_location.getCountry().isHasRegion()) + { + MRegion r = (MRegion)fRegion.getSelectedItem(); + m_location.setRegion(r); + } + else + m_location.setC_Region_ID(0); + // Save changes + m_location.save(); + } // actionOK + + /** + * Get result + * @return true, if changed + */ + public boolean isChanged() + { + return m_change; + } // getChange + + /** + * Get edited Value (MLocation) + * @return location + */ + public MLocation getValue() + { + return m_location; + } // getValue + /** + * lookupPostcode + * + * + * @param country + * @param postcode + * @return + */ + private String lookupPostcode(MCountry country, String postcode) + { + // Initialise the lookup class. + AddressLookupInterface pcLookup = null; + try { + AddressLookupInterface pcLookupTmp = (AddressLookupInterface) Class + .forName(country.getLookupClassName()).newInstance(); + pcLookup = pcLookupTmp.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + return "lookupAddress(): " + e.getMessage(); + } + + // remove any spaces from the postcode and convert to upper case + postcode = postcode.replaceAll(" ", "").toUpperCase(); + log.fine("Looking up postcode: " + postcode); + + // Lookup postcode on server. + pcLookup.setServerUrl(country.getLookupUrl()); + pcLookup.setClientID(country.getLookupClientID()); + pcLookup.setPassword(country.getLookupPassword()); + if (pcLookup.lookupPostcode(postcode)==1){ + // Success + fillLocation(pcLookup.getAddressData(), country); + fAddress1.requestFocusInWindow(); + } else + return "Postcode Lookup Error"; + + return ""; + } + /** + * Fills the location field using the information retrieved from postcode + * servers. + * + * @param ctx + * Context + * @param pkeyData + * Lookup results + * @param windowNo + * Window No. + * @param tab + * Tab + * @param field + * Field + */ + private void fillLocation(HashMap postcodeData, MCountry country) { + + // If it's not empty warn the user. + if (fAddress1 != null || fAddress2 != null + || fAddress3 != null + || fAddress4 != null || fCity != null) { + String warningMsg = "Existing address information will be overwritten. Proceed?"; + String warningTitle = "Warning"; + int response = JOptionPane.showConfirmDialog(null, warningMsg, + warningTitle, JOptionPane.YES_NO_OPTION); + if (response == JOptionPane.NO_OPTION) + return; + } + + + Set pcodeKeys = postcodeData.keySet(); + Iterator iterator = pcodeKeys.iterator(); + header = null; + + // Allocate the header array + header = new Object[pcodeKeys.size()]; + + String headerStr = null; + + // need to check how many records returned + // TODO - check number of records returns - size() method is incorrect + if (pcodeKeys.size() > 2) + { + // TODO: Implement ResultData Grid and get return (for premises level data) + System.out.println("Too many postcodes returned from Postcode Lookup - need to Implement ResultData"); + } else + { + for (int i = 0; (headerStr = (iterator.hasNext() ? iterator.next() : null)) != null + || iterator.hasNext(); i++) { + header[i] = headerStr; + Postcode values = (Postcode) postcodeData.get(headerStr); + + // Overwrite the values in location field. + fAddress1.setText(values.getStreet1()); + fAddress2.setText(values.getStreet2()); + fAddress3.setText(values.getStreet3()); + fAddress4.setText(values.getStreet4()); + fCity.setText(values.getCity()); + fPostal.setText(values.getPostcode()); + + // Do region lookup + if (country.isHasRegion()) + { + // get all regions for this country + MRegion[] regions = MRegion.getRegions(country.getCtx(), country.getC_Country_ID()); + + // If regions were loaded + if ( regions.length > 0) + { + // loop through regions array to attempt a region match - don't finish loop if region found + boolean found = false; + for (i = 0; i < regions.length && !found; i++) + { + + if (regions[i].getName().equals(values.getRegion()) ) + { + // found Region + fRegion.setSelectedItem(regions[i]); + log.fine("Found region: " + regions[i].getName()); + found = true; + } + } + if (!found) + { + // add new region + MRegion region = new MRegion(country, values.getRegion()); + if (region.save()) + { + log.fine("Added new region from web service: " + values.getRegion()); + // clears cache + Env.reset(false); + //reload regions to combo box + fRegion = new CComboBox(MRegion.getRegions(Env.getCtx(), country.getC_Country_ID())); + // select region + fRegion.setSelectedItem(values); + } else + log.severe("Error saving new region: " + region.getName()); + + } + } else + log.severe("Region lookup failed for Country: " + country.getName()); + + } + } + } + + } +} // VLocationDialog diff --git a/client/src/org/compiere/grid/ed/VLookup.java b/client/src/org/compiere/grid/ed/VLookup.java new file mode 100644 index 0000000000..517f00aff2 --- /dev/null +++ b/client/src/org/compiere/grid/ed/VLookup.java @@ -0,0 +1,1547 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.grid.ed; + +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.sql.*; +import java.util.logging.*; +import javax.swing.*; + +import org.compiere.apps.*; +import org.compiere.apps.search.*; +import org.compiere.model.*; +import org.compiere.swing.*; +import org.compiere.util.*; + +import org.eevolution.model.*; + +/** + * Lookup Visual Field. + *

    + * When r/o - display a Label + * When STABLE - display a ComboBox + * Otherwise show Selection Dialog + *

    + * Special handling of BPartner and Product + * + * @author Jorg Janke + * @version $Id: VLookup.java,v 1.5 2006/10/06 00:42:38 jjanke Exp $ + * + * @author Teo Sarca - BF [ 1740835 ] + * @author Michael Judd (MultiSelect) + */ +public class VLookup extends JComponent + implements VEditor, ActionListener, FocusListener +{ + @Override + protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, + int condition, boolean pressed) { + if (e.getSource() == m_combo || e.getSource() == m_text || e.getSource() == this) { + return super.processKeyBinding(ks, e, condition, pressed); + } + + JComponent editorComp = null; + if (m_lookup != null && m_lookup.getDisplayType() != DisplayType.Search) + editorComp = m_combo; + else + editorComp = m_text; + InputMap map = editorComp.getInputMap(condition); + ActionMap am = editorComp.getActionMap(); + + if(map!=null && am!=null && isEnabled()){ + Object binding = map.get(ks); + Action action = (binding==null) ? null : am.get(binding); + if(action!=null){ + return SwingUtilities.notifyAction(action, ks, e, editorComp, + e.getModifiers()); + } + } + return false; + } + + /** + * Create Optional BPartner Search Lookup + * @param WindowNo window + * @return VLookup + */ + public static VLookup createBPartner (int WindowNo) + { + int AD_Column_ID = 3499; // C_Invoice.C_BPartner_ID + try + { + Lookup lookup = MLookupFactory.get (Env.getCtx(), WindowNo, + 0, AD_Column_ID, DisplayType.Search); + return new VLookup ("C_BPartner_ID", false, false, true, lookup); + } + catch (Exception e) + { + log.log(Level.SEVERE, "", e); + } + return null; + } // createBPartner + + /** + * Create Optional Product Search Lookup + * @param WindowNo window + * @return VLookup + */ + public static VLookup createProduct (int WindowNo) + { + int AD_Column_ID = 3840; // C_InvoiceLine.M_Product_ID + try + { + Lookup lookup = MLookupFactory.get (Env.getCtx(), WindowNo, 0, + AD_Column_ID, DisplayType.Search); + return new VLookup ("M_Product_ID", false, false, true, lookup); + } + catch (Exception e) + { + log.log(Level.SEVERE, "", e); + } + return null; + } // createProduct + + /** + * Create Optional User Search Lookup + * @param WindowNo window + * @return VLookup + */ + public static VLookup createUser (int WindowNo) + { + int AD_Column_ID = 10443; // AD_WF_Activity.AD_User_UD + try + { + Lookup lookup = MLookupFactory.get (Env.getCtx(), WindowNo, 0, + AD_Column_ID, DisplayType.Search); + return new VLookup ("AD_User_ID", false, false, true, lookup); + } + catch (Exception e) + { + log.log(Level.SEVERE, "", e); + } + return null; + } // createProduct + + + /************************************************************************* + * Detail Constructor + * + * @param columnName column + * @param mandatory mandatory + * @param isReadOnly read only + * @param isUpdateable updateable + * @param lookup lookup + */ + public VLookup (String columnName, boolean mandatory, boolean isReadOnly, boolean isUpdateable, + Lookup lookup) + { + super(); + super.setName(columnName); + m_combo.setName(columnName); + m_columnName = columnName; + setMandatory(mandatory); + m_lookup = lookup; + if (m_lookup != null) + m_lookup.setMandatory(mandatory); + // + setLayout(new BorderLayout()); + mouseAdapter = new VLookup_mouseAdapter(this); // popup + + // *** Text & Button *** + m_text.addActionListener(this); + m_text.addFocusListener(this); + m_text.addMouseListener(mouseAdapter); + // Button + m_button.addActionListener(this); + m_button.addMouseListener(mouseAdapter); + m_button.setFocusable(false); // don't focus when tabbing + m_button.setMargin(new Insets(0, 0, 0, 0)); + if (columnName.equals("C_BPartner_ID")) + m_button.setIcon(Env.getImageIcon("BPartner10.gif")); + else if (columnName.equals("M_Product_ID")) + m_button.setIcon(Env.getImageIcon("Product10.gif")); + else + m_button.setIcon(Env.getImageIcon("PickOpen10.gif")); + + // *** VComboBox *** + if (m_lookup != null && m_lookup.getDisplayType() != DisplayType.Search) // No Search + { + // Don't have to fill up combobox if it is readonly + if (!isReadOnly && isUpdateable) + m_lookup.fillComboBox (isMandatory(), true, true, false); + m_combo.setModel(m_lookup); + // + AutoCompletion.enable(m_combo); + m_combo.addActionListener(this); // Selection + m_combo.getEditor().getEditorComponent().addMouseListener(mouseAdapter); // popup + // FocusListener to refresh selection before opening + m_combo.addFocusListener(this); + m_combo.getEditor().getEditorComponent().addFocusListener(this); + } + + setUI (true); + // ReadWrite - decides what components to show + if (isReadOnly || !isUpdateable || m_lookup == null) + setReadWrite(false); + else + setReadWrite(true); + + // Popup + if (m_lookup != null) + { + if ((m_lookup.getDisplayType() == DisplayType.List && Env.getContextAsInt(Env.getCtx(), "#AD_Role_ID") == 0) + || m_lookup.getDisplayType() != DisplayType.List) // only system admins can change lists, so no need to zoom for others + { + mZoom = new CMenuItem(Msg.getMsg(Env.getCtx(), "Zoom"), Env.getImageIcon("Zoom16.gif")); + mZoom.addActionListener(this); + popupMenu.add(mZoom); + } + mRefresh = new CMenuItem(Msg.getMsg(Env.getCtx(), "Refresh"), Env.getImageIcon("Refresh16.gif")); + mRefresh.addActionListener(this); + popupMenu.add(mRefresh); + } + // VBPartner quick entry link + if (columnName.equals("C_BPartner_ID")) + { + mBPartnerNew = new CMenuItem (Msg.getMsg(Env.getCtx(), "New"), Env.getImageIcon("InfoBPartner16.gif")); + mBPartnerNew.addActionListener(this); + mBPartnerNew.setVisible(isReadWrite()); // visible only if the field is editable - teo_sarca [ 1721710 ] + popupMenu.add(mBPartnerNew); + mBPartnerUpd = new CMenuItem (Msg.getMsg(Env.getCtx(), "Update"), Env.getImageIcon("InfoBPartner16.gif")); + mBPartnerUpd.addActionListener(this); + popupMenu.add(mBPartnerUpd); + } + // + if (m_lookup != null && m_lookup.getZoom() == 0) + mZoom.setEnabled(false); + } // VLookup + + /** + * Dispose + */ + public void dispose() + { + m_text = null; + m_button = null; + m_lookup = null; + m_mField = null; + // + m_combo.getEditor().getEditorComponent().removeFocusListener(this); + m_combo.getEditor().getEditorComponent().removeMouseListener(mouseAdapter); + m_combo.removeFocusListener(this); + m_combo.removeActionListener(this); + m_combo.setModel(new DefaultComboBoxModel()); // remove reference + // m_combo.removeAllItems(); + m_combo = null; + } // dispose + + /** Display Length for Lookups (15) */ + public final static int DISPLAY_LENGTH = 15; + /** Field Height */ + public static int FIELD_HIGHT = 0; + + /** Search: The Editable Text Field */ + private CTextField m_text = new CTextField (DISPLAY_LENGTH); + /** Search: The Button to open Editor */ + private CButton m_button = new CButton(); + /** The Combo Box if not a Search Lookup */ + private VComboBox m_combo = new VComboBox(); + /** Indicator that value is being set */ + private volatile boolean m_settingValue = false; + /** Indicator that docus is being set */ + private volatile boolean m_settingFocus = false; + /** Indicator that Lookup has focus */ + private volatile boolean m_haveFocus = false; + /** Indicator - inserting new value */ + private volatile boolean m_inserting = false; + /** Last Display */ + private String m_lastDisplay = ""; + /** Column Name */ + private String m_columnName; + /** Lookup */ + private Lookup m_lookup; + /** Conbo Box Active */ + private boolean m_comboActive = true; + /** The Value */ + private Object m_value; + + private boolean m_stopediting = false; + + // Popup + JPopupMenu popupMenu = new JPopupMenu(); + private CMenuItem mZoom; + private CMenuItem mRefresh; + private CMenuItem mBPartnerNew; + private CMenuItem mBPartnerUpd; + // Mouse Listener + private VLookup_mouseAdapter mouseAdapter; + + + // Field for Value Preference + private GridField m_mField = null; + /** Logger */ + private static CLogger log = CLogger.getCLogger(VLookup.class); + + /** + * Set Content and Size of Components + * @param initial if true, size and margins will be set + */ + private void setUI (boolean initial) + { + if (initial) + { + Dimension size = m_text.getPreferredSize(); + setPreferredSize(new Dimension(size)); // causes r/o to be the same length + m_combo.setPreferredSize(new Dimension(size)); + setMinimumSize(new Dimension (30, size.height)); + FIELD_HIGHT = size.height; + // + m_text.setBorder(null); + Dimension bSize = new Dimension(size.height, size.height); + m_button.setPreferredSize (bSize); + } + + // What to show + this.remove(m_combo); + this.remove(m_button); + this.remove(m_text); + // + if (!isReadWrite()) // r/o - show text only + { + LookAndFeel.installBorder(this, "TextField.border"); + this.add(m_text, BorderLayout.CENTER); + m_text.setReadWrite(false); + m_combo.setReadWrite(false); + m_comboActive = false; + } + else if (m_lookup != null && m_lookup.getDisplayType() != DisplayType.Search) // show combo if not Search + { + this.setBorder(null); + this.add(m_combo, BorderLayout.CENTER); + m_comboActive = true; + } + else // Search or unstable - show text & button + { + LookAndFeel.installBorder(this, "TextField.border"); + this.add(m_text, BorderLayout.CENTER); + this.add(m_button, BorderLayout.EAST); + m_text.setReadWrite (true); + m_comboActive = false; + } + } // setUI + + /** + * Set ReadWrite + * @param value ReadWrite + */ + public void setReadWrite (boolean value) + { + boolean rw = value; + if (m_lookup == null) + rw = false; + if (m_combo.isReadWrite() != value) + { + m_combo.setReadWrite(rw); + setUI (false); + if (value && m_comboActive) { + m_settingValue = true; // disable actions + refresh(); + m_settingValue = false; + } + if (m_comboActive) + setValue (m_value); + } + // If the field is readonly the BPartner new option should be hidden - teo_sarca [ 1721710 ] + if (mBPartnerNew != null) + mBPartnerNew.setVisible(value); + } // setReadWrite + + /** + * IsEditable + * @return is lookup ReadWrite + */ + public boolean isReadWrite() + { + return m_combo.isReadWrite(); + } // isReadWrite + + /** + * Set Mandatory (and back color) + * @param mandatory mandatory + */ + public void setMandatory (boolean mandatory) + { + m_combo.setMandatory(mandatory); + m_text.setMandatory(mandatory); + } // setMandatory + + /** + * Is it mandatory + * @return true if mandatory + */ + public boolean isMandatory() + { + return m_combo.isMandatory(); + } // isMandatory + + /** + * Set Background + * @param color color + */ + public void setBackground(Color color) + { + m_text.setBackground(color); + m_combo.setBackground(color); + } // setBackground + + /** + * Set Background + * @param error error + */ + public void setBackground (boolean error) + { + m_text.setBackground(error); + m_combo.setBackground(error); + } // setBackground + + /** + * Set Foreground + * @param fg Foreground color + */ + public void setForeground(Color fg) + { + m_text.setForeground(fg); + m_combo.setForeground(fg); + } // setForeground + + /** + * Request Focus + */ + public void requestFocus () + { + if (m_lookup != null && m_lookup.getDisplayType() != DisplayType.Search) + m_combo.requestFocus (); + else + m_text.requestFocus (); + } // requestFocus + + + /** + * Set Editor to value + * @param value new Value + */ + public void setValue (Object value) + { + log.fine(m_columnName + "=" + value); + m_settingValue = true; // disable actions + m_value = value; + + // Set both for switching + if (value == null) + { + m_combo.setValue (value); + m_text.setText (null); + m_lastDisplay = ""; + m_settingValue = false; + return; + } + if (m_lookup == null) + { + m_combo.setValue (value); + m_text.setText (value.toString()); + m_lastDisplay = value.toString(); + m_settingValue = false; + return; + } + + //must call m_combo.setvalue after m_lookup as + //loading of combo data might happen in m_lookup.getDisplay + m_lastDisplay = m_lookup.getDisplay(value); + m_combo.setValue (value); + + if (m_lastDisplay.equals("<-1>")) + { + m_lastDisplay = ""; + m_value = null; + } + boolean notFound = m_lastDisplay.startsWith("<") && m_lastDisplay.endsWith(">"); + m_text.setText (m_lastDisplay); + m_text.setCaretPosition (0); // show beginning + + // Nothing showing in Combo and should be showing + if (m_combo.getSelectedItem() == null + && (m_comboActive || (m_inserting && m_lookup.getDisplayType() != DisplayType.Search))) + { + // lookup found nothing too + if (notFound) + { + log.finest(m_columnName + "=" + value + ": Not found - " + m_lastDisplay); + // we may have a new value + m_lookup.refresh(); + m_combo.setValue (value); + m_lastDisplay = m_lookup.getDisplay(value); + m_text.setText (m_lastDisplay); + m_text.setCaretPosition (0); // show beginning + notFound = m_lastDisplay.startsWith("<") && m_lastDisplay.endsWith(">"); + } + if (notFound) // + { + m_value = null; + actionCombo (null); // data binding + log.fine(m_columnName + "=" + value + ": Not found"); + } + // we have lookup + else if (m_combo.getSelectedItem() == null) + { + NamePair pp = m_lookup.get(value); + if (pp != null) + { + log.fine(m_columnName + " added to combo - " + pp); + // Add to Combo + m_combo.addItem (pp); + m_combo.setValue (value); + } + } + // Not in Lookup - set to Null + if (m_combo.getSelectedItem() == null) + { + log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL"); + actionCombo (null); // data binding (calls setValue again) + m_value = null; + } + } + m_settingValue = false; + } // setValue + + /** + * Property Change Listener + * @param evt PropertyChangeEvent + */ + public void propertyChange (PropertyChangeEvent evt) + { + if (m_stopediting) + return; + + // log.fine( "VLookup.propertyChange", evt); + if (evt.getPropertyName().equals(GridField.PROPERTY)) + { + m_inserting = GridField.INSERTING.equals(evt.getOldValue()); // MField.setValue + setValue(evt.getNewValue()); + m_inserting = false; + } + } // propertyChange + + /** + * Return Editor value (Integer) + * @return value + */ + public Object getValue() + { + if (m_comboActive) + return m_combo.getValue (); + return m_value; + } // getValue + + /** + * Return editor display + * @return display value + */ + public String getDisplay() + { + String retValue = null; + if (m_comboActive) + retValue = m_combo.getDisplay(); + // check lookup + else if (m_lookup == null) + retValue = m_value == null ? null : m_value.toString(); + else + retValue = m_lookup.getDisplay(m_value); + // log.fine( "VLookup.getDisplay - " + retValue, "ComboActive=" + m_comboActive); + return retValue; + } // getDisplay + + /** + * Set Field/WindowNo for ValuePreference + * @param mField Model Field for Lookup + */ + public void setField (GridField mField) + { + m_mField = mField; + if (m_mField != null + && MRole.getDefault().isShowPreference()) + ValuePreference.addMenu (this, popupMenu); + } // setField + + + /************************************************************************** + * Action Listener - data binding + * @param e ActionEvent + */ + public void actionPerformed (ActionEvent e) + { + if (m_settingValue || m_settingFocus || m_stopediting) + return; + log.config(m_columnName + " - " + e.getActionCommand() + ", ComboValue=" + m_combo.getSelectedItem()); + // log.fine("Hash=" + this.hashCode()); + + // Preference + if (e.getActionCommand().equals(ValuePreference.NAME)) + { + if (MRole.getDefault().isShowPreference()) + ValuePreference.start (m_mField, getValue(), getDisplay()); + return; + } + + // Combo Selection + else if (e.getSource() == m_combo) + { + Object value = getValue(); + Object o = m_combo.getSelectedItem(); + if (o != null) + { + String s = o.toString(); + // don't allow selection of inactive + if (s.startsWith(MLookup.INACTIVE_S) && s.endsWith(MLookup.INACTIVE_E)) + { + log.info(m_columnName + " - selection inactive set to NULL"); + value = null; + } + } + actionCombo (value); // data binding + } + // Button pressed + else if (e.getSource() == m_button) + actionButton (""); + // Text entered + else if (e.getSource() == m_text) + actionText(); + + // Popup Menu + else if (e.getSource() == mZoom) + actionZoom(m_combo.getSelectedItem()); + else if (e.getSource() == mRefresh) + actionRefresh(); + else if (e.getSource() == mBPartnerNew) + actionBPartner(true); + else if (e.getSource() == mBPartnerUpd) + actionBPartner(false); + } // actionPerformed + + /** + * Action Listener Interface + * @param listener listener + */ + public void addActionListener(ActionListener listener) + { + m_combo.addActionListener(listener); + m_text.addActionListener(listener); + } // addActionListener + + /** + * Action - Combo. + *
    + * == dataBinding == inform of new value + *

    +	 *  VLookup.actionCombo
    +	 *      GridController.vetoableChange
    +	 *          MTable.setValueAt
    +	 *              MField.setValue
    +	 *                  VLookup.setValue
    +	 *          MTab.dataStatusChanged
    +	 *  
    + * @param value new value + */ + private void actionCombo (Object value) + { + log.fine("Value=" + value); + try + { + // -> GridController.vetoableChange + fireVetoableChange (m_columnName, null, value); + } + catch (PropertyVetoException pve) + { + log.log(Level.SEVERE, m_columnName, pve); + } + // is the value updated ? + boolean updated = false; + + Object updatedValue = value; + + if (updatedValue instanceof Object[] && ((Object[])updatedValue).length > 0) + { + updatedValue = ((Object[])updatedValue)[0]; + } + + if (updatedValue == null && m_value == null) + updated = true; + else if (updatedValue != null && value.equals(m_value)) + updated = true; + if (!updated) + { + // happens if VLookup is used outside of APanel/GridController (no property listener) + log.fine(m_columnName + " - Value explicitly set - new=" + updatedValue + ", old=" + m_value); + if (getListeners(PropertyChangeListener.class).length <= 0) + setValue(updatedValue); + } + } // actionCombo + + + /** + * Action - Button. + * - Call Info + * @param queryValue initial query value + */ + private void actionButton (String queryValue) + { + m_button.setEnabled(false); // disable double click + if (m_lookup == null) + return; // leave button disabled + m_text.requestFocus(); // closes other editors + Frame frame = Env.getFrame(this); + + /** + * Three return options: + * - Value Selected & OK pressed => store result => result has value + * - Cancel pressed => store null => result == null && cancelled + * - Window closed -> ignore => result == null && !cancalled + */ + + Object result[] = null; + boolean cancelled = false; + boolean multipleSelection = false; + // + String col = m_lookup.getColumnName(); // fully qualified name + if (col.indexOf('.') != -1) + col = col.substring(col.indexOf('.')+1); + // Zoom / Validation + String whereClause = getWhereClause(); + // + log.fine(col + + ", Zoom=" + m_lookup.getZoom() + + " (" + whereClause + ")"); + // + boolean resetValue = false; // reset value so that is always treated as new entry + String infoFactoryClass = m_lookup.getInfoFactoryClass(); + if (infoFactoryClass != null && infoFactoryClass.trim().length() > 0) + { + try { + Class clazz = (Class)this.getClass().getClassLoader().loadClass(infoFactoryClass); + InfoFactory factory = clazz.newInstance(); + if (m_tableName == null) // sets table name & key column + getDirectAccessSQL("*"); + Info ig = factory.create (frame, true, m_lookup.getWindowNo(), + m_tableName, m_keyColumnName, queryValue, false, whereClause); + ig.setVisible(true); + cancelled = ig.isCancelled(); + result = ig.getSelectedKeys(); + } catch (Exception e) { + log.log(Level.SEVERE, "Failed to load custom InfoFactory - " + e.getLocalizedMessage(), e); + } + } + else if (col.equals("M_Product_ID")) + { + // Reset + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_Product_ID", "0"); + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_AttributeSetInstance_ID", "0"); + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_Lookup_ID", "0"); + // Replace Value with name if no value exists + if (queryValue.length() == 0 && m_text.getText().length() > 0) + queryValue = "@" + m_text.getText() + "@"; // Name indicator - otherwise Value + int M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), m_lookup.getWindowNo(), "M_Warehouse_ID"); + int M_PriceList_ID = Env.getContextAsInt(Env.getCtx(), m_lookup.getWindowNo(), "M_PriceList_ID"); + + int AD_Table_ID = MColumn.getTable_ID(Env.getCtx(), m_mField.getAD_Column_ID(), null); + + multipleSelection = (MOrderLine.Table_ID == AD_Table_ID) || (MInvoiceLine.Table_ID == AD_Table_ID) || (MPPProductBOMLine.Table_ID == AD_Table_ID) || (MProductPrice.Table_ID == AD_Table_ID); + + // Show Info + InfoProduct ip = new InfoProduct (frame, true, m_lookup.getWindowNo(), + M_Warehouse_ID, M_PriceList_ID, queryValue, multipleSelection, whereClause); + ip.setVisible(true); + cancelled = ip.isCancelled(); + result = ip.getSelectedKeys(); + resetValue = true; + } + else if (col.equals("C_BPartner_ID")) + { + // Replace Value with name if no value exists + if (queryValue.length() == 0 && m_text.getText().length() > 0) + queryValue = m_text.getText(); + boolean isSOTrx = true; // default + if (Env.getContext(Env.getCtx(), m_lookup.getWindowNo(), "IsSOTrx").equals("N")) + isSOTrx = false; + InfoBPartner ip = new InfoBPartner (frame, true, m_lookup.getWindowNo(), + queryValue, isSOTrx, multipleSelection, whereClause); + ip.setVisible(true); + cancelled = ip.isCancelled(); + result = ip.getSelectedKeys(); + } + else // General Info + { + if (m_tableName == null) // sets table name & key column + getDirectAccessSQL("*"); + Info ig = Info.create (frame, true, m_lookup.getWindowNo(), + m_tableName, m_keyColumnName, queryValue, multipleSelection, whereClause); + ig.setVisible(true); + cancelled = ig.isCancelled(); + result = ig.getSelectedKeys(); + } + + // Result + if (result != null && result.length > 0) + { + log.config(m_columnName + " - Result = " + result.toString() + " (" + result.getClass().getName() + ")"); + // make sure that value is in cache + m_lookup.getDirect(result[0], false, true); + if (resetValue) + actionCombo (null); + // juddm added logic for multi-select handling + if (result.length > 1) + actionCombo (result); // data binding + else + actionCombo (result[0]); + + } + else if (cancelled) + { + log.config(m_columnName + " - Result = null (cancelled)"); + actionCombo(null); + } + else + { + log.config(m_columnName + " - Result = null (not cancelled)"); + setValue(m_value); // to re-display value + } + // + m_button.setEnabled(true); + m_text.requestFocus(); + } // actionButton + + /** + * Get Where Clause + * @return where clause or "" + */ + private String getWhereClause() + { + String whereClause = ""; + if (m_lookup == null) + return ""; + if (m_lookup.getZoomQuery() != null) + whereClause = m_lookup.getZoomQuery().getWhereClause(); + String validation = m_lookup.getValidation(); + if (validation == null) + validation = ""; + if (whereClause.length() == 0) + whereClause = validation; + else if (validation.length() > 0) + whereClause += " AND " + validation; + // log.finest("ZoomQuery=" + (m_lookup.getZoomQuery()==null ? "" : m_lookup.getZoomQuery().getWhereClause()) + // + ", Validation=" + m_lookup.getValidation()); + if (whereClause.indexOf('@') != -1) + { + String validated = Env.parseContext(Env.getCtx(), m_lookup.getWindowNo(), whereClause, false); + if (validated.length() == 0) + log.severe(m_columnName + " - Cannot Parse=" + whereClause); + else + { + log.fine(m_columnName + " - Parsed: " + validated); + return validated; + } + } + return whereClause; + } // getWhereClause + + /** + * + * + * + */ + private String getExtraWhereClause (String text) + { + StringBuffer sql = new StringBuffer(); + m_tableName = m_columnName.substring(0, m_columnName.length()-3); + m_keyColumnName = m_columnName; + // + if (m_columnName.equals("M_Product_ID")) + { + // Reset + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_Product_ID", "0"); + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_AttributeSetInstance_ID", "0"); + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_Locator_ID", "0"); + // + sql.append(" AND (UPPER(p.Value) LIKE ") + .append(DB.TO_STRING(text)) + .append(" OR UPPER(p.Name) LIKE ").append(DB.TO_STRING(text)) + .append(" OR p.SKU LIKE ").append(DB.TO_STRING(text)).append(")"); + //.append(" OR p.SKU LIKE ").append(DB.TO_STRING(text)) + //.append(" OR p.UPC LIKE ").append(DB.TO_STRING(text)).append(")"); + } + // Predefined + /* + if (sql.length() > 0) + { + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + sql.append(" AND ").append(wc); + sql.append(" AND IsActive='Y'"); + // *** + log.finest(m_columnName + " (predefined) " + sql.toString()); + return MRole.getDefault().addAccessSQL(sql.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + }*/ + + return sql.toString(); + } + /** + * Check, if data returns unique entry, otherwise involve Info via Button + */ + private void actionText() + { + String text = m_text.getText(); + // Nothing entered + if (text == null || text.length() == 0 || text.equals("%")) + { + actionButton(text); + return; + } + text = text.toUpperCase(); + log.config(m_columnName + " - " + text); + + // Exact first + PreparedStatement pstmt = null; + String finalSQL = Msg.parseTranslation(Env.getCtx(), getDirectAccessSQL(text)); + int id = -3; + try + { + pstmt = DB.prepareStatement(finalSQL, null); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + id = rs.getInt(1); // first + if (rs.next()) + id = -1; // only if unique + } + rs.close(); + pstmt.close(); + } + catch (Exception e) + { + log.log(Level.SEVERE, finalSQL, e); + id = -2; + } + // Try like + if (id == -3 && !text.endsWith("%")) + { + text += "%"; + finalSQL = Msg.parseTranslation(Env.getCtx(), getDirectAccessSQL(text)); + try + { + pstmt = DB.prepareStatement(finalSQL, null); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + id = rs.getInt(1); // first + if (rs.next()) + id = -1; // only if unique + } + rs.close(); + pstmt.close(); + } + catch (Exception e) + { + log.log(Level.SEVERE, finalSQL, e); + id = -2; + } + } + try + { + if (pstmt != null) + pstmt.close(); + } + catch (Exception e) + { + } + + // No (unique) result + if (id <= 0) + { + if (id == -3) + log.fine(m_columnName + " - Not Found - " + finalSQL); + else + log.fine(m_columnName + " - Not Unique - " + finalSQL); + m_value = null; // force re-display + actionButton(m_text.getText()); + return; + } + log.fine(m_columnName + " - Unique ID=" + id); + m_value = null; // forces re-display if value is unchanged but text updated and still unique + actionCombo (new Integer(id)); // data binding + m_text.requestFocus(); + } // actionText + + + private String m_tableName = null; + private String m_keyColumnName = null; + + /** + * Generate Access SQL for Search. + * The SQL returns the ID of the value entered + * Also sets m_tableName and m_keyColumnName + * @param text uppercase text for LIKE comparison + * @return sql or "" + * Example + * SELECT C_Payment_ID FROM C_Payment WHERE UPPER(DocumentNo) LIKE x OR ... + */ + private String getDirectAccessSQL (String text) + { + StringBuffer sql = new StringBuffer(); + m_tableName = m_columnName.substring(0, m_columnName.length()-3); + m_keyColumnName = m_columnName; + // + if (m_columnName.equals("M_Product_ID")) + { + // Reset + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_Product_ID", "0"); + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_AttributeSetInstance_ID", "0"); + Env.setContext(Env.getCtx(), Env.WINDOW_INFO, Env.TAB_INFO, "M_Locator_ID", "0"); + // + sql.append("SELECT M_Product_ID FROM M_Product WHERE (UPPER(Value) LIKE ") + .append(DB.TO_STRING(text)) + .append(" OR UPPER(Name) LIKE ").append(DB.TO_STRING(text)) + .append(" OR SKU LIKE ").append(DB.TO_STRING(text)) + .append(" OR UPC LIKE ").append(DB.TO_STRING(text)).append(")"); + } + else if (m_columnName.equals("C_BPartner_ID")) + { + sql.append("SELECT C_BPartner_ID FROM C_BPartner WHERE (UPPER(Value) LIKE ") + .append(DB.TO_STRING(text)) + .append(" OR UPPER(Name) LIKE ").append(DB.TO_STRING(text)).append(")"); + } + else if (m_columnName.equals("C_Order_ID")) + { + sql.append("SELECT C_Order_ID FROM C_Order WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("C_Invoice_ID")) + { + sql.append("SELECT C_Invoice_ID FROM C_Invoice WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("M_InOut_ID")) + { + sql.append("SELECT M_InOut_ID FROM M_InOut WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("C_Payment_ID")) + { + sql.append("SELECT C_Payment_ID FROM C_Payment WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("GL_JournalBatch_ID")) + { + sql.append("SELECT GL_JournalBatch_ID FROM GL_JournalBatch WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("SalesRep_ID")) + { + sql.append("SELECT AD_User_ID FROM AD_User WHERE UPPER(Name) LIKE ") + .append(DB.TO_STRING(text)); + m_tableName = "AD_User"; + m_keyColumnName = "AD_User_ID"; + } + // Predefined + if (sql.length() > 0) + { + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + sql.append(" AND ").append(wc); + sql.append(" AND IsActive='Y'"); + // *** + log.finest(m_columnName + " (predefined) " + sql.toString()); + return MRole.getDefault().addAccessSQL(sql.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + } + + // Check if it is a Table Reference + if (m_lookup != null && m_lookup instanceof MLookup) + { + int AD_Reference_ID = ((MLookup)m_lookup).getAD_Reference_Value_ID(); + if (AD_Reference_ID != 0) + { + String query = "SELECT kc.ColumnName, dc.ColumnName, t.TableName " + + "FROM AD_Ref_Table rt" + + " INNER JOIN AD_Column kc ON (rt.AD_Key=kc.AD_Column_ID)" + + " INNER JOIN AD_Column dc ON (rt.AD_Display=dc.AD_Column_ID)" + + " INNER JOIN AD_Table t ON (rt.AD_Table_ID=t.AD_Table_ID) " + + "WHERE rt.AD_Reference_ID=?"; + String displayColumnName = null; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(query, null); + pstmt.setInt(1, AD_Reference_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + m_keyColumnName = rs.getString(1); + displayColumnName = rs.getString(2); + m_tableName = rs.getString(3); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, query, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + if (displayColumnName != null) + { + sql = new StringBuffer(); + sql.append("SELECT ").append(m_keyColumnName) + .append(" FROM ").append(m_tableName) + .append(" WHERE UPPER(").append(displayColumnName) + .append(") LIKE ").append(DB.TO_STRING(text)) + .append(" AND IsActive='Y'"); + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + sql.append(" AND ").append(wc); + // *** + log.finest(m_columnName + " (Table) " + sql.toString()); + return MRole.getDefault().addAccessSQL(sql.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + } + } // Table Reference + } // MLookup + + /** Check Well Known Columns of Table - assumes TableDir **/ + String query = "SELECT t.TableName, c.ColumnName " + + "FROM AD_Column c " + + " INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID AND t.IsView='N') " + + "WHERE (c.ColumnName IN ('DocumentNo', 'Value', 'Name') OR c.IsIdentifier='Y')" + + " AND c.AD_Reference_ID IN (10,14)" + + " AND EXISTS (SELECT * FROM AD_Column cc WHERE cc.AD_Table_ID=t.AD_Table_ID" + + " AND cc.IsKey='Y' AND cc.ColumnName=?)"; + m_keyColumnName = m_columnName; + sql = new StringBuffer(); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(query, null); + pstmt.setString(1, m_keyColumnName); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + if (sql.length() != 0) + sql.append(" OR "); + m_tableName = rs.getString(1); + sql.append("UPPER(").append(rs.getString(2)).append(") LIKE ").append(DB.TO_STRING(text)); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (SQLException ex) + { + log.log(Level.SEVERE, query, ex); + } + try + { + if (pstmt != null) + pstmt.close(); + } + catch (SQLException ex1) + { + } + pstmt = null; + // + if (sql.length() == 0) + { + log.log(Level.SEVERE, m_columnName + " (TableDir) - no standard/identifier columns"); + return ""; + } + // + StringBuffer retValue = new StringBuffer ("SELECT ") + .append(m_columnName).append(" FROM ").append(m_tableName) + .append(" WHERE ").append(sql) + .append(" AND IsActive='Y'"); + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + retValue.append(" AND ").append(wc); + // *** + log.finest(m_columnName + " (TableDir) " + sql.toString()); + return MRole.getDefault().addAccessSQL(retValue.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + } // getDirectAccessSQL + + + /** + * Action - Special BPartner Screen + * @param newRecord true if new record should be created + */ + private void actionBPartner (boolean newRecord) + { + VBPartner vbp = new VBPartner (Env.getFrame(this), m_lookup.getWindowNo()); + int BPartner_ID = 0; + // if update, get current value + if (!newRecord) + { + if (m_value instanceof Integer) + BPartner_ID = ((Integer)m_value).intValue(); + else if (m_value != null) + BPartner_ID = Integer.parseInt(m_value.toString()); + } + + vbp.loadBPartner (BPartner_ID); + vbp.setVisible(true); + // get result + int result = vbp.getC_BPartner_ID(); + if (result == 0 // 0 = not saved + && result == BPartner_ID) // the same + return; + // Maybe new BPartner - put in cache + m_lookup.getDirect(new Integer(result), false, true); + + actionCombo (new Integer(result)); // data binding + } // actionBPartner + + /** + * Action - Zoom + * @param selectedItem item + */ + private void actionZoom (Object selectedItem) + { + if (m_lookup == null) + return; + // + MQuery zoomQuery = m_lookup.getZoomQuery(); + Object value = getValue(); + if (value == null) + value = selectedItem; + // If not already exist or exact value + if (zoomQuery == null || value != null) + { + zoomQuery = new MQuery(); // ColumnName might be changed in MTab.validateQuery + String keyColumnName = null; + // Check if it is a Table Reference + if (m_lookup != null && m_lookup instanceof MLookup) + { + int AD_Reference_ID = ((MLookup)m_lookup).getAD_Reference_Value_ID(); + if (AD_Reference_ID != 0) + { + String query = "SELECT kc.ColumnName" + + " FROM AD_Ref_Table rt" + + " INNER JOIN AD_Column kc ON (rt.AD_Key=kc.AD_Column_ID)" + + "WHERE rt.AD_Reference_ID=?"; + + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(query, null); + pstmt.setInt(1, AD_Reference_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + keyColumnName = rs.getString(1); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, query, e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + } // Table Reference + } // MLookup + + if(keyColumnName != null && keyColumnName.length() !=0) + zoomQuery.addRestriction(keyColumnName, MQuery.EQUAL, value); + else + zoomQuery.addRestriction(m_columnName, MQuery.EQUAL, value); + + zoomQuery.setRecordCount(1); // guess + } + int AD_Window_ID = m_lookup.getZoom(zoomQuery); + // + log.info(m_columnName + " - AD_Window_ID=" + AD_Window_ID + + " - Query=" + zoomQuery + " - Value=" + value); + // + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + // + AWindow frame = new AWindow(); + if (!frame.initWindow(AD_Window_ID, zoomQuery)) + { + setCursor(Cursor.getDefaultCursor()); + ValueNamePair pp = CLogger.retrieveError(); + String msg = pp==null ? "AccessTableNoView" : pp.getValue(); + ADialog.error(m_lookup.getWindowNo(), this, msg, pp==null ? "" : pp.getName()); + } + else + { + AEnv.addToWindowManager(frame); + if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED)) + { + AEnv.showMaximized(frame); + } + else + { + AEnv.showCenterScreen(frame); + } + } + // async window - not able to get feedback + frame = null; + // + setCursor(Cursor.getDefaultCursor()); + } // actionZoom + + /** + * Action - Refresh + */ + private void actionRefresh() + { + if (m_lookup == null) + return; + // + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + // + Object obj = m_combo.getSelectedItem(); + log.info(m_columnName + " #" + m_lookup.getSize() + ", Selected=" + obj); + //no need to refresh readonly lookup, just remove direct cache + if (!isReadWrite()) + { + m_settingValue = true; // disable actions + m_lookup.removeAllElements(); + m_lastDisplay = m_lookup.getDisplay(m_value); + m_text.setText(m_lastDisplay); + m_text.setCaretPosition(0); + m_settingValue = false; + } + else + { + m_lookup.refresh(); + m_lookup.fillComboBox(isMandatory(), true, true, false); + m_combo.setSelectedItem(obj); + //m_combo.revalidate(); + } + // + setCursor(Cursor.getDefaultCursor()); + log.info(m_columnName + " #" + m_lookup.getSize() + ", Selected=" + m_combo.getSelectedItem()); + } // actionRefresh + + + /************************************************************************** + * Focus Listener for ComboBoxes with missing Validation or invalid entries + * - Requery listener for updated list + * @param e FocusEvent + */ + public void focusGained (FocusEvent e) + { + if (m_combo == null || m_combo.getEditor() == null) + return; + if ((e.getSource() != m_combo && e.getSource() != m_combo.getEditor().getEditorComponent()) + || e.isTemporary() || m_haveFocus || m_lookup == null) + return; + + //avoid repeated query + if (m_lookup.isValidated() && m_lookup.isLoaded()) + { + m_haveFocus = true; + return; + } + // + m_haveFocus = true; // prevents calling focus gained twice + m_settingFocus = true; // prevents actionPerformed + // + Object obj = m_lookup.getSelectedItem(); + log.config(m_columnName + + " - Start Count=" + m_combo.getItemCount() + ", Selected=" + obj); + // log.fine( "VLookupHash=" + this.hashCode()); + boolean popupVisible = m_combo.isPopupVisible(); + m_lookup.fillComboBox(isMandatory(), true, true, false); // only validated & active + if (popupVisible) + { + //refresh + m_combo.hidePopup(); + m_combo.showPopup(); + } + log.config(m_columnName + + " - Update Count=" + m_combo.getItemCount() + ", Selected=" + m_lookup.getSelectedItem()); + m_lookup.setSelectedItem(obj); + log.config(m_columnName + + " - Selected Count=" + m_combo.getItemCount() + ", Selected=" + m_lookup.getSelectedItem()); + // + m_settingFocus = false; + } // focusGained + + /** + * Reset Selection List + * @param e FocusEvent + */ + public void focusLost(FocusEvent e) + { + if (e.isTemporary() + || m_lookup == null + || !m_button.isEnabled() ) // set by actionButton + return; + // Text Lost focus + if (e.getSource() == m_text) + { + String text = m_text.getText(); + log.config(m_columnName + " (Text) " + m_columnName + " = " + m_value + " - " + text); + m_haveFocus = false; + // Skip if empty + if ((m_value == null + && m_text.getText().length() == 0)) + return; + if (m_lastDisplay.equals(text)) + return; + // + actionText(); // re-display + return; + } + // Combo lost focus + if (e.getSource() != m_combo && e.getSource() != m_combo.getEditor().getEditorComponent()) + return; + if (m_lookup.isValidated() && !m_lookup.hasInactive()) + { + m_haveFocus = false; + return; + } + // + m_settingFocus = true; // prevents actionPerformed + // + log.config(m_columnName + " = " + m_combo.getSelectedItem()); + Object obj = m_combo.getSelectedItem(); + /* + // set original model + if (!m_lookup.isValidated()) + m_lookup.fillComboBox(true); // previous selection + */ + // Set value + if (obj != null) + { + m_combo.setSelectedItem(obj); + // original model may not have item + if (!m_combo.getSelectedItem().equals(obj)) + { + log.fine(m_columnName + " - added to combo - " + obj); + m_combo.addItem(obj); + m_combo.setSelectedItem(obj); + } + } + // actionCombo(getValue()); + m_settingFocus = false; + m_haveFocus = false; // can gain focus again + } // focusLost + + /** + * Set ToolTip + * @param text tool tip text + */ + public void setToolTipText(String text) + { + super.setToolTipText(text); + m_button.setToolTipText(text); + m_text.setToolTipText(text); + m_combo.setToolTipText(text); + } // setToolTipText + + /** + * Refresh Query + * @return count + */ + public int refresh() + { + if (m_lookup == null) + return -1; + + //no need to refresh readonly lookup, just remove direct cache + if (!isReadWrite()) { + m_lookup.removeAllElements(); + return 0; + } + + return m_lookup.refresh(); + } // refresh + + /** + * Use by vcelleditor to indicate editing is off and don't invoke databinding + * @param stopediting + */ + public void setStopEditing(boolean stopediting) { + m_stopediting = stopediting; + } + + +} // VLookup + +/***************************************************************************** + * Mouse Listener for Popup Menu + */ +final class VLookup_mouseAdapter extends java.awt.event.MouseAdapter +{ + /** + * Constructor + * @param adaptee adaptee + */ + VLookup_mouseAdapter(VLookup adaptee) + { + m_adaptee = adaptee; + } // VLookup_mouseAdapter + + private VLookup m_adaptee; + + /** + * Mouse Listener + * @param e MouseEvent + */ + public void mouseClicked(MouseEvent e) + { + // System.out.println("mouseClicked " + e.getID() + " " + e.getSource().getClass().toString()); + // popup menu + if (SwingUtilities.isRightMouseButton(e)) + m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY()); + // Hide the popup if not right click - teo_sarca [ 1734802 ] + else + m_adaptee.popupMenu.setVisible(false); + } // mouse Clicked + +} // VLookup_mouseAdapter \ No newline at end of file diff --git a/client/src/org/compiere/print/Viewer.java b/client/src/org/compiere/print/Viewer.java new file mode 100644 index 0000000000..6dc04ff8e1 --- /dev/null +++ b/client/src/org/compiere/print/Viewer.java @@ -0,0 +1,1213 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + * Contributor: phib [ 1566335 ] Report View scrolling (Bug 1566328) * + * Teo Sarca [ 1619449 ] Minor typo problem * + *****************************************************************************/ +package org.compiere.print; + +import java.awt.*; +import java.awt.event.*; +import java.io.*; +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import javax.swing.*; +import javax.swing.event.*; +import org.compiere.apps.*; +import org.compiere.apps.search.*; +import org.compiere.model.*; +import org.compiere.swing.*; +import org.compiere.util.*; +import org.adempiere.pdf.*; + +/** + * Print View Frame + * + * @author Jorg Janke + * @version $Id: Viewer.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $ + * globalqss: integrate phib contribution from + * http://sourceforge.net/tracker/index.php?func=detail&aid=1566335&group_id=176962&atid=879334 + * globalqss: integrate Teo Sarca bug fixing + * Colin Rooney 2007/03/20 RFE#1670185 & BUG#1684142 + * Extend security to Info queries + * + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • FR [ 1762466 ] Add "Window" menu to report viewer. + *
  • FR [ 1894640 ] Report Engine: Excel Export support + * @author victor.perez@e-evolution.com + * @see FR [ 1966328 ] New Window Info to MRP and CRP into View http://sourceforge.net/tracker/index.php?func=detail&aid=1966328&group_id=176962&atid=879335 + * + */ +public class Viewer extends CFrame + implements ActionListener, ChangeListener, WindowStateListener +{ + /** + * Viewer Constructor + * @param re report engine + */ + public Viewer (ReportEngine re) + { + super(); + log.info(""); + m_WindowNo = Env.createWindowNo(this); + m_reportEngine = re; + m_AD_Table_ID = re.getPrintFormat().getAD_Table_ID(); + if (!MRole.getDefault().isCanReport(m_AD_Table_ID)) + { + ADialog.error(m_WindowNo, this, "AccessCannotReport", m_reportEngine.getName()); + this.dispose(); + } + m_isCanExport = MRole.getDefault().isCanExport(m_AD_Table_ID); + try + { + m_viewPanel = re.getView(); + m_ctx = m_reportEngine.getCtx(); + jbInit(); + dynInit(); + if (!m_viewPanel.isArchivable()) + log.warning("Cannot archive Document"); + AEnv.showCenterScreen(this); + } + catch(Exception e) + { + log.log(Level.SEVERE, "", e); + ADialog.error(m_WindowNo, this, "LoadError", e.getLocalizedMessage()); + this.dispose(); + } + } // Viewer + + /** Window No */ + private int m_WindowNo; + /** Print Context */ + private Properties m_ctx; + /** Page No */ + private int m_pageNo = 1; + /** Max Page Number */ + private int m_pageMax = 1; + /** View Pane */ + private View m_viewPanel; + /** Setting Values */ + private boolean m_setting = false; + /** Report Engine */ + private ReportEngine m_reportEngine; + /** Drill Down/Across */ + private boolean m_drillDown = true; + /** Table ID */ + private int m_AD_Table_ID = 0; + private boolean m_isCanExport; + + private MQuery m_ddQ = null; + private MQuery m_daQ = null; + private CMenuItem m_ddM = null; + private CMenuItem m_daM = null; + + /** Logger */ + private static CLogger log = CLogger.getCLogger(Viewer.class); + + // + private CPanel northPanel = new CPanel(); + private JScrollPane centerScrollPane = new JScrollPane(); + private StatusBar statusBar = new StatusBar(false); + private JMenuBar menuBar = new JMenuBar(); + private JToolBar toolBar = new JToolBar(); + private CButton bPrint = new CButton(); + private CButton bSendMail = new CButton(); + private CButton bPageSetup = new CButton(); + private CButton bArchive = new CButton(); + private BorderLayout northLayout = new BorderLayout(); + private CButton bCustomize = new CButton(); + private CButton bEnd = new CButton(); + private CButton bFind = new CButton(); + private CButton bExport = new CButton(); + private CComboBox comboReport = new CComboBox(); + private CButton bPrevious = new CButton(); + private CButton bNext = new CButton(); + private SpinnerNumberModel spinnerModel = new SpinnerNumberModel(1,1,100,1); + private JSpinner spinner = new JSpinner(spinnerModel); + private CLabel labelDrill = new CLabel(); + private CComboBox comboDrill = new CComboBox(); +// private CComboBox comboZoom = new CComboBox(View.ZOOM_OPTIONS); + + + /** + * Static Layout + * @throws Exception + */ + private void jbInit() throws Exception + { + this.setIconImage(Env.getImage("mReport.gif")); + this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + // + northPanel.setLayout(northLayout); + this.getContentPane().add(northPanel, BorderLayout.NORTH); + northPanel.add(toolBar, BorderLayout.EAST); + this.getContentPane().add(centerScrollPane, BorderLayout.CENTER); + centerScrollPane.getViewport().add(m_viewPanel, null); + // pb add: set scrolling with scrollbar buttons to move by 20 pixels + // each press + centerScrollPane.getVerticalScrollBar().setUnitIncrement(20); + centerScrollPane.getHorizontalScrollBar().setUnitIncrement(20); + // end pb + this.getContentPane().add(statusBar, BorderLayout.SOUTH); + + // ToolBar + this.setJMenuBar(menuBar); + // Page Control + toolBar.add(bPrevious); + toolBar.add(spinner); + spinner.setToolTipText(Msg.getMsg(m_ctx, "GoToPage")); + toolBar.add(bNext); + // Zoom Level + toolBar.addSeparator(); +// toolBar.add(comboZoom, null); +// comboZoom.setToolTipText(Msg.getMsg(m_ctx, "Zoom")); + // Drill + toolBar.addSeparator(); + labelDrill.setText(Msg.getMsg(m_ctx, "Drill") + ": "); + toolBar.add(labelDrill); + toolBar.add(comboDrill); + comboDrill.setToolTipText(Msg.getMsg(m_ctx, "Drill")); + // Format, Customize, Find + toolBar.addSeparator(); + toolBar.add(comboReport); + comboReport.setToolTipText(Msg.translate(m_ctx, "AD_PrintFormat_ID")); + toolBar.add(bCustomize); + bCustomize.setToolTipText(Msg.getMsg(m_ctx, "PrintCustomize")); + toolBar.add(bFind); + bFind.setToolTipText(Msg.getMsg(m_ctx, "Find")); + toolBar.addSeparator(); + // Print/Export + toolBar.add(bPrint); + toolBar.addSeparator(); + toolBar.add(bPageSetup); + bPageSetup.setToolTipText(Msg.getMsg(m_ctx, "PageSetup")); + toolBar.add(bSendMail); + toolBar.add(bArchive); + if (m_isCanExport) + { + bExport.setToolTipText(Msg.getMsg(m_ctx, "Export")); + toolBar.add(bExport); + } + // End + toolBar.addSeparator(); + toolBar.add(bEnd, null); + bEnd.setToolTipText(Msg.getMsg(m_ctx, "End")); + } // jbInit + + /** + * Dynamic Init + */ + private void dynInit() + { + createMenu(); +// comboZoom.addActionListener(this); + // Change Listener to set Page no + //pb comment this out so that scrolling works normally + //centerScrollPane.getViewport().addChangeListener(this); + // end pb + + // Max Page + m_pageMax = m_viewPanel.getPageCount(); + spinnerModel.setMaximum(new Integer(m_pageMax)); + spinner.addChangeListener(this); + + fillComboReport(m_reportEngine.getPrintFormat().get_ID()); + + // View Panel Mouse Listener + m_viewPanel.addMouseListener(new MouseAdapter() + { + public void mouseClicked(MouseEvent e) + { + if (SwingUtilities.isRightMouseButton(e)) + mouse_clicked(e,true); + else if (e.getClickCount() > 1) + mouse_clicked(e,false); + } + }); + + // fill Drill Options (Name, TableName) + comboDrill.addItem(new ValueNamePair (null,"")); + String sql = "SELECT t.AD_Table_ID, t.TableName, e.PrintName, NULLIF(e.PO_PrintName,e.PrintName) " + + "FROM AD_Column c " + + " INNER JOIN AD_Column used ON (c.ColumnName=used.ColumnName)" + + " INNER JOIN AD_Table t ON (used.AD_Table_ID=t.AD_Table_ID AND t.IsView='N' AND t.AD_Table_ID <> c.AD_Table_ID)" + + " INNER JOIN AD_Column cKey ON (t.AD_Table_ID=cKey.AD_Table_ID AND cKey.IsKey='Y')" + + " INNER JOIN AD_Element e ON (cKey.ColumnName=e.ColumnName) " + + "WHERE c.AD_Table_ID=? AND c.IsKey='Y' " + + "ORDER BY 3"; + boolean trl = !Env.isBaseLanguage(Env.getCtx(), "AD_Element"); + if (trl) + sql = "SELECT t.AD_Table_ID, t.TableName, et.PrintName, NULLIF(et.PO_PrintName,et.PrintName) " + + "FROM AD_Column c" + + " INNER JOIN AD_Column used ON (c.ColumnName=used.ColumnName)" + + " INNER JOIN AD_Table t ON (used.AD_Table_ID=t.AD_Table_ID AND t.IsView='N' AND t.AD_Table_ID <> c.AD_Table_ID)" + + " INNER JOIN AD_Column cKey ON (t.AD_Table_ID=cKey.AD_Table_ID AND cKey.IsKey='Y')" + + " INNER JOIN AD_Element e ON (cKey.ColumnName=e.ColumnName)" + + " INNER JOIN AD_Element_Trl et ON (e.AD_Element_ID=et.AD_Element_ID) " + + "WHERE c.AD_Table_ID=? AND c.IsKey='Y'" + + " AND et.AD_Language=? " + + "ORDER BY 3"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, m_reportEngine.getPrintFormat().getAD_Table_ID()); + if (trl) + pstmt.setString(2, Env.getAD_Language(Env.getCtx())); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + String tableName = rs.getString(2); + String name = rs.getString(3); + String poName = rs.getString(4); + if (poName != null) + name += "/" + poName; + comboDrill.addItem(new ValueNamePair (tableName, name)); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + if (comboDrill.getItemCount() == 1) + { + labelDrill.setVisible(false); + comboDrill.setVisible(false); + } + else + comboDrill.addActionListener(this); + + revalidate(); + } // dynInit + + /** + * Fill ComboBox comboReport (report options) + * @param AD_PrintFormat_ID item to be selected + */ + private void fillComboReport(int AD_PrintFormat_ID) + { + comboReport.removeActionListener(this); + comboReport.removeAllItems(); + KeyNamePair selectValue = null; + // fill Report Options + String sql = MRole.getDefault().addAccessSQL( + "SELECT AD_PrintFormat_ID, Name, Description " + + "FROM AD_PrintFormat " + + "WHERE AD_Table_ID=? " + //Added Lines by Armen + + "AND IsActive='Y' " + //End of Added Lines + + "ORDER BY Name", + "AD_PrintFormat", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + int AD_Table_ID = m_reportEngine.getPrintFormat().getAD_Table_ID(); + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, AD_Table_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + KeyNamePair pp = new KeyNamePair(rs.getInt(1), rs.getString(2)); + comboReport.addItem(pp); + if (rs.getInt(1) == AD_PrintFormat_ID) + selectValue = pp; + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(m_ctx, "NewReport")).append(" **"); + KeyNamePair pp = new KeyNamePair(-1, sb.toString()); + comboReport.addItem(pp); + if (selectValue != null) + comboReport.setSelectedItem(selectValue); + comboReport.addActionListener(this); + } // fillComboReport + + /** + * Revalidate settings after change of environment + */ + private void revalidate() + { + m_pageMax = m_viewPanel.getPageCount(); + spinnerModel.setMaximum(new Integer(m_pageMax)); + + // scroll area (page size dependent) + centerScrollPane.setPreferredSize(new Dimension + (m_viewPanel.getPaperWidth()+30, m_viewPanel.getPaperHeight()+15)); + centerScrollPane.getViewport().setViewSize(new Dimension + (m_viewPanel.getPaperWidth()+2*View.MARGIN, + m_viewPanel.getPaperHeight()+2*View.MARGIN)); + + // Report Info + setTitle(Msg.getMsg(m_ctx, "Report") + ": " + m_reportEngine.getName() + " " + Env.getHeader(m_ctx, 0)); + StringBuffer sb = new StringBuffer (); + sb.append(m_viewPanel.getPaper().toString(m_ctx)) + .append(" - ").append(Msg.getMsg(m_ctx, "DataCols")).append("=") + .append(m_reportEngine.getColumnCount()) + .append(", ").append(Msg.getMsg(m_ctx, "DataRows")).append("=") + .append(m_reportEngine.getRowCount()); + statusBar.setStatusLine(sb.toString()); + // + setPage(m_pageNo); + } // revalidate + + + /** + * Create Menu + */ + private void createMenu() + { + // File + JMenu mFile = AEnv.getMenu("File"); + menuBar.add(mFile); + AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this); + AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, Event.SHIFT_MASK), mFile, this); + AEnv.addMenuItem("Report", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.ALT_MASK), mFile, this); + mFile.addSeparator(); + AEnv.addMenuItem("PrintCustomize", "Preference", null, mFile, this); + AEnv.addMenuItem("Translate", null, null, mFile, this); + AEnv.addMenuItem("Find", null, KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK), mFile, this); + mFile.addSeparator(); + AEnv.addMenuItem("PageSetup", null, null, mFile, this); + AEnv.addMenuItem("Print", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK), mFile, this); + if (m_isCanExport) + AEnv.addMenuItem("Export", null, null, mFile, this); + mFile.addSeparator(); + AEnv.addMenuItem("End", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), mFile, this); + AEnv.addMenuItem("Logout", null, KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this); + AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this); + + // View + JMenu mView = AEnv.getMenu("View"); + menuBar.add(mView); + + if (MRole.getDefault().isAllow_Info_Product()) + { + AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this); + } + if (MRole.getDefault().isAllow_Info_BPartner()) + { + AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this); + } + if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account()) + { + AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this); + } + if (MRole.getDefault().isAllow_Info_Schedule()) + { + AEnv.addMenuItem("InfoSchedule", null, null, mView, this); + } + //FR [ 1966328 ] + if (MRole.getDefault().isAllow_Info_MRP()) + { + AEnv.addMenuItem("InfoMRP", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_CRP()) + { + AEnv.addMenuItem("InfoCRP", "Info", null, mView, this); + } + mView.addSeparator(); + if (MRole.getDefault().isAllow_Info_Order()) + { + AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Invoice()) + { + AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_InOut()) + { + AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Payment()) + { + AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_CashJournal()) + { + AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Resource()) + { + AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); + } + if (MRole.getDefault().isAllow_Info_Asset()) + { + AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); + } + + + // Go + JMenu mGo = AEnv.getMenu("Go"); + menuBar.add(mGo); + AEnv.addMenuItem("First", "First", KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.ALT_MASK), mGo, this); + AEnv.addMenuItem("PreviousPage", "Previous", KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.ALT_MASK), mGo, this); + AEnv.addMenuItem("NextPage", "Next", KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.ALT_MASK), mGo, this); + AEnv.addMenuItem("Last", "Last", KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.ALT_MASK), mGo, this); + + // Tools + JMenu mTools = AEnv.getMenu("Tools"); + menuBar.add(mTools); + AEnv.addMenuItem("Calculator", null, null, mTools, this); + AEnv.addMenuItem("Calendar", null, null, mTools, this); + MUser user = MUser.get(Env.getCtx()); + if (user.isAdministrator()) + AEnv.addMenuItem("Editor", null, null, mTools, this); + AEnv.addMenuItem("Script", null, null, mTools, this); + mTools.addSeparator(); + AEnv.addMenuItem("Preference", null, null, mTools, this); + + // Window + AMenu aMenu = (AMenu)Env.getWindow(0); + JMenu mWindow = new WindowMenu(aMenu.getWindowManager(), this); + menuBar.add(mWindow); + + // Help + JMenu mHelp = AEnv.getMenu("Help"); + menuBar.add(mHelp); + AEnv.addMenuItem("Online", null, null, mHelp, this); + AEnv.addMenuItem("SendMail", null, null, mHelp, this); + AEnv.addMenuItem("About", null, null, mHelp, this); + + // ---- ToolBar ---- + // + setButton(bPrint, "Print", "Print"); + setButton(bSendMail, "SendMail", "SendMail"); + setButton(bPageSetup, "PageSetup", "PageSetup"); + setButton(bArchive, "Archive", "Archive"); + if (m_isCanExport) + setButton(bExport, "Export", "Export"); + // + setButton(bNext, "NextPage", "Next"); + setButton(bPrevious, "PreviousPage", "Previous"); + // + setButton(bFind, "Find", "Find"); + setButton(bCustomize, "PrintCustomize", "Preference"); + // + setButton(bEnd, "End", "End"); + } // createMenu + + /** + * Set Button + * @param button button + * @param cmd command + * @param file fine mame + */ + private void setButton (AbstractButton button, String cmd, String file) + { + String text = Msg.getMsg(m_ctx, cmd); + button.setToolTipText(text); + button.setActionCommand(cmd); + // + ImageIcon ii24 = Env.getImageIcon(file+"24.gif"); + if (ii24 != null) + button.setIcon(ii24); + button.setMargin(AppsAction.BUTTON_INSETS); + button.setPreferredSize(AppsAction.BUTTON_SIZE); + button.addActionListener(this); + } // setButton + + /** + * Dispose + */ + public void dispose() + { + Env.clearWinContext(m_WindowNo); + m_reportEngine = null; + m_viewPanel = null; + m_ctx = null; + super.dispose(); + } // dispose + + + /************************************************************************** + * Action Listener + * @param e event + */ + public void actionPerformed (ActionEvent e) + { + if (m_setting) + return; + String cmd = e.getActionCommand(); + log.config(cmd); + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + // +// if (e.getSource() == comboZoom) +// cmd_zoom(); +// else + if (e.getSource() == comboReport) + cmd_report(); + else if (e.getSource() == comboDrill) + cmd_drill(); + else if (cmd.equals("First")) + setPage(1); + else if (cmd.equals("PreviousPage") || cmd.equals("Previous")) + setPage(m_pageNo-1); + else if (cmd.equals("NextPage") || cmd.equals("Next")) + setPage(m_pageNo+1); + else if (cmd.equals("Last")) + setPage(m_pageMax); + else if (cmd.equals("Find")) + cmd_find(); + else if (cmd.equals("Export")) + cmd_export(); + else if (cmd.equals("Print")) + cmd_print(); + else if (cmd.equals("SendMail")) + cmd_sendMail(); + else if (cmd.equals("Archive")) + cmd_archive(); + else if (cmd.equals("PrintCustomize")) + cmd_customize(); + else if (cmd.equals("PageSetup")) + cmd_pageSetup(); + else if (cmd.equals("Translate")) + cmd_translate(); + else if (cmd.equals("End")) + dispose(); + // + else if (e.getSource() == m_ddM) + cmd_window(m_ddQ); + else if (e.getSource() == m_daM) + cmd_window(m_daQ); + // + else if (!AEnv.actionPerformed(e.getActionCommand(), m_WindowNo, this)) + log.log(Level.SEVERE, "unknown action=" + e.getActionCommand()); + // + this.setCursor(Cursor.getDefaultCursor()); + } // actionPerformed + + /** + * Change Listener (spinner, viewpoint) + * @param e event + */ + public void stateChanged (ChangeEvent e) + { + if (m_setting) + return; + // log.config( "Viewer.stateChanged", e); + m_setting = true; + int newPage = 0; + if (e.getSource() == spinner) + { + newPage = ((Integer)spinnerModel.getValue()).intValue(); + } + // pb with the viewport change listener disabled the following is + // superfluous and should be removed + else // Viewpoint + { + Point p = centerScrollPane.getViewport().getViewPosition(); + newPage = Math.round(m_viewPanel.getPageNoAt(p)); + } + setPage(newPage); + m_setting = false; + } // stateChanged + + + /** + * Set Page No + * @param page page no + */ + private void setPage (int page) + { + m_setting = true; + m_pageNo = page; + if (m_pageNo < 1) + m_pageNo = 1; + if (page > m_pageMax) + m_pageNo = m_pageMax; + bPrevious.setEnabled (m_pageNo != 1); + bNext.setEnabled (m_pageNo != m_pageMax); + // + Rectangle pageRectangle = m_viewPanel.getRectangleOfPage(m_pageNo); + pageRectangle.x -= View.MARGIN; + pageRectangle.y -= View.MARGIN; + centerScrollPane.getViewport().setViewPosition(pageRectangle.getLocation()); + // System.out.println("scrollTo " + pageRectangle); + + // Set Page + spinnerModel.setValue(new Integer(m_pageNo)); + StringBuffer sb = new StringBuffer (Msg.getMsg(m_ctx, "Page")) + .append(" ").append(m_pageNo) + .append(m_viewPanel.getPageInfo(m_pageNo)) + .append(" ").append(Msg.getMsg(m_ctx, "of")).append(" ") + .append(m_pageMax) + .append(m_viewPanel.getPageInfoMax()); + statusBar.setStatusDB(sb.toString()); + m_setting = false; + } // setPage + + + /************************************************************************** + * (Re)Set Drill Accross Cursor + */ + private void cmd_drill() + { + m_drillDown = comboDrill.getSelectedIndex() < 1; // -1 or 0 + if (m_drillDown) + setCursor(Cursor.getDefaultCursor()); + else + setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + } // cmd_drill + + /** + * Mouse clicked + * @param e event + * @param rightClick true if right click + */ + private void mouse_clicked (MouseEvent e, boolean rightClick) + { + Point point = e.getPoint(); + log.info("Right=" + rightClick + " - " + point.toString()); + if (rightClick) + { + m_ddQ = m_viewPanel.getDrillDown(point); + m_daQ = m_viewPanel.getDrillAcross(point); + m_ddM = null; + m_daM = null; + if (m_ddQ == null && m_daQ == null) + return; + // Create Menu + JPopupMenu pop = new JPopupMenu(); + Icon wi = Env.getImageIcon("mWindow.gif"); + if (m_ddQ != null) + { + m_ddM = new CMenuItem(m_ddQ.getDisplayName(Env.getCtx()), wi); + m_ddM.setToolTipText(m_ddQ.toString()); + m_ddM.addActionListener(this); + pop.add(m_ddM); + } + if (m_daQ != null) + { + m_daM = new CMenuItem(m_daQ.getDisplayName(Env.getCtx()), wi); + m_daM.setToolTipText(m_daQ.toString()); + m_daM.addActionListener(this); + pop.add(m_daM); + } + Point pp = e.getPoint(); + pop.show((Component)e.getSource(), pp.x, pp.y); + return; + } + + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + if (m_drillDown) + { + MQuery query = m_viewPanel.getDrillDown(point); + if (query != null) + { + log.info("Drill Down: " + query.getWhereClause(true)); + executeDrill(query); + } + } + else if (comboDrill.getSelectedItem() != null && comboDrill.getSelectedIndex() > 0) + { + MQuery query = m_viewPanel.getDrillAcross(point); + if (query != null) + { + NamePair pp = (NamePair)comboDrill.getSelectedItem(); + query.setTableName(pp.getID()); + log.info("Drill Accross: " + query.getWhereClause(true)); + executeDrill(query); + } + } + cmd_drill(); // setCursor + } // mouse_clicked + + /** + * Execute Drill to Query + * @param query query + */ + private void executeDrill (MQuery query) + { + int AD_Table_ID = AReport.getAD_Table_ID(query.getTableName()); + if (!MRole.getDefault().isCanReport(AD_Table_ID)) + { + ADialog.error(m_WindowNo, this, "AccessCannotReport", query.getTableName()); + return; + } + if (AD_Table_ID != 0) + new AReport (AD_Table_ID, null, query); + else + log.warning("No Table found for " + query.getWhereClause(true)); + } // executeDrill + + /** + * Open Window + * @param query query + */ + private void cmd_window (MQuery query) + { + if (query == null) + return; + AEnv.zoom(query); + } // cmd_window + + /************************************************************************** + * Print Report + */ + private void cmd_print() + { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + m_reportEngine.getPrintInfo().setWithDialog(true); + m_reportEngine.print(); + cmd_drill(); // setCursor + } // cmd_print + + /** + * Send Mail + */ + private void cmd_sendMail() + { + String to = ""; + MUser from = MUser.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx())); + String subject = m_reportEngine.getName(); + String message = ""; + File attachment = null; + + try + { + attachment = File.createTempFile("mail", ".pdf"); + m_reportEngine.getPDF(attachment); + } + catch (Exception e) + { + log.log(Level.SEVERE, "", e); + } + + EMailDialog emd = new EMailDialog (this, + Msg.getMsg(Env.getCtx(), "SendMail"), + from, to, subject, message, attachment); + + } // cmd_sendMail + + /** + * Archive Report directly + */ + private void cmd_archive () + { + boolean success = false; + byte[] data = Document.getPDFAsArray(m_reportEngine.getLayout().getPageable(false)); // No Copy + if (data != null) + { + MArchive archive = new MArchive (Env.getCtx(), m_reportEngine.getPrintInfo(), null); + archive.setBinaryData(data); + success = archive.save(); + } + if (success) + ADialog.info(m_WindowNo, this, "Archived"); + else + ADialog.error(m_WindowNo, this, "ArchiveError"); + } // cmd_archive + + /** + * Print Setup Dialog + */ + private void cmd_pageSetup() + { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + m_reportEngine.pageSetupDialog(); + revalidate(); + cmd_drill(); // setCursor + } // cmd_pageSetup + + /** + * Export + */ + private void cmd_export() + { + log.config(""); + if (!m_isCanExport) + { + ADialog.error(m_WindowNo, this, "AccessCannotExport", getTitle()); + return; + } + + // + JFileChooser chooser = new JFileChooser(); + chooser.setDialogType(JFileChooser.SAVE_DIALOG); + chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + chooser.setDialogTitle(Msg.getMsg(m_ctx, "Export") + ": " + getTitle()); + // + chooser.addChoosableFileFilter(new ExtensionFileFilter("ps", Msg.getMsg(m_ctx, "FilePS"))); + chooser.addChoosableFileFilter(new ExtensionFileFilter("xml", Msg.getMsg(m_ctx, "FileXML"))); + chooser.addChoosableFileFilter(new ExtensionFileFilter("pdf", Msg.getMsg(m_ctx, "FilePDF"))); + chooser.addChoosableFileFilter(new ExtensionFileFilter("html", Msg.getMsg(m_ctx, "FileHTML"))); + chooser.addChoosableFileFilter(new ExtensionFileFilter("txt", Msg.getMsg(m_ctx, "FileTXT"))); + chooser.addChoosableFileFilter(new ExtensionFileFilter("ssv", Msg.getMsg(m_ctx, "FileSSV"))); + chooser.addChoosableFileFilter(new ExtensionFileFilter("csv", Msg.getMsg(m_ctx, "FileCSV"))); + chooser.addChoosableFileFilter(new ExtensionFileFilter("xls", Msg.getMsg(m_ctx, "FileXLS"))); + // + if (chooser.showSaveDialog(this) != JFileChooser.APPROVE_OPTION) + return; + + // Create File + File outFile = ExtensionFileFilter.getFile(chooser.getSelectedFile(), chooser.getFileFilter()); + try + { + outFile.createNewFile(); + } + catch (IOException e) + { + log.log(Level.SEVERE, "", e); + ADialog.error(m_WindowNo, this, "FileCannotCreate", e.getLocalizedMessage()); + return; + } + + String ext = outFile.getPath(); + // no extension + if (ext.lastIndexOf('.') == -1) + { + ADialog.error(m_WindowNo, this, "FileInvalidExtension"); + return; + } + ext = ext.substring(ext.lastIndexOf('.')+1).toLowerCase(); + log.config( "File=" + outFile.getPath() + "; Type=" + ext); + + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + try { + if (ext.equals("pdf")) + m_reportEngine.createPDF(outFile); + else if (ext.equals("ps")) + m_reportEngine.createPS(outFile); + else if (ext.equals("xml")) + m_reportEngine.createXML(outFile); + else if (ext.equals("csv")) + m_reportEngine.createCSV(outFile, ',', m_reportEngine.getPrintFormat().getLanguage()); + else if (ext.equals("ssv")) + m_reportEngine.createCSV(outFile, ';', m_reportEngine.getPrintFormat().getLanguage()); + else if (ext.equals("txt")) + m_reportEngine.createCSV(outFile, '\t', m_reportEngine.getPrintFormat().getLanguage()); + else if (ext.equals("html") || ext.equals("htm")) + m_reportEngine.createHTML(outFile, false, m_reportEngine.getPrintFormat().getLanguage()); + else if (ext.equals("xls")) + m_reportEngine.createXLS(outFile, m_reportEngine.getPrintFormat().getLanguage()); + else + ADialog.error(m_WindowNo, this, "FileInvalidExtension"); + } + catch (Exception e) { + ADialog.error(m_WindowNo, this, "Error", e.getLocalizedMessage()); + if (CLogMgt.isLevelFinest()) + e.printStackTrace(); + } + cmd_drill(); // setCursor + } // cmd_export + + + /** + * Report Combo - Start other Report or create new one + */ + private void cmd_report() + { + KeyNamePair pp = (KeyNamePair)comboReport.getSelectedItem(); + if (pp == null) + return; + // + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + MPrintFormat pf = null; + int AD_PrintFormat_ID = pp.getKey(); + + // create new + if (AD_PrintFormat_ID == -1) + { + int AD_ReportView_ID = m_reportEngine.getPrintFormat().getAD_ReportView_ID(); + if (AD_ReportView_ID != 0) + { + String name = m_reportEngine.getName(); + int index = name.lastIndexOf('_'); + if (index != -1) + name = name.substring(0,index); + pf = MPrintFormat.createFromReportView(m_ctx, AD_ReportView_ID, name); + } + else + { + int AD_Table_ID = m_reportEngine.getPrintFormat().getAD_Table_ID(); + pf = MPrintFormat.createFromTable(m_ctx, AD_Table_ID); + } + if (pf != null) + fillComboReport(pf.get_ID()); + else + return; + } + else + pf = MPrintFormat.get (Env.getCtx(), AD_PrintFormat_ID, true); + + // Get Language from previous - thanks Gunther Hoppe + if (m_reportEngine.getPrintFormat() != null) + { + pf.setLanguage(m_reportEngine.getPrintFormat().getLanguage()); // needs to be re-set - otherwise viewer will be blank + pf.setTranslationLanguage(m_reportEngine.getPrintFormat().getLanguage()); + } + m_reportEngine.setPrintFormat(pf); + revalidate(); + + cmd_drill(); // setCursor + } // cmd_report + + /** + * Query Report + */ + private void cmd_find() + { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + int AD_Table_ID = m_reportEngine.getPrintFormat().getAD_Table_ID(); + + String title = null; + String tableName = null; + + // Get Find Tab Info + String sql = "SELECT t.AD_Tab_ID " + // ,w.Name, t.Name, w.IsDefault, t.SeqNo, ABS (tt.AD_Window_ID-t.AD_Window_ID) + + "FROM AD_Tab t" + + " INNER JOIN AD_Window w ON (t.AD_Window_ID=w.AD_Window_ID)" + + " INNER JOIN AD_Table tt ON (t.AD_Table_ID=tt.AD_Table_ID) " + + "WHERE tt.AD_Table_ID=? " + + "ORDER BY w.IsDefault DESC, t.SeqNo, ABS (tt.AD_Window_ID-t.AD_Window_ID)"; + int AD_Tab_ID = DB.getSQLValue(null, sql, AD_Table_ID); + // ASP + MClient client = MClient.get(Env.getCtx()); + String ASPFilter = ""; + if (client.isUseASP()) + ASPFilter = + " AND ( AD_Tab_ID IN ( " + // Just ASP subscribed tabs for client " + + " SELECT w.AD_Tab_ID " + + " FROM ASP_Tab w, ASP_Level l, ASP_ClientLevel cl " + + " WHERE w.ASP_Level_ID = l.ASP_Level_ID " + + " AND cl.AD_Client_ID = " + client.getAD_Client_ID() + + " AND cl.ASP_Level_ID = l.ASP_Level_ID " + + " AND w.IsActive = 'Y' " + + " AND l.IsActive = 'Y' " + + " AND cl.IsActive = 'Y' " + + " AND w.ASP_Status = 'S') " // Show + + " OR AD_Tab_ID IN ( " + // + show ASP exceptions for client + + " SELECT AD_Tab_ID " + + " FROM ASP_ClientException ce " + + " WHERE ce.AD_Client_ID = " + client.getAD_Client_ID() + + " AND ce.IsActive = 'Y' " + + " AND ce.AD_Tab_ID IS NOT NULL " + + " AND ce.AD_Field_ID IS NULL " + + " AND ce.ASP_Status = 'S') " // Show + + " ) " + + " AND AD_Tab_ID NOT IN ( " + // minus hide ASP exceptions for client + + " SELECT AD_Tab_ID " + + " FROM ASP_ClientException ce " + + " WHERE ce.AD_Client_ID = " + client.getAD_Client_ID() + + " AND ce.IsActive = 'Y' " + + " AND ce.AD_Tab_ID IS NOT NULL " + + " AND ce.AD_Field_ID IS NULL " + + " AND ce.ASP_Status = 'H')"; // Hide + // + sql = "SELECT Name, TableName FROM AD_Tab_v WHERE AD_Tab_ID=? " + ASPFilter; + if (!Env.isBaseLanguage(Env.getCtx(), "AD_Tab")) + sql = "SELECT Name, TableName FROM AD_Tab_vt WHERE AD_Tab_ID=?" + + " AND AD_Language='" + Env.getAD_Language(Env.getCtx()) + "' " + ASPFilter; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, AD_Tab_ID); + ResultSet rs = pstmt.executeQuery(); + // + if (rs.next()) + { + title = rs.getString(1); + tableName = rs.getString(2); + } + // + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + + GridField[] findFields = null; + if (tableName != null) + findFields = GridField.createFields(m_ctx, m_WindowNo, 0, AD_Tab_ID); + + if (findFields == null) // No Tab for Table exists + bFind.setEnabled(false); + else + { + Find find = new Find (this, m_WindowNo, title, + AD_Tab_ID, AD_Table_ID, tableName, "", findFields, 1); + m_reportEngine.setQuery(find.getQuery()); + find.dispose(); + find = null; + revalidate(); + } + cmd_drill(); // setCursor + } // cmd_find + + /** + * Call Customize + */ + private void cmd_customize() + { + AWindow win = new AWindow (); + new AWindowListener (win, this); // forwards Window Events + int AD_Window_ID = 240; // hardcoded + int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID(); + win.initWindow(AD_Window_ID, MQuery.getEqualQuery("AD_PrintFormat_ID", AD_PrintFormat_ID)); + AEnv.addToWindowManager(win); + AEnv.showCenterScreen(win); + // see windowStateChanged for applying change + } // cmd_customize + + /** + * Window State Listener for Customize Window + * @param e event + */ + public void windowStateChanged (WindowEvent e) + { + // The Customize Window was closed + if (e.getID() == WindowEvent.WINDOW_CLOSED && m_reportEngine != null) + { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + log.info("Re-read PrintFormat"); + int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID(); + Language language = m_reportEngine.getPrintFormat().getLanguage(); + MPrintFormat pf = MPrintFormat.get (Env.getCtx(), AD_PrintFormat_ID, true); + pf.setLanguage (language); // needs to be re-set - otherwise viewer will be blank + pf.setTranslationLanguage (language); + m_reportEngine.setPrintFormat(pf); + revalidate(); + cmd_drill(); // setCursor + } + } // windowStateChanged + + /** + * Set Zoom Level + */ + private void cmd_zoom() + { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); +// m_viewPanel.setZoomLevel(comboZoom.getSelectedIndex()); + revalidate(); + cmd_drill(); // setCursor + } // cmd_zoom + + + /** + * Show Translation Dialog. + * Translate base table entry, will be copied to trl tables if not multi-lingual + */ + private void cmd_translate() + { + ArrayList list = new ArrayList(); + ValueNamePair pp = null; + String sql = "SELECT Name, AD_Language FROM AD_Language WHERE IsSystemLanguage='Y' ORDER BY 1"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + list.add(new ValueNamePair (rs.getString(2), rs.getString(1))); + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + if (list.size() == 0) + { + ADialog.warn(m_WindowNo, this, "NoTranslation"); + return; + } + + // Dialog + String title = Msg.getMsg(Env.getCtx(), "PrintFormatTrl", true); + String message = Msg.getMsg(Env.getCtx(), "PrintFormatTrl", false); + int choice = JOptionPane.showOptionDialog + (this, message, title, + JOptionPane.OK_OPTION, JOptionPane.QUESTION_MESSAGE, null, + list.toArray(), null); + if (choice == JOptionPane.CLOSED_OPTION) + return; + // + pp = (ValueNamePair)list.get(choice); + String AD_Language = pp.getValue(); + int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID(); + log.config(AD_Language + " - AD_PrintFormat_ID=" + AD_PrintFormat_ID); + StringBuffer sb = new StringBuffer(); + // English + if (Language.isBaseLanguage (AD_Language)) + { + sb.append("UPDATE AD_PrintFormatItem pfi " + + "SET Name = (SELECT e.Name FROM AD_Element e, AD_Column c" + + " WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID)," + + "PrintName = (SELECT e.PrintName FROM AD_Element e, AD_Column c" + + " WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID) " + + "WHERE AD_PrintFormat_ID=").append(AD_PrintFormat_ID).append( + " AND EXISTS (SELECT * FROM AD_Element e, AD_Column c" + + " WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID)"); + } + else + { + AD_Language = "'" + AD_Language + "'"; + sb.append("UPDATE AD_PrintFormatItem pfi " + + "SET Name = (SELECT e.Name FROM AD_Element_Trl e, AD_Column c" + + " WHERE e.AD_Language=").append(AD_Language).append( + " AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID), " + + "PrintName = (SELECT e.PrintName FROM AD_Element_Trl e, AD_Column c" + + " WHERE e.AD_Language=").append(AD_Language).append( + " AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID) " + + "WHERE AD_PrintFormat_ID=").append(AD_PrintFormat_ID).append( + " AND EXISTS (SELECT * FROM AD_Element_Trl e, AD_Column c" + + " WHERE e.AD_Language=").append(AD_Language).append( + " AND e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=pfi.AD_Column_ID)"); + } + int count = DB.executeUpdate(sb.toString(), null); + log.config("Count=" + count); + // + m_reportEngine.setPrintFormat(MPrintFormat.get (Env.getCtx(), AD_PrintFormat_ID, true)); + revalidate(); + } // cmd_translate + + /*************************************************************************/ + + /** + * Test + * @param args args + */ + static public void main (String[] args) + { + Login.initTest(true); + + MQuery q = new MQuery("C_Invoice"); + q.addRestriction("C_Invoice_ID", MQuery.EQUAL, new Integer(103)); + + // 102 = Invoice - 100 = Order + PrintInfo i = new PrintInfo("test", X_C_Invoice.Table_ID, 102, 0); + MPrintFormat f = MPrintFormat.get (Env.getCtx(), 102, false); + ReportEngine re = new ReportEngine(Env.getCtx(), f, q, i); + + // MPrintFormat f = new MPrintFormat(Env.getCtx(), 101); + // ReportEngine re = new ReportEngine(f, null); + + new Viewer(re); + } // main + +} // Viewer + diff --git a/db/ddlutils/postgresql/views/C_INVOICE_LINETAX_V.sql b/db/ddlutils/postgresql/views/C_INVOICE_LINETAX_V.sql new file mode 100644 index 0000000000..aad9cbeb72 --- /dev/null +++ b/db/ddlutils/postgresql/views/C_INVOICE_LINETAX_V.sql @@ -0,0 +1,125 @@ +CREATE OR REPLACE VIEW C_INVOICE_LINETAX_V +(AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, + UPDATED, UPDATEDBY, AD_LANGUAGE, C_INVOICE_ID, C_INVOICELINE_ID, + C_TAX_ID, TAXAMT, LINETOTALAMT, TAXINDICATOR, LINE, + M_PRODUCT_ID, QTYINVOICED, QTYENTERED, UOMSYMBOL, NAME, + DESCRIPTION, DOCUMENTNOTE, UPC, SKU, PRODUCTVALUE, + RESOURCEDESCRIPTION, PRICELIST, PRICEENTEREDLIST, DISCOUNT, PRICEACTUAL, + PRICEENTERED, LINENETAMT, M_ATTRIBUTESETINSTANCE_ID, M_ATTRIBUTESET_ID, SERNO, + LOT, M_LOT_ID, GUARANTEEDATE, PRODUCTDESCRIPTION, IMAGEURL, + C_CAMPAIGN_ID, C_PROJECT_ID, C_ACTIVITY_ID, C_PROJECTPHASE_ID, C_PROJECTTASK_ID) +AS +SELECT il.AD_Client_ID, il.AD_Org_ID, il.IsActive, il.Created, il.CreatedBy, il.Updated, il.UpdatedBy, + 'en_US' AS AD_Language, + il.C_Invoice_ID, il.C_InvoiceLine_ID, + il.C_Tax_ID, il.TaxAmt, il.LineTotalAmt, t.TaxIndicator, + il.Line, p.M_Product_ID, + CASE WHEN il.QtyInvoiced<>0 OR il.M_Product_ID IS NOT NULL THEN il.QtyInvoiced END AS QtyInvoiced, + CASE WHEN il.QtyEntered<>0 OR il.M_Product_ID IS NOT NULL THEN il.QtyEntered END AS QtyEntered, + CASE WHEN il.QtyEntered<>0 OR il.M_Product_ID IS NOT NULL THEN uom.UOMSymbol END AS UOMSymbol, + COALESCE(c.Name,p.Name||productAttribute(il.M_AttributeSetInstance_ID), il.Description) AS Name, -- main line + CASE WHEN COALESCE(c.Name,p.Name) IS NOT NULL THEN il.Description END AS Description, -- second line + p.DocumentNote, -- third line + p.UPC, p.SKU, COALESCE(pp.VendorProductNo,p.Value) AS ProductValue, + ra.Description AS ResourceDescription, -- forth line + CASE WHEN i.IsDiscountPrinted='Y' AND il.PriceList<>0 + THEN il.PriceList END AS PriceList, + CASE WHEN i.IsDiscountPrinted='Y' AND il.PriceList<>0 AND il.QtyEntered<>0 + THEN il.PriceList*il.QtyInvoiced/il.QtyEntered END AS PriceEnteredList, + CASE WHEN i.IsDiscountPrinted='Y' AND il.PriceList>il.PriceActual AND il.PriceList<>0 + THEN (il.PriceList-il.PriceActual)/il.PriceList*100 END AS Discount, + CASE WHEN il.PriceActual<>0 OR il.M_Product_ID IS NOT NULL THEN il.PriceActual END AS PriceActual, + CASE WHEN il.PriceEntered<>0 OR il.M_Product_ID IS NOT NULL THEN il.PriceEntered END AS PriceEntered, + CASE WHEN il.LineNetAmt<>0 OR il.M_Product_ID IS NOT NULL THEN il.LineNetAmt END AS LineNetAmt, + il.M_AttributeSetInstance_ID, asi.M_AttributeSet_ID, + asi.SerNo, asi.Lot, asi.M_Lot_ID,asi.GuaranteeDate, + p.Description as ProductDescription, p.ImageURL, + il.C_Campaign_ID, il.C_Project_ID, il.C_Activity_ID, il.C_ProjectPhase_ID, il.C_ProjectTask_ID +FROM C_InvoiceLine il + INNER JOIN C_UOM uom ON (il.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN C_Invoice i ON (il.C_Invoice_ID=i.C_Invoice_ID) + LEFT OUTER JOIN C_Tax t ON (il.C_Tax_ID=t.C_Tax_ID) + LEFT OUTER JOIN M_Product p ON (il.M_Product_ID=p.M_Product_ID) + LEFT OUTER JOIN C_Charge c ON (il.C_Charge_ID=c.C_Charge_ID) + LEFT OUTER JOIN C_BPartner_Product pp ON (il.M_Product_ID=pp.M_Product_ID AND i.C_BPartner_ID=pp.C_BPartner_ID) + LEFT OUTER JOIN S_ResourceAssignment ra ON (il.S_ResourceAssignment_ID=ra.S_ResourceAssignment_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (il.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) +UNION -- bom lines +SELECT il.AD_Client_ID, il.AD_Org_ID, il.IsActive, il.Created, il.CreatedBy, il.Updated, il.UpdatedBy, + 'en_US' AS AD_Language, + il.C_Invoice_ID, il.C_InvoiceLine_ID, + il.C_Tax_ID, il.TaxAmt, il.LineTotalAmt, t.TaxIndicator, + il.Line+(bl.Line/100) AS Line, p.M_Product_ID, + --il.QtyInvoiced*b.BOMQty AS QtyInvoiced, + CASE WHEN bl.IsQtyPercentage = 'N' THEN il.QtyInvoiced*bl.QtyBOM ELSE il.QtyInvoiced*(bl.QtyBatch / 100) END AS QtyInvoiced, + --il.QtyEntered*b.BOMQty AS QtyEntered, + CASE WHEN bl.IsQtyPercentage = 'N' THEN il.QtyEntered*bl.QtyBOM ELSE il.QtyEntered*(bl.QtyBatch / 100) END AS QtyEntered, + uom.UOMSymbol, + p.Name, -- main + b.Description, + p.DocumentNote, p.UPC, p.SKU, p.Value AS ProductValue, + null, null, null, null, null, null, null, + il.M_AttributeSetInstance_ID, asi.M_AttributeSet_ID, asi.SerNo, asi.Lot, asi.M_Lot_ID,asi.GuaranteeDate, + p.Description as ProductDescription, p.ImageURL, + il.C_Campaign_ID, il.C_Project_ID, il.C_Activity_ID, il.C_ProjectPhase_ID, il.C_ProjectTask_ID +/*FROM M_Product_BOM b -- BOM lines + INNER JOIN C_InvoiceLine il ON (b.M_Product_ID=il.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=il.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsInvoicePrintDetails='Y') + INNER JOIN M_Product p ON (b.M_ProductBOM_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM uom ON (p.C_UOM_ID=uom.C_UOM_ID) + LEFT OUTER JOIN C_Tax t ON (il.C_Tax_ID=t.C_Tax_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (il.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID)*/ +FROM PP_Product_BOM b -- BOM lines + INNER JOIN C_InvoiceLine il ON (b.M_Product_ID=il.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=il.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsInvoicePrintDetails='Y') + INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) + INNER JOIN M_Product p ON (bl.M_Product_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM uom ON (p.C_UOM_ID=uom.C_UOM_ID) + LEFT OUTER JOIN C_Tax t ON (il.C_Tax_ID=t.C_Tax_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (il.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) +UNION -- comment lines +SELECT il.AD_Client_ID, il.AD_Org_ID, il.IsActive, il.Created, il.CreatedBy, il.Updated, il.UpdatedBy, + 'en_US', il.C_Invoice_ID, il.C_InvoiceLine_ID, + null, null, null, null, + il.Line, null, + null, null, null, + il.Description, + null, null, null, null, null, null, + null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null +FROM C_InvoiceLine il +WHERE il.C_UOM_ID IS NULL +UNION -- empty line +SELECT AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, + 'en_US', C_Invoice_ID, null, + null, null, null, null, + 9998, null, + null, null, null, + null, + null, null, null, null, null, null, + null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null +FROM C_Invoice +UNION -- tax lines +SELECT it.AD_Client_ID, it.AD_Org_ID, it.IsActive, it.Created, it.CreatedBy, it.Updated, it.UpdatedBy, + 'en_US', it.C_Invoice_ID, null, + it.C_Tax_ID, null, null, t.TaxIndicator, + 9999, null, + null, null, null, + t.Name, + null, null, null, null, null, null, + null, null, null, + CASE WHEN it.IsTaxIncluded='Y' THEN it.TaxAmt ELSE it.TaxBaseAmt END, + CASE WHEN it.IsTaxIncluded='Y' THEN it.TaxAmt ELSE it.TaxBaseAmt END, + CASE WHEN it.IsTaxIncluded='Y' THEN NULL ELSE it.TaxAmt END, + null, null, null, null, null, null, null, null, + null, null, null, null, null +FROM C_InvoiceTax it + INNER JOIN C_Tax t ON (it.C_Tax_ID=t.C_Tax_ID); + + + diff --git a/db/ddlutils/postgresql/views/C_INVOICE_LINETAX_VT.sql b/db/ddlutils/postgresql/views/C_INVOICE_LINETAX_VT.sql new file mode 100644 index 0000000000..9da6465a85 --- /dev/null +++ b/db/ddlutils/postgresql/views/C_INVOICE_LINETAX_VT.sql @@ -0,0 +1,129 @@ +CREATE OR REPLACE VIEW C_INVOICE_LINETAX_VT +(AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, + UPDATED, UPDATEDBY, AD_LANGUAGE, C_INVOICE_ID, C_INVOICELINE_ID, + C_TAX_ID, TAXAMT, LINETOTALAMT, TAXINDICATOR, LINE, + M_PRODUCT_ID, QTYINVOICED, QTYENTERED, UOMSYMBOL, NAME, + DESCRIPTION, DOCUMENTNOTE, UPC, SKU, PRODUCTVALUE, + RESOURCEDESCRIPTION, PRICELIST, PRICEENTEREDLIST, DISCOUNT, PRICEACTUAL, + PRICEENTERED, LINENETAMT, M_ATTRIBUTESETINSTANCE_ID, M_ATTRIBUTESET_ID, SERNO, + LOT, M_LOT_ID, GUARANTEEDATE, PRODUCTDESCRIPTION, IMAGEURL, + C_CAMPAIGN_ID, C_PROJECT_ID, C_ACTIVITY_ID, C_PROJECTPHASE_ID, C_PROJECTTASK_ID) +AS +SELECT il.AD_Client_ID, il.AD_Org_ID, il.IsActive, il.Created, il.CreatedBy, il.Updated, il.UpdatedBy, + uom.AD_Language, + il.C_Invoice_ID, il.C_InvoiceLine_ID, + il.C_Tax_ID, il.TaxAmt, il.LineTotalAmt, t.TaxIndicator, + il.Line, p.M_Product_ID, + CASE WHEN il.QtyInvoiced<>0 OR il.M_Product_ID IS NOT NULL THEN il.QtyInvoiced END AS QtyInvoiced, + CASE WHEN il.QtyEntered<>0 OR il.M_Product_ID IS NOT NULL THEN il.QtyEntered END AS QtyEntered, + CASE WHEN il.QtyEntered<>0 OR il.M_Product_ID IS NOT NULL THEN uom.UOMSymbol END AS UOMSymbol, + COALESCE(c.Name,COALESCE(pt.Name,p.Name)||productAttribute(il.M_AttributeSetInstance_ID), il.Description) AS Name, -- main line + CASE WHEN COALESCE(c.Name,pt.Name,p.Name) IS NOT NULL THEN il.Description END AS Description, -- second line + COALESCE(pt.DocumentNote,p.DocumentNote) AS DocumentNote, -- third line + p.UPC, p.SKU, COALESCE(pp.VendorProductNo,p.Value) AS ProductValue, + ra.Description AS ResourceDescription, -- forth line + CASE WHEN i.IsDiscountPrinted='Y' AND il.PriceList<>0 + THEN il.PriceList END AS PriceList, + CASE WHEN i.IsDiscountPrinted='Y' AND il.PriceList<>0 AND il.QtyEntered<>0 + THEN il.PriceList*il.QtyInvoiced/il.QtyEntered END AS PriceEnteredList, + CASE WHEN i.IsDiscountPrinted='Y' AND il.PriceList>il.PriceActual AND il.PriceList<>0 + THEN (il.PriceList-il.PriceActual)/il.PriceList*100 END AS Discount, + CASE WHEN il.PriceActual<>0 OR il.M_Product_ID IS NOT NULL THEN il.PriceActual END AS PriceActual, + CASE WHEN il.PriceEntered<>0 OR il.M_Product_ID IS NOT NULL THEN il.PriceEntered END AS PriceEntered, + CASE WHEN il.LineNetAmt<>0 OR il.M_Product_ID IS NOT NULL THEN il.LineNetAmt END AS LineNetAmt, + il.M_AttributeSetInstance_ID, asi.M_AttributeSet_ID, asi.SerNo, asi.Lot, asi.M_Lot_ID,asi.GuaranteeDate, + pt.Description as ProductDescription, p.ImageURL, + il.C_Campaign_ID, il.C_Project_ID, il.C_Activity_ID, il.C_ProjectPhase_ID, il.C_ProjectTask_ID +FROM C_InvoiceLine il + INNER JOIN C_UOM_Trl uom ON (il.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN C_Invoice i ON (il.C_Invoice_ID=i.C_Invoice_ID) + LEFT OUTER JOIN C_Tax_Trl t ON (il.C_Tax_ID=t.C_Tax_ID AND uom.AD_Language=t.AD_Language) + LEFT OUTER JOIN M_Product p ON (il.M_Product_ID=p.M_Product_ID) + LEFT OUTER JOIN C_Charge c ON (il.C_Charge_ID=c.C_Charge_ID) + LEFT OUTER JOIN C_BPartner_Product pp ON (il.M_Product_ID=pp.M_Product_ID AND i.C_BPartner_ID=pp.C_BPartner_ID) + LEFT OUTER JOIN M_Product_Trl pt ON (il.M_Product_ID=pt.M_Product_ID AND uom.AD_Language=pt.AD_Language) + LEFT OUTER JOIN S_ResourceAssignment ra ON (il.S_ResourceAssignment_ID=ra.S_ResourceAssignment_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (il.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) +UNION -- bom lines +SELECT il.AD_Client_ID, il.AD_Org_ID, il.IsActive, il.Created, il.CreatedBy, il.Updated, il.UpdatedBy, + uom.AD_Language, + il.C_Invoice_ID, il.C_InvoiceLine_ID, + il.C_Tax_ID, il.TaxAmt, il.LineTotalAmt, t.TaxIndicator, + il.Line+(bl.Line/100) AS Line, p.M_Product_ID, + --il.QtyInvoiced*b.BOMQty AS QtyInvoiced, + CASE WHEN bl.IsQtyPercentage = 'N' THEN il.QtyInvoiced*bl.QtyBOM ELSE il.QtyInvoiced*(bl.QtyBatch / 100) END AS QtyInvoiced, + --il.QtyEntered*b.BOMQty AS QtyEntered, + CASE WHEN bl.IsQtyPercentage = 'N' THEN il.QtyEntered*bl.QtyBOM ELSE il.QtyEntered*(bl.QtyBatch / 100) END AS QtyEntered, + uom.UOMSymbol, + COALESCE(pt.Name,p.Name) AS Name, -- main + b.Description, + COALESCE(pt.DocumentNote,p.DocumentNote) AS DocumentNote, p.UPC, p.SKU, p.Value AS ProductValue, + null, null, null, null, null, null, null, + il.M_AttributeSetInstance_ID, asi.M_AttributeSet_ID, asi.SerNo, asi.Lot, asi.M_Lot_ID,asi.GuaranteeDate, + pt.Description as ProductDescription, p.ImageURL, + il.C_Campaign_ID, il.C_Project_ID, il.C_Activity_ID, il.C_ProjectPhase_ID, il.C_ProjectTask_ID +/*FROM M_Product_BOM b -- BOM lines + INNER JOIN C_InvoiceLine il ON (b.M_Product_ID=il.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=il.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsInvoicePrintDetails='Y') + INNER JOIN M_Product p ON (b.M_ProductBOM_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM_Trl uom ON (p.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN M_Product_Trl pt ON (b.M_ProductBOM_ID=pt.M_Product_ID AND uom.AD_Language=pt.AD_Language) + LEFT OUTER JOIN C_Tax t ON (il.C_Tax_ID=t.C_Tax_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (il.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID)*/ +FROM PP_Product_BOM b -- BOM lines + INNER JOIN C_InvoiceLine il ON (b.M_Product_ID=il.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=il.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsInvoicePrintDetails='Y') + INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) + INNER JOIN M_Product p ON (bl.M_Product_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM_Trl uom ON (p.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN M_Product_Trl pt ON (bl.M_Product_ID=pt.M_Product_ID AND uom.AD_Language=pt.AD_Language) + LEFT OUTER JOIN C_Tax t ON (il.C_Tax_ID=t.C_Tax_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (il.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) +UNION -- comment line +SELECT il.AD_Client_ID, il.AD_Org_ID, il.IsActive, il.Created, il.CreatedBy, il.Updated, il.UpdatedBy, + l.AD_Language, il.C_Invoice_ID, il.C_InvoiceLine_ID, + null, null, null, null, + il.Line, null, + null, null, null, + il.Description, + null, null, null, null, null, null, + null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null,null,null,null,null +FROM C_InvoiceLine il, AD_Language l +WHERE il.C_UOM_ID IS NULL + AND l.IsBaseLanguage='N' AND l.IsSystemLanguage='Y' +UNION -- empty line +SELECT i.AD_Client_ID, i.AD_Org_ID, i.IsActive, i.Created, i.CreatedBy, i.Updated, i.UpdatedBy, + AD_Language, i.C_Invoice_ID, null, + null, null, null, null, + 9998, null, + null, null, null, + null, + null, null, null, null, null, null, + null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null,null,null,null,null +FROM C_Invoice i, AD_Language l +WHERE l.IsBaseLanguage='N' AND l.IsSystemLanguage='Y' +UNION -- tax lines +SELECT it.AD_Client_ID, it.AD_Org_ID, it.IsActive, it.Created, it.CreatedBy, it.Updated, it.UpdatedBy, + t.AD_Language, it.C_Invoice_ID, null, + it.C_Tax_ID, null, null, t.TaxIndicator, + 9999, null, + null, null, null, + t.Name, + null, null, null, null, null, null, + null, null, null, + CASE WHEN it.IsTaxIncluded='Y' THEN it.TaxAmt ELSE it.TaxBaseAmt END, + CASE WHEN it.IsTaxIncluded='Y' THEN it.TaxAmt ELSE it.TaxBaseAmt END, + CASE WHEN it.IsTaxIncluded='Y' THEN NULL ELSE it.TaxAmt END, + null, null, null, null, null, null, null, null, + null,null,null,null,null +FROM C_InvoiceTax it + INNER JOIN C_Tax_Trl t ON (it.C_Tax_ID=t.C_Tax_ID); + + + diff --git a/db/ddlutils/postgresql/views/C_ORDER_LINETAX_V.sql b/db/ddlutils/postgresql/views/C_ORDER_LINETAX_V.sql new file mode 100644 index 0000000000..141527e42e --- /dev/null +++ b/db/ddlutils/postgresql/views/C_ORDER_LINETAX_V.sql @@ -0,0 +1,106 @@ +CREATE OR REPLACE VIEW C_ORDER_LINETAX_V +(AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, + UPDATED, UPDATEDBY, AD_LANGUAGE, C_ORDER_ID, C_ORDERLINE_ID, + C_TAX_ID, TAXINDICATOR, C_BPARTNER_ID, C_BPARTNER_LOCATION_ID, BPNAME, + C_LOCATION_ID, LINE, M_PRODUCT_ID,VendorProductNo, QTYORDERED, QTYENTERED, + UOMSYMBOL, NAME, DESCRIPTION, DOCUMENTNOTE, UPC, + SKU, PRODUCTVALUE, RESOURCEDESCRIPTION, PRICELIST, PRICEENTEREDLIST, + DISCOUNT, PRICEACTUAL, PRICEENTERED, LINENETAMT, PRODUCTDESCRIPTION, + IMAGEURL, C_CAMPAIGN_ID, C_PROJECT_ID, C_ACTIVITY_ID, C_PROJECTPHASE_ID, + C_PROJECTTASK_ID) +AS +SELECT ol.AD_Client_ID, ol.AD_Org_ID, ol.IsActive, ol.Created, ol.CreatedBy, ol.Updated, ol.UpdatedBy, + 'en_US' AS AD_Language, + ol.C_Order_ID, ol.C_OrderLine_ID, ol.C_Tax_ID, t.TaxIndicator, + ol.C_BPartner_ID, ol.C_BPartner_Location_ID, bp.Name AS BPName, bpl.C_Location_ID, + ol.Line, p.M_Product_ID, po.VendorProductNo, + CASE WHEN ol.QtyOrdered<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.QtyOrdered END AS QtyOrdered, + CASE WHEN ol.QtyEntered<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.QtyEntered END AS QtyEntered, + CASE WHEN ol.QtyEntered<>0 OR ol.M_Product_ID IS NOT NULL THEN uom.UOMSymbol END AS UOMSymbol, + COALESCE(c.Name,p.Name||productAttribute(ol.M_AttributeSetInstance_ID), ol.Description) AS Name, -- main line + CASE WHEN COALESCE(c.Name,p.Name) IS NOT NULL THEN ol.Description END AS Description, -- second line + p.DocumentNote, -- third line + p.UPC, p.SKU, COALESCE(pp.VendorProductNo,p.Value) AS ProductValue, + ra.Description AS ResourceDescription, -- forth line + CASE WHEN i.IsDiscountPrinted='Y' AND ol.PriceList<>0 + THEN ol.PriceList END AS PriceList, + CASE WHEN i.IsDiscountPrinted='Y' AND ol.PriceList<>0 AND ol.QtyEntered<>0 + THEN ol.PriceList*ol.QtyOrdered/ol.QtyEntered END AS PriceEnteredList, + CASE WHEN i.IsDiscountPrinted='Y' AND ol.PriceList>ol.PriceActual AND ol.PriceList<>0 + THEN (ol.PriceList-ol.PriceActual)/ol.PriceList*100 END AS Discount, + CASE WHEN ol.PriceActual<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.PriceActual END AS PriceActual, + CASE WHEN ol.PriceEntered<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.PriceEntered END AS PriceEntered, + CASE WHEN ol.LineNetAmt<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.LineNetAmt END AS LineNetAmt, + p.Description as ProductDescription, p.ImageURL, + ol.C_Campaign_ID, ol.C_Project_ID, ol.C_Activity_ID, ol.C_ProjectPhase_ID, ol.C_ProjectTask_ID +FROM C_OrderLine ol + INNER JOIN C_UOM uom ON (ol.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN C_Order i ON (ol.C_Order_ID=i.C_Order_ID) + LEFT OUTER JOIN M_Product p ON (ol.M_Product_ID=p.M_Product_ID) + LEFT OUTER JOIN M_Product_PO po ON (p.M_Product_ID=po.M_Product_ID) + LEFT OUTER JOIN S_ResourceAssignment ra ON (ol.S_ResourceAssignment_ID=ra.S_ResourceAssignment_ID) + LEFT OUTER JOIN C_Charge c ON (ol.C_Charge_ID=c.C_Charge_ID) + LEFT OUTER JOIN C_BPartner_Product pp ON (ol.M_Product_ID=pp.M_Product_ID AND i.C_BPartner_ID=pp.C_BPartner_ID) + INNER JOIN C_BPartner bp ON (ol.C_BPartner_ID=bp.C_BPartner_ID) + INNER JOIN C_BPartner_Location bpl ON (ol.C_BPartner_Location_ID=bpl.C_BPartner_Location_ID) + LEFT OUTER JOIN C_Tax t ON (ol.C_Tax_ID=t.C_Tax_ID) +UNION +SELECT ol.AD_Client_ID, ol.AD_Org_ID, ol.IsActive, ol.Created, ol.CreatedBy, ol.Updated, ol.UpdatedBy, + 'en_US' AS AD_Language, + ol.C_Order_ID, ol.C_OrderLine_ID, ol.C_Tax_ID, null, + null, null, null, null, + ol.Line+(bl.Line/100) AS Line, p.M_Product_ID,po.VendorProductNo, + --ol.QtyOrdered*bl.BOMQty AS QtyInvoiced + CASE WHEN bl.IsQtyPercentage = 'N' THEN ol.QtyOrdered*bl.QtyBOM ELSE ol.QtyOrdered*(bl.QtyBatch / 100) END AS QtyInvoiced, + --ol.QtyEntered*bl.BOMQty AS QtyEntered, + CASE WHEN bl.IsQtyPercentage = 'N' THEN ol.QtyEntered*bl.QtyBOM ELSE ol.QtyEntered*(bl.QtyBatch / 100) END AS QtyEntered, + uom.UOMSymbol, + p.Name, -- main + bl.Description, + p.DocumentNote, p.UPC, p.SKU, p.Value AS ProductValue, + null, null, null, null, null, null, null, p.Description as ProductDescription, p.ImageURL, + ol.C_Campaign_ID, ol.C_Project_ID, ol.C_Activity_ID, ol.C_ProjectPhase_ID, ol.C_ProjectTask_ID +/*FROM M_Product_BOM b -- BOM lines + INNER JOIN C_OrderLine ol ON (b.M_Product_ID=ol.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=ol.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsInvoicePrintDetails='Y') + INNER JOIN M_Product p ON (b.M_ProductBOM_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM uom ON (p.C_UOM_ID=uom.C_UOM_ID)*/ +FROM PP_Product_BOM b + INNER JOIN C_OrderLine ol ON (b.M_Product_ID=ol.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=ol.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsInvoicePrintDetails='Y') + INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) + INNER JOIN M_Product p ON (p.M_Product_ID=bl.M_Product_ID) -- BOM line product + LEFT OUTER JOIN M_Product_PO po ON (p.M_Product_ID=po.M_Product_ID) + INNER JOIN C_UOM uom ON (p.C_UOM_ID=uom.C_UOM_ID) +UNION +SELECT AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, + 'en_US', C_Order_ID, null, null, null, + null, + null, null, null, + null, null, null, null, + null, null,null, + null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null,null,null,null,null +FROM C_Order +UNION +SELECT ot.AD_Client_ID, ot.AD_Org_ID, ot.IsActive, ot.Created, ot.CreatedBy, ot.Updated, ot.UpdatedBy, + 'en_US', ot.C_Order_ID, null, ot.C_Tax_ID, t.TaxIndicator, + null, null, null, null, + null, null,null, + null, null, null, + t.Name, + null, null, null, null, null, null, + null, null, null, + CASE WHEN ot.IsTaxIncluded='Y' THEN ot.TaxAmt ELSE ot.TaxBaseAmt END, + CASE WHEN ot.IsTaxIncluded='Y' THEN ot.TaxAmt ELSE ot.TaxBaseAmt END, + CASE WHEN ot.IsTaxIncluded='Y' THEN NULL ELSE ot.TaxAmt END, + null, null, + null,null,null,null,null +FROM C_OrderTax ot + INNER JOIN C_Tax t ON (ot.C_Tax_ID=t.C_Tax_ID); + + + diff --git a/db/ddlutils/postgresql/views/C_ORDER_LINETAX_VT.sql b/db/ddlutils/postgresql/views/C_ORDER_LINETAX_VT.sql new file mode 100644 index 0000000000..90ec75cede --- /dev/null +++ b/db/ddlutils/postgresql/views/C_ORDER_LINETAX_VT.sql @@ -0,0 +1,110 @@ +CREATE OR REPLACE VIEW C_ORDER_LINETAX_VT +(AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, + UPDATED, UPDATEDBY, AD_LANGUAGE, C_ORDER_ID, C_ORDERLINE_ID, + C_TAX_ID, TAXINDICATOR, C_BPARTNER_ID, C_BPARTNER_LOCATION_ID, BPNAME, + C_LOCATION_ID, LINE, M_PRODUCT_ID,VendorProductNo, QTYORDERED, QTYENTERED, + UOMSYMBOL, NAME, DESCRIPTION, DOCUMENTNOTE, UPC, + SKU, PRODUCTVALUE, RESOURCEDESCRIPTION, PRICELIST, PRICEENTEREDLIST, + DISCOUNT, PRICEACTUAL, PRICEENTERED, LINENETAMT, PRODUCTDESCRIPTION, + IMAGEURL, C_CAMPAIGN_ID, C_PROJECT_ID, C_ACTIVITY_ID, C_PROJECTPHASE_ID, + C_PROJECTTASK_ID) +AS +SELECT ol.AD_Client_ID, ol.AD_Org_ID, ol.IsActive, ol.Created, ol.CreatedBy, ol.Updated, ol.UpdatedBy, + uom.AD_Language, + ol.C_Order_ID, ol.C_OrderLine_ID, ol.C_Tax_ID, t.TaxIndicator, + ol.C_BPartner_ID, ol.C_BPartner_Location_ID, bp.Name AS BPName, bpl.C_Location_ID, + ol.Line, p.M_Product_ID,po.VendorProductNo, + CASE WHEN ol.QtyOrdered<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.QtyOrdered END AS QtyOrdered, + CASE WHEN ol.QtyEntered<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.QtyEntered END AS QtyEntered, + CASE WHEN ol.QtyEntered<>0 OR ol.M_Product_ID IS NOT NULL THEN uom.UOMSymbol END AS UOMSymbol, + COALESCE(pt.Name, c.Name,p.Name||productAttribute(ol.M_AttributeSetInstance_ID), ol.Description) AS Name, -- main line + CASE WHEN COALESCE(c.Name,pt.Name, p.Name) IS NOT NULL THEN ol.Description END AS Description, -- second line + COALESCE(pt.DocumentNote, p.DocumentNote) AS DocumentNote, -- third line + p.UPC, p.SKU, COALESCE(pp.VendorProductNo,p.Value) AS ProductValue, + ra.Description AS ResourceDescription, -- forth line + CASE WHEN i.IsDiscountPrinted='Y' AND ol.PriceList<>0 + THEN ol.PriceList END AS PriceList, + CASE WHEN i.IsDiscountPrinted='Y' AND ol.PriceList<>0 AND ol.QtyEntered<>0 + THEN ol.PriceList*ol.QtyOrdered/ol.QtyEntered END AS PriceEnteredList, + CASE WHEN i.IsDiscountPrinted='Y' AND ol.PriceList>ol.PriceActual AND ol.PriceList<>0 + THEN (ol.PriceList-ol.PriceActual)/ol.PriceList*100 END AS Discount, + CASE WHEN ol.PriceActual<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.PriceActual END AS PriceActual, + CASE WHEN ol.PriceEntered<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.PriceEntered END AS PriceEntered, + CASE WHEN ol.LineNetAmt<>0 OR ol.M_Product_ID IS NOT NULL THEN ol.LineNetAmt END AS LineNetAmt, + pt.Description as ProductDescription, p.ImageURL, + ol.C_Campaign_ID, ol.C_Project_ID, ol.C_Activity_ID, ol.C_ProjectPhase_ID, ol.C_ProjectTask_ID +FROM C_OrderLine ol + INNER JOIN C_UOM_Trl uom ON (ol.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN C_Order i ON (ol.C_Order_ID=i.C_Order_ID) + LEFT OUTER JOIN M_Product p ON (ol.M_Product_ID=p.M_Product_ID) + LEFT OUTER JOIN M_Product_PO po ON (p.M_Product_ID=po.M_Product_ID) + LEFT OUTER JOIN M_Product_Trl pt ON (ol.M_Product_ID=pt.M_Product_ID AND uom.AD_Language=pt.AD_Language) + LEFT OUTER JOIN S_ResourceAssignment ra ON (ol.S_ResourceAssignment_ID=ra.S_ResourceAssignment_ID) + LEFT OUTER JOIN C_Charge c ON (ol.C_Charge_ID=c.C_Charge_ID) + LEFT OUTER JOIN C_BPartner_Product pp ON (ol.M_Product_ID=pp.M_Product_ID AND i.C_BPartner_ID=pp.C_BPartner_ID) + INNER JOIN C_BPartner bp ON (ol.C_BPartner_ID=bp.C_BPartner_ID) + INNER JOIN C_BPartner_Location bpl ON (ol.C_BPartner_Location_ID=bpl.C_BPartner_Location_ID) + LEFT OUTER JOIN C_Tax_Trl t ON (ol.C_Tax_ID=t.C_Tax_ID AND uom.AD_Language=t.AD_Language) +UNION +SELECT ol.AD_Client_ID, ol.AD_Org_ID, ol.IsActive, ol.Created, ol.CreatedBy, ol.Updated, ol.UpdatedBy, + uom.AD_Language, + ol.C_Order_ID, ol.C_OrderLine_ID, ol.C_Tax_ID, null, + null, null, null, null, + ol.Line+(bl.Line/100) AS Line, p.M_Product_ID,po.VendorProductNo, + --ol.QtyOrdered*b.BOMQty AS QtyInvoiced, + CASE WHEN bl.IsQtyPercentage = 'N' THEN ol.QtyOrdered*bl.QtyBOM ELSE ol.QtyOrdered*(bl.QtyBatch / 100) END AS QtyInvoiced, + --ol.QtyEntered*b.BOMQty AS QtyEntered, + CASE WHEN bl.IsQtyPercentage = 'N' THEN ol.QtyEntered*bl.QtyBOM ELSE ol.QtyEntered*(bl.QtyBatch / 100) END AS QtyEntered, + uom.UOMSymbol, + COALESCE(pt.Name, p.Name) AS Name, -- main + b.Description, + COALESCE(pt.DocumentNote, p.DocumentNote) AS DocumentNote, p.UPC, p.SKU, p.Value AS ProductValue, + null, null, null, null, null, null, null, pt.Description AS ProductDescription, p.ImageURL, + ol.C_Campaign_ID, ol.C_Project_ID, ol.C_Activity_ID, ol.C_ProjectPhase_ID, ol.C_ProjectTask_ID +/*FROM M_Product_BOM b -- BOM lines + INNER JOIN C_OrderLine ol ON (b.M_Product_ID=ol.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=ol.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsInvoicePrintDetails='Y') + INNER JOIN M_Product p ON (b.M_ProductBOM_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM_Trl uom ON (p.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN M_Product_Trl pt ON (b.M_ProductBOM_ID=pt.M_Product_ID AND uom.AD_Language=pt.AD_Language)*/ +FROM PP_Product_BOM b + INNER JOIN C_OrderLine ol ON (b.M_Product_ID=ol.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=ol.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsInvoicePrintDetails='Y') + INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) + INNER JOIN M_Product p ON (p.M_Product_ID=bl.M_Product_ID) -- BOM line product + LEFT OUTER JOIN M_Product_PO po ON (p.M_Product_ID=po.M_Product_ID) + INNER JOIN C_UOM_Trl uom ON (p.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN M_Product_Trl pt ON (pt.M_Product_ID=bl.M_Product_ID AND uom.AD_Language=pt.AD_Language) +UNION +SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, + l.AD_Language, o.C_Order_ID, null, null, null, + null, + null, null, null, + null, null, null, null, + null, null,null, + null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null,null,null,null,null +FROM C_Order o, AD_Language l +WHERE l.IsBaseLanguage='N' AND l.IsSystemLanguage='Y' +UNION +SELECT ot.AD_Client_ID, ot.AD_Org_ID, ot.IsActive, ot.Created, ot.CreatedBy, ot.Updated, ot.UpdatedBy, + t.AD_Language, ot.C_Order_ID, null, ot.C_Tax_ID, t.TaxIndicator, + null, null, null, null, + null, null,null, + null, null, null, + t.Name, + null, null, null, null, null, null, + null, null, null, + CASE WHEN ot.IsTaxIncluded='Y' THEN ot.TaxAmt ELSE ot.TaxBaseAmt END, + CASE WHEN ot.IsTaxIncluded='Y' THEN ot.TaxAmt ELSE ot.TaxBaseAmt END, + CASE WHEN ot.IsTaxIncluded='Y' THEN NULL ELSE ot.TaxAmt END, + null, null, + null,null,null,null,null +FROM C_OrderTax ot + INNER JOIN C_Tax_Trl t ON (ot.C_Tax_ID=t.C_Tax_ID); + + + diff --git a/db/ddlutils/postgresql/views/M_INOUT_LINE_V.sql b/db/ddlutils/postgresql/views/M_INOUT_LINE_V.sql new file mode 100644 index 0000000000..ef95df6924 --- /dev/null +++ b/db/ddlutils/postgresql/views/M_INOUT_LINE_V.sql @@ -0,0 +1,75 @@ +CREATE OR REPLACE VIEW M_INOUT_LINE_V +(AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, + UPDATED, UPDATEDBY, AD_LANGUAGE, M_INOUT_ID, M_INOUTLINE_ID, + LINE, M_PRODUCT_ID, MOVEMENTQTY, QTYENTERED, UOMSYMBOL, + QTYORDERED, QTYDELIVERED, QTYBACKORDERED, NAME, DESCRIPTION, + DOCUMENTNOTE, UPC, SKU, PRODUCTVALUE, M_LOCATOR_ID, + M_WAREHOUSE_ID, X, Y, Z, M_ATTRIBUTESETINSTANCE_ID, + M_ATTRIBUTESET_ID, SERNO, LOT, M_LOT_ID, GUARANTEEDATE, + PRODUCTDESCRIPTION, IMAGEURL, C_CAMPAIGN_ID, C_PROJECT_ID, C_ACTIVITY_ID, + C_PROJECTPHASE_ID, C_PROJECTTASK_ID) +AS +SELECT iol.AD_Client_ID, iol.AD_Org_ID, iol.IsActive, iol.Created, iol.CreatedBy, iol.Updated, iol.UpdatedBy, + 'en_US' AS AD_Language, + iol.M_InOut_ID, iol.M_InOutLine_ID, + iol.Line, p.M_Product_ID, + CASE WHEN iol.MovementQty<>0 OR iol.M_Product_ID IS NOT NULL THEN iol.MovementQty END AS MovementQty, + CASE WHEN iol.QtyEntered<>0 OR iol.M_Product_ID IS NOT NULL THEN iol.QtyEntered END AS QtyEntered, + CASE WHEN iol.MovementQty<>0 OR iol.M_Product_ID IS NOT NULL THEN uom.UOMSymbol END AS UOMSymbol, + ol.QtyOrdered, ol.QtyDelivered, + CASE WHEN iol.MovementQty<>0 OR iol.M_Product_ID IS NOT NULL THEN ol.QtyOrdered-ol.QtyDelivered END AS QtyBackOrdered, + COALESCE(p.Name||productAttribute(iol.M_AttributeSetInstance_ID), c.Name, iol.Description) AS Name, -- main line + CASE WHEN COALESCE(c.Name,p.Name) IS NOT NULL THEN iol.Description END AS Description, -- second line + p.DocumentNote, -- third line + p.UPC, p.SKU, p.Value AS ProductValue, + iol.M_Locator_ID, l.M_Warehouse_ID, l.X, l.Y, l.Z, + iol.M_AttributeSetInstance_ID, asi.M_AttributeSet_ID, asi.SerNo, asi.Lot, asi.M_Lot_ID,asi.GuaranteeDate, + p.Description AS ProductDescription, p.ImageURL, + iol.C_Campaign_ID, iol.C_Project_ID, iol.C_Activity_ID, iol.C_ProjectPhase_ID, iol.C_ProjectTask_ID +FROM M_InOutLine iol + INNER JOIN C_UOM uom ON (iol.C_UOM_ID=uom.C_UOM_ID) + LEFT OUTER JOIN M_Product p ON (iol.M_Product_ID=p.M_Product_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (iol.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) + LEFT OUTER JOIN M_Locator l ON (iol.M_Locator_ID=l.M_Locator_ID) + LEFT OUTER JOIN C_OrderLine ol ON (iol.C_OrderLine_ID=ol.C_OrderLine_ID) + LEFT OUTER JOIN C_Charge c ON (iol.C_Charge_ID=c.C_Charge_ID) +UNION -- BOM lines +SELECT iol.AD_Client_ID, iol.AD_Org_ID, iol.IsActive, iol.Created, iol.CreatedBy, iol.Updated, iol.UpdatedBy, + 'en_US' AS AD_Language, + iol.M_InOut_ID, iol.M_InOutLine_ID, + iol.Line+(bl.Line/100) AS Line, p.M_Product_ID, + --iol.MovementQty*b.BOMQty AS QtyInvoiced, + CASE WHEN bl.IsQtyPercentage = 'N' THEN iol.MovementQty*bl.QtyBOM ELSE iol.MovementQty*(bl.QtyBatch / 100) END AS QtyInvoiced, + --iol.QtyEntered*b.BOMQty AS QtyEntered, + CASE WHEN bl.IsQtyPercentage = 'N' THEN iol.QtyEntered*bl.QtyBOM ELSE iol.QtyEntered*(bl.QtyBatch / 100) END AS QtyEntered, + uom.UOMSymbol, + null, null, null, + p.Name, -- main line + b.Description, -- second line + p.DocumentNote, -- third line + p.UPC, p.SKU, p.Value AS ProductValue, + iol.M_Locator_ID, l.M_Warehouse_ID, l.X, l.Y, l.Z, + iol.M_AttributeSetInstance_ID, asi.M_AttributeSet_ID, asi.SerNo, asi.Lot, asi.M_Lot_ID,asi.GuaranteeDate, + p.Description AS ProductDescription, p.ImageURL, + iol.C_Campaign_ID, iol.C_Project_ID, iol.C_Activity_ID, iol.C_ProjectPhase_ID, iol.C_ProjectTask_ID +/*FROM M_Product_BOM b -- BOM lines + INNER JOIN M_InOutLine iol ON (b.M_Product_ID=iol.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=iol.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsPickListPrintDetails='Y') + INNER JOIN M_Product p ON (b.M_ProductBOM_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM uom ON (p.C_UOM_ID=uom.C_UOM_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (iol.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) + LEFT OUTER JOIN M_Locator l ON (iol.M_Locator_ID=l.M_Locator_ID); +*/ +FROM PP_Product_BOM b -- BOM lines + INNER JOIN M_InOutLine iol ON (b.M_Product_ID=iol.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=iol.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsPickListPrintDetails='Y') + INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) + INNER JOIN M_Product p ON (bl.M_Product_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM uom ON (p.C_UOM_ID=uom.C_UOM_ID) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (iol.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) + LEFT OUTER JOIN M_Locator l ON (iol.M_Locator_ID=l.M_Locator_ID); + + + diff --git a/db/ddlutils/postgresql/views/M_INOUT_LINE_VT.sql b/db/ddlutils/postgresql/views/M_INOUT_LINE_VT.sql new file mode 100644 index 0000000000..9239325a81 --- /dev/null +++ b/db/ddlutils/postgresql/views/M_INOUT_LINE_VT.sql @@ -0,0 +1,77 @@ +CREATE OR REPLACE VIEW M_INOUT_LINE_VT +(AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, + UPDATED, UPDATEDBY, AD_LANGUAGE, M_INOUT_ID, M_INOUTLINE_ID, + LINE, M_PRODUCT_ID, MOVEMENTQTY, QTYENTERED, UOMSYMBOL, + QTYORDERED, QTYDELIVERED, QTYBACKORDERED, NAME, DESCRIPTION, + DOCUMENTNOTE, UPC, SKU, PRODUCTVALUE, M_LOCATOR_ID, + M_WAREHOUSE_ID, X, Y, Z, M_ATTRIBUTESETINSTANCE_ID, + M_ATTRIBUTESET_ID, SERNO, LOT, M_LOT_ID, GUARANTEEDATE, + PRODUCTDESCRIPTION, IMAGEURL, C_CAMPAIGN_ID, C_PROJECT_ID, C_ACTIVITY_ID, + C_PROJECTPHASE_ID, C_PROJECTTASK_ID) +AS +SELECT iol.AD_Client_ID, iol.AD_Org_ID, iol.IsActive, iol.Created, iol.CreatedBy, iol.Updated, iol.UpdatedBy, + uom.AD_Language, + iol.M_InOut_ID, iol.M_InOutLine_ID, + iol.Line, p.M_Product_ID, + CASE WHEN iol.MovementQty<>0 OR iol.M_Product_ID IS NOT NULL THEN iol.MovementQty END AS MovementQty, + CASE WHEN iol.QtyEntered<>0 OR iol.M_Product_ID IS NOT NULL THEN iol.QtyEntered END AS QtyEntered, + CASE WHEN iol.MovementQty<>0 OR iol.M_Product_ID IS NOT NULL THEN uom.UOMSymbol END AS UOMSymbol, + ol.QtyOrdered, ol.QtyDelivered, + CASE WHEN iol.MovementQty<>0 OR iol.M_Product_ID IS NOT NULL THEN ol.QtyOrdered-ol.QtyDelivered END AS QtyBackOrdered, + COALESCE(COALESCE(pt.Name,p.Name)||productAttribute(iol.M_AttributeSetInstance_ID), c.Name, iol.Description) AS Name, -- main line + CASE WHEN COALESCE(pt.Name,p.Name,c.Name) IS NOT NULL THEN iol.Description END AS Description, -- second line + COALESCE(pt.DocumentNote, p.DocumentNote) AS DocumentNote, -- third line + p.UPC, p.SKU, p.Value AS ProductValue, + iol.M_Locator_ID, l.M_Warehouse_ID, l.X, l.Y, l.Z, + iol.M_AttributeSetInstance_ID, asi.M_AttributeSet_ID, asi.SerNo, asi.Lot, asi.M_Lot_ID,asi.GuaranteeDate, + pt.Description AS ProductDescription, p.ImageURL, + iol.C_Campaign_ID, iol.C_Project_ID, iol.C_Activity_ID, iol.C_ProjectPhase_ID, iol.C_ProjectTask_ID +FROM M_InOutLine iol + INNER JOIN C_UOM_Trl uom ON (iol.C_UOM_ID=uom.C_UOM_ID) + LEFT OUTER JOIN M_Product p ON (iol.M_Product_ID=p.M_Product_ID) + LEFT OUTER JOIN M_Product_Trl pt ON (iol.M_Product_ID=pt.M_Product_ID AND uom.AD_Language=pt.AD_Language) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (iol.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) + LEFT OUTER JOIN M_Locator l ON (iol.M_Locator_ID=l.M_Locator_ID) + LEFT OUTER JOIN C_OrderLine ol ON (iol.C_OrderLine_ID=ol.C_OrderLine_ID) + LEFT OUTER JOIN C_Charge c ON (iol.C_Charge_ID=c.C_Charge_ID) +UNION +SELECT iol.AD_Client_ID, iol.AD_Org_ID, iol.IsActive, iol.Created, iol.CreatedBy, iol.Updated, iol.UpdatedBy, + uom.AD_Language, + iol.M_InOut_ID, iol.M_InOutLine_ID, + iol.Line+(bl.Line/100) AS Line, p.M_Product_ID, + --iol.MovementQty*b.BOMQty AS QtyInvoiced, + CASE WHEN bl.IsQtyPercentage = 'N' THEN iol.MovementQty*bl.QtyBOM ELSE iol.MovementQty*(bl.QtyBatch / 100) END AS QtyInvoiced, + --iol.QtyEntered*b.BOMQty AS QtyEntered, + CASE WHEN bl.IsQtyPercentage = 'N' THEN iol.QtyEntered*bl.QtyBOM ELSE iol.QtyEntered*(bl.QtyBatch / 100) END AS QtyEntered, + uom.UOMSymbol, + null, null, null, + COALESCE (pt.Name, p.Name) AS Name, -- main line + b.Description, -- second line + COALESCE (pt.DocumentNote, p.DocumentNote) AS DocumentNote, -- third line + p.UPC, p.SKU, p.Value AS ProductValue, + iol.M_Locator_ID, l.M_Warehouse_ID, l.X, l.Y, l.Z, + iol.M_AttributeSetInstance_ID, asi.M_AttributeSet_ID, asi.SerNo, asi.Lot, asi.M_Lot_ID,asi.GuaranteeDate, + pt.Description AS ProductDescription, p.ImageURL, + iol.C_Campaign_ID, iol.C_Project_ID, iol.C_Activity_ID, iol.C_ProjectPhase_ID, iol.C_ProjectTask_ID +/*FROM M_Product_BOM b -- BOM lines + INNER JOIN M_InOutLine iol ON (b.M_Product_ID=iol.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=iol.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsPickListPrintDetails='Y') + INNER JOIN M_Product p ON (b.M_ProductBOM_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM_Trl uom ON (p.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN M_Product_Trl pt ON (iol.M_Product_ID=pt.M_Product_ID AND uom.AD_Language=pt.AD_Language) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (iol.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) + LEFT OUTER JOIN M_Locator l ON (iol.M_Locator_ID=l.M_Locator_ID);*/ +FROM PP_Product_BOM b -- BOM lines + INNER JOIN M_InOutLine iol ON (b.M_Product_ID=iol.M_Product_ID) + INNER JOIN M_Product bp ON (bp.M_Product_ID=iol.M_Product_ID -- BOM Product + AND bp.IsBOM='Y' AND bp.IsVerified='Y' AND bp.IsPickListPrintDetails='Y') + INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) + INNER JOIN M_Product p ON (bl.M_Product_ID=p.M_Product_ID) -- BOM line product + INNER JOIN C_UOM_Trl uom ON (p.C_UOM_ID=uom.C_UOM_ID) + INNER JOIN M_Product_Trl pt ON (iol.M_Product_ID=pt.M_Product_ID AND uom.AD_Language=pt.AD_Language) + LEFT OUTER JOIN M_AttributeSetInstance asi ON (iol.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) + LEFT OUTER JOIN M_Locator l ON (iol.M_Locator_ID=l.M_Locator_ID); + + + diff --git a/db/ddlutils/postgresql/views/RV_M_TRANSACTION.sql b/db/ddlutils/postgresql/views/RV_M_TRANSACTION.sql new file mode 100644 index 0000000000..6bfbbbc5e4 --- /dev/null +++ b/db/ddlutils/postgresql/views/RV_M_TRANSACTION.sql @@ -0,0 +1,17 @@ +CREATE OR REPLACE VIEW RV_M_TRANSACTION +(AD_CLIENT_ID, AD_ORG_ID, MOVEMENTDATE, MOVEMENTQTY, M_PRODUCT_ID, + M_LOCATOR_ID, M_ATTRIBUTESETINSTANCE_ID, M_PRODUCT_CATEGORY_ID, VALUE, C_BPARTNER_ID, + PRICEPO, PRICELASTPO, PRICELIST) +AS +SELECT t.AD_Client_ID,t.AD_Org_ID, t.MovementDate, t.MovementQty, + t.M_Product_ID, t.M_Locator_ID, t.M_AttributeSetInstance_ID, + p.M_Product_Category_ID, p.Value, + --po.C_BPartner_ID, po.PricePO, po.PriceLastPO, po.PriceList +FROM M_Transaction t + INNER JOIN M_Product p ON (t.M_Product_ID=p.M_Product_ID) + --INNER JOIN M_Product_PO po ON (t.M_Product_ID=po.M_Product_ID) + LEFT JOIN M_CostDetail cd (M_) +WHERE po.IsCurrentVendor='Y'; + + + diff --git a/db/ddlutils/postgresql/views/RV_OPENITEM.sql b/db/ddlutils/postgresql/views/RV_OPENITEM.sql new file mode 100644 index 0000000000..395d897919 --- /dev/null +++ b/db/ddlutils/postgresql/views/RV_OPENITEM.sql @@ -0,0 +1,56 @@ +CREATE OR REPLACE VIEW RV_OPENITEM +(AD_ORG_ID, AD_CLIENT_ID, DOCUMENTNO, C_INVOICE_ID, C_ORDER_ID, + C_BPARTNER_ID, ISSOTRX, DATEINVOICED, DATEACCT, NETDAYS, + DUEDATE, DAYSDUE, DISCOUNTDATE, DISCOUNTAMT, GRANDTOTAL, + PAIDAMT, OPENAMT, + C_CURRENCY_ID, C_CONVERSIONTYPE_ID, C_PAYMENTTERM_ID, + ISPAYSCHEDULEVALID, C_INVOICEPAYSCHEDULE_ID, INVOICECOLLECTIONTYPE, C_CAMPAIGN_ID, C_PROJECT_ID, + C_ACTIVITY_ID) +AS +SELECT i.AD_Org_ID, i.AD_Client_ID, + i.DocumentNo, i.C_Invoice_ID, i.C_Order_ID, i.C_BPartner_ID, i.IsSOTrx, + i.DateInvoiced, i.DateAcct, + p.NetDays, + paymentTermDueDate(i.C_PaymentTerm_ID, i.DateInvoiced) AS DueDate, + paymentTermDueDays(i.C_PaymentTerm_ID, i.DateInvoiced, getdate()) AS DaysDue, + addDays(i.DateInvoiced,p.DiscountDays) AS DiscountDate, + ROUND(i.GrandTotal*p.Discount/100,2) AS DiscountAmt, + i.GrandTotal, + invoicePaid(i.C_Invoice_ID, i.C_Currency_ID, 1) AS PaidAmt, + invoiceOpen(i.C_Invoice_ID,0) AS OpenAmt, + i.C_Currency_ID, i.C_ConversionType_ID, + i.C_PaymentTerm_ID, + i.IsPayScheduleValid, cast(null as numeric) AS C_InvoicePaySchedule_ID, i.InvoiceCollectionType, + i.C_Campaign_ID, i.C_Project_ID, i.C_Activity_ID +FROM RV_C_Invoice i + INNER JOIN C_PaymentTerm p ON (i.C_PaymentTerm_ID=p.C_PaymentTerm_ID) +WHERE -- i.IsPaid='N' + invoiceOpen(i.C_Invoice_ID,0) <> 0 AND + i.IsPayScheduleValid<>'Y' + AND i.DocStatus<>'DR' +UNION +SELECT i.AD_Org_ID, i.AD_Client_ID, + i.DocumentNo, i.C_Invoice_ID, i.C_Order_ID, i.C_BPartner_ID, i.IsSOTrx, + i.DateInvoiced, i.DateAcct, + daysBetween(ips.DueDate,i.DateInvoiced) AS NetDays, + ips.DueDate, + daysBetween(getdate(),ips.DueDate) AS DaysDue, + ips.DiscountDate, + ips.DiscountAmt, + ips.DueAmt AS GrandTotal, + invoicePaid(i.C_Invoice_ID, i.C_Currency_ID, 1) AS PaidAmt, + invoiceOpen(i.C_Invoice_ID, ips.C_InvoicePaySchedule_ID) AS OpenAmt, + i.C_Currency_ID, i.C_ConversionType_ID, + i.C_PaymentTerm_ID, + i.IsPayScheduleValid, ips.C_InvoicePaySchedule_ID, i.InvoiceCollectionType, + i.C_Campaign_ID, i.C_Project_ID, i.C_Activity_ID +FROM RV_C_Invoice i + INNER JOIN C_InvoicePaySchedule ips ON (i.C_Invoice_ID=ips.C_Invoice_ID) +WHERE -- i.IsPaid='N' + invoiceOpen(i.C_Invoice_ID,ips.C_InvoicePaySchedule_ID) <> 0 AND + i.IsPayScheduleValid='Y' + AND i.DocStatus<>'DR' + AND ips.IsValid='Y'; + + + diff --git a/launch/Adempiere.xml b/launch/Adempiere.xml index 32219ed52a..6319f0b385 100644 --- a/launch/Adempiere.xml +++ b/launch/Adempiere.xml @@ -29,12 +29,12 @@ 512 - 3.4.0.0 - Release 3.4.0s - Adempiere ERP & CRM 3.4.0s + 3.5.1.0 + Release 3.5.1a + Adempiere ERP & CRM 3.5.1a Adempiere - 3.4.0.0 - Release 3.4.0s + 3.5.1.0 + Release 3.5.1a Adempier ERP & CRM Adempiere Bazaar Adempiere diff --git a/migration/340s-trunk/169_fix_wrong_reference.sql b/migration/340s-trunk/169_fix_wrong_reference.sql new file mode 100644 index 0000000000..8f2cdd48ef --- /dev/null +++ b/migration/340s-trunk/169_fix_wrong_reference.sql @@ -0,0 +1,2 @@ +UPDATE AD_COLUMN SET ad_reference_id = 29 WHERE ad_column_id = 54301 +; \ No newline at end of file diff --git a/migration/340s-trunk/170_version351a.sql b/migration/340s-trunk/170_version351a.sql new file mode 100644 index 0000000000..ad57e981ea --- /dev/null +++ b/migration/340s-trunk/170_version351a.sql @@ -0,0 +1,6 @@ +UPDATE AD_SYSTEM + SET releaseno = '351a', + VERSION = '2008-05-29' + WHERE ad_system_id = 0 AND ad_client_id = 0; + +COMMIT ; diff --git a/migration/340s-trunk/postgresql/169_fix_wrong_reference.sql b/migration/340s-trunk/postgresql/169_fix_wrong_reference.sql new file mode 100644 index 0000000000..8f2cdd48ef --- /dev/null +++ b/migration/340s-trunk/postgresql/169_fix_wrong_reference.sql @@ -0,0 +1,2 @@ +UPDATE AD_COLUMN SET ad_reference_id = 29 WHERE ad_column_id = 54301 +; \ No newline at end of file diff --git a/migration/340s-trunk/postgresql/170_version351a.sql b/migration/340s-trunk/postgresql/170_version351a.sql new file mode 100644 index 0000000000..ad57e981ea --- /dev/null +++ b/migration/340s-trunk/postgresql/170_version351a.sql @@ -0,0 +1,6 @@ +UPDATE AD_SYSTEM + SET releaseno = '351a', + VERSION = '2008-05-29' + WHERE ad_system_id = 0 AND ad_client_id = 0; + +COMMIT ; diff --git a/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java b/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java new file mode 100644 index 0000000000..4347d099d5 --- /dev/null +++ b/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java @@ -0,0 +1,391 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.server; + +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.ldap.*; +import org.compiere.model.*; +import org.compiere.util.*; +import org.compiere.wf.*; +import org.eevolution.model.*; + +/** + * Adempiere Server Base + * + * @author Jorg Janke + * @version $Id: AdempiereServer.java,v 1.3 2006/10/09 00:23:26 jjanke Exp $ + */ +public abstract class AdempiereServer extends Thread +{ + /** + * Create New Server Thead + * @param model model + * @return server tread or null + */ + public static AdempiereServer create (AdempiereProcessor model) + { + if (model instanceof MRequestProcessor) + return new RequestProcessor ((MRequestProcessor)model); + if (model instanceof MWorkflowProcessor) + return new WorkflowProcessor ((MWorkflowProcessor)model); + if (model instanceof MAcctProcessor) + return new AcctProcessor ((MAcctProcessor)model); + if (model instanceof MAlertProcessor) + return new AlertProcessor ((MAlertProcessor)model); + if (model instanceof MScheduler) + return new Scheduler ((MScheduler)model); + if (model instanceof MLdapProcessor) + return new LdapProcessor((MLdapProcessor)model); + if (model instanceof MIMPProcessor) // @Trifon + return new ReplicationProcessor((MIMPProcessor)model); + // + throw new IllegalArgumentException("Unknown Processor"); + } // create + + + /************************************************************************** + * Server Base Class + * @param model model + * @param initialNap delay time running in sec + */ + protected AdempiereServer (AdempiereProcessor model, int initialNap) + { + super (AdempiereServerGroup.get(), null, model.getName(), 0); + p_model = model; + m_ctx = new Properties(model.getCtx()); + if (p_system == null) + p_system = MSystem.get(m_ctx); + p_client = MClient.get(m_ctx); + Env.setContext(m_ctx, "#AD_Client_ID", p_client.getAD_Client_ID()); + m_initialNap = initialNap; + // log.info(model.getName() + " - " + getThreadGroup()); + } // ServerBase + + /** The Processor Model */ + protected AdempiereProcessor p_model; + /** Initial nap is seconds */ + private int m_initialNap = 0; + + /** Miliseconds to sleep - 10 Min default */ + private long m_sleepMS = 600000; + /** Sleeping */ + private volatile boolean m_sleeping = false; + /** Server start time */ + private long m_start = 0; + /** Number of Work executions */ + protected int p_runCount = 0; + /** Tine start of work */ + protected long p_startWork = 0; + /** Number MS of last Run */ + private long m_runLastMS = 0; + /** Number of MS total */ + private long m_runTotalMS = 0; + /** When to run next */ + private long m_nextWork = 0; + + /** Logger */ + protected CLogger log = CLogger.getCLogger(getClass()); + /** Context */ + private Properties m_ctx = null; + /** System */ + protected static MSystem p_system = null; + /** Client */ + protected MClient p_client = null; + + /** + * Get Server Context + * @return context + */ + public Properties getCtx() + { + return m_ctx; + } // getCtx + + /** + * @return Returns the sleepMS. + */ + public long getSleepMS () + { + return m_sleepMS; + } // getSleepMS + + + /** + * Sleep for set time + * @return true if not interrupted + */ + public boolean sleep() + { + if (isInterrupted()) + { + log.info (getName() + ": interrupted"); + return false; + } + log.fine(getName() + ": sleeping " + TimeUtil.formatElapsed(m_sleepMS)); + m_sleeping = true; + try + { + sleep (m_sleepMS); + } + catch (InterruptedException e) + { + log.info (getName() + ": interrupted"); + m_sleeping = false; + return false; + } + m_sleeping = false; + return true; + } // sleep + + /** + * Run Now + */ + public void runNow() + { + log.info(getName()); + p_startWork = System.currentTimeMillis(); + doWork(); + long now = System.currentTimeMillis(); + // --------------- + + p_runCount++; + m_runLastMS = now - p_startWork; + m_runTotalMS += m_runLastMS; + // + p_model.setDateLastRun(new Timestamp(now)); + p_model.save(); + // + log.fine(getName() + ": " + getStatistics()); + } // runNow + + /************************************************************************** + * Run async + */ + public void run () + { + try + { + log.fine(getName() + ": pre-nap - " + m_initialNap); + sleep (m_initialNap * 1000); + } + catch (InterruptedException e) + { + log.log(Level.SEVERE, getName() + ": pre-nap interrupted", e); + return; + } + + m_start = System.currentTimeMillis(); + while (true) + { + if (m_nextWork == 0) + { + Timestamp dateNextRun = getDateNextRun(true); + if (dateNextRun != null) + m_nextWork = dateNextRun.getTime(); + } + long now = System.currentTimeMillis(); + if (m_nextWork > now) + { + m_sleepMS = m_nextWork - now; + if (!sleep ()) + break; + } + if (isInterrupted()) + { + log.info (getName() + ": interrupted"); + break; + } + + // --------------- + p_startWork = System.currentTimeMillis(); + doWork(); + now = System.currentTimeMillis(); + // --------------- + + p_runCount++; + m_runLastMS = now - p_startWork; + m_runTotalMS += m_runLastMS; + // + m_sleepMS = calculateSleep(); + m_nextWork = now + m_sleepMS; + // + p_model.setDateLastRun(new Timestamp(now)); + p_model.setDateNextRun(new Timestamp(m_nextWork)); + p_model.save(); + // + log.fine(getName() + ": " + getStatistics()); + if (!sleep()) + break; + } + m_start = 0; + } // run + + /** + * Get Run Statistics + * @return Statistic info + */ + public String getStatistics() + { + return "Run #" + p_runCount + + " - Last=" + TimeUtil.formatElapsed(m_runLastMS) + + " - Total=" + TimeUtil.formatElapsed(m_runTotalMS) + + " - Next " + TimeUtil.formatElapsed(m_nextWork - System.currentTimeMillis()); + } // getStatistics + + /** + * Do the actual Work + */ + protected abstract void doWork(); + + /** + * Get Server Info + * @return info + */ + public abstract String getServerInfo(); + + /** + * Get Unique ID + * @return Unique ID + */ + public String getServerID() + { + return p_model.getServerID(); + } // getServerID + + /** + * Get the date Next run + * @param requery requery database + * @return date next run + */ + public Timestamp getDateNextRun (boolean requery) + { + return p_model.getDateNextRun(requery); + } // getDateNextRun + + /** + * Get the date Last run + * @return date lext run + */ + public Timestamp getDateLastRun () + { + return p_model.getDateLastRun(); + } // getDateLastRun + + /** + * Get Description + * @return Description + */ + public String getDescription() + { + return p_model.getDescription(); + } // getDescription + + /** + * Get Model + * @return Model + */ + public AdempiereProcessor getModel() + { + return p_model; + } // getModel + + /** + * Calculate Sleep ms + * @return miliseconds + */ + private long calculateSleep () + { + String frequencyType = p_model.getFrequencyType(); + int frequency = p_model.getFrequency(); + if (frequency < 1) + frequency = 1; + // + long typeSec = 600; // 10 minutes + if (frequencyType == null) + typeSec = 300; // 5 minutes + else if (X_R_RequestProcessor.FREQUENCYTYPE_Minute.equals(frequencyType)) + typeSec = 60; + else if (X_R_RequestProcessor.FREQUENCYTYPE_Hour.equals(frequencyType)) + typeSec = 3600; + else if (X_R_RequestProcessor.FREQUENCYTYPE_Day.equals(frequencyType)) + typeSec = 86400; + // + return typeSec * 1000 * frequency; // ms + } // calculateSleep + + /** + * Is Sleeping + * @return sleeping + */ + public boolean isSleeping() + { + return m_sleeping; + } // isSleeping + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer (getName()) + .append (",Prio=").append(getPriority()) + .append (",").append (getThreadGroup()) + .append (",Alive=").append(isAlive()) + .append (",Sleeping=").append(m_sleeping) + .append (",Last=").append(getDateLastRun()); + if (m_sleeping) + sb.append (",Next=").append(getDateNextRun(false)); + return sb.toString (); + } // toString + + /** + * Get Seconds Alive + * @return seconds alive + */ + public int getSecondsAlive() + { + if (m_start == 0) + return 0; + long now = System.currentTimeMillis(); + long ms = (now-m_start) / 1000; + return (int)ms; + } // getSecondsAlive + + /** + * Get Start Time + * @return start time + */ + public Timestamp getStartTime() + { + if (m_start == 0) + return null; + return new Timestamp (m_start); + } // getStartTime + + /** + * Get Processor Logs + * @return logs + */ + public AdempiereProcessorLog[] getLogs() + { + return p_model.getLogs(); + } // getLogs + +} // AdempiereServer diff --git a/serverRoot/src/main/server/org/compiere/server/AdempiereServerMgr.java b/serverRoot/src/main/server/org/compiere/server/AdempiereServerMgr.java new file mode 100644 index 0000000000..ef5ade24e0 --- /dev/null +++ b/serverRoot/src/main/server/org/compiere/server/AdempiereServerMgr.java @@ -0,0 +1,545 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.server; + +import java.sql.*; +import java.util.*; +import java.util.logging.*; +import org.compiere.*; +import org.compiere.model.*; +import org.compiere.util.*; +import org.compiere.wf.*; +import org.eevolution.model.*; + +/** + * Adempiere Server Manager + * + * @author Jorg Janke + * @version $Id: AdempiereServerMgr.java,v 1.4 2006/10/09 00:23:26 jjanke Exp $ + */ +public class AdempiereServerMgr +{ + /** + * Get Adempiere Server Manager + * @return mgr + */ + public static AdempiereServerMgr get() + { + if (m_serverMgr == null) + { + // for faster subsequent calls + m_serverMgr = new AdempiereServerMgr(); + m_serverMgr.startServers(); + m_serverMgr.log.info(m_serverMgr.toString()); + } + return m_serverMgr; + } // get + + /** Singleton */ + private static AdempiereServerMgr m_serverMgr = null; + /** Logger */ + protected CLogger log = CLogger.getCLogger(getClass()); + + /************************************************************************** + * Adempiere Server Manager + */ + private AdempiereServerMgr () + { + super(); + startEnvironment(); + // m_serverMgr.startServers(); + } // AdempiereServerMgr + + /** The Servers */ + private ArrayList m_servers = new ArrayList(); + /** Context */ + private Properties m_ctx = Env.getCtx(); + /** Start */ + private Timestamp m_start = new Timestamp(System.currentTimeMillis()); + + /** + * Start Environment + * @return true if started + */ + private boolean startEnvironment() + { + Adempiere.startup(false); + log.info(""); + + // Set Session + MSession session = MSession.get(getCtx(), true); + session.setWebStoreSession(false); + session.setWebSession("Server"); + session.save(); + // + return true; + } // startEnvironment + + /** + * Start Environment + * @return true if started + */ + private boolean startServers() + { + log.info(""); + int noServers = 0; + // Accounting + MAcctProcessor[] acctModels = MAcctProcessor.getActive(m_ctx); + for (int i = 0; i < acctModels.length; i++) + { + MAcctProcessor pModel = acctModels[i]; + AdempiereServer server = AdempiereServer.create(pModel); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-2); + m_servers.add(server); + } + // Request + MRequestProcessor[] requestModels = MRequestProcessor.getActive(m_ctx); + for (int i = 0; i < requestModels.length; i++) + { + MRequestProcessor pModel = requestModels[i]; + AdempiereServer server = AdempiereServer.create(pModel); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-2); + m_servers.add(server); + } + // Workflow + MWorkflowProcessor[] workflowModels = MWorkflowProcessor.getActive(m_ctx); + for (int i = 0; i < workflowModels.length; i++) + { + MWorkflowProcessor pModel = workflowModels[i]; + AdempiereServer server = AdempiereServer.create(pModel); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-2); + m_servers.add(server); + } + // Alert + MAlertProcessor[] alertModels = MAlertProcessor.getActive(m_ctx); + for (int i = 0; i < alertModels.length; i++) + { + MAlertProcessor pModel = alertModels[i]; + AdempiereServer server = AdempiereServer.create(pModel); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-2); + m_servers.add(server); + } + // Scheduler + MScheduler[] schedulerModels = MScheduler.getActive(m_ctx); + for (int i = 0; i < schedulerModels.length; i++) + { + MScheduler pModel = schedulerModels[i]; + AdempiereServer server = AdempiereServer.create(pModel); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-2); + m_servers.add(server); + } + // LDAP + MLdapProcessor[] ldapModels = MLdapProcessor.getActive(m_ctx); + for (int i = 0; i < ldapModels.length; i++) + { + MLdapProcessor lp = ldapModels[i]; + AdempiereServer server = AdempiereServer.create(lp); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-1); + m_servers.add(server); + } + // ImportProcessor - @Trifon + MIMPProcessor[] importModels = MIMPProcessor.getActive(m_ctx); + for (int i = 0; i < importModels.length; i++) + { + MIMPProcessor lp = importModels[i]; + AdempiereServer server = AdempiereServer.create(lp); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-1); + m_servers.add(server); + } + + log.fine("#" + noServers); + return startAll(); + } // startEnvironment + + /** + * Get Server Context + * @return ctx + */ + public Properties getCtx() + { + return m_ctx; + } // getCtx + + /** + * Start all servers + * @return true if started + */ + public boolean startAll() + { + log.info (""); + AdempiereServer[] servers = getInActive(); + for (int i = 0; i < servers.length; i++) + { + AdempiereServer server = servers[i]; + try + { + if (server.isAlive()) + continue; + // Wait until dead + if (server.isInterrupted()) + { + int maxWait = 10; // 10 iterations = 1 sec + while (server.isAlive()) + { + if (maxWait-- == 0) + { + log.severe ("Wait timeout for interruped " + server); + break; + } + try + { + Thread.sleep(100); // 1/10 sec + } + catch (InterruptedException e) + { + log.log(Level.SEVERE, "While sleeping", e); + } + } + } + // Do start + if (!server.isAlive()) + { + // replace + server = AdempiereServer.create (server.getModel()); + if (server == null) + m_servers.remove(i); + else + m_servers.set(i, server); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-2); + } + } + catch (Exception e) + { + log.log(Level.SEVERE, "Server: " + server, e); + } + } // for all servers + + // Final Check + int noRunning = 0; + int noStopped = 0; + for (int i = 0; i < servers.length; i++) + { + AdempiereServer server = servers[i]; + try + { + if (server.isAlive()) + { + log.info("Alive: " + server); + noRunning++; + } + else + { + log.warning("Dead: " + server); + noStopped++; + } + } + catch (Exception e) + { + log.log(Level.SEVERE, "(checking) - " + server, e); + noStopped++; + } + } + log.fine("Running=" + noRunning + ", Stopped=" + noStopped); + AdempiereServerGroup.get().dump(); + return noStopped == 0; + } // startAll + + /** + * Start Server if not started yet + * @param serverID server ID + * @return true if started + */ + public boolean start (String serverID) + { + AdempiereServer server = getServer(serverID); + if (server == null) + return false; + if (server.isAlive()) + return true; + + try + { + // replace + int index = m_servers.indexOf(server); + server = AdempiereServer.create (server.getModel()); + if (server == null) + m_servers.remove(index); + else + m_servers.set(index, server); + server.start(); + server.setPriority(Thread.NORM_PRIORITY-2); + Thread.yield(); + } + catch (Exception e) + { + log.log(Level.SEVERE, "Server=" + serverID, e); + return false; + } + log.info(server.toString()); + AdempiereServerGroup.get().dump(); + if (server == null) + return false; + return server.isAlive(); + } // startIt + + /** + * Stop all Servers + * @return true if stopped + */ + public boolean stopAll() + { + log.info (""); + AdempiereServer[] servers = getActive(); + // Interrupt + for (int i = 0; i < servers.length; i++) + { + AdempiereServer server = servers[i]; + try + { + if (server.isAlive() && !server.isInterrupted()) + { + server.setPriority(Thread.MAX_PRIORITY-1); + server.interrupt(); + } + } + catch (Exception e) + { + log.log(Level.SEVERE, "(interrupting) - " + server, e); + } + } // for all servers + Thread.yield(); + + // Wait for death + for (int i = 0; i < servers.length; i++) + { + AdempiereServer server = servers[i]; + try + { + int maxWait = 10; // 10 iterations = 1 sec + while (server.isAlive()) + { + if (maxWait-- == 0) + { + log.severe ("Wait timeout for interruped " + server); + break; + } + Thread.sleep(100); // 1/10 + } + } + catch (Exception e) + { + log.log(Level.SEVERE, "(waiting) - " + server, e); + } + } // for all servers + + // Final Check + int noRunning = 0; + int noStopped = 0; + for (int i = 0; i < servers.length; i++) + { + AdempiereServer server = servers[i]; + try + { + if (server.isAlive()) + { + log.warning ("Alive: " + server); + noRunning++; + } + else + { + log.info ("Stopped: " + server); + noStopped++; + } + } + catch (Exception e) + { + log.log(Level.SEVERE, "(checking) - " + server, e); + noRunning++; + } + } + log.fine("Running=" + noRunning + ", Stopped=" + noStopped); + AdempiereServerGroup.get().dump(); + return noRunning == 0; + } // stopAll + + /** + * Stop Server if not stopped + * @param serverID server ID + * @return true if interrupted + */ + public boolean stop (String serverID) + { + AdempiereServer server = getServer(serverID); + if (server == null) + return false; + if (!server.isAlive()) + return true; + + try + { + server.interrupt(); + Thread.sleep(10); // 1/100 sec + } + catch (Exception e) + { + log.log(Level.SEVERE, "stop", e); + return false; + } + log.info(server.toString()); + AdempiereServerGroup.get().dump(); + return !server.isAlive(); + } // stop + + + /** + * Destroy + */ + public void destroy () + { + log.info (""); + stopAll(); + m_servers.clear(); + } // destroy + + /** + * Get Active Servers + * @return array of active servers + */ + protected AdempiereServer[] getActive() + { + ArrayList list = new ArrayList(); + for (int i = 0; i < m_servers.size(); i++) + { + AdempiereServer server = (AdempiereServer)m_servers.get(i); + if (server != null && server.isAlive() && !server.isInterrupted()) + list.add (server); + } + AdempiereServer[] retValue = new AdempiereServer[list.size ()]; + list.toArray (retValue); + return retValue; + } // getActive + + /** + * Get InActive Servers + * @return array of inactive servers + */ + protected AdempiereServer[] getInActive() + { + ArrayList list = new ArrayList(); + for (int i = 0; i < m_servers.size(); i++) + { + AdempiereServer server = (AdempiereServer)m_servers.get(i); + if (server != null && (!server.isAlive() || !server.isInterrupted())) + list.add (server); + } + AdempiereServer[] retValue = new AdempiereServer[list.size()]; + list.toArray (retValue); + return retValue; + } // getInActive + + /** + * Get all Servers + * @return array of servers + */ + public AdempiereServer[] getAll() + { + AdempiereServer[] retValue = new AdempiereServer[m_servers.size()]; + m_servers.toArray (retValue); + return retValue; + } // getAll + + /** + * Get Server with ID + * @param serverID server id + * @return server or null + */ + public AdempiereServer getServer (String serverID) + { + if (serverID == null) + return null; + for (int i = 0; i < m_servers.size(); i++) + { + AdempiereServer server = (AdempiereServer)m_servers.get(i); + if (serverID.equals(server.getServerID())) + return server; + } + return null; + } // getServer + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("AdempiereServerMgr["); + sb.append("Servers=").append(m_servers.size()) + .append(",ContextSize=").append(m_ctx.size()) + .append(",Started=").append(m_start) + .append ("]"); + return sb.toString (); + } // toString + + /** + * Get Description + * @return description + */ + public String getDescription() + { + return "$Revision: 1.4 $"; + } // getDescription + + /** + * Get Number Servers + * @return no of servers + */ + public String getServerCount() + { + int noRunning = 0; + int noStopped = 0; + for (int i = 0; i < m_servers.size(); i++) + { + AdempiereServer server = (AdempiereServer)m_servers.get(i); + if (server.isAlive()) + noRunning++; + else + noStopped++; + } + String info = String.valueOf(m_servers.size()) + + " - Running=" + noRunning + + " - Stopped=" + noStopped; + return info; + } // getServerCount + + /** + * Get start date + * @return start date + */ + public Timestamp getStartTime() + { + return m_start; + } // getStartTime + +} // AdempiereServerMgr diff --git a/serverRoot/src/web/adempiere.html b/serverRoot/src/web/adempiere.html index 52d6f883a8..97cdce2bfe 100644 --- a/serverRoot/src/web/adempiere.html +++ b/serverRoot/src/web/adempiere.html @@ -96,7 +96,7 @@ End If - Welcome to the Adempiere 3.4.0s Home Page!
    + Welcome to the Adempiere 3.5.1a Home Page!
    diff --git a/serverRoot/src/web/adempiere.jnlp b/serverRoot/src/web/adempiere.jnlp index d77299d02f..e9fbc4b0cd 100644 --- a/serverRoot/src/web/adempiere.jnlp +++ b/serverRoot/src/web/adempiere.jnlp @@ -1,9 +1,9 @@ - - Adempiere Client 3.4.0s $$context + Adempiere Client 3.5.1a $$context ADempiere, Inc. @@ -14,7 +14,7 @@ - + diff --git a/sqlj/oracle/createSQLJ.sql b/sqlj/oracle/createSQLJ.sql new file mode 100644 index 0000000000..83333ed03c --- /dev/null +++ b/sqlj/oracle/createSQLJ.sql @@ -0,0 +1,270 @@ +/** + * Create SQL Java Functions (Oracle) + * + * Author + Copyright 1999-2005 Jorg Janke + * $Header: /cvs/adempiere/sqlj/oracle/createSQLJ.sql,v 1.1 2006/04/21 18:04:47 jjanke Exp $ + */ + +CREATE OR REPLACE FUNCTION adempiereVersion + RETURN VARCHAR2 + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Adempiere.getVersion() return java.lang.String'; +/ +CREATE OR REPLACE FUNCTION adempiereProperties + RETURN VARCHAR2 + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Adempiere.getProperties() return java.lang.String'; +/ +CREATE OR REPLACE FUNCTION adempiereProperty(p_key VARCHAR2) + RETURN VARCHAR2 + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Adempiere.getProperty(java.lang.String) return java.lang.String'; +/ + +/** Product **/ +CREATE OR REPLACE FUNCTION productAttribute (M_AttributeSetInstance_ID NUMBER) + RETURN NVARCHAR2 + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.attributeName(int) return java.lang.String'; +/ + +CREATE OR REPLACE FUNCTION bomPriceLimit (M_Product_ID NUMBER, M_PriceList_Version_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomPriceLimit(int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION bomPriceList (M_Product_ID NUMBER, M_PriceList_Version_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomPriceList(int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION bomPriceStd (M_Product_ID NUMBER, M_PriceList_Version_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomPriceStd(int,int) return java.math.BigDecimal'; +/ + +CREATE OR REPLACE FUNCTION bomQtyAvailable (M_Product_ID NUMBER, M_Warehouse_ID NUMBER, + M_Locator_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomQtyAvailable(int,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION bomQtyOnHand (M_Product_ID NUMBER, M_Warehouse_ID NUMBER, + M_Locator_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomQtyOnHand(int,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION bomQtyOrdered (M_Product_ID NUMBER, M_Warehouse_ID NUMBER, + M_Locator_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomQtyOrdered(int,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION bomQtyReserved (M_Product_ID NUMBER, M_Warehouse_ID NUMBER, + M_Locator_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomQtyReserved(int,int,int) return java.math.BigDecimal'; +/ + + +CREATE OR REPLACE FUNCTION bomQtyAvailableASI (M_Product_ID NUMBER, M_AttributeSetInstance_ID NUMBER, M_Warehouse_ID NUMBER, + M_Locator_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomQtyAvailableASI(int,int,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION bomQtyOnHandASI (M_Product_ID NUMBER,M_AttributeSetInstance_ID NUMBER, M_Warehouse_ID NUMBER, + M_Locator_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomQtyOnHandASI(int,int,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION bomQtyOrderedASI (M_Product_ID NUMBER, M_AttributeSetInstance_ID NUMBER, M_Warehouse_ID NUMBER, + M_Locator_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomQtyOrderedASI(int,int,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION bomQtyReservedASI (M_Product_ID NUMBER, M_AttributeSetInstance_ID NUMBER, M_Warehouse_ID NUMBER, + M_Locator_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Product.bomQtyReserved(int,int,int,int) return java.math.BigDecimal'; +/ + +/** Currency **/ +CREATE OR REPLACE FUNCTION currencyBase (Amount NUMBER, C_CurrencyFrom_ID NUMBER, + ConversionDate DATE, AD_Client_ID NUMBER, AD_Org_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Currency.base(java.math.BigDecimal,int,java.sql.Timestamp,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION currencyConvert (Amount NUMBER, C_CurrencyFrom_ID NUMBER, + C_CurrencyTo_ID NUMBER, + ConversionDate DATE, C_ConversionType_ID NUMBER, AD_Client_ID NUMBER, AD_Org_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Currency.convert(java.math.BigDecimal,int,int,java.sql.Timestamp,int,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION currencyRate (C_CurrencyFrom_ID NUMBER, C_CurrencyTo_ID NUMBER, + ConversionDate DATE, C_ConversionType_ID NUMBER, AD_Client_ID NUMBER, AD_Org_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Currency.rate(int,int,java.sql.Timestamp,int,int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION currencyRound (Amt NUMBER, C_CurrencyTo_ID NUMBER, IsCosting VARCHAR2) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Currency.round(java.math.BigDecimal,int,java.lang.String) return java.math.BigDecimal'; +/ + +/** BPartner **/ +CREATE OR REPLACE FUNCTION bpartnerRemitLocation (p_C_BPartner_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.BPartner.remitLocation(int) return int'; +/ + +/** Invoice **/ +CREATE OR REPLACE FUNCTION invoiceOpen (p_C_Invoice_ID NUMBER, p_C_InvoicePaySchedule_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Invoice.open(int,int) return java.math.BigDecimal'; +/ + +CREATE OR REPLACE FUNCTION invoicePaid (p_C_Invoice_ID NUMBER, p_C_Currency_ID NUMBER, + p_MultiplierAP NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Invoice.paid(int,int,int) return java.math.BigDecimal'; +/ + + +CREATE OR REPLACE FUNCTION invoiceOpenToDate (p_C_Invoice_ID NUMBER, p_C_InvoicePaySchedule_ID NUMBER,p_AcctDate DATE) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Invoice.openToDate(int,int,java.sql.Timestamp) return java.math.BigDecimal'; +/ + +CREATE OR REPLACE FUNCTION invoicePaidToDate (p_C_Invoice_ID NUMBER, p_C_Currency_ID NUMBER, p_MultiplierAP NUMBER,p_AcctDate DATE) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Invoice.paid(int,int,int,java.sql.Timestamp) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION invoiceDiscount (p_C_Invoice_ID NUMBER, p_PayDate Date, + p_C_InvoicePaySchedule_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Invoice.discount(int,java.sql.Timestamp,int) return java.math.BigDecimal'; +/ + +/** Payment Term **/ +CREATE OR REPLACE FUNCTION paymentTermDueDays (p_C_PaymentTerm_ID NUMBER, p_DocDate DATE, + p_PayDate DATE) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.PaymentTerm.dueDays(int,java.sql.Timestamp,java.sql.Timestamp) return int'; +/ +CREATE OR REPLACE FUNCTION paymentTermDiscount (p_Amount NUMBER, p_C_Currency_ID NUMBER, + p_C_PaymentTerm_ID NUMBER, p_DocDate DATE, p_PayDate DATE) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.PaymentTerm.discount(java.math.BigDecimal,int,int,java.sql.Timestamp,java.sql.Timestamp) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION paymentTermDueDate (p_C_PaymentTerm_ID NUMBER, p_DocDate DATE) + RETURN DATE + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.PaymentTerm.dueDate(int,java.sql.Timestamp) return java.sql.Timestamp'; +/ + +/** Payment **/ +CREATE OR REPLACE FUNCTION paymentAllocated (p_C_Payment_ID NUMBER, p_C_Currency_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Payment.allocated(int,int) return java.math.BigDecimal'; +/ +CREATE OR REPLACE FUNCTION paymentAvailable (p_C_Payment_ID NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Payment.available(int) return java.math.BigDecimal'; +/ + +/** Account **/ +CREATE OR REPLACE FUNCTION acctBalance (p_Account_ID NUMBER, p_AmtDr NUMBER, p_AmtCr NUMBER) + RETURN NUMBER + AS LANGUAGE JAVA + NAME 'org.compiere.sqlj.Account.balance(int,java.math.BigDecimal,java.math.BigDecimal) return java.math.BigDecimal'; +/ + +/** General **/ +BEGIN + dbms_java.grant_permission('ADEMPIERE','SYS:java.util.PropertyPermission', '*', 'read,write'); +END; +/ + +/** Get Character at Position */ +CREATE OR REPLACE FUNCTION charAt +( + p_string VARCHAR2, + p_pos NUMBER +) + RETURN VARCHAR2 +AS +BEGIN + RETURN SUBSTR(p_string, p_pos, 1); +END; +/ +/** GetDate */ +CREATE OR REPLACE FUNCTION getdate + RETURN DATE +AS +BEGIN + RETURN SysDate; +END; +/ +/** First Of DD/DY/MM/Q */ +CREATE OR REPLACE FUNCTION firstOf +( + p_date DATE, + p_datePart VARCHAR2 +) + RETURN DATE +AS +BEGIN + RETURN TRUNC(p_date, p_datePart); +END; +/ +/** Add Number of Days */ +CREATE OR REPLACE FUNCTION addDays +( + p_date DATE, + p_days NUMBER +) + RETURN DATE +AS +BEGIN + RETURN TRUNC(p_date) + p_days; +END; +/ +/** Difference in Days */ +CREATE OR REPLACE FUNCTION daysBetween +( + p_date1 DATE, + p_date2 DATE +) + RETURN NUMBER +AS +BEGIN + RETURN TRUNC(p_date1) - TRUNC(p_date2); +END; +/ + + +SELECT --adempiereVersion(), adempiereProperty('java.vendor'), + TRUNC(getdate()) FROM DUAL +/ + +EXIT diff --git a/sqlj/src/org/compiere/sqlj/Invoice.java b/sqlj/src/org/compiere/sqlj/Invoice.java new file mode 100644 index 0000000000..b1da35928b --- /dev/null +++ b/sqlj/src/org/compiere/sqlj/Invoice.java @@ -0,0 +1,598 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.sqlj; + +import java.math.*; +import java.sql.*; + + +/** + * SQLJ Invoice related Functions + * + * @author Jorg Janke + * @version $Id: Invoice.java,v 1.3 2006/07/30 00:59:07 jjanke Exp $ + */ +public class Invoice +{ + /** + * Open Invoice Amount. + * - incoiceOpen + * @param p_C_Invoice_ID invoice + * @param p_C_InvoicePaySchedule_ID payment schedule + * @return open amount + * @throws SQLException + */ + public static BigDecimal open (int p_C_Invoice_ID, int p_C_InvoicePaySchedule_ID) + throws SQLException + { + // Invoice info + int C_Currency_ID = 0; + int C_ConversionType_ID = 0; + BigDecimal GrandTotal = null; + BigDecimal MultiplierAP = null; + BigDecimal MultiplierCM = null; + // + String sql = "SELECT MAX(C_Currency_ID),MAX(C_ConversionType_ID)," + + " SUM(GrandTotal), MAX(MultiplierAP), MAX(Multiplier) " + + "FROM C_Invoice_v " // corrected for CM / Split Payment + + "WHERE C_Invoice_ID=?"; + if (p_C_InvoicePaySchedule_ID != 0) + sql += " AND C_InvoicePaySchedule_ID=?"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_C_Invoice_ID); + if (p_C_InvoicePaySchedule_ID != 0) + pstmt.setInt(2, p_C_InvoicePaySchedule_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + C_Currency_ID = rs.getInt(1); + C_ConversionType_ID = rs.getInt(2); + GrandTotal = rs.getBigDecimal(3); + MultiplierAP = rs.getBigDecimal(4); + MultiplierCM = rs.getBigDecimal(5); + } + rs.close(); + pstmt.close(); + // No Invoice + if (GrandTotal == null) + return null; + + + BigDecimal paidAmt = allocatedAmt(p_C_Invoice_ID, C_Currency_ID, + C_ConversionType_ID, MultiplierAP); + BigDecimal TotalOpenAmt = GrandTotal.subtract(paidAmt); + + /** + GrandTotal Paid TotalOpen Remaining Due x + 100 0 100 =0 + 1a =50-0 50 x + 1b =0-50 =0 50 + 2a =0-50 =0 50 + 2b =50-0 50 x + -- + 100 10 100 =10 + 1a =50-10 50 x + 1b =10-50 =0 50 + 2a =10-50 =0 50 + 2b =50-0 50 x + -- + 100 60 100 =60 + 1a =50-60 =0 50 x + 1b =60-50 50 + 2a =60-50 =10 50 + 2b =50-10 50 x + -- + **/ + + // Do we have a Payment Schedule ? + if (p_C_InvoicePaySchedule_ID > 0) // if not valid = lists invoice amount + { + TotalOpenAmt = GrandTotal; + BigDecimal remainingAmt = paidAmt; + sql = "SELECT C_InvoicePaySchedule_ID, DueAmt " + + "FROM C_InvoicePaySchedule " + + "WHERE C_Invoice_ID=?" + + " AND IsValid='Y' " + + "ORDER BY DueDate"; + pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_C_Invoice_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + { + int C_InvoicePaySchedule_ID = rs.getInt(1); + BigDecimal DueAmt = rs.getBigDecimal(2); + // + if (C_InvoicePaySchedule_ID == p_C_InvoicePaySchedule_ID) + { + if (DueAmt.signum() > 0) // positive + { + if (DueAmt.compareTo(remainingAmt) < 0) // paid more + TotalOpenAmt = Adempiere.ZERO; + else + TotalOpenAmt = DueAmt.multiply(MultiplierCM) + .subtract(remainingAmt); + } + else + { + if (DueAmt.compareTo(remainingAmt) > 0) // paid more + TotalOpenAmt = Adempiere.ZERO; + else + TotalOpenAmt = DueAmt.multiply(MultiplierCM) + .add(remainingAmt); + } + } + else + { + if (DueAmt.signum() > 0) // positive + { + remainingAmt = remainingAmt.subtract(DueAmt); + if (remainingAmt.signum() < 0) + remainingAmt = Adempiere.ZERO; + } + else + { + remainingAmt = remainingAmt.add(DueAmt); + if (remainingAmt.signum() < 0) + remainingAmt = Adempiere.ZERO; + } + } + } + rs.close(); + pstmt.close(); + } // Invoice Schedule + + // Rounding + TotalOpenAmt = Currency.round(TotalOpenAmt, C_Currency_ID, null); + + // Ignore Penny if there is a payment + if (paidAmt.signum() != 0) + { + double open = TotalOpenAmt.doubleValue(); + if (open >= -0.01 && open <= 0.01) + TotalOpenAmt = Adempiere.ZERO; + } + // + return TotalOpenAmt; + } // open + + // Begin e-Evolution 15/03/2006 + /** + * Open Invoice Amount. + * - incoiceOpen + * @param p_C_Invoice_ID invoice + * @param p_C_InvoicePaySchedule_ID payment schedule + * @param DateAcct Date Account + * @return open amount + * @throws SQLException + */ + public static BigDecimal openToDate (int p_C_Invoice_ID, int p_C_InvoicePaySchedule_ID, Timestamp DateAcct) + throws SQLException + { + // Invoice info + int C_Currency_ID = 0; + int C_ConversionType_ID = 0; + BigDecimal GrandTotal = null; + BigDecimal MultiplierAP = null; + BigDecimal MultiplierCM = null; + // + String sql = "SELECT MAX(C_Currency_ID),MAX(C_ConversionType_ID)," + + " SUM(GrandTotal), MAX(MultiplierAP), MAX(Multiplier) " + + "FROM C_Invoice_v " // corrected for CM / Split Payment + + "WHERE C_Invoice_ID=?" + // Begin + + " AND DateAcct <= ?"; + // End + if (p_C_InvoicePaySchedule_ID != 0) + sql += " AND C_InvoicePaySchedule_ID=?"; + PreparedStatement pstmt = Compiere.prepareStatement(sql); + pstmt.setInt(1, p_C_Invoice_ID); + pstmt.setTimestamp(2, DateAcct); + if (p_C_InvoicePaySchedule_ID != 0) + pstmt.setInt(3, p_C_InvoicePaySchedule_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + C_Currency_ID = rs.getInt(1); + C_ConversionType_ID = rs.getInt(2); + GrandTotal = rs.getBigDecimal(3); + MultiplierAP = rs.getBigDecimal(4); + MultiplierCM = rs.getBigDecimal(5); + } + rs.close(); + pstmt.close(); + pstmt = null; + // No Invoice + if (GrandTotal == null) + return null; + + BigDecimal paidAmt = allocatedAmtToDate(p_C_Invoice_ID, C_Currency_ID, + C_ConversionType_ID, MultiplierAP,DateAcct); + BigDecimal TotalOpenAmt = GrandTotal.subtract(paidAmt); + + /** + GrandTotal Paid TotalOpen Remaining Due x + 100 0 100 =0 + 1a =50-0 50 x + 1b =0-50 =0 50 + 2a =0-50 =0 50 + 2b =50-0 50 x + -- + 100 10 100 =10 + 1a =50-10 50 x + 1b =10-50 =0 50 + 2a =10-50 =0 50 + 2b =50-0 50 x + -- + 100 60 100 =60 + 1a =50-60 =0 50 x + 1b =60-50 50 + 2a =60-50 =10 50 + 2b =50-10 50 x + -- + **/ + + // Do we have a Payment Schedule ? + if (p_C_InvoicePaySchedule_ID > 0) // if not valid = lists invoice amount + { + TotalOpenAmt = GrandTotal; + BigDecimal remainingAmt = paidAmt; + sql = "SELECT C_InvoicePaySchedule_ID, DueAmt " + + "FROM C_InvoicePaySchedule " + + "WHERE C_Invoice_ID=?" + + " AND IsValid='Y' " + + "ORDER BY DueDate"; + pstmt = Compiere.prepareStatement(sql); + pstmt.setInt(1, p_C_Invoice_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + { + int C_InvoicePaySchedule_ID = rs.getInt(1); + BigDecimal DueAmt = rs.getBigDecimal(2); + // + if (C_InvoicePaySchedule_ID == p_C_InvoicePaySchedule_ID) + { + if (DueAmt.signum() > 0) // positive + { + if (DueAmt.compareTo(remainingAmt) < 0) // paid more + TotalOpenAmt = Compiere.ZERO; + else + TotalOpenAmt = DueAmt.multiply(MultiplierCM) + .subtract(remainingAmt); + } + else + { + if (DueAmt.compareTo(remainingAmt) > 0) // paid more + TotalOpenAmt = Compiere.ZERO; + else + TotalOpenAmt = DueAmt.multiply(MultiplierCM) + .add(remainingAmt); + } + } + else + { + if (DueAmt.signum() > 0) // positive + { + remainingAmt = remainingAmt.subtract(DueAmt); + if (remainingAmt.signum() < 0) + remainingAmt = Compiere.ZERO; + } + else + { + remainingAmt = remainingAmt.add(DueAmt); + if (remainingAmt.signum() < 0) + remainingAmt = Compiere.ZERO; + } + } + } + rs.close(); + pstmt.close(); + } // Invoice Schedule + + // Rounding + TotalOpenAmt = Currency.round(TotalOpenAmt, C_Currency_ID, null); + + // Ignore Penny if there is a payment + if (paidAmt.signum() != 0) + { + double open = TotalOpenAmt.doubleValue(); + if (open >= -0.01 && open <= 0.01) + TotalOpenAmt = Compiere.ZERO; + } + // + return TotalOpenAmt; + } // open + // End e-Evolution 15/03/2006 + + // Begin e-Evolution 15/03/2006 + /** + * Get Invoice paid(allocated) amount. + * - invoicePaid + * @param p_C_Invoice_ID invoice + * @param p_C_Currency_ID currency + * @param p_MultiplierAP multiplier + * @param DateAcct Date Account + * @return paid amount + * @throws SQLException + */ + + public static BigDecimal paidToDate (int p_C_Invoice_ID, int p_C_Currency_ID, int p_MultiplierAP, Timestamp DateAcct) + throws SQLException + { + // Invalid Parameters + if (p_C_Invoice_ID == 0 || p_C_Currency_ID == 0) + return null; + // Parameters + BigDecimal MultiplierAP = new BigDecimal((double)p_MultiplierAP); + if (p_MultiplierAP == 0) + MultiplierAP = Compiere.ONE; + int C_ConversionType_ID = 0; + + // Calculate Allocated Amount + BigDecimal paymentAmt = allocatedAmtToDate(p_C_Invoice_ID, + p_C_Currency_ID, C_ConversionType_ID, MultiplierAP,DateAcct); + return Currency.round(paymentAmt, p_C_Currency_ID, null); + } // paid + // End e-Evolution 15/03/2006 + + /** + * Get Invoice paid(allocated) amount. + * - invoicePaid + * @param p_C_Invoice_ID invoice + * @param p_C_Currency_ID currency + * @param p_MultiplierAP multiplier + * @return paid amount + * @throws SQLException + */ + public static BigDecimal paid (int p_C_Invoice_ID, int p_C_Currency_ID, int p_MultiplierAP) + throws SQLException + { + // Invalid Parameters + if (p_C_Invoice_ID == 0 || p_C_Currency_ID == 0) + return null; + // Parameters + BigDecimal MultiplierAP = new BigDecimal((double)p_MultiplierAP); + if (p_MultiplierAP == 0) + MultiplierAP = Adempiere.ONE; + int C_ConversionType_ID = 0; + + // Calculate Allocated Amount + BigDecimal paymentAmt = allocatedAmt(p_C_Invoice_ID, + p_C_Currency_ID, C_ConversionType_ID, MultiplierAP); + return Currency.round(paymentAmt, p_C_Currency_ID, null); + } // paid + + + /** + * Get Allocated Amt (not directly used) + * @param C_Invoice_ID invoice + * @param C_Currency_ID currency + * @param C_ConversionType_ID conversion type + * @param MultiplierAP multiplier + * @return allocated amount + * @throws SQLException + */ + public static BigDecimal allocatedAmt(int C_Invoice_ID, + int C_Currency_ID, int C_ConversionType_ID, BigDecimal MultiplierAP) + throws SQLException + { + // Calculate Allocated Amount + BigDecimal paidAmt = Adempiere.ZERO; + String sql = "SELECT a.AD_Client_ID, a.AD_Org_ID," + + " al.Amount, al.DiscountAmt, al.WriteOffAmt," + + " a.C_Currency_ID, a.DateTrx " + + "FROM C_AllocationLine al" + + " INNER JOIN C_AllocationHdr a ON (al.C_AllocationHdr_ID=a.C_AllocationHdr_ID) " + + "WHERE al.C_Invoice_ID=?" + + " AND a.IsActive='Y'"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, C_Invoice_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + int AD_Client_ID = rs.getInt(1); + int AD_Org_ID = rs.getInt(2); + BigDecimal Amount = rs.getBigDecimal(3); + BigDecimal DiscountAmt = rs.getBigDecimal(4); + BigDecimal WriteOffAmt = rs.getBigDecimal(5); + int C_CurrencyFrom_ID = rs.getInt(6); + Timestamp DateTrx = rs.getTimestamp(7); + // + BigDecimal invAmt = Amount.add(DiscountAmt).add(WriteOffAmt); + BigDecimal allocation = Currency.convert(invAmt.multiply(MultiplierAP), + C_CurrencyFrom_ID, C_Currency_ID, DateTrx, C_ConversionType_ID, + AD_Client_ID, AD_Org_ID); + if (allocation != null) + paidAmt = paidAmt.add(allocation); + } + rs.close(); + pstmt.close(); + // + return paidAmt; + } // getAllocatedAmt + + // Begin e-Evolution ogi-cd 15/03/2006 + /** + * Get Allocated Amt (not directly used) + * @param C_Invoice_ID invoice + * @param C_Currency_ID currency + * @param C_ConversionType_ID conversion type + * @param MultiplierAP multiplier + * @param DateAcct Date Account + * @return allocated amount + * @throws SQLException + */ + public static BigDecimal allocatedAmtToDate(int C_Invoice_ID, + int C_Currency_ID, int C_ConversionType_ID, BigDecimal MultiplierAP, Timestamp DateAcct) + throws SQLException + { + // Calculate Allocated Amount + BigDecimal paidAmt = Compiere.ZERO; + String sql = "SELECT a.AD_Client_ID, a.AD_Org_ID," + + " al.Amount, al.DiscountAmt, al.WriteOffAmt," + + " a.C_Currency_ID, a.DateTrx " + + "FROM C_AllocationLine al" + + " INNER JOIN C_AllocationHdr a ON (al.C_AllocationHdr_ID=a.C_AllocationHdr_ID) " + + "WHERE al.C_Invoice_ID=?" + + " AND a.IsActive='Y' AND a.DateAcct <= ?"; + PreparedStatement pstmt = Compiere.prepareStatement(sql); + pstmt.setInt(1, C_Invoice_ID); + pstmt.setTimestamp(2, DateAcct); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + int AD_Client_ID = rs.getInt(1); + int AD_Org_ID = rs.getInt(2); + BigDecimal Amount = rs.getBigDecimal(3); + BigDecimal DiscountAmt = rs.getBigDecimal(4); + BigDecimal WriteOffAmt = rs.getBigDecimal(5); + int C_CurrencyFrom_ID = rs.getInt(6); + Timestamp DateTrx = rs.getTimestamp(7); + // + BigDecimal invAmt = Amount.add(DiscountAmt).add(WriteOffAmt); + BigDecimal allocation = Currency.convert(invAmt.multiply(MultiplierAP), + C_CurrencyFrom_ID, C_Currency_ID, DateTrx, C_ConversionType_ID, + AD_Client_ID, AD_Org_ID); + if (allocation != null) + paidAmt = paidAmt.add(allocation); + } + rs.close(); + pstmt.close(); + pstmt = null; + // + return paidAmt; + } // getAllocatedAmt + // End e-Evolution 15/03/2006 + + + /** + * Get Invoice discount. + * C_Invoice_Discount - invoiceDiscount + * @param p_C_Invoice_ID invoice + * @param p_PayDate pay date + * @param p_C_InvoicePaySchedule_ID pay schedule + * @return discount amount or null + * @throws SQLException + */ + public static BigDecimal discount (int p_C_Invoice_ID, + Timestamp p_PayDate, int p_C_InvoicePaySchedule_ID) + throws SQLException + { + // Parameters + if (p_C_Invoice_ID == 0) + return null; + Timestamp PayDate = p_PayDate; + if (PayDate == null) + PayDate = new Timestamp (System.currentTimeMillis()); + PayDate = Adempiere.trunc(PayDate); + + // Invoice Info + boolean IsDiscountLineAmt = false; + BigDecimal GrandTotal = null; + BigDecimal TotalLines = null; + int C_PaymentTerm_ID = 0; + Timestamp DateInvoiced = null; + boolean IsPayScheduleValid = false; + int C_Currency_ID = 0; + String sql = "SELECT ci.IsDiscountLineAmt, i.GrandTotal, i.TotalLines, " + + " i.C_PaymentTerm_ID, i.DateInvoiced, i.IsPayScheduleValid, i.C_Currency_ID " + + "FROM C_Invoice i" + + " INNER JOIN AD_ClientInfo ci ON (ci.AD_Client_ID=i.AD_Client_ID) " + + "WHERE i.C_Invoice_ID=?"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_C_Invoice_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + IsDiscountLineAmt = "Y".equals(rs.getString(1)); + GrandTotal = rs.getBigDecimal(2); + TotalLines = rs.getBigDecimal(3); + C_PaymentTerm_ID = rs.getInt(4); + DateInvoiced = rs.getTimestamp(5); + IsPayScheduleValid = "Y".equals(rs.getString(6)); + C_Currency_ID = rs.getInt(7); + } + rs.close(); + pstmt.close(); + // Not found + if (GrandTotal == null) + //vpj-cd return null; + return Adempiere.ZERO; + + // What Amount is the Discount Base? + BigDecimal amount = GrandTotal; + if (IsDiscountLineAmt) + amount = TotalLines; + + // Anything to discount? + if (amount.signum() == 0) + return Adempiere.ZERO; + + // Valid Payment Schedule (has discount) + if (IsPayScheduleValid && p_C_InvoicePaySchedule_ID > 0) + { + BigDecimal discount = Adempiere.ZERO; + sql = "SELECT DiscountAmt " + + "FROM C_InvoicePaySchedule " + + "WHERE C_InvoicePaySchedule_ID=?" + + " AND TRUNC(DiscountDate) <= ?"; + pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_C_InvoicePaySchedule_ID); + pstmt.setTimestamp(2, PayDate); + rs = pstmt.executeQuery(); + if (rs.next()) + discount = rs.getBigDecimal(1); + rs.close(); + pstmt.close(); + // + return discount; + } + + // return discount amount + return PaymentTerm.discount (amount, C_Currency_ID, + C_PaymentTerm_ID, DateInvoiced, PayDate); + } // discount + + /** + * Test + * @param args + * + public static void main (String[] args) + { + + try + { + DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); + Adempiere.s_type = Adempiere.TYPE_ORACLE; + Adempiere.s_url = "jdbc:oracle:thin:@//dev1:1521/dev1.adempiere.org"; + Adempiere.s_uid = "adempiere"; + Adempiere.s_pwd = "adempiere"; + // System.out.println(Invoice.open(1000000, 1000004)); + // System.out.println(Invoice.open(1000000, 1000005)); + // System.out.println(Invoice.open(1000001, 1000006)); + // System.out.println(Invoice.open(1000001, 1000007)); + System.out.println(Invoice.paid(101, 100, 1)); + System.out.println(Invoice.paid(1000000, 100, 1)); + System.out.println(Invoice.paid(1000001, 100, 1)); + System.out.println(Invoice.paid(1000002, 100, 1)); + } + catch (SQLException e) + { + e.printStackTrace(); + } + } // main /* */ + +} // Invoice diff --git a/sqlj/src/org/compiere/sqlj/Product.java b/sqlj/src/org/compiere/sqlj/Product.java new file mode 100644 index 0000000000..7cdf1bbaac --- /dev/null +++ b/sqlj/src/org/compiere/sqlj/Product.java @@ -0,0 +1,678 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 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 * + *****************************************************************************/ +package org.compiere.sqlj; + +import java.math.*; +import java.sql.*; + + +/** + * SQLJ Product related Functions + * + * @author Jorg Janke + * @version $Id: Product.java,v 1.3 2006/07/30 00:59:07 jjanke Exp $ + */ +public class Product +{ + /** + * Get Product Attribute Instance Name. + * Previously: M_Attribute_Name - Now: productAttribute + * Test: + SELECT M_Attribute_Name (M_AttributeSetInstance_ID) + FROM M_InOutLine WHERE M_AttributeSetInstance_ID > 0 + -- + SELECT p.Name + FROM C_InvoiceLine il LEFT OUTER JOIN M_Product p ON (il.M_Product_ID=p.M_Product_ID); + SELECT p.Name || M_Attribute_Name (il.M_AttributeSetInstance_ID) + FROM C_InvoiceLine il LEFT OUTER JOIN M_Product p ON (il.M_Product_ID=p.M_Product_ID); + * @param p_M_AttributeSetInstance_ID instance + * @return Name or "" + * @throws SQLException + */ + public static String attributeName (int p_M_AttributeSetInstance_ID) + throws SQLException + { + if (p_M_AttributeSetInstance_ID == 0) + return ""; + // + StringBuffer sb = new StringBuffer(); + // Get Base Info + String sql = "SELECT asi.Lot, asi.SerNo, asi.GuaranteeDate " + + "FROM M_AttributeSetInstance asi " + + "WHERE asi.M_AttributeSetInstance_ID=?"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_AttributeSetInstance_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + String lot = rs.getString(1); + if (lot != null && lot.length() > 0) + sb.append(lot).append(" "); + String serNo = rs.getString(2); + if (serNo != null && serNo.length() > 0) + sb.append("#").append(serNo).append(" "); + Date guaranteeDate = null; + //either date or timestamp + Object guarantee = rs.getObject(3); + if (guarantee != null) + { + if (guarantee instanceof Timestamp) + { + Timestamp ts = (Timestamp)guarantee; + guaranteeDate = new Date(ts.getTime()); + } + else + { + guaranteeDate = (Date)guaranteeDate; + } + } + if (guaranteeDate != null) + sb.append(guaranteeDate).append(" "); + } + rs.close(); + pstmt.close(); + + // Get Instance Info + sql = "SELECT ai.Value, a.Name " + + "FROM M_AttributeInstance ai" + + " INNER JOIN M_Attribute a ON (ai.M_Attribute_ID=a.M_Attribute_ID AND a.IsInstanceAttribute='Y') " + + "WHERE ai.M_AttributeSetInstance_ID=?"; + pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_AttributeSetInstance_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + { + sb.append(rs.getString(1)) // value + .append(":").append(rs.getString(2)) // name + .append(" "); + } + rs.close(); + pstmt.close(); + + if (sb.length() == 0) + return ""; + sb.insert(0, " ("); + sb.append(")"); + return sb.toString(); + } // getAttributeName + + + /************************************************************************** + * Get BOM Price Limit + * Previously: BOM_PriceLimit - Now: bomPriceLimit + * @param p_M_Product_ID + * @param p_M_PriceList_Version_ID + * @return Price Limit + * @throws SQLException + */ + public static BigDecimal bomPriceLimit (int p_M_Product_ID, int p_M_PriceList_Version_ID) + throws SQLException + { + return bomPrice(p_M_Product_ID, p_M_PriceList_Version_ID, "PriceLimit"); + } // bomPriceLimit + + /** + * Get BOM Price List + * Previously: BOM_PriceList - Now: bomPriceList + * @param p_M_Product_ID + * @param p_M_PriceList_Version_ID + * @return Price List + * @throws SQLException + */ + public static BigDecimal bomPriceList (int p_M_Product_ID, int p_M_PriceList_Version_ID) + throws SQLException + { + return bomPrice(p_M_Product_ID, p_M_PriceList_Version_ID, "PriceList"); + } // bomPriceList + + /** + * Get BOM Price Std + * Previously: BOM_PriceStd - Now: bomPriceStd + * @param p_M_Product_ID + * @param p_M_PriceList_Version_ID + * @return Price Std + * @throws SQLException + */ + public static BigDecimal bomPriceStd (int p_M_Product_ID, int p_M_PriceList_Version_ID) + throws SQLException + { + return bomPrice(p_M_Product_ID, p_M_PriceList_Version_ID, "PriceStd"); + } // bomPriceStd + + /** + * Get BOM Price + * @param p_M_Product_ID + * @param p_M_PriceList_Version_ID + * @param p_what variable name + * @return Price + * @throws SQLException + */ + static BigDecimal bomPrice (int p_M_Product_ID, int p_M_PriceList_Version_ID, String p_what) + throws SQLException + { + BigDecimal price = null; + // Try to get price from PriceList directly + String sql = "SELECT " + p_what + + " FROM M_ProductPrice " + + "WHERE M_PriceList_Version_ID=? AND M_Product_ID=?"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_PriceList_Version_ID); + pstmt.setInt(2, p_M_Product_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + price = rs.getBigDecimal(1); + rs.close(); + pstmt.close(); + // Loop through BOM + if (price == null || price.signum() == 0) + { + price = Adempiere.ZERO; + /*sql = "SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM " + + "FROM M_Product_BOM b, M_Product p " + + "WHERE b.M_ProductBOM_ID=p.M_Product_ID" + + " AND b.M_Product_ID=?";*/ + sql = "SELECT bl.M_Product_ID , CASE WHEN bl.IsQtyPercentage = 'N' THEN bl.QtyBOM ELSE bl.QtyBatch / 100 END AS Qty , p.IsBOM FROM PP_Product_BOM b " + + "INNER JOIN M_Product p ON (p.M_Product_ID=b.M_Product_ID) " + + "INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) " + + "WHERE b.M_Product_ID = ?"; + pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_Product_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + { + int M_ProductBOM_ID = rs.getInt(1); + BigDecimal qty = rs.getBigDecimal(2); + BigDecimal productPrice = bomPrice(M_ProductBOM_ID, p_M_PriceList_Version_ID, p_what); + productPrice = productPrice.multiply(qty); + price = price.add(productPrice); + } + rs.close(); + pstmt.close(); + } + return price; + } // bomPrice + + + /************************************************************************** + * Get BOM Quantity Available + * Previously: BOM_Qty_Available - Now: bomQtyAvailable + * @param p_M_Product_ID product + * @param p_M_Warehouse_ID warehouse + * @param p_M_Locator_ID locator + * @return Quantity Available + * @throws SQLException + */ + public static BigDecimal bomQtyAvailable (int p_M_Product_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID) + throws SQLException + { + return bomQty(p_M_Product_ID, p_M_Warehouse_ID, p_M_Locator_ID, "QtyOnHand") + .subtract(bomQty(p_M_Product_ID, p_M_Warehouse_ID, p_M_Locator_ID, "QtyReserved")); + } // bomQtyAvailable + + /** + * Get BOM Quantity OnHand + * Previously: BOM_Qty_OnHand - Now: bomQtyOnHand + * @param p_M_Product_ID product + * @param p_M_Warehouse_ID warehouse + * @param p_M_Locator_ID locator + * @return Quantity Available + * @throws SQLException + */ + public static BigDecimal bomQtyOnHand (int p_M_Product_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID) + throws SQLException + { + return bomQty(p_M_Product_ID, p_M_Warehouse_ID, p_M_Locator_ID, "QtyOnHand"); + } // bomQtyOnHand + + /** + * Get BOM Quantity Ordered + * Previously: BOM_Qty_Ordered - Now: bomQtyOrdered + * @param p_M_Product_ID product + * @param p_M_Warehouse_ID warehouse + * @param p_M_Locator_ID locator + * @return Quantity Ordered + * @throws SQLException + */ + public static BigDecimal bomQtyOrdered (int p_M_Product_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID) + throws SQLException + { + return bomQty(p_M_Product_ID, p_M_Warehouse_ID, p_M_Locator_ID, "QtyOrdered"); + } // bomQtyOrdered + + /** + * Get BOM Quantity Reserved + * Previously: BOM_Qty_Reserved - Now: bomQtyReserved + * @param p_M_Product_ID product + * @param p_M_Warehouse_ID warehouse + * @param p_M_Locator_ID locator + * @return Qyantity Reserved + * @throws SQLException + */ + public static BigDecimal bomQtyReserved (int p_M_Product_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID) + throws SQLException + { + return bomQty(p_M_Product_ID, p_M_Warehouse_ID, p_M_Locator_ID, "QtyReserved"); + } // bomQtyReserved + + /** + * Get BOM Quantity + * @param p_M_Product_ID product + * @param p_M_Warehouse_ID warehouse + * @param p_M_Locator_ID locator + * @param p_what variable name + * @return Quantity + * @throws SQLException + */ + static BigDecimal bomQty (int p_M_Product_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID, String p_what) + throws SQLException + { + // Check Parameters + int M_Warehouse_ID = p_M_Warehouse_ID; + if (M_Warehouse_ID == 0) + { + if (p_M_Locator_ID == 0) + return Adempiere.ZERO; + else + { + String sql = "SELECT M_Warehouse_ID " + + "FROM M_Locator " + + "WHERE M_Locator_ID=?"; + M_Warehouse_ID = Adempiere.getSQLValue(sql, p_M_Locator_ID); + } + } + // begin globalqss 2005-10-11 + // if (M_Warehouse_ID == 0) + if (M_Warehouse_ID == 0 || M_Warehouse_ID == -1) + // end globalqss 2005-10-11 + return Adempiere.ZERO; + + // Check, if product exists and if it is stocked + boolean isBOM = false; + String ProductType = null; + boolean isStocked = false; + String sql = "SELECT IsBOM, ProductType, IsStocked " + + "FROM M_Product " + + "WHERE M_Product_ID=?"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_Product_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + isBOM = "Y".equals(rs.getString(1)); + ProductType = rs.getString(2); + isStocked = "Y".equals(rs.getString(3)); + } + rs.close(); + pstmt.close(); + // No Product + if (ProductType == null) + return Adempiere.ZERO; + // Unlimited capacity if no item + if (!isBOM && (!ProductType.equals("I") || !isStocked)) + return UNLIMITED; + // Get Qty + if (isStocked) + return getStorageQty(p_M_Product_ID, M_Warehouse_ID, p_M_Locator_ID, p_what); + + // Go through BOM + BigDecimal quantity = UNLIMITED; + BigDecimal productQuantity = null; + /*sql = "SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM, p.IsStocked, p.ProductType " + + "FROM M_Product_BOM b, M_Product p " + + "WHERE b.M_ProductBOM_ID=p.M_Product_ID" + + " AND b.M_Product_ID=?";*/ + + sql = "SELECT bl.M_Product_ID , CASE WHEN bl.IsQtyPercentage = 'N' THEN bl.QtyBOM ELSE bl.QtyBatch / 100 END AS Qty , p.IsBOM , p.IsStocked, p.ProductType FROM PP_Product_BOM b " + + "INNER JOIN M_Product p ON (p.M_Product_ID=b.M_Product_ID) " + + "INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) " + + "WHERE b.M_Product_ID = ?"; + + pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_Product_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + { + int M_ProductBOM_ID = rs.getInt(1); + BigDecimal bomQty = rs.getBigDecimal(2); + isBOM = "Y".equals(rs.getString(3)); + isStocked = "Y".equals(rs.getString(4)); + ProductType = rs.getString(5); + + // Stocked Items "leaf node" + if (ProductType.equals("I") && isStocked) + { + // Get ProductQty + productQuantity = getStorageQty(M_ProductBOM_ID, M_Warehouse_ID, p_M_Locator_ID, p_what); + // Get Rounding Precision + int uomPrecision = getUOMPrecision(M_ProductBOM_ID); + // How much can we make with this product + //hengsin, [ 1649453 ] bomQtyAvailable sqlj function throw ArithmeticException + //productQuantity = productQuantity.setScale(uomPrecision) + // .divide(bomQty, uomPrecision, BigDecimal.ROUND_HALF_UP); + productQuantity = productQuantity.divide(bomQty, uomPrecision, BigDecimal.ROUND_HALF_UP); + // How much can we make overall + if (productQuantity.compareTo(quantity) < 0) + quantity = productQuantity; + } + else if (isBOM) // Another BOM + { + productQuantity = bomQty (M_ProductBOM_ID, M_Warehouse_ID, p_M_Locator_ID, p_what); + // How much can we make overall + if (productQuantity.compareTo(quantity) < 0) + quantity = productQuantity; + } + } + rs.close(); + pstmt.close(); + + if (quantity.signum() != 0) + { + int uomPrecision = getUOMPrecision(p_M_Product_ID); + return quantity.setScale(uomPrecision, BigDecimal.ROUND_HALF_UP); + } + return Adempiere.ZERO; + } // bomQtyOnHand + + /** Unlimited Quantity */ + private static final BigDecimal UNLIMITED = new BigDecimal((double)99999.0); + + /** + * Get Storage Qty + * @param p_M_Product_ID product + * @param M_Warehouse_ID warehouse + * @param p_M_Locator_ID locator + * @param p_what variable name + * @return quantity or zero + * @throws SQLException + */ + static BigDecimal getStorageQty (int p_M_Product_ID, + int M_Warehouse_ID, int p_M_Locator_ID, String p_what) + throws SQLException + { + BigDecimal quantity = null; + String sql = "SELECT SUM(" + p_what + ") " + + "FROM M_Storage s " + + "WHERE M_Product_ID=?"; + if (p_M_Locator_ID != 0) + sql += " AND s.M_Locator_ID=?"; + else + sql += " AND EXISTS (SELECT * FROM M_Locator l WHERE s.M_Locator_ID=l.M_Locator_ID" + + " AND l.M_Warehouse_ID=?)"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_Product_ID); + if (p_M_Locator_ID != 0) + pstmt.setInt(2, p_M_Locator_ID); + else + pstmt.setInt(2, M_Warehouse_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + quantity = rs.getBigDecimal(1); + rs.close(); + pstmt.close(); + // Not found + if (quantity == null) + return Adempiere.ZERO; + return quantity; + } // getStorageQty + + /** + * Get UOM Precision for Product + * @param p_M_Product_ID product + * @return precision or 0 + * @throws SQLException + */ + static int getUOMPrecision (int p_M_Product_ID) throws SQLException + { + int precision = 0; + String sql = "SELECT u.StdPrecision " + + "FROM C_UOM u" + + " INNER JOIN M_Product p ON (u.C_UOM_ID=p.C_UOM_ID) " + + "WHERE p.M_Product_ID=?"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_Product_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + precision = rs.getInt(1); + rs.close(); + pstmt.close(); + return precision; + } // getStdPrecision + + /** + * Test + * @param args + * + public static void main (String[] args) + { + + try + { + DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); + Adempiere.s_type = Adempiere.TYPE_ORACLE; + Adempiere.s_url = "jdbc:oracle:thin:@//dev1:1521/dev1.adempiere.org"; + Adempiere.s_uid = "adempiere"; + Adempiere.s_pwd = "adempiere"; + // System.out.println(Product.bomQtyOnHand(p_M_Product_ID, 0, p_M_Locator_ID)); + } + catch (SQLException e) + { + e.printStackTrace(); + } + } // main /* */ + + + public static BigDecimal bomQtyAvailableASI (int p_M_Product_ID, int p_M_AttributeSetInstance_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID) + throws SQLException + { + return bomQtyOnHandASI(p_M_Product_ID, p_M_AttributeSetInstance_ID, p_M_Warehouse_ID, p_M_Locator_ID) + .subtract(bomQtyReservedASI(p_M_Product_ID, p_M_AttributeSetInstance_ID, p_M_Warehouse_ID, p_M_Locator_ID)); + } // bomQtyAvailable + + public static BigDecimal bomQtyOnHandASI (int p_M_Product_ID, int p_M_AttributeSetInstance_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID) + throws SQLException + { + return bomQtyASI(p_M_Product_ID, p_M_AttributeSetInstance_ID, p_M_Warehouse_ID, p_M_Locator_ID, "QtyOnHand"); + } // bomQtyOnHand + + public static BigDecimal bomQtyOrderedASI (int p_M_Product_ID, int p_M_AttributeSetInstance_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID) + throws SQLException + { + return bomQtyASI(p_M_Product_ID, p_M_AttributeSetInstance_ID, p_M_Warehouse_ID, p_M_Locator_ID, "QtyOrdered"); + } // bomQtyOrdered + + public static BigDecimal bomQtyReservedASI (int p_M_Product_ID, int p_M_AttributeSetInstance_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID) + throws SQLException + { + return bomQtyASI(p_M_Product_ID, p_M_AttributeSetInstance_ID, p_M_Warehouse_ID, p_M_Locator_ID, "QtyReserved"); + } // bomQtyReserved + + /** + * Get BOM Quantity + * @param p_M_Product_ID product + * @param p_M_Warehouse_ID warehouse + * @param p_M_Locator_ID locator + * @param p_what variable name + * @return Quantity + */ + static BigDecimal bomQtyASI (int p_M_Product_ID, int p_M_AttributeSetInstance_ID, + int p_M_Warehouse_ID, int p_M_Locator_ID, String p_what) + throws SQLException + { + // Check Parameters + /* + int M_Warehouse_ID = p_M_Warehouse_ID; + if (M_Warehouse_ID == 0) + { + if (p_M_Locator_ID == 0) + return Compiere.ZERO; + else + { + String sql = "SELECT M_Warehouse_ID " + + "FROM M_Locator " + + "WHERE M_Locator_ID=" + p_M_Locator_ID; + M_Warehouse_ID = Compiere.getSQLValue(sql, p_M_Locator_ID); + } + } + if (M_Warehouse_ID == 0) + return Compiere.ZERO; + */ + // Check, if product exists and if it is stocked + boolean isBOM = false; + String ProductType = null; + boolean isStocked = false; + String sql = "SELECT IsBOM, ProductType, IsStocked " + + "FROM M_Product " + + "WHERE M_Product_ID=?"; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_Product_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + isBOM = "Y".equals(rs.getString(1)); + ProductType = rs.getString(2); + isStocked = "Y".equals(rs.getString(3)); + } + rs.close(); + pstmt.close(); + // No Product + if (ProductType == null) + return Compiere.ZERO; + // Unlimited capacity if no item + if (!isBOM && (!ProductType.equals("I") || !isStocked)) + return UNLIMITED; + // Get Qty + if (isStocked) { + + return getStorageQtyASI(p_M_Product_ID, p_M_AttributeSetInstance_ID, p_M_Warehouse_ID, p_M_Locator_ID, p_what); + } + // Go through BOM + BigDecimal quantity = UNLIMITED; + BigDecimal productQuantity = null; + /*sql = "SELECT b.M_ProductBOM_ID, b.BOMQty, p.IsBOM, p.IsStocked, p.ProductType " + + "FROM M_Product_BOM b, M_Product p " + + "WHERE b.M_ProductBOM_ID=p.M_Product_ID" + + " AND b.M_Product_ID=?";*/ + sql = "SELECT bl.M_Product_ID , CASE WHEN bl.IsQtyPercentage = 'N' THEN bl.QtyBOM ELSE bl.QtyBatch / 100 END AS Qty , p.IsBOM , p.IsStocked, p.ProductType FROM PP_Product_BOM b " + + "INNER JOIN M_Product p ON (p.M_Product_ID=b.M_Product_ID) " + + "INNER JOIN PP_Product_BOMLine bl ON (bl.PP_Product_BOM_ID=b.PP_Product_BOM_ID) " + + "WHERE b.M_Product_ID = ?"; + pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(1, p_M_Product_ID); + rs = pstmt.executeQuery(); + while (rs.next()) + { + int M_ProductBOM_ID = rs.getInt(1); + BigDecimal bomQty = rs.getBigDecimal(2); + isBOM = "Y".equals(rs.getString(3)); + isStocked = "Y".equals(rs.getString(4)); + ProductType = rs.getString(5); + + // Stocked Items "leaf node" + if (ProductType.equals("I") && isStocked) + { + // Get ProductQty + productQuantity = getStorageQtyASI(M_ProductBOM_ID, p_M_AttributeSetInstance_ID, p_M_Warehouse_ID, p_M_Locator_ID, p_what); + // Get Rounding Precision + int StdPrecision = getUOMPrecision(M_ProductBOM_ID); + // How much can we make with this product + productQuantity = productQuantity.setScale(StdPrecision) + .divide(bomQty, BigDecimal.ROUND_HALF_UP); + // How much can we make overall + if (productQuantity.compareTo(quantity) < 0) + quantity = productQuantity; + } + else if (isBOM) // Another BOM + { + productQuantity = bomQtyASI (M_ProductBOM_ID, p_M_AttributeSetInstance_ID, p_M_Warehouse_ID, p_M_Locator_ID, p_what); + // How much can we make overall + if (productQuantity.compareTo(quantity) < 0) + quantity = productQuantity; + } + } + rs.close(); + pstmt.close(); + + if (quantity.signum() > 0) + { + int StdPrecision = getUOMPrecision(p_M_Product_ID); + return quantity.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP); + } + return Adempiere.ZERO; + } // bomQtyOnHand + + /** + * Get Storage Qty + * @param p_M_Product_ID product + * @param M_Warehouse_ID warehouse + * @param p_M_Locator_ID locator + * @param p_what variable name + * @return quantity or zero + * @throws SQLException + */ + static BigDecimal getStorageQtyASI (int p_M_Product_ID, int p_M_AttributeSetInstance_ID, + int M_Warehouse_ID, int p_M_Locator_ID, String p_what) + throws SQLException + { + BigDecimal quantity = null; + + String sql = "SELECT SUM(" + p_what + ") " + + "FROM M_Storage s " + + "WHERE M_Product_ID=?"; + if(p_M_AttributeSetInstance_ID != 0) { + sql +=" AND s.M_AttributeSetInstance_ID = ?"; + } + if (p_M_Locator_ID != 0) { + sql += " AND s.M_Locator_ID=?"; + } + else if(M_Warehouse_ID != 0) { + sql += " AND EXISTS (SELECT * FROM M_Locator l WHERE s.M_Locator_ID=l.M_Locator_ID" + + " AND l.M_Warehouse_ID=?)"; + } + + int index=1; + PreparedStatement pstmt = Adempiere.prepareStatement(sql); + pstmt.setInt(index++, p_M_Product_ID); + if(p_M_AttributeSetInstance_ID != 0) { + pstmt.setInt(index++, p_M_AttributeSetInstance_ID); + } + if (p_M_Locator_ID != 0) { + pstmt.setInt(index++, p_M_Locator_ID); + } + else if(M_Warehouse_ID != 0) { + pstmt.setInt(index++, M_Warehouse_ID); + } + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + quantity = rs.getBigDecimal(1); + rs.close(); + pstmt.close(); + // Not found + if (quantity == null) + return Adempiere.ZERO; + return quantity; + } // getStorageQty + +} // Product diff --git a/tools/build.xml b/tools/build.xml new file mode 100644 index 0000000000..94b8fbcf50 --- /dev/null +++ b/tools/build.xml @@ -0,0 +1,447 @@ + + + + + + + + + The resulting CCTools.jar and CSTools.jar + repackage all third party libraries + in a single jar for simplified start and version control. + The resuling Server CSTools.jar is added to EARs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utils/adempiereDirectTemplate.jnlp b/utils/adempiereDirectTemplate.jnlp index fc2f33244b..89faff8c36 100644 --- a/utils/adempiereDirectTemplate.jnlp +++ b/utils/adempiereDirectTemplate.jnlp @@ -1,9 +1,9 @@ - - Adempiere Client 3.4.0s @ADEMPIERE_APPS_SERVER@ Direct + Adempiere Client 3.5.1a @ADEMPIERE_APPS_SERVER@ Direct ADempiere, Inc. Adempiere ERP+CRM (local) - Smart Business Solution for Distribution and Service - globally @@ -13,7 +13,7 @@ - + diff --git a/utils_dev/RUN_build.bat b/utils_dev/RUN_build.bat new file mode 100644 index 0000000000..fe9b102ffb --- /dev/null +++ b/utils_dev/RUN_build.bat @@ -0,0 +1,31 @@ +@Title Build Adempiere Clean +@Rem $Header: /cvsroot/adempiere/utils_dev/RUN_build.bat,v 1.22 2005/09/08 21:56:11 jjanke Exp $ + +@Rem Check java home +@IF NOT EXIST "%JAVA_HOME%\bin" ECHO "** JAVA_HOME NOT found" +@SET PATH="%JAVA_HOME%\bin";%PATH% + +@Rem Check jdk +@IF NOT EXIST "%JAVA_HOME%\lib\tools.jar" ECHO "** Need Full Java SDK **" + +@Rem Set ant classpath +@SET ANT_CLASSPATH=%CLASSPATH%;..\tools\lib\ant.jar;..\tools\lib\ant-launcher.jar;..\tools\lib\ant-swing.jar;..\tools\lib\ant-commons-net.jar;..\tools\lib\commons-net-1.4.0.jar +@SET ANT_CLASSPATH="%ANT_CLASSPATH%";"%JAVA_HOME%\lib\tools.jar" + +@SET ANT_OPTS=-Xms128m -Xmx512m + +@echo Cleanup ... +@"%JAVA_HOME%\bin\java" %ANT_OPTS% -classpath %ANT_CLASSPATH% -Dant.home="." org.apache.tools.ant.Main clean + +@echo Building ... +@"%JAVA_HOME%\bin\java" %ANT_OPTS% -classpath %ANT_CLASSPATH% -Dant.home="." org.apache.tools.ant.Main -logger org.apache.tools.ant.listener.MailLogger complete +@IF ERRORLEVEL 1 goto ERROR + +@Echo Done ... +@Pause +@exit + +:ERROR +@Color fc + +@Pause \ No newline at end of file diff --git a/utils_dev/build.properties b/utils_dev/build.properties index f4a5bfed7f..dac599bfbe 100644 --- a/utils_dev/build.properties +++ b/utils_dev/build.properties @@ -3,7 +3,7 @@ env.ADEMPIERE_ROOT=${env.ADEMPIERE_SOURCE}/adempiere env.ADEMPIERE_HOME=${env.ADEMPIERE_ROOT}/Adempiere env.ADEMPIERE_INSTALL=${env.ADEMPIERE_SOURCE}/adempiere/install env.ADEMPIERE_VERSION=ADempiere -env.ADEMPIERE_VERSION_FILE=340s +env.ADEMPIERE_VERSION_FILE=351a env.ADEMPIERE_VENDOR=ADempiere env.ENCODING=UTF-8 env.XDOCLET_HOME=${env.ADEMPIERE_SOURCE}/tools