IDEMPIERE-4177 Replace SYSDATE with getDate()
This commit is contained in:
parent
8445b0cb3d
commit
df5b0c2ea8
|
@ -1,6 +1,6 @@
|
|||
CREATE OR REPLACE FUNCTION getDate()
|
||||
RETURNS TIMESTAMP WITH TIME ZONE AS $$
|
||||
BEGIN
|
||||
RETURN now();
|
||||
RETURN statement_timestamp();
|
||||
END;
|
||||
$$ LANGUAGE plpgsql VOLATILE;
|
||||
$$ LANGUAGE plpgsql STABLE;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-4177 Replace SYSDATE with getDate()
|
||||
SELECT register_migration_script('202003022200_IDEMPIERE-4177.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,11 @@
|
|||
-- IDEMPIERE-4177 Replace SYSDATE with getDate()
|
||||
CREATE OR REPLACE FUNCTION getDate()
|
||||
RETURNS TIMESTAMP WITH TIME ZONE AS $$
|
||||
BEGIN
|
||||
RETURN statement_timestamp();
|
||||
END;
|
||||
$$ LANGUAGE plpgsql STABLE
|
||||
;
|
||||
|
||||
SELECT register_migration_script('202003022200_IDEMPIERE-4177.sql') FROM dual
|
||||
;
|
|
@ -221,7 +221,7 @@ public class CalloutRMA extends CalloutEngine {
|
|||
|
||||
// Retrieve tax Exempt
|
||||
String sql = "SELECT C_Tax_ID FROM C_Tax WHERE AD_Client_ID=? AND IsActive='Y' "
|
||||
+ "AND IsTaxExempt='Y' AND ValidFrom < SYSDATE ORDER BY IsDefault DESC";
|
||||
+ "AND IsTaxExempt='Y' AND ValidFrom < getDate() ORDER BY IsDefault DESC";
|
||||
// Set tax for charge as exempt
|
||||
int taxId = DB.getSQLValueEx(null, sql, Env.getAD_Client_ID(ctx));
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class AcceptCtxHelpSuggestion extends SvrProcess {
|
|||
} else {
|
||||
StringBuilder insert = new StringBuilder("Insert Into AD_CtxHelpMsg_Trl (AD_Client_ID, AD_Org_ID, AD_CtxHelpMsg_ID, IsActive, IsTranslated, AD_Language, MsgText,");
|
||||
insert.append("Created, CreatedBy, Updated, UpdatedBy, AD_CtxHelpMsg_Trl_UU)")
|
||||
.append(" Values (?, ?, ?, 'Y', 'N', ?, ?, sysdate, ?, sysdate, ?, generate_uuid()) ");
|
||||
.append(" Values (?, ?, ?, 'Y', 'N', ?, ?, getDate(), ?, getDate(), ?, generate_uuid()) ");
|
||||
List<Object> params = new ArrayList<Object>();
|
||||
params.add(AD_Client_ID);
|
||||
params.add(0);
|
||||
|
|
|
@ -114,9 +114,9 @@ public class ImportPriceList extends SvrProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID, ").append(m_AD_Client_ID).append("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID, 0),")
|
||||
.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" EnforcePriceLimit = COALESCE (EnforcePriceLimit, 'N'),")
|
||||
.append(" IsSOPriceList = COALESCE (IsSOPriceList, 'N'),")
|
||||
|
@ -283,7 +283,7 @@ public class ImportPriceList extends SvrProcess
|
|||
// Set Imported = Y
|
||||
pstmt_setImported = DB.prepareStatement
|
||||
("UPDATE I_PriceList SET I_IsImported='Y', M_PriceList_ID=?, M_PriceList_Version_ID=?, "
|
||||
+ "Updated=SysDate, Processed='Y' WHERE I_PriceList_ID=?", get_TrxName());
|
||||
+ "Updated=getDate(), Processed='Y' WHERE I_PriceList_ID=?", get_TrxName());
|
||||
|
||||
//
|
||||
pstmt = DB.prepareStatement(sql.toString(), get_TrxName());
|
||||
|
@ -463,7 +463,7 @@ public class ImportPriceList extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_PriceList ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -99,7 +99,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(", P_TradeDiscountGrant_Acct=").append(acct.getP_TradeDiscountGrant_Acct())
|
||||
.append(", P_RateVariance_Acct=").append(acct.getP_RateVariance_Acct())
|
||||
.append(", P_LandedCostClearing_Acct=").append(acct.getP_LandedCostClearing_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE pa.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM M_Product_Category p ")
|
||||
.append("WHERE p.M_Product_Category_ID=pa.M_Product_Category_ID)");
|
||||
|
@ -116,7 +116,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct," )
|
||||
.append(" P_RateVariance_Acct, P_LandedCostClearing_Acct) ")
|
||||
.append(" SELECT p.M_Product_Category_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,")
|
||||
.append(" acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,")
|
||||
.append(" acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct,")
|
||||
|
@ -140,7 +140,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, ")
|
||||
.append(" P_RateVariance_Acct, P_LandedCostClearing_Acct) ")
|
||||
.append("SELECT p.M_Product_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,")
|
||||
.append(" acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,")
|
||||
.append(" acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct,")
|
||||
|
@ -173,7 +173,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(", WriteOff_Acct=").append(acct.getWriteOff_Acct())
|
||||
.append(", NotInvoicedReceipts_Acct=").append(acct.getNotInvoicedReceipts_Acct())
|
||||
.append(", UnEarnedRevenue_Acct=").append(acct.getUnEarnedRevenue_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM C_BP_Group_Acct x ")
|
||||
.append("WHERE x.C_BP_Group_ID=a.C_BP_Group_ID)");
|
||||
|
@ -190,7 +190,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" PayDiscount_Exp_Acct, PayDiscount_Rev_Acct, WriteOff_Acct,")
|
||||
.append(" NotInvoicedReceipts_Acct, UnEarnedRevenue_Acct) ")
|
||||
.append("SELECT x.C_BP_Group_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.C_Receivable_Acct, acct.C_Receivable_Services_Acct, acct.C_PrePayment_Acct,")
|
||||
.append(" acct.V_Liability_Acct, acct.V_Liability_Services_Acct, acct.V_PrePayment_Acct,")
|
||||
.append(" acct.PayDiscount_Exp_Acct, acct.PayDiscount_Rev_Acct, acct.WriteOff_Acct,")
|
||||
|
@ -213,7 +213,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
sql = new StringBuilder("UPDATE C_BP_Employee_Acct a ")
|
||||
.append("SET E_Expense_Acct=").append(acct.getE_Expense_Acct())
|
||||
.append(", E_Prepayment_Acct=").append(acct.getE_Prepayment_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM C_BP_Employee_Acct x ")
|
||||
.append("WHERE x.C_BPartner_ID=a.C_BPartner_ID)");
|
||||
|
@ -227,7 +227,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,")
|
||||
.append(" E_Expense_Acct, E_Prepayment_Acct) ")
|
||||
.append("SELECT x.C_BPartner_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.E_Expense_Acct, acct.E_Prepayment_Acct ")
|
||||
.append("FROM C_BPartner x")
|
||||
.append(" INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) ")
|
||||
|
@ -247,7 +247,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,")
|
||||
.append(" C_Receivable_Acct, C_Receivable_Services_Acct, C_PrePayment_Acct) ")
|
||||
.append("SELECT p.C_BPartner_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.C_Receivable_Acct, acct.C_Receivable_Services_Acct, acct.C_PrePayment_Acct ")
|
||||
.append("FROM C_BPartner p")
|
||||
.append(" INNER JOIN C_BP_Group_Acct acct ON (acct.C_BP_Group_ID=p.C_BP_Group_ID)")
|
||||
|
@ -265,7 +265,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,")
|
||||
.append(" V_Liability_Acct, V_Liability_Services_Acct, V_PrePayment_Acct) ")
|
||||
.append("SELECT p.C_BPartner_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.V_Liability_Acct, acct.V_Liability_Services_Acct, acct.V_PrePayment_Acct ")
|
||||
.append("FROM C_BPartner p")
|
||||
.append(" INNER JOIN C_BP_Group_Acct acct ON (acct.C_BP_Group_ID=p.C_BP_Group_ID)")
|
||||
|
@ -283,7 +283,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
{
|
||||
sql = new StringBuilder("UPDATE M_Warehouse_Acct a ")
|
||||
.append("SET W_Differences_Acct=").append(acct.getW_Differences_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM M_Warehouse_Acct x ")
|
||||
.append("WHERE x.M_Warehouse_ID=a.M_Warehouse_ID)");
|
||||
|
@ -297,7 +297,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,")
|
||||
.append(" W_Differences_Acct) ")
|
||||
.append("SELECT x.M_Warehouse_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.W_Differences_Acct ")
|
||||
.append("FROM M_Warehouse x")
|
||||
.append(" INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) ")
|
||||
|
@ -316,7 +316,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
sql = new StringBuilder("UPDATE C_Project_Acct a ")
|
||||
.append("SET PJ_Asset_Acct=").append(acct.getPJ_Asset_Acct())
|
||||
.append(", PJ_WIP_Acct=").append(acct.getPJ_Asset_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM C_Project_Acct x ")
|
||||
.append("WHERE x.C_Project_ID=a.C_Project_ID)");
|
||||
|
@ -330,7 +330,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,")
|
||||
.append(" PJ_Asset_Acct, PJ_WIP_Acct) ")
|
||||
.append("SELECT x.C_Project_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.PJ_Asset_Acct, acct.PJ_WIP_Acct ")
|
||||
.append("FROM C_Project x")
|
||||
.append(" INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) ")
|
||||
|
@ -350,7 +350,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append("SET T_Due_Acct=").append(acct.getT_Due_Acct())
|
||||
.append(", T_Credit_Acct=").append(acct.getT_Credit_Acct())
|
||||
.append(", T_Expense_Acct=").append(acct.getT_Expense_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM C_Tax_Acct x ")
|
||||
.append("WHERE x.C_Tax_ID=a.C_Tax_ID)");
|
||||
|
@ -364,7 +364,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,")
|
||||
.append(" T_Due_Acct, T_Credit_Acct, T_Expense_Acct) ")
|
||||
.append("SELECT x.C_Tax_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.T_Due_Acct, acct.T_Credit_Acct, acct.T_Expense_Acct ")
|
||||
.append("FROM C_Tax x")
|
||||
.append(" INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) ")
|
||||
|
@ -387,7 +387,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(", B_InterestExp_Acct=").append(acct.getB_InterestExp_Acct())
|
||||
.append(", B_UnallocatedCash_Acct=").append(acct.getB_UnallocatedCash_Acct())
|
||||
.append(", B_PaymentSelect_Acct=").append(acct.getB_PaymentSelect_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM C_BankAccount_Acct x ")
|
||||
.append("WHERE x.C_BankAccount_ID=a.C_BankAccount_ID)");
|
||||
|
@ -402,7 +402,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" B_InTransit_Acct, B_Asset_Acct, B_InterestRev_Acct, B_InterestExp_Acct,")
|
||||
.append(" B_UnallocatedCash_Acct, B_PaymentSelect_Acct) ")
|
||||
.append("SELECT x.C_BankAccount_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.B_InTransit_Acct, acct.B_Asset_Acct, acct.B_InterestRev_Acct, acct.B_InterestExp_Acct,")
|
||||
.append(" acct.B_UnallocatedCash_Acct, acct.B_PaymentSelect_Acct ")
|
||||
.append("FROM C_BankAccount x")
|
||||
|
@ -422,7 +422,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
{
|
||||
sql = new StringBuilder("UPDATE C_Withholding_Acct a ")
|
||||
.append("SET Withholding_Acct=").append(acct.getWithholding_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM C_Withholding_Acct x ")
|
||||
.append("WHERE x.C_Withholding_ID=a.C_Withholding_ID)");
|
||||
|
@ -436,7 +436,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,")
|
||||
.append(" Withholding_Acct) ")
|
||||
.append("SELECT x.C_Withholding_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.Withholding_Acct ")
|
||||
.append("FROM C_Withholding x")
|
||||
.append(" INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) ")
|
||||
|
@ -454,7 +454,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
{
|
||||
sql = new StringBuilder("UPDATE C_Charge_Acct a ")
|
||||
.append("SET Ch_Expense_Acct=").append(acct.getCh_Expense_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM C_Charge_Acct x ")
|
||||
.append("WHERE x.C_Charge_ID=a.C_Charge_ID)");
|
||||
|
@ -468,7 +468,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,")
|
||||
.append(" Ch_Expense_Acct) ")
|
||||
.append("SELECT x.C_Charge_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.Ch_Expense_Acct ")
|
||||
.append("FROM C_Charge x")
|
||||
.append(" INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) ")
|
||||
|
@ -490,7 +490,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(", CB_CashTransfer_Acct=").append(acct.getCB_CashTransfer_Acct())
|
||||
.append(", CB_Expense_Acct=").append(acct.getCB_Expense_Acct())
|
||||
.append(", CB_Receipt_Acct=").append(acct.getCB_Receipt_Acct())
|
||||
.append(", Updated=SysDate, UpdatedBy=0 ")
|
||||
.append(", Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM C_Cashbook_Acct x ")
|
||||
.append("WHERE x.C_Cashbook_ID=a.C_Cashbook_ID)");
|
||||
|
@ -505,7 +505,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
|
|||
.append(" CB_Asset_Acct, CB_Differences_Acct, CB_CashTransfer_Acct,")
|
||||
.append(" CB_Expense_Acct, CB_Receipt_Acct) ")
|
||||
.append("SELECT x.C_Cashbook_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.CB_Asset_Acct, acct.CB_Differences_Acct, acct.CB_CashTransfer_Acct,")
|
||||
.append(" acct.CB_Expense_Acct, acct.CB_Receipt_Acct ")
|
||||
.append("FROM C_Cashbook x")
|
||||
|
|
|
@ -85,7 +85,7 @@ public class BPGroupAcctCopy extends SvrProcess
|
|||
+ " FROM C_BP_Group_Acct"
|
||||
+ " WHERE C_BP_Group_ID=" + p_C_BP_Group_ID
|
||||
+ " AND C_AcctSchema_ID=" + p_C_AcctSchema_ID
|
||||
+ "), Updated=SysDate, UpdatedBy=0 "
|
||||
+ "), Updated=getDate(), UpdatedBy=0 "
|
||||
+ "WHERE ca.C_AcctSchema_ID=" + p_C_AcctSchema_ID
|
||||
+ " AND EXISTS (SELECT * FROM C_BPartner p "
|
||||
+ "WHERE p.C_BPartner_ID=ca.C_BPartner_ID"
|
||||
|
@ -100,7 +100,7 @@ public class BPGroupAcctCopy extends SvrProcess
|
|||
+ " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,"
|
||||
+ " C_Receivable_Acct, C_Receivable_Services_Acct, C_PrePayment_Acct) "
|
||||
+ "SELECT p.C_BPartner_ID, acct.C_AcctSchema_ID,"
|
||||
+ " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,"
|
||||
+ " p.AD_Client_ID, p.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,"
|
||||
+ " acct.C_Receivable_Acct, acct.C_Receivable_Services_Acct, acct.C_PrePayment_Acct "
|
||||
+ "FROM C_BPartner p"
|
||||
+ " INNER JOIN C_BP_Group_Acct acct ON (acct.C_BP_Group_ID=p.C_BP_Group_ID)"
|
||||
|
@ -121,7 +121,7 @@ public class BPGroupAcctCopy extends SvrProcess
|
|||
+ " FROM C_BP_Group_Acct"
|
||||
+ " WHERE C_BP_Group_ID=" + p_C_BP_Group_ID
|
||||
+ " AND C_AcctSchema_ID=" + p_C_AcctSchema_ID
|
||||
+ "), Updated=SysDate, UpdatedBy=0 "
|
||||
+ "), Updated=getDate(), UpdatedBy=0 "
|
||||
+ "WHERE va.C_AcctSchema_ID=" + p_C_AcctSchema_ID
|
||||
+ " AND EXISTS (SELECT * FROM C_BPartner p "
|
||||
+ "WHERE p.C_BPartner_ID=va.C_BPartner_ID"
|
||||
|
@ -136,7 +136,7 @@ public class BPGroupAcctCopy extends SvrProcess
|
|||
+ " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,"
|
||||
+ " V_Liability_Acct, V_Liability_Services_Acct, V_PrePayment_Acct) "
|
||||
+ "SELECT p.C_BPartner_ID, acct.C_AcctSchema_ID,"
|
||||
+ " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,"
|
||||
+ " p.AD_Client_ID, p.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,"
|
||||
+ " acct.V_Liability_Acct, acct.V_Liability_Services_Acct, acct.V_PrePayment_Acct "
|
||||
+ "FROM C_BPartner p"
|
||||
+ " INNER JOIN C_BP_Group_Acct acct ON (acct.C_BP_Group_ID=p.C_BP_Group_ID)"
|
||||
|
|
|
@ -118,8 +118,8 @@ public class CopyRole extends SvrProcess
|
|||
sql.append(") ");
|
||||
sql.append("SELECT ").append(m_AD_Client_ID)
|
||||
.append(", ").append(m_AD_Org_ID)
|
||||
.append(", SYSDATE, ").append(Env.getAD_User_ID(Env.getCtx()))
|
||||
.append(", SYSDATE, ").append(Env.getAD_User_ID(Env.getCtx()))
|
||||
.append(", getDate(), ").append(Env.getAD_User_ID(Env.getCtx()))
|
||||
.append(", getDate(), ").append(Env.getAD_User_ID(Env.getCtx()))
|
||||
.append(", ").append(m_AD_Role_ID_To)
|
||||
.append(", ").append(keycolumn)
|
||||
.append(", IsActive ");
|
||||
|
|
|
@ -109,9 +109,9 @@ public class ImportAccount extends SvrProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID, ").append(m_AD_Client_ID).append("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID, 0),")
|
||||
.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" Processed = 'N', ")
|
||||
|
@ -333,7 +333,7 @@ public class ImportAccount extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -111,9 +111,9 @@ implements ImportProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID, ").append(m_AD_Client_ID).append("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID, 0),")
|
||||
.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" I_IsImported = 'N' ")
|
||||
|
@ -601,7 +601,7 @@ implements ImportProcess
|
|||
rs = null; pstmt = null;
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_BPartner ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -104,9 +104,9 @@ public class ImportBankStatement extends SvrProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID,").append (p_AD_Client_ID).append ("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID,").append (p_AD_Org_ID).append ("),");
|
||||
sql.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" I_IsImported = 'N' ")
|
||||
|
@ -523,7 +523,7 @@ public class ImportBankStatement extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_BankStatement ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -114,12 +114,12 @@ public class ImportConversionRate extends SvrProcess
|
|||
if (p_ValidFrom != null)
|
||||
sql.append(" ValidFrom = COALESCE (ValidFrom,").append (DB.TO_DATE(p_ValidFrom)).append ("),");
|
||||
else
|
||||
sql.append(" ValidFrom = COALESCE (ValidFrom,SysDate),");
|
||||
sql.append(" ValidFrom = COALESCE (ValidFrom,getDate()),");
|
||||
sql.append(" CreateReciprocalRate = COALESCE (CreateReciprocalRate,'").append (p_CreateReciprocalRate ? "Y" : "N").append ("'),")
|
||||
.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = ").append(getAD_User_ID()).append(",")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" Processed = 'N'," )
|
||||
|
@ -285,7 +285,7 @@ public class ImportConversionRate extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_Conversion_Rate ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -115,9 +115,9 @@ public class ImportGLJournal extends SvrProcess
|
|||
// Set IsActive, Created/Updated
|
||||
sql = new StringBuilder ("UPDATE I_GLJournal ")
|
||||
.append("SET IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" I_IsImported = 'N' ")
|
||||
|
@ -141,7 +141,7 @@ public class ImportGLJournal extends SvrProcess
|
|||
sql.append(" C_AcctSchema_ID = COALESCE (C_AcctSchema_ID,").append (m_C_AcctSchema_ID).append ("),");
|
||||
if (m_DateAcct != null)
|
||||
sql.append(" DateAcct = COALESCE (DateAcct,").append (DB.TO_DATE(m_DateAcct)).append ("),");
|
||||
sql.append(" Updated = COALESCE (Updated, SysDate) ")
|
||||
sql.append(" Updated = COALESCE (Updated, getDate()) ")
|
||||
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Client/DocOrg/Default=" + no);
|
||||
|
@ -182,7 +182,7 @@ public class ImportGLJournal extends SvrProcess
|
|||
|
||||
// Set DateAcct (mandatory)
|
||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||
.append("SET DateAcct=SysDate ")
|
||||
.append("SET DateAcct=getDate() ")
|
||||
.append("WHERE DateAcct IS NULL")
|
||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
|
@ -842,7 +842,7 @@ public class ImportGLJournal extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_GLJournal ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -86,9 +86,9 @@ public class ImportInOutConfirm extends SvrProcess
|
|||
// Set IsActive, Created/Updated
|
||||
sql = new StringBuilder ("UPDATE I_InOutLineConfirm ")
|
||||
.append("SET IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" I_IsImported = 'N' ")
|
||||
|
|
|
@ -177,9 +177,9 @@ public class ImportInventory extends SvrProcess implements ImportProcess
|
|||
if (p_MovementDate != null)
|
||||
sql.append(" MovementDate = COALESCE (MovementDate,").append (DB.TO_DATE(p_MovementDate)).append ("),");
|
||||
sql.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" M_Warehouse_ID = NULL,") // reset
|
||||
|
@ -495,7 +495,7 @@ public class ImportInventory extends SvrProcess implements ImportProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_Inventory ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -106,9 +106,9 @@ public class ImportInvoice extends SvrProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID,").append (m_AD_Client_ID).append ("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID,").append (m_AD_Org_ID).append ("),")
|
||||
.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" I_IsImported = 'N' ")
|
||||
|
@ -788,7 +788,7 @@ public class ImportInvoice extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -108,9 +108,9 @@ public class ImportOrder extends SvrProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID,").append (m_AD_Client_ID).append ("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID,").append (m_AD_Org_ID).append ("),")
|
||||
.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" I_IsImported = 'N' ")
|
||||
|
@ -799,7 +799,7 @@ public class ImportOrder extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_Order ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -110,9 +110,9 @@ public class ImportPayment extends SvrProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID,").append (ba.getAD_Client_ID()).append ("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID,").append (p_AD_Org_ID).append ("),");
|
||||
sql.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" I_IsImported = 'N' ")
|
||||
|
@ -529,7 +529,7 @@ public class ImportPayment extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_Payment ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -120,9 +120,9 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID, ").append(m_AD_Client_ID).append("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID, 0),")
|
||||
.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" ProductType = COALESCE (ProductType, 'I'),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
|
@ -433,7 +433,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
+ "UPC,SKU,C_UOM_ID,IsSummary,M_Product_Category_ID,C_TaxCategory_ID,"
|
||||
+ "ProductType,ImageURL,DescriptionURL) "
|
||||
+ "SELECT ?,"
|
||||
+ "AD_Client_ID,AD_Org_ID,'Y',SysDate,CreatedBy,SysDate,UpdatedBy,"
|
||||
+ "AD_Client_ID,AD_Org_ID,'Y',getDate(),CreatedBy,getDate(),UpdatedBy,"
|
||||
+ "Value,Name,Description,DocumentNote,Help,"
|
||||
+ "UPC,SKU,C_UOM_ID,'N',M_Product_Category_ID," + C_TaxCategory_ID + ","
|
||||
+ "ProductType,ImageURL,DescriptionURL "
|
||||
|
@ -451,7 +451,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
+ "(SELECT Value,Name,Description,DocumentNote,Help,"
|
||||
+ "UPC,SKU,C_UOM_ID,M_Product_Category_ID,Classification,ProductType,"
|
||||
+ "Volume,Weight,ShelfWidth,ShelfHeight,ShelfDepth,UnitsPerPallet,"
|
||||
+ "Discontinued,DiscontinuedBy,SysDate,UpdatedBy"
|
||||
+ "Discontinued,DiscontinuedBy,getDate(),UpdatedBy"
|
||||
+ " FROM I_Product WHERE I_Product_ID=?) "
|
||||
+ "WHERE M_Product_ID=?";
|
||||
PreparedStatement pstmt_updateProduct = DB.prepareStatement
|
||||
|
@ -468,7 +468,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
+ "PriceList,PricePO,RoyaltyAmt,PriceEffective,"
|
||||
+ "VendorProductNo,VendorCategory,Manufacturer,"
|
||||
+ "Discontinued,DiscontinuedBy,Order_Min,Order_Pack,"
|
||||
+ "CostPerOrder,DeliveryTime_Promised,SysDate,UpdatedBy"
|
||||
+ "CostPerOrder,DeliveryTime_Promised,getDate(),UpdatedBy"
|
||||
+ " FROM I_Product"
|
||||
+ " WHERE I_Product_ID=?) "
|
||||
+ "WHERE M_Product_ID=? AND C_BPartner_ID=?";
|
||||
|
@ -485,7 +485,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
+ "Discontinued,DiscontinuedBy, DiscontinuedAt, Order_Min,Order_Pack,"
|
||||
+ "CostPerOrder,DeliveryTime_Promised) "
|
||||
+ "SELECT ?,?, "
|
||||
+ "AD_Client_ID,AD_Org_ID,'Y',SysDate,CreatedBy,SysDate,UpdatedBy,"
|
||||
+ "AD_Client_ID,AD_Org_ID,'Y',getDate(),CreatedBy,getDate(),UpdatedBy,"
|
||||
+ "'Y',C_UOM_ID,C_Currency_ID,UPC,"
|
||||
+ "PriceList,PricePO,RoyaltyAmt,PriceEffective,"
|
||||
+ "VendorProductNo,VendorCategory,Manufacturer,"
|
||||
|
@ -497,7 +497,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
// Set Imported = Y
|
||||
pstmt_setImported = DB.prepareStatement
|
||||
("UPDATE I_Product SET I_IsImported='Y', M_Product_ID=?, "
|
||||
+ "Updated=SysDate, Processed='Y' WHERE I_Product_ID=?", get_TrxName());
|
||||
+ "Updated=getDate(), Processed='Y' WHERE I_Product_ID=?", get_TrxName());
|
||||
|
||||
//
|
||||
pstmt = DB.prepareStatement(sql.toString(), get_TrxName());
|
||||
|
@ -543,7 +543,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
.append("(SELECT Value,Name,Description,DocumentNote,Help,")
|
||||
.append("UPC,SKU,C_UOM_ID,M_Product_Category_ID,Classification,ProductType,")
|
||||
.append("Volume,Weight,ShelfWidth,ShelfHeight,ShelfDepth,UnitsPerPallet,")
|
||||
.append("Discontinued,DiscontinuedBy, DiscontinuedAt, SysDate,UpdatedBy")
|
||||
.append("Discontinued,DiscontinuedBy, DiscontinuedAt, getDate(),UpdatedBy")
|
||||
.append(" FROM I_Product WHERE I_Product_ID=").append(I_Product_ID).append(") ")
|
||||
.append("WHERE M_Product_ID=").append(M_Product_ID);
|
||||
PreparedStatement pstmt_updateProduct = DB.prepareStatement
|
||||
|
@ -590,7 +590,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
.append("PriceList,PricePO,RoyaltyAmt,PriceEffective,")
|
||||
.append("VendorProductNo,VendorCategory,Manufacturer,")
|
||||
.append("Discontinued,DiscontinuedBy, DiscontinuedAt, Order_Min,Order_Pack,")
|
||||
.append("CostPerOrder,DeliveryTime_Promised,SysDate,UpdatedBy")
|
||||
.append("CostPerOrder,DeliveryTime_Promised,getDate(),UpdatedBy")
|
||||
.append(" FROM I_Product")
|
||||
.append(" WHERE I_Product_ID=").append(I_Product_ID).append(") ")
|
||||
.append("WHERE M_Product_ID=").append(M_Product_ID).append(" AND C_BPartner_ID=").append(C_BPartner_ID);
|
||||
|
@ -689,7 +689,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_Product ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
addLog (0, null, new BigDecimal (no), "@Errors@");
|
||||
|
|
|
@ -96,9 +96,9 @@ public class ImportReportLine extends SvrProcess
|
|||
.append("SET AD_Client_ID = COALESCE (AD_Client_ID, ").append(m_AD_Client_ID).append("),")
|
||||
.append(" AD_Org_ID = COALESCE (AD_Org_ID, 0),")
|
||||
.append(" IsActive = COALESCE (IsActive, 'Y'),")
|
||||
.append(" Created = COALESCE (Created, SysDate),")
|
||||
.append(" Created = COALESCE (Created, getDate()),")
|
||||
.append(" CreatedBy = COALESCE (CreatedBy, 0),")
|
||||
.append(" Updated = COALESCE (Updated, SysDate),")
|
||||
.append(" Updated = COALESCE (Updated, getDate()),")
|
||||
.append(" UpdatedBy = COALESCE (UpdatedBy, 0),")
|
||||
.append(" I_ErrorMsg = ' ',")
|
||||
.append(" I_IsImported = 'N' ")
|
||||
|
@ -276,7 +276,7 @@ public class ImportReportLine extends SvrProcess
|
|||
.append("AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,")
|
||||
.append("Name,SeqNo,IsPrinted,IsSummary,LineType)")
|
||||
.append("SELECT ?,PA_ReportLineSet_ID,")
|
||||
.append("AD_Client_ID,AD_Org_ID,'Y',SysDate,CreatedBy,SysDate,UpdatedBy,")
|
||||
.append("AD_Client_ID,AD_Org_ID,'Y',getDate(),CreatedBy,getDate(),UpdatedBy,")
|
||||
.append("Name,SeqNo,IsPrinted,IsSummary,LineType ")
|
||||
//jz + "FROM I_ReportLine "
|
||||
// + "WHERE PA_ReportLineSet_ID=? AND Name=? AND ROWNUM=1" // #2..3
|
||||
|
@ -339,7 +339,7 @@ public class ImportReportLine extends SvrProcess
|
|||
// **** Update ReportLine
|
||||
sql = new StringBuilder ("UPDATE PA_ReportLine r ")
|
||||
.append("SET (Description,SeqNo,IsSummary,IsPrinted,LineType,CalculationType,AmountType,PAAmountType,PAPeriodType,PostingType,Updated,UpdatedBy)=")
|
||||
.append(" (SELECT Description,SeqNo,IsSummary,IsPrinted,LineType,CalculationType,AmountType,PAAmountType,PAPeriodType,PostingType,SysDate,UpdatedBy")
|
||||
.append(" (SELECT Description,SeqNo,IsSummary,IsPrinted,LineType,CalculationType,AmountType,PAAmountType,PAPeriodType,PostingType,getDate(),UpdatedBy")
|
||||
.append(" FROM I_ReportLine i WHERE r.Name=i.Name AND r.PA_ReportLineSet_ID=i.PA_ReportLineSet_ID")
|
||||
.append(" AND i.I_ReportLine_ID=(SELECT MIN(I_ReportLine_ID) FROM I_ReportLine iii")
|
||||
.append(" WHERE i.Name=iii.Name AND i.PA_ReportLineSet_ID=iii.PA_ReportLineSet_ID)) ")
|
||||
|
@ -373,7 +373,7 @@ public class ImportReportLine extends SvrProcess
|
|||
.append("AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,")
|
||||
.append("PA_ReportLine_ID,ElementType,C_ElementValue_ID) ")
|
||||
.append("SELECT ?,")
|
||||
.append("AD_Client_ID,AD_Org_ID,'Y',SysDate,CreatedBy,SysDate,UpdatedBy,")
|
||||
.append("AD_Client_ID,AD_Org_ID,'Y',getDate(),CreatedBy,getDate(),UpdatedBy,")
|
||||
.append("PA_ReportLine_ID,'AC',C_ElementValue_ID ")
|
||||
.append("FROM I_ReportLine ")
|
||||
.append("WHERE I_ReportLine_ID=?")
|
||||
|
@ -386,7 +386,7 @@ public class ImportReportLine extends SvrProcess
|
|||
/*
|
||||
String sqlt="UPDATE PA_ReportSource "
|
||||
+ "SET (ElementType,C_ElementValue_ID,Updated,UpdatedBy)="
|
||||
+ " (SELECT 'AC',C_ElementValue_ID,SysDate,UpdatedBy"
|
||||
+ " (SELECT 'AC',C_ElementValue_ID,getDate(),UpdatedBy"
|
||||
+ " FROM I_ReportLine"
|
||||
+ " WHERE I_ReportLine_ID=?) "
|
||||
+ "WHERE PA_ReportSource_ID=?"
|
||||
|
@ -407,7 +407,7 @@ public class ImportReportLine extends SvrProcess
|
|||
pstmt_setImported = DB.prepareStatement
|
||||
("UPDATE I_ReportLine SET I_IsImported='Y',"
|
||||
+ " PA_ReportSource_ID=?, "
|
||||
+ " Updated=SysDate, Processed='Y' WHERE I_ReportLine_ID=?", get_TrxName());
|
||||
+ " Updated=getDate(), Processed='Y' WHERE I_ReportLine_ID=?", get_TrxName());
|
||||
|
||||
pstmt = DB.prepareStatement(sql.toString(), get_TrxName());
|
||||
rs = pstmt.executeQuery();
|
||||
|
@ -445,7 +445,7 @@ public class ImportReportLine extends SvrProcess
|
|||
//jz
|
||||
StringBuilder sqlt= new StringBuilder("UPDATE PA_ReportSource ")
|
||||
.append("SET (ElementType,C_ElementValue_ID,Updated,UpdatedBy)=")
|
||||
.append(" (SELECT CAST('AC' AS CHAR(2)),C_ElementValue_ID,SysDate,UpdatedBy") //jz
|
||||
.append(" (SELECT CAST('AC' AS CHAR(2)),C_ElementValue_ID,getDate(),UpdatedBy") //jz
|
||||
.append(" FROM I_ReportLine")
|
||||
.append(" WHERE I_ReportLine_ID=").append(I_ReportLine_ID).append(") ")
|
||||
.append("WHERE PA_ReportSource_ID=").append(PA_ReportSource_ID).append(" ")
|
||||
|
@ -510,7 +510,7 @@ public class ImportReportLine extends SvrProcess
|
|||
|
||||
// Set Error to indicator to not imported
|
||||
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
||||
.append("SET I_IsImported='N', Updated=SysDate ")
|
||||
.append("SET I_IsImported='N', Updated=getDate() ")
|
||||
.append("WHERE I_IsImported<>'Y'").append(clientCheck);
|
||||
|
||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
|
|
|
@ -139,7 +139,7 @@ public class InventoryCountCreate extends SvrProcess
|
|||
sql.append("(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,");
|
||||
sql.append(" M_Locator_ID, M_Product_ID, M_AttributeSetInstance_ID,");
|
||||
sql.append(" QtyOnHand, DateLastInventory) ");
|
||||
sql.append("SELECT l.AD_CLIENT_ID, l.AD_ORG_ID, 'Y', SysDate, 0,SysDate, 0,");
|
||||
sql.append("SELECT l.AD_CLIENT_ID, l.AD_ORG_ID, 'Y', getDate(), 0,getDate(), 0,");
|
||||
sql.append(" l.M_Locator_ID, p.M_Product_ID, 0,");
|
||||
sql.append(" 0,null ");
|
||||
sql.append("FROM M_Locator l");
|
||||
|
|
|
@ -89,7 +89,7 @@ public class InventoryCountUpdate extends SvrProcess
|
|||
.append("(SELECT SUM(QtyOnHand),SUM(QtyOnHand) FROM M_StorageOnHand s ")
|
||||
.append("WHERE s.M_Product_ID=l.M_Product_ID AND s.M_Locator_ID=l.M_Locator_ID")
|
||||
.append(" AND s.M_AttributeSetInstance_ID=l.M_AttributeSetInstance_ID),")
|
||||
.append(" Updated=SysDate,")
|
||||
.append(" Updated=getDate(),")
|
||||
.append(" UpdatedBy=").append(getAD_User_ID())
|
||||
//
|
||||
.append(" WHERE M_Inventory_ID=").append(p_M_Inventory_ID)
|
||||
|
|
|
@ -348,7 +348,7 @@ public class InvoicePrint extends SvrProcess
|
|||
if (printed)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder ("UPDATE C_Invoice ")
|
||||
.append("SET DatePrinted=SysDate, IsPrinted='Y' WHERE C_Invoice_ID=")
|
||||
.append("SET DatePrinted=getDate(), IsPrinted='Y' WHERE C_Invoice_ID=")
|
||||
.append (C_Invoice_ID);
|
||||
@SuppressWarnings("unused")
|
||||
int no = DB.executeUpdate(sb.toString(), get_TrxName());
|
||||
|
|
|
@ -452,9 +452,9 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
sqlins.append(" ,");
|
||||
sqlins.append(rsCurgen.getInt("AD_Org_ID"));
|
||||
sqlins.append(" ,'Y'");
|
||||
sqlins.append(" ,SysDate,");
|
||||
sqlins.append(" ,getDate(),");
|
||||
sqlins.append(currentUserID);
|
||||
sqlins.append(" ,SysDate,");
|
||||
sqlins.append(" ,getDate(),");
|
||||
sqlins.append(currentUserID);
|
||||
//
|
||||
//Price List
|
||||
|
@ -577,9 +577,9 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
sqlins.append(rsCurgen.getInt("AD_Client_ID"));
|
||||
sqlins.append(", ");
|
||||
sqlins.append(rsCurgen.getInt("AD_Org_ID"));
|
||||
sqlins.append(", 'Y', SysDate, ");
|
||||
sqlins.append(", 'Y', getDate(), ");
|
||||
sqlins.append(currentUserID);
|
||||
sqlins.append(", SysDate, ");
|
||||
sqlins.append(", getDate(), ");
|
||||
sqlins.append(currentUserID);
|
||||
sqlins.append(" ,");
|
||||
// Price List
|
||||
|
|
|
@ -70,7 +70,7 @@ public class NoteDelete extends SvrProcess
|
|||
if (p_AD_User_ID > 0)
|
||||
sql.append(" AND AD_User_ID=").append(p_AD_User_ID);
|
||||
if (p_KeepLogDays > 0)
|
||||
sql.append(" AND (Created+").append(p_KeepLogDays).append(") < SysDate");
|
||||
sql.append(" AND (Created+").append(p_KeepLogDays).append(") < getDate()");
|
||||
//
|
||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
StringBuilder msgreturn = new StringBuilder("@Deleted@ = ").append(no);
|
||||
|
|
|
@ -93,7 +93,7 @@ public class PeriodStatus extends SvrProcess
|
|||
else
|
||||
return "-";
|
||||
//
|
||||
sql.append("', PeriodAction='N', Updated=SysDate,UpdatedBy=").append(getAD_User_ID());
|
||||
sql.append("', PeriodAction='N', Updated=getDate(),UpdatedBy=").append(getAD_User_ID());
|
||||
// WHERE
|
||||
sql.append(" WHERE C_Period_ID=").append(period.getC_Period_ID())
|
||||
.append(" AND PeriodStatus<>'P'")
|
||||
|
|
|
@ -84,7 +84,7 @@ public class ProductCategoryAcctCopy extends SvrProcess
|
|||
.append(" FROM M_Product_Category_Acct pca")
|
||||
.append(" WHERE pca.M_Product_Category_ID=").append(p_M_Product_Category_ID)
|
||||
.append(" AND pca.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append("), Updated=SysDate, UpdatedBy=0 ")
|
||||
.append("), Updated=getDate(), UpdatedBy=0 ")
|
||||
.append("WHERE pa.C_AcctSchema_ID=").append(p_C_AcctSchema_ID)
|
||||
.append(" AND EXISTS (SELECT * FROM M_Product p ")
|
||||
.append("WHERE p.M_Product_ID=pa.M_Product_ID")
|
||||
|
@ -101,7 +101,7 @@ public class ProductCategoryAcctCopy extends SvrProcess
|
|||
.append(" P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, ")
|
||||
.append(" P_RateVariance_Acct, P_LandedCostClearing_Acct) ")
|
||||
.append("SELECT p.M_Product_ID, acct.C_AcctSchema_ID,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(" p.AD_Client_ID, p.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(" acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct,")
|
||||
.append(" acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct,")
|
||||
.append(" acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct, ")
|
||||
|
|
|
@ -69,14 +69,14 @@ public class StorageCleanup extends SvrProcess
|
|||
// Clean up empty Storage
|
||||
String sql = "DELETE FROM M_StorageOnHand "
|
||||
+ "WHERE QtyOnHand = 0"
|
||||
+ " AND Created < SysDate-3";
|
||||
+ " AND Created < getDate()-3";
|
||||
int no = DB.executeUpdate(sql, get_TrxName());
|
||||
if (log.isLoggable(Level.INFO)) log.info("Delete Empty #" + no);
|
||||
|
||||
// Clean up empty Reservation Storage
|
||||
sql = "DELETE FROM M_StorageReservation "
|
||||
+ "WHERE Qty = 0"
|
||||
+ " AND Created < SysDate-3";
|
||||
+ " AND Created < getDate()-3";
|
||||
no = DB.executeUpdate(sql, get_TrxName());
|
||||
if (log.isLoggable(Level.INFO)) log.info("Delete Empty #" + no);
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" SET (ColumnName, Name, Description, Help, Placeholder) ="
|
||||
+" (SELECT ColumnName, Name, Description, Help, Placeholder"
|
||||
+" FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE EXISTS (SELECT 1 FROM AD_ELEMENT e "
|
||||
+" WHERE c.AD_Element_ID=e.AD_Element_ID"
|
||||
+" AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name "
|
||||
|
@ -153,7 +153,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" SET (ColumnName, Name, Description, Help, Placeholder) ="
|
||||
+" (SELECT ColumnName, Name, Description, Help, Placeholder"
|
||||
+" FROM AD_ELEMENT e WHERE c.AD_Element_ID=e.AD_Element_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE c.IsCentrallyMaintained='Y' AND c.IsActive='Y'"
|
||||
+" AND EXISTS (SELECT 1 FROM AD_ELEMENT e "
|
||||
+" WHERE c.AD_Element_ID=e.AD_Element_ID"
|
||||
|
@ -171,7 +171,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" (SELECT e.Name, e.Description, e.Help, e.Placeholder"
|
||||
+" FROM AD_ELEMENT e, AD_COLUMN c"
|
||||
+" WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y'"
|
||||
+" AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c"
|
||||
+" WHERE f.AD_Column_ID=c.AD_Column_ID"
|
||||
|
@ -200,7 +200,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f"
|
||||
+" WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID "
|
||||
+" AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c"
|
||||
+" WHERE trl.AD_Field_ID=f.AD_Field_ID"
|
||||
+" AND f.AD_Column_ID=c.AD_Column_ID"
|
||||
|
@ -222,7 +222,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID),"
|
||||
+" Help = (SELECT e.PO_Help FROM AD_ELEMENT e, AD_COLUMN c"
|
||||
+" WHERE e.AD_Element_ID=c.AD_Element_ID AND c.AD_Column_ID=f.AD_Column_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y'"
|
||||
+" AND EXISTS (SELECT 1 FROM AD_ELEMENT e, AD_COLUMN c"
|
||||
+" WHERE f.AD_Column_ID=c.AD_Column_ID"
|
||||
|
@ -252,7 +252,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" IsTranslated = (SELECT e.IsTranslated FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_FIELD f"
|
||||
+" WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID "
|
||||
+" AND c.AD_Column_ID=f.AD_Column_ID AND f.AD_Field_ID=trl.AD_Field_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE EXISTS (SELECT 1 FROM AD_FIELD f, AD_ELEMENT_TRL e, AD_COLUMN c"
|
||||
+" WHERE trl.AD_Field_ID=f.AD_Field_ID"
|
||||
+" AND f.AD_Column_ID=c.AD_Column_ID"
|
||||
|
@ -279,7 +279,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" AND c.AD_Column_ID=f.AD_Column_ID),"
|
||||
+" Help = (SELECT p.Help FROM AD_PROCESS p, AD_COLUMN c WHERE p.AD_Process_ID=c.AD_Process_ID"
|
||||
+" AND c.AD_Column_ID=f.AD_Column_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y'"
|
||||
+" AND EXISTS (SELECT 1 FROM AD_PROCESS p, AD_COLUMN c"
|
||||
+" WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID"
|
||||
|
@ -303,7 +303,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" IsTranslated = (SELECT p.IsTranslated FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f"
|
||||
+" WHERE p.AD_Process_ID=c.AD_Process_ID AND c.AD_Column_ID=f.AD_Column_ID"
|
||||
+" AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE EXISTS (SELECT 1 FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f"
|
||||
+" WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID"
|
||||
+" AND f.AD_Field_ID=trl.AD_Field_ID AND p.AD_LANGUAGE=trl.AD_LANGUAGE"
|
||||
|
@ -346,7 +346,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" WHERE e.ColumnName=f.ColumnName),"
|
||||
+" Placeholder = (SELECT e.Placeholder FROM AD_ELEMENT e"
|
||||
+" WHERE e.ColumnName=f.ColumnName),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE f.IsCentrallyMaintained='Y' AND f.IsActive='Y'"
|
||||
+" AND EXISTS (SELECT 1 FROM AD_ELEMENT e"
|
||||
+" WHERE e.ColumnName=f.ColumnName"
|
||||
|
@ -373,7 +373,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f"
|
||||
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
|
||||
+" AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_PROCESS_PARA f"
|
||||
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
|
||||
+" AND e.ColumnName=f.ColumnName AND f.AD_Process_Para_ID=trl.AD_Process_Para_ID"
|
||||
|
@ -401,7 +401,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" IsTranslated = (SELECT et.IsTranslated FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f"
|
||||
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
|
||||
+" AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE EXISTS (SELECT 1 FROM AD_ELEMENT_TRL et, AD_ELEMENT e, AD_INFOCOLUMN f"
|
||||
+" WHERE et.AD_LANGUAGE=trl.AD_LANGUAGE AND et.AD_Element_ID=e.AD_Element_ID"
|
||||
+" AND e.ColumnName=f.ColumnName AND f.AD_InfoColumn_ID=trl.AD_InfoColumn_ID"
|
||||
|
@ -562,7 +562,7 @@ public class SynchronizeTerminology extends SvrProcess
|
|||
+" SET Name = (SELECT e.Name FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_PRINTFORMATITEM p"
|
||||
+" WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE AND e.AD_Element_ID=c.AD_Element_ID "
|
||||
+" AND c.AD_Column_ID=p.AD_Column_ID AND p.AD_PrintFormatItem_ID=trl.AD_PrintFormatItem_ID),"
|
||||
+" Updated = SYSDATE"
|
||||
+" Updated = getDate()"
|
||||
+" WHERE EXISTS (SELECT 1 FROM AD_PRINTFORMATITEM p, AD_ELEMENT_TRL e, AD_COLUMN c"
|
||||
+" WHERE trl.AD_PrintFormatItem_ID=p.AD_PrintFormatItem_ID"
|
||||
+" AND p.AD_Column_ID=c.AD_Column_ID"
|
||||
|
|
|
@ -105,9 +105,9 @@ public class RecreateStorageReservation extends SvrProcess {
|
|||
+ " o.IsSOTrx, "
|
||||
+ " w.AD_Client_ID, "
|
||||
+ " w.AD_Org_ID, "
|
||||
+ " SysDate, "
|
||||
+ " getDate(), "
|
||||
+ " ?, "
|
||||
+ " SysDate, "
|
||||
+ " getDate(), "
|
||||
+ " ?, "
|
||||
+ " 'Y', "
|
||||
+ " generate_uuid() "
|
||||
|
|
|
@ -48,7 +48,7 @@ public class ResetLockedAccount extends SvrProcess {
|
|||
if (!user.isLocked())
|
||||
throw new AdempiereException(Msg.getMsg(getCtx(), "UserIsNotLocked", new Object[] {user.getName()}));
|
||||
|
||||
StringBuilder sql = new StringBuilder ("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=SysDate ")
|
||||
StringBuilder sql = new StringBuilder ("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=getDate() ")
|
||||
.append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ")
|
||||
.append(" AND AD_User_ID = " + user.getAD_User_ID());
|
||||
int no = DB.executeUpdate(sql.toString(), new Object[] { p_AD_Client_ID }, false, get_TrxName());
|
||||
|
@ -63,7 +63,7 @@ public class ResetLockedAccount extends SvrProcess {
|
|||
int MAX_ACCOUNT_LOCK_MINUTES = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_ACCOUNT_LOCK_MINUTES, 0);
|
||||
int MAX_INACTIVE_PERIOD = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_INACTIVE_PERIOD_DAY, 0);
|
||||
|
||||
StringBuilder sql = new StringBuilder("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=SysDate ")
|
||||
StringBuilder sql = new StringBuilder("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=getDate() ")
|
||||
.append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ");
|
||||
|
||||
if (DB.isPostgreSQL())
|
||||
|
@ -76,9 +76,9 @@ public class ResetLockedAccount extends SvrProcess {
|
|||
else
|
||||
{
|
||||
if (MAX_ACCOUNT_LOCK_MINUTES > 0)
|
||||
sql.append(" AND (SysDate-DateAccountLocked) * 1440 > ").append(MAX_ACCOUNT_LOCK_MINUTES);
|
||||
sql.append(" AND (getDate()-DateAccountLocked) * 1440 > ").append(MAX_ACCOUNT_LOCK_MINUTES);
|
||||
if (MAX_INACTIVE_PERIOD > 0)
|
||||
sql.append(" AND (SysDate-DateLastLogin) <= ").append(MAX_INACTIVE_PERIOD);
|
||||
sql.append(" AND (getDate()-DateLastLogin) <= ").append(MAX_INACTIVE_PERIOD);
|
||||
}
|
||||
|
||||
int no = DB.executeUpdate(sql.toString(), p_AD_Client_ID, get_TrxName());
|
||||
|
|
|
@ -164,7 +164,7 @@ public class Matcher
|
|||
.append("M_Product_ID,DateTrx,Qty, ")
|
||||
.append("Processing,Processed,Posted) VALUES (")
|
||||
.append(M_MatchInv_ID).append(", ")
|
||||
.append(AD_Client_ID).append(",").append(AD_Org_ID).append(",'Y',SysDate,0,SysDate,0, ")
|
||||
.append(AD_Client_ID).append(",").append(AD_Org_ID).append(",'Y',getDate(),0,getDate(),0, ")
|
||||
.append(M_InOutLine_ID).append(",").append(C_InvoiceLine_ID).append(", ")
|
||||
.append(M_Product_ID).append(",").append(DB.TO_DATE(DateTrx,true)).append(",").append(Qty)
|
||||
.append(", 'N','Y','N')");
|
||||
|
|
|
@ -608,7 +608,7 @@ public final class ImpFormat
|
|||
.append("AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive") // StdFields
|
||||
.append(") VALUES (").append(ID).append(",")
|
||||
.append(AD_Client_ID).append(",").append(AD_Org_ID)
|
||||
.append(",SysDate,").append(UpdatedBy).append(",SysDate,").append(UpdatedBy).append(",'Y'")
|
||||
.append(",getDate(),").append(UpdatedBy).append(",getDate(),").append(UpdatedBy).append(",'Y'")
|
||||
.append(")");
|
||||
//
|
||||
int no = DB.executeUpdate(sql.toString(), trxName);
|
||||
|
@ -629,7 +629,7 @@ public final class ImpFormat
|
|||
.append(m_tableName).append(" SET ");
|
||||
for (int i = 0; i < nodes.length; i++)
|
||||
sql.append(nodes[i]).append(","); // column=value
|
||||
sql.append("IsActive='Y',Processed='N',I_IsImported='N',Updated=SysDate,UpdatedBy=").append(UpdatedBy);
|
||||
sql.append("IsActive='Y',Processed='N',I_IsImported='N',Updated=getDate(),UpdatedBy=").append(UpdatedBy);
|
||||
sql.append(" WHERE ").append(m_tablePK).append("=").append(ID);
|
||||
// Update Cmd
|
||||
int no = DB.executeUpdate(sql.toString(), trxName);
|
||||
|
|
|
@ -642,7 +642,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
if (where.length() > 0)
|
||||
where.append(" AND ");
|
||||
where.append("Created >= ");
|
||||
where.append("SysDate-").append(m_vo.onlyCurrentDays);
|
||||
where.append("getDate()-").append(m_vo.onlyCurrentDays);
|
||||
}
|
||||
// Detail Query
|
||||
if (isDetail())
|
||||
|
|
|
@ -400,7 +400,7 @@ public class GridTable extends AbstractTableModel
|
|||
where.append(" AND ");
|
||||
// Show only unprocessed or the one updated within x days
|
||||
where.append("(Processed='N' OR Updated>");
|
||||
where.append("SysDate-1");
|
||||
where.append("getDate()-1");
|
||||
where.append(")");
|
||||
}
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ public class MAcctProcessor extends X_C_AcctProcessor
|
|||
return 0;
|
||||
StringBuilder sql = new StringBuilder("DELETE FROM C_AcctProcessorLog ")
|
||||
.append("WHERE C_AcctProcessor_ID=").append(getC_AcctProcessor_ID())
|
||||
.append(" AND (Created+").append(getKeepLogDays()).append(") < SysDate");
|
||||
.append(" AND (Created+").append(getKeepLogDays()).append(") < getDate()");
|
||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
return no;
|
||||
} // deleteLog
|
||||
|
|
|
@ -132,7 +132,7 @@ public class MAlertProcessor extends X_AD_AlertProcessor
|
|||
return 0;
|
||||
String sql = "DELETE FROM AD_AlertProcessorLog "
|
||||
+ "WHERE AD_AlertProcessor_ID=" + getAD_AlertProcessor_ID()
|
||||
+ " AND (Created+" + getKeepLogDays() + ") < SysDate";
|
||||
+ " AND (Created+" + getKeepLogDays() + ") < getDate()";
|
||||
int no = DB.executeUpdate(sql, get_TrxName());
|
||||
return no;
|
||||
} // deleteLog
|
||||
|
|
|
@ -48,7 +48,7 @@ protected boolean afterSave (boolean newRecord,boolean success)
|
|||
p_A_Asset_ID = getA_Asset_ID();
|
||||
|
||||
|
||||
String sql = "SELECT SUM(USEUNITS) FROM A_Asset_use WHERE A_Asset_ID=? and usedate <= SYSDATE";
|
||||
String sql = "SELECT SUM(USEUNITS) FROM A_Asset_use WHERE A_Asset_ID=? and usedate <= getDate()";
|
||||
total_unitsused = DB.getSQLValueEx(null, sql, getA_Asset_ID());
|
||||
|
||||
MAsset asset = MAsset.get(getCtx(), p_A_Asset_ID, null);
|
||||
|
|
|
@ -206,7 +206,7 @@ public class MCStage extends X_CM_CStage
|
|||
.append("(AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, ")
|
||||
.append("AD_Tree_ID, Node_ID, Parent_ID, SeqNo) ")
|
||||
.append("VALUES (")
|
||||
.append(getAD_Client_ID()).append(",0, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(getAD_Client_ID()).append(",0, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(getAD_Tree_ID()).append(",").append(get_ID())
|
||||
.append(", 0, 999)");
|
||||
int no = DB.executeUpdate(sb.toString(), get_TrxName());
|
||||
|
|
|
@ -440,7 +440,7 @@ public class MContainer extends X_CM_Container
|
|||
.append("(AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, ")
|
||||
.append("AD_Tree_ID, Node_ID, Parent_ID, SeqNo) ").append("VALUES (")
|
||||
.append (getAD_Client_ID ()).append (
|
||||
",0, 'Y', SysDate, 0, SysDate, 0,").append (
|
||||
",0, 'Y', getDate(), 0, getDate(), 0,").append (
|
||||
getAD_Tree_ID ()).append (",").append (get_ID ()).append (
|
||||
", 0, 999)");
|
||||
int no = DB.executeUpdate (sb.toString (), get_TrxName ());
|
||||
|
|
|
@ -424,7 +424,7 @@ public class MCost extends X_M_Cost
|
|||
protected static BigDecimal getSeedCostFromPriceList(MProduct product,
|
||||
MAcctSchema as, int orgID) {
|
||||
String sql = "SELECT pp.PriceList, pp.PriceStd FROM M_ProductPrice pp" +
|
||||
" INNER JOIN M_PriceList_Version plv ON (pp.M_PriceList_Version_ID = plv.M_PriceList_Version_ID AND plv.ValidFrom <= trunc(sysdate))" +
|
||||
" INNER JOIN M_PriceList_Version plv ON (pp.M_PriceList_Version_ID = plv.M_PriceList_Version_ID AND plv.ValidFrom <= trunc(getDate()))" +
|
||||
" INNER JOIN M_PriceList pl ON (plv.M_PriceList_ID = pl.M_PriceList_ID AND pl.IsSOPriceList = 'N')" +
|
||||
" WHERE pp.AD_Client_ID = ? AND pp.AD_Org_ID IN (0, ?) AND pp.M_Product_ID = ? AND pp.PriceList > 0 AND pp.IsActive = 'Y' " +
|
||||
" ORDER BY pp.AD_Org_ID Desc, plv.ValidFrom Desc";
|
||||
|
|
|
@ -271,8 +271,8 @@ public class MDocType extends X_C_DocType
|
|||
.append("(AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,")
|
||||
.append("C_DocType_ID , AD_Ref_List_ID, AD_Role_ID) ")
|
||||
.append("(SELECT ")
|
||||
.append(getAD_Client_ID()).append(",0,'Y', SysDate,")
|
||||
.append(getUpdatedBy()).append(", SysDate,").append(getUpdatedBy())
|
||||
.append(getAD_Client_ID()).append(",0,'Y', getDate(),")
|
||||
.append(getUpdatedBy()).append(", getDate(),").append(getUpdatedBy())
|
||||
.append(", doctype.C_DocType_ID, action.AD_Ref_List_ID, rol.AD_Role_ID ")
|
||||
.append("FROM AD_Client client ")
|
||||
.append("INNER JOIN C_DocType doctype ON (doctype.AD_Client_ID=client.AD_Client_ID) ")
|
||||
|
|
|
@ -130,7 +130,7 @@ public class MIMPProcessor
|
|||
return 0;
|
||||
StringBuilder sql = new StringBuilder("DELETE FROM ").append(X_IMP_ProcessorLog.Table_Name).append(" ")
|
||||
.append("WHERE ").append(X_IMP_ProcessorLog.COLUMNNAME_IMP_Processor_ID).append("=").append(getIMP_Processor_ID())
|
||||
.append(" AND (Created+").append(getKeepLogDays()).append(") < SysDate");
|
||||
.append(" AND (Created+").append(getKeepLogDays()).append(") < getDate()");
|
||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
return no;
|
||||
}
|
||||
|
|
|
@ -460,7 +460,7 @@ public class MLanguage extends X_AD_Language
|
|||
.append("Createdby,UpdatedBy,Created,Updated, ")
|
||||
.append(keyColumn).append(cols).append(") ")
|
||||
.append("SELECT '").append(getAD_Language()).append("','N', AD_Client_ID,AD_Org_ID, ")
|
||||
.append(AD_User_ID).append(",").append(AD_User_ID).append(", SysDate, SysDate, ")
|
||||
.append(AD_User_ID).append(",").append(AD_User_ID).append(", getDate(), getDate(), ")
|
||||
.append(keyColumn).append(cols)
|
||||
.append(" FROM ").append(baseTable)
|
||||
.append(" WHERE ").append(keyColumn).append(" NOT IN (SELECT ").append(keyColumn)
|
||||
|
|
|
@ -183,7 +183,7 @@ public class MLdapProcessor extends X_AD_LdapProcessor implements AdempiereProce
|
|||
return 0;
|
||||
StringBuilder sql = new StringBuilder("DELETE FROM AD_LdapProcessorLog ")
|
||||
.append("WHERE AD_LdapProcessor_ID=").append(getAD_LdapProcessor_ID())
|
||||
.append(" AND (Created+").append(getKeepLogDays()).append(") < SysDate");
|
||||
.append(" AND (Created+").append(getKeepLogDays()).append(") < getDate()");
|
||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||
return no;
|
||||
} // deleteLog
|
||||
|
|
|
@ -160,7 +160,7 @@ public class MMedia extends X_CM_Media
|
|||
+ "(AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, "
|
||||
+ "AD_Tree_ID, Node_ID, Parent_ID, SeqNo) "
|
||||
+ "VALUES (")
|
||||
.append(getAD_Client_ID()).append(",0, 'Y', SysDate, 0, SysDate, 0,")
|
||||
.append(getAD_Client_ID()).append(",0, 'Y', getDate(), 0, getDate(), 0,")
|
||||
.append(getAD_Tree_ID()).append(",").append(get_ID())
|
||||
.append(", 0, 999)");
|
||||
int no = DB.executeUpdate(sb.toString(), get_TrxName());
|
||||
|
|
|
@ -130,7 +130,7 @@ public class MNewsChannel extends X_CM_NewsChannel
|
|||
xmlCode.append (" </image>");
|
||||
|
||||
String whereClause = "";
|
||||
if (!showFutureItems) whereClause = "sysdate>pubdate";
|
||||
if (!showFutureItems) whereClause = "getDate()>pubdate";
|
||||
MNewsItem[] theseItems = getNewsItems(whereClause);
|
||||
|
||||
for(int i=0;i<theseItems.length;i++)
|
||||
|
|
|
@ -39,7 +39,7 @@ public class MPasswordHistory extends X_AD_Password_History {
|
|||
return new ArrayList<MPasswordHistory>();
|
||||
}
|
||||
StringBuilder whereClause = new StringBuilder()
|
||||
.append("SYSDATE-")
|
||||
.append("getDate()-")
|
||||
.append(daysReuse)
|
||||
.append("<=DatePasswordChanged AND AD_User_ID=")
|
||||
.append(userId);
|
||||
|
|
|
@ -703,7 +703,7 @@ public class MProduct extends X_M_Product
|
|||
+ "FROM M_Product p "
|
||||
+ "WHERE p.M_Product_ID=a.M_Product_ID) "
|
||||
+ "WHERE IsActive='Y'"
|
||||
// + " AND GuaranteeDate > SysDate"
|
||||
// + " AND GuaranteeDate > getDate()"
|
||||
+ " AND M_Product_ID=" + getM_Product_ID();
|
||||
int no = DB.executeUpdate(sql, get_TrxName());
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Asset Description updated #" + no);
|
||||
|
|
|
@ -140,7 +140,7 @@ public class MRMALine extends X_M_RMALine
|
|||
|
||||
// Retrieve tax Exempt
|
||||
String sql = "SELECT C_Tax_ID FROM C_Tax WHERE AD_Client_ID=? AND IsActive='Y' "
|
||||
+ "AND IsTaxExempt='Y' AND ValidFrom < SYSDATE ORDER BY IsDefault DESC";
|
||||
+ "AND IsTaxExempt='Y' AND ValidFrom < getDate() ORDER BY IsDefault DESC";
|
||||
|
||||
// Set tax for charge as exempt
|
||||
taxId = DB.getSQLValueEx(null, sql, Env.getAD_Client_ID(getCtx()));
|
||||
|
|
|
@ -197,7 +197,7 @@ public class MRecentItem extends X_AD_RecentItem
|
|||
ri.setAD_Tab_ID(AD_Tab_ID);
|
||||
ri.saveEx();
|
||||
} else {
|
||||
DB.executeUpdateEx("UPDATE AD_RecentItem SET Updated=SYSDATE WHERE AD_RecentItem_ID=?", new Object[] {ri.getAD_RecentItem_ID()}, null);
|
||||
DB.executeUpdateEx("UPDATE AD_RecentItem SET Updated=getDate() WHERE AD_RecentItem_ID=?", new Object[] {ri.getAD_RecentItem_ID()}, null);
|
||||
}
|
||||
}
|
||||
publishChangedEvent(AD_User_ID);
|
||||
|
@ -228,7 +228,7 @@ public class MRecentItem extends X_AD_RecentItem
|
|||
public static void touchUpdatedRecord(Properties ctx, int AD_Table_ID, int Record_ID, int AD_User_ID) {
|
||||
MRecentItem ri = get(ctx, AD_Table_ID, Record_ID, AD_User_ID);
|
||||
if (ri != null) {
|
||||
DB.executeUpdateEx("UPDATE AD_RecentItem SET Updated=SYSDATE WHERE AD_RecentItem_ID=?", new Object[] {ri.getAD_RecentItem_ID()}, null);
|
||||
DB.executeUpdateEx("UPDATE AD_RecentItem SET Updated=getDate() WHERE AD_RecentItem_ID=?", new Object[] {ri.getAD_RecentItem_ID()}, null);
|
||||
deleteExtraRecentItems(ctx, AD_User_ID);
|
||||
publishChangedEvent(AD_User_ID);
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ public class MRequestProcessor extends X_R_RequestProcessor
|
|||
return 0;
|
||||
String sql = "DELETE FROM R_RequestProcessorLog "
|
||||
+ "WHERE R_RequestProcessor_ID=" + getR_RequestProcessor_ID()
|
||||
+ " AND (Created+" + getKeepLogDays() + ") < SysDate";
|
||||
+ " AND (Created+" + getKeepLogDays() + ") < getDate()";
|
||||
int no = DB.executeUpdate(sql, get_TrxName());
|
||||
return no;
|
||||
} // deleteLog
|
||||
|
|
|
@ -151,10 +151,10 @@ public class MRequestType extends X_R_RequestType
|
|||
+ "(SELECT COUNT(*) FROM R_Request r "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID) AS TotalNo, "
|
||||
+ "(SELECT COUNT(*) FROM R_Request r "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID AND Created>addDays(SysDate,-30)) AS New30No, "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID AND Created>addDays(getDate(),-30)) AS New30No, "
|
||||
+ "(SELECT COUNT(*) FROM R_Request r"
|
||||
+ " INNER JOIN R_Status s ON (r.R_Status_ID=s.R_Status_ID AND s.IsClosed='Y') "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID AND r.Updated>addDays(SysDate,-30)) AS Closed30No "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID AND r.Updated>addDays(getDate(),-30)) AS Closed30No "
|
||||
//
|
||||
+ "FROM R_RequestType x WHERE R_RequestType_ID=?";
|
||||
PreparedStatement pstmt = null;
|
||||
|
|
|
@ -425,8 +425,8 @@ public final class MRole extends X_AD_Role
|
|||
return "-";
|
||||
|
||||
String roleClientOrgUser = getAD_Role_ID() + ","
|
||||
+ getAD_Client_ID() + "," + getAD_Org_ID() + ",'Y', SysDate,"
|
||||
+ getUpdatedBy() + ", SysDate," + getUpdatedBy()
|
||||
+ getAD_Client_ID() + "," + getAD_Org_ID() + ",'Y', getDate(),"
|
||||
+ getUpdatedBy() + ", getDate()," + getUpdatedBy()
|
||||
+ ",'Y' "; // IsReadWrite
|
||||
|
||||
String sqlWindow = "INSERT INTO AD_Window_Access "
|
||||
|
@ -474,8 +474,8 @@ public final class MRole extends X_AD_Role
|
|||
+ "(AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"
|
||||
+ "C_DocType_ID , AD_Ref_List_ID, AD_Role_ID) "
|
||||
+ "(SELECT "
|
||||
+ getAD_Client_ID() + ",0,'Y', SysDate,"
|
||||
+ getUpdatedBy() + ", SysDate," + getUpdatedBy()
|
||||
+ getAD_Client_ID() + ",0,'Y', getDate(),"
|
||||
+ getUpdatedBy() + ", getDate()," + getUpdatedBy()
|
||||
+ ", doctype.C_DocType_ID, action.AD_Ref_List_ID, rol.AD_Role_ID "
|
||||
+ "FROM AD_Client client "
|
||||
+ "INNER JOIN C_DocType doctype ON (doctype.AD_Client_ID=client.AD_Client_ID) "
|
||||
|
@ -491,8 +491,8 @@ public final class MRole extends X_AD_Role
|
|||
+ "(AD_InfoWindow_ID, AD_Role_ID,"
|
||||
+ " AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy) "
|
||||
+ "SELECT i.AD_InfoWindow_ID," + getAD_Role_ID() + ","
|
||||
+ getAD_Client_ID() + "," + getAD_Org_ID() + ",'Y',SysDate,"
|
||||
+ getUpdatedBy() + ", SysDate," + getUpdatedBy()
|
||||
+ getAD_Client_ID() + "," + getAD_Org_ID() + ",'Y',getDate(),"
|
||||
+ getUpdatedBy() + ", getDate()," + getUpdatedBy()
|
||||
+ " FROM AD_InfoWindow i LEFT JOIN AD_InfoWindow_Access ia ON "
|
||||
+ "(ia.AD_Role_ID=" + getAD_Role_ID()
|
||||
+ " AND i.AD_InfoWindow_ID = ia.AD_InfoWindow_ID) "
|
||||
|
@ -2827,8 +2827,8 @@ public final class MRole extends X_AD_Role
|
|||
+" SELECT 1 FROM AD_User_Roles ur"
|
||||
+" INNER JOIN AD_User_Substitute us ON (us.AD_User_ID=ur.AD_User_ID)"
|
||||
+" WHERE ur.AD_Role_ID=AD_Role.AD_Role_ID AND ur.IsActive='Y' AND us.IsActive='Y'"
|
||||
+" AND (us.ValidFrom IS NULL OR us.ValidFrom <= SYSDATE)"
|
||||
+" AND (us.ValidTo IS NULL OR us.ValidTo >= SYSDATE)"
|
||||
+" AND (us.ValidFrom IS NULL OR us.ValidFrom <= getDate())"
|
||||
+" AND (us.ValidTo IS NULL OR us.ValidTo >= getDate())"
|
||||
+" AND us.Substitute_ID=?)";
|
||||
|
||||
List<MRole> list = new Query(getCtx(), Table_Name, whereClause, get_TrxName())
|
||||
|
|
|
@ -144,7 +144,7 @@ public class MScheduler extends X_AD_Scheduler
|
|||
return 0;
|
||||
String sql = "DELETE FROM AD_SchedulerLog "
|
||||
+ "WHERE AD_Scheduler_ID=" + getAD_Scheduler_ID()
|
||||
+ " AND (Created+" + getKeepLogDays() + ") < SysDate";
|
||||
+ " AND (Created+" + getKeepLogDays() + ") < getDate()";
|
||||
int no = DB.executeUpdateEx(sql, get_TrxName());
|
||||
return no;
|
||||
} // deleteLog
|
||||
|
|
|
@ -150,7 +150,7 @@ public final class MSetup
|
|||
Env.setContext(m_ctx, "#AD_Client_ID", AD_Client_ID);
|
||||
|
||||
// Standard Values
|
||||
m_stdValues = String.valueOf(AD_Client_ID) + ",0,'Y',SysDate,0,SysDate,0";
|
||||
m_stdValues = String.valueOf(AD_Client_ID) + ",0,'Y',getDate(),0,getDate(),0";
|
||||
// Info - Client
|
||||
m_info.append(Msg.translate(m_lang, "AD_Client_ID")).append("=").append(name).append("\n");
|
||||
|
||||
|
@ -197,7 +197,7 @@ public final class MSetup
|
|||
}
|
||||
Env.setContext(m_ctx, m_WindowNo, "AD_Org_ID", getAD_Org_ID());
|
||||
Env.setContext(m_ctx, "#AD_Org_ID", getAD_Org_ID());
|
||||
m_stdValuesOrg = AD_Client_ID + "," + getAD_Org_ID() + ",'Y',SysDate,0,SysDate,0";
|
||||
m_stdValuesOrg = AD_Client_ID + "," + getAD_Org_ID() + ",'Y',getDate(),0,getDate(),0";
|
||||
// Info
|
||||
m_info.append(Msg.translate(m_lang, "AD_Org_ID")).append("=").append(name).append("\n");
|
||||
|
||||
|
|
|
@ -725,7 +725,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
|
|||
* @param addition
|
||||
*/
|
||||
public void addQtyOnHand(BigDecimal addition) {
|
||||
final String sql = "UPDATE M_StorageOnHand SET QtyOnHand=QtyOnHand+?, Updated=SYSDATE, UpdatedBy=? " +
|
||||
final String sql = "UPDATE M_StorageOnHand SET QtyOnHand=QtyOnHand+?, Updated=getDate(), UpdatedBy=? " +
|
||||
"WHERE M_Product_ID=? AND M_Locator_ID=? AND M_AttributeSetInstance_ID=? AND DateMaterialPolicy=?";
|
||||
DB.executeUpdateEx(sql,
|
||||
new Object[] {addition, Env.getAD_User_ID(Env.getCtx()), getM_Product_ID(), getM_Locator_ID(), getM_AttributeSetInstance_ID(), getDateMaterialPolicy()},
|
||||
|
|
|
@ -261,7 +261,7 @@ public class MStorageReservation extends X_M_StorageReservation {
|
|||
* @param addition
|
||||
*/
|
||||
public void addQty(BigDecimal addition) {
|
||||
final String sql = "UPDATE M_StorageReservation SET Qty=Qty+?, Updated=SYSDATE, UpdatedBy=? " +
|
||||
final String sql = "UPDATE M_StorageReservation SET Qty=Qty+?, Updated=getDate(), UpdatedBy=? " +
|
||||
"WHERE M_Product_ID=? AND M_Warehouse_ID=? AND M_AttributeSetInstance_ID=? AND IsSOTrx=?";
|
||||
DB.executeUpdateEx(sql,
|
||||
new Object[] {addition, Env.getAD_User_ID(Env.getCtx()), getM_Product_ID(), getM_Warehouse_ID(), getM_AttributeSetInstance_ID(), isSOTrx()},
|
||||
|
|
|
@ -217,7 +217,7 @@ public class MTemplate extends X_CM_Template
|
|||
+ "(AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, "
|
||||
+ "AD_Tree_ID, Node_ID, Parent_ID, SeqNo) " + "VALUES (")
|
||||
.append (getAD_Client_ID ()).append (
|
||||
",0, 'Y', SysDate, 0, SysDate, 0,").append (
|
||||
",0, 'Y', getDate(), 0, getDate(), 0,").append (
|
||||
getAD_Tree_ID ()).append (",").append (get_ID ()).append (
|
||||
", 0, 999)");
|
||||
int no = DB.executeUpdate (sb.toString (), get_TrxName ());
|
||||
|
|
|
@ -3896,8 +3896,8 @@ public abstract class PO
|
|||
sb.append(",").append(PO.getUUIDColumnName(acctTable));
|
||||
// .. SELECT
|
||||
sb.append(") SELECT ").append(get_ID())
|
||||
.append(", p.C_AcctSchema_ID, p.AD_Client_ID,0,'Y', SysDate,")
|
||||
.append(getUpdatedBy()).append(",SysDate,").append(getUpdatedBy());
|
||||
.append(", p.C_AcctSchema_ID, p.AD_Client_ID,0,'Y', getDate(),")
|
||||
.append(getUpdatedBy()).append(",getDate(),").append(getUpdatedBy());
|
||||
for (int i = 0; i < s_acctColumns.size(); i++)
|
||||
sb.append(",p.").append(s_acctColumns.get(i));
|
||||
//uuid column
|
||||
|
@ -3976,7 +3976,7 @@ public abstract class PO
|
|||
sb.append(", ").append(PO.getUUIDColumnName(tableName)).append(") ");
|
||||
else
|
||||
sb.append(") ");
|
||||
sb.append("SELECT t.AD_Client_ID, 0, 'Y', SysDate, "+getUpdatedBy()+", SysDate, "+getUpdatedBy()+","
|
||||
sb.append("SELECT t.AD_Client_ID, 0, 'Y', getDate(), "+getUpdatedBy()+", getDate(), "+getUpdatedBy()+","
|
||||
+ "t.AD_Tree_ID, ").append(get_ID()).append(", 0, 999");
|
||||
if (uuidColumnId > 0 && uuidFunction)
|
||||
sb.append(", Generate_UUID() ");
|
||||
|
|
|
@ -219,7 +219,7 @@ public class TranslationTable
|
|||
//
|
||||
StringBuilder sb = new StringBuilder("UPDATE ");
|
||||
sb.append(m_trlTableName)
|
||||
.append(" SET IsTranslated='N',Updated=SysDate WHERE ")
|
||||
.append(" SET IsTranslated='N',Updated=getDate() WHERE ")
|
||||
.append(m_baseTableName).append("_ID=").append(po.get_ID());
|
||||
int no = DB.executeUpdate(sb.toString(), po.get_TrxName());
|
||||
if (log.isLoggable(Level.FINE)) log.fine(m_trlTableName + ": ID=" + po.get_ID() + " #" + no);
|
||||
|
|
|
@ -581,7 +581,7 @@ public class PrintUtil
|
|||
String sql = "INSERT INTO AD_PrintForm(AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_PrintForm_ID,"
|
||||
+ "Name,Order_PrintFormat_ID,Invoice_PrintFormat_ID,Remittance_PrintFormat_ID,Shipment_PrintFormat_ID)"
|
||||
//
|
||||
+ " VALUES (" + AD_Client_ID + ",0,'Y',SysDate,0,SysDate,0," + AD_PrintForm_ID + ","
|
||||
+ " VALUES (" + AD_Client_ID + ",0,'Y',getDate(),0,getDate(),0," + AD_PrintForm_ID + ","
|
||||
+ "'" + Msg.translate(ctx, "Standard") + "',"
|
||||
+ Order_PrintFormat_ID + "," + Invoice_PrintFormat_ID + ","
|
||||
+ Remittance_PrintFormat_ID + "," + Shipment_PrintFormat_ID + ")";
|
||||
|
|
|
@ -2087,7 +2087,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
StringBuilder sql = new StringBuilder();
|
||||
if (type == ORDER || type == SHIPMENT || type == INVOICE)
|
||||
sql.append("UPDATE ").append(DOC_BASETABLES[type])
|
||||
.append(" SET DatePrinted=SysDate, IsPrinted='Y' WHERE ")
|
||||
.append(" SET DatePrinted=getDate(), IsPrinted='Y' WHERE ")
|
||||
.append(DOC_IDS[type]).append("=").append(Record_ID);
|
||||
//
|
||||
if (sql.length() > 0)
|
||||
|
|
|
@ -300,8 +300,8 @@ public class TrialBalance extends SvrProcess
|
|||
sql.append("0");
|
||||
else
|
||||
sql.append(p_AD_Org_ID);
|
||||
sql.append(", SysDate,").append(getAD_User_ID())
|
||||
.append(",SysDate,").append(getAD_User_ID()).append(",");
|
||||
sql.append(", getDate(),").append(getAD_User_ID())
|
||||
.append(",getDate(),").append(getAD_User_ID()).append(",");
|
||||
// C_AcctSchema_ID, Account_ID, AccountValue, DateTrx, DateAcct, C_Period_ID,
|
||||
sql.append(p_C_AcctSchema_ID).append(",");
|
||||
if (p_Account_ID == 0)
|
||||
|
|
|
@ -42,7 +42,7 @@ public class DBReadReplica {
|
|||
private static String m_user = null;
|
||||
private static String m_pass = null;
|
||||
final private static String sqlValidateSync = "SELECT lastupdate FROM dbreplicasyncverifier";
|
||||
final private static String sqlUpdateSync = "UPDATE dbreplicasyncverifier SET lastupdate=SYSDATE";
|
||||
final private static String sqlUpdateSync = "UPDATE dbreplicasyncverifier SET lastupdate=getDate()";
|
||||
final private static String sqlValidateDBAddress = "SELECT DBAddress FROM AD_System";
|
||||
private volatile static int shift = 0; // for load balancing between different replicas
|
||||
|
||||
|
|
|
@ -810,7 +810,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable
|
|||
+ " AND n.Action = 'C' "
|
||||
+ " AND a.WFState = 'CC' "
|
||||
+ " AND a.UpdatedBy = " + userid
|
||||
+ " AND a.Updated > Trunc(SYSDATE) - " + (days-1)
|
||||
+ " AND a.Updated > Trunc(getDate()) - " + (days-1)
|
||||
+ checkSameSO
|
||||
+ checkSameReceipt
|
||||
+ checkDocAction;
|
||||
|
|
|
@ -128,7 +128,7 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
|
|||
return 0;
|
||||
String sql = "DELETE FROM AD_WorkflowProcessorLog "
|
||||
+ "WHERE AD_WorkflowProcessor_ID=" + getAD_WorkflowProcessor_ID()
|
||||
+ " AND (Created+" + getKeepLogDays() + ") < SysDate";
|
||||
+ " AND (Created+" + getKeepLogDays() + ") < getDate()";
|
||||
int no = DB.executeUpdate(sql, get_TrxName());
|
||||
return no;
|
||||
} // deleteLog
|
||||
|
|
|
@ -161,7 +161,7 @@ public class BroadcastMsgUtil
|
|||
+ " AND ( bm.BroadcastType = 'IL' OR bm.BroadcastType = 'L' ) "
|
||||
+ " AND bm.isPublished = 'Y' "
|
||||
+ " AND ( n.Processed = 'N' OR ( n.Processed = 'Y' AND bm.BroadcastFrequency = 'E' ) ) "
|
||||
+ " AND ( bm.Expired = 'N' AND ( bm.Expiration IS NULL OR bm.Expiration > SYSDATE ) ) ";
|
||||
+ " AND ( bm.Expired = 'N' AND ( bm.Expiration IS NULL OR bm.Expiration > getDate() ) ) ";
|
||||
|
||||
ArrayList<MBroadcastMessage> mbMessages = new ArrayList<MBroadcastMessage>();
|
||||
PreparedStatement pstmt = null;
|
||||
|
|
|
@ -95,9 +95,9 @@ public class ImportFixedAsset extends SvrProcess
|
|||
+ "SET AD_Client_ID = COALESCE (AD_Client_ID,").append (p_AD_Client_ID).append ("),"
|
||||
+ " AD_Org_ID = COALESCE (AD_Org_ID,").append (p_AD_Org_ID).append ("),"
|
||||
+ " IsActive = COALESCE (IsActive, 'Y'),"
|
||||
+ " Created = COALESCE (Created, SysDate),"
|
||||
+ " Created = COALESCE (Created, getDate()),"
|
||||
+ " CreatedBy = COALESCE (CreatedBy, 0),"
|
||||
+ " Updated = COALESCE (Updated, SysDate),"
|
||||
+ " Updated = COALESCE (Updated, getDate()),"
|
||||
+ " UpdatedBy = COALESCE (UpdatedBy, 0),"
|
||||
+ " I_ErrorMsg = ' ',"
|
||||
+ " I_IsImported = 'N' "
|
||||
|
|
|
@ -341,14 +341,14 @@ public class PackInHandler extends DefaultHandler {
|
|||
private void updPackageImp(String trxName) {
|
||||
// NOTE: Updating out of model to avoid change log insert that can cause locks
|
||||
//Update package history log with package status
|
||||
DB.executeUpdateEx("UPDATE AD_Package_Imp SET Processed=?, PK_Status=?, UpdatedBy=?, Updated=SYSDATE WHERE AD_Package_Imp_ID=?",
|
||||
DB.executeUpdateEx("UPDATE AD_Package_Imp SET Processed=?, PK_Status=?, UpdatedBy=?, Updated=getDate() WHERE AD_Package_Imp_ID=?",
|
||||
new Object[] {"Y", packageStatus, Env.getAD_User_ID(m_ctx.ctx), AD_Package_Imp_ID},
|
||||
trxName);
|
||||
}
|
||||
|
||||
private void updPackageImpInst(String trxName) {
|
||||
// NOTE: Updating out of model to avoid change log insert that can cause locks
|
||||
DB.executeUpdateEx("UPDATE AD_Package_Imp_Inst SET PK_Status=?, UpdatedBy=?, Updated=SYSDATE WHERE AD_Package_Imp_Inst_ID=?",
|
||||
DB.executeUpdateEx("UPDATE AD_Package_Imp_Inst SET PK_Status=?, UpdatedBy=?, Updated=getDate() WHERE AD_Package_Imp_Inst_ID=?",
|
||||
new Object[] {packageStatus, Env.getAD_User_ID(m_ctx.ctx), AD_Package_Imp_Inst_ID},
|
||||
trxName);
|
||||
}
|
||||
|
|
|
@ -166,7 +166,7 @@ public class PackRollProcess extends SvrProcess {
|
|||
// Format Date
|
||||
sqlC = new StringBuffer("UPDATE "
|
||||
+ tableName + " SET " + columnName
|
||||
+ " = SYSDATE WHERE "
|
||||
+ " = getDate() WHERE "
|
||||
+ columnIDName + " = " + recordID);
|
||||
|
||||
DB.executeUpdateEx(sqlC.toString(), get_TrxName());
|
||||
|
|
|
@ -97,7 +97,7 @@ public class RequestProcessor extends AdempiereServer
|
|||
*/
|
||||
String sql = "SELECT * FROM R_Request "
|
||||
+ "WHERE DueType='" + MRequest.DUETYPE_Scheduled + "' AND Processed='N'"
|
||||
+ " AND DateNextAction < SysDate"
|
||||
+ " AND DateNextAction < getDate()"
|
||||
+ " AND AD_Client_ID=?";
|
||||
if (m_model.getR_RequestType_ID() != 0)
|
||||
sql += " AND R_RequestType_ID=?";
|
||||
|
@ -155,7 +155,7 @@ public class RequestProcessor extends AdempiereServer
|
|||
+ " AND AD_Client_ID=?"
|
||||
+ " AND EXISTS (SELECT * FROM R_RequestType rt "
|
||||
+ "WHERE r.R_RequestType_ID=rt.R_RequestType_ID"
|
||||
+ " AND (r.DateNextAction+rt.DueDateTolerance) < SysDate)";
|
||||
+ " AND (r.DateNextAction+rt.DueDateTolerance) < getDate())";
|
||||
if (m_model.getR_RequestType_ID() != 0)
|
||||
sql += " AND r.R_RequestType_ID=?";
|
||||
count = 0;
|
||||
|
@ -210,11 +210,11 @@ public class RequestProcessor extends AdempiereServer
|
|||
sql = "SELECT * FROM R_Request "
|
||||
+ "WHERE Processed='N'"
|
||||
+ " AND AD_Client_ID=?"
|
||||
+ " AND (DateNextAction+" + m_model.getOverdueAlertDays() + ") < SysDate"
|
||||
+ " AND (DateNextAction+" + m_model.getOverdueAlertDays() + ") < getDate()"
|
||||
+ " AND (DateLastAlert IS NULL";
|
||||
if (m_model.getRemindDays() > 0)
|
||||
sql += " OR (DateLastAlert+" + m_model.getRemindDays()
|
||||
+ ") < SysDate";
|
||||
+ ") < getDate()";
|
||||
sql += ")";
|
||||
if (m_model.getR_RequestType_ID() != 0)
|
||||
sql += " AND R_RequestType_ID=?";
|
||||
|
@ -271,7 +271,7 @@ public class RequestProcessor extends AdempiereServer
|
|||
+ " AND AD_Client_ID=?"
|
||||
+ " AND IsEscalated='N'"
|
||||
+ " AND (DateNextAction+" + m_model.getOverdueAssignDays()
|
||||
+ ") < SysDate";
|
||||
+ ") < getDate()";
|
||||
if (m_model.getR_RequestType_ID() != 0)
|
||||
sql += " AND R_RequestType_ID=?";
|
||||
count = 0;
|
||||
|
@ -311,11 +311,11 @@ public class RequestProcessor extends AdempiereServer
|
|||
sql = "SELECT * FROM R_Request "
|
||||
+ "WHERE Processed='N'"
|
||||
+ " AND AD_Client_ID=?"
|
||||
+ " AND (Updated+" + m_model.getInactivityAlertDays() + ") < SysDate"
|
||||
+ " AND (Updated+" + m_model.getInactivityAlertDays() + ") < getDate()"
|
||||
+ " AND (DateLastAlert IS NULL";
|
||||
if (m_model.getRemindDays() > 0)
|
||||
sql += " OR (DateLastAlert+" + m_model.getRemindDays()
|
||||
+ ") < SysDate";
|
||||
+ ") < getDate()";
|
||||
sql += ")";
|
||||
if (m_model.getR_RequestType_ID() != 0)
|
||||
sql += " AND R_RequestType_ID=?";
|
||||
|
@ -432,7 +432,7 @@ public class RequestProcessor extends AdempiereServer
|
|||
+ "SELECT * FROM R_Status s "
|
||||
+ "WHERE r.R_Status_ID=s.R_Status_ID"
|
||||
+ " AND s.TimeoutDays > 0 AND s.Next_Status_ID > 0"
|
||||
+ " AND r.DateLastAction+s.TimeoutDays < SysDate"
|
||||
+ " AND r.DateLastAction+s.TimeoutDays < getDate()"
|
||||
+ ") "
|
||||
+ "ORDER BY R_Status_ID";
|
||||
PreparedStatement pstmt = null;
|
||||
|
|
|
@ -95,7 +95,7 @@ public class WorkflowProcessor extends AdempiereServer
|
|||
String sql = "SELECT * "
|
||||
+ "FROM AD_WF_Activity a "
|
||||
+ "WHERE Processed='N' AND WFState='OS'" // suspended
|
||||
+ " AND EndWaitTime <= SysDate"
|
||||
+ " AND EndWaitTime <= getDate()"
|
||||
+ " AND AD_Client_ID=?"
|
||||
+ " AND EXISTS (SELECT * FROM AD_Workflow wf "
|
||||
+ " INNER JOIN AD_WF_Node wfn ON (wf.AD_Workflow_ID=wfn.AD_Workflow_ID) "
|
||||
|
@ -196,7 +196,7 @@ public class WorkflowProcessor extends AdempiereServer
|
|||
+ " AND (DateLastAlert IS NULL";
|
||||
if (m_model.getRemindDays() > 0)
|
||||
sql += " OR (DateLastAlert+" + m_model.getRemindDays()
|
||||
+ ") < SysDate";
|
||||
+ ") < getDate()";
|
||||
sql += ") AND EXISTS (SELECT * FROM AD_Workflow wf "
|
||||
+ " INNER JOIN AD_WF_Node wfn ON (wf.AD_Workflow_ID=wfn.AD_Workflow_ID) "
|
||||
+ "WHERE a.AD_WF_Node_ID=wfn.AD_WF_Node_ID"
|
||||
|
@ -244,11 +244,11 @@ public class WorkflowProcessor extends AdempiereServer
|
|||
String sql = "SELECT * "
|
||||
+ "FROM AD_WF_Activity a "
|
||||
+ "WHERE Processed='N' AND WFState='OS'" // suspended
|
||||
+ " AND EndWaitTime > SysDate"
|
||||
+ " AND EndWaitTime > getDate()"
|
||||
+ " AND (DateLastAlert IS NULL";
|
||||
if (m_model.getRemindDays() > 0)
|
||||
sql += " OR (DateLastAlert+" + m_model.getRemindDays()
|
||||
+ ") < SysDate";
|
||||
+ ") < getDate()";
|
||||
sql += ") AND EXISTS (SELECT * FROM AD_Workflow wf "
|
||||
+ " INNER JOIN AD_WF_Node wfn ON (wf.AD_Workflow_ID=wfn.AD_Workflow_ID) "
|
||||
+ "WHERE a.AD_WF_Node_ID=wfn.AD_WF_Node_ID"
|
||||
|
@ -298,11 +298,11 @@ public class WorkflowProcessor extends AdempiereServer
|
|||
sql = "SELECT * "
|
||||
+ "FROM AD_WF_Activity a "
|
||||
+ "WHERE Processed='N' AND WFState='OS'" // suspended
|
||||
+ " AND (Updated+" + m_model.getInactivityAlertDays() + ") < SysDate"
|
||||
+ " AND (Updated+" + m_model.getInactivityAlertDays() + ") < getDate()"
|
||||
+ " AND (DateLastAlert IS NULL";
|
||||
if (m_model.getRemindDays() > 0)
|
||||
sql += " OR (DateLastAlert+" + m_model.getRemindDays()
|
||||
+ ") < SysDate";
|
||||
+ ") < getDate()";
|
||||
sql += ") AND EXISTS (SELECT * FROM AD_Workflow wf "
|
||||
+ " INNER JOIN AD_WF_Node wfn ON (wf.AD_Workflow_ID=wfn.AD_Workflow_ID) "
|
||||
+ "WHERE a.AD_WF_Node_ID=wfn.AD_WF_Node_ID"
|
||||
|
|
|
@ -679,7 +679,7 @@ public class ValuePreference extends Window implements EventListener<Event>
|
|||
+ "AD_Preference_ID, AD_Preference_UU, AD_Client_ID, AD_Org_ID, IsActive, Created,CreatedBy,Updated,UpdatedBy,"
|
||||
+ "AD_Window_ID, AD_Process_ID, AD_InfoWindow_ID, PreferenceFor, AD_User_ID, Attribute, Value) VALUES (");
|
||||
sql.append(AD_Preference_ID).append(",").append(DB.TO_STRING(UUID.randomUUID().toString())).append(",").append(Client_ID).append(",").append(Org_ID)
|
||||
.append(", 'Y',SysDate,").append(m_AD_User_ID).append(",SysDate,").append(m_AD_User_ID).append(", ");
|
||||
.append(", 'Y',getDate(),").append(m_AD_User_ID).append(",getDate(),").append(m_AD_User_ID).append(", ");
|
||||
|
||||
if (cbWindow.isChecked())
|
||||
sql.append(m_AD_Window_ID).append(",");
|
||||
|
|
|
@ -680,7 +680,7 @@ public class ADSortTab extends Panel implements IADTabpanel
|
|||
.append(" SET ").append(m_ColumnSortName).append("=0");
|
||||
if (m_ColumnYesNoName != null)
|
||||
sql.append(",").append(m_ColumnYesNoName).append("='N'");
|
||||
sql.append(", Updated=sysdate, UpdatedBy=").append(Env.getAD_User_ID(Env.getCtx()));
|
||||
sql.append(", Updated=getDate(), UpdatedBy=").append(Env.getAD_User_ID(Env.getCtx()));
|
||||
sql.append(" WHERE ").append(m_KeyColumnName).append("=").append(pp.getKey());
|
||||
if (DB.executeUpdate(sql.toString(), null) == 1) {
|
||||
pp.setSortNo(0);
|
||||
|
@ -710,7 +710,7 @@ public class ADSortTab extends Panel implements IADTabpanel
|
|||
.append(" SET ").append(m_ColumnSortName).append("=").append(index);
|
||||
if (m_ColumnYesNoName != null)
|
||||
sql.append(",").append(m_ColumnYesNoName).append("='Y'");
|
||||
sql.append(", Updated=sysdate, UpdatedBy=").append(Env.getAD_User_ID(Env.getCtx()));
|
||||
sql.append(", Updated=getDate(), UpdatedBy=").append(Env.getAD_User_ID(Env.getCtx()));
|
||||
sql.append(" WHERE ").append(m_KeyColumnName).append("=").append(pp.getKey());
|
||||
if (DB.executeUpdate(sql.toString(), null) == 1) {
|
||||
pp.setSortNo(index);
|
||||
|
|
|
@ -174,7 +174,7 @@ public class ADTreeOnDropListener implements EventListener<Event> {
|
|||
sql.append(mTree.getNodeTableName())
|
||||
.append(" SET Parent_ID=").append(oldMParent.getNode_ID())
|
||||
.append(", SeqNo=").append(i)
|
||||
.append(", Updated=SysDate")
|
||||
.append(", Updated=getDate()")
|
||||
.append(" WHERE AD_Tree_ID=").append(mTree.getAD_Tree_ID())
|
||||
.append(" AND Node_ID=").append(md.getNode_ID());
|
||||
if (log.isLoggable(Level.FINE)) log.fine(sql.toString());
|
||||
|
@ -191,7 +191,7 @@ public class ADTreeOnDropListener implements EventListener<Event> {
|
|||
sql.append(mTree.getNodeTableName())
|
||||
.append(" SET Parent_ID=").append(newMParent.getNode_ID())
|
||||
.append(", SeqNo=").append(i)
|
||||
.append(", Updated=SysDate")
|
||||
.append(", Updated=getDate()")
|
||||
.append(" WHERE AD_Tree_ID=").append(mTree.getAD_Tree_ID())
|
||||
.append(" AND Node_ID=").append(md.getNode_ID());
|
||||
if (log.isLoggable(Level.FINE)) log.fine(sql.toString());
|
||||
|
|
|
@ -64,7 +64,7 @@ public class DPActivitiesModel {
|
|||
{
|
||||
String sql = MRole.getDefault().addAccessSQL ("SELECT COUNT(1) FROM R_Request "
|
||||
+ "WHERE (SalesRep_ID=? OR AD_Role_ID=?) AND Processed='N'"
|
||||
+ " AND (DateNextAction IS NULL OR TRUNC(DateNextAction) <= TRUNC(SysDate))"
|
||||
+ " AND (DateNextAction IS NULL OR TRUNC(DateNextAction) <= TRUNC(getDate()))"
|
||||
+ " AND (R_Status_ID IS NULL OR R_Status_ID IN (SELECT R_Status_ID FROM R_Status WHERE IsClosed='N'))",
|
||||
"R_Request", false, true); // not qualified - RW
|
||||
int retValue = DB.getSQLValue(null, sql, Env.getAD_User_ID(Env.getCtx()), Env.getAD_Role_ID(Env.getCtx()));
|
||||
|
|
|
@ -95,7 +95,7 @@ public class FavouriteController {
|
|||
+ "IsActive,Created,CreatedBy,Updated,UpdatedBy)VALUES (")
|
||||
.append(m_AD_Tree_ID).append(",").append(AD_User_ID).append(",").append(Node_ID).append(",")
|
||||
.append(AD_Client_ID).append(",").append(AD_Org_ID).append(",")
|
||||
.append("'Y',SysDate,").append(AD_User_ID).append(",SysDate,").append(AD_User_ID).append(")");
|
||||
.append("'Y',getDate(),").append(AD_User_ID).append(",getDate(),").append(AD_User_ID).append(")");
|
||||
// if already exist, will result in ORA-00001: unique constraint (ADEMPIERE.AD_TREEBAR_KEY)
|
||||
else
|
||||
sql.append("DELETE FROM AD_TreeBar WHERE AD_Tree_ID=").append(m_AD_Tree_ID)
|
||||
|
|
|
@ -169,9 +169,9 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener
|
|||
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "s.QtyReserved", Double.class),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOrdered"), "s.QtyOrdered", Double.class),
|
||||
// See RV_Storage
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "GoodForDays"), "(daysbetween(asi.GuaranteeDate, SYSDATE))-p.GuaranteeDaysMin", Integer.class, true, true, null),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "ShelfLifeDays"), "daysbetween(asi.GuaranteeDate, SYSDATE)", Integer.class),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "ShelfLifeRemainingPct"), "CASE WHEN p.GuaranteeDays > 0 THEN TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100) ELSE 0 END", Integer.class),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "GoodForDays"), "(daysbetween(asi.GuaranteeDate, getDate()))-p.GuaranteeDaysMin", Integer.class, true, true, null),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "ShelfLifeDays"), "daysbetween(asi.GuaranteeDate, getDate())", Integer.class),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "ShelfLifeRemainingPct"), "CASE WHEN p.GuaranteeDays > 0 THEN TRUNC(((daysbetween(asi.GuaranteeDate, getDate()))/p.GuaranteeDays)*100) ELSE 0 END", Integer.class),
|
||||
};
|
||||
/** From Clause */
|
||||
private static String s_sqlFrom = "M_Storage s"
|
||||
|
@ -228,12 +228,12 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener
|
|||
}
|
||||
if (ShelfLifeMinPct > 0)
|
||||
{
|
||||
m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct;
|
||||
m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, getDate()))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct;
|
||||
if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct);
|
||||
}
|
||||
if (ShelfLifeMinDays > 0)
|
||||
{
|
||||
m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, SYSDATE)),0)>=" + ShelfLifeMinDays;
|
||||
m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, getDate())),0)>=" + ShelfLifeMinDays;
|
||||
if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays);
|
||||
}
|
||||
} // BPartner != 0
|
||||
|
|
|
@ -315,7 +315,7 @@ public class ReportAction implements EventListener<Event>
|
|||
whereClause.append(" AND ");
|
||||
// Show only unprocessed or the one updated within x days
|
||||
whereClause.append("(").append(gridTab.getTableName()).append(".Processed='N' OR ").append(gridTab.getTableName()).append(".Updated>");
|
||||
whereClause.append("SysDate-1");
|
||||
whereClause.append("getDate()-1");
|
||||
whereClause.append(")");
|
||||
}
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ public class InvoicePrint extends SvrProcess
|
|||
if (printed)
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("UPDATE C_Invoice "
|
||||
+ "SET DatePrinted=SysDate, IsPrinted='Y' WHERE C_Invoice_ID=")
|
||||
+ "SET DatePrinted=getDate(), IsPrinted='Y' WHERE C_Invoice_ID=")
|
||||
.append (C_Invoice_ID);
|
||||
DB.executeUpdateEx(sb.toString(), get_TrxName());
|
||||
}
|
||||
|
|
|
@ -2267,7 +2267,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
|||
{
|
||||
StringBuilder where = new StringBuilder(m_tableName);
|
||||
where.append(".Created >= ");
|
||||
where.append("SysDate-").append(getHistoryDays(selectedHistoryValue));
|
||||
where.append("getDate()-").append(getHistoryDays(selectedHistoryValue));
|
||||
m_query.addRestriction(where.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ public class WCtxHelpSuggestion extends Window implements EventListener<Event> {
|
|||
} else {
|
||||
StringBuilder insert = new StringBuilder("Insert Into AD_CtxHelpMsg_Trl (AD_Client_ID, AD_Org_ID, AD_CtxHelpMsg_ID, IsActive, IsTranslated, AD_Language, MsgText,");
|
||||
insert.append("Created, CreatedBy, Updated, UpdatedBy, AD_CtxHelpMsg_Trl_UU)")
|
||||
.append(" Values (?, ?, ?, 'Y', 'N', ?, ?, sysdate, ?, sysdate, ?, generate_uuid()) ");
|
||||
.append(" Values (?, ?, ?, 'Y', 'N', ?, ?, getDate(), ?, getDate(), ?, generate_uuid()) ");
|
||||
List<Object> params = new ArrayList<Object>();
|
||||
params.add(0);
|
||||
params.add(0);
|
||||
|
|
|
@ -184,9 +184,9 @@ public class WPAttributeInstance extends Window implements EventListener<Event>
|
|||
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "s.QtyReserved", Double.class),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOrdered"), "s.QtyOrdered", Double.class),
|
||||
// See RV_Storage
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "GoodForDays"), "(daysbetween(asi.GuaranteeDate, SYSDATE))-p.GuaranteeDaysMin", Integer.class, true, true, null),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "ShelfLifeDays"), "daysbetween(asi.GuaranteeDate, SYSDATE)", Integer.class),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "ShelfLifeRemainingPct"), "CASE WHEN p.GuaranteeDays > 0 THEN TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100) ELSE 0 END", Integer.class),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "GoodForDays"), "(daysbetween(asi.GuaranteeDate, getDate()))-p.GuaranteeDaysMin", Integer.class, true, true, null),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "ShelfLifeDays"), "daysbetween(asi.GuaranteeDate, getDate())", Integer.class),
|
||||
new ColumnInfo(Msg.translate(Env.getCtx(), "ShelfLifeRemainingPct"), "CASE WHEN p.GuaranteeDays > 0 THEN TRUNC(((daysbetween(asi.GuaranteeDate, getDate()))/p.GuaranteeDays)*100) ELSE 0 END", Integer.class),
|
||||
};
|
||||
/** From Clause */
|
||||
private static String s_sqlFrom = "M_Storage s"
|
||||
|
@ -243,12 +243,12 @@ public class WPAttributeInstance extends Window implements EventListener<Event>
|
|||
}
|
||||
if (ShelfLifeMinPct > 0)
|
||||
{
|
||||
m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, SYSDATE))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct;
|
||||
m_sqlMinLife = " AND COALESCE(TRUNC(((daysbetween(asi.GuaranteeDate, getDate()))/p.GuaranteeDays)*100),0)>=" + ShelfLifeMinPct;
|
||||
if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinPct=" + ShelfLifeMinPct);
|
||||
}
|
||||
if (ShelfLifeMinDays > 0)
|
||||
{
|
||||
m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, SYSDATE)),0)>=" + ShelfLifeMinDays;
|
||||
m_sqlMinLife += " AND COALESCE((daysbetween(asi.GuaranteeDate, getDate())),0)>=" + ShelfLifeMinDays;
|
||||
if (log.isLoggable(Level.CONFIG)) log.config( "PAttributeInstance.dynInit - ShelfLifeMinDays=" + ShelfLifeMinDays);
|
||||
}
|
||||
} // BPartner != 0
|
||||
|
|
|
@ -248,8 +248,8 @@ public class Allocation
|
|||
currencyConvert(i.GrandTotal*i.MultiplierAP,i.C_Currency_ID,i.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID) "GrandTotal $",
|
||||
invoiceOpen(C_Invoice_ID,C_InvoicePaySchedule_ID) "Open",
|
||||
currencyConvert(invoiceOpen(C_Invoice_ID,C_InvoicePaySchedule_ID),i.C_Currency_ID,i.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*i.MultiplierAP "Open $",
|
||||
invoiceDiscount(i.C_Invoice_ID,SysDate,C_InvoicePaySchedule_ID) "Discount",
|
||||
currencyConvert(invoiceDiscount(i.C_Invoice_ID,SysDate,C_InvoicePaySchedule_ID),i.C_Currency_ID,i.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*i.Multiplier*i.MultiplierAP "Discount $",
|
||||
invoiceDiscount(i.C_Invoice_ID,getDate(),C_InvoicePaySchedule_ID) "Discount",
|
||||
currencyConvert(invoiceDiscount(i.C_Invoice_ID,getDate(),C_InvoicePaySchedule_ID),i.C_Currency_ID,i.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*i.Multiplier*i.MultiplierAP "Discount $",
|
||||
i.MultiplierAP, i.Multiplier
|
||||
FROM C_Invoice_v i INNER JOIN C_Currency c ON (i.C_Currency_ID=c.C_Currency_ID)
|
||||
WHERE -- i.IsPaid='N' AND i.Processed='Y' AND i.C_BPartner_ID=1000001
|
||||
|
|
|
@ -207,11 +207,11 @@ public class PaySelect
|
|||
*
|
||||
SELECT i.C_Invoice_ID, i.DateInvoiced+p.NetDays AS DateDue,
|
||||
bp.Name, i.DocumentNo, c.ISO_Code, i.GrandTotal,
|
||||
paymentTermDiscount(i.GrandTotal, i.C_PaymentTerm_ID, i.DateInvoiced, SysDate) AS Discount,
|
||||
SysDate-paymentTermDueDays(i.C_PaymentTerm_ID,i.DateInvoiced) AS DiscountDate,
|
||||
i.GrandTotal-paymentTermDiscount(i.GrandTotal,i.C_PaymentTerm_ID,i.DateInvoiced,SysDate) AS DueAmount,
|
||||
currencyConvert(i.GrandTotal-paymentTermDiscount(i.GrandTotal,i.C_PaymentTerm_ID,i.DateInvoiced,SysDate,null),
|
||||
i.C_Currency_ID,xx100,SysDate) AS PayAmt
|
||||
paymentTermDiscount(i.GrandTotal, i.C_PaymentTerm_ID, i.DateInvoiced, getDate()) AS Discount,
|
||||
getDate()-paymentTermDueDays(i.C_PaymentTerm_ID,i.DateInvoiced) AS DiscountDate,
|
||||
i.GrandTotal-paymentTermDiscount(i.GrandTotal,i.C_PaymentTerm_ID,i.DateInvoiced,getDate()) AS DueAmount,
|
||||
currencyConvert(i.GrandTotal-paymentTermDiscount(i.GrandTotal,i.C_PaymentTerm_ID,i.DateInvoiced,getDate(),null),
|
||||
i.C_Currency_ID,xx100,getDate()) AS PayAmt
|
||||
FROM C_Invoice_v i, C_BPartner bp, C_Currency c, C_PaymentTerm p
|
||||
WHERE i.IsSOTrx='N'
|
||||
AND i.C_BPartner_ID=bp.C_BPartner_ID
|
||||
|
|
|
@ -174,7 +174,7 @@ public abstract class PaymentForm implements IPaymentForm {
|
|||
{
|
||||
s_Currencies = new Hashtable<Integer,KeyNamePair>(12); // Currenly only 10+1
|
||||
String SQL = "SELECT C_Currency_ID, ISO_Code FROM C_Currency "
|
||||
+ "WHERE (IsEMUMember='Y' AND EMUEntryDate<SysDate) OR IsEuro='Y' "
|
||||
+ "WHERE (IsEMUMember='Y' AND EMUEntryDate<getDate()) OR IsEuro='Y' "
|
||||
+ "ORDER BY 2";
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
|
|
@ -445,8 +445,8 @@ public class DB_Oracle implements AdempiereDatabase
|
|||
if (time == null)
|
||||
{
|
||||
if (dayOnly)
|
||||
return "TRUNC(SysDate)";
|
||||
return "SysDate";
|
||||
return "TRUNC(getDate())";
|
||||
return "getDate()";
|
||||
}
|
||||
|
||||
StringBuilder dateString = new StringBuilder("TO_DATE('");
|
||||
|
@ -970,7 +970,7 @@ public class DB_Oracle implements AdempiereDatabase
|
|||
case DisplayType.Time:
|
||||
retValue = "DATE";
|
||||
if (defaultValue)
|
||||
retValue += " DEFAULT SYSDATE";
|
||||
retValue += " DEFAULT getDate()";
|
||||
break;
|
||||
|
||||
// Number(10)
|
||||
|
|
Loading…
Reference in New Issue