| @@ -0,0 +1,303 @@ | ||
| /****************************************************************************** | ||
| * 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 ar.com.ergio.model; | ||
|
|
||
| import java.math.BigDecimal; | ||
| import java.sql.Timestamp; | ||
| import org.compiere.model.*; | ||
| import org.compiere.util.KeyNamePair; | ||
|
|
||
| /** Generated Interface for LAR_WithholdingCertificate | ||
| * @author Adempiere (generated) | ||
| * @version 3.6.0LTS+P20110709 | ||
| */ | ||
| public interface I_LAR_WithholdingCertificate | ||
| { | ||
|
|
||
| /** TableName=LAR_WithholdingCertificate */ | ||
| public static final String Table_Name = "LAR_WithholdingCertificate"; | ||
|
|
||
| /** AD_Table_ID=1000043 */ | ||
| 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_Client_ID */ | ||
| public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; | ||
|
|
||
| /** Get Client. | ||
| * Client/Tenant for this installation. | ||
| */ | ||
| public int getAD_Client_ID(); | ||
|
|
||
| /** Column name Address1 */ | ||
| public static final String COLUMNNAME_Address1 = "Address1"; | ||
|
|
||
| /** Set Address 1. | ||
| * Address line 1 for this location | ||
| */ | ||
| public void setAddress1 (String Address1); | ||
|
|
||
| /** Get Address 1. | ||
| * Address line 1 for this location | ||
| */ | ||
| public String getAddress1(); | ||
|
|
||
| /** Column name AD_Org_ID */ | ||
| public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; | ||
|
|
||
| /** Set Organization. | ||
| * Organizational entity within client | ||
| */ | ||
| public void setAD_Org_ID (int AD_Org_ID); | ||
|
|
||
| /** Get Organization. | ||
| * Organizational entity within client | ||
| */ | ||
| public int getAD_Org_ID(); | ||
|
|
||
| /** Column name BPName */ | ||
| public static final String COLUMNNAME_BPName = "BPName"; | ||
|
|
||
| /** Set BP Name */ | ||
| public void setBPName (String BPName); | ||
|
|
||
| /** Get BP Name */ | ||
| public String getBPName(); | ||
|
|
||
| /** 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 RuntimeException; | ||
|
|
||
| /** 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_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 RuntimeException; | ||
|
|
||
| /** Column name City */ | ||
| public static final String COLUMNNAME_City = "City"; | ||
|
|
||
| /** Set City. | ||
| * Identifies a City | ||
| */ | ||
| public void setCity (String City); | ||
|
|
||
| /** Get City. | ||
| * Identifies a City | ||
| */ | ||
| public String getCity(); | ||
|
|
||
| /** 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 RuntimeException; | ||
|
|
||
| /** Column name Created */ | ||
| public static final String COLUMNNAME_Created = "Created"; | ||
|
|
||
| /** Get Created. | ||
| * Date this record was created | ||
| */ | ||
| public Timestamp getCreated(); | ||
|
|
||
| /** Column name CreatedBy */ | ||
| public static final String COLUMNNAME_CreatedBy = "CreatedBy"; | ||
|
|
||
| /** Get Created By. | ||
| * User who created this records | ||
| */ | ||
| public int getCreatedBy(); | ||
|
|
||
| /** 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 IsActive */ | ||
| public static final String COLUMNNAME_IsActive = "IsActive"; | ||
|
|
||
| /** Set Active. | ||
| * The record is active in the system | ||
| */ | ||
| public void setIsActive (boolean IsActive); | ||
|
|
||
| /** Get Active. | ||
| * The record is active in the system | ||
| */ | ||
| public boolean isActive(); | ||
|
|
||
| /** Column name LAR_WithholdingCertificate_ID */ | ||
| public static final String COLUMNNAME_LAR_WithholdingCertificate_ID = "LAR_WithholdingCertificate_ID"; | ||
|
|
||
| /** Set LAR_WithholdingCertificate */ | ||
| public void setLAR_WithholdingCertificate_ID (int LAR_WithholdingCertificate_ID); | ||
|
|
||
| /** Get LAR_WithholdingCertificate */ | ||
| public int getLAR_WithholdingCertificate_ID(); | ||
|
|
||
| /** 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 Percent */ | ||
| public static final String COLUMNNAME_Percent = "Percent"; | ||
|
|
||
| /** Set Percent. | ||
| * Percentage | ||
| */ | ||
| public void setPercent (BigDecimal Percent); | ||
|
|
||
| /** Get Percent. | ||
| * Percentage | ||
| */ | ||
| public BigDecimal getPercent(); | ||
|
|
||
| /** Column name Postal */ | ||
| public static final String COLUMNNAME_Postal = "Postal"; | ||
|
|
||
| /** Set ZIP. | ||
| * Postal code | ||
| */ | ||
| public void setPostal (String Postal); | ||
|
|
||
| /** Get ZIP. | ||
| * Postal code | ||
| */ | ||
| public String getPostal(); | ||
|
|
||
| /** Column name RegionName */ | ||
| public static final String COLUMNNAME_RegionName = "RegionName"; | ||
|
|
||
| /** Set Region. | ||
| * Name of the Region | ||
| */ | ||
| public void setRegionName (String RegionName); | ||
|
|
||
| /** Get Region. | ||
| * Name of the Region | ||
| */ | ||
| public String getRegionName(); | ||
|
|
||
| /** 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 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 Updated */ | ||
| public static final String COLUMNNAME_Updated = "Updated"; | ||
|
|
||
| /** Get Updated. | ||
| * Date this record was updated | ||
| */ | ||
| public Timestamp getUpdated(); | ||
|
|
||
| /** Column name UpdatedBy */ | ||
| public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; | ||
|
|
||
| /** Get Updated By. | ||
| * User who updated this records | ||
| */ | ||
| public int getUpdatedBy(); | ||
| } |
| @@ -0,0 +1,96 @@ | ||
| /****************************************************************************** | ||
| * 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 ar.com.ergio.model; | ||
|
|
||
| import java.sql.PreparedStatement; | ||
| import java.sql.ResultSet; | ||
| import java.util.Properties; | ||
| import java.util.logging.Level; | ||
|
|
||
| import org.compiere.model.MPayment; | ||
| import org.compiere.util.CLogger; | ||
| import org.compiere.util.DB; | ||
|
|
||
| /** | ||
| * Payment Withholding Model | ||
| * | ||
| * @author Emiliano Pereyra - http://www.ergio.com.ar | ||
| * | ||
| */ | ||
| public class MLARPaymentWithholding extends X_LAR_PaymentWithholding | ||
| { | ||
| private static final long serialVersionUID = 2402696932419765632L; | ||
|
|
||
| /** Logger */ | ||
| private static CLogger log = CLogger.getCLogger(MLARPaymentWithholding.class); | ||
|
|
||
| public MLARPaymentWithholding(Properties ctx, int LAR_PaymentWithholding_ID, String trxName) | ||
| { | ||
| super(ctx, LAR_PaymentWithholding_ID, trxName); | ||
| // TODO Auto-generated constructor stub | ||
| } | ||
|
|
||
| public MLARPaymentWithholding(Properties ctx, ResultSet rs, String trxName) | ||
| { | ||
| super(ctx, rs, trxName); | ||
| } | ||
|
|
||
| /** | ||
| * | ||
| * @param order | ||
| * @param trxName | ||
| * @return | ||
| */ | ||
| public static MLARPaymentWithholding get(final MPayment payment) | ||
| { | ||
| MLARPaymentWithholding retValue = null; | ||
| if (payment == null || payment.getC_Payment_ID() == 0) { | ||
| log.info("No Payment"); | ||
| return null; | ||
| } | ||
|
|
||
| String sql = "SELECT * FROM LAR_PaymentWithholding WHERE C_Payment_ID=?"; | ||
| PreparedStatement pstmt = null; | ||
| ResultSet rs = null; | ||
| try { | ||
| pstmt = DB.prepareStatement(sql, payment.get_TrxName()); | ||
| pstmt.setInt(1, payment.getC_Payment_ID()); | ||
| rs = pstmt.executeQuery(); | ||
| if (rs.next()) | ||
| retValue = new MLARPaymentWithholding(payment.getCtx(), rs, payment.get_TrxName()); | ||
| rs.close(); | ||
| pstmt.close(); | ||
| pstmt = null; | ||
| } catch (Exception e) { | ||
| log.log(Level.SEVERE, "No withholding for payment", e); | ||
| } finally { | ||
| DB.close(rs, pstmt); | ||
| rs = null; | ||
| pstmt = null; | ||
| } | ||
|
|
||
| if (retValue != null) { | ||
| retValue.set_TrxName(payment.get_TrxName()); | ||
| return retValue; | ||
| } | ||
|
|
||
| // Create new one | ||
| retValue = new MLARPaymentWithholding(payment.getCtx(), 0, payment.get_TrxName()); | ||
| log.info("(new)" + retValue); | ||
| return retValue; | ||
| } // get | ||
| } |
| @@ -0,0 +1,96 @@ | ||
| /****************************************************************************** | ||
| * 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 ar.com.ergio.model; | ||
|
|
||
| import java.sql.PreparedStatement; | ||
| import java.sql.ResultSet; | ||
| import java.util.Properties; | ||
| import java.util.logging.Level; | ||
|
|
||
| import org.compiere.model.MPayment; | ||
| import org.compiere.util.CLogger; | ||
| import org.compiere.util.DB; | ||
|
|
||
| /** | ||
| * Withholding Certificate Model | ||
| * | ||
| * @author Emiliano Pereyra - http://www.ergio.com.ar | ||
| * | ||
| */ | ||
| public class MLARWithholdingCertificate extends X_LAR_WithholdingCertificate | ||
| { | ||
|
|
||
| private static final long serialVersionUID = 1400526751267970390L; | ||
| /** Logger */ | ||
| private static CLogger log = CLogger.getCLogger(MLARWithholdingCertificate.class); | ||
|
|
||
| public MLARWithholdingCertificate(Properties ctx, int LAR_WithholdingCertificate_ID, String trxName) | ||
| { | ||
| super(ctx, LAR_WithholdingCertificate_ID, trxName); | ||
| // TODO Auto-generated constructor stub | ||
| } | ||
|
|
||
| public MLARWithholdingCertificate(Properties ctx, ResultSet rs, String trxName) | ||
| { | ||
| super(ctx, rs, trxName); | ||
| } | ||
|
|
||
| /** | ||
| * | ||
| * @param order | ||
| * @param trxName | ||
| * @return | ||
| */ | ||
| public static MLARWithholdingCertificate get(final MPayment payment) | ||
| { | ||
| MLARWithholdingCertificate retValue = null; | ||
| if (payment == null || payment.getC_Payment_ID() == 0) { | ||
| log.info("No Payment"); | ||
| return null; | ||
| } | ||
|
|
||
| String sql = "SELECT * FROM LAR_WithholdingCertificate WHERE C_Payment_ID=?"; | ||
| PreparedStatement pstmt = null; | ||
| ResultSet rs = null; | ||
| try { | ||
| pstmt = DB.prepareStatement(sql, payment.get_TrxName()); | ||
| pstmt.setInt(1, payment.getC_Payment_ID()); | ||
| rs = pstmt.executeQuery(); | ||
| if (rs.next()) | ||
| retValue = new MLARWithholdingCertificate(payment.getCtx(), rs, payment.get_TrxName()); | ||
| rs.close(); | ||
| pstmt.close(); | ||
| pstmt = null; | ||
| } catch (Exception e) { | ||
| log.log(Level.SEVERE, "No withholding for payment", e); | ||
| } finally { | ||
| DB.close(rs, pstmt); | ||
| rs = null; | ||
| pstmt = null; | ||
| } | ||
|
|
||
| if (retValue != null) { | ||
| retValue.set_TrxName(payment.get_TrxName()); | ||
| return retValue; | ||
| } | ||
|
|
||
| // Create new one | ||
| retValue = new MLARWithholdingCertificate(payment.getCtx(), 0, payment.get_TrxName()); | ||
| log.info("(new)" + retValue); | ||
| return retValue; | ||
| } // get | ||
| } |
| @@ -0,0 +1,343 @@ | ||
| /****************************************************************************** | ||
| * 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 ar.com.ergio.model; | ||
|
|
||
| import java.math.BigDecimal; | ||
| import java.sql.ResultSet; | ||
| import java.sql.Timestamp; | ||
| import java.util.Properties; | ||
| import org.compiere.model.*; | ||
| import org.compiere.util.Env; | ||
|
|
||
| /** Generated Model for LAR_PaymentWithholding | ||
| * @author Adempiere (generated) | ||
| * @version 3.6.0LTS+P20110709 - $Id$ */ | ||
| public class X_LAR_PaymentWithholding extends PO implements I_LAR_PaymentWithholding, I_Persistent | ||
| { | ||
|
|
||
| /** | ||
| * | ||
| */ | ||
| private static final long serialVersionUID = 20120127L; | ||
|
|
||
| /** Standard Constructor */ | ||
| public X_LAR_PaymentWithholding (Properties ctx, int LAR_PaymentWithholding_ID, String trxName) | ||
| { | ||
| super (ctx, LAR_PaymentWithholding_ID, trxName); | ||
| /** if (LAR_PaymentWithholding_ID == 0) | ||
| { | ||
| setC_Invoice_ID (0); | ||
| setC_Payment_ID (0); | ||
| setLAR_PaymentWithholding_ID (0); | ||
| setLCO_WithholdingType_ID (0); | ||
| setProcessed (false); | ||
| setTaxAmt (Env.ZERO); | ||
| setTaxBaseAmt (Env.ZERO); | ||
| } */ | ||
| } | ||
|
|
||
| /** Load Constructor */ | ||
| public X_LAR_PaymentWithholding (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_LAR_PaymentWithholding[") | ||
| .append(get_ID()).append("]"); | ||
| return sb.toString(); | ||
| } | ||
|
|
||
| public I_C_Invoice getC_Invoice() throws RuntimeException | ||
| { | ||
| return (I_C_Invoice)MTable.get(getCtx(), I_C_Invoice.Table_Name) | ||
| .getPO(getC_Invoice_ID(), get_TrxName()); } | ||
|
|
||
| /** 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 RuntimeException | ||
| { | ||
| return (I_C_Payment)MTable.get(getCtx(), I_C_Payment.Table_Name) | ||
| .getPO(getC_Payment_ID(), get_TrxName()); } | ||
|
|
||
| /** 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_Tax getC_Tax() throws RuntimeException | ||
| { | ||
| return (I_C_Tax)MTable.get(getCtx(), I_C_Tax.Table_Name) | ||
| .getPO(getC_Tax_ID(), get_TrxName()); } | ||
|
|
||
| /** 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 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 LAR_PaymentWithholding. | ||
| @param LAR_PaymentWithholding_ID LAR_PaymentWithholding */ | ||
| public void setLAR_PaymentWithholding_ID (int LAR_PaymentWithholding_ID) | ||
| { | ||
| if (LAR_PaymentWithholding_ID < 1) | ||
| set_ValueNoCheck (COLUMNNAME_LAR_PaymentWithholding_ID, null); | ||
| else | ||
| set_ValueNoCheck (COLUMNNAME_LAR_PaymentWithholding_ID, Integer.valueOf(LAR_PaymentWithholding_ID)); | ||
| } | ||
|
|
||
| /** Get LAR_PaymentWithholding. | ||
| @return LAR_PaymentWithholding */ | ||
| public int getLAR_PaymentWithholding_ID () | ||
| { | ||
| Integer ii = (Integer)get_Value(COLUMNNAME_LAR_PaymentWithholding_ID); | ||
| if (ii == null) | ||
| return 0; | ||
| return ii.intValue(); | ||
| } | ||
|
|
||
| /** Set Withholding Rule. | ||
| @param LCO_WithholdingRule_ID Withholding Rule */ | ||
| public void setLCO_WithholdingRule_ID (int LCO_WithholdingRule_ID) | ||
| { | ||
| if (LCO_WithholdingRule_ID < 1) | ||
| set_Value (COLUMNNAME_LCO_WithholdingRule_ID, null); | ||
| else | ||
| set_Value (COLUMNNAME_LCO_WithholdingRule_ID, Integer.valueOf(LCO_WithholdingRule_ID)); | ||
| } | ||
|
|
||
| /** Get Withholding Rule. | ||
| @return Withholding Rule */ | ||
| public int getLCO_WithholdingRule_ID () | ||
| { | ||
| Integer ii = (Integer)get_Value(COLUMNNAME_LCO_WithholdingRule_ID); | ||
| if (ii == null) | ||
| return 0; | ||
| return ii.intValue(); | ||
| } | ||
|
|
||
| /** Set Withholding Type. | ||
| @param LCO_WithholdingType_ID Withholding Type */ | ||
| public void setLCO_WithholdingType_ID (int LCO_WithholdingType_ID) | ||
| { | ||
| if (LCO_WithholdingType_ID < 1) | ||
| set_Value (COLUMNNAME_LCO_WithholdingType_ID, null); | ||
| else | ||
| set_Value (COLUMNNAME_LCO_WithholdingType_ID, Integer.valueOf(LCO_WithholdingType_ID)); | ||
| } | ||
|
|
||
| /** Get Withholding Type. | ||
| @return Withholding Type */ | ||
| public int getLCO_WithholdingType_ID () | ||
| { | ||
| Integer ii = (Integer)get_Value(COLUMNNAME_LCO_WithholdingType_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 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 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; | ||
| } | ||
|
|
||
| /** Set Tax base Amount. | ||
| @param TaxBaseAmt | ||
| Base for calculating the tax amount | ||
| */ | ||
| public void setTaxBaseAmt (BigDecimal TaxBaseAmt) | ||
| { | ||
| set_Value (COLUMNNAME_TaxBaseAmt, TaxBaseAmt); | ||
| } | ||
|
|
||
| /** Get Tax base Amount. | ||
| @return Base for calculating the tax amount | ||
| */ | ||
| public BigDecimal getTaxBaseAmt () | ||
| { | ||
| BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxBaseAmt); | ||
| if (bd == null) | ||
| return Env.ZERO; | ||
| return bd; | ||
| } | ||
| } |
| @@ -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 ar.com.ergio.model; | ||
|
|
||
| import java.math.BigDecimal; | ||
| import java.sql.ResultSet; | ||
| import java.util.Properties; | ||
| import org.compiere.model.*; | ||
| import org.compiere.util.Env; | ||
|
|
||
| /** Generated Model for LAR_WithholdingCertificate | ||
| * @author Adempiere (generated) | ||
| * @version 3.6.0LTS+P20110709 - $Id$ */ | ||
| public class X_LAR_WithholdingCertificate extends PO implements I_LAR_WithholdingCertificate, I_Persistent | ||
| { | ||
|
|
||
| /** | ||
| * | ||
| */ | ||
| private static final long serialVersionUID = 20120130L; | ||
|
|
||
| /** Standard Constructor */ | ||
| public X_LAR_WithholdingCertificate (Properties ctx, int LAR_WithholdingCertificate_ID, String trxName) | ||
| { | ||
| super (ctx, LAR_WithholdingCertificate_ID, trxName); | ||
| /** if (LAR_WithholdingCertificate_ID == 0) | ||
| { | ||
| setC_DocType_ID (0); | ||
| // 0 | ||
| setC_DocTypeTarget_ID (0); | ||
| setC_Invoice_ID (0); | ||
| // 0 | ||
| setC_Payment_ID (0); | ||
| setDocumentNo (null); | ||
| setLAR_WithholdingCertificate_ID (0); | ||
| } */ | ||
| } | ||
|
|
||
| /** Load Constructor */ | ||
| public X_LAR_WithholdingCertificate (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_LAR_WithholdingCertificate[") | ||
| .append(get_ID()).append("]"); | ||
| return sb.toString(); | ||
| } | ||
|
|
||
| /** Set Address 1. | ||
| @param Address1 | ||
| Address line 1 for this location | ||
| */ | ||
| public void setAddress1 (String Address1) | ||
| { | ||
| throw new IllegalArgumentException ("Address1 is virtual column"); } | ||
|
|
||
| /** Get Address 1. | ||
| @return Address line 1 for this location | ||
| */ | ||
| public String getAddress1 () | ||
| { | ||
| return (String)get_Value(COLUMNNAME_Address1); | ||
| } | ||
|
|
||
| /** Set BP Name. | ||
| @param BPName BP Name */ | ||
| public void setBPName (String BPName) | ||
| { | ||
| throw new IllegalArgumentException ("BPName is virtual column"); } | ||
|
|
||
| /** Get BP Name. | ||
| @return BP Name */ | ||
| public String getBPName () | ||
| { | ||
| return (String)get_Value(COLUMNNAME_BPName); | ||
| } | ||
|
|
||
| public I_C_DocType getC_DocType() throws RuntimeException | ||
| { | ||
| return (I_C_DocType)MTable.get(getCtx(), I_C_DocType.Table_Name) | ||
| .getPO(getC_DocType_ID(), get_TrxName()); } | ||
|
|
||
| /** 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) | ||
| 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 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) | ||
| set_Value (COLUMNNAME_C_DocTypeTarget_ID, null); | ||
| else | ||
| 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_Invoice getC_Invoice() throws RuntimeException | ||
| { | ||
| return (I_C_Invoice)MTable.get(getCtx(), I_C_Invoice.Table_Name) | ||
| .getPO(getC_Invoice_ID(), get_TrxName()); } | ||
|
|
||
| /** 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(); | ||
| } | ||
|
|
||
| /** Set City. | ||
| @param City | ||
| Identifies a City | ||
| */ | ||
| public void setCity (String City) | ||
| { | ||
| throw new IllegalArgumentException ("City is virtual column"); } | ||
|
|
||
| /** Get City. | ||
| @return Identifies a City | ||
| */ | ||
| public String getCity () | ||
| { | ||
| return (String)get_Value(COLUMNNAME_City); | ||
| } | ||
|
|
||
| public I_C_Payment getC_Payment() throws RuntimeException | ||
| { | ||
| return (I_C_Payment)MTable.get(getCtx(), I_C_Payment.Table_Name) | ||
| .getPO(getC_Payment_ID(), get_TrxName()); } | ||
|
|
||
| /** 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 Document No. | ||
| @param DocumentNo | ||
| Document sequence number of the document | ||
| */ | ||
| public void setDocumentNo (String DocumentNo) | ||
| { | ||
| 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 LAR_WithholdingCertificate. | ||
| @param LAR_WithholdingCertificate_ID LAR_WithholdingCertificate */ | ||
| public void setLAR_WithholdingCertificate_ID (int LAR_WithholdingCertificate_ID) | ||
| { | ||
| if (LAR_WithholdingCertificate_ID < 1) | ||
| set_ValueNoCheck (COLUMNNAME_LAR_WithholdingCertificate_ID, null); | ||
| else | ||
| set_ValueNoCheck (COLUMNNAME_LAR_WithholdingCertificate_ID, Integer.valueOf(LAR_WithholdingCertificate_ID)); | ||
| } | ||
|
|
||
| /** Get LAR_WithholdingCertificate. | ||
| @return LAR_WithholdingCertificate */ | ||
| public int getLAR_WithholdingCertificate_ID () | ||
| { | ||
| Integer ii = (Integer)get_Value(COLUMNNAME_LAR_WithholdingCertificate_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) | ||
| { | ||
| throw new IllegalArgumentException ("NAICS is virtual column"); } | ||
|
|
||
| /** 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 Percent. | ||
| @param Percent | ||
| Percentage | ||
| */ | ||
| public void setPercent (BigDecimal Percent) | ||
| { | ||
| throw new IllegalArgumentException ("Percent is virtual column"); } | ||
|
|
||
| /** Get Percent. | ||
| @return Percentage | ||
| */ | ||
| public BigDecimal getPercent () | ||
| { | ||
| BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Percent); | ||
| if (bd == null) | ||
| return Env.ZERO; | ||
| return bd; | ||
| } | ||
|
|
||
| /** Set ZIP. | ||
| @param Postal | ||
| Postal code | ||
| */ | ||
| public void setPostal (String Postal) | ||
| { | ||
| throw new IllegalArgumentException ("Postal is virtual column"); } | ||
|
|
||
| /** Get ZIP. | ||
| @return Postal code | ||
| */ | ||
| public String getPostal () | ||
| { | ||
| return (String)get_Value(COLUMNNAME_Postal); | ||
| } | ||
|
|
||
| /** Set Region. | ||
| @param RegionName | ||
| Name of the Region | ||
| */ | ||
| public void setRegionName (String RegionName) | ||
| { | ||
| throw new IllegalArgumentException ("RegionName is virtual column"); } | ||
|
|
||
| /** Get Region. | ||
| @return Name of the Region | ||
| */ | ||
| public String getRegionName () | ||
| { | ||
| return (String)get_Value(COLUMNNAME_RegionName); | ||
| } | ||
|
|
||
| /** Set Tax Amount. | ||
| @param TaxAmt | ||
| Tax Amount for a document | ||
| */ | ||
| public void setTaxAmt (BigDecimal TaxAmt) | ||
| { | ||
| throw new IllegalArgumentException ("TaxAmt is virtual column"); } | ||
|
|
||
| /** 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; | ||
| } | ||
|
|
||
| /** Set Tax ID. | ||
| @param TaxID | ||
| Tax Identification | ||
| */ | ||
| public void setTaxID (String TaxID) | ||
| { | ||
| throw new IllegalArgumentException ("TaxID is virtual column"); } | ||
|
|
||
| /** Get Tax ID. | ||
| @return Tax Identification | ||
| */ | ||
| public String getTaxID () | ||
| { | ||
| return (String)get_Value(COLUMNNAME_TaxID); | ||
| } | ||
| } |
| @@ -0,0 +1,71 @@ | ||
|
|
||
| CREATE TABLE lar_paymentwithholding ( | ||
| ad_client_id numeric(10,0) NOT NULL, | ||
| ad_org_id numeric(10,0) NOT NULL, | ||
| created timestamp NOT NULL, | ||
| createdby numeric(10,0) NOT NULL, | ||
| updated timestamp NOT NULL, | ||
| updatedby numeric(10,0) NOT NULL, | ||
| isactive char(1) NOT NULL DEFAULT 'Y'::bpchar, | ||
| lar_paymentwithholding_id numeric(10,0) NOT NULL, | ||
| c_invoice_id numeric(10,0) NOT NULL, | ||
| c_payment_id numeric(10,0) NOT NULL, | ||
| c_tax_id numeric(10,0) NULL DEFAULT NULL::numeric, | ||
| dateacct timestamp NULL, | ||
| datetrx timestamp NULL, | ||
| lco_withholdingrule_id numeric(10,0) NULL DEFAULT NULL::numeric, | ||
| lco_withholdingtype_id numeric(10,0) NOT NULL, | ||
| percent numeric NULL, | ||
| processed char(1) NOT NULL DEFAULT 'N'::bpchar, | ||
| taxamt numeric NOT NULL, | ||
| taxbaseamt numeric NOT NULL, | ||
| PRIMARY KEY(lar_paymentwithholding_id) | ||
| ); | ||
|
|
||
| ALTER TABLE adempiere.lar_paymentwithholding | ||
| ADD CONSTRAINT lar_paymentwithholding_processed_check | ||
| CHECK (processed = ANY (ARRAY['Y'::bpchar, 'N'::bpchar])); | ||
|
|
||
| ALTER TABLE adempiere.lar_paymentwithholding | ||
| ADD CONSTRAINT lar_paymentwithholding_isactive_check | ||
| CHECK (isactive = ANY (ARRAY['Y'::bpchar, 'N'::bpchar])); | ||
|
|
||
| ALTER TABLE adempiere.lar_paymentwithholding | ||
| ADD CONSTRAINT lcowithholdingtype_larpaymentw | ||
| FOREIGN KEY(lco_withholdingtype_id) | ||
| REFERENCES adempiere.lco_withholdingtype(lco_withholdingtype_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; | ||
|
|
||
| ALTER TABLE adempiere.lar_paymentwithholding | ||
| ADD CONSTRAINT lcowithholdingrule_larpaymentw | ||
| FOREIGN KEY(lco_withholdingrule_id) | ||
| REFERENCES adempiere.lco_withholdingrule(lco_withholdingrule_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; | ||
|
|
||
| ALTER TABLE adempiere.lar_paymentwithholding | ||
| ADD CONSTRAINT ctax_larpaymentwithholding | ||
| FOREIGN KEY(c_tax_id) | ||
| REFERENCES adempiere.c_tax(c_tax_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; | ||
|
|
||
| ALTER TABLE adempiere.lar_paymentwithholding | ||
| ADD CONSTRAINT cinvoice_larpaymentwithholding | ||
| FOREIGN KEY(c_invoice_id) | ||
| REFERENCES adempiere.c_invoice(c_invoice_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; | ||
|
|
||
| ALTER TABLE adempiere.lar_paymentwithholding | ||
| ADD CONSTRAINT cpayment_larpaymentwithholding | ||
| FOREIGN KEY(c_payment_id) | ||
| REFERENCES adempiere.c_payment(c_payment_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; |
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE c_payment ADD COLUMN withholdingamt NUMERIC; | ||
| ALTER TABLE c_payment ADD COLUMN withholdingpercent NUMERIC; |
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE lco_withholdingcalc ADD COLUMN paymentthresholdmin NUMERIC; | ||
| ALTER TABLE lco_withholdingcalc ADD COLUMN iscalcfrompayment CHARACTER(1) NOT NULL DEFAULT 'N'; |
| @@ -0,0 +1,52 @@ | ||
| CREATE TABLE adempiere.lar_withholdingcertificate ( | ||
| ad_client_id numeric(10,0) NOT NULL, | ||
| ad_org_id numeric(10,0) NOT NULL, | ||
| created timestamp NOT NULL, | ||
| createdby numeric(10,0) NULL, | ||
| updated timestamp NOT NULL, | ||
| updatedby numeric(10,0) NOT NULL, | ||
| isactive char(1) NOT NULL, | ||
| lar_withholdingcertificate_id numeric(10,0) NOT NULL, | ||
| documentno varchar(30) NOT NULL, | ||
| c_invoice_id numeric(10,0) NOT NULL, | ||
| c_payment_id numeric(10,0) NOT NULL, | ||
| c_doctype_id numeric(10,0) NULL, | ||
| c_doctypetarget_id numeric(10,0) NULL, | ||
| PRIMARY KEY(lar_withholdingcertificate_id) | ||
| ); | ||
|
|
||
| ALTER TABLE adempiere.lar_withholdingcertificate | ||
| ADD CONSTRAINT lar_withholdingcertificate_isactive_check | ||
| CHECK (isactive = ANY (ARRAY['Y'::bpchar, 'N'::bpchar])); | ||
|
|
||
| ALTER TABLE adempiere.lar_withholdingcertificate | ||
| ADD CONSTRAINT cpayment_larwithholdingcertificate | ||
| FOREIGN KEY(c_payment_id) | ||
| REFERENCES adempiere.c_payment(c_payment_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; | ||
|
|
||
| ALTER TABLE adempiere.lar_withholdingcertificate | ||
| ADD CONSTRAINT cinvoice_larwithholdingcertificate | ||
| FOREIGN KEY(c_invoice_id) | ||
| REFERENCES adempiere.c_invoice(c_invoice_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; | ||
|
|
||
| ALTER TABLE adempiere.lar_withholdingcertificate | ||
| ADD CONSTRAINT cdoctype_larwithholdingcertificate | ||
| FOREIGN KEY(c_doctype_id) | ||
| REFERENCES adempiere.c_doctype(c_doctype_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; | ||
|
|
||
| ALTER TABLE adempiere.lar_withholdingcertificate | ||
| ADD CONSTRAINT cdoctypetarget_larwithholdingcertificate | ||
| FOREIGN KEY(c_doctypetarget_id) | ||
| REFERENCES adempiere.c_doctype(c_doctype_id) | ||
| MATCH SIMPLE | ||
| ON DELETE NO ACTION | ||
| ON UPDATE NO ACTION; |