Revert revisions 12545, 12546, 12553, 12554, 12558, 12539, 12544, 12548, 12552, 12557
Payment Selection for Payroll integrate with the AD Core http://sourceforge.net/support/tracker.php?aid=3015702 Print Payroll Checks http://sourceforge.net/support/tracker.php?aid=3015725 Documenting reasons in corresponding trackers
This commit is contained in:
parent
90b27a5a56
commit
586ecce99d
|
@ -76,7 +76,6 @@ import org.compiere.util.Ini;
|
|||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Util;
|
||||
import org.eevolution.model.MDDOrder;
|
||||
import org.eevolution.model.X_HR_PaySelectionCheck;
|
||||
import org.eevolution.model.X_PP_Order; // to be changed by MPPOrder
|
||||
|
||||
/**
|
||||
|
@ -1174,8 +1173,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
public static final int MANUFACTURING_ORDER = 8;
|
||||
/** Distribution Order = 9 */
|
||||
public static final int DISTRIBUTION_ORDER = 9;
|
||||
/** Payroll Check = 10 */
|
||||
public static final int HR_CHECK = 10;
|
||||
|
||||
|
||||
// private static final String[] DOC_TABLES = new String[] {
|
||||
// "C_Order_Header_v", "M_InOut_Header_v", "C_Invoice_Header_v", "C_Project_Header_v",
|
||||
|
@ -1186,17 +1184,17 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
"C_Order", "M_InOut", "C_Invoice", "C_Project",
|
||||
"C_RfQResponse",
|
||||
"C_PaySelectionCheck", "C_PaySelectionCheck",
|
||||
"C_DunningRunEntry","PP_Order", "DD_Order","HR_PaySelectionCheck"};
|
||||
"C_DunningRunEntry","PP_Order", "DD_Order"};
|
||||
private static final String[] DOC_IDS = new String[] {
|
||||
"C_Order_ID", "M_InOut_ID", "C_Invoice_ID", "C_Project_ID",
|
||||
"C_RfQResponse_ID",
|
||||
"C_PaySelectionCheck_ID", "C_PaySelectionCheck_ID",
|
||||
"C_DunningRunEntry_ID" , "PP_Order_ID" , "DD_Order_ID","HR_PaySelectionCheck_ID" };
|
||||
"C_DunningRunEntry_ID" , "PP_Order_ID" , "DD_Order_ID" };
|
||||
private static final int[] DOC_TABLE_ID = new int[] {
|
||||
MOrder.Table_ID, MInOut.Table_ID, MInvoice.Table_ID, MProject.Table_ID,
|
||||
MRfQResponse.Table_ID,
|
||||
MPaySelectionCheck.Table_ID, MPaySelectionCheck.Table_ID,
|
||||
MDunningRunEntry.Table_ID, X_PP_Order.Table_ID, MDDOrder.Table_ID, X_HR_PaySelectionCheck.Table_ID };
|
||||
MDunningRunEntry.Table_ID, X_PP_Order.Table_ID, MDDOrder.Table_ID };
|
||||
|
||||
/**************************************************************************
|
||||
* Get Document Print Engine for Document Type.
|
||||
|
@ -1332,17 +1330,6 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
+ "WHERE d." + DOC_IDS[type] + "=?" // info from PrintForm
|
||||
+ " AND pf.AD_Org_ID IN (0,d.AD_Org_ID) "
|
||||
+ "ORDER BY pf.AD_Org_ID DESC";
|
||||
else if (type == HR_CHECK)
|
||||
{
|
||||
sql = " SELECT bad.Check_PrintFormat_ID," // 1
|
||||
+ " c.IsMultiLingualDocument,bp.AD_Language,bp.C_BPartner_ID,d.DocumentNo " // 2..5
|
||||
+ "FROM HR_PaySelectionCheck d"
|
||||
+ " INNER JOIN HR_PaySelection ps ON (d.HR_PaySelection_ID=ps.HR_PaySelection_ID)"
|
||||
+ " INNER JOIN C_BankAccountDoc bad ON (ps.C_BankAccount_ID=bad.C_BankAccount_ID AND d.PaymentRule=bad.PaymentRule)"
|
||||
+ " INNER JOIN AD_Client c ON (d.AD_Client_ID=c.AD_Client_ID)"
|
||||
+ " INNER JOIN C_BPartner bp ON (d.C_BPartner_ID=bp.C_BPartner_ID) "
|
||||
+ "WHERE d.HR_PaySelectionCheck_ID=?"; // info from BankAccount
|
||||
}
|
||||
else // Get PrintFormat from Org or 0 of document client
|
||||
sql = "SELECT pf.Order_PrintFormat_ID,pf.Shipment_PrintFormat_ID," // 1..2
|
||||
// Prio: 1. BPartner 2. DocType, 3. PrintFormat (Org) // see InvoicePrint
|
||||
|
@ -1371,7 +1358,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
if (rs.next()) // first record only
|
||||
{
|
||||
if (type == CHECK || type == DUNNING || type == REMITTANCE
|
||||
|| type == PROJECT || type == RFQ || type == MANUFACTURING_ORDER || type == DISTRIBUTION_ORDER || type == HR_CHECK)
|
||||
|| type == PROJECT || type == RFQ || type == MANUFACTURING_ORDER || type == DISTRIBUTION_ORDER)
|
||||
{
|
||||
AD_PrintFormat_ID = rs.getInt(1);
|
||||
copies = 1;
|
||||
|
|
|
@ -1,238 +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 *
|
||||
*****************************************************************************/
|
||||
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_PaySelection
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.5.4a
|
||||
*/
|
||||
public interface I_HR_PaySelection
|
||||
{
|
||||
|
||||
/** TableName=HR_PaySelection */
|
||||
public static final String Table_Name = "HR_PaySelection";
|
||||
|
||||
/** AD_Table_ID=53248 */
|
||||
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_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 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 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 RuntimeException;
|
||||
|
||||
/** 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 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 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_PaySelection_ID */
|
||||
public static final String COLUMNNAME_HR_PaySelection_ID = "HR_PaySelection_ID";
|
||||
|
||||
/** Set Payroll Payment Selection ID.
|
||||
* Payroll Payment Selection
|
||||
*/
|
||||
public void setHR_PaySelection_ID (int HR_PaySelection_ID);
|
||||
|
||||
/** Get Payroll Payment Selection ID.
|
||||
* Payroll Payment Selection
|
||||
*/
|
||||
public int getHR_PaySelection_ID();
|
||||
|
||||
/** 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 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 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 PayDate */
|
||||
public static final String COLUMNNAME_PayDate = "PayDate";
|
||||
|
||||
/** Set Payment date.
|
||||
* Date Payment made
|
||||
*/
|
||||
public void setPayDate (Timestamp PayDate);
|
||||
|
||||
/** Get Payment date.
|
||||
* Date Payment made
|
||||
*/
|
||||
public Timestamp getPayDate();
|
||||
|
||||
/** 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 TotalAmt */
|
||||
public static final String COLUMNNAME_TotalAmt = "TotalAmt";
|
||||
|
||||
/** Set Total Amount.
|
||||
* Total Amount
|
||||
*/
|
||||
public void setTotalAmt (BigDecimal TotalAmt);
|
||||
|
||||
/** Get Total Amount.
|
||||
* Total Amount
|
||||
*/
|
||||
public BigDecimal getTotalAmt();
|
||||
|
||||
/** 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();
|
||||
}
|
|
@ -1,296 +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 *
|
||||
*****************************************************************************/
|
||||
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_PaySelectionCheck
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.5.4a
|
||||
*/
|
||||
public interface I_HR_PaySelectionCheck
|
||||
{
|
||||
|
||||
/** TableName=HR_PaySelectionCheck */
|
||||
public static final String Table_Name = "HR_PaySelectionCheck";
|
||||
|
||||
/** AD_Table_ID=53250 */
|
||||
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_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 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 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 RuntimeException;
|
||||
|
||||
/** 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 RuntimeException;
|
||||
|
||||
/** 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 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 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_PaySelectionCheck_ID */
|
||||
public static final String COLUMNNAME_HR_PaySelectionCheck_ID = "HR_PaySelectionCheck_ID";
|
||||
|
||||
/** Set Payroll Pay Selection Check ID.
|
||||
* Payroll Payment Selection Check
|
||||
*/
|
||||
public void setHR_PaySelectionCheck_ID (int HR_PaySelectionCheck_ID);
|
||||
|
||||
/** Get Payroll Pay Selection Check ID.
|
||||
* Payroll Payment Selection Check
|
||||
*/
|
||||
public int getHR_PaySelectionCheck_ID();
|
||||
|
||||
/** Column name HR_PaySelection_ID */
|
||||
public static final String COLUMNNAME_HR_PaySelection_ID = "HR_PaySelection_ID";
|
||||
|
||||
/** Set Payroll Payment Selection ID.
|
||||
* Payroll Payment Selection
|
||||
*/
|
||||
public void setHR_PaySelection_ID (int HR_PaySelection_ID);
|
||||
|
||||
/** Get Payroll Payment Selection ID.
|
||||
* Payroll Payment Selection
|
||||
*/
|
||||
public int getHR_PaySelection_ID();
|
||||
|
||||
public org.eevolution.model.I_HR_PaySelection getHR_PaySelection() throws RuntimeException;
|
||||
|
||||
/** 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 IsGeneratedDraft */
|
||||
public static final String COLUMNNAME_IsGeneratedDraft = "IsGeneratedDraft";
|
||||
|
||||
/** Set Generated Draft */
|
||||
public void setIsGeneratedDraft (boolean IsGeneratedDraft);
|
||||
|
||||
/** Get Generated Draft */
|
||||
public boolean isGeneratedDraft();
|
||||
|
||||
/** 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 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 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 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 Qty */
|
||||
public static final String COLUMNNAME_Qty = "Qty";
|
||||
|
||||
/** Set Quantity.
|
||||
* Quantity
|
||||
*/
|
||||
public void setQty (int Qty);
|
||||
|
||||
/** Get Quantity.
|
||||
* Quantity
|
||||
*/
|
||||
public int getQty();
|
||||
|
||||
/** 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();
|
||||
}
|
|
@ -1,294 +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 *
|
||||
*****************************************************************************/
|
||||
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_PaySelectionLine
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.5.4a
|
||||
*/
|
||||
public interface I_HR_PaySelectionLine
|
||||
{
|
||||
|
||||
/** TableName=HR_PaySelectionLine */
|
||||
public static final String Table_Name = "HR_PaySelectionLine";
|
||||
|
||||
/** AD_Table_ID=53249 */
|
||||
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_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 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 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 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 DifferenceAmt */
|
||||
public static final String COLUMNNAME_DifferenceAmt = "DifferenceAmt";
|
||||
|
||||
/** Set Difference.
|
||||
* Difference Amount
|
||||
*/
|
||||
public void setDifferenceAmt (BigDecimal DifferenceAmt);
|
||||
|
||||
/** Get Difference.
|
||||
* Difference Amount
|
||||
*/
|
||||
public BigDecimal getDifferenceAmt();
|
||||
|
||||
/** 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 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();
|
||||
|
||||
public org.eevolution.model.I_HR_Movement getHR_Movement() throws RuntimeException;
|
||||
|
||||
/** Column name HR_PaySelectionCheck_ID */
|
||||
public static final String COLUMNNAME_HR_PaySelectionCheck_ID = "HR_PaySelectionCheck_ID";
|
||||
|
||||
/** Set Payroll Pay Selection Check ID.
|
||||
* Payroll Payment Selection Check
|
||||
*/
|
||||
public void setHR_PaySelectionCheck_ID (int HR_PaySelectionCheck_ID);
|
||||
|
||||
/** Get Payroll Pay Selection Check ID.
|
||||
* Payroll Payment Selection Check
|
||||
*/
|
||||
public int getHR_PaySelectionCheck_ID();
|
||||
|
||||
public org.eevolution.model.I_HR_PaySelectionCheck getHR_PaySelectionCheck() throws RuntimeException;
|
||||
|
||||
/** Column name HR_PaySelectionLine_ID */
|
||||
public static final String COLUMNNAME_HR_PaySelectionLine_ID = "HR_PaySelectionLine_ID";
|
||||
|
||||
/** Set Payroll Payment Selection Line ID.
|
||||
* Payroll Payment Selection Line
|
||||
*/
|
||||
public void setHR_PaySelectionLine_ID (int HR_PaySelectionLine_ID);
|
||||
|
||||
/** Get Payroll Payment Selection Line ID.
|
||||
* Payroll Payment Selection Line
|
||||
*/
|
||||
public int getHR_PaySelectionLine_ID();
|
||||
|
||||
/** Column name HR_PaySelection_ID */
|
||||
public static final String COLUMNNAME_HR_PaySelection_ID = "HR_PaySelection_ID";
|
||||
|
||||
/** Set Payroll Payment Selection ID.
|
||||
* Payroll Payment Selection
|
||||
*/
|
||||
public void setHR_PaySelection_ID (int HR_PaySelection_ID);
|
||||
|
||||
/** Get Payroll Payment Selection ID.
|
||||
* Payroll Payment Selection
|
||||
*/
|
||||
public int getHR_PaySelection_ID();
|
||||
|
||||
public org.eevolution.model.I_HR_PaySelection getHR_PaySelection() throws RuntimeException;
|
||||
|
||||
/** 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 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 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 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 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 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 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 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();
|
||||
}
|
|
@ -1,201 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* 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 *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* Payroll Concept for HRayroll Module
|
||||
*
|
||||
* @author Oscar Gómez Islas
|
||||
* @version $Id: HRPayroll.java,v 1.0 2005/10/05 ogomezi
|
||||
*
|
||||
* @author Cristina Ghita, www.arhipac.ro
|
||||
*/
|
||||
public class MHRConcept extends X_HR_Concept
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8736925494645172953L;
|
||||
|
||||
/** Cache */
|
||||
private static CCache<Integer, MHRConcept> s_cache = new CCache<Integer, MHRConcept>(Table_Name, 100);
|
||||
/** Cache by Value */
|
||||
private static CCache<String, MHRConcept> s_cacheValue = new CCache<String, MHRConcept>(Table_Name+"_Value", 100);
|
||||
|
||||
public static MHRConcept get(Properties ctx, int HR_Concept_ID)
|
||||
{
|
||||
if (HR_Concept_ID <= 0)
|
||||
return null;
|
||||
//
|
||||
MHRConcept concept = s_cache.get(HR_Concept_ID);
|
||||
if (concept != null)
|
||||
return concept;
|
||||
//
|
||||
concept = new MHRConcept(ctx, HR_Concept_ID, null);
|
||||
if (concept.get_ID() == HR_Concept_ID)
|
||||
{
|
||||
s_cache.put(HR_Concept_ID, concept);
|
||||
}
|
||||
else
|
||||
{
|
||||
concept = null;
|
||||
}
|
||||
return concept;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Concept by Value
|
||||
* @param ctx
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static MHRConcept forValue(Properties ctx, String value)
|
||||
{
|
||||
if (Util.isEmpty(value, true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int AD_Client_ID = Env.getAD_Client_ID(ctx);
|
||||
final String key = AD_Client_ID+"#"+value;
|
||||
MHRConcept concept = s_cacheValue.get(key);
|
||||
if (concept != null)
|
||||
{
|
||||
return concept;
|
||||
}
|
||||
|
||||
final String whereClause = COLUMNNAME_Value+"=? AND AD_Client_ID IN (?,?)";
|
||||
concept = new Query(ctx, Table_Name, whereClause, null)
|
||||
.setParameters(new Object[]{value, 0, AD_Client_ID})
|
||||
.setOnlyActiveRecords(true)
|
||||
.setOrderBy("AD_Client_ID DESC")
|
||||
.first();
|
||||
if (concept != null)
|
||||
{
|
||||
s_cacheValue.put(key, concept);
|
||||
s_cache.put(concept.get_ID(), concept);
|
||||
}
|
||||
return concept;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Employee's of Payroll Type
|
||||
* @param payroll_id Payroll ID
|
||||
* @param department_id Department ID
|
||||
* @param employee_id Employee_ID
|
||||
* @param sqlwhere Clause SQLWhere
|
||||
* @return lines
|
||||
*/
|
||||
public static MHRConcept[] getConcepts (int payroll_id, int department_id, int employee_id, String sqlWhere)
|
||||
{
|
||||
Properties ctx = Env.getCtx();
|
||||
List<Object> params = new ArrayList<Object>();
|
||||
StringBuffer whereClause = new StringBuffer();
|
||||
|
||||
whereClause.append("AD_Client_ID in (?,?)");
|
||||
params.add(0);
|
||||
params.add(Env.getAD_Client_ID(Env.getCtx()));
|
||||
|
||||
whereClause.append(" AND (" + COLUMNNAME_HR_Payroll_ID + " =? OR "
|
||||
+COLUMNNAME_HR_Payroll_ID +" IS NULL)");
|
||||
params.add(payroll_id);
|
||||
|
||||
if (department_id != 0 )
|
||||
{
|
||||
whereClause.append(" AND HR_Concept.HR_Department_ID=?");
|
||||
params.add(department_id);
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(sqlWhere))
|
||||
{
|
||||
whereClause.append(sqlWhere);
|
||||
}
|
||||
|
||||
List<MHRConcept> list = new Query(ctx, Table_Name, whereClause.toString(), null)
|
||||
.setParameters(params)
|
||||
.setOnlyActiveRecords(true)
|
||||
.setOrderBy("COALESCE("+COLUMNNAME_SeqNo + ",999999999999) DESC, " + COLUMNNAME_Value)
|
||||
.list();
|
||||
return list.toArray(new MHRConcept[list.size()]);
|
||||
} // getConcept
|
||||
|
||||
/**
|
||||
* Standard Constructor
|
||||
* @param ctx context
|
||||
* @param HR_Concept_ID
|
||||
* @param trxName
|
||||
*/
|
||||
public MHRConcept (Properties ctx, int HR_Concept_ID, String trxName)
|
||||
{
|
||||
super (ctx, HR_Concept_ID, trxName);
|
||||
if (HR_Concept_ID == 0)
|
||||
{
|
||||
setValue("");
|
||||
setName("");
|
||||
setDescription("");
|
||||
setIsEmployee(false);
|
||||
setIsPrinted(false);
|
||||
setHR_Payroll_ID(0);
|
||||
setHR_Job_ID(0);
|
||||
setHR_Department_ID(0);
|
||||
}
|
||||
} // HRConcept
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
* @param trxName
|
||||
*/
|
||||
public MHRConcept (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
}
|
||||
|
||||
public int getConceptAccountCR()
|
||||
{
|
||||
String sql = " HR_Expense_Acct FROM HR_Concept c " +
|
||||
" INNER JOIN HR_Concept_Acct ca ON (c.HR_Concept_ID=ca.HR_Concept_ID)" +
|
||||
" WHERE c.HR_Concept_ID " + getHR_Concept_ID();
|
||||
int result = DB.getSQLValue("ConceptCR", sql);
|
||||
if (result > 0)
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getConceptAccountDR()
|
||||
{
|
||||
String sql = " HR_Revenue_Acct FROM HR_Concept c " +
|
||||
" INNER JOIN HR_Concept_Acct ca ON (c.HR_Concept_ID=ca.HR_Concept_ID)" +
|
||||
" WHERE c.HR_Concept_ID " + getHR_Concept_ID();
|
||||
int result = DB.getSQLValue("ConceptCR", sql);
|
||||
if (result > 0)
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // HRConcept
|
|
@ -1,149 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* 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 *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/**
|
||||
* Payroll for HRayroll Module
|
||||
*
|
||||
* @author victor.perez@e-evolution.com, www.e-evolution.com
|
||||
*
|
||||
*/
|
||||
public class MHRPaySelection extends X_HR_PaySelection
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -6521282913549455131L;
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param ctx context
|
||||
* @param C_PaySelection_ID id
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MHRPaySelection (Properties ctx, int HR_PaySelection_ID, String trxName)
|
||||
{
|
||||
super(ctx, HR_PaySelection_ID, trxName);
|
||||
if (HR_PaySelection_ID == 0)
|
||||
{
|
||||
setTotalAmt (Env.ZERO);
|
||||
setIsApproved (false);
|
||||
setProcessed (false);
|
||||
setProcessing (false);
|
||||
}
|
||||
} // MHRPaySelection
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MHRPaySelection(Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
} // MHRPaySelection
|
||||
|
||||
/** Lines */
|
||||
private MHRPaySelectionLine[] m_lines = null;
|
||||
/** Currency of Bank Account */
|
||||
private int m_C_Currency_ID = 0;
|
||||
|
||||
/**
|
||||
* Get Lines
|
||||
* @param requery requery
|
||||
* @return lines
|
||||
*/
|
||||
public MHRPaySelectionLine[] getLines(boolean requery)
|
||||
{
|
||||
if (m_lines != null && !requery) {
|
||||
set_TrxName(m_lines, get_TrxName());
|
||||
return m_lines;
|
||||
}
|
||||
ArrayList<MHRPaySelectionLine> list = new ArrayList<MHRPaySelectionLine>();
|
||||
String sql = "SELECT * FROM HR_PaySelectionLine WHERE HR_PaySelection_ID=? ORDER BY Line";
|
||||
PreparedStatement pstmt = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement (sql, get_TrxName());
|
||||
pstmt.setInt (1, getHR_PaySelection_ID());
|
||||
ResultSet rs = pstmt.executeQuery ();
|
||||
while (rs.next ())
|
||||
list.add (new MHRPaySelectionLine(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 MHRPaySelectionLine[list.size ()];
|
||||
list.toArray (m_lines);
|
||||
return m_lines;
|
||||
} // getLines
|
||||
|
||||
/**
|
||||
* Get Currency of Bank Account
|
||||
* @return C_Currency_ID
|
||||
*/
|
||||
public int getC_Currency_ID()
|
||||
{
|
||||
if (m_C_Currency_ID == 0)
|
||||
{
|
||||
String sql = "SELECT C_Currency_ID FROM C_BankAccount "
|
||||
+ "WHERE C_BankAccount_ID=?";
|
||||
m_C_Currency_ID = DB.getSQLValue(null, sql, getC_BankAccount_ID());
|
||||
}
|
||||
return m_C_Currency_ID;
|
||||
} // getC_Currency_ID
|
||||
|
||||
|
||||
/**
|
||||
* String Representation
|
||||
* @return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer("MHRPaySelection[");
|
||||
sb.append(get_ID()).append(",").append(getName())
|
||||
.append("]");
|
||||
return sb.toString();
|
||||
} // toString
|
||||
|
||||
|
||||
|
||||
} // MHRPaySelection
|
|
@ -1,664 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* 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 *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.I_C_Payment;
|
||||
import org.compiere.model.MBPBankAccount;
|
||||
import org.compiere.model.MCurrency;
|
||||
import org.compiere.model.MPayment;
|
||||
import org.compiere.model.MPaymentBatch;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.X_C_Order;
|
||||
import org.compiere.model.X_C_Payment;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/**
|
||||
* Payroll Payment Print/Export model.
|
||||
*
|
||||
* @author victor.perez@e-evolution.com, www.e-evolution.com
|
||||
* @author oscar.gomez@e-evolution.com, www.e-evolution.com
|
||||
*/
|
||||
public final class MHRPaySelectionCheck extends X_HR_PaySelectionCheck
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -280580616570711570L;
|
||||
|
||||
/**
|
||||
* Get Check for Payment
|
||||
* @param ctx context
|
||||
* @param C_Payment_ID id
|
||||
* @param trxName transaction
|
||||
* @return pay selection check for payment or null
|
||||
*/
|
||||
public static MHRPaySelectionCheck getOfPayment (Properties ctx, int C_Payment_ID, String trxName)
|
||||
{
|
||||
final String where = I_C_Payment.COLUMNNAME_C_Payment_ID + "=?";
|
||||
List<MHRPaySelectionCheck> pscs = new Query(ctx, I_HR_PaySelectionCheck.Table_Name, where , trxName)
|
||||
.setParameters(new Object[]{C_Payment_ID})
|
||||
.list();
|
||||
|
||||
MHRPaySelectionCheck retValue = null;
|
||||
int count = 0;
|
||||
for(MHRPaySelectionCheck psc : pscs)
|
||||
{
|
||||
if (retValue == null)
|
||||
retValue = psc;
|
||||
else if (!retValue.isProcessed() && psc.isProcessed())
|
||||
retValue = psc;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count > 1)
|
||||
s_log.warning ("More then one for C_Payment_ID=" + C_Payment_ID);
|
||||
return retValue;
|
||||
} // getOfPayment
|
||||
|
||||
/**************************************************************************
|
||||
* Payroll Get Checks of Payment Selection
|
||||
*
|
||||
* @param ctx Context
|
||||
* @param HR_PaySelection_ID Payment Selection
|
||||
* @param PaymentRule Payment Rule
|
||||
* @param startDocumentNo start document no
|
||||
* @param trxName transaction
|
||||
* @return array of checks
|
||||
*/
|
||||
static public Collection<MHRPaySelectionCheck> get (Properties ctx, int HR_PaySelection_ID,
|
||||
String PaymentRule, int startDocumentNo, String trxName)
|
||||
{
|
||||
s_log.fine("HR_PaySelection_ID=" + HR_PaySelection_ID
|
||||
+ ", PaymentRule=" + PaymentRule + ", startDocumentNo=" + startDocumentNo);
|
||||
|
||||
final String where = I_HR_PaySelectionCheck.COLUMNNAME_HR_PaySelection_ID + "=? AND "
|
||||
+ I_HR_PaySelectionCheck.COLUMNNAME_PaymentRule + "=?";
|
||||
|
||||
Collection<MHRPaySelectionCheck> pscs = new Query(ctx, I_HR_PaySelectionCheck.Table_Name, where , trxName)
|
||||
.setClient_ID()
|
||||
.setParameters(new Object[]{HR_PaySelection_ID, PaymentRule})
|
||||
.list();
|
||||
|
||||
int docNo = startDocumentNo;
|
||||
|
||||
for (MHRPaySelectionCheck psc : pscs)
|
||||
{
|
||||
psc.setDocumentNo(String.valueOf(docNo++));
|
||||
}
|
||||
|
||||
return pscs;
|
||||
} // get
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Export to File
|
||||
* @param checks array of checks
|
||||
* @param file file to export checks
|
||||
* @return number of lines
|
||||
*/
|
||||
public static int exportToFile (Collection<MHRPaySelectionCheck> checks, File file)
|
||||
{
|
||||
if (checks == null || checks.size() == 0)
|
||||
return 0;
|
||||
// Must be a file
|
||||
if (file.isDirectory())
|
||||
{
|
||||
s_log.log(Level.WARNING, "File is directory - " + file.getAbsolutePath());
|
||||
return 0;
|
||||
}
|
||||
// delete if exists
|
||||
try
|
||||
{
|
||||
if (file.exists())
|
||||
file.delete();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
s_log.log(Level.WARNING, "Could not delete - " + file.getAbsolutePath(), e);
|
||||
}
|
||||
|
||||
char x = '"'; // ease
|
||||
int noLines = 0;
|
||||
StringBuffer line = null;
|
||||
try
|
||||
{
|
||||
FileWriter fw = new FileWriter(file);
|
||||
|
||||
// write header
|
||||
line = new StringBuffer();
|
||||
line.append(x).append("Value").append(x).append(",")
|
||||
.append(x).append("Name").append(x).append(",")
|
||||
.append(x).append("Contact").append(x).append(",")
|
||||
.append(x).append("Addr1").append(x).append(",")
|
||||
.append(x).append("Addr2").append(x).append(",")
|
||||
.append(x).append("City").append(x).append(",")
|
||||
.append(x).append("State").append(x).append(",")
|
||||
.append(x).append("ZIP").append(x).append(",")
|
||||
.append(x).append("Country").append(x).append(",")
|
||||
.append(x).append("ReferenceNo").append(x).append(",")
|
||||
.append(x).append("DocumentNo").append(x).append(",")
|
||||
.append(x).append("PayDate").append(x).append(",")
|
||||
.append(x).append("Currency").append(x).append(",")
|
||||
.append(x).append("PayAmount").append(x).append(",")
|
||||
.append(x).append("Comment").append(x)
|
||||
.append(Env.NL);
|
||||
fw.write(line.toString());
|
||||
noLines++;
|
||||
|
||||
// write lines
|
||||
for (MHRPaySelectionCheck mpp : checks)
|
||||
{
|
||||
if (mpp == null)
|
||||
continue;
|
||||
// BPartner Info
|
||||
String bp[] = getBPartnerInfo(mpp.getC_BPartner_ID());
|
||||
line = new StringBuffer();
|
||||
line.append(x).append(bp[BP_VALUE]).append(x).append(",") // Value
|
||||
.append(x).append(bp[BP_NAME]).append(x).append(",") // Name
|
||||
.append(x).append(bp[BP_CONTACT]).append(x).append(",") // Contact
|
||||
.append(x).append(bp[BP_ADDR1]).append(x).append(",") // Addr1
|
||||
.append(x).append(bp[BP_ADDR2]).append(x).append(",") // Addr2
|
||||
.append(x).append(bp[BP_CITY]).append(x).append(",") // City
|
||||
.append(x).append(bp[BP_REGION]).append(x).append(",") // State
|
||||
.append(x).append(bp[BP_POSTAL]).append(x).append(",") // ZIP
|
||||
.append(x).append(bp[BP_COUNTRY]).append(x).append(",") // Country
|
||||
.append(x).append(bp[BP_REFNO]).append(x).append(",") // ReferenceNo
|
||||
// Payment Info
|
||||
.append(x).append(mpp.getDocumentNo()).append(x).append(",") // DocumentNo
|
||||
.append(mpp.getParent().getPayDate()).append(",") // PayDate
|
||||
.append(x).append(MCurrency.getISO_Code(Env.getCtx(), mpp.getParent().getC_Currency_ID())).append(x).append(",") // Currency
|
||||
.append(mpp.getPayAmt()).append(",") // PayAmount
|
||||
//.append(x).append(comment.toString()).append(x) // Comment
|
||||
.append(Env.NL);
|
||||
fw.write(line.toString());
|
||||
noLines++;
|
||||
} // write line
|
||||
|
||||
fw.flush();
|
||||
fw.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
s_log.log(Level.SEVERE, "", e);
|
||||
}
|
||||
|
||||
return noLines;
|
||||
} // exportToFile
|
||||
|
||||
/**
|
||||
* Get Customer/Vendor Info.
|
||||
* Based on BP_ static variables
|
||||
* @param C_BPartner_ID BPartner
|
||||
* @return info array
|
||||
*/
|
||||
private static String[] getBPartnerInfo (int C_BPartner_ID)
|
||||
{
|
||||
String[] bp = new String[10];
|
||||
|
||||
String sql = "SELECT bp.Value, bp.Name, c.Name AS Contact, "
|
||||
+ "a.Address1, a.Address2, a.City, r.Name AS Region, a.Postal, "
|
||||
+ "cc.Name AS Country, bp.ReferenceNo "
|
||||
+ "FROM C_BPartner bp, AD_User c, C_BPartner_Location l, C_Location a, C_Region r, C_Country cc "
|
||||
+ "WHERE bp.C_BPartner_ID=?" // #1
|
||||
+ " AND bp.C_BPartner_ID=c.C_BPartner_ID(+)"
|
||||
+ " AND bp.C_BPartner_ID=l.C_BPartner_ID"
|
||||
+ " AND l.C_Location_ID=a.C_Location_ID"
|
||||
+ " AND a.C_Region_ID=r.C_Region_ID(+)"
|
||||
+ " AND a.C_Country_ID=cc.C_Country_ID "
|
||||
+ "ORDER BY l.IsBillTo DESC";
|
||||
try
|
||||
{
|
||||
PreparedStatement pstmt = DB.prepareStatement(sql, null);
|
||||
pstmt.setInt(1, C_BPartner_ID);
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
//
|
||||
if (rs.next())
|
||||
{
|
||||
bp[BP_VALUE] = rs.getString(1);
|
||||
if (bp[BP_VALUE] == null)
|
||||
bp[BP_VALUE] = "";
|
||||
bp[BP_NAME] = rs.getString(2);
|
||||
if (bp[BP_NAME] == null)
|
||||
bp[BP_NAME] = "";
|
||||
bp[BP_CONTACT] = rs.getString(3);
|
||||
if (bp[BP_CONTACT] == null)
|
||||
bp[BP_CONTACT] = "";
|
||||
bp[BP_ADDR1] = rs.getString(4);
|
||||
if (bp[BP_ADDR1] == null)
|
||||
bp[BP_ADDR1] = "";
|
||||
bp[BP_ADDR2] = rs.getString(5);
|
||||
if (bp[BP_ADDR2] == null)
|
||||
bp[BP_ADDR2] = "";
|
||||
bp[BP_CITY] = rs.getString(6);
|
||||
if (bp[BP_CITY] == null)
|
||||
bp[BP_CITY] = "";
|
||||
bp[BP_REGION] = rs.getString(7);
|
||||
if (bp[BP_REGION] == null)
|
||||
bp[BP_REGION] = "";
|
||||
bp[BP_POSTAL] = rs.getString(8);
|
||||
if (bp[BP_POSTAL] == null)
|
||||
bp[BP_POSTAL] = "";
|
||||
bp[BP_COUNTRY] = rs.getString(9);
|
||||
if (bp[BP_COUNTRY] == null)
|
||||
bp[BP_COUNTRY] = "";
|
||||
bp[BP_REFNO] = rs.getString(10);
|
||||
if (bp[BP_REFNO] == null)
|
||||
bp[BP_REFNO] = "";
|
||||
}
|
||||
rs.close();
|
||||
pstmt.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
s_log.log(Level.SEVERE, sql, e);
|
||||
}
|
||||
return bp;
|
||||
} // getBPartnerInfo
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* Confirm Print.
|
||||
* Create Payments the first time
|
||||
* @param checks checks
|
||||
* @param batch batch
|
||||
* @return last Document number or 0 if nothing printed
|
||||
*/
|
||||
public static int confirmPrint (Collection<MHRPaySelectionCheck> checks , MPaymentBatch batch)
|
||||
{
|
||||
int lastDocumentNo = 0;
|
||||
for (MHRPaySelectionCheck check : checks)
|
||||
{
|
||||
|
||||
String sqlConcept = "SELECT HR_Concept_ID FROM HR_Movement " +
|
||||
" WHERE HR_Movement_ID IN(SELECT HR_Movement_ID FROM HR_PaySelectionLine " +
|
||||
" WHERE C_BPartner_ID="+check.getC_BPartner_ID()+
|
||||
" AND HR_PaySelection_ID="+check.getHR_PaySelection_ID()+")";
|
||||
System.err.println("Concept: " + sqlConcept);
|
||||
|
||||
int HR_Concept_ID = DB.getSQLValue(check.get_TrxName(), sqlConcept);
|
||||
|
||||
String sqlPayroll = "SELECT HR_Payroll_ID FROM HR_Process " +
|
||||
" WHERE HR_Process_ID IN(SELECT HR_Process_ID FROM HR_Movement "+
|
||||
" WHERE HR_Movement_ID IN(SELECT HR_Movement_ID FROM HR_PaySelectionLine " +
|
||||
" WHERE C_BPartner_ID="+check.getC_BPartner_ID()+
|
||||
" AND HR_PaySelection_ID="+check.getHR_PaySelection_ID()+") )";
|
||||
|
||||
System.err.println("Payroll: " + sqlPayroll);
|
||||
int HR_Payroll_ID = DB.getSQLValue(check.get_TrxName(), sqlPayroll);
|
||||
MHRConcept concept = new MHRConcept(check.getCtx(),HR_Concept_ID,check.get_TrxName());
|
||||
MHRPayroll payroll = new MHRPayroll(check.getCtx(),HR_Payroll_ID,check.get_TrxName());
|
||||
|
||||
|
||||
MPayment payment = new MPayment(check.getCtx(), check.getC_Payment_ID(), check.get_TrxName());
|
||||
// Existing Payment
|
||||
if (check.getC_Payment_ID() != 0)
|
||||
{
|
||||
// Update check number
|
||||
if (check.getPaymentRule().equals(PAYMENTRULE_Check))
|
||||
{
|
||||
payment.setCheckNo(check.getDocumentNo());
|
||||
if (!payment.save())
|
||||
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
|
||||
}
|
||||
}
|
||||
else // New Payment
|
||||
{
|
||||
payment = new MPayment(check.getCtx(), 0, null);
|
||||
// BEGIN e-Evolution ECISA
|
||||
//payment.setAD_Org_ID(check.getAD_Org_ID());
|
||||
// END e-Evolution ECISA
|
||||
//
|
||||
if (check.getPaymentRule().equals(PAYMENTRULE_Check))
|
||||
payment.setBankCheck (check.getParent().getC_BankAccount_ID(), false, check.getDocumentNo());
|
||||
else if (check.getPaymentRule().equals(PAYMENTRULE_CreditCard))
|
||||
payment.setTenderType(X_C_Payment.TENDERTYPE_CreditCard);
|
||||
else if (check.getPaymentRule().equals(PAYMENTRULE_DirectDeposit)
|
||||
|| check.getPaymentRule().equals(PAYMENTRULE_DirectDebit))
|
||||
payment.setTenderType(X_C_Payment.TENDERTYPE_DirectDebit);
|
||||
else
|
||||
{
|
||||
s_log.log(Level.SEVERE, "Unsupported Payment Rule=" + check.getPaymentRule());
|
||||
continue;
|
||||
}
|
||||
payment.setTrxType(X_C_Payment.TRXTYPE_CreditPayment);
|
||||
payment.setAmount(check.getParent().getC_Currency_ID(), check.getPayAmt());
|
||||
payment.setDiscountAmt(check.getDiscountAmt());
|
||||
payment.setDateTrx(check.getParent().getPayDate());
|
||||
payment.setDateAcct(payment.getDateTrx()); // globalqss [ 2030685 ]
|
||||
payment.setC_BPartner_ID(check.getC_BPartner_ID());
|
||||
|
||||
/*
|
||||
// Link to Batch
|
||||
if (batch != null)
|
||||
{
|
||||
if (batch.getC_PaymentBatch_ID() == 0)
|
||||
batch.save(); // new
|
||||
payment.setC_PaymentBatch_ID(batch.getC_PaymentBatch_ID());
|
||||
}
|
||||
*/
|
||||
int C_Charge_ID = DB.getSQLValue(check.get_TrxName(),
|
||||
"SELECT MAX(C_Charge_ID) FROM HR_Attribute WHERE IsActive='Y' AND HR_Concept_ID="+HR_Concept_ID);
|
||||
if(C_Charge_ID <= 0) // modify e-Evolution 25May2010 if(C_Charge_ID < 0)
|
||||
payment.setC_Charge_ID(payroll.getC_Charge_ID());
|
||||
else
|
||||
payment.setC_Charge_ID(C_Charge_ID);
|
||||
|
||||
payment.setC_BankAccount_ID(check.getParent().getC_BankAccount_ID());
|
||||
payment.setWriteOffAmt(Env.ZERO);
|
||||
if (!payment.save())
|
||||
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
|
||||
//
|
||||
int C_Payment_ID = payment.get_ID();
|
||||
if (C_Payment_ID < 1)
|
||||
s_log.log(Level.SEVERE, "Payment not created=" + check);
|
||||
else
|
||||
{
|
||||
check.setC_Payment_ID (C_Payment_ID);
|
||||
check.save(); // Payment process needs it
|
||||
// Should start WF
|
||||
payment.processIt(DocAction.ACTION_Complete);
|
||||
if (!payment.save())
|
||||
s_log.log(Level.SEVERE, "Payment not saved: " + payment);
|
||||
// BEGIN e-Evolution ECISA 25May2010
|
||||
payment.setAD_Org_ID(check.getAD_Org_ID());
|
||||
payment.setAD_OrgTrx_ID(check.getAD_Org_ID());
|
||||
payment.saveEx();
|
||||
// END e-Evolution 25May2010
|
||||
}
|
||||
} // new Payment
|
||||
|
||||
// Get Check Document No
|
||||
try
|
||||
{
|
||||
int no = Integer.parseInt(check.getDocumentNo());
|
||||
if (lastDocumentNo < no)
|
||||
lastDocumentNo = no;
|
||||
}
|
||||
catch (NumberFormatException ex)
|
||||
{
|
||||
s_log.log(Level.SEVERE, "DocumentNo=" + check.getDocumentNo(), ex);
|
||||
}
|
||||
check.setIsPrinted(true);
|
||||
check.setProcessed(true);
|
||||
if (!check.save ())
|
||||
s_log.log(Level.SEVERE, "Check not saved: " + check);
|
||||
} // all checks
|
||||
|
||||
s_log.fine("Last Document No = " + lastDocumentNo);
|
||||
return lastDocumentNo;
|
||||
} // confirmPrint
|
||||
|
||||
/** Logger */
|
||||
static private CLogger s_log = CLogger.getCLogger (MHRPaySelectionCheck.class);
|
||||
/** BPartner Info Index for Value */
|
||||
private static final int BP_VALUE = 0;
|
||||
/** BPartner Info Index for Name */
|
||||
private static final int BP_NAME = 1;
|
||||
/** BPartner Info Index for Contact Name */
|
||||
private static final int BP_CONTACT = 2;
|
||||
/** BPartner Info Index for Address 1 */
|
||||
private static final int BP_ADDR1 = 3;
|
||||
/** BPartner Info Index for Address 2 */
|
||||
private static final int BP_ADDR2 = 4;
|
||||
/** BPartner Info Index for City */
|
||||
private static final int BP_CITY = 5;
|
||||
/** BPartner Info Index for Region */
|
||||
private static final int BP_REGION = 6;
|
||||
/** BPartner Info Index for Postal Code */
|
||||
private static final int BP_POSTAL = 7;
|
||||
/** BPartner Info Index for Country */
|
||||
private static final int BP_COUNTRY = 8;
|
||||
/** BPartner Info Index for Reference No */
|
||||
private static final int BP_REFNO = 9;
|
||||
|
||||
/**************************************************************************
|
||||
* Constructor
|
||||
* @param ctx context
|
||||
* @param C_PaySelectionCheck_ID C_PaySelectionCheck_ID
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MHRPaySelectionCheck (Properties ctx, int HR_PaySelectionCheck_ID, String trxName)
|
||||
{
|
||||
super(ctx, HR_PaySelectionCheck_ID, trxName);
|
||||
if (HR_PaySelectionCheck_ID == 0)
|
||||
{
|
||||
setPayAmt (Env.ZERO);
|
||||
setDiscountAmt(Env.ZERO);
|
||||
setIsPrinted (false);
|
||||
setIsReceipt (false);
|
||||
setQty (0);
|
||||
}
|
||||
} // MHRPaySelectionCheck
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MHRPaySelectionCheck(Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
} // MHRPaySelectionCheck
|
||||
|
||||
/**
|
||||
* Create from Line
|
||||
* @param line payment selection
|
||||
* @param PaymentRule payment rule
|
||||
*/
|
||||
public MHRPaySelectionCheck (MHRPaySelectionLine line, String PaymentRule)
|
||||
{
|
||||
this (line.getCtx(), 0, line.get_TrxName());
|
||||
setClientOrg(line);
|
||||
setHR_PaySelection_ID (line.getHR_PaySelection_ID());
|
||||
setAD_Org_ID(line.getHR_Movement().getAD_Org_ID()); // add e-Evolution ECISA 24May2010
|
||||
int C_BPartner_ID = line.getHR_Movement().getC_BPartner_ID();
|
||||
setC_BPartner_ID (C_BPartner_ID);
|
||||
//
|
||||
if (X_C_Order.PAYMENTRULE_DirectDebit.equals(PaymentRule))
|
||||
{
|
||||
MBPBankAccount[] bas = MBPBankAccount.getOfBPartner (line.getCtx(), C_BPartner_ID);
|
||||
for (int i = 0; i < bas.length; i++)
|
||||
{
|
||||
MBPBankAccount account = bas[i];
|
||||
if (account.isDirectDebit())
|
||||
{
|
||||
setC_BP_BankAccount_ID(account.getC_BP_BankAccount_ID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (X_C_Order.PAYMENTRULE_DirectDeposit.equals(PaymentRule))
|
||||
{
|
||||
MBPBankAccount[] bas = MBPBankAccount.getOfBPartner (line.getCtx(), C_BPartner_ID);
|
||||
for (int i = 0; i < bas.length; i++)
|
||||
{
|
||||
MBPBankAccount account = bas[i];
|
||||
if (account.isDirectDeposit())
|
||||
{
|
||||
setC_BP_BankAccount_ID(account.getC_BP_BankAccount_ID());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
setPaymentRule (PaymentRule);
|
||||
//
|
||||
setIsReceipt(line.isSOTrx());
|
||||
setPayAmt (line.getPayAmt());
|
||||
setDiscountAmt(line.getDiscountAmt());
|
||||
setQty (1);
|
||||
} // MPaySelectionCheck
|
||||
|
||||
/**
|
||||
* Create from Pay Selection
|
||||
* @param ps payment selection
|
||||
* @param PaymentRule payment rule
|
||||
*/
|
||||
public MHRPaySelectionCheck (MHRPaySelection ps, String PaymentRule)
|
||||
{
|
||||
this (ps.getCtx(), 0, ps.get_TrxName());
|
||||
setClientOrg(ps);
|
||||
setHR_PaySelection_ID (ps.getHR_PaySelection_ID());
|
||||
setPaymentRule (PaymentRule);
|
||||
} // MHRPaySelectionCheck
|
||||
|
||||
|
||||
/** Parent */
|
||||
private MHRPaySelection m_parent = null;
|
||||
/** Payment Selection lines of this check */
|
||||
private Collection<MHRPaySelectionLine> m_lines = null;
|
||||
|
||||
|
||||
/**
|
||||
* Add Payment Selection Line
|
||||
* @param line line
|
||||
*/
|
||||
public void addLine (MHRPaySelectionLine line)
|
||||
{
|
||||
if (getC_BPartner_ID() != line.getHR_Movement().getC_BPartner_ID())
|
||||
throw new IllegalArgumentException("Line for fifferent BPartner");
|
||||
//
|
||||
if (isReceipt() == line.isSOTrx())
|
||||
{
|
||||
setPayAmt (getPayAmt().add(line.getPayAmt()));
|
||||
setDiscountAmt(getDiscountAmt().add(line.getDiscountAmt()));
|
||||
}
|
||||
else
|
||||
{
|
||||
setPayAmt (getPayAmt().subtract(line.getPayAmt()));
|
||||
setDiscountAmt(getDiscountAmt().subtract(line.getDiscountAmt()));
|
||||
}
|
||||
setQty (getQty()+1);
|
||||
} // addLine
|
||||
|
||||
/**
|
||||
* Get Parent
|
||||
* @return parent
|
||||
*/
|
||||
public MHRPaySelection getParent()
|
||||
{
|
||||
if (m_parent == null)
|
||||
m_parent = new MHRPaySelection (getCtx(), getHR_PaySelection_ID(), get_TrxName());
|
||||
return m_parent;
|
||||
} // getParent
|
||||
|
||||
/**
|
||||
* Is this a valid Prepared Payment
|
||||
* @return true if valid
|
||||
*/
|
||||
public boolean isValid()
|
||||
{
|
||||
if (getC_BP_BankAccount_ID() != 0)
|
||||
return true;
|
||||
return !isDirect();
|
||||
} // isValid
|
||||
|
||||
/**
|
||||
* Is this a direct Debit or Deposit
|
||||
* @return true if direct
|
||||
*/
|
||||
public boolean isDirect()
|
||||
{
|
||||
return (X_C_Order.PAYMENTRULE_DirectDeposit.equals(getPaymentRule())
|
||||
|| X_C_Order.PAYMENTRULE_DirectDebit.equals(getPaymentRule()));
|
||||
} // isDirect
|
||||
|
||||
/**
|
||||
* String Representation
|
||||
* @return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer("MHRPaymentCheck[");
|
||||
sb.append(get_ID()).append("-").append(getDocumentNo())
|
||||
.append("-").append(getPayAmt())
|
||||
.append(",PaymetRule=").append(getPaymentRule())
|
||||
.append(",Qty=").append(getQty())
|
||||
.append("]");
|
||||
return sb.toString();
|
||||
} // toString
|
||||
|
||||
/**
|
||||
* Get Payment Selection Lines of this check
|
||||
* @param requery requery
|
||||
* @return array of peyment selection lines
|
||||
*/
|
||||
public Collection<MHRPaySelectionLine> getPaySelectionLines (boolean requery)
|
||||
{
|
||||
if (m_lines != null && !requery) {
|
||||
return m_lines;
|
||||
}
|
||||
final String where = COLUMNNAME_HR_PaySelectionCheck_ID + "=?";
|
||||
Collection<MHRPaySelectionLine> list = new Query(getCtx(), I_HR_PaySelectionLine.Table_Name, where , get_TrxName())
|
||||
.setClient_ID()
|
||||
.setParameters(new Object[]{getHR_PaySelectionCheck_ID()})
|
||||
.setOrderBy(I_HR_PaySelectionLine.COLUMNNAME_Line)
|
||||
.list();
|
||||
|
||||
m_lines = list;
|
||||
return m_lines;
|
||||
} // getPaySelectionLines
|
||||
|
||||
/**
|
||||
* Delete Payment Selection when generated as Draft (Print Preview)
|
||||
* @param ctx context
|
||||
* @param C_Payment_ID id
|
||||
* @param trxName transaction
|
||||
* @return
|
||||
*/
|
||||
public static boolean deleteGeneratedDraft(Properties ctx, int C_Payment_ID, String trxName)
|
||||
{
|
||||
|
||||
MHRPaySelectionCheck mpsc = MHRPaySelectionCheck.getOfPayment (ctx, C_Payment_ID, trxName);
|
||||
|
||||
if (mpsc != null && mpsc.isGeneratedDraft())
|
||||
{
|
||||
MHRPaySelection mps = new MHRPaySelection(ctx, mpsc.getHR_PaySelection_ID(),trxName);
|
||||
MHRPaySelectionLine[] mpsl = mps.getLines(true);
|
||||
|
||||
// Delete Pay Selection lines
|
||||
for (int i = 0; i < mpsl.length; i++)
|
||||
{
|
||||
if (!mpsl[i].delete(true, trxName))
|
||||
return false;
|
||||
}
|
||||
// Delete Pay Selection Check
|
||||
if (!mpsc.delete(true, trxName))
|
||||
return false;
|
||||
|
||||
// Delete Pay Selection
|
||||
if (!mps.delete(true, trxName))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // MPaySelectionCheck
|
|
@ -1,131 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* 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 *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/**
|
||||
* Payroll for HRayroll Module
|
||||
*
|
||||
* @author victor.perez@e-evolution.com, www.e-evolution.com
|
||||
*
|
||||
*/
|
||||
public class MHRPaySelectionLine extends X_HR_PaySelectionLine
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3486055138810301789L;
|
||||
|
||||
/**
|
||||
* Standard Constructor
|
||||
* @param ctx context
|
||||
* @param C_PaySelectionLine_ID id
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MHRPaySelectionLine (Properties ctx, int HR_PaySelectionLine_ID, String trxName)
|
||||
{
|
||||
super(ctx, HR_PaySelectionLine_ID, trxName);
|
||||
if (HR_PaySelectionLine_ID == 0)
|
||||
{
|
||||
setIsSOTrx (false);
|
||||
setOpenAmt(Env.ZERO);
|
||||
setPayAmt (Env.ZERO);
|
||||
setDiscountAmt(Env.ZERO);
|
||||
setDifferenceAmt (Env.ZERO);
|
||||
setIsManual (false);
|
||||
}
|
||||
} // MHRPaySelectionLine
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
* @param trxName transaction
|
||||
*/
|
||||
public MHRPaySelectionLine(Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
} // MHRPaySelectionLine
|
||||
|
||||
/**
|
||||
* Parent Constructor
|
||||
* @param ps parent
|
||||
* @param Line line
|
||||
* @param PaymentRule payment rule
|
||||
*/
|
||||
public MHRPaySelectionLine (MHRPaySelection ps, int Line, String PaymentRule)
|
||||
{
|
||||
this (ps.getCtx(), 0, ps.get_TrxName());
|
||||
setClientOrg(ps);
|
||||
setHR_PaySelection_ID(ps.getHR_PaySelection_ID());
|
||||
setLine(Line);
|
||||
setPaymentRule(PaymentRule);
|
||||
} // MHRPaySelectionLine
|
||||
|
||||
/**
|
||||
* Before Save
|
||||
* @param newRecord new
|
||||
* @return true
|
||||
*/
|
||||
protected boolean beforeSave (boolean newRecord)
|
||||
{
|
||||
setDifferenceAmt(getOpenAmt().subtract(getPayAmt()).subtract(getDiscountAmt()));
|
||||
return true;
|
||||
} // beforeSave
|
||||
|
||||
/**
|
||||
* After Save
|
||||
* @param newRecord new
|
||||
* @param success success
|
||||
* @return success
|
||||
*/
|
||||
protected boolean afterSave (boolean newRecord, boolean success)
|
||||
{
|
||||
setHeader();
|
||||
return success;
|
||||
} // afterSave
|
||||
|
||||
/**
|
||||
* After Delete
|
||||
* @param success success
|
||||
* @return sucess
|
||||
*/
|
||||
protected boolean afterDelete (boolean success)
|
||||
{
|
||||
setHeader();
|
||||
return success;
|
||||
} // afterDelete
|
||||
|
||||
/**
|
||||
* Recalculate Header Sum
|
||||
*/
|
||||
private void setHeader()
|
||||
{
|
||||
// Update Header
|
||||
String sql = "UPDATE HR_PaySelection ps "
|
||||
+ "SET TotalAmt = (SELECT COALESCE(SUM(psl.PayAmt),0) "
|
||||
+ "FROM HR_PaySelectionLine psl "
|
||||
+ "WHERE ps.HR_PaySelection_ID=psl.HR_PaySelection_ID AND psl.IsActive='Y') "
|
||||
+ "WHERE HR_PaySelection_ID=" + getHR_PaySelection_ID();
|
||||
DB.executeUpdate(sql, get_TrxName());
|
||||
} // setHeader
|
||||
|
||||
} // MPaySelectionLine
|
|
@ -1,142 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* 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 *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.model.MCalendar;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* Payroll for HRayroll Module
|
||||
*
|
||||
* @author Oscar Gómez Islas
|
||||
* @version $Id: HRPayroll.java,v 1.0 2005/10/05 ogomezi
|
||||
*
|
||||
* @author Cristina Ghita, www.arhipac.ro
|
||||
*/
|
||||
public class MHRPayroll extends X_HR_Payroll
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1407037967021019961L;
|
||||
/** Cache */
|
||||
private static CCache<Integer, MHRPayroll> s_cache = new CCache<Integer, MHRPayroll>(Table_Name, 10);
|
||||
/** Cache */
|
||||
private static CCache<String, MHRPayroll> s_cacheValue = new CCache<String, MHRPayroll>(Table_Name+"_Value", 10);
|
||||
|
||||
/**
|
||||
* Get Payroll by Value
|
||||
* @param ctx
|
||||
* @param value
|
||||
* @return payroll
|
||||
*/
|
||||
public static MHRPayroll forValue(Properties ctx, String value)
|
||||
{
|
||||
if (Util.isEmpty(value, true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
int AD_Client_ID = Env.getAD_Client_ID(ctx);
|
||||
final String key = AD_Client_ID+"#"+value;
|
||||
MHRPayroll payroll = s_cacheValue.get(key);
|
||||
if (payroll != null)
|
||||
{
|
||||
return payroll;
|
||||
}
|
||||
|
||||
final String whereClause = COLUMNNAME_Value+"=? AND AD_Client_ID IN (?,?)";
|
||||
payroll = new Query(ctx, Table_Name, whereClause, null)
|
||||
.setParameters(new Object[]{value, 0, AD_Client_ID})
|
||||
.setOnlyActiveRecords(true)
|
||||
.setOrderBy("AD_Client_ID DESC")
|
||||
.first();
|
||||
if (payroll != null)
|
||||
{
|
||||
s_cacheValue.put(key, payroll);
|
||||
s_cache.put(payroll.get_ID(), payroll);
|
||||
}
|
||||
return payroll;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Payroll by ID
|
||||
* @param ctx
|
||||
* @param HR_Payroll_ID
|
||||
* @return payroll
|
||||
*/
|
||||
public static MHRPayroll get(Properties ctx, int HR_Payroll_ID)
|
||||
{
|
||||
if (HR_Payroll_ID <= 0)
|
||||
return null;
|
||||
//
|
||||
MHRPayroll payroll = s_cache.get(HR_Payroll_ID);
|
||||
if (payroll != null)
|
||||
return payroll;
|
||||
//
|
||||
payroll = new MHRPayroll(ctx, HR_Payroll_ID, null);
|
||||
if (payroll.get_ID() == HR_Payroll_ID)
|
||||
{
|
||||
s_cache.put(HR_Payroll_ID, payroll);
|
||||
}
|
||||
else
|
||||
{
|
||||
payroll = null;
|
||||
}
|
||||
return payroll;
|
||||
}
|
||||
|
||||
/**
|
||||
* Standard Constructor
|
||||
* @param ctx context
|
||||
* @param HR_Payroll_ID id
|
||||
*/
|
||||
public MHRPayroll (Properties ctx, int HR_Payroll_ID, String trxName)
|
||||
{
|
||||
super (ctx, HR_Payroll_ID, trxName);
|
||||
if (HR_Payroll_ID == 0)
|
||||
{
|
||||
setProcessing (false); // N
|
||||
}
|
||||
} // HRPayroll
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
*/
|
||||
public MHRPayroll (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parent Constructor
|
||||
* @param parent parent
|
||||
*/
|
||||
public MHRPayroll (MCalendar calendar)
|
||||
{
|
||||
this (calendar.getCtx(), 0, calendar.get_TrxName());
|
||||
setClientOrg(calendar);
|
||||
//setC_Calendar_ID(calendar.getC_Calendar_ID());
|
||||
} // HRPayroll
|
||||
} // MPayroll
|
|
@ -1,301 +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.eevolution.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;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Model for HR_PaySelection
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.5.4a - $Id$ */
|
||||
public class X_HR_PaySelection extends PO implements I_HR_PaySelection, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20091211L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_HR_PaySelection (Properties ctx, int HR_PaySelection_ID, String trxName)
|
||||
{
|
||||
super (ctx, HR_PaySelection_ID, trxName);
|
||||
/** if (HR_PaySelection_ID == 0)
|
||||
{
|
||||
setC_BankAccount_ID (0);
|
||||
setHR_PaySelection_ID (0);
|
||||
setIsApproved (false);
|
||||
setName (null);
|
||||
// @#Date@
|
||||
setPayDate (new Timestamp( System.currentTimeMillis() ));
|
||||
// @#Date@
|
||||
setProcessed (false);
|
||||
setProcessing (false);
|
||||
setTotalAmt (Env.ZERO);
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_HR_PaySelection (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_PaySelection[")
|
||||
.append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public I_C_BankAccount getC_BankAccount() throws RuntimeException
|
||||
{
|
||||
return (I_C_BankAccount)MTable.get(getCtx(), I_C_BankAccount.Table_Name)
|
||||
.getPO(getC_BankAccount_ID(), get_TrxName()); }
|
||||
|
||||
/** 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 Create lines from.
|
||||
@param CreateFrom
|
||||
Process which will generate a new document lines based on an existing document
|
||||
*/
|
||||
public void setCreateFrom (String CreateFrom)
|
||||
{
|
||||
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 Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
set_Value (COLUMNNAME_Description, Description);
|
||||
}
|
||||
|
||||
/** Get Description.
|
||||
@return Optional short description of the record
|
||||
*/
|
||||
public String getDescription ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** Set Payroll Payment Selection ID.
|
||||
@param HR_PaySelection_ID
|
||||
Payroll Payment Selection
|
||||
*/
|
||||
public void setHR_PaySelection_ID (int HR_PaySelection_ID)
|
||||
{
|
||||
if (HR_PaySelection_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelection_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelection_ID, Integer.valueOf(HR_PaySelection_ID));
|
||||
}
|
||||
|
||||
/** Get Payroll Payment Selection ID.
|
||||
@return Payroll Payment Selection
|
||||
*/
|
||||
public int getHR_PaySelection_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_HR_PaySelection_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;
|
||||
}
|
||||
|
||||
/** Set Name.
|
||||
@param Name
|
||||
Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name)
|
||||
{
|
||||
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 Payment date.
|
||||
@param PayDate
|
||||
Date Payment made
|
||||
*/
|
||||
public void setPayDate (Timestamp PayDate)
|
||||
{
|
||||
set_Value (COLUMNNAME_PayDate, PayDate);
|
||||
}
|
||||
|
||||
/** Get Payment date.
|
||||
@return Date Payment made
|
||||
*/
|
||||
public Timestamp getPayDate ()
|
||||
{
|
||||
return (Timestamp)get_Value(COLUMNNAME_PayDate);
|
||||
}
|
||||
|
||||
/** 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 Amount.
|
||||
@param TotalAmt
|
||||
Total Amount
|
||||
*/
|
||||
public void setTotalAmt (BigDecimal TotalAmt)
|
||||
{
|
||||
set_Value (COLUMNNAME_TotalAmt, TotalAmt);
|
||||
}
|
||||
|
||||
/** Get Total Amount.
|
||||
@return Total Amount
|
||||
*/
|
||||
public BigDecimal getTotalAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
}
|
|
@ -1,434 +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.eevolution.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Model for HR_PaySelectionCheck
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.5.4a - $Id$ */
|
||||
public class X_HR_PaySelectionCheck extends PO implements I_HR_PaySelectionCheck, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20091211L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_HR_PaySelectionCheck (Properties ctx, int HR_PaySelectionCheck_ID, String trxName)
|
||||
{
|
||||
super (ctx, HR_PaySelectionCheck_ID, trxName);
|
||||
/** if (HR_PaySelectionCheck_ID == 0)
|
||||
{
|
||||
setC_BPartner_ID (0);
|
||||
setDiscountAmt (Env.ZERO);
|
||||
setHR_PaySelectionCheck_ID (0);
|
||||
setHR_PaySelection_ID (0);
|
||||
setIsGeneratedDraft (false);
|
||||
// N
|
||||
setIsPrinted (false);
|
||||
setIsReceipt (false);
|
||||
setPayAmt (Env.ZERO);
|
||||
setPaymentRule (null);
|
||||
setProcessed (false);
|
||||
// N
|
||||
setQty (0);
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_HR_PaySelectionCheck (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_PaySelectionCheck[")
|
||||
.append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public I_C_BP_BankAccount getC_BP_BankAccount() throws RuntimeException
|
||||
{
|
||||
return (I_C_BP_BankAccount)MTable.get(getCtx(), I_C_BP_BankAccount.Table_Name)
|
||||
.getPO(getC_BP_BankAccount_ID(), get_TrxName()); }
|
||||
|
||||
/** 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 RuntimeException
|
||||
{
|
||||
return (I_C_BPartner)MTable.get(getCtx(), I_C_BPartner.Table_Name)
|
||||
.getPO(getC_BPartner_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Business Partner .
|
||||
@param C_BPartner_ID
|
||||
Identifies a Business Partner
|
||||
*/
|
||||
public void setC_BPartner_ID (int 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_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 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 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);
|
||||
}
|
||||
|
||||
/** Get Record ID/ColumnName
|
||||
@return ID/ColumnName pair
|
||||
*/
|
||||
public KeyNamePair getKeyNamePair()
|
||||
{
|
||||
return new KeyNamePair(get_ID(), getDocumentNo());
|
||||
}
|
||||
|
||||
/** Set Payroll Pay Selection Check ID.
|
||||
@param HR_PaySelectionCheck_ID
|
||||
Payroll Payment Selection Check
|
||||
*/
|
||||
public void setHR_PaySelectionCheck_ID (int HR_PaySelectionCheck_ID)
|
||||
{
|
||||
if (HR_PaySelectionCheck_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelectionCheck_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelectionCheck_ID, Integer.valueOf(HR_PaySelectionCheck_ID));
|
||||
}
|
||||
|
||||
/** Get Payroll Pay Selection Check ID.
|
||||
@return Payroll Payment Selection Check
|
||||
*/
|
||||
public int getHR_PaySelectionCheck_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_HR_PaySelectionCheck_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_HR_PaySelection getHR_PaySelection() throws RuntimeException
|
||||
{
|
||||
return (org.eevolution.model.I_HR_PaySelection)MTable.get(getCtx(), org.eevolution.model.I_HR_PaySelection.Table_Name)
|
||||
.getPO(getHR_PaySelection_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Payroll Payment Selection ID.
|
||||
@param HR_PaySelection_ID
|
||||
Payroll Payment Selection
|
||||
*/
|
||||
public void setHR_PaySelection_ID (int HR_PaySelection_ID)
|
||||
{
|
||||
if (HR_PaySelection_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelection_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelection_ID, Integer.valueOf(HR_PaySelection_ID));
|
||||
}
|
||||
|
||||
/** Get Payroll Payment Selection ID.
|
||||
@return Payroll Payment Selection
|
||||
*/
|
||||
public int getHR_PaySelection_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_HR_PaySelection_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Generated Draft.
|
||||
@param IsGeneratedDraft Generated Draft */
|
||||
public void setIsGeneratedDraft (boolean IsGeneratedDraft)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsGeneratedDraft, Boolean.valueOf(IsGeneratedDraft));
|
||||
}
|
||||
|
||||
/** Get Generated Draft.
|
||||
@return Generated Draft */
|
||||
public boolean isGeneratedDraft ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsGeneratedDraft);
|
||||
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 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 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;
|
||||
}
|
||||
|
||||
/** 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";
|
||||
/** Mixed = M */
|
||||
public static final String PAYMENTRULE_Mixed = "M";
|
||||
/** Set Payment Rule.
|
||||
@param PaymentRule
|
||||
How you pay the invoice
|
||||
*/
|
||||
public void setPaymentRule (String PaymentRule)
|
||||
{
|
||||
|
||||
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 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();
|
||||
}
|
||||
}
|
|
@ -1,414 +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.eevolution.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 HR_PaySelectionLine
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.5.4a - $Id$ */
|
||||
public class X_HR_PaySelectionLine extends PO implements I_HR_PaySelectionLine, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20091211L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_HR_PaySelectionLine (Properties ctx, int HR_PaySelectionLine_ID, String trxName)
|
||||
{
|
||||
super (ctx, HR_PaySelectionLine_ID, trxName);
|
||||
/** if (HR_PaySelectionLine_ID == 0)
|
||||
{
|
||||
setDifferenceAmt (Env.ZERO);
|
||||
setDiscountAmt (Env.ZERO);
|
||||
setHR_PaySelectionLine_ID (0);
|
||||
setHR_PaySelection_ID (0);
|
||||
setIsManual (false);
|
||||
setIsSOTrx (false);
|
||||
setLine (0);
|
||||
// @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM C_PaySelectionLine WHERE C_PaySelection_ID=@C_PaySelection_ID@
|
||||
setOpenAmt (Env.ZERO);
|
||||
setPayAmt (Env.ZERO);
|
||||
setPaymentRule (null);
|
||||
// S
|
||||
setProcessed (false);
|
||||
// N
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_HR_PaySelectionLine (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_PaySelectionLine[")
|
||||
.append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/** Set Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
*/
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
set_Value (COLUMNNAME_Description, Description);
|
||||
}
|
||||
|
||||
/** Get Description.
|
||||
@return Optional short description of the record
|
||||
*/
|
||||
public String getDescription ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Description);
|
||||
}
|
||||
|
||||
/** Set Difference.
|
||||
@param DifferenceAmt
|
||||
Difference Amount
|
||||
*/
|
||||
public void setDifferenceAmt (BigDecimal DifferenceAmt)
|
||||
{
|
||||
set_ValueNoCheck (COLUMNNAME_DifferenceAmt, DifferenceAmt);
|
||||
}
|
||||
|
||||
/** Get Difference.
|
||||
@return Difference Amount
|
||||
*/
|
||||
public BigDecimal getDifferenceAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DifferenceAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Discount Amount.
|
||||
@param DiscountAmt
|
||||
Calculated amount of discount
|
||||
*/
|
||||
public void setDiscountAmt (BigDecimal DiscountAmt)
|
||||
{
|
||||
set_ValueNoCheck (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;
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_HR_Movement getHR_Movement() throws RuntimeException
|
||||
{
|
||||
return (org.eevolution.model.I_HR_Movement)MTable.get(getCtx(), org.eevolution.model.I_HR_Movement.Table_Name)
|
||||
.getPO(getHR_Movement_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Payroll Movement.
|
||||
@param HR_Movement_ID Payroll Movement */
|
||||
public void setHR_Movement_ID (int HR_Movement_ID)
|
||||
{
|
||||
if (HR_Movement_ID < 1)
|
||||
set_Value (COLUMNNAME_HR_Movement_ID, null);
|
||||
else
|
||||
set_Value (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_PaySelectionCheck getHR_PaySelectionCheck() throws RuntimeException
|
||||
{
|
||||
return (org.eevolution.model.I_HR_PaySelectionCheck)MTable.get(getCtx(), org.eevolution.model.I_HR_PaySelectionCheck.Table_Name)
|
||||
.getPO(getHR_PaySelectionCheck_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Payroll Pay Selection Check ID.
|
||||
@param HR_PaySelectionCheck_ID
|
||||
Payroll Payment Selection Check
|
||||
*/
|
||||
public void setHR_PaySelectionCheck_ID (int HR_PaySelectionCheck_ID)
|
||||
{
|
||||
if (HR_PaySelectionCheck_ID < 1)
|
||||
set_Value (COLUMNNAME_HR_PaySelectionCheck_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_HR_PaySelectionCheck_ID, Integer.valueOf(HR_PaySelectionCheck_ID));
|
||||
}
|
||||
|
||||
/** Get Payroll Pay Selection Check ID.
|
||||
@return Payroll Payment Selection Check
|
||||
*/
|
||||
public int getHR_PaySelectionCheck_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_HR_PaySelectionCheck_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Payroll Payment Selection Line ID.
|
||||
@param HR_PaySelectionLine_ID
|
||||
Payroll Payment Selection Line
|
||||
*/
|
||||
public void setHR_PaySelectionLine_ID (int HR_PaySelectionLine_ID)
|
||||
{
|
||||
if (HR_PaySelectionLine_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelectionLine_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelectionLine_ID, Integer.valueOf(HR_PaySelectionLine_ID));
|
||||
}
|
||||
|
||||
/** Get Payroll Payment Selection Line ID.
|
||||
@return Payroll Payment Selection Line
|
||||
*/
|
||||
public int getHR_PaySelectionLine_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_HR_PaySelectionLine_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_HR_PaySelection getHR_PaySelection() throws RuntimeException
|
||||
{
|
||||
return (org.eevolution.model.I_HR_PaySelection)MTable.get(getCtx(), org.eevolution.model.I_HR_PaySelection.Table_Name)
|
||||
.getPO(getHR_PaySelection_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Payroll Payment Selection ID.
|
||||
@param HR_PaySelection_ID
|
||||
Payroll Payment Selection
|
||||
*/
|
||||
public void setHR_PaySelection_ID (int HR_PaySelection_ID)
|
||||
{
|
||||
if (HR_PaySelection_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelection_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_HR_PaySelection_ID, Integer.valueOf(HR_PaySelection_ID));
|
||||
}
|
||||
|
||||
/** Get Payroll Payment Selection ID.
|
||||
@return Payroll Payment Selection
|
||||
*/
|
||||
public int getHR_PaySelection_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_HR_PaySelection_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** 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 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 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 Open Amount.
|
||||
@param OpenAmt
|
||||
Open item amount
|
||||
*/
|
||||
public void setOpenAmt (BigDecimal OpenAmt)
|
||||
{
|
||||
set_ValueNoCheck (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 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;
|
||||
}
|
||||
|
||||
/** 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";
|
||||
/** Mixed = M */
|
||||
public static final String PAYMENTRULE_Mixed = "M";
|
||||
/** Set Payment Rule.
|
||||
@param PaymentRule
|
||||
How you pay the invoice
|
||||
*/
|
||||
public void setPaymentRule (String PaymentRule)
|
||||
{
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -36,7 +36,6 @@ import org.compiere.util.CLogger;
|
|||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Ini;
|
||||
import org.compiere.util.Trx;
|
||||
import org.eevolution.model.MHRPaySelectionCheck;
|
||||
|
||||
/**
|
||||
* Report Controller.
|
||||
|
@ -397,11 +396,6 @@ public class ReportCtl
|
|||
*/
|
||||
public static boolean startCheckPrint (int C_Payment_ID, boolean IsDirectPrint)
|
||||
{
|
||||
MHRPaySelectionCheck hpsc = MHRPaySelectionCheck.getOfPayment(Env.getCtx(), C_Payment_ID, null);
|
||||
if (hpsc != null)
|
||||
{
|
||||
return startDocumentPrint (ReportEngine.HR_CHECK, hpsc.getHR_PaySelectionCheck_ID(), null, -1, IsDirectPrint);
|
||||
}
|
||||
|
||||
// afalcone - [ 1871567 ] Wrong value in Payment document
|
||||
boolean ok = MPaySelectionCheck.deleteGeneratedDraft(Env.getCtx(), C_Payment_ID, null);
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
DROP VIEW C_PAYSELECTION_CHECK_V;
|
||||
CREATE OR REPLACE VIEW C_PAYSELECTION_CHECK_V
|
||||
(AD_CLIENT_ID, AD_ORG_ID, AD_LANGUAGE, C_PAYSELECTION_ID, C_PAYSELECTIONCHECK_ID,
|
||||
ORG_LOCATION_ID, TAXID, C_DOCTYPE_ID, C_BPARTNER_ID, BPVALUE,
|
||||
BPTAXID, NAICS, DUNS, BPGREETING, NAME,
|
||||
NAME2, C_LOCATION_ID, REFERENCENO, POREFERENCE, PAYDATE,
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO,
|
||||
HR_PAYSELECTION_ID , HR_PAYSELECTIONCHECK_ID)
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO)
|
||||
AS
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
cast('en_US' as varchar2(6)) AS AD_Language,
|
||||
|
@ -18,29 +16,12 @@ SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
|||
bp.ReferenceNo, bp.POReference,
|
||||
ps.PayDate,
|
||||
psc.PayAmt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
0 AS HR_PaySelection_ID , 0 AS HR_PaySelectionCheck_ID
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo
|
||||
FROM C_PaySelectionCheck psc
|
||||
INNER JOIN C_PaySelection ps ON (psc.C_PaySelection_ID=ps.C_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID)
|
||||
UNION
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
cast('en_US' as varchar2(6)) AS AD_Language,
|
||||
0 AS C_PaySelection_ID, 0 AS C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
BPartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.poreference,
|
||||
ps.PayDate, psc.Payamt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
psc.HR_PaySelection_ID , HR_PaySelectionCheck_ID
|
||||
FROM hr_payselectioncheck psc
|
||||
INNER JOIN HR_PaySelection ps ON (psc.HR_PaySelection_ID = ps.HR_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID = bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg ON (bp.C_Greeting_ID = bpg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID = oi.AD_Org_ID);
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
DROP VIEW C_PAYSELECTION_CHECK_VT;
|
||||
CREATE OR REPLACE VIEW C_PAYSELECTION_CHECK_VT
|
||||
(AD_CLIENT_ID, AD_ORG_ID, AD_LANGUAGE, C_PAYSELECTION_ID, C_PAYSELECTIONCHECK_ID,
|
||||
ORG_LOCATION_ID, TAXID, C_DOCTYPE_ID, C_BPARTNER_ID, BPVALUE,
|
||||
BPTAXID, NAICS, DUNS, BPGREETING, NAME,
|
||||
NAME2, C_LOCATION_ID, REFERENCENO, POREFERENCE, PAYDATE,
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO,
|
||||
HR_PAYSELECTION_ID , HR_PAYSELECTIONCHECK_ID)
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO)
|
||||
AS
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
l.AD_Language,
|
||||
|
@ -18,30 +16,13 @@ SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
|||
bp.ReferenceNo, bp.POReference,
|
||||
ps.PayDate,
|
||||
psc.PayAmt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
0 AS HR_PaySelection_ID , 0 AS HR_PaySelectionCheck_ID
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo
|
||||
FROM C_PaySelectionCheck psc
|
||||
INNER JOIN C_PaySelection ps ON (psc.C_PaySelection_ID=ps.C_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_Language l ON (l.IsSystemLanguage='Y')
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language)
|
||||
UNION
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
l.AD_Language,
|
||||
0 AS C_PaySelection_ID, 0 AS C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
BPartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.poreference,
|
||||
ps.PayDate, psc.Payamt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
psc.HR_PaySelection_ID , HR_PaySelectionCheck_ID
|
||||
FROM hr_payselectioncheck psc
|
||||
INNER JOIN HR_PaySelection ps ON (psc.HR_PaySelection_ID = ps.HR_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID = bp.C_BPartner_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID = oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_Language l ON (l.IsSystemLanguage='Y')
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language)
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
DROP VIEW C_PAYSELECTION_CHECK_V;
|
||||
CREATE OR REPLACE VIEW C_PAYSELECTION_CHECK_V
|
||||
(AD_CLIENT_ID, AD_ORG_ID, AD_LANGUAGE, C_PAYSELECTION_ID, C_PAYSELECTIONCHECK_ID,
|
||||
ORG_LOCATION_ID, TAXID, C_DOCTYPE_ID, C_BPARTNER_ID, BPVALUE,
|
||||
BPTAXID, NAICS, DUNS, BPGREETING, NAME,
|
||||
NAME2, C_LOCATION_ID, REFERENCENO, POREFERENCE, PAYDATE,
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO,
|
||||
HR_PAYSELECTION_ID , HR_PAYSELECTIONCHECK_ID)
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO)
|
||||
AS
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
cast('en_US' as varchar) AS AD_Language,
|
||||
|
@ -18,31 +16,12 @@ SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
|||
bp.ReferenceNo, bp.POReference,
|
||||
ps.PayDate,
|
||||
psc.PayAmt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
0 AS HR_PaySelection_ID , 0 AS HR_PaySelectionCheck_ID
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo
|
||||
FROM C_PaySelectionCheck psc
|
||||
INNER JOIN C_PaySelection ps ON (psc.C_PaySelection_ID=ps.C_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID)
|
||||
UNION
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
cast('en_US' as varchar) AS AD_Language,
|
||||
0 AS C_PaySelection_ID, 0 AS C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
BPartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.poreference,
|
||||
ps.PayDate, psc.Payamt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
psc.HR_PaySelection_ID , HR_PaySelectionCheck_ID
|
||||
FROM hr_payselectioncheck psc
|
||||
INNER JOIN HR_PaySelection ps ON (psc.HR_PaySelection_ID = ps.HR_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID = bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg ON (bp.C_Greeting_ID = bpg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID = oi.AD_Org_ID);
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
DROP VIEW C_PAYSELECTION_CHECK_VT;
|
||||
CREATE OR REPLACE VIEW C_PAYSELECTION_CHECK_VT
|
||||
(AD_CLIENT_ID, AD_ORG_ID, AD_LANGUAGE, C_PAYSELECTION_ID, C_PAYSELECTIONCHECK_ID,
|
||||
ORG_LOCATION_ID, TAXID, C_DOCTYPE_ID, C_BPARTNER_ID, BPVALUE,
|
||||
BPTAXID, NAICS, DUNS, BPGREETING, NAME,
|
||||
NAME2, C_LOCATION_ID, REFERENCENO, POREFERENCE, PAYDATE,
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO,
|
||||
HR_PAYSELECTION_ID , HR_PAYSELECTIONCHECK_ID)
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO)
|
||||
AS
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
l.AD_Language,
|
||||
|
@ -18,30 +16,13 @@ SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
|||
bp.ReferenceNo, bp.POReference,
|
||||
ps.PayDate,
|
||||
psc.PayAmt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
0 AS HR_PaySelection_ID , 0 AS HR_PaySelectionCheck_ID
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo
|
||||
FROM C_PaySelectionCheck psc
|
||||
INNER JOIN C_PaySelection ps ON (psc.C_PaySelection_ID=ps.C_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_Language l ON (l.IsSystemLanguage='Y')
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language)
|
||||
UNION
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
l.AD_Language,
|
||||
0 AS C_PaySelection_ID, 0 AS C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
BPartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.poreference,
|
||||
ps.PayDate, psc.Payamt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
psc.HR_PaySelection_ID , HR_PaySelectionCheck_ID
|
||||
FROM hr_payselectioncheck psc
|
||||
INNER JOIN HR_PaySelection ps ON (psc.HR_PaySelection_ID = ps.HR_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID = bp.C_BPartner_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID = oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_Language l ON (l.IsSystemLanguage='Y')
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language);
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,94 +0,0 @@
|
|||
DROP VIEW C_PAYSELECTION_CHECK_V;
|
||||
CREATE OR REPLACE VIEW C_PAYSELECTION_CHECK_V
|
||||
(AD_CLIENT_ID, AD_ORG_ID, AD_LANGUAGE, C_PAYSELECTION_ID, C_PAYSELECTIONCHECK_ID,
|
||||
ORG_LOCATION_ID, TAXID, C_DOCTYPE_ID, C_BPARTNER_ID, BPVALUE,
|
||||
BPTAXID, NAICS, DUNS, BPGREETING, NAME,
|
||||
NAME2, C_LOCATION_ID, REFERENCENO, POREFERENCE, PAYDATE,
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO,
|
||||
HR_PAYSELECTION_ID , HR_PAYSELECTIONCHECK_ID)
|
||||
AS
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
cast('en_US' as varchar2(6)) AS AD_Language,
|
||||
psc.C_PaySelection_ID, psc.C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
bpartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.POReference,
|
||||
ps.PayDate,
|
||||
psc.PayAmt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
0 AS HR_PaySelection_ID , 0 AS HR_PaySelectionCheck_ID
|
||||
FROM C_PaySelectionCheck psc
|
||||
INNER JOIN C_PaySelection ps ON (psc.C_PaySelection_ID=ps.C_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID)
|
||||
UNION
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
cast('en_US' as varchar2(6)) AS AD_Language,
|
||||
0 AS C_PaySelection_ID, 0 AS C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
BPartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.poreference,
|
||||
ps.PayDate, psc.Payamt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
psc.HR_PaySelection_ID , HR_PaySelectionCheck_ID
|
||||
FROM hr_payselectioncheck psc
|
||||
INNER JOIN HR_PaySelection ps ON (psc.HR_PaySelection_ID = ps.HR_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID = bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg ON (bp.C_Greeting_ID = bpg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID = oi.AD_Org_ID);
|
||||
|
||||
|
||||
DROP VIEW C_PAYSELECTION_CHECK_VT;
|
||||
CREATE OR REPLACE VIEW C_PAYSELECTION_CHECK_VT
|
||||
(AD_CLIENT_ID, AD_ORG_ID, AD_LANGUAGE, C_PAYSELECTION_ID, C_PAYSELECTIONCHECK_ID,
|
||||
ORG_LOCATION_ID, TAXID, C_DOCTYPE_ID, C_BPARTNER_ID, BPVALUE,
|
||||
BPTAXID, NAICS, DUNS, BPGREETING, NAME,
|
||||
NAME2, C_LOCATION_ID, REFERENCENO, POREFERENCE, PAYDATE,
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO,
|
||||
HR_PAYSELECTION_ID , HR_PAYSELECTIONCHECK_ID)
|
||||
AS
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
l.AD_Language,
|
||||
psc.C_PaySelection_ID, psc.C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
bpartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.POReference,
|
||||
ps.PayDate,
|
||||
psc.PayAmt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
0 AS HR_PaySelection_ID , 0 AS HR_PaySelectionCheck_ID
|
||||
FROM C_PaySelectionCheck psc
|
||||
INNER JOIN C_PaySelection ps ON (psc.C_PaySelection_ID=ps.C_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_Language l ON (l.IsSystemLanguage='Y')
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language)
|
||||
UNION
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
l.AD_Language,
|
||||
0 AS C_PaySelection_ID, 0 AS C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
BPartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.poreference,
|
||||
ps.PayDate, psc.Payamt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
psc.HR_PaySelection_ID , HR_PaySelectionCheck_ID
|
||||
FROM hr_payselectioncheck psc
|
||||
INNER JOIN HR_PaySelection ps ON (psc.HR_PaySelection_ID = ps.HR_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID = bp.C_BPartner_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID = oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_Language l ON (l.IsSystemLanguage='Y')
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language);
|
File diff suppressed because it is too large
Load Diff
|
@ -1,94 +0,0 @@
|
|||
DROP VIEW C_PAYSELECTION_CHECK_V;
|
||||
CREATE OR REPLACE VIEW C_PAYSELECTION_CHECK_V
|
||||
(AD_CLIENT_ID, AD_ORG_ID, AD_LANGUAGE, C_PAYSELECTION_ID, C_PAYSELECTIONCHECK_ID,
|
||||
ORG_LOCATION_ID, TAXID, C_DOCTYPE_ID, C_BPARTNER_ID, BPVALUE,
|
||||
BPTAXID, NAICS, DUNS, BPGREETING, NAME,
|
||||
NAME2, C_LOCATION_ID, REFERENCENO, POREFERENCE, PAYDATE,
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO,
|
||||
HR_PAYSELECTION_ID , HR_PAYSELECTIONCHECK_ID)
|
||||
AS
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
cast('en_US' as varchar) AS AD_Language,
|
||||
psc.C_PaySelection_ID, psc.C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
bpartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.POReference,
|
||||
ps.PayDate,
|
||||
psc.PayAmt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
0 AS HR_PaySelection_ID , 0 AS HR_PaySelectionCheck_ID
|
||||
FROM C_PaySelectionCheck psc
|
||||
INNER JOIN C_PaySelection ps ON (psc.C_PaySelection_ID=ps.C_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID)
|
||||
UNION
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
cast('en_US' as varchar) AS AD_Language,
|
||||
0 AS C_PaySelection_ID, 0 AS C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
BPartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.poreference,
|
||||
ps.PayDate, psc.Payamt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
psc.HR_PaySelection_ID , HR_PaySelectionCheck_ID
|
||||
FROM hr_payselectioncheck psc
|
||||
INNER JOIN HR_PaySelection ps ON (psc.HR_PaySelection_ID = ps.HR_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID = bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg ON (bp.C_Greeting_ID = bpg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID = oi.AD_Org_ID);
|
||||
|
||||
|
||||
DROP VIEW C_PAYSELECTION_CHECK_VT;
|
||||
CREATE OR REPLACE VIEW C_PAYSELECTION_CHECK_VT
|
||||
(AD_CLIENT_ID, AD_ORG_ID, AD_LANGUAGE, C_PAYSELECTION_ID, C_PAYSELECTIONCHECK_ID,
|
||||
ORG_LOCATION_ID, TAXID, C_DOCTYPE_ID, C_BPARTNER_ID, BPVALUE,
|
||||
BPTAXID, NAICS, DUNS, BPGREETING, NAME,
|
||||
NAME2, C_LOCATION_ID, REFERENCENO, POREFERENCE, PAYDATE,
|
||||
PAYAMT, AMTINWORDS, QTY, PAYMENTRULE, DOCUMENTNO,
|
||||
HR_PAYSELECTION_ID , HR_PAYSELECTIONCHECK_ID)
|
||||
AS
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
l.AD_Language,
|
||||
psc.C_PaySelection_ID, psc.C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
bpartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.POReference,
|
||||
ps.PayDate,
|
||||
psc.PayAmt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
0 AS HR_PaySelection_ID , 0 AS HR_PaySelectionCheck_ID
|
||||
FROM C_PaySelectionCheck psc
|
||||
INNER JOIN C_PaySelection ps ON (psc.C_PaySelection_ID=ps.C_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID=oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_Language l ON (l.IsSystemLanguage='Y')
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language)
|
||||
UNION
|
||||
SELECT psc.AD_Client_ID, psc.AD_Org_ID,
|
||||
l.AD_Language,
|
||||
0 AS C_PaySelection_ID, 0 AS C_PaySelectionCheck_ID,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, 0 AS C_DocType_ID,
|
||||
bp.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
BPartnerRemitLocation(bp.C_BPartner_ID) AS C_Location_ID,
|
||||
bp.ReferenceNo, bp.poreference,
|
||||
ps.PayDate, psc.Payamt, psc.PayAmt AS AmtInWords,
|
||||
psc.Qty, psc.PaymentRule, psc.DocumentNo,
|
||||
psc.HR_PaySelection_ID , HR_PaySelectionCheck_ID
|
||||
FROM hr_payselectioncheck psc
|
||||
INNER JOIN HR_PaySelection ps ON (psc.HR_PaySelection_ID = ps.HR_PaySelection_ID)
|
||||
INNER JOIN C_BPartner bp ON (psc.C_BPartner_ID = bp.C_BPartner_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (psc.AD_Org_ID = oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_Language l ON (l.IsSystemLanguage='Y')
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg on (bp.C_Greeting_ID=bpg.C_Greeting_ID AND bpg.AD_Language=l.AD_Language);
|
Loading…
Reference in New Issue