Merge 62ea97ed940a
This commit is contained in:
commit
78aa3ede3e
|
@ -89,7 +89,7 @@ public class CalloutAssignment extends CalloutEngine
|
||||||
rs = null; pstmt = null;
|
rs = null; pstmt = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.fine("S_ResourceAssignment_ID=" + S_ResourceAssignment_ID + " - M_Product_ID=" + M_Product_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("S_ResourceAssignment_ID=" + S_ResourceAssignment_ID + " - M_Product_ID=" + M_Product_ID);
|
||||||
if (M_Product_ID != 0)
|
if (M_Product_ID != 0)
|
||||||
{
|
{
|
||||||
mTab.setValue ("M_Product_ID", new Integer (M_Product_ID));
|
mTab.setValue ("M_Product_ID", new Integer (M_Product_ID));
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class CalloutCashJournal extends CalloutEngine
|
||||||
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue("DiscountAmt");
|
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue("DiscountAmt");
|
||||||
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue("WriteOffAmt");
|
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue("WriteOffAmt");
|
||||||
String colName = mField.getColumnName();
|
String colName = mField.getColumnName();
|
||||||
log.fine(colName + " - Invoice=" + InvTotalAmt
|
if (log.isLoggable(Level.FINE)) log.fine(colName + " - Invoice=" + InvTotalAmt
|
||||||
+ " - Amount=" + PayAmt + ", Discount=" + DiscountAmt + ", WriteOff=" + WriteOffAmt);
|
+ " - Amount=" + PayAmt + ", Discount=" + DiscountAmt + ", WriteOff=" + WriteOffAmt);
|
||||||
|
|
||||||
// Amount - calculate write off
|
// Amount - calculate write off
|
||||||
|
|
|
@ -177,7 +177,7 @@ public class CalloutGLJournal extends CalloutEngine
|
||||||
|
|
||||||
BigDecimal CurrencyRate = MConversionRate.getRate(C_Currency_ID, as.getC_Currency_ID(),
|
BigDecimal CurrencyRate = MConversionRate.getRate(C_Currency_ID, as.getC_Currency_ID(),
|
||||||
DateAcct, C_ConversionType_ID, AD_Client_ID, AD_Org_ID);
|
DateAcct, C_ConversionType_ID, AD_Client_ID, AD_Org_ID);
|
||||||
log.fine("rate = " + CurrencyRate);
|
if (log.isLoggable(Level.FINE)) log.fine("rate = " + CurrencyRate);
|
||||||
if (CurrencyRate == null)
|
if (CurrencyRate == null)
|
||||||
CurrencyRate = Env.ZERO;
|
CurrencyRate = Env.ZERO;
|
||||||
mTab.setValue("CurrencyRate", CurrencyRate);
|
mTab.setValue("CurrencyRate", CurrencyRate);
|
||||||
|
|
|
@ -530,10 +530,10 @@ public class CalloutInOut extends CalloutEngine
|
||||||
if (M_Warehouse_ID == loc.getM_Warehouse_ID())
|
if (M_Warehouse_ID == loc.getM_Warehouse_ID())
|
||||||
mTab.setValue("M_Locator_ID", new Integer (product.getM_Locator_ID()));
|
mTab.setValue("M_Locator_ID", new Integer (product.getM_Locator_ID()));
|
||||||
else
|
else
|
||||||
log.fine("No Locator for M_Product_ID=" + M_Product_ID + " and M_Warehouse_ID=" + M_Warehouse_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("No Locator for M_Product_ID=" + M_Product_ID + " and M_Warehouse_ID=" + M_Warehouse_ID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
log.fine("No Locator for M_Product_ID=" + M_Product_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("No Locator for M_Product_ID=" + M_Product_ID);
|
||||||
return "";
|
return "";
|
||||||
} // product
|
} // product
|
||||||
|
|
||||||
|
@ -571,7 +571,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||||
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
||||||
QtyEntered = QtyEntered1;
|
QtyEntered = QtyEntered1;
|
||||||
mTab.setValue("QtyEntered", QtyEntered);
|
mTab.setValue("QtyEntered", QtyEntered);
|
||||||
|
@ -581,7 +581,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
if (MovementQty == null)
|
if (MovementQty == null)
|
||||||
MovementQty = QtyEntered;
|
MovementQty = QtyEntered;
|
||||||
boolean conversion = QtyEntered.compareTo(MovementQty) != 0;
|
boolean conversion = QtyEntered.compareTo(MovementQty) != 0;
|
||||||
log.fine("UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("UOM=" + C_UOM_To_ID
|
||||||
+ ", QtyEntered=" + QtyEntered
|
+ ", QtyEntered=" + QtyEntered
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " MovementQty=" + MovementQty);
|
+ " MovementQty=" + MovementQty);
|
||||||
|
@ -602,7 +602,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||||
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
||||||
QtyEntered = QtyEntered1;
|
QtyEntered = QtyEntered1;
|
||||||
mTab.setValue("QtyEntered", QtyEntered);
|
mTab.setValue("QtyEntered", QtyEntered);
|
||||||
|
@ -612,7 +612,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
if (MovementQty == null)
|
if (MovementQty == null)
|
||||||
MovementQty = QtyEntered;
|
MovementQty = QtyEntered;
|
||||||
boolean conversion = QtyEntered.compareTo(MovementQty) != 0;
|
boolean conversion = QtyEntered.compareTo(MovementQty) != 0;
|
||||||
log.fine("UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("UOM=" + C_UOM_To_ID
|
||||||
+ ", QtyEntered=" + QtyEntered
|
+ ", QtyEntered=" + QtyEntered
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " MovementQty=" + MovementQty);
|
+ " MovementQty=" + MovementQty);
|
||||||
|
@ -628,7 +628,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
BigDecimal MovementQty1 = MovementQty.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
BigDecimal MovementQty1 = MovementQty.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||||
if (MovementQty.compareTo(MovementQty1) != 0)
|
if (MovementQty.compareTo(MovementQty1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected MovementQty "
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected MovementQty "
|
||||||
+ MovementQty + "->" + MovementQty1);
|
+ MovementQty + "->" + MovementQty1);
|
||||||
MovementQty = MovementQty1;
|
MovementQty = MovementQty1;
|
||||||
mTab.setValue("MovementQty", MovementQty);
|
mTab.setValue("MovementQty", MovementQty);
|
||||||
|
@ -638,7 +638,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
if (QtyEntered == null)
|
if (QtyEntered == null)
|
||||||
QtyEntered = MovementQty;
|
QtyEntered = MovementQty;
|
||||||
boolean conversion = MovementQty.compareTo(QtyEntered) != 0;
|
boolean conversion = MovementQty.compareTo(QtyEntered) != 0;
|
||||||
log.fine("UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("UOM=" + C_UOM_To_ID
|
||||||
+ ", MovementQty=" + MovementQty
|
+ ", MovementQty=" + MovementQty
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " QtyEntered=" + QtyEntered);
|
+ " QtyEntered=" + QtyEntered);
|
||||||
|
@ -669,7 +669,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
int M_Product_ID = Env.getContextAsInt(ctx, WindowNo, "M_Product_ID");
|
int M_Product_ID = Env.getContextAsInt(ctx, WindowNo, "M_Product_ID");
|
||||||
int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_ID");
|
int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_ID");
|
||||||
int M_Locator_ID = Env.getContextAsInt(ctx, WindowNo, "M_Locator_ID");
|
int M_Locator_ID = Env.getContextAsInt(ctx, WindowNo, "M_Locator_ID");
|
||||||
log.fine("M_Product_ID=" + M_Product_ID
|
if (log.isLoggable(Level.FINE)) log.fine("M_Product_ID=" + M_Product_ID
|
||||||
+ ", M_ASI_ID=" + M_ASI_ID
|
+ ", M_ASI_ID=" + M_ASI_ID
|
||||||
+ " - M_Warehouse_ID=" + M_Warehouse_ID
|
+ " - M_Warehouse_ID=" + M_Warehouse_ID
|
||||||
+ ", M_Locator_ID=" + M_Locator_ID);
|
+ ", M_Locator_ID=" + M_Locator_ID);
|
||||||
|
@ -680,7 +680,7 @@ public class CalloutInOut extends CalloutEngine
|
||||||
int selectedM_Locator_ID = Env.getContextAsInt(Env.getCtx(), WindowNo, Env.TAB_INFO, "M_Locator_ID");
|
int selectedM_Locator_ID = Env.getContextAsInt(Env.getCtx(), WindowNo, Env.TAB_INFO, "M_Locator_ID");
|
||||||
if (selectedM_Locator_ID != 0)
|
if (selectedM_Locator_ID != 0)
|
||||||
{
|
{
|
||||||
log.fine("Selected M_Locator_ID=" + selectedM_Locator_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Selected M_Locator_ID=" + selectedM_Locator_ID);
|
||||||
mTab.setValue("M_Locator_ID", new Integer (selectedM_Locator_ID));
|
mTab.setValue("M_Locator_ID", new Integer (selectedM_Locator_ID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -439,7 +439,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
C_Charge_ID = ((Integer)value).intValue();
|
C_Charge_ID = ((Integer)value).intValue();
|
||||||
else
|
else
|
||||||
C_Charge_ID = Env.getContextAsInt(ctx, WindowNo, "C_Charge_ID");
|
C_Charge_ID = Env.getContextAsInt(ctx, WindowNo, "C_Charge_ID");
|
||||||
log.fine("Product=" + M_Product_ID + ", C_Charge_ID=" + C_Charge_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Product=" + M_Product_ID + ", C_Charge_ID=" + C_Charge_ID);
|
||||||
if (M_Product_ID == 0 && C_Charge_ID == 0)
|
if (M_Product_ID == 0 && C_Charge_ID == 0)
|
||||||
return amt (ctx, WindowNo, mTab, mField, value); //
|
return amt (ctx, WindowNo, mTab, mField, value); //
|
||||||
|
|
||||||
|
@ -447,21 +447,21 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
int shipC_BPartner_Location_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_Location_ID");
|
int shipC_BPartner_Location_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_Location_ID");
|
||||||
if (shipC_BPartner_Location_ID == 0)
|
if (shipC_BPartner_Location_ID == 0)
|
||||||
return amt (ctx, WindowNo, mTab, mField, value); //
|
return amt (ctx, WindowNo, mTab, mField, value); //
|
||||||
log.fine("Ship BP_Location=" + shipC_BPartner_Location_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Ship BP_Location=" + shipC_BPartner_Location_ID);
|
||||||
int billC_BPartner_Location_ID = shipC_BPartner_Location_ID;
|
int billC_BPartner_Location_ID = shipC_BPartner_Location_ID;
|
||||||
log.fine("Bill BP_Location=" + billC_BPartner_Location_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Bill BP_Location=" + billC_BPartner_Location_ID);
|
||||||
|
|
||||||
// Dates
|
// Dates
|
||||||
Timestamp billDate = Env.getContextAsDate(ctx, WindowNo, "DateInvoiced");
|
Timestamp billDate = Env.getContextAsDate(ctx, WindowNo, "DateInvoiced");
|
||||||
log.fine("Bill Date=" + billDate);
|
if (log.isLoggable(Level.FINE)) log.fine("Bill Date=" + billDate);
|
||||||
Timestamp shipDate = billDate;
|
Timestamp shipDate = billDate;
|
||||||
log.fine("Ship Date=" + shipDate);
|
if (log.isLoggable(Level.FINE)) log.fine("Ship Date=" + shipDate);
|
||||||
|
|
||||||
int AD_Org_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Org_ID");
|
int AD_Org_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Org_ID");
|
||||||
log.fine("Org=" + AD_Org_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Org=" + AD_Org_ID);
|
||||||
|
|
||||||
int M_Warehouse_ID = Env.getContextAsInt(ctx, "#M_Warehouse_ID");
|
int M_Warehouse_ID = Env.getContextAsInt(ctx, "#M_Warehouse_ID");
|
||||||
log.fine("Warehouse=" + M_Warehouse_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Warehouse=" + M_Warehouse_ID);
|
||||||
|
|
||||||
//
|
//
|
||||||
int C_Tax_ID = Tax.get(ctx, M_Product_ID, C_Charge_ID, billDate, shipDate,
|
int C_Tax_ID = Tax.get(ctx, M_Product_ID, C_Charge_ID, billDate, shipDate,
|
||||||
|
@ -503,15 +503,17 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
// get values
|
// get values
|
||||||
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
||||||
QtyInvoiced = (BigDecimal)mTab.getValue("QtyInvoiced");
|
QtyInvoiced = (BigDecimal)mTab.getValue("QtyInvoiced");
|
||||||
log.fine("QtyEntered=" + QtyEntered + ", Invoiced=" + QtyInvoiced + ", UOM=" + C_UOM_To_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("QtyEntered=" + QtyEntered + ", Invoiced=" + QtyInvoiced + ", UOM=" + C_UOM_To_ID);
|
||||||
//
|
//
|
||||||
PriceEntered = (BigDecimal)mTab.getValue("PriceEntered");
|
PriceEntered = (BigDecimal)mTab.getValue("PriceEntered");
|
||||||
PriceActual = (BigDecimal)mTab.getValue("PriceActual");
|
PriceActual = (BigDecimal)mTab.getValue("PriceActual");
|
||||||
// Discount = (BigDecimal)mTab.getValue("Discount");
|
// Discount = (BigDecimal)mTab.getValue("Discount");
|
||||||
PriceLimit = (BigDecimal)mTab.getValue("PriceLimit");
|
PriceLimit = (BigDecimal)mTab.getValue("PriceLimit");
|
||||||
PriceList = (BigDecimal)mTab.getValue("PriceList");
|
PriceList = (BigDecimal)mTab.getValue("PriceList");
|
||||||
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
|
if (log.isLoggable(Level.FINE)){
|
||||||
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual);// + ", Discount=" + Discount);
|
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
|
||||||
|
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual);// + ", Discount=" + Discount);
|
||||||
|
}
|
||||||
|
|
||||||
// No Product
|
// No Product
|
||||||
if ( M_Product_ID == 0 )
|
if ( M_Product_ID == 0 )
|
||||||
|
@ -555,7 +557,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
PriceEntered = pp.getPriceStd();
|
PriceEntered = pp.getPriceStd();
|
||||||
//
|
//
|
||||||
log.fine("amt - QtyChanged -> PriceActual=" + pp.getPriceStd()
|
if (log.isLoggable(Level.FINE)) log.fine("amt - QtyChanged -> PriceActual=" + pp.getPriceStd()
|
||||||
+ ", PriceEntered=" + PriceEntered + ", Discount=" + pp.getDiscount());
|
+ ", PriceEntered=" + PriceEntered + ", Discount=" + pp.getDiscount());
|
||||||
PriceActual = pp.getPriceStd();
|
PriceActual = pp.getPriceStd();
|
||||||
mTab.setValue("PriceActual", pp.getPriceStd());
|
mTab.setValue("PriceActual", pp.getPriceStd());
|
||||||
|
@ -571,7 +573,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
PriceEntered = PriceActual;
|
PriceEntered = PriceActual;
|
||||||
//
|
//
|
||||||
log.fine("amt - PriceActual=" + PriceActual
|
if (log.isLoggable(Level.FINE)) log.fine("amt - PriceActual=" + PriceActual
|
||||||
+ " -> PriceEntered=" + PriceEntered);
|
+ " -> PriceEntered=" + PriceEntered);
|
||||||
mTab.setValue("PriceEntered", PriceEntered);
|
mTab.setValue("PriceEntered", PriceEntered);
|
||||||
}
|
}
|
||||||
|
@ -583,7 +585,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
if (PriceActual == null)
|
if (PriceActual == null)
|
||||||
PriceActual = PriceEntered;
|
PriceActual = PriceEntered;
|
||||||
//
|
//
|
||||||
log.fine("amt - PriceEntered=" + PriceEntered
|
if (log.isLoggable(Level.FINE)) log.fine("amt - PriceEntered=" + PriceEntered
|
||||||
+ " -> PriceActual=" + PriceActual);
|
+ " -> PriceActual=" + PriceActual);
|
||||||
mTab.setValue("PriceActual", PriceActual);
|
mTab.setValue("PriceActual", PriceActual);
|
||||||
}
|
}
|
||||||
|
@ -629,7 +631,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
C_UOM_To_ID, PriceLimit);
|
C_UOM_To_ID, PriceLimit);
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
PriceEntered = PriceLimit;
|
PriceEntered = PriceLimit;
|
||||||
log.fine("amt =(under) PriceEntered=" + PriceEntered + ", Actual" + PriceLimit);
|
if (log.isLoggable(Level.FINE)) log.fine("amt =(under) PriceEntered=" + PriceEntered + ", Actual" + PriceLimit);
|
||||||
mTab.setValue ("PriceActual", PriceLimit);
|
mTab.setValue ("PriceActual", PriceLimit);
|
||||||
mTab.setValue ("PriceEntered", PriceEntered);
|
mTab.setValue ("PriceEntered", PriceEntered);
|
||||||
mTab.fireDataStatusEEvent ("UnderLimitPrice", "", false);
|
mTab.fireDataStatusEEvent ("UnderLimitPrice", "", false);
|
||||||
|
@ -735,7 +737,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||||
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
||||||
QtyEntered = QtyEntered1;
|
QtyEntered = QtyEntered1;
|
||||||
mTab.setValue("QtyEntered", QtyEntered);
|
mTab.setValue("QtyEntered", QtyEntered);
|
||||||
|
@ -750,7 +752,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
C_UOM_To_ID, PriceActual);
|
C_UOM_To_ID, PriceActual);
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
PriceEntered = PriceActual;
|
PriceEntered = PriceActual;
|
||||||
log.fine("qty - UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("qty - UOM=" + C_UOM_To_ID
|
||||||
+ ", QtyEntered/PriceActual=" + QtyEntered + "/" + PriceActual
|
+ ", QtyEntered/PriceActual=" + QtyEntered + "/" + PriceActual
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " QtyInvoiced/PriceEntered=" + QtyInvoiced + "/" + PriceEntered);
|
+ " QtyInvoiced/PriceEntered=" + QtyInvoiced + "/" + PriceEntered);
|
||||||
|
@ -766,7 +768,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||||
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
||||||
QtyEntered = QtyEntered1;
|
QtyEntered = QtyEntered1;
|
||||||
mTab.setValue("QtyEntered", QtyEntered);
|
mTab.setValue("QtyEntered", QtyEntered);
|
||||||
|
@ -776,7 +778,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
if (QtyInvoiced == null)
|
if (QtyInvoiced == null)
|
||||||
QtyInvoiced = QtyEntered;
|
QtyInvoiced = QtyEntered;
|
||||||
boolean conversion = QtyEntered.compareTo(QtyInvoiced) != 0;
|
boolean conversion = QtyEntered.compareTo(QtyInvoiced) != 0;
|
||||||
log.fine("qty - UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("qty - UOM=" + C_UOM_To_ID
|
||||||
+ ", QtyEntered=" + QtyEntered
|
+ ", QtyEntered=" + QtyEntered
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " QtyInvoiced=" + QtyInvoiced);
|
+ " QtyInvoiced=" + QtyInvoiced);
|
||||||
|
@ -792,7 +794,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
BigDecimal QtyInvoiced1 = QtyInvoiced.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
BigDecimal QtyInvoiced1 = QtyInvoiced.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||||
if (QtyInvoiced.compareTo(QtyInvoiced1) != 0)
|
if (QtyInvoiced.compareTo(QtyInvoiced1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected QtyInvoiced Scale "
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyInvoiced Scale "
|
||||||
+ QtyInvoiced + "->" + QtyInvoiced1);
|
+ QtyInvoiced + "->" + QtyInvoiced1);
|
||||||
QtyInvoiced = QtyInvoiced1;
|
QtyInvoiced = QtyInvoiced1;
|
||||||
mTab.setValue("QtyInvoiced", QtyInvoiced);
|
mTab.setValue("QtyInvoiced", QtyInvoiced);
|
||||||
|
@ -802,7 +804,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
if (QtyEntered == null)
|
if (QtyEntered == null)
|
||||||
QtyEntered = QtyInvoiced;
|
QtyEntered = QtyInvoiced;
|
||||||
boolean conversion = QtyInvoiced.compareTo(QtyEntered) != 0;
|
boolean conversion = QtyInvoiced.compareTo(QtyEntered) != 0;
|
||||||
log.fine("qty - UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("qty - UOM=" + C_UOM_To_ID
|
||||||
+ ", QtyInvoiced=" + QtyInvoiced
|
+ ", QtyInvoiced=" + QtyInvoiced
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " QtyEntered=" + QtyEntered);
|
+ " QtyEntered=" + QtyEntered);
|
||||||
|
|
|
@ -298,7 +298,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
|
||||||
C_Charge_ID = ((Integer)value).intValue();
|
C_Charge_ID = ((Integer)value).intValue();
|
||||||
else
|
else
|
||||||
C_Charge_ID = Env.getContextAsInt(ctx, WindowNo, "C_Charge_ID");
|
C_Charge_ID = Env.getContextAsInt(ctx, WindowNo, "C_Charge_ID");
|
||||||
log.fine("C_Charge_ID=" + C_Charge_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("C_Charge_ID=" + C_Charge_ID);
|
||||||
if (C_Charge_ID == 0)
|
if (C_Charge_ID == 0)
|
||||||
return amt (ctx, WindowNo, mTab, mField, value); //
|
return amt (ctx, WindowNo, mTab, mField, value); //
|
||||||
|
|
||||||
|
@ -306,19 +306,19 @@ public class CalloutInvoiceBatch extends CalloutEngine
|
||||||
int C_BPartner_Location_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_Location_ID");
|
int C_BPartner_Location_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_Location_ID");
|
||||||
if (C_BPartner_Location_ID == 0)
|
if (C_BPartner_Location_ID == 0)
|
||||||
return amt (ctx, WindowNo, mTab, mField, value); //
|
return amt (ctx, WindowNo, mTab, mField, value); //
|
||||||
log.fine("BP_Location=" + C_BPartner_Location_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("BP_Location=" + C_BPartner_Location_ID);
|
||||||
|
|
||||||
// Dates
|
// Dates
|
||||||
Timestamp billDate = Env.getContextAsDate(ctx, WindowNo, "DateInvoiced");
|
Timestamp billDate = Env.getContextAsDate(ctx, WindowNo, "DateInvoiced");
|
||||||
log.fine("Bill Date=" + billDate);
|
if (log.isLoggable(Level.FINE)) log.fine("Bill Date=" + billDate);
|
||||||
Timestamp shipDate = billDate;
|
Timestamp shipDate = billDate;
|
||||||
log.fine("Ship Date=" + shipDate);
|
if (log.isLoggable(Level.FINE)) log.fine("Ship Date=" + shipDate);
|
||||||
|
|
||||||
int AD_Org_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Org_ID");
|
int AD_Org_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Org_ID");
|
||||||
log.fine("Org=" + AD_Org_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Org=" + AD_Org_ID);
|
||||||
|
|
||||||
int M_Warehouse_ID = Env.getContextAsInt(ctx, "#M_Warehouse_ID");
|
int M_Warehouse_ID = Env.getContextAsInt(ctx, "#M_Warehouse_ID");
|
||||||
log.fine("Warehouse=" + M_Warehouse_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Warehouse=" + M_Warehouse_ID);
|
||||||
|
|
||||||
//
|
//
|
||||||
int C_Tax_ID = Tax.get(ctx, 0, C_Charge_ID, billDate, shipDate,
|
int C_Tax_ID = Tax.get(ctx, 0, C_Charge_ID, billDate, shipDate,
|
||||||
|
@ -356,7 +356,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
|
||||||
// get values
|
// get values
|
||||||
BigDecimal QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
BigDecimal QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
||||||
BigDecimal PriceEntered = (BigDecimal)mTab.getValue("PriceEntered");
|
BigDecimal PriceEntered = (BigDecimal)mTab.getValue("PriceEntered");
|
||||||
log.fine("QtyEntered=" + QtyEntered + ", PriceEntered=" + PriceEntered);
|
if (log.isLoggable(Level.FINE)) log.fine("QtyEntered=" + QtyEntered + ", PriceEntered=" + PriceEntered);
|
||||||
if (QtyEntered == null)
|
if (QtyEntered == null)
|
||||||
QtyEntered = Env.ZERO;
|
QtyEntered = Env.ZERO;
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
|
|
|
@ -945,7 +945,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
C_Charge_ID = ((Integer)value).intValue();
|
C_Charge_ID = ((Integer)value).intValue();
|
||||||
else
|
else
|
||||||
C_Charge_ID = Env.getContextAsInt(ctx, WindowNo, "C_Charge_ID");
|
C_Charge_ID = Env.getContextAsInt(ctx, WindowNo, "C_Charge_ID");
|
||||||
log.fine("Product=" + M_Product_ID + ", C_Charge_ID=" + C_Charge_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Product=" + M_Product_ID + ", C_Charge_ID=" + C_Charge_ID);
|
||||||
if (M_Product_ID == 0 && C_Charge_ID == 0)
|
if (M_Product_ID == 0 && C_Charge_ID == 0)
|
||||||
return amt(ctx, WindowNo, mTab, mField, value); //
|
return amt(ctx, WindowNo, mTab, mField, value); //
|
||||||
|
|
||||||
|
@ -957,25 +957,25 @@ public class CalloutOrder extends CalloutEngine
|
||||||
shipC_BPartner_Location_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_Location_ID");
|
shipC_BPartner_Location_ID = Env.getContextAsInt(ctx, WindowNo, "C_BPartner_Location_ID");
|
||||||
if (shipC_BPartner_Location_ID == 0)
|
if (shipC_BPartner_Location_ID == 0)
|
||||||
return amt(ctx, WindowNo, mTab, mField, value); //
|
return amt(ctx, WindowNo, mTab, mField, value); //
|
||||||
log.fine("Ship BP_Location=" + shipC_BPartner_Location_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Ship BP_Location=" + shipC_BPartner_Location_ID);
|
||||||
|
|
||||||
//
|
//
|
||||||
Timestamp billDate = Env.getContextAsDate(ctx, WindowNo, "DateOrdered");
|
Timestamp billDate = Env.getContextAsDate(ctx, WindowNo, "DateOrdered");
|
||||||
log.fine("Bill Date=" + billDate);
|
if (log.isLoggable(Level.FINE)) log.fine("Bill Date=" + billDate);
|
||||||
|
|
||||||
Timestamp shipDate = Env.getContextAsDate(ctx, WindowNo, "DatePromised");
|
Timestamp shipDate = Env.getContextAsDate(ctx, WindowNo, "DatePromised");
|
||||||
log.fine("Ship Date=" + shipDate);
|
if (log.isLoggable(Level.FINE)) log.fine("Ship Date=" + shipDate);
|
||||||
|
|
||||||
int AD_Org_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Org_ID");
|
int AD_Org_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Org_ID");
|
||||||
log.fine("Org=" + AD_Org_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Org=" + AD_Org_ID);
|
||||||
|
|
||||||
int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_ID");
|
int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_ID");
|
||||||
log.fine("Warehouse=" + M_Warehouse_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Warehouse=" + M_Warehouse_ID);
|
||||||
|
|
||||||
int billC_BPartner_Location_ID = Env.getContextAsInt(ctx, WindowNo, "Bill_Location_ID");
|
int billC_BPartner_Location_ID = Env.getContextAsInt(ctx, WindowNo, "Bill_Location_ID");
|
||||||
if (billC_BPartner_Location_ID == 0)
|
if (billC_BPartner_Location_ID == 0)
|
||||||
billC_BPartner_Location_ID = shipC_BPartner_Location_ID;
|
billC_BPartner_Location_ID = shipC_BPartner_Location_ID;
|
||||||
log.fine("Bill BP_Location=" + billC_BPartner_Location_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Bill BP_Location=" + billC_BPartner_Location_ID);
|
||||||
|
|
||||||
//
|
//
|
||||||
int C_Tax_ID = Tax.get (ctx, M_Product_ID, C_Charge_ID, billDate, shipDate,
|
int C_Tax_ID = Tax.get (ctx, M_Product_ID, C_Charge_ID, billDate, shipDate,
|
||||||
|
@ -1020,15 +1020,17 @@ public class CalloutOrder extends CalloutEngine
|
||||||
// get values
|
// get values
|
||||||
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
|
||||||
QtyOrdered = (BigDecimal)mTab.getValue("QtyOrdered");
|
QtyOrdered = (BigDecimal)mTab.getValue("QtyOrdered");
|
||||||
log.fine("QtyEntered=" + QtyEntered + ", Ordered=" + QtyOrdered + ", UOM=" + C_UOM_To_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("QtyEntered=" + QtyEntered + ", Ordered=" + QtyOrdered + ", UOM=" + C_UOM_To_ID);
|
||||||
//
|
//
|
||||||
PriceEntered = (BigDecimal)mTab.getValue("PriceEntered");
|
PriceEntered = (BigDecimal)mTab.getValue("PriceEntered");
|
||||||
PriceActual = (BigDecimal)mTab.getValue("PriceActual");
|
PriceActual = (BigDecimal)mTab.getValue("PriceActual");
|
||||||
Discount = (BigDecimal)mTab.getValue("Discount");
|
Discount = (BigDecimal)mTab.getValue("Discount");
|
||||||
PriceLimit = (BigDecimal)mTab.getValue("PriceLimit");
|
PriceLimit = (BigDecimal)mTab.getValue("PriceLimit");
|
||||||
PriceList = (BigDecimal)mTab.getValue("PriceList");
|
PriceList = (BigDecimal)mTab.getValue("PriceList");
|
||||||
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
|
if (log.isLoggable(Level.FINE)){
|
||||||
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
|
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
|
||||||
|
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
|
||||||
|
}
|
||||||
|
|
||||||
// No Product
|
// No Product
|
||||||
if (M_Product_ID == 0)
|
if (M_Product_ID == 0)
|
||||||
|
@ -1072,7 +1074,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
PriceEntered = pp.getPriceStd();
|
PriceEntered = pp.getPriceStd();
|
||||||
//
|
//
|
||||||
log.fine("QtyChanged -> PriceActual=" + pp.getPriceStd()
|
if (log.isLoggable(Level.FINE)) log.fine("QtyChanged -> PriceActual=" + pp.getPriceStd()
|
||||||
+ ", PriceEntered=" + PriceEntered + ", Discount=" + pp.getDiscount());
|
+ ", PriceEntered=" + PriceEntered + ", Discount=" + pp.getDiscount());
|
||||||
PriceActual = pp.getPriceStd();
|
PriceActual = pp.getPriceStd();
|
||||||
mTab.setValue("PriceActual", pp.getPriceStd());
|
mTab.setValue("PriceActual", pp.getPriceStd());
|
||||||
|
@ -1088,7 +1090,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
PriceEntered = PriceActual;
|
PriceEntered = PriceActual;
|
||||||
//
|
//
|
||||||
log.fine("PriceActual=" + PriceActual
|
if (log.isLoggable(Level.FINE)) log.fine("PriceActual=" + PriceActual
|
||||||
+ " -> PriceEntered=" + PriceEntered);
|
+ " -> PriceEntered=" + PriceEntered);
|
||||||
mTab.setValue("PriceEntered", PriceEntered);
|
mTab.setValue("PriceEntered", PriceEntered);
|
||||||
}
|
}
|
||||||
|
@ -1100,7 +1102,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
if (PriceActual == null)
|
if (PriceActual == null)
|
||||||
PriceActual = PriceEntered;
|
PriceActual = PriceEntered;
|
||||||
//
|
//
|
||||||
log.fine("PriceEntered=" + PriceEntered
|
if (log.isLoggable(Level.FINE)) log.fine("PriceEntered=" + PriceEntered
|
||||||
+ " -> PriceActual=" + PriceActual);
|
+ " -> PriceActual=" + PriceActual);
|
||||||
mTab.setValue("PriceActual", PriceActual);
|
mTab.setValue("PriceActual", PriceActual);
|
||||||
}
|
}
|
||||||
|
@ -1130,7 +1132,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
Discount = Discount.setScale(2, BigDecimal.ROUND_HALF_UP);
|
Discount = Discount.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
mTab.setValue("Discount", Discount);
|
mTab.setValue("Discount", Discount);
|
||||||
}
|
}
|
||||||
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
|
if (log.isLoggable(Level.FINE)) log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
|
||||||
|
|
||||||
// Check PriceLimit
|
// Check PriceLimit
|
||||||
String epl = Env.getContext(ctx, WindowNo, "EnforcePriceLimit");
|
String epl = Env.getContext(ctx, WindowNo, "EnforcePriceLimit");
|
||||||
|
@ -1146,7 +1148,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
C_UOM_To_ID, PriceLimit);
|
C_UOM_To_ID, PriceLimit);
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
PriceEntered = PriceLimit;
|
PriceEntered = PriceLimit;
|
||||||
log.fine("(under) PriceEntered=" + PriceEntered + ", Actual" + PriceLimit);
|
if (log.isLoggable(Level.FINE)) log.fine("(under) PriceEntered=" + PriceEntered + ", Actual" + PriceLimit);
|
||||||
mTab.setValue ("PriceActual", PriceLimit);
|
mTab.setValue ("PriceActual", PriceLimit);
|
||||||
mTab.setValue ("PriceEntered", PriceEntered);
|
mTab.setValue ("PriceEntered", PriceEntered);
|
||||||
mTab.fireDataStatusEEvent ("UnderLimitPrice", "", false);
|
mTab.fireDataStatusEEvent ("UnderLimitPrice", "", false);
|
||||||
|
@ -1205,7 +1207,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||||
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
||||||
QtyEntered = QtyEntered1;
|
QtyEntered = QtyEntered1;
|
||||||
mTab.setValue("QtyEntered", QtyEntered);
|
mTab.setValue("QtyEntered", QtyEntered);
|
||||||
|
@ -1220,7 +1222,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
C_UOM_To_ID, PriceActual);
|
C_UOM_To_ID, PriceActual);
|
||||||
if (PriceEntered == null)
|
if (PriceEntered == null)
|
||||||
PriceEntered = PriceActual;
|
PriceEntered = PriceActual;
|
||||||
log.fine("UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("UOM=" + C_UOM_To_ID
|
||||||
+ ", QtyEntered/PriceActual=" + QtyEntered + "/" + PriceActual
|
+ ", QtyEntered/PriceActual=" + QtyEntered + "/" + PriceActual
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " QtyOrdered/PriceEntered=" + QtyOrdered + "/" + PriceEntered);
|
+ " QtyOrdered/PriceEntered=" + QtyOrdered + "/" + PriceEntered);
|
||||||
|
@ -1236,7 +1238,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
BigDecimal QtyEntered1 = QtyEntered.setScale(MUOM.getPrecision(ctx, C_UOM_To_ID), BigDecimal.ROUND_HALF_UP);
|
||||||
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
if (QtyEntered.compareTo(QtyEntered1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyEntered Scale UOM=" + C_UOM_To_ID
|
||||||
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
+ "; QtyEntered=" + QtyEntered + "->" + QtyEntered1);
|
||||||
QtyEntered = QtyEntered1;
|
QtyEntered = QtyEntered1;
|
||||||
mTab.setValue("QtyEntered", QtyEntered);
|
mTab.setValue("QtyEntered", QtyEntered);
|
||||||
|
@ -1246,7 +1248,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
if (QtyOrdered == null)
|
if (QtyOrdered == null)
|
||||||
QtyOrdered = QtyEntered;
|
QtyOrdered = QtyEntered;
|
||||||
boolean conversion = QtyEntered.compareTo(QtyOrdered) != 0;
|
boolean conversion = QtyEntered.compareTo(QtyOrdered) != 0;
|
||||||
log.fine("UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("UOM=" + C_UOM_To_ID
|
||||||
+ ", QtyEntered=" + QtyEntered
|
+ ", QtyEntered=" + QtyEntered
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " QtyOrdered=" + QtyOrdered);
|
+ " QtyOrdered=" + QtyOrdered);
|
||||||
|
@ -1262,7 +1264,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
BigDecimal QtyOrdered1 = QtyOrdered.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
BigDecimal QtyOrdered1 = QtyOrdered.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||||
if (QtyOrdered.compareTo(QtyOrdered1) != 0)
|
if (QtyOrdered.compareTo(QtyOrdered1) != 0)
|
||||||
{
|
{
|
||||||
log.fine("Corrected QtyOrdered Scale "
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyOrdered Scale "
|
||||||
+ QtyOrdered + "->" + QtyOrdered1);
|
+ QtyOrdered + "->" + QtyOrdered1);
|
||||||
QtyOrdered = QtyOrdered1;
|
QtyOrdered = QtyOrdered1;
|
||||||
mTab.setValue("QtyOrdered", QtyOrdered);
|
mTab.setValue("QtyOrdered", QtyOrdered);
|
||||||
|
@ -1272,7 +1274,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
if (QtyEntered == null)
|
if (QtyEntered == null)
|
||||||
QtyEntered = QtyOrdered;
|
QtyEntered = QtyOrdered;
|
||||||
boolean conversion = QtyOrdered.compareTo(QtyEntered) != 0;
|
boolean conversion = QtyOrdered.compareTo(QtyEntered) != 0;
|
||||||
log.fine("UOM=" + C_UOM_To_ID
|
if (log.isLoggable(Level.FINE)) log.fine("UOM=" + C_UOM_To_ID
|
||||||
+ ", QtyOrdered=" + QtyOrdered
|
+ ", QtyOrdered=" + QtyOrdered
|
||||||
+ " -> " + conversion
|
+ " -> " + conversion
|
||||||
+ " QtyEntered=" + QtyEntered);
|
+ " QtyEntered=" + QtyEntered);
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class CalloutPaySelection extends CalloutEngine
|
||||||
BigDecimal PayAmt = (BigDecimal)mTab.getValue("PayAmt");
|
BigDecimal PayAmt = (BigDecimal)mTab.getValue("PayAmt");
|
||||||
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue("DiscountAmt");
|
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue("DiscountAmt");
|
||||||
BigDecimal DifferenceAmt = OpenAmt.subtract(PayAmt).subtract(DiscountAmt);
|
BigDecimal DifferenceAmt = OpenAmt.subtract(PayAmt).subtract(DiscountAmt);
|
||||||
log.fine(" - OpenAmt=" + OpenAmt + " - PayAmt=" + PayAmt
|
if (log.isLoggable(Level.FINE)) log.fine(" - OpenAmt=" + OpenAmt + " - PayAmt=" + PayAmt
|
||||||
+ ", Discount=" + DiscountAmt + ", Difference=" + DifferenceAmt);
|
+ ", Discount=" + DiscountAmt + ", Difference=" + DifferenceAmt);
|
||||||
|
|
||||||
mTab.setValue("DifferenceAmt", DifferenceAmt);
|
mTab.setValue("DifferenceAmt", DifferenceAmt);
|
||||||
|
@ -133,7 +133,7 @@ public class CalloutPaySelection extends CalloutEngine
|
||||||
DB.close(rs, pstmt);
|
DB.close(rs, pstmt);
|
||||||
rs = null; pstmt = null;
|
rs = null; pstmt = null;
|
||||||
}
|
}
|
||||||
log.fine(" - OpenAmt=" + OpenAmt + " (Invoice=" + C_Invoice_ID + ",BankAcct=" + C_BankAccount_ID + ")");
|
if (log.isLoggable(Level.FINE)) log.fine(" - OpenAmt=" + OpenAmt + " (Invoice=" + C_Invoice_ID + ",BankAcct=" + C_BankAccount_ID + ")");
|
||||||
mTab.setValue("OpenAmt", OpenAmt);
|
mTab.setValue("OpenAmt", OpenAmt);
|
||||||
mTab.setValue("PayAmt", OpenAmt.subtract(DiscountAmt));
|
mTab.setValue("PayAmt", OpenAmt.subtract(DiscountAmt));
|
||||||
mTab.setValue("DiscountAmt", DiscountAmt);
|
mTab.setValue("DiscountAmt", DiscountAmt);
|
||||||
|
|
|
@ -242,7 +242,7 @@ public class CalloutPayment extends CalloutEngine
|
||||||
int C_Invoice_ID = Env.getContextAsInt (ctx, WindowNo, "C_Invoice_ID");
|
int C_Invoice_ID = Env.getContextAsInt (ctx, WindowNo, "C_Invoice_ID");
|
||||||
int C_Order_ID = Env.getContextAsInt (ctx, WindowNo, "C_Order_ID");
|
int C_Order_ID = Env.getContextAsInt (ctx, WindowNo, "C_Order_ID");
|
||||||
int C_DocType_ID = Env.getContextAsInt (ctx, WindowNo, "C_DocType_ID");
|
int C_DocType_ID = Env.getContextAsInt (ctx, WindowNo, "C_DocType_ID");
|
||||||
log.fine ("Payment_DocType - C_Invoice_ID=" + C_Invoice_ID
|
if (log.isLoggable(Level.FINE)) log.fine ("Payment_DocType - C_Invoice_ID=" + C_Invoice_ID
|
||||||
+ ", C_DocType_ID=" + C_DocType_ID);
|
+ ", C_DocType_ID=" + C_DocType_ID);
|
||||||
MDocType dt = null;
|
MDocType dt = null;
|
||||||
if (C_DocType_ID != 0)
|
if (C_DocType_ID != 0)
|
||||||
|
@ -359,14 +359,14 @@ public class CalloutPayment extends CalloutEngine
|
||||||
pstmt = null;
|
pstmt = null;
|
||||||
}
|
}
|
||||||
} // get Invoice Info
|
} // get Invoice Info
|
||||||
log.fine ("Open=" + InvoiceOpenAmt + ", C_Invoice_ID=" + C_Invoice_ID
|
if (log.isLoggable(Level.FINE)) log.fine ("Open=" + InvoiceOpenAmt + ", C_Invoice_ID=" + C_Invoice_ID
|
||||||
+ ", C_Currency_ID=" + C_Currency_Invoice_ID);
|
+ ", C_Currency_ID=" + C_Currency_Invoice_ID);
|
||||||
// Get Info from Tab
|
// Get Info from Tab
|
||||||
BigDecimal PayAmt = (BigDecimal)mTab.getValue ("PayAmt");
|
BigDecimal PayAmt = (BigDecimal)mTab.getValue ("PayAmt");
|
||||||
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue ("DiscountAmt");
|
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue ("DiscountAmt");
|
||||||
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue ("WriteOffAmt");
|
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue ("WriteOffAmt");
|
||||||
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue ("OverUnderAmt");
|
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue ("OverUnderAmt");
|
||||||
log.fine ("Pay=" + PayAmt + ", Discount=" + DiscountAmt + ", WriteOff="
|
if (log.isLoggable(Level.FINE)) log.fine ("Pay=" + PayAmt + ", Discount=" + DiscountAmt + ", WriteOff="
|
||||||
+ WriteOffAmt + ", OverUnderAmt=" + OverUnderAmt);
|
+ WriteOffAmt + ", OverUnderAmt=" + OverUnderAmt);
|
||||||
// Get Currency Info
|
// Get Currency Info
|
||||||
int C_Currency_ID = ((Integer)mTab.getValue ("C_Currency_ID"))
|
int C_Currency_ID = ((Integer)mTab.getValue ("C_Currency_ID"))
|
||||||
|
@ -385,7 +385,7 @@ public class CalloutPayment extends CalloutEngine
|
||||||
|| colName.equals ("C_Currency_ID")
|
|| colName.equals ("C_Currency_ID")
|
||||||
|| colName.equals ("C_ConversionType_ID"))
|
|| colName.equals ("C_ConversionType_ID"))
|
||||||
{
|
{
|
||||||
log.fine ("InvCurrency=" + C_Currency_Invoice_ID + ", PayCurrency="
|
if (log.isLoggable(Level.FINE)) log.fine ("InvCurrency=" + C_Currency_Invoice_ID + ", PayCurrency="
|
||||||
+ C_Currency_ID + ", Date=" + ConvDate + ", Type="
|
+ C_Currency_ID + ", Date=" + ConvDate + ", Type="
|
||||||
+ C_ConversionType_ID);
|
+ C_ConversionType_ID);
|
||||||
CurrencyRate = MConversionRate.getRate (C_Currency_Invoice_ID,
|
CurrencyRate = MConversionRate.getRate (C_Currency_Invoice_ID,
|
||||||
|
@ -402,7 +402,7 @@ public class CalloutPayment extends CalloutEngine
|
||||||
//
|
//
|
||||||
InvoiceOpenAmt = InvoiceOpenAmt.multiply (CurrencyRate).setScale (
|
InvoiceOpenAmt = InvoiceOpenAmt.multiply (CurrencyRate).setScale (
|
||||||
currency.getStdPrecision (), BigDecimal.ROUND_HALF_UP);
|
currency.getStdPrecision (), BigDecimal.ROUND_HALF_UP);
|
||||||
log.fine ("Rate=" + CurrencyRate + ", InvoiceOpenAmt="
|
if (log.isLoggable(Level.FINE)) log.fine ("Rate=" + CurrencyRate + ", InvoiceOpenAmt="
|
||||||
+ InvoiceOpenAmt);
|
+ InvoiceOpenAmt);
|
||||||
}
|
}
|
||||||
// Currency Changed - convert all
|
// Currency Changed - convert all
|
||||||
|
|
|
@ -156,7 +156,7 @@ public class CalloutPaymentAllocate extends CalloutEngine
|
||||||
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue("WriteOffAmt");
|
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue("WriteOffAmt");
|
||||||
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue("OverUnderAmt");
|
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue("OverUnderAmt");
|
||||||
BigDecimal InvoiceAmt = (BigDecimal)mTab.getValue("InvoiceAmt");
|
BigDecimal InvoiceAmt = (BigDecimal)mTab.getValue("InvoiceAmt");
|
||||||
log.fine("Amt=" + Amount + ", Discount=" + DiscountAmt
|
if (log.isLoggable(Level.FINE)) log.fine("Amt=" + Amount + ", Discount=" + DiscountAmt
|
||||||
+ ", WriteOff=" + WriteOffAmt + ", OverUnder=" + OverUnderAmt
|
+ ", WriteOff=" + WriteOffAmt + ", OverUnder=" + OverUnderAmt
|
||||||
+ ", Invoice=" + InvoiceAmt);
|
+ ", Invoice=" + InvoiceAmt);
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ package org.compiere.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ public class CalloutProject extends CalloutEngine
|
||||||
if (PlannedAmt.scale() > StdPrecision)
|
if (PlannedAmt.scale() > StdPrecision)
|
||||||
PlannedAmt = PlannedAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
PlannedAmt = PlannedAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
|
||||||
//
|
//
|
||||||
log.fine("PlannedQty=" + PlannedQty + " * PlannedPrice=" + PlannedPrice + " -> PlannedAmt=" + PlannedAmt + " (Precision=" + StdPrecision+ ")");
|
if (log.isLoggable(Level.FINE)) log.fine("PlannedQty=" + PlannedQty + " * PlannedPrice=" + PlannedPrice + " -> PlannedAmt=" + PlannedAmt + " (Precision=" + StdPrecision+ ")");
|
||||||
mTab.setValue("PlannedAmt", PlannedAmt);
|
mTab.setValue("PlannedAmt", PlannedAmt);
|
||||||
return "";
|
return "";
|
||||||
} // planned
|
} // planned
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.compiere.model;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.adempiere.model.GridTabWrapper;
|
import org.adempiere.model.GridTabWrapper;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
@ -82,7 +83,7 @@ public class CalloutRequisition extends CalloutEngine
|
||||||
int StdPrecision = Env.getContextAsInt(ctx, WindowNo, "StdPrecision");
|
int StdPrecision = Env.getContextAsInt(ctx, WindowNo, "StdPrecision");
|
||||||
BigDecimal Qty = line.getQty();
|
BigDecimal Qty = line.getQty();
|
||||||
BigDecimal PriceActual = line.getPriceActual();
|
BigDecimal PriceActual = line.getPriceActual();
|
||||||
log.fine("amt - Qty=" + Qty + ", Price=" + PriceActual + ", Precision=" + StdPrecision);
|
if (log.isLoggable(Level.FINE)) log.fine("amt - Qty=" + Qty + ", Price=" + PriceActual + ", Precision=" + StdPrecision);
|
||||||
|
|
||||||
// Multiply
|
// Multiply
|
||||||
BigDecimal LineNetAmt = Qty.multiply(PriceActual);
|
BigDecimal LineNetAmt = Qty.multiply(PriceActual);
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class CalloutTimeExpense extends CalloutEngine
|
||||||
int C_Currency_To_ID = Env.getContextAsInt(ctx, "$C_Currency_ID");
|
int C_Currency_To_ID = Env.getContextAsInt(ctx, "$C_Currency_ID");
|
||||||
Timestamp DateExpense = Env.getContextAsDate(ctx, WindowNo, "DateExpense");
|
Timestamp DateExpense = Env.getContextAsDate(ctx, WindowNo, "DateExpense");
|
||||||
//
|
//
|
||||||
log.fine("Amt=" + ExpenseAmt + ", C_Currency_ID=" + C_Currency_From_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("Amt=" + ExpenseAmt + ", C_Currency_ID=" + C_Currency_From_ID);
|
||||||
// Converted Amount = Unit price
|
// Converted Amount = Unit price
|
||||||
BigDecimal ConvertedAmt = ExpenseAmt;
|
BigDecimal ConvertedAmt = ExpenseAmt;
|
||||||
// convert if required
|
// convert if required
|
||||||
|
@ -202,7 +202,7 @@ public class CalloutTimeExpense extends CalloutEngine
|
||||||
DateExpense, 0, AD_Client_ID, AD_Org_ID);
|
DateExpense, 0, AD_Client_ID, AD_Org_ID);
|
||||||
}
|
}
|
||||||
mTab.setValue("ConvertedAmt", ConvertedAmt);
|
mTab.setValue("ConvertedAmt", ConvertedAmt);
|
||||||
log.fine("= ConvertedAmt=" + ConvertedAmt);
|
if (log.isLoggable(Level.FINE)) log.fine("= ConvertedAmt=" + ConvertedAmt);
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
} // Expense_Amount
|
} // Expense_Amount
|
||||||
|
|
|
@ -221,7 +221,7 @@ public class Aging extends SvrProcess
|
||||||
if (aging != null)
|
if (aging != null)
|
||||||
{
|
{
|
||||||
aging.saveEx();
|
aging.saveEx();
|
||||||
log.fine("#" + ++counter + " - " + aging);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + ++counter + " - " + aging);
|
||||||
}
|
}
|
||||||
aging = new MAging (getCtx(), AD_PInstance_ID, p_StatementDate,
|
aging = new MAging (getCtx(), AD_PInstance_ID, p_StatementDate,
|
||||||
C_BPartner_ID, C_Currency_ID,
|
C_BPartner_ID, C_Currency_ID,
|
||||||
|
@ -239,7 +239,7 @@ public class Aging extends SvrProcess
|
||||||
{
|
{
|
||||||
aging.saveEx();
|
aging.saveEx();
|
||||||
counter++;
|
counter++;
|
||||||
log.fine("#" + counter + " - " + aging);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + counter + " - " + aging);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
|
|
|
@ -375,7 +375,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
.add(payment.getOverUnderAmt());
|
.add(payment.getOverUnderAmt());
|
||||||
if (!payment.isReceipt())
|
if (!payment.isReceipt())
|
||||||
availableAmt = availableAmt.negate();
|
availableAmt = availableAmt.negate();
|
||||||
log.fine("Available=" + availableAmt);
|
if (log.isLoggable(Level.FINE)) log.fine("Available=" + availableAmt);
|
||||||
//
|
//
|
||||||
if (payment.getC_Invoice_ID() != 0)
|
if (payment.getC_Invoice_ID() != 0)
|
||||||
{
|
{
|
||||||
|
@ -392,7 +392,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
BigDecimal openAmt = invoice.getOpenAmt(true, null);
|
BigDecimal openAmt = invoice.getOpenAmt(true, null);
|
||||||
if (!invoice.isSOTrx())
|
if (!invoice.isSOTrx())
|
||||||
openAmt = openAmt.negate();
|
openAmt = openAmt.negate();
|
||||||
log.fine(invoice + ", Open=" + openAmt);
|
if (log.isLoggable(Level.FINE)) log.fine(invoice + ", Open=" + openAmt);
|
||||||
// With Discount, etc.
|
// With Discount, etc.
|
||||||
if (availableAmt.compareTo(openAmt) == 0)
|
if (availableAmt.compareTo(openAmt) == 0)
|
||||||
{
|
{
|
||||||
|
@ -432,7 +432,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
.subtract(line.getDifferenceAmt()).subtract(overUnder);
|
.subtract(line.getDifferenceAmt()).subtract(overUnder);
|
||||||
if (!invoice.isSOTrx())
|
if (!invoice.isSOTrx())
|
||||||
invoiceAmt = invoiceAmt.negate();
|
invoiceAmt = invoiceAmt.negate();
|
||||||
log.fine(invoice + ", Invoice=" + invoiceAmt);
|
if (log.isLoggable(Level.FINE)) log.fine(invoice + ", Invoice=" + invoiceAmt);
|
||||||
totalInvoice = totalInvoice.add(invoiceAmt);
|
totalInvoice = totalInvoice.add(invoiceAmt);
|
||||||
}
|
}
|
||||||
else // Multi-Currency
|
else // Multi-Currency
|
||||||
|
@ -478,7 +478,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
.add(payment.getOverUnderAmt());
|
.add(payment.getOverUnderAmt());
|
||||||
if (!payment.isReceipt())
|
if (!payment.isReceipt())
|
||||||
availableAmt = availableAmt.negate();
|
availableAmt = availableAmt.negate();
|
||||||
log.fine("Available=" + availableAmt);
|
if (log.isLoggable(Level.FINE)) log.fine("Available=" + availableAmt);
|
||||||
for (int i = 0; i < m_invoices.length; i++)
|
for (int i = 0; i < m_invoices.length; i++)
|
||||||
{
|
{
|
||||||
MInvoice invoice = m_invoices[i];
|
MInvoice invoice = m_invoices[i];
|
||||||
|
@ -491,7 +491,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
if (!invoice.isSOTrx())
|
if (!invoice.isSOTrx())
|
||||||
openAmt = openAmt.negate();
|
openAmt = openAmt.negate();
|
||||||
BigDecimal difference = availableAmt.subtract(openAmt).abs();
|
BigDecimal difference = availableAmt.subtract(openAmt).abs();
|
||||||
log.fine(invoice + ", Open=" + openAmt + " - Difference=" + difference);
|
if (log.isLoggable(Level.FINE)) log.fine(invoice + ", Open=" + openAmt + " - Difference=" + difference);
|
||||||
if (difference.signum() == 0)
|
if (difference.signum() == 0)
|
||||||
{
|
{
|
||||||
Timestamp dateAcct = payment.getDateAcct();
|
Timestamp dateAcct = payment.getDateAcct();
|
||||||
|
@ -657,7 +657,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
availableAmt = availableAmt.subtract(allocatedAmt);
|
availableAmt = availableAmt.subtract(allocatedAmt);
|
||||||
if (!payment.isReceipt())
|
if (!payment.isReceipt())
|
||||||
availableAmt = availableAmt.negate();
|
availableAmt = availableAmt.negate();
|
||||||
log.fine("Available=" + availableAmt);
|
if (log.isLoggable(Level.FINE)) log.fine("Available=" + availableAmt);
|
||||||
if (dateAcct == null || payment.getDateAcct().after(dateAcct))
|
if (dateAcct == null || payment.getDateAcct().after(dateAcct))
|
||||||
dateAcct = payment.getDateAcct();
|
dateAcct = payment.getDateAcct();
|
||||||
totalPayments = totalPayments.add(availableAmt);
|
totalPayments = totalPayments.add(availableAmt);
|
||||||
|
@ -672,11 +672,11 @@ public class AllocationAuto extends SvrProcess
|
||||||
if (invoice.getC_Currency_ID() != C_Currency_ID)
|
if (invoice.getC_Currency_ID() != C_Currency_ID)
|
||||||
continue;
|
continue;
|
||||||
BigDecimal openAmt = invoice.getOpenAmt(true, null);
|
BigDecimal openAmt = invoice.getOpenAmt(true, null);
|
||||||
log.fine("" + invoice);
|
if (log.isLoggable(Level.FINE)) log.fine("" + invoice);
|
||||||
if (!invoice.isSOTrx())
|
if (!invoice.isSOTrx())
|
||||||
openAmt = openAmt.negate();
|
openAmt = openAmt.negate();
|
||||||
// Foreign currency
|
// Foreign currency
|
||||||
log.fine("Open=" + openAmt);
|
if (log.isLoggable(Level.FINE)) log.fine("Open=" + openAmt);
|
||||||
if (dateAcct == null || invoice.getDateAcct().after(dateAcct))
|
if (dateAcct == null || invoice.getDateAcct().after(dateAcct))
|
||||||
dateAcct = invoice.getDateAcct();
|
dateAcct = invoice.getDateAcct();
|
||||||
totalInvoices = totalInvoices.add(openAmt);
|
totalInvoices = totalInvoices.add(openAmt);
|
||||||
|
@ -685,7 +685,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
// must be either AP or AR balance
|
// must be either AP or AR balance
|
||||||
if (totalInvoices.signum() != totalPayments.signum())
|
if (totalInvoices.signum() != totalPayments.signum())
|
||||||
{
|
{
|
||||||
log.fine("Signum - Invoices=" + totalInvoices.signum()
|
if (log.isLoggable(Level.FINE)) log.fine("Signum - Invoices=" + totalInvoices.signum()
|
||||||
+ " <> Payments=" + totalPayments.signum());
|
+ " <> Payments=" + totalPayments.signum());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -727,7 +727,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
availableAmt = availableAmt.subtract(diff);
|
availableAmt = availableAmt.subtract(diff);
|
||||||
allocatedPayments = allocatedPayments.subtract(diff);
|
allocatedPayments = allocatedPayments.subtract(diff);
|
||||||
}
|
}
|
||||||
log.fine("Payment Allocated=" + availableAmt);
|
if (log.isLoggable(Level.FINE)) log.fine("Payment Allocated=" + availableAmt);
|
||||||
if (!createAllocation(C_Currency_ID, "BP Oldest (" + difference.abs() + ")",
|
if (!createAllocation(C_Currency_ID, "BP Oldest (" + difference.abs() + ")",
|
||||||
dateAcct, availableAmt, null, null, null,
|
dateAcct, availableAmt, null, null, null,
|
||||||
payment.getC_BPartner_ID(), payment.getC_Payment_ID(), 0, payment.getAD_Org_ID()))
|
payment.getC_BPartner_ID(), payment.getC_Payment_ID(), 0, payment.getAD_Org_ID()))
|
||||||
|
@ -759,7 +759,7 @@ public class AllocationAuto extends SvrProcess
|
||||||
}
|
}
|
||||||
if (openAmt.signum() == 0)
|
if (openAmt.signum() == 0)
|
||||||
break;
|
break;
|
||||||
log.fine("Invoice Allocated=" + openAmt);
|
if (log.isLoggable(Level.FINE)) log.fine("Invoice Allocated=" + openAmt);
|
||||||
if (!createAllocation(C_Currency_ID, "BP Oldest (" + difference.abs() + ")",
|
if (!createAllocation(C_Currency_ID, "BP Oldest (" + difference.abs() + ")",
|
||||||
dateAcct, openAmt, null, null, null,
|
dateAcct, openAmt, null, null, null,
|
||||||
invoice.getC_BPartner_ID(), 0, invoice.getC_Invoice_ID(), invoice.getAD_Org_ID()))
|
invoice.getC_BPartner_ID(), 0, invoice.getC_Invoice_ID(), invoice.getAD_Org_ID()))
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class AllocationReset extends SvrProcess
|
||||||
ProcessInfoParameter[] para = getParameter();
|
ProcessInfoParameter[] para = getParameter();
|
||||||
for (int i = 0; i < para.length; i++)
|
for (int i = 0; i < para.length; i++)
|
||||||
{
|
{
|
||||||
log.fine("prepare - " + para[i]);
|
if (log.isLoggable(Level.FINE)) log.fine("prepare - " + para[i]);
|
||||||
String name = para[i].getParameterName();
|
String name = para[i].getParameterName();
|
||||||
if (para[i].getParameter() == null && para[i].getParameter_To() == null)
|
if (para[i].getParameter() == null && para[i].getParameter_To() == null)
|
||||||
;
|
;
|
||||||
|
@ -183,7 +183,7 @@ public class AllocationReset extends SvrProcess
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
if (hdr.delete(true, m_trx.getTrxName()))
|
if (hdr.delete(true, m_trx.getTrxName()))
|
||||||
{
|
{
|
||||||
log.fine(hdr.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(hdr.toString());
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
if (success)
|
if (success)
|
||||||
|
|
|
@ -235,7 +235,7 @@ public class AssetDelivery extends SvrProcess
|
||||||
*/
|
*/
|
||||||
private String deliverIt (int A_Asset_ID)
|
private String deliverIt (int A_Asset_ID)
|
||||||
{
|
{
|
||||||
log.fine("A_Asset_ID=" + A_Asset_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("A_Asset_ID=" + A_Asset_ID);
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
//
|
//
|
||||||
MAsset asset = new MAsset (getCtx(), A_Asset_ID, get_TrxName());
|
MAsset asset = new MAsset (getCtx(), A_Asset_ID, get_TrxName());
|
||||||
|
@ -297,7 +297,7 @@ public class AssetDelivery extends SvrProcess
|
||||||
ad.saveEx();
|
ad.saveEx();
|
||||||
asset.saveEx();
|
asset.saveEx();
|
||||||
//
|
//
|
||||||
log.fine((System.currentTimeMillis()-start) + " ms");
|
if (log.isLoggable(Level.FINE)) log.fine((System.currentTimeMillis()-start) + " ms");
|
||||||
// success
|
// success
|
||||||
StringBuilder msgreturn = new StringBuilder().append(user.getEMail()).append(" - ").append(asset.getVersionNo());
|
StringBuilder msgreturn = new StringBuilder().append(user.getEMail()).append(" - ").append(asset.getVersionNo());
|
||||||
return msgreturn.toString();
|
return msgreturn.toString();
|
||||||
|
|
|
@ -183,7 +183,7 @@ public class BOMValidate extends SvrProcess
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_products.add(product);
|
m_products.add(product);
|
||||||
log.fine(product.getName());
|
if (log.isLoggable(Level.FINE)) log.fine(product.getName());
|
||||||
//
|
//
|
||||||
MProductBOM[] productsBOMs = MProductBOM.getBOMLines(product);
|
MProductBOM[] productsBOMs = MProductBOM.getBOMLines(product);
|
||||||
for (int i = 0; i < productsBOMs.length; i++)
|
for (int i = 0; i < productsBOMs.length; i++)
|
||||||
|
@ -242,7 +242,7 @@ public class BOMValidate extends SvrProcess
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_products.add(product);
|
m_products.add(product);
|
||||||
log.fine(product.getName());
|
if (log.isLoggable(Level.FINE)) log.fine(product.getName());
|
||||||
//
|
//
|
||||||
MBOM bom = boms[0];
|
MBOM bom = boms[0];
|
||||||
MBOMProduct[] BOMproducts = MBOMProduct.getOfBOM(bom);
|
MBOMProduct[] BOMproducts = MBOMProduct.getOfBOM(bom);
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class BankStatementMatcher extends SvrProcess
|
||||||
if (m_matchers == null || ibs == null || ibs.getC_Payment_ID() != 0)
|
if (m_matchers == null || ibs == null || ibs.getC_Payment_ID() != 0)
|
||||||
return "--";
|
return "--";
|
||||||
|
|
||||||
log.fine("" + ibs);
|
if (log.isLoggable(Level.FINE)) log.fine("" + ibs);
|
||||||
BankStatementMatchInfo info = null;
|
BankStatementMatchInfo info = null;
|
||||||
for (int i = 0; i < m_matchers.length; i++)
|
for (int i = 0; i < m_matchers.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ public class BankStatementMatcher extends SvrProcess
|
||||||
if (m_matchers == null || bsl == null || bsl.getC_Payment_ID() != 0)
|
if (m_matchers == null || bsl == null || bsl.getC_Payment_ID() != 0)
|
||||||
return "--";
|
return "--";
|
||||||
|
|
||||||
log.fine("match - " + bsl);
|
if (log.isLoggable(Level.FINE)) log.fine("match - " + bsl);
|
||||||
BankStatementMatchInfo info = null;
|
BankStatementMatchInfo info = null;
|
||||||
for (int i = 0; i < m_matchers.length; i++)
|
for (int i = 0; i < m_matchers.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -154,7 +154,7 @@ public class BankStatementMatcher extends SvrProcess
|
||||||
{
|
{
|
||||||
if (m_matchers == null || bs == null)
|
if (m_matchers == null || bs == null)
|
||||||
return "--";
|
return "--";
|
||||||
log.fine("match - " + bs);
|
if (log.isLoggable(Level.FINE)) log.fine("match - " + bs);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
MBankStatementLine[] lines = bs.getLines(false);
|
MBankStatementLine[] lines = bs.getLines(false);
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class BankStatementPayment extends SvrProcess
|
||||||
{
|
{
|
||||||
if (ibs == null || ibs.getC_Payment_ID() != 0)
|
if (ibs == null || ibs.getC_Payment_ID() != 0)
|
||||||
return "--";
|
return "--";
|
||||||
log.fine(ibs.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(ibs.toString());
|
||||||
if (ibs.getC_Invoice_ID() == 0 && ibs.getC_BPartner_ID() == 0)
|
if (ibs.getC_Invoice_ID() == 0 && ibs.getC_BPartner_ID() == 0)
|
||||||
throw new AdempiereUserError ("@NotFound@ @C_Invoice_ID@ / @C_BPartner_ID@");
|
throw new AdempiereUserError ("@NotFound@ @C_Invoice_ID@ / @C_BPartner_ID@");
|
||||||
if (ibs.getC_BankAccount_ID() == 0)
|
if (ibs.getC_BankAccount_ID() == 0)
|
||||||
|
@ -117,7 +117,7 @@ public class BankStatementPayment extends SvrProcess
|
||||||
{
|
{
|
||||||
if (bsl == null || bsl.getC_Payment_ID() != 0)
|
if (bsl == null || bsl.getC_Payment_ID() != 0)
|
||||||
return "--";
|
return "--";
|
||||||
log.fine(bsl.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(bsl.toString());
|
||||||
if (bsl.getC_Invoice_ID() == 0 && bsl.getC_BPartner_ID() == 0)
|
if (bsl.getC_Invoice_ID() == 0 && bsl.getC_BPartner_ID() == 0)
|
||||||
throw new AdempiereUserError ("@NotFound@ @C_Invoice_ID@ / @C_BPartner_ID@");
|
throw new AdempiereUserError ("@NotFound@ @C_Invoice_ID@ / @C_BPartner_ID@");
|
||||||
//
|
//
|
||||||
|
|
|
@ -241,7 +241,7 @@ public class CommissionCalc extends SvrProcess
|
||||||
if (!m_com.isListDetails())
|
if (!m_com.isListDetails())
|
||||||
sql.append(" GROUP BY h.C_Currency_ID");
|
sql.append(" GROUP BY h.C_Currency_ID");
|
||||||
//
|
//
|
||||||
log.fine("Line=" + lines[i].getLine() + " - " + sql);
|
if (log.isLoggable(Level.FINE)) log.fine("Line=" + lines[i].getLine() + " - " + sql);
|
||||||
//
|
//
|
||||||
createDetail(sql.toString(), comAmt);
|
createDetail(sql.toString(), comAmt);
|
||||||
comAmt.calculateCommission();
|
comAmt.calculateCommission();
|
||||||
|
@ -319,7 +319,7 @@ public class CommissionCalc extends SvrProcess
|
||||||
cal.add(Calendar.DAY_OF_YEAR, -1);
|
cal.add(Calendar.DAY_OF_YEAR, -1);
|
||||||
m_EndDate = new Timestamp (cal.getTimeInMillis());
|
m_EndDate = new Timestamp (cal.getTimeInMillis());
|
||||||
}
|
}
|
||||||
log.fine("setStartEndDate = " + p_StartDate + " - " + m_EndDate);
|
if (log.isLoggable(Level.FINE)) log.fine("setStartEndDate = " + p_StartDate + " - " + m_EndDate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
String sd = DB.TO_DATE(p_StartDate, true);
|
String sd = DB.TO_DATE(p_StartDate, true);
|
||||||
|
|
|
@ -237,7 +237,7 @@ public class DistributionRun extends SvrProcess
|
||||||
// Delete Old
|
// Delete Old
|
||||||
sql = "DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=?";
|
sql = "DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=?";
|
||||||
no = DB.executeUpdateEx(sql,new Object[]{p_M_DistributionRun_ID}, get_TrxName());
|
no = DB.executeUpdateEx(sql,new Object[]{p_M_DistributionRun_ID}, get_TrxName());
|
||||||
log.fine("insertDetails - deleted #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("insertDetails - deleted #" + no);
|
||||||
// Insert New
|
// Insert New
|
||||||
sql = "INSERT INTO T_DistributionRunDetail "
|
sql = "INSERT INTO T_DistributionRunDetail "
|
||||||
+ "(M_DistributionRun_ID, M_DistributionRunLine_ID, M_DistributionList_ID, M_DistributionListLine_ID,"
|
+ "(M_DistributionRun_ID, M_DistributionRunLine_ID, M_DistributionList_ID, M_DistributionListLine_ID,"
|
||||||
|
@ -258,7 +258,7 @@ public class DistributionRun extends SvrProcess
|
||||||
+ "WHERE rl.M_DistributionRun_ID=?"
|
+ "WHERE rl.M_DistributionRun_ID=?"
|
||||||
+ " AND l.RatioTotal<>0 AND rl.IsActive='Y' AND ll.IsActive='Y'";
|
+ " AND l.RatioTotal<>0 AND rl.IsActive='Y' AND ll.IsActive='Y'";
|
||||||
no = DB.executeUpdateEx(sql,new Object[]{p_M_DistributionRun_ID}, get_TrxName());
|
no = DB.executeUpdateEx(sql,new Object[]{p_M_DistributionRun_ID}, get_TrxName());
|
||||||
log.fine("inserted #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("inserted #" + no);
|
||||||
return no;
|
return no;
|
||||||
} // insertDetails
|
} // insertDetails
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ public class DistributionRun extends SvrProcess
|
||||||
runLine.addActualAllocation(detail.getActualAllocation());
|
runLine.addActualAllocation(detail.getActualAllocation());
|
||||||
runLine.setMaxAllocation(detail.getActualAllocation(), false);
|
runLine.setMaxAllocation(detail.getActualAllocation(), false);
|
||||||
//
|
//
|
||||||
log.fine("RunLine=" + runLine.getLine()
|
if (log.isLoggable(Level.FINE)) log.fine("RunLine=" + runLine.getLine()
|
||||||
+ ": BP_ID=" + detail.getC_BPartner_ID()
|
+ ": BP_ID=" + detail.getC_BPartner_ID()
|
||||||
+ ", Min=" + detail.getMinQty()
|
+ ", Min=" + detail.getMinQty()
|
||||||
+ ", Qty=" + detail.getQty()
|
+ ", Qty=" + detail.getQty()
|
||||||
|
@ -305,7 +305,7 @@ public class DistributionRun extends SvrProcess
|
||||||
for (int j = 0; j < m_runLines.length; j++)
|
for (int j = 0; j < m_runLines.length; j++)
|
||||||
{
|
{
|
||||||
MDistributionRunLine runLine = m_runLines[j];
|
MDistributionRunLine runLine = m_runLines[j];
|
||||||
log.fine("Run - " + runLine.getInfo());
|
if (log.isLoggable(Level.FINE)) log.fine("Run - " + runLine.getInfo());
|
||||||
}
|
}
|
||||||
} // addAllocations
|
} // addAllocations
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ public class DistributionRun extends SvrProcess
|
||||||
// Adjust when difference is -1->1 or last difference is the same
|
// Adjust when difference is -1->1 or last difference is the same
|
||||||
boolean adjustBiggest = difference.abs().compareTo(Env.ONE) <= 0
|
boolean adjustBiggest = difference.abs().compareTo(Env.ONE) <= 0
|
||||||
|| difference.abs().compareTo(runLine.getLastDifference().abs()) == 0;
|
|| difference.abs().compareTo(runLine.getLastDifference().abs()) == 0;
|
||||||
log.fine("Line=" + runLine.getLine()
|
if (log.isLoggable(Level.FINE)) log.fine("Line=" + runLine.getLine()
|
||||||
+ ", Diff=" + difference + ", Adjust=" + adjustBiggest);
|
+ ", Diff=" + difference + ", Adjust=" + adjustBiggest);
|
||||||
// Adjust Biggest Amount
|
// Adjust Biggest Amount
|
||||||
if (adjustBiggest)
|
if (adjustBiggest)
|
||||||
|
@ -370,7 +370,7 @@ public class DistributionRun extends SvrProcess
|
||||||
MDistributionRunDetail detail = m_details[i];
|
MDistributionRunDetail detail = m_details[i];
|
||||||
if (runLine.getM_DistributionRunLine_ID() == detail.getM_DistributionRunLine_ID())
|
if (runLine.getM_DistributionRunLine_ID() == detail.getM_DistributionRunLine_ID())
|
||||||
{
|
{
|
||||||
log.fine("Biggest - DetailAllocation=" + detail.getActualAllocation()
|
if (log.isLoggable(Level.FINE)) log.fine("Biggest - DetailAllocation=" + detail.getActualAllocation()
|
||||||
+ ", MaxAllocation=" + runLine.getMaxAllocation()
|
+ ", MaxAllocation=" + runLine.getMaxAllocation()
|
||||||
+ ", Qty Difference=" + difference);
|
+ ", Qty Difference=" + difference);
|
||||||
if (detail.getActualAllocation().compareTo(runLine.getMaxAllocation()) == 0
|
if (detail.getActualAllocation().compareTo(runLine.getMaxAllocation()) == 0
|
||||||
|
@ -414,7 +414,7 @@ public class DistributionRun extends SvrProcess
|
||||||
{
|
{
|
||||||
BigDecimal diffRatio = detail.getRatio().multiply(difference)
|
BigDecimal diffRatio = detail.getRatio().multiply(difference)
|
||||||
.divide(ratioTotal, BigDecimal.ROUND_HALF_UP); // precision from total
|
.divide(ratioTotal, BigDecimal.ROUND_HALF_UP); // precision from total
|
||||||
log.fine("Detail=" + detail.toString()
|
if (log.isLoggable(Level.FINE)) log.fine("Detail=" + detail.toString()
|
||||||
+ ", Allocation=" + detail.getActualAllocation()
|
+ ", Allocation=" + detail.getActualAllocation()
|
||||||
+ ", DiffRatio=" + diffRatio);
|
+ ", DiffRatio=" + diffRatio);
|
||||||
detail.adjustQty(diffRatio);
|
detail.adjustQty(diffRatio);
|
||||||
|
@ -450,7 +450,7 @@ public class DistributionRun extends SvrProcess
|
||||||
+ " - " + m_docType);
|
+ " - " + m_docType);
|
||||||
log.info("Single=" + m_run.isCreateSingleOrder()
|
log.info("Single=" + m_run.isCreateSingleOrder()
|
||||||
+ " - " + m_docType + ",SO=" + m_docType.isSOTrx());
|
+ " - " + m_docType + ",SO=" + m_docType.isSOTrx());
|
||||||
log.fine("Counter=" + counter
|
if (log.isLoggable(Level.FINE)) log.fine("Counter=" + counter
|
||||||
+ ",C_BPartner_ID=" + runC_BPartner_ID + "," + runBPartner);
|
+ ",C_BPartner_ID=" + runC_BPartner_ID + "," + runBPartner);
|
||||||
//
|
//
|
||||||
MBPartner bp = null;
|
MBPartner bp = null;
|
||||||
|
@ -517,7 +517,7 @@ public class DistributionRun extends SvrProcess
|
||||||
// Counter Doc
|
// Counter Doc
|
||||||
if (counter && bp.getAD_OrgBP_ID_Int() > 0)
|
if (counter && bp.getAD_OrgBP_ID_Int() > 0)
|
||||||
{
|
{
|
||||||
log.fine("Counter - From_BPOrg=" + bp.getAD_OrgBP_ID_Int()
|
if (log.isLoggable(Level.FINE)) log.fine("Counter - From_BPOrg=" + bp.getAD_OrgBP_ID_Int()
|
||||||
+ "-" + bp + ", To_BP=" + runBPartner);
|
+ "-" + bp + ", To_BP=" + runBPartner);
|
||||||
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
|
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
|
||||||
MOrgInfo oi = MOrgInfo.get(getCtx(), bp.getAD_OrgBP_ID_Int(), get_TrxName());
|
MOrgInfo oi = MOrgInfo.get(getCtx(), bp.getAD_OrgBP_ID_Int(), get_TrxName());
|
||||||
|
@ -527,7 +527,7 @@ public class DistributionRun extends SvrProcess
|
||||||
}
|
}
|
||||||
else // normal
|
else // normal
|
||||||
{
|
{
|
||||||
log.fine("From_Org=" + runAD_Org_ID
|
if (log.isLoggable(Level.FINE)) log.fine("From_Org=" + runAD_Org_ID
|
||||||
+ ", To_BP=" + bp);
|
+ ", To_BP=" + bp);
|
||||||
order.setAD_Org_ID(runAD_Org_ID);
|
order.setAD_Org_ID(runAD_Org_ID);
|
||||||
order.setBPartner(bp);
|
order.setBPartner(bp);
|
||||||
|
@ -601,7 +601,7 @@ public class DistributionRun extends SvrProcess
|
||||||
sql = new StringBuilder("DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=")
|
sql = new StringBuilder("DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=")
|
||||||
.append(p_M_DistributionRun_ID);
|
.append(p_M_DistributionRun_ID);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("insertDetails - deleted #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("insertDetails - deleted #" + no);
|
||||||
|
|
||||||
// Insert New
|
// Insert New
|
||||||
sql = new StringBuilder("INSERT INTO T_DistributionRunDetail ")
|
sql = new StringBuilder("INSERT INTO T_DistributionRunDetail ")
|
||||||
|
@ -648,7 +648,7 @@ public class DistributionRun extends SvrProcess
|
||||||
record.setQty(drl.getTotalQty().multiply(factor));
|
record.setQty(drl.getTotalQty().multiply(factor));
|
||||||
record.saveEx();
|
record.saveEx();
|
||||||
}
|
}
|
||||||
log.fine("inserted #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("inserted #" + no);
|
||||||
return no;
|
return no;
|
||||||
} // insertDetails
|
} // insertDetails
|
||||||
|
|
||||||
|
@ -713,7 +713,7 @@ public class DistributionRun extends SvrProcess
|
||||||
sql = new StringBuilder("DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=")
|
sql = new StringBuilder("DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=")
|
||||||
.append(p_M_DistributionRun_ID);
|
.append(p_M_DistributionRun_ID);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("insertDetails - deleted #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("insertDetails - deleted #" + no);
|
||||||
|
|
||||||
// Insert New
|
// Insert New
|
||||||
sql = new StringBuilder("INSERT INTO T_DistributionRunDetail ")
|
sql = new StringBuilder("INSERT INTO T_DistributionRunDetail ")
|
||||||
|
@ -752,7 +752,7 @@ public class DistributionRun extends SvrProcess
|
||||||
record.setQty(factor.multiply(drl.getTotalQty()));
|
record.setQty(factor.multiply(drl.getTotalQty()));
|
||||||
record.saveEx();
|
record.saveEx();
|
||||||
}
|
}
|
||||||
log.fine("inserted #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("inserted #" + no);
|
||||||
return no;
|
return no;
|
||||||
} // insertDetails
|
} // insertDetails
|
||||||
|
|
||||||
|
@ -848,7 +848,7 @@ public class DistributionRun extends SvrProcess
|
||||||
+ " - " + m_docType);
|
+ " - " + m_docType);
|
||||||
log.info("Single=" + m_run.isCreateSingleOrder()
|
log.info("Single=" + m_run.isCreateSingleOrder()
|
||||||
+ " - " + m_docType + ",SO=" + m_docType.isSOTrx());
|
+ " - " + m_docType + ",SO=" + m_docType.isSOTrx());
|
||||||
log.fine("Counter=" + counter
|
if (log.isLoggable(Level.FINE)) log.fine("Counter=" + counter
|
||||||
+ ",C_BPartner_ID=" + runC_BPartner_ID + "," + runBPartner);
|
+ ",C_BPartner_ID=" + runC_BPartner_ID + "," + runBPartner);
|
||||||
//
|
//
|
||||||
MBPartner bp = null;
|
MBPartner bp = null;
|
||||||
|
@ -965,7 +965,7 @@ public class DistributionRun extends SvrProcess
|
||||||
// Counter Doc
|
// Counter Doc
|
||||||
if (counter && bp.getAD_OrgBP_ID_Int() > 0)
|
if (counter && bp.getAD_OrgBP_ID_Int() > 0)
|
||||||
{
|
{
|
||||||
log.fine("Counter - From_BPOrg=" + bp.getAD_OrgBP_ID_Int()
|
if (log.isLoggable(Level.FINE)) log.fine("Counter - From_BPOrg=" + bp.getAD_OrgBP_ID_Int()
|
||||||
+ "-" + bp + ", To_BP=" + runBPartner);
|
+ "-" + bp + ", To_BP=" + runBPartner);
|
||||||
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
|
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
|
||||||
if (ws[0].getM_Warehouse_ID() > 0)
|
if (ws[0].getM_Warehouse_ID() > 0)
|
||||||
|
@ -974,7 +974,7 @@ public class DistributionRun extends SvrProcess
|
||||||
}
|
}
|
||||||
else // normal
|
else // normal
|
||||||
{
|
{
|
||||||
log.fine("From_Org=" + runAD_Org_ID
|
if (log.isLoggable(Level.FINE)) log.fine("From_Org=" + runAD_Org_ID
|
||||||
+ ", To_BP=" + bp);
|
+ ", To_BP=" + bp);
|
||||||
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
|
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
|
||||||
order.setBPartner(bp);
|
order.setBPartner(bp);
|
||||||
|
|
|
@ -199,7 +199,7 @@ public class DunningPrint extends SvrProcess
|
||||||
if (re != null) {
|
if (re != null) {
|
||||||
File attachment = re.getPDF(File.createTempFile("Dunning", ".pdf"));
|
File attachment = re.getPDF(File.createTempFile("Dunning", ".pdf"));
|
||||||
StringBuilder msglog = new StringBuilder().append(to.toString()).append(" - ").append(attachment);
|
StringBuilder msglog = new StringBuilder().append(to.toString()).append(" - ").append(attachment);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
email.addAttachment(attachment);
|
email.addAttachment(attachment);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
|
@ -234,12 +234,12 @@ public class DunningRunCreate extends SvrProcess
|
||||||
|
|
||||||
StringBuilder msglog = new StringBuilder()
|
StringBuilder msglog = new StringBuilder()
|
||||||
.append("DaysAfterDue: ").append(DaysAfterDue.intValue()).append(" isShowAllDue: ").append(level.isShowAllDue());
|
.append("DaysAfterDue: ").append(DaysAfterDue.intValue()).append(" isShowAllDue: ").append(level.isShowAllDue());
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
msglog = new StringBuilder()
|
msglog = new StringBuilder()
|
||||||
.append("C_Invoice_ID - DaysDue - GrandTotal: ").append(C_Invoice_ID).append(" - ").append(DaysDue).append(" - ").append(GrandTotal);
|
.append("C_Invoice_ID - DaysDue - GrandTotal: ").append(C_Invoice_ID).append(" - ").append(DaysDue).append(" - ").append(GrandTotal);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
msglog = new StringBuilder("C_InvoicePaySchedule_ID: ").append(C_InvoicePaySchedule_ID);
|
msglog = new StringBuilder("C_InvoicePaySchedule_ID: ").append(C_InvoicePaySchedule_ID);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
//
|
//
|
||||||
// Check for Dispute
|
// Check for Dispute
|
||||||
if (!p_IncludeInDispute && IsInDispute)
|
if (!p_IncludeInDispute && IsInDispute)
|
||||||
|
|
|
@ -257,7 +257,7 @@ public class ExpenseSOrder extends SvrProcess
|
||||||
// Update TimeExpense Line
|
// Update TimeExpense Line
|
||||||
tel.setC_OrderLine_ID(ol.getC_OrderLine_ID());
|
tel.setC_OrderLine_ID(ol.getC_OrderLine_ID());
|
||||||
if (tel.save())
|
if (tel.save())
|
||||||
log.fine("Updated " + tel + " with C_OrderLine_ID");
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + tel + " with C_OrderLine_ID");
|
||||||
else
|
else
|
||||||
log.log(Level.SEVERE, "Not Updated " + tel + " with C_OrderLine_ID");
|
log.log(Level.SEVERE, "Not Updated " + tel + " with C_OrderLine_ID");
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@ public class FactAcctReset extends SvrProcess
|
||||||
int invalid = DB.executeUpdate(sql, get_TrxName());
|
int invalid = DB.executeUpdate(sql, get_TrxName());
|
||||||
//
|
//
|
||||||
if (unlocked + invalid != 0)
|
if (unlocked + invalid != 0)
|
||||||
log.fine(TableName + " - Unlocked=" + unlocked + " - Invalid=" + invalid);
|
if (log.isLoggable(Level.FINE)) log.fine(TableName + " - Unlocked=" + unlocked + " - Invalid=" + invalid);
|
||||||
m_countReset += unlocked + invalid;
|
m_countReset += unlocked + invalid;
|
||||||
} // reset
|
} // reset
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class ImportAccount extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_ElementValue ")
|
sql = new StringBuilder ("DELETE I_ElementValue ")
|
||||||
.append("WHERE I_IsImported='Y'").append(clientCheck);
|
.append("WHERE I_IsImported='Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, IsActive, Created/Updated
|
// Set Client, Org, IsActive, Created/Updated
|
||||||
|
@ -118,7 +118,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append(" I_IsImported = 'N' ")
|
.append(" I_IsImported = 'N' ")
|
||||||
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Reset=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Reset=" + no);
|
||||||
|
|
||||||
// **** Prepare ****
|
// **** Prepare ****
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE ElementName IS NULL AND C_Element_ID IS NULL")
|
.append("WHERE ElementName IS NULL AND C_Element_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Element Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Element Default=" + no);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue i ")
|
sql = new StringBuilder ("UPDATE I_ElementValue i ")
|
||||||
|
@ -139,7 +139,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE C_Element_ID IS NULL")
|
.append("WHERE C_Element_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Element=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Element=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Element, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Element, ' ")
|
||||||
|
@ -165,7 +165,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE Default_Account IS NOT NULL AND AD_Column_ID IS NULL")
|
.append("WHERE Default_Account IS NOT NULL AND AD_Column_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Column=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Column=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Column, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Column, ' ")
|
||||||
|
@ -186,7 +186,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
StringBuilder msglog = new StringBuilder("Set ").append(yColumns[i]).append(" Default=").append(no);
|
StringBuilder msglog = new StringBuilder("Set ").append(yColumns[i]).append(" Default=").append(no);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
}
|
}
|
||||||
// Summary
|
// Summary
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||||
|
@ -194,7 +194,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE IsSummary IS NULL OR IsSummary NOT IN ('Y','N')")
|
.append("WHERE IsSummary IS NULL OR IsSummary NOT IN ('Y','N')")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set IsSummary Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set IsSummary Default=" + no);
|
||||||
|
|
||||||
// Doc Controlled
|
// Doc Controlled
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||||
|
@ -202,7 +202,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE IsDocControlled IS NULL OR IsDocControlled NOT IN ('Y','N')")
|
.append("WHERE IsDocControlled IS NULL OR IsDocControlled NOT IN ('Y','N')")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set IsDocumentControlled Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set IsDocumentControlled Default=" + no);
|
||||||
|
|
||||||
// Check Account Type A (E) L M O R
|
// Check Account Type A (E) L M O R
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||||
|
@ -210,7 +210,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE AccountType IS NULL")
|
.append("WHERE AccountType IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set AccountType Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set AccountType Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid AccountType, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid AccountType, ' ")
|
||||||
|
@ -225,7 +225,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE AccountSign IS NULL")
|
.append("WHERE AccountSign IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set AccountSign Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set AccountSign Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid AccountSign, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid AccountSign, ' ")
|
||||||
|
@ -251,7 +251,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE C_ElementValue_ID IS NULL")
|
.append("WHERE C_ElementValue_ID IS NULL")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Found ElementValue=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Found ElementValue=" + no);
|
||||||
|
|
||||||
commitEx();
|
commitEx();
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE ParentElementValue_ID IS NULL")
|
.append("WHERE ParentElementValue_ID IS NULL")
|
||||||
.append(" AND I_IsImported='Y'").append(clientCheck);
|
.append(" AND I_IsImported='Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Found Parent ElementValue=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Found Parent ElementValue=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
sql = new StringBuilder ("UPDATE I_ElementValue ")
|
||||||
.append("SET I_ErrorMsg=I_ErrorMsg||'Info=ParentNotFound, ' ")
|
.append("SET I_ErrorMsg=I_ErrorMsg||'Info=ParentNotFound, ' ")
|
||||||
|
@ -421,7 +421,7 @@ public class ImportAccount extends SvrProcess
|
||||||
if (m_updateDefaultAccounts)
|
if (m_updateDefaultAccounts)
|
||||||
sql.append(" AND AD_Column_ID IS NULL");
|
sql.append(" AND AD_Column_ID IS NULL");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Reset Processing Flag=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Reset Processing Flag=" + no);
|
||||||
|
|
||||||
if (m_updateDefaultAccounts)
|
if (m_updateDefaultAccounts)
|
||||||
updateDefaults(clientCheck.toString());
|
updateDefaults(clientCheck.toString());
|
||||||
|
@ -437,7 +437,7 @@ public class ImportAccount extends SvrProcess
|
||||||
.append("WHERE I_IsImported='Y'")
|
.append("WHERE I_IsImported='Y'")
|
||||||
.append(clientCheck);
|
.append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Processed=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Processed=" + no);
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
} // doIt
|
} // doIt
|
||||||
|
@ -577,7 +577,7 @@ public class ImportAccount extends SvrProcess
|
||||||
private int updateDefaultAccount (String TableName, String ColumnName, int C_AcctSchema_ID, int C_ElementValue_ID)
|
private int updateDefaultAccount (String TableName, String ColumnName, int C_AcctSchema_ID, int C_ElementValue_ID)
|
||||||
{
|
{
|
||||||
StringBuilder msglog = new StringBuilder(TableName).append(".").append(ColumnName).append(" - ").append(C_ElementValue_ID);
|
StringBuilder msglog = new StringBuilder(TableName).append(".").append(ColumnName).append(" - ").append(C_ElementValue_ID);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
int retValue = UPDATE_ERROR;
|
int retValue = UPDATE_ERROR;
|
||||||
StringBuilder sql = new StringBuilder ("SELECT x.")
|
StringBuilder sql = new StringBuilder ("SELECT x.")
|
||||||
.append(ColumnName).append(",Account_ID FROM ")
|
.append(ColumnName).append(",Account_ID FROM ")
|
||||||
|
@ -620,7 +620,7 @@ public class ImportAccount extends SvrProcess
|
||||||
msglog = new StringBuilder("New #").append(no).append(" - ")
|
msglog = new StringBuilder("New #").append(no).append(" - ")
|
||||||
.append(TableName).append(".").append(ColumnName).append(" - ").append(C_ElementValue_ID)
|
.append(TableName).append(".").append(ColumnName).append(" - ").append(C_ElementValue_ID)
|
||||||
.append(" -- ").append(C_ValidCombination_ID).append(" -> ").append(newC_ValidCombination_ID);
|
.append(" -- ").append(C_ValidCombination_ID).append(" -> ").append(newC_ValidCombination_ID);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
if (no == 1)
|
if (no == 1)
|
||||||
retValue = UPDATE_YES;
|
retValue = UPDATE_YES;
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ public class ImportAccount extends SvrProcess
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
msglog = new StringBuilder("Replace #").append(no).append(" - ")
|
msglog = new StringBuilder("Replace #").append(no).append(" - ")
|
||||||
.append("C_ValidCombination_ID=").append(C_ValidCombination_ID).append(", New Account_ID=").append(C_ElementValue_ID);
|
.append("C_ValidCombination_ID=").append(C_ValidCombination_ID).append(", New Account_ID=").append(C_ElementValue_ID);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
if (no == 1)
|
if (no == 1)
|
||||||
{
|
{
|
||||||
retValue = UPDATE_YES;
|
retValue = UPDATE_YES;
|
||||||
|
@ -646,13 +646,13 @@ public class ImportAccount extends SvrProcess
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
msglog = new StringBuilder("ImportAccount.updateDefaultAccount - Replace VC #").append(no).append(" - ")
|
msglog = new StringBuilder("ImportAccount.updateDefaultAccount - Replace VC #").append(no).append(" - ")
|
||||||
.append("Account_ID=").append(Account_ID).append(", New Account_ID=").append(C_ElementValue_ID);
|
.append("Account_ID=").append(Account_ID).append(", New Account_ID=").append(C_ElementValue_ID);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
sql = new StringBuilder ("UPDATE Fact_Acct SET Account_ID=")
|
sql = new StringBuilder ("UPDATE Fact_Acct SET Account_ID=")
|
||||||
.append(C_ElementValue_ID).append(" WHERE Account_ID=").append(Account_ID);
|
.append(C_ElementValue_ID).append(" WHERE Account_ID=").append(Account_ID);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
msglog = new StringBuilder("ImportAccount.updateDefaultAccount - Replace Fact #").append(no).append(" - ")
|
msglog = new StringBuilder("ImportAccount.updateDefaultAccount - Replace Fact #").append(no).append(" - ")
|
||||||
.append("Account_ID=").append(Account_ID).append(", New Account_ID=").append(C_ElementValue_ID);
|
.append("Account_ID=").append(Account_ID).append(", New Account_ID=").append(C_ElementValue_ID);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
}
|
}
|
||||||
} // replace combination
|
} // replace combination
|
||||||
} // need to update
|
} // need to update
|
||||||
|
|
|
@ -103,7 +103,7 @@ implements ImportProcess
|
||||||
sql = new StringBuilder ("DELETE I_BPartner ")
|
sql = new StringBuilder ("DELETE I_BPartner ")
|
||||||
.append("WHERE I_IsImported='Y'").append(clientCheck);
|
.append("WHERE I_IsImported='Y'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, IsActive, Created/Updated
|
// Set Client, Org, IsActive, Created/Updated
|
||||||
|
@ -119,7 +119,7 @@ implements ImportProcess
|
||||||
.append(" I_IsImported = 'N' ")
|
.append(" I_IsImported = 'N' ")
|
||||||
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Reset=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Reset=" + no);
|
||||||
|
|
||||||
ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_BEFORE_VALIDATE);
|
ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_BEFORE_VALIDATE);
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ implements ImportProcess
|
||||||
sql.append("WHERE GroupValue IS NULL AND C_BP_Group_ID IS NULL")
|
sql.append("WHERE GroupValue IS NULL AND C_BP_Group_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Group Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Group Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
||||||
.append("SET C_BP_Group_ID=(SELECT C_BP_Group_ID FROM C_BP_Group g")
|
.append("SET C_BP_Group_ID=(SELECT C_BP_Group_ID FROM C_BP_Group g")
|
||||||
|
@ -138,7 +138,7 @@ implements ImportProcess
|
||||||
.append("WHERE C_BP_Group_ID IS NULL")
|
.append("WHERE C_BP_Group_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Group=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Group=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner ")
|
sql = new StringBuilder ("UPDATE I_BPartner ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Group, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Group, ' ")
|
||||||
|
@ -164,7 +164,7 @@ implements ImportProcess
|
||||||
.append("WHERE C_Country_ID IS NULL")
|
.append("WHERE C_Country_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Country=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Country=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner ")
|
sql = new StringBuilder ("UPDATE I_BPartner ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Country, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Country, ' ")
|
||||||
|
@ -181,7 +181,7 @@ implements ImportProcess
|
||||||
sql.append("WHERE RegionName IS NULL AND C_Region_ID IS NULL")
|
sql.append("WHERE RegionName IS NULL AND C_Region_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Region Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Region Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
||||||
.append("Set C_Region_ID=(SELECT C_Region_ID FROM C_Region r")
|
.append("Set C_Region_ID=(SELECT C_Region_ID FROM C_Region r")
|
||||||
|
@ -190,7 +190,7 @@ implements ImportProcess
|
||||||
.append("WHERE C_Region_ID IS NULL")
|
.append("WHERE C_Region_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Region=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Region=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Region, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Region, ' ")
|
||||||
|
@ -208,7 +208,7 @@ implements ImportProcess
|
||||||
.append("WHERE C_Greeting_ID IS NULL AND BPContactGreeting IS NOT NULL")
|
.append("WHERE C_Greeting_ID IS NULL AND BPContactGreeting IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Greeting=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Greeting=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Greeting, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Greeting, ' ")
|
||||||
|
@ -224,7 +224,7 @@ implements ImportProcess
|
||||||
.append("WHERE i.EMail=u.EMail AND u.AD_Client_ID=i.AD_Client_ID) ")
|
.append("WHERE i.EMail=u.EMail AND u.AD_Client_ID=i.AD_Client_ID) ")
|
||||||
.append("WHERE i.EMail IS NOT NULL AND I_IsImported='N'").append(clientCheck);
|
.append("WHERE i.EMail IS NOT NULL AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Found EMail User=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Found EMail User=" + no);
|
||||||
|
|
||||||
// Existing BPartner ? Match Value
|
// Existing BPartner ? Match Value
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
||||||
|
@ -233,7 +233,7 @@ implements ImportProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND Value IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND Value IS NOT NULL")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Found BPartner=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Found BPartner=" + no);
|
||||||
|
|
||||||
// Existing Contact ? Match Name
|
// Existing Contact ? Match Name
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
||||||
|
@ -242,7 +242,7 @@ implements ImportProcess
|
||||||
.append("WHERE C_BPartner_ID IS NOT NULL AND AD_User_ID IS NULL AND ContactName IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NOT NULL AND AD_User_ID IS NULL AND ContactName IS NOT NULL")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Found Contact=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Found Contact=" + no);
|
||||||
|
|
||||||
// Existing Location ? Exact Match
|
// Existing Location ? Exact Match
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
||||||
|
@ -259,7 +259,7 @@ implements ImportProcess
|
||||||
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Found Location=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Found Location=" + no);
|
||||||
|
|
||||||
// Interest Area
|
// Interest Area
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
sql = new StringBuilder ("UPDATE I_BPartner i ")
|
||||||
|
@ -268,7 +268,7 @@ implements ImportProcess
|
||||||
.append("WHERE R_InterestArea_ID IS NULL AND InterestAreaName IS NOT NULL")
|
.append("WHERE R_InterestArea_ID IS NULL AND InterestAreaName IS NOT NULL")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Interest Area=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Interest Area=" + no);
|
||||||
|
|
||||||
// Value is mandatory error
|
// Value is mandatory error
|
||||||
sql = new StringBuilder ("UPDATE I_BPartner ")
|
sql = new StringBuilder ("UPDATE I_BPartner ")
|
||||||
|
@ -318,7 +318,7 @@ implements ImportProcess
|
||||||
.append(", C_BPartner_ID=").append(impBP.getC_BPartner_ID())
|
.append(", C_BPartner_ID=").append(impBP.getC_BPartner_ID())
|
||||||
.append(", C_BPartner_Location_ID=").append(impBP.getC_BPartner_Location_ID())
|
.append(", C_BPartner_Location_ID=").append(impBP.getC_BPartner_Location_ID())
|
||||||
.append(", AD_User_ID=").append(impBP.getAD_User_ID());
|
.append(", AD_User_ID=").append(impBP.getAD_User_ID());
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
|
|
||||||
|
|
||||||
if ( ! New_BPValue.equals(Old_BPValue)) {
|
if ( ! New_BPValue.equals(Old_BPValue)) {
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class ImportBankStatement extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_BankStatement ")
|
sql = new StringBuilder ("DELETE I_BankStatement ")
|
||||||
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, IsActive, Created/Updated
|
// Set Client, Org, IsActive, Created/Updated
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class ImportConversionRate extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_Conversion_Rate ")
|
sql = new StringBuilder ("DELETE I_Conversion_Rate ")
|
||||||
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, Location, IsActive, Created/Updated
|
// Set Client, Org, Location, IsActive, Created/Updated
|
||||||
|
@ -146,7 +146,7 @@ public class ImportConversionRate extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no > 0)
|
if (no > 0)
|
||||||
log.fine("Set ConversionType =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set ConversionType =" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid ConversionType, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid ConversionType, ' ")
|
||||||
.append("WHERE (C_ConversionType_ID IS NULL")
|
.append("WHERE (C_ConversionType_ID IS NULL")
|
||||||
|
@ -166,7 +166,7 @@ public class ImportConversionRate extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no > 0)
|
if (no > 0)
|
||||||
log.fine("Set Currency =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Currency =" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency, ' ")
|
||||||
.append("WHERE (C_Currency_ID IS NULL")
|
.append("WHERE (C_Currency_ID IS NULL")
|
||||||
|
@ -186,7 +186,7 @@ public class ImportConversionRate extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no > 0)
|
if (no > 0)
|
||||||
log.fine("Set Currency To =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Currency To =" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency To, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency To, ' ")
|
||||||
.append("WHERE (C_Currency_ID_To IS NULL")
|
.append("WHERE (C_Currency_ID_To IS NULL")
|
||||||
|
@ -205,14 +205,14 @@ public class ImportConversionRate extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no > 0)
|
if (no > 0)
|
||||||
log.fine("Set MultiplyRate =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set MultiplyRate =" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
||||||
.append("SET DivideRate = 1 / MultiplyRate ")
|
.append("SET DivideRate = 1 / MultiplyRate ")
|
||||||
.append("WHERE (DivideRate IS NULL OR DivideRate = 0) AND MultiplyRate IS NOT NULL AND MultiplyRate<>0")
|
.append("WHERE (DivideRate IS NULL OR DivideRate = 0) AND MultiplyRate IS NOT NULL AND MultiplyRate<>0")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no > 0)
|
if (no > 0)
|
||||||
log.fine("Set DivideRate =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set DivideRate =" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
sql = new StringBuilder ("UPDATE I_Conversion_Rate i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Rates, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Rates, ' ")
|
||||||
.append("WHERE (MultiplyRate IS NULL OR MultiplyRate = 0 OR DivideRate IS NULL OR DivideRate = 0)")
|
.append("WHERE (MultiplyRate IS NULL OR MultiplyRate = 0 OR DivideRate IS NULL OR DivideRate = 0)")
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_GLJournal ")
|
sql = new StringBuilder ("DELETE I_GLJournal ")
|
||||||
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set IsActive, Created/Updated
|
// Set IsActive, Created/Updated
|
||||||
|
@ -131,7 +131,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE (AD_Client_ID IS NULL OR AD_Client_ID=0) AND ClientValue IS NOT NULL")
|
.append("WHERE (AD_Client_ID IS NULL OR AD_Client_ID=0) AND ClientValue IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'");
|
.append(" AND I_IsImported<>'Y'");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Client from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Client from Value=" + no);
|
||||||
|
|
||||||
// Set Default Client, Doc Org, AcctSchema, DatAcct
|
// Set Default Client, Doc Org, AcctSchema, DatAcct
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal ")
|
sql = new StringBuilder ("UPDATE I_GLJournal ")
|
||||||
|
@ -144,7 +144,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
sql.append(" Updated = COALESCE (Updated, SysDate) ")
|
sql.append(" Updated = COALESCE (Updated, SysDate) ")
|
||||||
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Client/DocOrg/Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Client/DocOrg/Default=" + no);
|
||||||
|
|
||||||
// Error Doc Org
|
// Error Doc Org
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal o ")
|
sql = new StringBuilder ("UPDATE I_GLJournal o ")
|
||||||
|
@ -163,13 +163,13 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_AcctSchema_ID IS NULL AND AcctSchemaName IS NOT NULL")
|
.append("WHERE C_AcctSchema_ID IS NULL AND AcctSchemaName IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set AcctSchema from Name=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set AcctSchema from Name=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET C_AcctSchema_ID=(SELECT c.C_AcctSchema1_ID FROM AD_ClientInfo c WHERE c.AD_Client_ID=i.AD_Client_ID) ")
|
.append("SET C_AcctSchema_ID=(SELECT c.C_AcctSchema1_ID FROM AD_ClientInfo c WHERE c.AD_Client_ID=i.AD_Client_ID) ")
|
||||||
.append("WHERE C_AcctSchema_ID IS NULL AND AcctSchemaName IS NULL")
|
.append("WHERE C_AcctSchema_ID IS NULL AND AcctSchemaName IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set AcctSchema from Client=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set AcctSchema from Client=" + no);
|
||||||
// Error AcctSchema
|
// Error AcctSchema
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid AcctSchema, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid AcctSchema, '")
|
||||||
|
@ -186,7 +186,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE DateAcct IS NULL")
|
.append("WHERE DateAcct IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set DateAcct=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set DateAcct=" + no);
|
||||||
|
|
||||||
// Document Type
|
// Document Type
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
|
@ -195,7 +195,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocType, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocType, '")
|
||||||
.append("WHERE (C_DocType_ID IS NULL OR C_DocType_ID=0")
|
.append("WHERE (C_DocType_ID IS NULL OR C_DocType_ID=0")
|
||||||
|
@ -212,7 +212,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE GL_Category_ID IS NULL AND CategoryName IS NOT NULL")
|
.append("WHERE GL_Category_ID IS NULL AND CategoryName IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Category, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Category, '")
|
||||||
.append("WHERE (GL_Category_ID IS NULL OR GL_Category_ID=0)")
|
.append("WHERE (GL_Category_ID IS NULL OR GL_Category_ID=0)")
|
||||||
|
@ -228,14 +228,14 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_Currency_ID IS NULL AND ISO_Code IS NOT NULL")
|
.append("WHERE C_Currency_ID IS NULL AND ISO_Code IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Currency from ISO=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Currency from ISO=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET C_Currency_ID=(SELECT a.C_Currency_ID FROM C_AcctSchema a")
|
.append("SET C_Currency_ID=(SELECT a.C_Currency_ID FROM C_AcctSchema a")
|
||||||
.append(" WHERE a.C_AcctSchema_ID=i.C_AcctSchema_ID AND a.AD_Client_ID=i.AD_Client_ID)")
|
.append(" WHERE a.C_AcctSchema_ID=i.C_AcctSchema_ID AND a.AD_Client_ID=i.AD_Client_ID)")
|
||||||
.append("WHERE C_Currency_ID IS NULL AND ISO_Code IS NULL")
|
.append("WHERE C_Currency_ID IS NULL AND ISO_Code IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default Currency=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default Currency=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency, '")
|
||||||
.append("WHERE (C_Currency_ID IS NULL OR C_Currency_ID=0)")
|
.append("WHERE (C_Currency_ID IS NULL OR C_Currency_ID=0)")
|
||||||
|
@ -250,14 +250,14 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_ConversionType_ID IS NULL AND ConversionTypeValue IS NULL")
|
.append("WHERE C_ConversionType_ID IS NULL AND ConversionTypeValue IS NULL")
|
||||||
.append(" AND I_IsImported='N'").append (clientCheck);
|
.append(" AND I_IsImported='N'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set CurrencyType Value to Spot =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set CurrencyType Value to Spot =" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET C_ConversionType_ID=(SELECT c.C_ConversionType_ID FROM C_ConversionType c")
|
.append("SET C_ConversionType_ID=(SELECT c.C_ConversionType_ID FROM C_ConversionType c")
|
||||||
.append(" WHERE c.Value=i.ConversionTypeValue AND c.AD_Client_ID IN (0,i.AD_Client_ID)) ")
|
.append(" WHERE c.Value=i.ConversionTypeValue AND c.AD_Client_ID IN (0,i.AD_Client_ID)) ")
|
||||||
.append("WHERE C_ConversionType_ID IS NULL AND ConversionTypeValue IS NOT NULL")
|
.append("WHERE C_ConversionType_ID IS NULL AND ConversionTypeValue IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set CurrencyType from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set CurrencyType from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid CurrencyType, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid CurrencyType, '")
|
||||||
.append("WHERE (C_ConversionType_ID IS NULL OR C_ConversionType_ID=0) AND ConversionTypeValue IS NOT NULL")
|
.append("WHERE (C_ConversionType_ID IS NULL OR C_ConversionType_ID=0) AND ConversionTypeValue IS NOT NULL")
|
||||||
|
@ -282,7 +282,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append(" WHERE a.C_AcctSchema_ID=i.C_AcctSchema_ID AND a.C_Currency_ID=i.C_Currency_ID)")
|
.append(" WHERE a.C_AcctSchema_ID=i.C_AcctSchema_ID AND a.C_Currency_ID=i.C_Currency_ID)")
|
||||||
.append(" AND C_Currency_ID IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND C_Currency_ID IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Home CurrencyRate=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Home CurrencyRate=" + no);
|
||||||
// Set Currency Rate
|
// Set Currency Rate
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET CurrencyRate=(SELECT MAX(r.MultiplyRate) FROM C_Conversion_Rate r, C_AcctSchema s")
|
.append("SET CurrencyRate=(SELECT MAX(r.MultiplyRate) FROM C_Conversion_Rate r, C_AcctSchema s")
|
||||||
|
@ -295,7 +295,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append(") WHERE CurrencyRate IS NULL OR CurrencyRate=0 AND C_Currency_ID>0")
|
.append(") WHERE CurrencyRate IS NULL OR CurrencyRate=0 AND C_Currency_ID>0")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Org Rate=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Org Rate=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET CurrencyRate=(SELECT MAX(r.MultiplyRate) FROM C_Conversion_Rate r, C_AcctSchema s")
|
.append("SET CurrencyRate=(SELECT MAX(r.MultiplyRate) FROM C_Conversion_Rate r, C_AcctSchema s")
|
||||||
.append(" WHERE s.C_AcctSchema_ID=i.C_AcctSchema_ID AND s.AD_Client_ID=i.AD_Client_ID")
|
.append(" WHERE s.C_AcctSchema_ID=i.C_AcctSchema_ID AND s.AD_Client_ID=i.AD_Client_ID")
|
||||||
|
@ -307,7 +307,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append(") WHERE CurrencyRate IS NULL OR CurrencyRate=0 AND C_Currency_ID>0")
|
.append(") WHERE CurrencyRate IS NULL OR CurrencyRate=0 AND C_Currency_ID>0")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Client Rate=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Client Rate=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Rate, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Rate, '")
|
||||||
.append("WHERE CurrencyRate IS NULL OR CurrencyRate=0")
|
.append("WHERE CurrencyRate IS NULL OR CurrencyRate=0")
|
||||||
|
@ -327,7 +327,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_Period_ID IS NULL")
|
.append("WHERE C_Period_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Period=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Period=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Period, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Period, '")
|
||||||
.append("WHERE C_Period_ID IS NULL OR C_Period_ID NOT IN")
|
.append("WHERE C_Period_ID IS NULL OR C_Period_ID NOT IN")
|
||||||
|
@ -355,7 +355,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("SET PostingType='A' ")
|
.append("SET PostingType='A' ")
|
||||||
.append("WHERE PostingType IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE PostingType IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Actual PostingType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Actual PostingType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid PostingType, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid PostingType, ' ")
|
||||||
.append("WHERE PostingType IS NULL OR NOT EXISTS")
|
.append("WHERE PostingType IS NULL OR NOT EXISTS")
|
||||||
|
@ -376,13 +376,13 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE (AD_Org_ID IS NULL OR AD_Org_ID=0) AND OrgValue IS NOT NULL")
|
.append("WHERE (AD_Org_ID IS NULL OR AD_Org_ID=0) AND OrgValue IS NOT NULL")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'");
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Org from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Org from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET AD_Org_ID=AD_OrgDoc_ID ")
|
.append("SET AD_Org_ID=AD_OrgDoc_ID ")
|
||||||
.append("WHERE (AD_Org_ID IS NULL OR AD_Org_ID=0) AND OrgValue IS NULL AND AD_OrgDoc_ID IS NOT NULL AND AD_OrgDoc_ID<>0")
|
.append("WHERE (AD_Org_ID IS NULL OR AD_Org_ID=0) AND OrgValue IS NULL AND AD_OrgDoc_ID IS NOT NULL AND AD_OrgDoc_ID<>0")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Org from Doc Org=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Org from Doc Org=" + no);
|
||||||
// Error Org
|
// Error Org
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal o ")
|
sql = new StringBuilder ("UPDATE I_GLJournal o ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '")
|
||||||
|
@ -403,7 +403,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE Account_ID IS NULL AND AccountValue IS NOT NULL")
|
.append("WHERE Account_ID IS NULL AND AccountValue IS NOT NULL")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Account from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Account from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Account, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Account, '")
|
||||||
.append("WHERE (Account_ID IS NULL OR Account_ID=0)")
|
.append("WHERE (Account_ID IS NULL OR Account_ID=0)")
|
||||||
|
@ -419,7 +419,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NOT NULL")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BPartner from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BPartner from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid BPartner, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid BPartner, '")
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NOT NULL")
|
||||||
|
@ -436,7 +436,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE M_Product_ID IS NULL AND (ProductValue IS NOT NULL OR UPC IS NOT NULL OR SKU IS NOT NULL)")
|
.append("WHERE M_Product_ID IS NULL AND (ProductValue IS NOT NULL OR UPC IS NOT NULL OR SKU IS NOT NULL)")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Product from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Product, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Product, '")
|
||||||
.append("WHERE M_Product_ID IS NULL AND (ProductValue IS NOT NULL OR UPC IS NOT NULL OR SKU IS NOT NULL)")
|
.append("WHERE M_Product_ID IS NULL AND (ProductValue IS NOT NULL OR UPC IS NOT NULL OR SKU IS NOT NULL)")
|
||||||
|
@ -452,7 +452,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_Project_ID IS NULL AND ProjectValue IS NOT NULL")
|
.append("WHERE C_Project_ID IS NULL AND ProjectValue IS NOT NULL")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Project from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Project from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Project, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Project, '")
|
||||||
.append("WHERE C_Project_ID IS NULL AND ProjectValue IS NOT NULL")
|
.append("WHERE C_Project_ID IS NULL AND ProjectValue IS NOT NULL")
|
||||||
|
@ -469,7 +469,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_Campaign_ID IS NULL AND CampaignValue IS NOT NULL")
|
.append("WHERE C_Campaign_ID IS NULL AND CampaignValue IS NOT NULL")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Campaign from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Campaign from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Campaign, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Campaign, '")
|
||||||
.append("WHERE C_Campaign_ID IS NULL AND CampaignValue IS NOT NULL")
|
.append("WHERE C_Campaign_ID IS NULL AND CampaignValue IS NOT NULL")
|
||||||
|
@ -485,7 +485,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_Activity_ID IS NULL AND ActivityValue IS NOT NULL")
|
.append("WHERE C_Activity_ID IS NULL AND ActivityValue IS NOT NULL")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Activity from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Activity from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Activity, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Activity, '")
|
||||||
.append("WHERE C_Activity_ID IS NULL AND ActivityValue IS NOT NULL")
|
.append("WHERE C_Activity_ID IS NULL AND ActivityValue IS NOT NULL")
|
||||||
|
@ -501,7 +501,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE C_SalesRegion_ID IS NULL AND SalesRegionValue IS NOT NULL")
|
.append("WHERE C_SalesRegion_ID IS NULL AND SalesRegionValue IS NOT NULL")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set SalesRegion from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set SalesRegion from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid SalesRegion, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid SalesRegion, '")
|
||||||
.append("WHERE C_SalesRegion_ID IS NULL AND SalesRegionValue IS NOT NULL")
|
.append("WHERE C_SalesRegion_ID IS NULL AND SalesRegionValue IS NOT NULL")
|
||||||
|
@ -518,7 +518,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE AD_OrgTrx_ID IS NULL AND OrgTrxValue IS NOT NULL")
|
.append("WHERE AD_OrgTrx_ID IS NULL AND OrgTrxValue IS NOT NULL")
|
||||||
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set OrgTrx from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set OrgTrx from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid OrgTrx, '")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid OrgTrx, '")
|
||||||
.append("WHERE AD_OrgTrx_ID IS NULL AND OrgTrxValue IS NOT NULL")
|
.append("WHERE AD_OrgTrx_ID IS NULL AND OrgTrxValue IS NOT NULL")
|
||||||
|
@ -534,13 +534,13 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE AmtSourceDr IS NULL")
|
.append("WHERE AmtSourceDr IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set 0 Source Dr=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set 0 Source Dr=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal ")
|
sql = new StringBuilder ("UPDATE I_GLJournal ")
|
||||||
.append("SET AmtSourceCr = 0 ")
|
.append("SET AmtSourceCr = 0 ")
|
||||||
.append("WHERE AmtSourceCr IS NULL")
|
.append("WHERE AmtSourceCr IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set 0 Source Cr=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set 0 Source Cr=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_ErrorMsg=I_ErrorMsg||'WARN=Zero Source Balance, ' ")
|
.append("SET I_ErrorMsg=I_ErrorMsg||'WARN=Zero Source Balance, ' ")
|
||||||
.append("WHERE (AmtSourceDr-AmtSourceCr)=0")
|
.append("WHERE (AmtSourceDr-AmtSourceCr)=0")
|
||||||
|
@ -555,13 +555,13 @@ public class ImportGLJournal extends SvrProcess
|
||||||
.append("WHERE AmtAcctDr IS NULL OR AmtAcctDr=0")
|
.append("WHERE AmtAcctDr IS NULL OR AmtAcctDr=0")
|
||||||
.append(" AND I_IsImported='N'").append (clientCheck);
|
.append(" AND I_IsImported='N'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Calculate Acct Dr=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Calculate Acct Dr=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal ")
|
sql = new StringBuilder ("UPDATE I_GLJournal ")
|
||||||
.append("SET AmtAcctCr = ROUND(AmtSourceCr * CurrencyRate, 2) ")
|
.append("SET AmtAcctCr = ROUND(AmtSourceCr * CurrencyRate, 2) ")
|
||||||
.append("WHERE AmtAcctCr IS NULL OR AmtAcctCr=0")
|
.append("WHERE AmtAcctCr IS NULL OR AmtAcctCr=0")
|
||||||
.append(" AND I_IsImported='N'").append (clientCheck);
|
.append(" AND I_IsImported='N'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Calculate Acct Cr=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Calculate Acct Cr=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
sql = new StringBuilder ("UPDATE I_GLJournal i ")
|
||||||
.append("SET I_ErrorMsg=I_ErrorMsg||'WARN=Zero Acct Balance, ' ")
|
.append("SET I_ErrorMsg=I_ErrorMsg||'WARN=Zero Acct Balance, ' ")
|
||||||
.append("WHERE (AmtSourceDr-AmtSourceCr)<>0 AND (AmtAcctDr-AmtAcctCr)=0")
|
.append("WHERE (AmtSourceDr-AmtSourceCr)<>0 AND (AmtAcctDr-AmtAcctCr)=0")
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class ImportInOutConfirm extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_InOutLineConfirm ")
|
sql = new StringBuilder ("DELETE I_InOutLineConfirm ")
|
||||||
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set IsActive, Created/Updated
|
// Set IsActive, Created/Updated
|
||||||
|
@ -102,7 +102,7 @@ public class ImportInOutConfirm extends SvrProcess
|
||||||
.append("WHERE (AD_Client_ID IS NULL OR AD_Client_ID=0)")
|
.append("WHERE (AD_Client_ID IS NULL OR AD_Client_ID=0)")
|
||||||
.append(" AND I_IsImported<>'Y'");
|
.append(" AND I_IsImported<>'Y'");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Client from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Client from Value=" + no);
|
||||||
|
|
||||||
// Error Confirmation Line
|
// Error Confirmation Line
|
||||||
sql = new StringBuilder ("UPDATE I_InOutLineConfirm i ")
|
sql = new StringBuilder ("UPDATE I_InOutLineConfirm i ")
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class ImportInventory extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_Inventory ")
|
sql = new StringBuilder ("DELETE I_Inventory ")
|
||||||
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||||
log.fine("Delete Old Imported=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Imported=" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, Location, IsActive, Created/Updated
|
// Set Client, Org, Location, IsActive, Created/Updated
|
||||||
|
@ -186,7 +186,7 @@ public class ImportInventory extends SvrProcess
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Inventory i ")
|
sql = new StringBuilder ("UPDATE I_Inventory i ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocType, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocType, ' ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
||||||
|
@ -202,14 +202,14 @@ public class ImportInventory extends SvrProcess
|
||||||
.append("WHERE M_Locator_ID IS NULL AND LocatorValue IS NOT NULL")
|
.append("WHERE M_Locator_ID IS NULL AND LocatorValue IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||||
log.fine("Set Locator from Value =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Locator from Value =" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Inventory i ")
|
sql = new StringBuilder ("UPDATE I_Inventory i ")
|
||||||
.append("SET M_Locator_ID=(SELECT MAX(M_Locator_ID) FROM M_Locator l")
|
.append("SET M_Locator_ID=(SELECT MAX(M_Locator_ID) FROM M_Locator l")
|
||||||
.append(" WHERE i.X=l.X AND i.Y=l.Y AND i.Z=l.Z AND i.AD_Client_ID=l.AD_Client_ID) ")
|
.append(" WHERE i.X=l.X AND i.Y=l.Y AND i.Z=l.Z AND i.AD_Client_ID=l.AD_Client_ID) ")
|
||||||
.append("WHERE M_Locator_ID IS NULL AND X IS NOT NULL AND Y IS NOT NULL AND Z IS NOT NULL")
|
.append("WHERE M_Locator_ID IS NULL AND X IS NOT NULL AND Y IS NOT NULL AND Z IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||||
log.fine("Set Locator from X,Y,Z =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Locator from X,Y,Z =" + no);
|
||||||
if (p_M_Locator_ID != 0)
|
if (p_M_Locator_ID != 0)
|
||||||
{
|
{
|
||||||
sql = new StringBuilder ("UPDATE I_Inventory ")
|
sql = new StringBuilder ("UPDATE I_Inventory ")
|
||||||
|
@ -217,7 +217,7 @@ public class ImportInventory extends SvrProcess
|
||||||
.append (" WHERE M_Locator_ID IS NULL")
|
.append (" WHERE M_Locator_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||||
log.fine("Set Locator from Parameter=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Locator from Parameter=" + no);
|
||||||
}
|
}
|
||||||
sql = new StringBuilder ("UPDATE I_Inventory ")
|
sql = new StringBuilder ("UPDATE I_Inventory ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Location, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Location, ' ")
|
||||||
|
@ -233,7 +233,7 @@ public class ImportInventory extends SvrProcess
|
||||||
.append("WHERE M_Locator_ID IS NOT NULL")
|
.append("WHERE M_Locator_ID IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||||
log.fine("Set Warehouse from Locator =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Warehouse from Locator =" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Inventory ")
|
sql = new StringBuilder ("UPDATE I_Inventory ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Warehouse, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Warehouse, ' ")
|
||||||
.append("WHERE M_Warehouse_ID IS NULL")
|
.append("WHERE M_Warehouse_ID IS NULL")
|
||||||
|
@ -258,14 +258,14 @@ public class ImportInventory extends SvrProcess
|
||||||
.append("WHERE M_Product_ID IS NULL AND Value IS NOT NULL")
|
.append("WHERE M_Product_ID IS NULL AND Value IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||||
log.fine("Set Product from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Inventory i ")
|
sql = new StringBuilder ("UPDATE I_Inventory i ")
|
||||||
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
||||||
.append(" WHERE i.UPC=p.UPC AND i.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE i.UPC=p.UPC AND i.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_Product_ID IS NULL AND UPC IS NOT NULL")
|
.append("WHERE M_Product_ID IS NULL AND UPC IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
no = DB.executeUpdate (sql.toString (), get_TrxName());
|
||||||
log.fine("Set Product from UPC=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product from UPC=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Inventory ")
|
sql = new StringBuilder ("UPDATE I_Inventory ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Product, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Product, ' ")
|
||||||
.append("WHERE M_Product_ID IS NULL")
|
.append("WHERE M_Product_ID IS NULL")
|
||||||
|
@ -280,7 +280,7 @@ public class ImportInventory extends SvrProcess
|
||||||
.append(" WHERE o.ChargeName=p.Name AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.ChargeName=p.Name AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Charge=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Charge=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Inventory ")
|
sql = new StringBuilder ("UPDATE I_Inventory ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
|
||||||
.append("WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)")
|
.append("WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)")
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_Invoice ")
|
sql = new StringBuilder ("DELETE I_Invoice ")
|
||||||
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, IsActive, Created/Updated
|
// Set Client, Org, IsActive, Created/Updated
|
||||||
|
@ -132,14 +132,14 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set PO DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PO DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName")
|
.append("SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName")
|
||||||
.append(" AND d.DocBaseType IN ('ARI','ARC') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType IN ('ARI','ARC') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set SO DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set SO DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName")
|
.append("SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName")
|
||||||
.append(" AND d.DocBaseType IN ('API','ARI','APC','ARC') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType IN ('API','ARI','APC','ARC') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
|
@ -147,7 +147,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
||||||
|
@ -162,21 +162,21 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set PO Default DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PO Default DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET C_DocType_ID=(SELECT MAX(C_DocType_ID) FROM C_DocType d WHERE d.IsDefault='Y'")
|
.append("SET C_DocType_ID=(SELECT MAX(C_DocType_ID) FROM C_DocType d WHERE d.IsDefault='Y'")
|
||||||
.append(" AND d.DocBaseType='ARI' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType='ARI' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set SO Default DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set SO Default DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET C_DocType_ID=(SELECT MAX(C_DocType_ID) FROM C_DocType d WHERE d.IsDefault='Y'")
|
.append("SET C_DocType_ID=(SELECT MAX(C_DocType_ID) FROM C_DocType d WHERE d.IsDefault='Y'")
|
||||||
.append(" AND d.DocBaseType IN('ARI','API') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType IN('ARI','API') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set Default DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No DocType, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No DocType, ' ")
|
||||||
.append("WHERE C_DocType_ID IS NULL")
|
.append("WHERE C_DocType_ID IS NULL")
|
||||||
|
@ -191,13 +191,13 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append(" AND C_DocType_ID IS NOT NULL")
|
.append(" AND C_DocType_ID IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set IsSOTrx=Y=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set IsSOTrx=Y=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o SET IsSOTrx='N' ")
|
sql = new StringBuilder ("UPDATE I_Invoice o SET IsSOTrx='N' ")
|
||||||
.append("WHERE EXISTS (SELECT * FROM C_DocType d WHERE o.C_DocType_ID=d.C_DocType_ID AND d.DocBaseType='API' AND o.AD_Client_ID=d.AD_Client_ID)")
|
.append("WHERE EXISTS (SELECT * FROM C_DocType d WHERE o.C_DocType_ID=d.C_DocType_ID AND d.DocBaseType='API' AND o.AD_Client_ID=d.AD_Client_ID)")
|
||||||
.append(" AND C_DocType_ID IS NOT NULL")
|
.append(" AND C_DocType_ID IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set IsSOTrx=N=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set IsSOTrx=N=" + no);
|
||||||
|
|
||||||
// Price List
|
// Price List
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
|
@ -205,25 +205,25 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append(" AND p.C_Currency_ID=o.C_Currency_ID AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" AND p.C_Currency_ID=o.C_Currency_ID AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default Currency PriceList=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default Currency PriceList=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p WHERE p.IsDefault='Y'")
|
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p WHERE p.IsDefault='Y'")
|
||||||
.append(" AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default PriceList=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default PriceList=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p ")
|
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p ")
|
||||||
.append(" WHERE p.C_Currency_ID=o.C_Currency_ID AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE p.C_Currency_ID=o.C_Currency_ID AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Currency PriceList=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Currency PriceList=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p ")
|
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p ")
|
||||||
.append(" WHERE p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PriceList=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PriceList=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No PriceList, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No PriceList, ' ")
|
||||||
|
@ -239,13 +239,13 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append(" WHERE o.PaymentTermValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.PaymentTermValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_PaymentTerm_ID IS NULL AND PaymentTermValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_PaymentTerm_ID IS NULL AND PaymentTermValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PaymentTerm=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PaymentTerm=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET C_PaymentTerm_ID=(SELECT MAX(C_PaymentTerm_ID) FROM C_PaymentTerm p")
|
.append("SET C_PaymentTerm_ID=(SELECT MAX(C_PaymentTerm_ID) FROM C_PaymentTerm p")
|
||||||
.append(" WHERE p.IsDefault='Y' AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE p.IsDefault='Y' AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_PaymentTerm_ID IS NULL AND o.PaymentTermValue IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_PaymentTerm_ID IS NULL AND o.PaymentTermValue IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default PaymentTerm=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default PaymentTerm=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No PaymentTerm, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No PaymentTerm, ' ")
|
||||||
|
@ -262,7 +262,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append(" WHERE o.ProjectValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.ProjectValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_Project_ID IS NULL AND ProjectValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_Project_ID IS NULL AND ProjectValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Project=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Project=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Project, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Project, ' ")
|
||||||
.append("WHERE C_Project_ID IS NULL AND (ProjectValue IS NOT NULL)")
|
.append("WHERE C_Project_ID IS NULL AND (ProjectValue IS NOT NULL)")
|
||||||
|
@ -276,7 +276,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append(" WHERE o.ActivityValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.ActivityValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_Activity_ID IS NULL AND ActivityValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_Activity_ID IS NULL AND ActivityValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Activity=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Activity=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Activity, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Activity, ' ")
|
||||||
.append("WHERE C_Activity_ID IS NULL AND (ActivityValue IS NOT NULL)")
|
.append("WHERE C_Activity_ID IS NULL AND (ActivityValue IS NOT NULL)")
|
||||||
|
@ -291,7 +291,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append(" WHERE o.ChargeName=p.Name AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.ChargeName=p.Name AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Charge=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Charge=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
|
||||||
.append("WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)")
|
.append("WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)")
|
||||||
|
@ -308,7 +308,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND EMail IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND EMail IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP from EMail=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP from EMail=" + no);
|
||||||
// BP from ContactName
|
// BP from ContactName
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET (C_BPartner_ID,AD_User_ID)=(SELECT C_BPartner_ID,AD_User_ID FROM AD_User u")
|
.append("SET (C_BPartner_ID,AD_User_ID)=(SELECT C_BPartner_ID,AD_User_ID FROM AD_User u")
|
||||||
|
@ -317,7 +317,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append(" AND EXISTS (SELECT Name FROM AD_User u WHERE o.ContactName=u.Name AND o.AD_Client_ID=u.AD_Client_ID AND u.C_BPartner_ID IS NOT NULL GROUP BY Name HAVING COUNT(*)=1)")
|
.append(" AND EXISTS (SELECT Name FROM AD_User u WHERE o.ContactName=u.Name AND o.AD_Client_ID=u.AD_Client_ID AND u.C_BPartner_ID IS NOT NULL GROUP BY Name HAVING COUNT(*)=1)")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP from ContactName=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP from ContactName=" + no);
|
||||||
// BP from Value
|
// BP from Value
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET C_BPartner_ID=(SELECT MAX(C_BPartner_ID) FROM C_BPartner bp")
|
.append("SET C_BPartner_ID=(SELECT MAX(C_BPartner_ID) FROM C_BPartner bp")
|
||||||
|
@ -325,7 +325,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP from Value=" + no);
|
||||||
// Default BP
|
// Default BP
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET C_BPartner_ID=(SELECT C_BPartnerCashTrx_ID FROM AD_ClientInfo c")
|
.append("SET C_BPartner_ID=(SELECT C_BPartnerCashTrx_ID FROM AD_ClientInfo c")
|
||||||
|
@ -333,7 +333,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NULL AND Name IS NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NULL AND Name IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default BP=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default BP=" + no);
|
||||||
|
|
||||||
// Existing Location ? Exact Match
|
// Existing Location ? Exact Match
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
|
@ -346,7 +346,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
||||||
.append(" AND I_IsImported='N'").append (clientCheck);
|
.append(" AND I_IsImported='N'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Found Location=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Found Location=" + no);
|
||||||
// Set Location from BPartner
|
// Set Location from BPartner
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET C_BPartner_Location_ID=(SELECT MAX(C_BPartner_Location_ID) FROM C_BPartner_Location l")
|
.append("SET C_BPartner_Location_ID=(SELECT MAX(C_BPartner_Location_ID) FROM C_BPartner_Location l")
|
||||||
|
@ -356,7 +356,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP Location from BP=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP Location from BP=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No BP Location, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No BP Location, ' ")
|
||||||
|
@ -382,7 +382,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND C_Country_ID IS NULL AND CountryCode IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND C_Country_ID IS NULL AND CountryCode IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Country=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Country=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Country, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Country, ' ")
|
||||||
|
@ -400,7 +400,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND C_Region_ID IS NULL AND RegionName IS NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND C_Region_ID IS NULL AND RegionName IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Region Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Region Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("Set C_Region_ID=(SELECT C_Region_ID FROM C_Region r")
|
.append("Set C_Region_ID=(SELECT C_Region_ID FROM C_Region r")
|
||||||
|
@ -409,7 +409,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND C_Region_ID IS NULL AND RegionName IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND C_Region_ID IS NULL AND RegionName IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Region=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Region=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Region, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Region, ' ")
|
||||||
|
@ -428,21 +428,21 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE M_Product_ID IS NULL AND ProductValue IS NOT NULL")
|
.append("WHERE M_Product_ID IS NULL AND ProductValue IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Product from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
||||||
.append(" WHERE o.UPC=p.UPC AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.UPC=p.UPC AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_Product_ID IS NULL AND UPC IS NOT NULL")
|
.append("WHERE M_Product_ID IS NULL AND UPC IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Product from UPC=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product from UPC=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
sql = new StringBuilder ("UPDATE I_Invoice o ")
|
||||||
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
||||||
.append(" WHERE o.SKU=p.SKU AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.SKU=p.SKU AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_Product_ID IS NULL AND SKU IS NOT NULL")
|
.append("WHERE M_Product_ID IS NULL AND SKU IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Product fom SKU=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product fom SKU=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Product, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Product, ' ")
|
||||||
.append("WHERE M_Product_ID IS NULL AND (ProductValue IS NOT NULL OR UPC IS NOT NULL OR SKU IS NOT NULL)")
|
.append("WHERE M_Product_ID IS NULL AND (ProductValue IS NOT NULL OR UPC IS NOT NULL OR SKU IS NOT NULL)")
|
||||||
|
@ -467,7 +467,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
|
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Tax=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Tax=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Invoice ")
|
sql = new StringBuilder ("UPDATE I_Invoice ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Tax, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Tax, ' ")
|
||||||
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
|
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class ImportOrder extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_Order ")
|
sql = new StringBuilder ("DELETE I_Order ")
|
||||||
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, IsActive, Created/Updated
|
// Set Client, Org, IsActive, Created/Updated
|
||||||
|
@ -133,20 +133,20 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" AND d.DocBaseType='POO' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType='POO' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PO DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PO DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ") // SO Document Type Name
|
sql = new StringBuilder ("UPDATE I_Order o ") // SO Document Type Name
|
||||||
.append("SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName")
|
.append("SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName")
|
||||||
.append(" AND d.DocBaseType='SOO' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType='SOO' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set SO DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set SO DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName")
|
.append("SET C_DocType_ID=(SELECT C_DocType_ID FROM C_DocType d WHERE d.Name=o.DocTypeName")
|
||||||
.append(" AND d.DocBaseType IN ('SOO','POO') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType IN ('SOO','POO') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
//+ "WHERE C_DocType_ID IS NULL AND IsSOTrx IS NULL AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
//+ "WHERE C_DocType_ID IS NULL AND IsSOTrx IS NULL AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order ") // Error Invalid Doc Type Name
|
sql = new StringBuilder ("UPDATE I_Order ") // Error Invalid Doc Type Name
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
||||||
|
@ -160,19 +160,19 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" AND d.DocBaseType='POO' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType='POO' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PO Default DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PO Default DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ") // Default SO
|
sql = new StringBuilder ("UPDATE I_Order o ") // Default SO
|
||||||
.append("SET C_DocType_ID=(SELECT MAX(C_DocType_ID) FROM C_DocType d WHERE d.IsDefault='Y'")
|
.append("SET C_DocType_ID=(SELECT MAX(C_DocType_ID) FROM C_DocType d WHERE d.IsDefault='Y'")
|
||||||
.append(" AND d.DocBaseType='SOO' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType='SOO' AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set SO Default DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set SO Default DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET C_DocType_ID=(SELECT MAX(C_DocType_ID) FROM C_DocType d WHERE d.IsDefault='Y'")
|
.append("SET C_DocType_ID=(SELECT MAX(C_DocType_ID) FROM C_DocType d WHERE d.IsDefault='Y'")
|
||||||
.append(" AND d.DocBaseType IN('SOO','POO') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
.append(" AND d.DocBaseType IN('SOO','POO') AND o.AD_Client_ID=d.AD_Client_ID) ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND IsSOTrx IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order ") // No DocType
|
sql = new StringBuilder ("UPDATE I_Order ") // No DocType
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No DocType, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No DocType, ' ")
|
||||||
.append("WHERE C_DocType_ID IS NULL")
|
.append("WHERE C_DocType_ID IS NULL")
|
||||||
|
@ -187,13 +187,13 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" AND C_DocType_ID IS NOT NULL")
|
.append(" AND C_DocType_ID IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set IsSOTrx=Y=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set IsSOTrx=Y=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o SET IsSOTrx='N' ")
|
sql = new StringBuilder ("UPDATE I_Order o SET IsSOTrx='N' ")
|
||||||
.append("WHERE EXISTS (SELECT * FROM C_DocType d WHERE o.C_DocType_ID=d.C_DocType_ID AND d.DocBaseType='POO' AND o.AD_Client_ID=d.AD_Client_ID)")
|
.append("WHERE EXISTS (SELECT * FROM C_DocType d WHERE o.C_DocType_ID=d.C_DocType_ID AND d.DocBaseType='POO' AND o.AD_Client_ID=d.AD_Client_ID)")
|
||||||
.append(" AND C_DocType_ID IS NOT NULL")
|
.append(" AND C_DocType_ID IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set IsSOTrx=N=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set IsSOTrx=N=" + no);
|
||||||
|
|
||||||
// Price List
|
// Price List
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
|
@ -201,25 +201,25 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" AND p.C_Currency_ID=o.C_Currency_ID AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" AND p.C_Currency_ID=o.C_Currency_ID AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default Currency PriceList=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default Currency PriceList=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p WHERE p.IsDefault='Y'")
|
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p WHERE p.IsDefault='Y'")
|
||||||
.append(" AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default PriceList=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default PriceList=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p ")
|
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p ")
|
||||||
.append(" WHERE p.C_Currency_ID=o.C_Currency_ID AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE p.C_Currency_ID=o.C_Currency_ID AND p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Currency PriceList=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Currency PriceList=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p ")
|
.append("SET M_PriceList_ID=(SELECT MAX(M_PriceList_ID) FROM M_PriceList p ")
|
||||||
.append(" WHERE p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE p.IsSOPriceList=o.IsSOTrx AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PriceList=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PriceList=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No PriceList, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No PriceList, ' ")
|
||||||
|
@ -235,7 +235,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" WHERE o.C_OrderSourceValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.C_OrderSourceValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_OrderSource_ID IS NULL AND C_OrderSourceValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_OrderSource_ID IS NULL AND C_OrderSourceValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Order Source=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Order Source=" + no);
|
||||||
// Set proper error message
|
// Set proper error message
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Not Found Order Source, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Not Found Order Source, ' ")
|
||||||
|
@ -250,13 +250,13 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" WHERE o.PaymentTermValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.PaymentTermValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_PaymentTerm_ID IS NULL AND PaymentTermValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_PaymentTerm_ID IS NULL AND PaymentTermValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PaymentTerm=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PaymentTerm=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET C_PaymentTerm_ID=(SELECT MAX(C_PaymentTerm_ID) FROM C_PaymentTerm p")
|
.append("SET C_PaymentTerm_ID=(SELECT MAX(C_PaymentTerm_ID) FROM C_PaymentTerm p")
|
||||||
.append(" WHERE p.IsDefault='Y' AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE p.IsDefault='Y' AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE C_PaymentTerm_ID IS NULL AND o.PaymentTermValue IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_PaymentTerm_ID IS NULL AND o.PaymentTermValue IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default PaymentTerm=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default PaymentTerm=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No PaymentTerm, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No PaymentTerm, ' ")
|
||||||
|
@ -273,7 +273,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE M_Warehouse_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE M_Warehouse_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName()); // Warehouse for Org
|
no = DB.executeUpdate(sql.toString(), get_TrxName()); // Warehouse for Org
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set Warehouse=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Warehouse=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET M_Warehouse_ID=(SELECT M_Warehouse_ID FROM M_Warehouse w")
|
.append("SET M_Warehouse_ID=(SELECT M_Warehouse_ID FROM M_Warehouse w")
|
||||||
.append(" WHERE o.AD_Client_ID=w.AD_Client_ID) ")
|
.append(" WHERE o.AD_Client_ID=w.AD_Client_ID) ")
|
||||||
|
@ -282,7 +282,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set Only Client Warehouse=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Only Client Warehouse=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Warehouse, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Warehouse, ' ")
|
||||||
|
@ -299,7 +299,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND EMail IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND EMail IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP from EMail=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP from EMail=" + no);
|
||||||
// BP from ContactName
|
// BP from ContactName
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET (C_BPartner_ID,AD_User_ID)=(SELECT C_BPartner_ID,AD_User_ID FROM AD_User u")
|
.append("SET (C_BPartner_ID,AD_User_ID)=(SELECT C_BPartner_ID,AD_User_ID FROM AD_User u")
|
||||||
|
@ -308,7 +308,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" AND EXISTS (SELECT Name FROM AD_User u WHERE o.ContactName=u.Name AND o.AD_Client_ID=u.AD_Client_ID AND u.C_BPartner_ID IS NOT NULL GROUP BY Name HAVING COUNT(*)=1)")
|
.append(" AND EXISTS (SELECT Name FROM AD_User u WHERE o.ContactName=u.Name AND o.AD_Client_ID=u.AD_Client_ID AND u.C_BPartner_ID IS NOT NULL GROUP BY Name HAVING COUNT(*)=1)")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP from ContactName=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP from ContactName=" + no);
|
||||||
// BP from Value
|
// BP from Value
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET C_BPartner_ID=(SELECT MAX(C_BPartner_ID) FROM C_BPartner bp")
|
.append("SET C_BPartner_ID=(SELECT MAX(C_BPartner_ID) FROM C_BPartner bp")
|
||||||
|
@ -316,7 +316,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP from Value=" + no);
|
||||||
// Default BP
|
// Default BP
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET C_BPartner_ID=(SELECT C_BPartnerCashTrx_ID FROM AD_ClientInfo c")
|
.append("SET C_BPartner_ID=(SELECT C_BPartnerCashTrx_ID FROM AD_ClientInfo c")
|
||||||
|
@ -324,7 +324,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NULL AND Name IS NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND BPartnerValue IS NULL AND Name IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Default BP=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Default BP=" + no);
|
||||||
|
|
||||||
// Existing Location ? Exact Match
|
// Existing Location ? Exact Match
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
|
@ -337,7 +337,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
||||||
.append(" AND I_IsImported='N'").append (clientCheck);
|
.append(" AND I_IsImported='N'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Found Location=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Found Location=" + no);
|
||||||
// Set Bill Location from BPartner
|
// Set Bill Location from BPartner
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET BillTo_ID=(SELECT MAX(C_BPartner_Location_ID) FROM C_BPartner_Location l")
|
.append("SET BillTo_ID=(SELECT MAX(C_BPartner_Location_ID) FROM C_BPartner_Location l")
|
||||||
|
@ -347,7 +347,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NOT NULL AND BillTo_ID IS NULL")
|
.append("WHERE C_BPartner_ID IS NOT NULL AND BillTo_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP BillTo from BP=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP BillTo from BP=" + no);
|
||||||
// Set Location from BPartner
|
// Set Location from BPartner
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET C_BPartner_Location_ID=(SELECT MAX(C_BPartner_Location_ID) FROM C_BPartner_Location l")
|
.append("SET C_BPartner_Location_ID=(SELECT MAX(C_BPartner_Location_ID) FROM C_BPartner_Location l")
|
||||||
|
@ -357,7 +357,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
.append("WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set BP Location from BP=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP Location from BP=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No BP Location, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No BP Location, ' ")
|
||||||
|
@ -383,7 +383,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND C_Country_ID IS NULL AND CountryCode IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND C_Country_ID IS NULL AND CountryCode IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Country=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Country=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Country, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Country, ' ")
|
||||||
|
@ -401,7 +401,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND C_Region_ID IS NULL AND RegionName IS NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND C_Region_ID IS NULL AND RegionName IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Region Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Region Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("Set C_Region_ID=(SELECT C_Region_ID FROM C_Region r")
|
.append("Set C_Region_ID=(SELECT C_Region_ID FROM C_Region r")
|
||||||
|
@ -410,7 +410,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_BPartner_ID IS NULL AND C_Region_ID IS NULL AND RegionName IS NOT NULL")
|
.append("WHERE C_BPartner_ID IS NULL AND C_Region_ID IS NULL AND RegionName IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Region=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Region=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Region, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Region, ' ")
|
||||||
|
@ -429,21 +429,21 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE M_Product_ID IS NULL AND ProductValue IS NOT NULL")
|
.append("WHERE M_Product_ID IS NULL AND ProductValue IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Product from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product from Value=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
||||||
.append(" WHERE o.UPC=p.UPC AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.UPC=p.UPC AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_Product_ID IS NULL AND UPC IS NOT NULL")
|
.append("WHERE M_Product_ID IS NULL AND UPC IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Product from UPC=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product from UPC=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order o ")
|
sql = new StringBuilder ("UPDATE I_Order o ")
|
||||||
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
.append("SET M_Product_ID=(SELECT MAX(M_Product_ID) FROM M_Product p")
|
||||||
.append(" WHERE o.SKU=p.SKU AND o.AD_Client_ID=p.AD_Client_ID) ")
|
.append(" WHERE o.SKU=p.SKU AND o.AD_Client_ID=p.AD_Client_ID) ")
|
||||||
.append("WHERE M_Product_ID IS NULL AND SKU IS NOT NULL")
|
.append("WHERE M_Product_ID IS NULL AND SKU IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Product fom SKU=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Product fom SKU=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Product, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Product, ' ")
|
||||||
.append("WHERE M_Product_ID IS NULL AND (ProductValue IS NOT NULL OR UPC IS NOT NULL OR SKU IS NOT NULL)")
|
.append("WHERE M_Product_ID IS NULL AND (ProductValue IS NOT NULL OR UPC IS NOT NULL OR SKU IS NOT NULL)")
|
||||||
|
@ -458,7 +458,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append(" WHERE o.ChargeName=c.Name AND o.AD_Client_ID=c.AD_Client_ID) ")
|
.append(" WHERE o.ChargeName=c.Name AND o.AD_Client_ID=c.AD_Client_ID) ")
|
||||||
.append("WHERE C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Charge=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Charge=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
|
||||||
.append("WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)")
|
.append("WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)")
|
||||||
|
@ -483,7 +483,7 @@ public class ImportOrder extends SvrProcess
|
||||||
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
|
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Tax=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Tax=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Order ")
|
sql = new StringBuilder ("UPDATE I_Order ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Tax, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Tax, ' ")
|
||||||
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
|
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class ImportPayment extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_Payment ")
|
sql = new StringBuilder ("DELETE I_Payment ")
|
||||||
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
.append("WHERE I_IsImported='Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, IsActive, Created/Updated
|
// Set Client, Org, IsActive, Created/Updated
|
||||||
|
@ -272,7 +272,7 @@ public class ImportPayment extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set Invoice from DocumentNo=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Invoice from DocumentNo=" + no);
|
||||||
|
|
||||||
// BPartner
|
// BPartner
|
||||||
sql = new StringBuilder ("UPDATE I_Payment i ")
|
sql = new StringBuilder ("UPDATE I_Payment i ")
|
||||||
|
@ -282,7 +282,7 @@ public class ImportPayment extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set BP from Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP from Value=" + no);
|
||||||
|
|
||||||
sql = new StringBuilder ("UPDATE I_Payment i ")
|
sql = new StringBuilder ("UPDATE I_Payment i ")
|
||||||
.append("SET C_BPartner_ID=(SELECT MAX(C_BPartner_ID) FROM C_Invoice ii")
|
.append("SET C_BPartner_ID=(SELECT MAX(C_BPartner_ID) FROM C_Invoice ii")
|
||||||
|
@ -291,7 +291,7 @@ public class ImportPayment extends SvrProcess
|
||||||
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
.append(" AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set BP from Invoice=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set BP from Invoice=" + no);
|
||||||
|
|
||||||
sql = new StringBuilder ("UPDATE I_Payment ")
|
sql = new StringBuilder ("UPDATE I_Payment ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No BPartner,' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No BPartner,' ")
|
||||||
|
@ -388,7 +388,7 @@ public class ImportPayment extends SvrProcess
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set DocType=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set DocType=" + no);
|
||||||
sql = new StringBuilder ("UPDATE I_Payment ")
|
sql = new StringBuilder ("UPDATE I_Payment ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
|
||||||
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
|
||||||
|
|
|
@ -188,7 +188,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
.append(" AND M_Product_ID IS NULL") // set category only if product not found
|
.append(" AND M_Product_ID IS NULL") // set category only if product not found
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Category Default Value=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Category Default Value=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Product i ")
|
sql = new StringBuilder ("UPDATE I_Product i ")
|
||||||
.append("SET M_Product_Category_ID=(SELECT M_Product_Category_ID FROM M_Product_Category c")
|
.append("SET M_Product_Category_ID=(SELECT M_Product_Category_ID FROM M_Product_Category c")
|
||||||
|
@ -210,7 +210,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine(strFieldsToCopy[i] + " - default from existing Product=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine(strFieldsToCopy[i] + " - default from existing Product=" + no);
|
||||||
}
|
}
|
||||||
String[] numFields = new String[] {"C_UOM_ID","M_Product_Category_ID",
|
String[] numFields = new String[] {"C_UOM_ID","M_Product_Category_ID",
|
||||||
"Volume","Weight","ShelfWidth","ShelfHeight","ShelfDepth","UnitsPerPallet"};
|
"Volume","Weight","ShelfWidth","ShelfHeight","ShelfDepth","UnitsPerPallet"};
|
||||||
|
@ -224,7 +224,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine(numFields[i] + " default from existing Product=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine(numFields[i] + " default from existing Product=" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy From Product_PO if Import does not have value
|
// Copy From Product_PO if Import does not have value
|
||||||
|
@ -242,7 +242,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine(strFieldsPO[i] + " default from existing Product PO=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine(strFieldsPO[i] + " default from existing Product PO=" + no);
|
||||||
}
|
}
|
||||||
String[] numFieldsPO = new String[] {"C_UOM_ID","C_Currency_ID",
|
String[] numFieldsPO = new String[] {"C_UOM_ID","C_Currency_ID",
|
||||||
"PriceList","PricePO","RoyaltyAmt",
|
"PriceList","PricePO","RoyaltyAmt",
|
||||||
|
@ -258,7 +258,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine(numFieldsPO[i] + " default from existing Product PO=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine(numFieldsPO[i] + " default from existing Product PO=" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invalid Category
|
// Invalid Category
|
||||||
|
@ -278,7 +278,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
.append("WHERE X12DE355 IS NULL AND C_UOM_ID IS NULL")
|
.append("WHERE X12DE355 IS NULL AND C_UOM_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set UOM Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set UOM Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Product i ")
|
sql = new StringBuilder ("UPDATE I_Product i ")
|
||||||
.append("SET C_UOM_ID = (SELECT C_UOM_ID FROM C_UOM u WHERE u.X12DE355=i.X12DE355 AND u.AD_Client_ID IN (0,i.AD_Client_ID)) ")
|
.append("SET C_UOM_ID = (SELECT C_UOM_ID FROM C_UOM u WHERE u.X12DE355=i.X12DE355 AND u.AD_Client_ID IN (0,i.AD_Client_ID)) ")
|
||||||
|
@ -305,7 +305,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
.append("WHERE C_Currency_ID IS NULL AND ISO_Code IS NULL")
|
.append("WHERE C_Currency_ID IS NULL AND ISO_Code IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set Currency Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Currency Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_Product i ")
|
sql = new StringBuilder ("UPDATE I_Product i ")
|
||||||
.append("SET C_Currency_ID=(SELECT C_Currency_ID FROM C_Currency c")
|
.append("SET C_Currency_ID=(SELECT C_Currency_ID FROM C_Currency c")
|
||||||
|
@ -405,7 +405,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
rs = null;
|
rs = null;
|
||||||
pstmt = null;
|
pstmt = null;
|
||||||
}
|
}
|
||||||
log.fine("C_TaxCategory_ID=" + C_TaxCategory_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("C_TaxCategory_ID=" + C_TaxCategory_ID);
|
||||||
|
|
||||||
ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_AFTER_VALIDATE);
|
ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_AFTER_VALIDATE);
|
||||||
|
|
||||||
|
@ -509,7 +509,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
int M_Product_ID = imp.getM_Product_ID();
|
int M_Product_ID = imp.getM_Product_ID();
|
||||||
int C_BPartner_ID = imp.getC_BPartner_ID();
|
int C_BPartner_ID = imp.getC_BPartner_ID();
|
||||||
boolean newProduct = M_Product_ID == 0;
|
boolean newProduct = M_Product_ID == 0;
|
||||||
log.fine("I_Product_ID=" + I_Product_ID + ", M_Product_ID=" + M_Product_ID
|
if (log.isLoggable(Level.FINE)) log.fine("I_Product_ID=" + I_Product_ID + ", M_Product_ID=" + M_Product_ID
|
||||||
+ ", C_BPartner_ID=" + C_BPartner_ID);
|
+ ", C_BPartner_ID=" + C_BPartner_ID);
|
||||||
|
|
||||||
// Product
|
// Product
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
sql = new StringBuilder ("DELETE I_ReportLine ")
|
sql = new StringBuilder ("DELETE I_ReportLine ")
|
||||||
.append("WHERE I_IsImported='Y'").append(clientCheck);
|
.append("WHERE I_IsImported='Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Delete Old Impored =" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Old Impored =" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Client, Org, IsActive, Created/Updated
|
// Set Client, Org, IsActive, Created/Updated
|
||||||
|
@ -104,7 +104,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append(" I_IsImported = 'N' ")
|
.append(" I_IsImported = 'N' ")
|
||||||
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Reset=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Reset=" + no);
|
||||||
|
|
||||||
// ReportLineSetName (Default)
|
// ReportLineSetName (Default)
|
||||||
if (m_PA_ReportLineSet_ID != 0)
|
if (m_PA_ReportLineSet_ID != 0)
|
||||||
|
@ -115,7 +115,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE ReportLineSetName IS NULL AND PA_ReportLineSet_ID IS NULL")
|
.append("WHERE ReportLineSetName IS NULL AND PA_ReportLineSet_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set ReportLineSetName Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set ReportLineSetName Default=" + no);
|
||||||
}
|
}
|
||||||
// Set PA_ReportLineSet_ID
|
// Set PA_ReportLineSet_ID
|
||||||
sql = new StringBuilder ("UPDATE I_ReportLine i ")
|
sql = new StringBuilder ("UPDATE I_ReportLine i ")
|
||||||
|
@ -124,7 +124,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE PA_ReportLineSet_ID IS NULL")
|
.append("WHERE PA_ReportLineSet_ID IS NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PA_ReportLineSet_ID=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PA_ReportLineSet_ID=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
||||||
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid ReportLineSet, ' ")
|
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid ReportLineSet, ' ")
|
||||||
|
@ -148,7 +148,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE C_ElementValue_ID IS NULL AND ElementValue IS NOT NULL")
|
.append("WHERE C_ElementValue_ID IS NULL AND ElementValue IS NOT NULL")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set C_ElementValue_ID=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set C_ElementValue_ID=" + no);
|
||||||
|
|
||||||
// Validate C_ElementValue_ID
|
// Validate C_ElementValue_ID
|
||||||
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
||||||
|
@ -164,7 +164,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE SeqNo IS NULL")
|
.append("WHERE SeqNo IS NULL")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set SeqNo Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set SeqNo Default=" + no);
|
||||||
|
|
||||||
// Copy/Sync from first Row of Line
|
// Copy/Sync from first Row of Line
|
||||||
sql = new StringBuilder ("UPDATE I_ReportLine i ")
|
sql = new StringBuilder ("UPDATE I_ReportLine i ")
|
||||||
|
@ -179,7 +179,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append(" WHERE i.Name=iii.Name AND i.PA_ReportLineSet_ID=iii.PA_ReportLineSet_ID))")
|
.append(" WHERE i.Name=iii.Name AND i.PA_ReportLineSet_ID=iii.PA_ReportLineSet_ID))")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck); // not if previous error
|
.append(" AND I_IsImported='N'").append(clientCheck); // not if previous error
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Sync from first Row of Line=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Sync from first Row of Line=" + no);
|
||||||
|
|
||||||
// Validate IsSummary - (N) Y
|
// Validate IsSummary - (N) Y
|
||||||
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
||||||
|
@ -187,7 +187,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE IsSummary IS NULL OR IsSummary NOT IN ('Y','N')")
|
.append("WHERE IsSummary IS NULL OR IsSummary NOT IN ('Y','N')")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set IsSummary Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set IsSummary Default=" + no);
|
||||||
|
|
||||||
// Validate IsPrinted - (Y) N
|
// Validate IsPrinted - (Y) N
|
||||||
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
||||||
|
@ -195,7 +195,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE IsPrinted IS NULL OR IsPrinted NOT IN ('Y','N')")
|
.append("WHERE IsPrinted IS NULL OR IsPrinted NOT IN ('Y','N')")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set IsPrinted Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set IsPrinted Default=" + no);
|
||||||
|
|
||||||
// Validate Line Type - (S) C
|
// Validate Line Type - (S) C
|
||||||
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
||||||
|
@ -203,7 +203,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE LineType IS NULL OR LineType NOT IN ('S','C')")
|
.append("WHERE LineType IS NULL OR LineType NOT IN ('S','C')")
|
||||||
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
.append(" AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set LineType Default=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set LineType Default=" + no);
|
||||||
|
|
||||||
// Validate Optional Calculation Type - A P R S
|
// Validate Optional Calculation Type - A P R S
|
||||||
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
sql = new StringBuilder ("UPDATE I_ReportLine ")
|
||||||
|
@ -252,7 +252,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE PA_ReportLine_ID IS NULL AND PA_ReportLineSet_ID IS NOT NULL")
|
.append("WHERE PA_ReportLine_ID IS NULL AND PA_ReportLineSet_ID IS NOT NULL")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PA_ReportLine_ID=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PA_ReportLine_ID=" + no);
|
||||||
|
|
||||||
commitEx();
|
commitEx();
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ public class ImportReportLine extends SvrProcess
|
||||||
.append("WHERE PA_ReportLine_ID IS NULL AND PA_ReportLineSet_ID IS NOT NULL")
|
.append("WHERE PA_ReportLine_ID IS NULL AND PA_ReportLineSet_ID IS NOT NULL")
|
||||||
.append(" AND I_IsImported='N'").append(clientCheck);
|
.append(" AND I_IsImported='N'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set PA_ReportLine_ID=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set PA_ReportLine_ID=" + no);
|
||||||
|
|
||||||
// **** Update ReportLine
|
// **** Update ReportLine
|
||||||
sql = new StringBuilder ("UPDATE PA_ReportLine r ")
|
sql = new StringBuilder ("UPDATE PA_ReportLine r ")
|
||||||
|
|
|
@ -224,7 +224,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
&& (m_shipment.getC_BPartner_Location_ID() != order.getC_BPartner_Location_ID()
|
&& (m_shipment.getC_BPartner_Location_ID() != order.getC_BPartner_Location_ID()
|
||||||
|| m_shipment.getM_Shipper_ID() != order.getM_Shipper_ID() )))
|
|| m_shipment.getM_Shipper_ID() != order.getM_Shipper_ID() )))
|
||||||
completeShipment();
|
completeShipment();
|
||||||
log.fine("check: " + order + " - DeliveryRule=" + order.getDeliveryRule());
|
if (log.isLoggable(Level.FINE)) log.fine("check: " + order + " - DeliveryRule=" + order.getDeliveryRule());
|
||||||
//
|
//
|
||||||
Timestamp minGuaranteeDate = m_movementDate;
|
Timestamp minGuaranteeDate = m_movementDate;
|
||||||
boolean completeOrder = MOrder.DELIVERYRULE_CompleteOrder.equals(order.getDeliveryRule());
|
boolean completeOrder = MOrder.DELIVERYRULE_CompleteOrder.equals(order.getDeliveryRule());
|
||||||
|
@ -251,7 +251,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
MOrderLine line = lines[i];
|
MOrderLine line = lines[i];
|
||||||
if (line.getM_Warehouse_ID() != p_M_Warehouse_ID)
|
if (line.getM_Warehouse_ID() != p_M_Warehouse_ID)
|
||||||
continue;
|
continue;
|
||||||
log.fine("check: " + line);
|
if (log.isLoggable(Level.FINE)) log.fine("check: " + line);
|
||||||
BigDecimal onHand = Env.ZERO;
|
BigDecimal onHand = Env.ZERO;
|
||||||
BigDecimal toDeliver = line.getQtyOrdered()
|
BigDecimal toDeliver = line.getQtyOrdered()
|
||||||
.subtract(line.getQtyDelivered());
|
.subtract(line.getQtyDelivered());
|
||||||
|
@ -284,7 +284,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
}
|
}
|
||||||
// Adjust On Hand
|
// Adjust On Hand
|
||||||
onHand = onHand.subtract(unconfirmedShippedQty);
|
onHand = onHand.subtract(unconfirmedShippedQty);
|
||||||
log.fine(logInfo.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(logInfo.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comments & lines w/o product & services
|
// Comments & lines w/o product & services
|
||||||
|
@ -315,7 +315,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
// Complete Order
|
// Complete Order
|
||||||
if (completeOrder && !fullLine)
|
if (completeOrder && !fullLine)
|
||||||
{
|
{
|
||||||
log.fine("Failed CompleteOrder - OnHand=" + onHand
|
if (log.isLoggable(Level.FINE)) log.fine("Failed CompleteOrder - OnHand=" + onHand
|
||||||
+ " (Unconfirmed=" + unconfirmedShippedQty
|
+ " (Unconfirmed=" + unconfirmedShippedQty
|
||||||
+ "), ToDeliver=" + toDeliver + " - " + line);
|
+ "), ToDeliver=" + toDeliver + " - " + line);
|
||||||
completeOrder = false;
|
completeOrder = false;
|
||||||
|
@ -324,7 +324,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
// Complete Line
|
// Complete Line
|
||||||
else if (fullLine && MOrder.DELIVERYRULE_CompleteLine.equals(order.getDeliveryRule()))
|
else if (fullLine && MOrder.DELIVERYRULE_CompleteLine.equals(order.getDeliveryRule()))
|
||||||
{
|
{
|
||||||
log.fine("CompleteLine - OnHand=" + onHand
|
if (log.isLoggable(Level.FINE)) log.fine("CompleteLine - OnHand=" + onHand
|
||||||
+ " (Unconfirmed=" + unconfirmedShippedQty
|
+ " (Unconfirmed=" + unconfirmedShippedQty
|
||||||
+ ", ToDeliver=" + toDeliver + " - " + line);
|
+ ", ToDeliver=" + toDeliver + " - " + line);
|
||||||
//
|
//
|
||||||
|
@ -338,7 +338,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
BigDecimal deliver = toDeliver;
|
BigDecimal deliver = toDeliver;
|
||||||
if (deliver.compareTo(onHand) > 0)
|
if (deliver.compareTo(onHand) > 0)
|
||||||
deliver = onHand;
|
deliver = onHand;
|
||||||
log.fine("Available - OnHand=" + onHand
|
if (log.isLoggable(Level.FINE)) log.fine("Available - OnHand=" + onHand
|
||||||
+ " (Unconfirmed=" + unconfirmedShippedQty
|
+ " (Unconfirmed=" + unconfirmedShippedQty
|
||||||
+ "), ToDeliver=" + toDeliver
|
+ "), ToDeliver=" + toDeliver
|
||||||
+ ", Delivering=" + deliver + " - " + line);
|
+ ", Delivering=" + deliver + " - " + line);
|
||||||
|
@ -349,7 +349,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
else if (MOrder.DELIVERYRULE_Force.equals(order.getDeliveryRule()))
|
else if (MOrder.DELIVERYRULE_Force.equals(order.getDeliveryRule()))
|
||||||
{
|
{
|
||||||
BigDecimal deliver = toDeliver;
|
BigDecimal deliver = toDeliver;
|
||||||
log.fine("Force - OnHand=" + onHand
|
if (log.isLoggable(Level.FINE)) log.fine("Force - OnHand=" + onHand
|
||||||
+ " (Unconfirmed=" + unconfirmedShippedQty
|
+ " (Unconfirmed=" + unconfirmedShippedQty
|
||||||
+ "), ToDeliver=" + toDeliver
|
+ "), ToDeliver=" + toDeliver
|
||||||
+ ", Delivering=" + deliver + " - " + line);
|
+ ", Delivering=" + deliver + " - " + line);
|
||||||
|
@ -358,11 +358,11 @@ public class InOutGenerate extends SvrProcess
|
||||||
}
|
}
|
||||||
// Manual
|
// Manual
|
||||||
else if (MOrder.DELIVERYRULE_Manual.equals(order.getDeliveryRule()))
|
else if (MOrder.DELIVERYRULE_Manual.equals(order.getDeliveryRule()))
|
||||||
log.fine("Manual - OnHand=" + onHand
|
if (log.isLoggable(Level.FINE)) log.fine("Manual - OnHand=" + onHand
|
||||||
+ " (Unconfirmed=" + unconfirmedShippedQty
|
+ " (Unconfirmed=" + unconfirmedShippedQty
|
||||||
+ ") - " + line);
|
+ ") - " + line);
|
||||||
else
|
else
|
||||||
log.fine("Failed: " + order.getDeliveryRule() + " - OnHand=" + onHand
|
if (log.isLoggable(Level.FINE)) log.fine("Failed: " + order.getDeliveryRule() + " - OnHand=" + onHand
|
||||||
+ " (Unconfirmed=" + unconfirmedShippedQty
|
+ " (Unconfirmed=" + unconfirmedShippedQty
|
||||||
+ "), ToDeliver=" + toDeliver + " - " + line);
|
+ "), ToDeliver=" + toDeliver + " - " + line);
|
||||||
} // for all order lines
|
} // for all order lines
|
||||||
|
@ -450,7 +450,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
line.setLine(m_line + orderLine.getLine());
|
line.setLine(m_line + orderLine.getLine());
|
||||||
if (!line.save())
|
if (!line.save())
|
||||||
throw new IllegalStateException("Could not create Shipment Line");
|
throw new IllegalStateException("Could not create Shipment Line");
|
||||||
log.fine(line.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
line.setLine(m_line + orderLine.getLine());
|
line.setLine(m_line + orderLine.getLine());
|
||||||
if (!line.save())
|
if (!line.save())
|
||||||
throw new IllegalStateException("Could not create Shipment Line");
|
throw new IllegalStateException("Could not create Shipment Line");
|
||||||
log.fine("ToDeliver=" + qty + "/" + deliver + " - " + line);
|
if (log.isLoggable(Level.FINE)) log.fine("ToDeliver=" + qty + "/" + deliver + " - " + line);
|
||||||
toDeliver = toDeliver.subtract(deliver);
|
toDeliver = toDeliver.subtract(deliver);
|
||||||
// Temp adjustment, actual update happen in MInOut.completeIt
|
// Temp adjustment, actual update happen in MInOut.completeIt
|
||||||
storage.setQtyOnHand(storage.getQtyOnHand().subtract(deliver));
|
storage.setQtyOnHand(storage.getQtyOnHand().subtract(deliver));
|
||||||
|
|
|
@ -123,13 +123,13 @@ public class InventoryCountCreate extends SvrProcess
|
||||||
.append("(SELECT * FROM M_InventoryLine l WHERE l.M_InventoryLine_ID=ma.M_InventoryLine_ID")
|
.append("(SELECT * FROM M_InventoryLine l WHERE l.M_InventoryLine_ID=ma.M_InventoryLine_ID")
|
||||||
.append(" AND Processed='N' AND M_Inventory_ID=").append(p_M_Inventory_ID).append(")");
|
.append(" AND Processed='N' AND M_Inventory_ID=").append(p_M_Inventory_ID).append(")");
|
||||||
int no1 = DB.executeUpdate(sql1.toString(), get_TrxName());
|
int no1 = DB.executeUpdate(sql1.toString(), get_TrxName());
|
||||||
log.fine("doIt - Deleted MA #" + no1);
|
if (log.isLoggable(Level.FINE)) log.fine("doIt - Deleted MA #" + no1);
|
||||||
//End of Added Line
|
//End of Added Line
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder("DELETE M_InventoryLine WHERE Processed='N' ")
|
StringBuilder sql = new StringBuilder("DELETE M_InventoryLine WHERE Processed='N' ")
|
||||||
.append("AND M_Inventory_ID=").append(p_M_Inventory_ID);
|
.append("AND M_Inventory_ID=").append(p_M_Inventory_ID);
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("doIt - Deleted #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("doIt - Deleted #" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Null Storage records
|
// Create Null Storage records
|
||||||
|
@ -156,7 +156,7 @@ public class InventoryCountCreate extends SvrProcess
|
||||||
.append("WHERE sl.M_Warehouse_ID=l.M_Warehouse_ID")
|
.append("WHERE sl.M_Warehouse_ID=l.M_Warehouse_ID")
|
||||||
.append(" AND s.M_Product_ID=p.M_Product_ID)");
|
.append(" AND s.M_Product_ID=p.M_Product_ID)");
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("'0' Inserted #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("'0' Inserted #" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder("SELECT s.M_Product_ID, s.M_Locator_ID, s.M_AttributeSetInstance_ID,");
|
StringBuilder sql = new StringBuilder("SELECT s.M_Product_ID, s.M_Locator_ID, s.M_AttributeSetInstance_ID,");
|
||||||
|
@ -394,7 +394,7 @@ public class InventoryCountCreate extends SvrProcess
|
||||||
ret.append(",");
|
ret.append(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.fine(ret.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(ret.toString());
|
||||||
StringBuilder msgreturn = new StringBuilder(ret).append(productCategoryId);
|
StringBuilder msgreturn = new StringBuilder(ret).append(productCategoryId);
|
||||||
return msgreturn.toString();
|
return msgreturn.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
package org.compiere.process;
|
package org.compiere.process;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
import org.compiere.model.MClient;
|
import org.compiere.model.MClient;
|
||||||
|
@ -112,7 +113,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append(" INNER JOIN M_CostElement ce ON (c.M_CostElement_ID=ce.M_CostElement_ID AND ce.CostingMethod='S' AND ce.CostElementType='M') ")
|
.append(" INNER JOIN M_CostElement ce ON (c.M_CostElement_ID=ce.M_CostElement_ID AND ce.CostingMethod='S' AND ce.CostElementType='M') ")
|
||||||
.append("WHERE w.M_Warehouse_ID=").append(p_M_Warehouse_ID);
|
.append("WHERE w.M_Warehouse_ID=").append(p_M_Warehouse_ID);
|
||||||
int noInsertStd = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
int noInsertStd = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Inserted Std=" + noInsertStd);
|
if (log.isLoggable(Level.FINE)) log.fine("Inserted Std=" + noInsertStd);
|
||||||
if (noInsertStd == 0)
|
if (noInsertStd == 0)
|
||||||
return "No Standard Costs found";
|
return "No Standard Costs found";
|
||||||
|
|
||||||
|
@ -138,7 +139,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append(" AND iv.M_Product_ID=c.M_Product_ID")
|
.append(" AND iv.M_Product_ID=c.M_Product_ID")
|
||||||
.append(" AND iv.M_AttributeSetInstance_ID=c.M_AttributeSetInstance_ID)");
|
.append(" AND iv.M_AttributeSetInstance_ID=c.M_AttributeSetInstance_ID)");
|
||||||
noInsertCost = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
noInsertCost = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Inserted Cost=" + noInsertCost);
|
if (log.isLoggable(Level.FINE)) log.fine("Inserted Cost=" + noInsertCost);
|
||||||
// Update Std Cost Records
|
// Update Std Cost Records
|
||||||
sql = new StringBuilder ("UPDATE T_InventoryValue iv ")
|
sql = new StringBuilder ("UPDATE T_InventoryValue iv ")
|
||||||
.append("SET (Cost, M_CostElement_ID)=")
|
.append("SET (Cost, M_CostElement_ID)=")
|
||||||
|
@ -156,7 +157,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append("WHERE ivv.AD_PInstance_ID=").append(getAD_PInstance_ID())
|
.append("WHERE ivv.AD_PInstance_ID=").append(getAD_PInstance_ID())
|
||||||
.append(" AND ivv.M_CostElement_ID IS NULL)");
|
.append(" AND ivv.M_CostElement_ID IS NULL)");
|
||||||
int noUpdatedCost = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
int noUpdatedCost = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Updated Cost=" + noUpdatedCost);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated Cost=" + noUpdatedCost);
|
||||||
}
|
}
|
||||||
if ((noInsertStd+noInsertCost) == 0)
|
if ((noInsertStd+noInsertCost) == 0)
|
||||||
return "No Costs found";
|
return "No Costs found";
|
||||||
|
@ -171,7 +172,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append("C_Currency_ID=").append(p_C_Currency_ID)
|
.append("C_Currency_ID=").append(p_C_Currency_ID)
|
||||||
.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Constants=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Constants=" + no);
|
||||||
|
|
||||||
// Get current QtyOnHand with ASI
|
// Get current QtyOnHand with ASI
|
||||||
sql = new StringBuilder ("UPDATE T_InventoryValue iv SET QtyOnHand = ")
|
sql = new StringBuilder ("UPDATE T_InventoryValue iv SET QtyOnHand = ")
|
||||||
|
@ -183,7 +184,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append("WHERE AD_PInstance_ID=").append(getAD_PInstance_ID())
|
.append("WHERE AD_PInstance_ID=").append(getAD_PInstance_ID())
|
||||||
.append(" AND iv.M_AttributeSetInstance_ID<>0");
|
.append(" AND iv.M_AttributeSetInstance_ID<>0");
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("QtHand with ASI=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("QtHand with ASI=" + no);
|
||||||
// Get current QtyOnHand without ASI
|
// Get current QtyOnHand without ASI
|
||||||
sql = new StringBuilder ("UPDATE T_InventoryValue iv SET QtyOnHand = ")
|
sql = new StringBuilder ("UPDATE T_InventoryValue iv SET QtyOnHand = ")
|
||||||
.append("(SELECT SUM(QtyOnHand) FROM M_StorageOnHand s")
|
.append("(SELECT SUM(QtyOnHand) FROM M_StorageOnHand s")
|
||||||
|
@ -193,7 +194,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append("WHERE iv.AD_PInstance_ID=").append(getAD_PInstance_ID())
|
.append("WHERE iv.AD_PInstance_ID=").append(getAD_PInstance_ID())
|
||||||
.append(" AND iv.M_AttributeSetInstance_ID=0");
|
.append(" AND iv.M_AttributeSetInstance_ID=0");
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("QtHand w/o ASI=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("QtHand w/o ASI=" + no);
|
||||||
|
|
||||||
// Adjust for Valuation Date
|
// Adjust for Valuation Date
|
||||||
sql = new StringBuilder("UPDATE T_InventoryValue iv ")
|
sql = new StringBuilder("UPDATE T_InventoryValue iv ")
|
||||||
|
@ -208,7 +209,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append("WHERE iv.M_AttributeSetInstance_ID<>0" )
|
.append("WHERE iv.M_AttributeSetInstance_ID<>0" )
|
||||||
.append(" AND iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
|
.append(" AND iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Update with ASI=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update with ASI=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuilder("UPDATE T_InventoryValue iv ")
|
sql = new StringBuilder("UPDATE T_InventoryValue iv ")
|
||||||
.append("SET QtyOnHand=")
|
.append("SET QtyOnHand=")
|
||||||
|
@ -222,13 +223,13 @@ public class InventoryValue extends SvrProcess
|
||||||
.append("AND iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
|
.append("AND iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
|
|
||||||
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
log.fine("Update w/o ASI=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update w/o ASI=" + no);
|
||||||
|
|
||||||
// Delete Records w/o OnHand Qty
|
// Delete Records w/o OnHand Qty
|
||||||
sql = new StringBuilder("DELETE T_InventoryValue ")
|
sql = new StringBuilder("DELETE T_InventoryValue ")
|
||||||
.append("WHERE (QtyOnHand=0 OR QtyOnHand IS NULL) AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
.append("WHERE (QtyOnHand=0 OR QtyOnHand IS NULL) AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
int noQty = DB.executeUpdateEx (sql.toString(), get_TrxName());
|
int noQty = DB.executeUpdateEx (sql.toString(), get_TrxName());
|
||||||
log.fine("NoQty Deleted=" + noQty);
|
if (log.isLoggable(Level.FINE)) log.fine("NoQty Deleted=" + noQty);
|
||||||
|
|
||||||
// Update Prices
|
// Update Prices
|
||||||
sql = new StringBuilder("UPDATE T_InventoryValue iv ")
|
sql = new StringBuilder("UPDATE T_InventoryValue iv ")
|
||||||
|
@ -273,7 +274,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append("FROM C_AcctSchema acs WHERE acs.C_AcctSchema_ID=").append(as.getC_AcctSchema_ID()).append(") ")
|
.append("FROM C_AcctSchema acs WHERE acs.C_AcctSchema_ID=").append(as.getC_AcctSchema_ID()).append(") ")
|
||||||
.append("WHERE iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
|
.append("WHERE iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdateEx (sql.toString(), get_TrxName());
|
no = DB.executeUpdateEx (sql.toString(), get_TrxName());
|
||||||
log.fine("Converted=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Converted=" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Values
|
// Update Values
|
||||||
|
@ -287,7 +288,7 @@ public class InventoryValue extends SvrProcess
|
||||||
.append("WHERE AD_PInstance_ID=").append(getAD_PInstance_ID()
|
.append("WHERE AD_PInstance_ID=").append(getAD_PInstance_ID()
|
||||||
);
|
);
|
||||||
no = DB.executeUpdateEx(dbeux.toString(), get_TrxName());
|
no = DB.executeUpdateEx(dbeux.toString(), get_TrxName());
|
||||||
log.fine("Calculation=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Calculation=" + no);
|
||||||
//
|
//
|
||||||
return msg;
|
return msg;
|
||||||
} // doIt
|
} // doIt
|
||||||
|
|
|
@ -269,7 +269,7 @@ public class InvoiceGenerate extends SvrProcess
|
||||||
// Complete Order
|
// Complete Order
|
||||||
if (completeOrder && !fullyDelivered)
|
if (completeOrder && !fullyDelivered)
|
||||||
{
|
{
|
||||||
log.fine("Failed CompleteOrder - " + oLine);
|
if (log.isLoggable(Level.FINE)) log.fine("Failed CompleteOrder - " + oLine);
|
||||||
addLog(0, null, null,"Failed CompleteOrder - " + oLine,oLine.get_Table_ID(),oLine.getC_OrderLine_ID()); // Elaine 2008/11/25
|
addLog(0, null, null,"Failed CompleteOrder - " + oLine,oLine.get_Table_ID(),oLine.getC_OrderLine_ID()); // Elaine 2008/11/25
|
||||||
completeOrder = false;
|
completeOrder = false;
|
||||||
break;
|
break;
|
||||||
|
@ -277,7 +277,7 @@ public class InvoiceGenerate extends SvrProcess
|
||||||
// Immediate
|
// Immediate
|
||||||
else if (MOrder.INVOICERULE_Immediate.equals(order.getInvoiceRule()))
|
else if (MOrder.INVOICERULE_Immediate.equals(order.getInvoiceRule()))
|
||||||
{
|
{
|
||||||
log.fine("Immediate - ToInvoice=" + toInvoice + " - " + oLine);
|
if (log.isLoggable(Level.FINE)) log.fine("Immediate - ToInvoice=" + toInvoice + " - " + oLine);
|
||||||
BigDecimal qtyEntered = toInvoice;
|
BigDecimal qtyEntered = toInvoice;
|
||||||
// Correct UOM for QtyEntered
|
// Correct UOM for QtyEntered
|
||||||
if (oLine.getQtyEntered().compareTo(oLine.getQtyOrdered()) != 0)
|
if (oLine.getQtyEntered().compareTo(oLine.getQtyOrdered()) != 0)
|
||||||
|
@ -288,7 +288,7 @@ public class InvoiceGenerate extends SvrProcess
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log.fine("Failed: " + order.getInvoiceRule()
|
if (log.isLoggable(Level.FINE)) log.fine("Failed: " + order.getInvoiceRule()
|
||||||
+ " - ToInvoice=" + toInvoice + " - " + oLine);
|
+ " - ToInvoice=" + toInvoice + " - " + oLine);
|
||||||
addLog(0, null, null,"Failed: " + order.getInvoiceRule()
|
addLog(0, null, null,"Failed: " + order.getInvoiceRule()
|
||||||
+ " - ToInvoice=" + toInvoice + " - " + oLine,oLine.get_Table_ID(),oLine.getC_OrderLine_ID());
|
+ " - ToInvoice=" + toInvoice + " - " + oLine,oLine.get_Table_ID(),oLine.getC_OrderLine_ID());
|
||||||
|
@ -363,7 +363,7 @@ public class InvoiceGenerate extends SvrProcess
|
||||||
line.setLine(m_line + orderLine.getLine());
|
line.setLine(m_line + orderLine.getLine());
|
||||||
if (!line.save())
|
if (!line.save())
|
||||||
throw new IllegalStateException("Could not create Invoice Line (o)");
|
throw new IllegalStateException("Could not create Invoice Line (o)");
|
||||||
log.fine(line.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
|
||||||
} // createLine
|
} // createLine
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -436,7 +436,7 @@ public class InvoiceGenerate extends SvrProcess
|
||||||
if (!sLine.save())
|
if (!sLine.save())
|
||||||
throw new IllegalStateException("Could not update Shipment Line");
|
throw new IllegalStateException("Could not update Shipment Line");
|
||||||
|
|
||||||
log.fine(line.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
|
||||||
} // createLine
|
} // createLine
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -210,7 +210,7 @@ public class InvoicePrint extends SvrProcess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sql.append(" ORDER BY i.C_Invoice_ID, pf.AD_Org_ID DESC"); // more than 1 PF record
|
sql.append(" ORDER BY i.C_Invoice_ID, pf.AD_Org_ID DESC"); // more than 1 PF record
|
||||||
log.fine(sql.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(sql.toString());
|
||||||
|
|
||||||
MPrintFormat format = null;
|
MPrintFormat format = null;
|
||||||
int old_AD_PrintFormat_ID = -1;
|
int old_AD_PrintFormat_ID = -1;
|
||||||
|
@ -313,7 +313,7 @@ public class InvoicePrint extends SvrProcess
|
||||||
if (!Ini.isClient())
|
if (!Ini.isClient())
|
||||||
invoice = new File(MInvoice.getPDFFileName(documentDir, C_Invoice_ID));
|
invoice = new File(MInvoice.getPDFFileName(documentDir, C_Invoice_ID));
|
||||||
File attachment = re.getPDF(invoice);
|
File attachment = re.getPDF(invoice);
|
||||||
log.fine(to + " - " + attachment);
|
if (log.isLoggable(Level.FINE)) log.fine(to + " - " + attachment);
|
||||||
email.addAttachment(attachment);
|
email.addAttachment(attachment);
|
||||||
//
|
//
|
||||||
String msg = email.send();
|
String msg = email.send();
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
"Update The PriceList to zero of M_Product_PO WHERE PriceList IS NULL",
|
"Update The PriceList to zero of M_Product_PO WHERE PriceList IS NULL",
|
||||||
sqlupd.toString());
|
sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
|
|
||||||
sqlupd = new StringBuilder("UPDATE M_Product_PO SET PriceLastPO = 0 ");
|
sqlupd = new StringBuilder("UPDATE M_Product_PO SET PriceLastPO = 0 ");
|
||||||
sqlupd.append(" WHERE PriceLastPO IS NULL ");
|
sqlupd.append(" WHERE PriceLastPO IS NULL ");
|
||||||
|
@ -119,7 +119,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
"Update The PriceListPO to zero of M_Product_PO WHERE PriceLastPO IS NULL",
|
"Update The PriceListPO to zero of M_Product_PO WHERE PriceLastPO IS NULL",
|
||||||
sqlupd.toString());
|
sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
|
|
||||||
sqlupd = new StringBuilder("UPDATE M_Product_PO SET PricePO = PriceLastPO ");
|
sqlupd = new StringBuilder("UPDATE M_Product_PO SET PricePO = PriceLastPO ");
|
||||||
sqlupd.append(" WHERE (PricePO IS NULL OR PricePO = 0) AND PriceLastPO <> 0 ");
|
sqlupd.append(" WHERE (PricePO IS NULL OR PricePO = 0) AND PriceLastPO <> 0 ");
|
||||||
|
@ -130,7 +130,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
"Update The PricePO to PriceLastPO of M_Product_PO WHERE (PricePO IS NULL OR PricePO = 0) AND PriceLastPO <> 0 ",
|
"Update The PricePO to PriceLastPO of M_Product_PO WHERE (PricePO IS NULL OR PricePO = 0) AND PriceLastPO <> 0 ",
|
||||||
sqlupd.toString());
|
sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
|
|
||||||
sqlupd = new StringBuilder("UPDATE M_Product_PO SET PricePO = 0 ");
|
sqlupd = new StringBuilder("UPDATE M_Product_PO SET PricePO = 0 ");
|
||||||
sqlupd.append(" WHERE PricePO IS NULL ");
|
sqlupd.append(" WHERE PricePO IS NULL ");
|
||||||
|
@ -141,7 +141,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
"Update The PricePO to Zero of M_Product_PO WHERE PricePO IS NULL",
|
"Update The PricePO to Zero of M_Product_PO WHERE PricePO IS NULL",
|
||||||
sqlupd.toString());
|
sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
//
|
//
|
||||||
// Set default current vendor
|
// Set default current vendor
|
||||||
//
|
//
|
||||||
|
@ -155,7 +155,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
if (cntu == -1)
|
if (cntu == -1)
|
||||||
raiseError("Update IsCurrentVendor to Y of M_Product_PO ", sqlupd.toString());
|
raiseError("Update IsCurrentVendor to Y of M_Product_PO ", sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
|
|
||||||
// let the commit for SvrProcess
|
// let the commit for SvrProcess
|
||||||
// DB.commit(true, get_TrxName());
|
// DB.commit(true, get_TrxName());
|
||||||
|
@ -206,7 +206,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
"Update IsCurrentVendor to N of M_Product_PO for a M_Product_ID and C_BPartner_ID ingresed",
|
"Update IsCurrentVendor to N of M_Product_PO for a M_Product_ID and C_BPartner_ID ingresed",
|
||||||
sqlupd.toString());
|
sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
@ -232,7 +232,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
raiseError(" DELETE M_ProductPrice ", sqldel.toString());
|
raiseError(" DELETE M_ProductPrice ", sqldel.toString());
|
||||||
totd += cntd;
|
totd += cntd;
|
||||||
message = new StringBuilder("@Deleted@=").append(cntd).append(" - ");
|
message = new StringBuilder("@Deleted@=").append(cntd).append(" - ");
|
||||||
log.fine("Deleted " + cntd);
|
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Get PriceList Info
|
// Get PriceList Info
|
||||||
|
@ -284,7 +284,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
if (cntd == -1)
|
if (cntd == -1)
|
||||||
raiseError(" DELETE T_Selection ", sqldel.toString());
|
raiseError(" DELETE T_Selection ", sqldel.toString());
|
||||||
totd += cntd;
|
totd += cntd;
|
||||||
log.fine("Deleted " + cntd);
|
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
|
||||||
//
|
//
|
||||||
//Create Selection in temporary table
|
//Create Selection in temporary table
|
||||||
//
|
//
|
||||||
|
@ -332,7 +332,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
if (cnti == -1)
|
if (cnti == -1)
|
||||||
raiseError(" INSERT INTO T_Selection ", sqlins.toString());
|
raiseError(" INSERT INTO T_Selection ", sqlins.toString());
|
||||||
toti += cnti;
|
toti += cnti;
|
||||||
log.fine("Inserted " + cnti);
|
if (log.isLoggable(Level.FINE)) log.fine("Inserted " + cnti);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
|
@ -382,7 +382,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
" INSERT INTO T_Selection from existing PriceList",
|
" INSERT INTO T_Selection from existing PriceList",
|
||||||
sqlins.toString());
|
sqlins.toString());
|
||||||
toti += cnti;
|
toti += cnti;
|
||||||
log.fine("Inserted " + cnti);
|
if (log.isLoggable(Level.FINE)) log.fine("Inserted " + cnti);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
raiseError(" DELETE M_ProductPrice ", sqldel.toString());
|
raiseError(" DELETE M_ProductPrice ", sqldel.toString());
|
||||||
totd += cntd;
|
totd += cntd;
|
||||||
message.append(", @Deleted@=").append(cntd);
|
message.append(", @Deleted@=").append(cntd);
|
||||||
log.fine("Deleted " + cntd);
|
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -499,7 +499,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
" INSERT INTO T_Selection from existing PriceList",
|
" INSERT INTO T_Selection from existing PriceList",
|
||||||
sqlins.toString());
|
sqlins.toString());
|
||||||
toti += cnti;
|
toti += cnti;
|
||||||
log.fine("Inserted " + cnti);
|
if (log.isLoggable(Level.FINE)) log.fine("Inserted " + cnti);
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
//Copy and Convert from other PriceList_Version
|
//Copy and Convert from other PriceList_Version
|
||||||
|
@ -572,7 +572,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
" INSERT INTO T_Selection from existing PriceList",
|
" INSERT INTO T_Selection from existing PriceList",
|
||||||
sqlins.toString());
|
sqlins.toString());
|
||||||
toti += cnti;
|
toti += cnti;
|
||||||
log.fine("Inserted " + cnti);
|
if (log.isLoggable(Level.FINE)) log.fine("Inserted " + cnti);
|
||||||
|
|
||||||
}
|
}
|
||||||
message.append(", @Inserted@=").append(cnti);
|
message.append(", @Inserted@=").append(cnti);
|
||||||
|
@ -612,7 +612,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
if (cntu == -1)
|
if (cntu == -1)
|
||||||
raiseError("Update M_ProductPrice ", sqlupd.toString());
|
raiseError("Update M_ProductPrice ", sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
|
|
||||||
//
|
//
|
||||||
//Rounding (AD_Reference_ID=155)
|
//Rounding (AD_Reference_ID=155)
|
||||||
|
@ -665,7 +665,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
if (cntu == -1)
|
if (cntu == -1)
|
||||||
raiseError("Update M_ProductPrice ", sqlupd.toString());
|
raiseError("Update M_ProductPrice ", sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
|
|
||||||
message.append(", @Updated@=").append(cntu);
|
message.append(", @Updated@=").append(cntu);
|
||||||
//
|
//
|
||||||
|
@ -691,7 +691,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
if (cntu == -1)
|
if (cntu == -1)
|
||||||
raiseError("Update M_ProductPrice ", sqlupd.toString());
|
raiseError("Update M_ProductPrice ", sqlupd.toString());
|
||||||
totu += cntu;
|
totu += cntu;
|
||||||
log.fine("Updated " + cntu);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
|
||||||
|
|
||||||
v_NextNo = v_NextNo + 1;
|
v_NextNo = v_NextNo + 1;
|
||||||
addLog(0, null, null, message.toString());
|
addLog(0, null, null, message.toString());
|
||||||
|
@ -705,7 +705,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
if (cntd == -1)
|
if (cntd == -1)
|
||||||
raiseError(" DELETE T_Selection ", sqldel.toString());
|
raiseError(" DELETE T_Selection ", sqldel.toString());
|
||||||
totd += cntd;
|
totd += cntd;
|
||||||
log.fine("Deleted " + cntd);
|
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
|
||||||
|
|
||||||
//
|
//
|
||||||
//commit;
|
//commit;
|
||||||
|
@ -797,7 +797,7 @@ public class M_PriceList_Create extends SvrProcess {
|
||||||
ret.append(",");
|
ret.append(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.fine(ret.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(ret.toString());
|
||||||
return ret.toString() + productCategoryId;
|
return ret.toString() + productCategoryId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class M_Product_BOM_Check extends SvrProcess
|
||||||
rs = null;
|
rs = null;
|
||||||
pstmt = null;
|
pstmt = null;
|
||||||
}
|
}
|
||||||
log.fine("Count T_Selection =" + countno);
|
if (log.isLoggable(Level.FINE)) log.fine("Count T_Selection =" + countno);
|
||||||
|
|
||||||
if (countno == 0)
|
if (countno == 0)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class OrderPOCreate extends SvrProcess
|
||||||
rs = null; pstmt = null;
|
rs = null; pstmt = null;
|
||||||
}
|
}
|
||||||
if (counter == 0)
|
if (counter == 0)
|
||||||
log.fine(sql.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(sql.toString());
|
||||||
StringBuilder msgreturn = new StringBuilder("@Created@ ").append(counter);
|
StringBuilder msgreturn = new StringBuilder("@Created@ ").append(counter);
|
||||||
return msgreturn.toString();
|
return msgreturn.toString();
|
||||||
} // doIt
|
} // doIt
|
||||||
|
|
|
@ -180,7 +180,7 @@ public class OrgOwnership extends SvrProcess
|
||||||
else
|
else
|
||||||
set.append(" WHERE M_Product_ID=").append(p_M_Product_ID);
|
set.append(" WHERE M_Product_ID=").append(p_M_Product_ID);
|
||||||
set.append(" AND AD_Client_ID=").append(getAD_Client_ID()).append(" AND AD_Org_ID<>").append(p_AD_Org_ID);
|
set.append(" AND AD_Client_ID=").append(getAD_Client_ID()).append(" AND AD_Org_ID<>").append(p_AD_Org_ID);
|
||||||
log.fine("productOwnership - " + set);
|
if (log.isLoggable(Level.FINE)) log.fine("productOwnership - " + set);
|
||||||
|
|
||||||
// Product
|
// Product
|
||||||
StringBuilder sql = new StringBuilder("UPDATE M_Product x ").append(set);
|
StringBuilder sql = new StringBuilder("UPDATE M_Product x ").append(set);
|
||||||
|
@ -225,7 +225,7 @@ public class OrgOwnership extends SvrProcess
|
||||||
else
|
else
|
||||||
set.append(" WHERE C_BPartner_ID=").append(p_C_BPartner_ID);
|
set.append(" WHERE C_BPartner_ID=").append(p_C_BPartner_ID);
|
||||||
set.append(" AND AD_Client_ID=").append(getAD_Client_ID()).append(" AND AD_Org_ID<>").append(p_AD_Org_ID);
|
set.append(" AND AD_Client_ID=").append(getAD_Client_ID()).append(" AND AD_Org_ID<>").append(p_AD_Org_ID);
|
||||||
log.fine("bPartnerOwnership - " + set.toString());
|
if (log.isLoggable(Level.FINE)) log.fine("bPartnerOwnership - " + set.toString());
|
||||||
|
|
||||||
// BPartner
|
// BPartner
|
||||||
StringBuilder sql = new StringBuilder("UPDATE C_BPartner x ").append(set);
|
StringBuilder sql = new StringBuilder("UPDATE C_BPartner x ").append(set);
|
||||||
|
@ -274,31 +274,31 @@ public class OrgOwnership extends SvrProcess
|
||||||
StringBuilder sql = new StringBuilder("UPDATE R_ContactInterest ").append(set);
|
StringBuilder sql = new StringBuilder("UPDATE R_ContactInterest ").append(set);
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("generalOwnership - R_ContactInterest=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - R_ContactInterest=" + no);
|
||||||
|
|
||||||
// AD_User_Roles
|
// AD_User_Roles
|
||||||
sql = new StringBuilder("UPDATE AD_User_Roles ").append(set);
|
sql = new StringBuilder("UPDATE AD_User_Roles ").append(set);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("generalOwnership - AD_User_Roles=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - AD_User_Roles=" + no);
|
||||||
|
|
||||||
// C_BPartner_Product
|
// C_BPartner_Product
|
||||||
sql = new StringBuilder("UPDATE C_BPartner_Product ").append(set);
|
sql = new StringBuilder("UPDATE C_BPartner_Product ").append(set);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("generalOwnership - C_BPartner_Product=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - C_BPartner_Product=" + no);
|
||||||
|
|
||||||
// Withholding
|
// Withholding
|
||||||
sql = new StringBuilder("UPDATE C_BP_Withholding x ").append(set);
|
sql = new StringBuilder("UPDATE C_BP_Withholding x ").append(set);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("generalOwnership - C_BP_Withholding=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - C_BP_Withholding=" + no);
|
||||||
|
|
||||||
// Replenish
|
// Replenish
|
||||||
sql = new StringBuilder("UPDATE M_Replenish ").append(set);
|
sql = new StringBuilder("UPDATE M_Replenish ").append(set);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("generalOwnership - M_Replenish=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - M_Replenish=" + no);
|
||||||
|
|
||||||
} // generalOwnership
|
} // generalOwnership
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class RegisterSystem extends SvrProcess
|
||||||
.append("&NumInvoice=").append(URLEncoder.encode(String.valueOf(
|
.append("&NumInvoice=").append(URLEncoder.encode(String.valueOf(
|
||||||
DB.getSQLValue(null, "SELECT Count(*) FROM C_Invoice")), enc));
|
DB.getSQLValue(null, "SELECT Count(*) FROM C_Invoice")), enc));
|
||||||
}
|
}
|
||||||
log.fine(urlString.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(urlString.toString());
|
||||||
|
|
||||||
// Send it
|
// Send it
|
||||||
URL url = new URL (urlString.toString());
|
URL url = new URL (urlString.toString());
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
.append("WHERE Level_Max < Level_Min");
|
.append("WHERE Level_Max < Level_Min");
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected Max_Level=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected Max_Level=" + no);
|
||||||
|
|
||||||
// Minimum Order should be 1
|
// Minimum Order should be 1
|
||||||
sql = new StringBuilder("UPDATE M_Product_PO")
|
sql = new StringBuilder("UPDATE M_Product_PO")
|
||||||
|
@ -152,7 +152,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
.append("WHERE Order_Min IS NULL OR Order_Min < 1");
|
.append("WHERE Order_Min IS NULL OR Order_Min < 1");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected Order Min=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected Order Min=" + no);
|
||||||
|
|
||||||
// Pack should be 1
|
// Pack should be 1
|
||||||
sql = new StringBuilder("UPDATE M_Product_PO")
|
sql = new StringBuilder("UPDATE M_Product_PO")
|
||||||
|
@ -160,7 +160,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
.append("WHERE Order_Pack IS NULL OR Order_Pack < 1");
|
.append("WHERE Order_Pack IS NULL OR Order_Pack < 1");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected Order Pack=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected Order Pack=" + no);
|
||||||
|
|
||||||
// Set Current Vendor where only one vendor
|
// Set Current Vendor where only one vendor
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
.append("HAVING COUNT(*) = 1)");
|
.append("HAVING COUNT(*) = 1)");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected CurrentVendor(Y)=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected CurrentVendor(Y)=" + no);
|
||||||
|
|
||||||
// More then one current vendor
|
// More then one current vendor
|
||||||
sql = new StringBuilder("UPDATE M_Product_PO p")
|
sql = new StringBuilder("UPDATE M_Product_PO p")
|
||||||
|
@ -185,13 +185,13 @@ public class ReplenishReport extends SvrProcess
|
||||||
.append("HAVING COUNT(*) > 1)");
|
.append("HAVING COUNT(*) > 1)");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected CurrentVendor(N)=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected CurrentVendor(N)=" + no);
|
||||||
|
|
||||||
// Just to be sure
|
// Just to be sure
|
||||||
sql = new StringBuilder("DELETE T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql = new StringBuilder("DELETE T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Delete Existing Temp=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Existing Temp=" + no);
|
||||||
} // prepareTable
|
} // prepareTable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -223,7 +223,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" AND po.C_BPartner_ID=").append(p_C_BPartner_ID);
|
sql.append(" AND po.C_BPartner_ID=").append(p_C_BPartner_ID);
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (log.isLoggable(Level.FINEST)) log.finest(sql.toString());
|
if (log.isLoggable(Level.FINEST)) log.finest(sql.toString());
|
||||||
log.fine("Insert (1) #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Insert (1) #" + no);
|
||||||
|
|
||||||
if (p_C_BPartner_ID == 0)
|
if (p_C_BPartner_ID == 0)
|
||||||
{
|
{
|
||||||
|
@ -246,7 +246,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append("WHERE r.M_Product_ID=t.M_Product_ID");
|
sql.append("WHERE r.M_Product_ID=t.M_Product_ID");
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID()).append(")");
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID()).append(")");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Insert (BP) #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Insert (BP) #" + no);
|
||||||
}
|
}
|
||||||
sql = new StringBuilder("UPDATE T_Replenish t SET ");
|
sql = new StringBuilder("UPDATE T_Replenish t SET ");
|
||||||
sql.append("QtyOnHand = (SELECT COALESCE(SUM(QtyOnHand),0) FROM M_StorageOnHand s, M_Locator l WHERE t.M_Product_ID=s.M_Product_ID");
|
sql.append("QtyOnHand = (SELECT COALESCE(SUM(QtyOnHand),0) FROM M_StorageOnHand s, M_Locator l WHERE t.M_Product_ID=s.M_Product_ID");
|
||||||
|
@ -260,7 +260,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Update #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update #" + no);
|
||||||
|
|
||||||
// Delete inactive products and replenishments
|
// Delete inactive products and replenishments
|
||||||
sql = new StringBuilder("DELETE T_Replenish r ");
|
sql = new StringBuilder("DELETE T_Replenish r ");
|
||||||
|
@ -272,7 +272,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Delete Inactive=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Inactive=" + no);
|
||||||
|
|
||||||
// Ensure Data consistency
|
// Ensure Data consistency
|
||||||
sql = new StringBuilder("UPDATE T_Replenish SET QtyOnHand = 0 WHERE QtyOnHand IS NULL");
|
sql = new StringBuilder("UPDATE T_Replenish SET QtyOnHand = 0 WHERE QtyOnHand IS NULL");
|
||||||
|
@ -292,7 +292,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Update Type-1=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update Type-1=" + no);
|
||||||
//
|
//
|
||||||
// X_M_Replenish.REPLENISHTYPE_MaintainMaximumLevel
|
// X_M_Replenish.REPLENISHTYPE_MaintainMaximumLevel
|
||||||
sql = new StringBuilder("UPDATE T_Replenish");
|
sql = new StringBuilder("UPDATE T_Replenish");
|
||||||
|
@ -301,7 +301,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Update Type-2=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update Type-2=" + no);
|
||||||
|
|
||||||
|
|
||||||
// Minimum Order Quantity
|
// Minimum Order Quantity
|
||||||
|
@ -312,7 +312,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set MinOrderQty=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set MinOrderQty=" + no);
|
||||||
|
|
||||||
// Even dividable by Pack
|
// Even dividable by Pack
|
||||||
sql = new StringBuilder("UPDATE T_Replenish");
|
sql = new StringBuilder("UPDATE T_Replenish");
|
||||||
|
@ -322,7 +322,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set OrderPackQty=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set OrderPackQty=" + no);
|
||||||
|
|
||||||
// Source from other warehouse
|
// Source from other warehouse
|
||||||
if (wh.getM_WarehouseSource_ID() != 0)
|
if (wh.getM_WarehouseSource_ID() != 0)
|
||||||
|
@ -332,7 +332,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set Source Warehouse=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Source Warehouse=" + no);
|
||||||
}
|
}
|
||||||
// Check Source Warehouse
|
// Check Source Warehouse
|
||||||
sql = new StringBuilder("UPDATE T_Replenish");
|
sql = new StringBuilder("UPDATE T_Replenish");
|
||||||
|
@ -341,7 +341,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set same Source Warehouse=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set same Source Warehouse=" + no);
|
||||||
|
|
||||||
// Custom Replenishment
|
// Custom Replenishment
|
||||||
String className = wh.getReplenishmentClass();
|
String className = wh.getReplenishmentClass();
|
||||||
|
@ -388,7 +388,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Delete No QtyToOrder=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete No QtyToOrder=" + no);
|
||||||
} // fillTable
|
} // fillTable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -424,7 +424,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
order.setM_Warehouse_ID(wh.getM_Warehouse_ID());
|
order.setM_Warehouse_ID(wh.getM_Warehouse_ID());
|
||||||
if (!order.save())
|
if (!order.save())
|
||||||
return;
|
return;
|
||||||
log.fine(order.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(order.toString());
|
||||||
noOrders++;
|
noOrders++;
|
||||||
info.append(" - ");
|
info.append(" - ");
|
||||||
info.append(order.getDocumentNo());
|
info.append(order.getDocumentNo());
|
||||||
|
@ -468,7 +468,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
requisition.setM_Warehouse_ID(wh.getM_Warehouse_ID());
|
requisition.setM_Warehouse_ID(wh.getM_Warehouse_ID());
|
||||||
if (!requisition.save())
|
if (!requisition.save())
|
||||||
return;
|
return;
|
||||||
log.fine(requisition.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(requisition.toString());
|
||||||
noReqs++;
|
noReqs++;
|
||||||
info.append(" - ");
|
info.append(" - ");
|
||||||
info.append(requisition.getDocumentNo());
|
info.append(requisition.getDocumentNo());
|
||||||
|
@ -525,7 +525,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
move.setAD_Org_ID(whSource.getAD_Org_ID());
|
move.setAD_Org_ID(whSource.getAD_Org_ID());
|
||||||
if (!move.save())
|
if (!move.save())
|
||||||
return;
|
return;
|
||||||
log.fine(move.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(move.toString());
|
||||||
noMoves++;
|
noMoves++;
|
||||||
info.append(" - ").append(move.getDocumentNo());
|
info.append(" - ").append(move.getDocumentNo());
|
||||||
}
|
}
|
||||||
|
@ -648,7 +648,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
|
|
||||||
if (!order.save())
|
if (!order.save())
|
||||||
return;
|
return;
|
||||||
log.fine(order.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(order.toString());
|
||||||
noMoves++;
|
noMoves++;
|
||||||
info.append(" - ").append(order.getDocumentNo());
|
info.append(" - ").append(order.getDocumentNo());
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
.append("WHERE Level_Max < Level_Min");
|
.append("WHERE Level_Max < Level_Min");
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected Max_Level=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected Max_Level=" + no);
|
||||||
|
|
||||||
// Minimum Order should be 1
|
// Minimum Order should be 1
|
||||||
sql = new StringBuilder("UPDATE M_Product_PO")
|
sql = new StringBuilder("UPDATE M_Product_PO")
|
||||||
|
@ -163,7 +163,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
.append("WHERE Order_Min IS NULL OR Order_Min < 1");
|
.append("WHERE Order_Min IS NULL OR Order_Min < 1");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected Order Min=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected Order Min=" + no);
|
||||||
|
|
||||||
// Pack should be 1
|
// Pack should be 1
|
||||||
sql = new StringBuilder("UPDATE M_Product_PO")
|
sql = new StringBuilder("UPDATE M_Product_PO")
|
||||||
|
@ -171,7 +171,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
.append("WHERE Order_Pack IS NULL OR Order_Pack < 1");
|
.append("WHERE Order_Pack IS NULL OR Order_Pack < 1");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected Order Pack=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected Order Pack=" + no);
|
||||||
|
|
||||||
// Set Current Vendor where only one vendor
|
// Set Current Vendor where only one vendor
|
||||||
sql = new StringBuilder("UPDATE M_Product_PO p")
|
sql = new StringBuilder("UPDATE M_Product_PO p")
|
||||||
|
@ -183,7 +183,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
.append("HAVING COUNT(*) = 1)");
|
.append("HAVING COUNT(*) = 1)");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected CurrentVendor(Y)=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected CurrentVendor(Y)=" + no);
|
||||||
|
|
||||||
// More then one current vendor
|
// More then one current vendor
|
||||||
sql = new StringBuilder("UPDATE M_Product_PO p")
|
sql = new StringBuilder("UPDATE M_Product_PO p")
|
||||||
|
@ -195,13 +195,13 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
.append("HAVING COUNT(*) > 1)");
|
.append("HAVING COUNT(*) > 1)");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Corrected CurrentVendor(N)=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Corrected CurrentVendor(N)=" + no);
|
||||||
|
|
||||||
// Just to be sure
|
// Just to be sure
|
||||||
sql = new StringBuilder("DELETE T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql = new StringBuilder("DELETE T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Delete Existing Temp=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Existing Temp=" + no);
|
||||||
} // prepareTable
|
} // prepareTable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -237,7 +237,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" AND p.IsKanban = '").append(isKanban).append("' ");
|
sql.append(" AND p.IsKanban = '").append(isKanban).append("' ");
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (log.isLoggable(Level.FINEST)) log.finest(sql.toString());
|
if (log.isLoggable(Level.FINEST)) log.finest(sql.toString());
|
||||||
log.fine("Insert (1) #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Insert (1) #" + no);
|
||||||
|
|
||||||
if (p_C_BPartner_ID == 0)
|
if (p_C_BPartner_ID == 0)
|
||||||
{
|
{
|
||||||
|
@ -265,7 +265,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
if ( isKanban != null )
|
if ( isKanban != null )
|
||||||
sql.append(" AND p.IsKanban = '").append(isKanban).append("' ");
|
sql.append(" AND p.IsKanban = '").append(isKanban).append("' ");
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Insert (BP) #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Insert (BP) #" + no);
|
||||||
}
|
}
|
||||||
|
|
||||||
sql = new StringBuilder("UPDATE T_Replenish t SET ");
|
sql = new StringBuilder("UPDATE T_Replenish t SET ");
|
||||||
|
@ -280,7 +280,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Update #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update #" + no);
|
||||||
|
|
||||||
// add production lines
|
// add production lines
|
||||||
sql = new StringBuilder("UPDATE T_Replenish t SET ");
|
sql = new StringBuilder("UPDATE T_Replenish t SET ");
|
||||||
|
@ -293,7 +293,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Update #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update #" + no);
|
||||||
|
|
||||||
|
|
||||||
// Delete inactive products and replenishments
|
// Delete inactive products and replenishments
|
||||||
|
@ -306,7 +306,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Delete Inactive=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete Inactive=" + no);
|
||||||
|
|
||||||
// Ensure Data consistency
|
// Ensure Data consistency
|
||||||
sql = new StringBuilder("UPDATE T_Replenish SET QtyOnHand = 0 WHERE QtyOnHand IS NULL");
|
sql = new StringBuilder("UPDATE T_Replenish SET QtyOnHand = 0 WHERE QtyOnHand IS NULL");
|
||||||
|
@ -326,7 +326,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Update Type-1=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update Type-1=" + no);
|
||||||
//
|
//
|
||||||
// X_M_Replenish.REPLENISHTYPE_MaintainMaximumLevel
|
// X_M_Replenish.REPLENISHTYPE_MaintainMaximumLevel
|
||||||
sql = new StringBuilder("UPDATE T_Replenish");
|
sql = new StringBuilder("UPDATE T_Replenish");
|
||||||
|
@ -335,7 +335,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Update Type-2=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Update Type-2=" + no);
|
||||||
|
|
||||||
|
|
||||||
// Minimum Order Quantity
|
// Minimum Order Quantity
|
||||||
|
@ -346,7 +346,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set MinOrderQty=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set MinOrderQty=" + no);
|
||||||
|
|
||||||
// Even dividable by Pack
|
// Even dividable by Pack
|
||||||
sql = new StringBuilder("UPDATE T_Replenish");
|
sql = new StringBuilder("UPDATE T_Replenish");
|
||||||
|
@ -356,7 +356,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set OrderPackQty=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set OrderPackQty=" + no);
|
||||||
|
|
||||||
// Source from other warehouse
|
// Source from other warehouse
|
||||||
if (wh.getM_WarehouseSource_ID() != 0)
|
if (wh.getM_WarehouseSource_ID() != 0)
|
||||||
|
@ -366,7 +366,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set Source Warehouse=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set Source Warehouse=" + no);
|
||||||
}
|
}
|
||||||
// Check Source Warehouse
|
// Check Source Warehouse
|
||||||
sql = new StringBuilder("UPDATE T_Replenish");
|
sql = new StringBuilder("UPDATE T_Replenish");
|
||||||
|
@ -375,7 +375,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Set same Source Warehouse=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Set same Source Warehouse=" + no);
|
||||||
|
|
||||||
// Custom Replenishment
|
// Custom Replenishment
|
||||||
String className = wh.getReplenishmentClass();
|
String className = wh.getReplenishmentClass();
|
||||||
|
@ -422,7 +422,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.fine("Delete No QtyToOrder=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Delete No QtyToOrder=" + no);
|
||||||
|
|
||||||
} // fillTable
|
} // fillTable
|
||||||
|
|
||||||
|
@ -459,7 +459,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
order.setM_Warehouse_ID(wh.getM_Warehouse_ID());
|
order.setM_Warehouse_ID(wh.getM_Warehouse_ID());
|
||||||
if (!order.save())
|
if (!order.save())
|
||||||
return;
|
return;
|
||||||
log.fine(order.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(order.toString());
|
||||||
noOrders++;
|
noOrders++;
|
||||||
info.append(" - ");
|
info.append(" - ");
|
||||||
info.append(order.getDocumentNo());
|
info.append(order.getDocumentNo());
|
||||||
|
@ -503,7 +503,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
requisition.setM_Warehouse_ID(wh.getM_Warehouse_ID());
|
requisition.setM_Warehouse_ID(wh.getM_Warehouse_ID());
|
||||||
if (!requisition.save())
|
if (!requisition.save())
|
||||||
return;
|
return;
|
||||||
log.fine(requisition.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(requisition.toString());
|
||||||
noReqs++;
|
noReqs++;
|
||||||
info.append(" - ");
|
info.append(" - ");
|
||||||
info.append(requisition.getDocumentNo());
|
info.append(requisition.getDocumentNo());
|
||||||
|
@ -561,7 +561,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
move.setAD_Org_ID(whSource.getAD_Org_ID());
|
move.setAD_Org_ID(whSource.getAD_Org_ID());
|
||||||
if (!move.save())
|
if (!move.save())
|
||||||
return;
|
return;
|
||||||
log.fine(move.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(move.toString());
|
||||||
noMoves++;
|
noMoves++;
|
||||||
info.append(" - ").append(move.getDocumentNo());
|
info.append(" - ").append(move.getDocumentNo());
|
||||||
}
|
}
|
||||||
|
@ -684,7 +684,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
|
|
||||||
if (!order.save())
|
if (!order.save())
|
||||||
return;
|
return;
|
||||||
log.fine(order.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(order.toString());
|
||||||
noMoves++;
|
noMoves++;
|
||||||
info.append(" - ").append(order.getDocumentNo());
|
info.append(" - ").append(order.getDocumentNo());
|
||||||
}
|
}
|
||||||
|
@ -814,7 +814,7 @@ public class ReplenishReportProduction extends SvrProcess
|
||||||
|
|
||||||
production.setIsCreated("Y");
|
production.setIsCreated("Y");
|
||||||
production.saveEx(get_TrxName());
|
production.saveEx(get_TrxName());
|
||||||
log.fine(production.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(production.toString());
|
||||||
noProds++;
|
noProds++;
|
||||||
info.append(" - ");
|
info.append(" - ");
|
||||||
info.append(production.getDocumentNo());
|
info.append(production.getDocumentNo());
|
||||||
|
|
|
@ -280,7 +280,7 @@ public class ReplicationLocal extends SvrProcess
|
||||||
data.CentralData = getRowSet(data.Sql, null);
|
data.CentralData = getRowSet(data.Sql, null);
|
||||||
if (data.CentralData == null)
|
if (data.CentralData == null)
|
||||||
{
|
{
|
||||||
log.fine("mergeDataTable - CentralData is Null - " + TableName);
|
if (log.isLoggable(Level.FINE)) log.fine("mergeDataTable - CentralData is Null - " + TableName);
|
||||||
m_replicated = false;
|
m_replicated = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ public class ReplicationLocal extends SvrProcess
|
||||||
{data.TableName, data.KeyColumns, sourceRS, targetRS, m_test, Boolean.TRUE});
|
{data.TableName, data.KeyColumns, sourceRS, targetRS, m_test, Boolean.TRUE});
|
||||||
boolean replicated = isReplicated(result);
|
boolean replicated = isReplicated(result);
|
||||||
if (replicated)
|
if (replicated)
|
||||||
log.fine("mergeDataTable -> " + TableName + " - " + result);
|
if (log.isLoggable(Level.FINE)) log.fine("mergeDataTable -> " + TableName + " - " + result);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_replicated = false;
|
m_replicated = false;
|
||||||
|
@ -458,7 +458,7 @@ public class ReplicationLocal extends SvrProcess
|
||||||
data.CentralData = getRowSet(data.Sql, null);
|
data.CentralData = getRowSet(data.Sql, null);
|
||||||
if (data.CentralData == null)
|
if (data.CentralData == null)
|
||||||
{
|
{
|
||||||
log.fine("sendUpdatesTable - Null - " + TableName);
|
if (log.isLoggable(Level.FINE)) log.fine("sendUpdatesTable - Null - " + TableName);
|
||||||
m_replicated = false;
|
m_replicated = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -471,17 +471,17 @@ public class ReplicationLocal extends SvrProcess
|
||||||
}
|
}
|
||||||
catch (SQLException ex)
|
catch (SQLException ex)
|
||||||
{
|
{
|
||||||
log.fine("RowCheck " + ex);
|
if (log.isLoggable(Level.FINE)) log.fine("RowCheck " + ex);
|
||||||
m_replicated = false;
|
m_replicated = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (rows == 0)
|
if (rows == 0)
|
||||||
{
|
{
|
||||||
log.fine("No Rows - " + TableName);
|
if (log.isLoggable(Level.FINE)) log.fine("No Rows - " + TableName);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
log.fine(TableName + " #" + rows);
|
if (log.isLoggable(Level.FINE)) log.fine(TableName + " #" + rows);
|
||||||
|
|
||||||
// Process Info
|
// Process Info
|
||||||
ProcessInfo pi = new ProcessInfo("SendUpdates", 0);
|
ProcessInfo pi = new ProcessInfo("SendUpdates", 0);
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class ReplicationRemote extends SvrProcess
|
||||||
//int AD_Table_ID = rs.getInt(1);
|
//int AD_Table_ID = rs.getInt(1);
|
||||||
String ReplicationType = rs.getString(2);
|
String ReplicationType = rs.getString(2);
|
||||||
String TableName = rs.getString(3);
|
String TableName = rs.getString(3);
|
||||||
log.fine("setupRemote - " + TableName + " - " + ReplicationType);
|
if (log.isLoggable(Level.FINE)) log.fine("setupRemote - " + TableName + " - " + ReplicationType);
|
||||||
if (!data.Test.booleanValue())
|
if (!data.Test.booleanValue())
|
||||||
setupRemoteAD_Table(TableName, ReplicationType);
|
setupRemoteAD_Table(TableName, ReplicationType);
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ public class ReplicationRemote extends SvrProcess
|
||||||
RowSet targetRS = ReplicationLocal.getRowSet(data.Sql, null);
|
RowSet targetRS = ReplicationLocal.getRowSet(data.Sql, null);
|
||||||
Object result = doIt (ReplicationLocal.START, "sync", new Object[] // Merge
|
Object result = doIt (ReplicationLocal.START, "sync", new Object[] // Merge
|
||||||
{data.TableName, data.KeyColumns, sourceRS, targetRS, data.Test, Boolean.TRUE});
|
{data.TableName, data.KeyColumns, sourceRS, targetRS, data.Test, Boolean.TRUE});
|
||||||
log.fine("receiveUpdateFromCentral - " + data.TableName + " - " + result);
|
if (log.isLoggable(Level.FINE)) log.fine("receiveUpdateFromCentral - " + data.TableName + " - " + result);
|
||||||
pi.setSerializableObject(null);
|
pi.setSerializableObject(null);
|
||||||
boolean replicated = ReplicationLocal.isReplicated(result);
|
boolean replicated = ReplicationLocal.isReplicated(result);
|
||||||
if (!replicated)
|
if (!replicated)
|
||||||
|
@ -280,7 +280,7 @@ public class ReplicationRemote extends SvrProcess
|
||||||
RowSet targetRS = ReplicationLocal.getRowSet(data.Sql, null);
|
RowSet targetRS = ReplicationLocal.getRowSet(data.Sql, null);
|
||||||
Object result = doIt (ReplicationLocal.START, "sync", new Object[] // Sync
|
Object result = doIt (ReplicationLocal.START, "sync", new Object[] // Sync
|
||||||
{data.TableName, data.KeyColumns, sourceRS, targetRS, data.Test, Boolean.FALSE});
|
{data.TableName, data.KeyColumns, sourceRS, targetRS, data.Test, Boolean.FALSE});
|
||||||
log.fine("receiveUpdateFromCentral - " + data.TableName + " - " + result);
|
if (log.isLoggable(Level.FINE)) log.fine("receiveUpdateFromCentral - " + data.TableName + " - " + result);
|
||||||
pi.setSerializableObject(null);
|
pi.setSerializableObject(null);
|
||||||
boolean replicated = ReplicationLocal.isReplicated(result);
|
boolean replicated = ReplicationLocal.isReplicated(result);
|
||||||
if (!replicated)
|
if (!replicated)
|
||||||
|
|
|
@ -186,7 +186,7 @@ public class RequestEMailProcessor extends SvrProcess
|
||||||
//
|
//
|
||||||
m_session = Session.getDefaultInstance(props, auth);
|
m_session = Session.getDefaultInstance(props, auth);
|
||||||
m_session.setDebug(CLogMgt.isLevelFinest());
|
m_session.setDebug(CLogMgt.isLevelFinest());
|
||||||
log.fine("getSession - " + m_session);
|
if (log.isLoggable(Level.FINE)) log.fine("getSession - " + m_session);
|
||||||
return m_session;
|
return m_session;
|
||||||
} // getSession
|
} // getSession
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ public class RequestEMailProcessor extends SvrProcess
|
||||||
// Connect
|
// Connect
|
||||||
m_store.connect();
|
m_store.connect();
|
||||||
//
|
//
|
||||||
log.fine("getStore - " + m_store);
|
if (log.isLoggable(Level.FINE)) log.fine("getStore - " + m_store);
|
||||||
return m_store;
|
return m_store;
|
||||||
} // getStore
|
} // getStore
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ public class RequestEMailProcessor extends SvrProcess
|
||||||
if (!inbox.exists())
|
if (!inbox.exists())
|
||||||
throw new IllegalStateException("No Inbox");
|
throw new IllegalStateException("No Inbox");
|
||||||
inbox.open(Folder.READ_WRITE);
|
inbox.open(Folder.READ_WRITE);
|
||||||
log.fine("processInBox - " + inbox.getName()
|
if (log.isLoggable(Level.FINE)) log.fine("processInBox - " + inbox.getName()
|
||||||
+ "; Messages Total=" + inbox.getMessageCount()
|
+ "; Messages Total=" + inbox.getMessageCount()
|
||||||
+ "; New=" + inbox.getNewMessageCount());
|
+ "; New=" + inbox.getNewMessageCount());
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class RfQResponseRank extends SvrProcess
|
||||||
|
|
||||||
// Get Completed, Active Responses
|
// Get Completed, Active Responses
|
||||||
MRfQResponse[] responses = rfq.getResponses (true, true);
|
MRfQResponse[] responses = rfq.getResponses (true, true);
|
||||||
log.fine("doIt - #Responses=" + responses.length);
|
if (log.isLoggable(Level.FINE)) log.fine("doIt - #Responses=" + responses.length);
|
||||||
if (responses.length == 0)
|
if (responses.length == 0)
|
||||||
throw new IllegalArgumentException("No completed RfQ Responses found");
|
throw new IllegalArgumentException("No completed RfQ Responses found");
|
||||||
if (responses.length == 1)
|
if (responses.length == 1)
|
||||||
|
@ -120,7 +120,7 @@ public class RfQResponseRank extends SvrProcess
|
||||||
MRfQLine rfqLine = rfqLines[i];
|
MRfQLine rfqLine = rfqLines[i];
|
||||||
if (!rfqLine.isActive())
|
if (!rfqLine.isActive())
|
||||||
continue;
|
continue;
|
||||||
log.fine("rankLines - " + rfqLine);
|
if (log.isLoggable(Level.FINE)) log.fine("rankLines - " + rfqLine);
|
||||||
MRfQLineQty[] rfqQtys = rfqLine.getQtys();
|
MRfQLineQty[] rfqQtys = rfqLine.getQtys();
|
||||||
for (int j = 0; j < rfqQtys.length; j++)
|
for (int j = 0; j < rfqQtys.length; j++)
|
||||||
{
|
{
|
||||||
|
@ -128,7 +128,7 @@ public class RfQResponseRank extends SvrProcess
|
||||||
MRfQLineQty rfqQty = rfqQtys[j];
|
MRfQLineQty rfqQty = rfqQtys[j];
|
||||||
if (!rfqQty.isActive() || !rfqQty.isRfQQty())
|
if (!rfqQty.isActive() || !rfqQty.isRfQQty())
|
||||||
continue;
|
continue;
|
||||||
log.fine("rankLines Qty - " + rfqQty);
|
if (log.isLoggable(Level.FINE)) log.fine("rankLines Qty - " + rfqQty);
|
||||||
MRfQResponseLineQty[] respQtys = rfqQty.getResponseQtys(false);
|
MRfQResponseLineQty[] respQtys = rfqQty.getResponseQtys(false);
|
||||||
for (int kk = 0; kk < respQtys.length; kk++)
|
for (int kk = 0; kk < respQtys.length; kk++)
|
||||||
{
|
{
|
||||||
|
@ -138,14 +138,14 @@ public class RfQResponseRank extends SvrProcess
|
||||||
{
|
{
|
||||||
respQty.setRanking(999);
|
respQty.setRanking(999);
|
||||||
respQty.saveEx();
|
respQty.saveEx();
|
||||||
log.fine(" - ignored: " + respQty);
|
if (log.isLoggable(Level.FINE)) log.fine(" - ignored: " + respQty);
|
||||||
}
|
}
|
||||||
} // for all respones line qtys
|
} // for all respones line qtys
|
||||||
|
|
||||||
// Rank RfQ Line Qtys
|
// Rank RfQ Line Qtys
|
||||||
respQtys = rfqQty.getResponseQtys(false);
|
respQtys = rfqQty.getResponseQtys(false);
|
||||||
if (respQtys.length == 0)
|
if (respQtys.length == 0)
|
||||||
log.fine(" - No Qtys with valid Amounts");
|
if (log.isLoggable(Level.FINE)) log.fine(" - No Qtys with valid Amounts");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Arrays.sort(respQtys, respQtys[0]);
|
Arrays.sort(respQtys, respQtys[0]);
|
||||||
|
@ -164,7 +164,7 @@ public class RfQResponseRank extends SvrProcess
|
||||||
{
|
{
|
||||||
qty.setRanking(999);
|
qty.setRanking(999);
|
||||||
qty.saveEx();
|
qty.saveEx();
|
||||||
log.fine(" - Rank 999: " + qty);
|
if (log.isLoggable(Level.FINE)) log.fine(" - Rank 999: " + qty);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ public class RfQResponseRank extends SvrProcess
|
||||||
lastAmt = qty.getNetAmt();
|
lastAmt = qty.getNetAmt();
|
||||||
}
|
}
|
||||||
qty.setRanking(lastRank);
|
qty.setRanking(lastRank);
|
||||||
log.fine(" - Rank " + lastRank + ": " + qty);
|
if (log.isLoggable(Level.FINE)) log.fine(" - Rank " + lastRank + ": " + qty);
|
||||||
qty.saveEx();
|
qty.saveEx();
|
||||||
//
|
//
|
||||||
if (rank == 0) // Update RfQ
|
if (rank == 0) // Update RfQ
|
||||||
|
@ -224,7 +224,7 @@ public class RfQResponseRank extends SvrProcess
|
||||||
}
|
}
|
||||||
response.setRanking(ranking);
|
response.setRanking(ranking);
|
||||||
response.saveEx();
|
response.saveEx();
|
||||||
log.fine("- Response Ranking " + ranking + ": " + response);
|
if (log.isLoggable(Level.FINE)) log.fine("- Response Ranking " + ranking + ": " + response);
|
||||||
if (!rfq.isQuoteSelectedLines()) // no total selected winner if not all lines
|
if (!rfq.isQuoteSelectedLines()) // no total selected winner if not all lines
|
||||||
{
|
{
|
||||||
if (winner == null && ranking > 0)
|
if (winner == null && ranking > 0)
|
||||||
|
@ -239,7 +239,7 @@ public class RfQResponseRank extends SvrProcess
|
||||||
{
|
{
|
||||||
winner.setIsSelectedWinner(true);
|
winner.setIsSelectedWinner(true);
|
||||||
winner.saveEx();
|
winner.saveEx();
|
||||||
log.fine("- Response Winner: " + winner);
|
if (log.isLoggable(Level.FINE)) log.fine("- Response Winner: " + winner);
|
||||||
}
|
}
|
||||||
} // rankLines
|
} // rankLines
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ public class RfQResponseRank extends SvrProcess
|
||||||
response.setIsSelectedWinner(false);
|
response.setIsSelectedWinner(false);
|
||||||
}
|
}
|
||||||
response.saveEx();
|
response.saveEx();
|
||||||
log.fine("rankResponse - " + response);
|
if (log.isLoggable(Level.FINE)) log.fine("rankResponse - " + response);
|
||||||
}
|
}
|
||||||
} // rankResponses
|
} // rankResponses
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class SendMailText extends SvrProcess
|
||||||
if (m_from.getAD_User_ID() == 0)
|
if (m_from.getAD_User_ID() == 0)
|
||||||
throw new Exception ("No found @AD_User_ID@=" + m_AD_User_ID);
|
throw new Exception ("No found @AD_User_ID@=" + m_AD_User_ID);
|
||||||
}
|
}
|
||||||
log.fine("From " + m_from);
|
if (log.isLoggable(Level.FINE)) log.fine("From " + m_from);
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
|
|
||||||
if (m_R_InterestArea_ID > 0)
|
if (m_R_InterestArea_ID > 0)
|
||||||
|
@ -284,7 +284,7 @@ public class SendMailText extends SvrProcess
|
||||||
new MUserMail(m_MailText, AD_User_ID, email).saveEx();
|
new MUserMail(m_MailText, AD_User_ID, email).saveEx();
|
||||||
//
|
//
|
||||||
if (OK)
|
if (OK)
|
||||||
log.fine(to.getEMail());
|
if (log.isLoggable(Level.FINE)) log.fine(to.getEMail());
|
||||||
else
|
else
|
||||||
log.warning("FAILURE - " + to.getEMail());
|
log.warning("FAILURE - " + to.getEMail());
|
||||||
StringBuilder msglog = new StringBuilder((OK ? "@OK@" : "@ERROR@")).append(" - ").append(to.getEMail());
|
StringBuilder msglog = new StringBuilder((OK ? "@OK@" : "@ERROR@")).append(" - ").append(to.getEMail());
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class TableCreateColumns extends SvrProcess
|
||||||
|| tn.indexOf("EXPLAIN") != -1 // explain plan
|
|| tn.indexOf("EXPLAIN") != -1 // explain plan
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
log.fine("Ignored: " + tableName + " - " + tableType);
|
if (log.isLoggable(Level.FINE)) log.fine("Ignored: " + tableName + " - " + tableType);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class TransactionXRef extends SvrProcess
|
||||||
.append(") ORDER BY M_Transaction_ID");
|
.append(") ORDER BY M_Transaction_ID");
|
||||||
//
|
//
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine(sql.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(sql.toString());
|
||||||
if (log.isLoggable(Level.CONFIG)) log.config("#" + no);
|
if (log.isLoggable(Level.CONFIG)) log.config("#" + no);
|
||||||
|
|
||||||
// Multi-Level
|
// Multi-Level
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class UserPassword extends SvrProcess
|
||||||
MUser user = MUser.get(getCtx(), p_AD_User_ID);
|
MUser user = MUser.get(getCtx(), p_AD_User_ID);
|
||||||
user.load(get_TrxName());
|
user.load(get_TrxName());
|
||||||
MUser operator = MUser.get(getCtx(), getAD_User_ID());
|
MUser operator = MUser.get(getCtx(), getAD_User_ID());
|
||||||
log.fine("User=" + user + ", Operator=" + operator);
|
if (log.isLoggable(Level.FINE)) log.fine("User=" + user + ", Operator=" + operator);
|
||||||
|
|
||||||
boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
|
boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
import org.compiere.Adempiere;
|
import org.compiere.Adempiere;
|
||||||
import org.compiere.util.CLogMgt;
|
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
@ -457,7 +456,7 @@ public abstract class AbstractExcelExporter
|
||||||
|
|
||||||
//
|
//
|
||||||
// Workbook Info
|
// Workbook Info
|
||||||
if (CLogMgt.isLevelFine()) {
|
if (log.isLoggable(Level.FINE)) {
|
||||||
log.fine("Sheets #"+m_sheetCount);
|
log.fine("Sheets #"+m_sheetCount);
|
||||||
log.fine("Styles used #"+m_styles.size());
|
log.fine("Styles used #"+m_styles.size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.logging.Level;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.adempiere.base.IGridTabImporter;
|
import org.adempiere.base.IGridTabImporter;
|
||||||
|
@ -195,7 +196,7 @@ public class GridTabCSVImporter implements IGridTabImporter
|
||||||
StringBuilder lineError = new StringBuilder();
|
StringBuilder lineError = new StringBuilder();
|
||||||
String headName = set.getKey();
|
String headName = set.getKey();
|
||||||
Object value = set.getValue();
|
Object value = set.getValue();
|
||||||
log.fine("Setting " + headName + " to " + value);
|
if (log.isLoggable(Level.FINE)) log.fine("Setting " + headName + " to " + value);
|
||||||
|
|
||||||
String columnName = headName;
|
String columnName = headName;
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MColumn;
|
import org.compiere.model.MColumn;
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
|
@ -67,7 +68,7 @@ public abstract class AbstractDocumentSearch {
|
||||||
StringBuilder msglog = new StringBuilder();
|
StringBuilder msglog = new StringBuilder();
|
||||||
|
|
||||||
msglog.append("Search started with String: ").append(searchString);
|
msglog.append("Search started with String: ").append(searchString);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
|
|
||||||
// Check if / how many transaction-codes are used
|
// Check if / how many transaction-codes are used
|
||||||
if (! Util.isEmpty(searchString)) {
|
if (! Util.isEmpty(searchString)) {
|
||||||
|
@ -104,12 +105,12 @@ public abstract class AbstractDocumentSearch {
|
||||||
msglog = new StringBuilder("Search with Transaction: '");
|
msglog = new StringBuilder("Search with Transaction: '");
|
||||||
msglog.append(codeList.get(i)).append("' for: '")
|
msglog.append(codeList.get(i)).append("' for: '")
|
||||||
.append(search.toString()).append("'");
|
.append(search.toString()).append("'");
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
getID(codeList.get(i), search.toString());
|
getID(codeList.get(i), search.toString());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
msglog = new StringBuilder("Search without Transaction: ").append(search.toString());
|
msglog = new StringBuilder("Search without Transaction: ").append(search.toString());
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
getID(null, search.toString());
|
getID(null, search.toString());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -195,7 +196,7 @@ public abstract class AbstractDocumentSearch {
|
||||||
}
|
}
|
||||||
if (pstmtSO != null) {
|
if (pstmtSO != null) {
|
||||||
msglog = new StringBuilder("SQL Sales: ").append(sqlSO.toString());
|
msglog = new StringBuilder("SQL Sales: ").append(sqlSO.toString());
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
rsSO = pstmtSO.executeQuery();
|
rsSO = pstmtSO.executeQuery();
|
||||||
Vector<Integer> idSO = new Vector<Integer>();
|
Vector<Integer> idSO = new Vector<Integer>();
|
||||||
while (rsSO.next()) {
|
while (rsSO.next()) {
|
||||||
|
@ -204,7 +205,7 @@ public abstract class AbstractDocumentSearch {
|
||||||
if (role.getWindowAccess(msd.getAD_Window_ID()) != null) {
|
if (role.getWindowAccess(msd.getAD_Window_ID()) != null) {
|
||||||
msglog = new StringBuilder("Open Window: ").append(msd.getAD_Window_ID()).append(" / Table: ")
|
msglog = new StringBuilder("Open Window: ").append(msd.getAD_Window_ID()).append(" / Table: ")
|
||||||
.append(table.getTableName()).append(" / Number of Results: ").append(idSO.size());
|
.append(table.getTableName()).append(" / Number of Results: ").append(idSO.size());
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
|
|
||||||
if (idSO.size() == 0 && (searchString == null || searchString.trim().length() == 0)) {
|
if (idSO.size() == 0 && (searchString == null || searchString.trim().length() == 0)) {
|
||||||
// No search string - open the window with new record
|
// No search string - open the window with new record
|
||||||
|
@ -218,7 +219,7 @@ public abstract class AbstractDocumentSearch {
|
||||||
}
|
}
|
||||||
if (pstmtPO != null) {
|
if (pstmtPO != null) {
|
||||||
msglog = new StringBuilder("SQL Purchase: ").append(sqlPO);
|
msglog = new StringBuilder("SQL Purchase: ").append(sqlPO);
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
rsPO = pstmtPO.executeQuery();
|
rsPO = pstmtPO.executeQuery();
|
||||||
Vector<Integer> idPO = new Vector<Integer>();
|
Vector<Integer> idPO = new Vector<Integer>();
|
||||||
while (rsPO.next()) {
|
while (rsPO.next()) {
|
||||||
|
@ -227,7 +228,7 @@ public abstract class AbstractDocumentSearch {
|
||||||
if (role.getWindowAccess(msd.getPO_Window_ID()) != null) {
|
if (role.getWindowAccess(msd.getPO_Window_ID()) != null) {
|
||||||
msglog = new StringBuilder("Open Window: ").append(msd.getPO_Window_ID()).append(" / Table: ")
|
msglog = new StringBuilder("Open Window: ").append(msd.getPO_Window_ID()).append(" / Table: ")
|
||||||
.append(table.getTableName()).append(" / Number of Results: ").append(idPO.size());
|
.append(table.getTableName()).append(" / Number of Results: ").append(idPO.size());
|
||||||
log.fine(msglog.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
|
||||||
openWindow(idPO, table.getTableName(), msd.getPO_Window_ID());
|
openWindow(idPO, table.getTableName(), msd.getPO_Window_ID());
|
||||||
} else {
|
} else {
|
||||||
log.warning("Role is not allowed to view this window");
|
log.warning("Role is not allowed to view this window");
|
||||||
|
@ -287,7 +288,7 @@ public abstract class AbstractDocumentSearch {
|
||||||
|
|
||||||
final MQuery query = new MQuery(tableName);
|
final MQuery query = new MQuery(tableName);
|
||||||
if (whereString != null) {
|
if (whereString != null) {
|
||||||
log.fine(whereString.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(whereString.toString());
|
||||||
query.addRestriction(whereString.toString());
|
query.addRestriction(whereString.toString());
|
||||||
}
|
}
|
||||||
final boolean ok = openWindow(windowId, query);
|
final boolean ok = openWindow(windowId, query);
|
||||||
|
|
|
@ -24,6 +24,7 @@ import java.io.OutputStreamWriter;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
|
@ -47,7 +48,7 @@ public class LogAuthFailure {
|
||||||
file = new FileOutputStream(fileName, true);
|
file = new FileOutputStream(fileName, true);
|
||||||
writer = new BufferedWriter(new OutputStreamWriter(file, "UTF8"));
|
writer = new BufferedWriter(new OutputStreamWriter(file, "UTF8"));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.fine(e.getMessage());
|
if (log.isLoggable(Level.FINE)) log.fine(e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,7 +71,7 @@ public class LogAuthFailure {
|
||||||
writer.append("\n");
|
writer.append("\n");
|
||||||
writer.flush();
|
writer.flush();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.fine(e.getMessage());
|
if (log.isLoggable(Level.FINE)) log.fine(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ public final class ProcessUtil {
|
||||||
public static MWFProcess startWorkFlow(Properties ctx, ProcessInfo pi, int AD_Workflow_ID) {
|
public static MWFProcess startWorkFlow(Properties ctx, ProcessInfo pi, int AD_Workflow_ID) {
|
||||||
MWorkflow wf = MWorkflow.get (ctx, AD_Workflow_ID);
|
MWorkflow wf = MWorkflow.get (ctx, AD_Workflow_ID);
|
||||||
MWFProcess wfProcess = wf.start(pi, pi.getTransactionName());
|
MWFProcess wfProcess = wf.start(pi, pi.getTransactionName());
|
||||||
log.fine(pi.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(pi.toString());
|
||||||
return wfProcess;
|
return wfProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -916,7 +916,7 @@ public abstract class Doc
|
||||||
//
|
//
|
||||||
boolean retValue = getBalance().signum() == 0;
|
boolean retValue = getBalance().signum() == 0;
|
||||||
if (retValue)
|
if (retValue)
|
||||||
log.fine("Yes " + toString());
|
if (log.isLoggable(Level.FINE)) log.fine("Yes " + toString());
|
||||||
else
|
else
|
||||||
log.warning("NO - " + toString());
|
log.warning("NO - " + toString());
|
||||||
return retValue;
|
return retValue;
|
||||||
|
@ -932,7 +932,7 @@ public abstract class Doc
|
||||||
// No Currency in document
|
// No Currency in document
|
||||||
if (getC_Currency_ID() == NO_CURRENCY)
|
if (getC_Currency_ID() == NO_CURRENCY)
|
||||||
{
|
{
|
||||||
log.fine("(none) - " + toString());
|
if (log.isLoggable(Level.FINE)) log.fine("(none) - " + toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Journal from a different acct schema
|
// Journal from a different acct schema
|
||||||
|
@ -954,7 +954,7 @@ public abstract class Doc
|
||||||
// just one and the same
|
// just one and the same
|
||||||
if (set.size() == 1 && acctSchema.getC_Currency_ID() == getC_Currency_ID())
|
if (set.size() == 1 && acctSchema.getC_Currency_ID() == getC_Currency_ID())
|
||||||
{
|
{
|
||||||
log.fine("(same) Cur=" + getC_Currency_ID() + " - " + toString());
|
if (log.isLoggable(Level.FINE)) log.fine("(same) Cur=" + getC_Currency_ID() + " - " + toString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -975,11 +975,11 @@ public abstract class Doc
|
||||||
+ " - " + toString());
|
+ " - " + toString());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
log.fine("From C_Currency_ID=" + C_Currency_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("From C_Currency_ID=" + C_Currency_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.fine("Convertible=" + convertible + ", AcctSchema C_Currency_ID=" + acctSchema.getC_Currency_ID() + " - " + toString());
|
if (log.isLoggable(Level.FINE)) log.fine("Convertible=" + convertible + ", AcctSchema C_Currency_ID=" + acctSchema.getC_Currency_ID() + " - " + toString());
|
||||||
return convertible;
|
return convertible;
|
||||||
} // isConvertible
|
} // isConvertible
|
||||||
|
|
||||||
|
@ -1009,7 +1009,7 @@ public abstract class Doc
|
||||||
else
|
else
|
||||||
m_C_Period_ID = -1;
|
m_C_Period_ID = -1;
|
||||||
//
|
//
|
||||||
log.fine( // + AD_Client_ID + " - "
|
if (log.isLoggable(Level.FINE)) log.fine( // + AD_Client_ID + " - "
|
||||||
getDateAcct() + " - " + getDocumentType() + " => " + m_C_Period_ID);
|
getDateAcct() + " - " + getDocumentType() + " => " + m_C_Period_ID);
|
||||||
} // setC_Period_ID
|
} // setC_Period_ID
|
||||||
|
|
||||||
|
@ -1033,7 +1033,7 @@ public abstract class Doc
|
||||||
setPeriod();
|
setPeriod();
|
||||||
boolean open = m_C_Period_ID > 0;
|
boolean open = m_C_Period_ID > 0;
|
||||||
if (open)
|
if (open)
|
||||||
log.fine("Yes - " + toString());
|
if (log.isLoggable(Level.FINE)) log.fine("Yes - " + toString());
|
||||||
else
|
else
|
||||||
log.warning("NO - " + toString());
|
log.warning("NO - " + toString());
|
||||||
return open;
|
return open;
|
||||||
|
|
|
@ -18,6 +18,7 @@ package org.compiere.acct;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MAccount;
|
import org.compiere.model.MAccount;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
|
@ -978,7 +979,7 @@ public class DocLine
|
||||||
String sql = "SELECT COALESCE(C_SalesRegion_ID,0) FROM C_BPartner_Location WHERE C_BPartner_Location_ID=?";
|
String sql = "SELECT COALESCE(C_SalesRegion_ID,0) FROM C_BPartner_Location WHERE C_BPartner_Location_ID=?";
|
||||||
m_C_SalesRegion_ID = DB.getSQLValue (null,
|
m_C_SalesRegion_ID = DB.getSQLValue (null,
|
||||||
sql, getC_BPartner_Location_ID());
|
sql, getC_BPartner_Location_ID());
|
||||||
log.fine("C_SalesRegion_ID=" + m_C_SalesRegion_ID + " (from BPL)" );
|
if (log.isLoggable(Level.FINE)) log.fine("C_SalesRegion_ID=" + m_C_SalesRegion_ID + " (from BPL)" );
|
||||||
if (m_C_SalesRegion_ID == 0)
|
if (m_C_SalesRegion_ID == 0)
|
||||||
m_C_SalesRegion_ID = -2; // don't try again
|
m_C_SalesRegion_ID = -2; // don't try again
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class Doc_AllocationHdr extends Doc
|
||||||
docLine.setC_ConversionType_ID(C_ConversionType_ID);
|
docLine.setC_ConversionType_ID(C_ConversionType_ID);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
log.fine(docLine.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
|
||||||
list.add (docLine);
|
list.add (docLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -749,7 +749,7 @@ public class Doc_AllocationHdr extends Doc
|
||||||
//
|
//
|
||||||
StringBuilder description = new StringBuilder("Invoice=(").append(invoice.getC_Currency_ID()).append(")").append(invoiceSource).append("/").append(invoiceAccounted)
|
StringBuilder description = new StringBuilder("Invoice=(").append(invoice.getC_Currency_ID()).append(")").append(invoiceSource).append("/").append(invoiceAccounted)
|
||||||
.append(" - Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource).append("/").append(allocationAccounted);
|
.append(" - Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource).append("/").append(allocationAccounted);
|
||||||
log.fine(description.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(description.toString());
|
||||||
// Allocation not Invoice Currency
|
// Allocation not Invoice Currency
|
||||||
if (getC_Currency_ID() != invoice.getC_Currency_ID())
|
if (getC_Currency_ID() != invoice.getC_Currency_ID())
|
||||||
{
|
{
|
||||||
|
@ -761,7 +761,7 @@ public class Doc_AllocationHdr extends Doc
|
||||||
return "Gain/Loss - No Conversion from Allocation->Invoice";
|
return "Gain/Loss - No Conversion from Allocation->Invoice";
|
||||||
StringBuilder d2 = new StringBuilder("Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource)
|
StringBuilder d2 = new StringBuilder("Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource)
|
||||||
.append("->(").append(invoice.getC_Currency_ID()).append(")").append(allocationSourceNew);
|
.append("->(").append(invoice.getC_Currency_ID()).append(")").append(allocationSourceNew);
|
||||||
log.fine(d2.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(d2.toString());
|
||||||
description.append(" - ").append(d2);
|
description.append(" - ").append(d2);
|
||||||
allocationSource = allocationSourceNew;
|
allocationSource = allocationSourceNew;
|
||||||
}
|
}
|
||||||
|
@ -772,7 +772,7 @@ public class Doc_AllocationHdr extends Doc
|
||||||
{
|
{
|
||||||
acctDifference = invoiceAccounted.subtract(allocationAccounted); // gain is negative
|
acctDifference = invoiceAccounted.subtract(allocationAccounted); // gain is negative
|
||||||
StringBuilder d2 = new StringBuilder("(full) = ").append(acctDifference);
|
StringBuilder d2 = new StringBuilder("(full) = ").append(acctDifference);
|
||||||
log.fine(d2.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(d2.toString());
|
||||||
description.append(" - ").append(d2);
|
description.append(" - ").append(d2);
|
||||||
}
|
}
|
||||||
else // partial or MC
|
else // partial or MC
|
||||||
|
@ -791,7 +791,7 @@ public class Doc_AllocationHdr extends Doc
|
||||||
if (acctDifference.scale() > precision)
|
if (acctDifference.scale() > precision)
|
||||||
acctDifference = acctDifference.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
acctDifference = acctDifference.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||||
StringBuilder d2 = new StringBuilder("(partial) = ").append(acctDifference).append(" - Multiplier=").append(multiplier);
|
StringBuilder d2 = new StringBuilder("(partial) = ").append(acctDifference).append(" - Multiplier=").append(multiplier);
|
||||||
log.fine(d2.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(d2.toString());
|
||||||
description.append(" - ").append(d2);
|
description.append(" - ").append(d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1092,7 +1092,7 @@ class Doc_AllocationTax
|
||||||
*/
|
*/
|
||||||
private BigDecimal calcAmount (BigDecimal tax, BigDecimal total, BigDecimal amt, int precision)
|
private BigDecimal calcAmount (BigDecimal tax, BigDecimal total, BigDecimal amt, int precision)
|
||||||
{
|
{
|
||||||
log.fine("Amt=" + amt + " - Total=" + total + ", Tax=" + tax);
|
if (log.isLoggable(Level.FINE)) log.fine("Amt=" + amt + " - Total=" + total + ", Tax=" + tax);
|
||||||
if (tax.signum() == 0
|
if (tax.signum() == 0
|
||||||
|| total.signum() == 0
|
|| total.signum() == 0
|
||||||
|| amt.signum() == 0)
|
|| amt.signum() == 0)
|
||||||
|
@ -1102,7 +1102,7 @@ class Doc_AllocationTax
|
||||||
BigDecimal retValue = multiplier.multiply(amt);
|
BigDecimal retValue = multiplier.multiply(amt);
|
||||||
if (retValue.scale() > precision)
|
if (retValue.scale() > precision)
|
||||||
retValue = retValue.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
retValue = retValue.setScale(precision, BigDecimal.ROUND_HALF_UP);
|
||||||
log.fine(retValue + " (Mult=" + multiplier + "(Prec=" + precision + ")");
|
if (log.isLoggable(Level.FINE)) log.fine(retValue + " (Mult=" + multiplier + "(Prec=" + precision + ")");
|
||||||
return retValue;
|
return retValue;
|
||||||
} // calcAmount
|
} // calcAmount
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.compiere.acct;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MAccount;
|
import org.compiere.model.MAccount;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
|
@ -79,7 +80,7 @@ public class Doc_BankStatement extends Doc
|
||||||
|
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
p_lines = loadLines(bs);
|
p_lines = loadLines(bs);
|
||||||
log.fine("Lines=" + p_lines.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -132,7 +133,7 @@ public class Doc_BankStatement extends Doc
|
||||||
}
|
}
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
//
|
//
|
||||||
log.fine(toString() + " Balance=" + retValue + sb.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getBalance
|
} // getBalance
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class Doc_Cash extends Doc
|
||||||
|
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
p_lines = loadLines(cash, cb);
|
p_lines = loadLines(cash, cb);
|
||||||
log.fine("Lines=" + p_lines.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ public class Doc_Cash extends Doc
|
||||||
}
|
}
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
//
|
//
|
||||||
log.fine(toString() + " Balance=" + retValue + sb.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
|
||||||
// return retValue;
|
// return retValue;
|
||||||
return Env.ZERO; // Lines are balanced
|
return Env.ZERO; // Lines are balanced
|
||||||
} // getBalance
|
} // getBalance
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class Doc_GLJournal extends Doc
|
||||||
|
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
p_lines = loadLines(journal);
|
p_lines = loadLines(journal);
|
||||||
log.fine("Lines=" + p_lines.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ public class Doc_GLJournal extends Doc
|
||||||
}
|
}
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
//
|
//
|
||||||
log.fine(toString() + " Balance=" + retValue + sb.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getBalance
|
} // getBalance
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class Doc_InOut extends Doc
|
||||||
m_DocStatus = inout.getDocStatus();
|
m_DocStatus = inout.getDocStatus();
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
p_lines = loadLines(inout);
|
p_lines = loadLines(inout);
|
||||||
log.fine("Lines=" + p_lines.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public class Doc_InOut extends Doc
|
||||||
int PP_Cost_Collector_ID = DB.getSQLValueEx(getTrxName(), sql, new Object[]{line.getC_OrderLine_ID()});
|
int PP_Cost_Collector_ID = DB.getSQLValueEx(getTrxName(), sql, new Object[]{line.getC_OrderLine_ID()});
|
||||||
docLine.setPP_Cost_Collector_ID(PP_Cost_Collector_ID);
|
docLine.setPP_Cost_Collector_ID(PP_Cost_Collector_ID);
|
||||||
//
|
//
|
||||||
log.fine(docLine.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
|
||||||
list.add (docLine);
|
list.add (docLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ public class Doc_InOut extends Doc
|
||||||
{
|
{
|
||||||
int stdPrecision = MCurrency.getStdPrecision(getCtx(), C_Currency_ID);
|
int stdPrecision = MCurrency.getStdPrecision(getCtx(), C_Currency_ID);
|
||||||
BigDecimal costTax = tax.calculateTax(costs, true, stdPrecision);
|
BigDecimal costTax = tax.calculateTax(costs, true, stdPrecision);
|
||||||
log.fine("Costs=" + costs + " - Tax=" + costTax);
|
if (log.isLoggable(Level.FINE)) log.fine("Costs=" + costs + " - Tax=" + costTax);
|
||||||
costs = costs.subtract(costTax);
|
costs = costs.subtract(costTax);
|
||||||
}
|
}
|
||||||
} // correct included Tax
|
} // correct included Tax
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.compiere.acct;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MAccount;
|
import org.compiere.model.MAccount;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
|
@ -72,7 +73,7 @@ public class Doc_Inventory extends Doc
|
||||||
m_DocStatus = inventory.getDocStatus();
|
m_DocStatus = inventory.getDocStatus();
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
p_lines = loadLines(inventory);
|
p_lines = loadLines(inventory);
|
||||||
log.fine("Lines=" + p_lines.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -105,7 +106,7 @@ public class Doc_Inventory extends Doc
|
||||||
}
|
}
|
||||||
docLine.setQty (Qty, false); // -5 => -5
|
docLine.setQty (Qty, false); // -5 => -5
|
||||||
docLine.setReversalLine_ID(line.getReversalLine_ID());
|
docLine.setReversalLine_ID(line.getReversalLine_ID());
|
||||||
log.fine(docLine.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
|
||||||
list.add (docLine);
|
list.add (docLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class Doc_Invoice extends Doc
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
m_taxes = loadTaxes();
|
m_taxes = loadTaxes();
|
||||||
p_lines = loadLines(invoice);
|
p_lines = loadLines(invoice);
|
||||||
log.fine("Lines=" + p_lines.length + ", Taxes=" + m_taxes.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length + ", Taxes=" + m_taxes.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class Doc_Invoice extends Doc
|
||||||
//
|
//
|
||||||
DocTax taxLine = new DocTax(C_Tax_ID, name, rate,
|
DocTax taxLine = new DocTax(C_Tax_ID, name, rate,
|
||||||
taxBaseAmt, amount, salesTax);
|
taxBaseAmt, amount, salesTax);
|
||||||
log.fine(taxLine.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(taxLine.toString());
|
||||||
list.add(taxLine);
|
list.add(taxLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ public class Doc_Invoice extends Doc
|
||||||
if (!tax.isZeroTax())
|
if (!tax.isZeroTax())
|
||||||
{
|
{
|
||||||
BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, getStdPrecision());
|
BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, getStdPrecision());
|
||||||
log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax);
|
if (log.isLoggable(Level.FINE)) log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax);
|
||||||
LineNetAmt = LineNetAmt.subtract(LineNetAmtTax);
|
LineNetAmt = LineNetAmt.subtract(LineNetAmtTax);
|
||||||
for (int t = 0; t < m_taxes.length; t++)
|
for (int t = 0; t < m_taxes.length; t++)
|
||||||
{
|
{
|
||||||
|
@ -194,7 +194,7 @@ public class Doc_Invoice extends Doc
|
||||||
else
|
else
|
||||||
m_allLinesItem = false;
|
m_allLinesItem = false;
|
||||||
//
|
//
|
||||||
log.fine(docLine.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
|
||||||
list.add(docLine);
|
list.add(docLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ public class Doc_Invoice extends Doc
|
||||||
}
|
}
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
//
|
//
|
||||||
log.fine(toString() + " Balance=" + retValue + sb.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getBalance
|
} // getBalance
|
||||||
|
|
||||||
|
@ -914,7 +914,7 @@ public class Doc_Invoice extends Doc
|
||||||
.append(" AND po.M_Product_ID=il.M_Product_ID AND po.C_BPartner_ID=i.C_BPartner_ID")
|
.append(" AND po.M_Product_ID=il.M_Product_ID AND po.C_BPartner_ID=i.C_BPartner_ID")
|
||||||
.append(" AND i.C_Invoice_ID=").append(get_ID()).append(")");
|
.append(" AND i.C_Invoice_ID=").append(get_ID()).append(")");
|
||||||
int no = DB.executeUpdate(sql.toString(), getTrxName());
|
int no = DB.executeUpdate(sql.toString(), getTrxName());
|
||||||
log.fine("Updated=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated=" + no);
|
||||||
} // updateProductPO
|
} // updateProductPO
|
||||||
|
|
||||||
} // Doc_Invoice
|
} // Doc_Invoice
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.compiere.acct;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MAccount;
|
import org.compiere.model.MAccount;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
|
@ -131,7 +132,7 @@ public class Doc_MatchInv extends Doc
|
||||||
|| getQty().signum() == 0
|
|| getQty().signum() == 0
|
||||||
|| m_receiptLine.getMovementQty().signum() == 0) // Qty = 0
|
|| m_receiptLine.getMovementQty().signum() == 0) // Qty = 0
|
||||||
{
|
{
|
||||||
log.fine("No Product/Qty - M_Product_ID=" + getM_Product_ID()
|
if (log.isLoggable(Level.FINE)) log.fine("No Product/Qty - M_Product_ID=" + getM_Product_ID()
|
||||||
+ ",Qty=" + getQty() + ",InOutQty=" + m_receiptLine.getMovementQty());
|
+ ",Qty=" + getQty() + ",InOutQty=" + m_receiptLine.getMovementQty());
|
||||||
return facts;
|
return facts;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +179,7 @@ public class Doc_MatchInv extends Doc
|
||||||
p_Error = "Mat.Receipt not posted yet";
|
p_Error = "Mat.Receipt not posted yet";
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
log.fine("CR - Amt(" + temp + "->" + dr.getAcctBalance()
|
if (log.isLoggable(Level.FINE)) log.fine("CR - Amt(" + temp + "->" + dr.getAcctBalance()
|
||||||
+ ") - " + dr.toString());
|
+ ") - " + dr.toString());
|
||||||
|
|
||||||
// InventoryClearing CR
|
// InventoryClearing CR
|
||||||
|
@ -201,7 +202,7 @@ public class Doc_MatchInv extends Doc
|
||||||
as.getC_Currency_ID(), null, LineNetAmt); // updated below
|
as.getC_Currency_ID(), null, LineNetAmt); // updated below
|
||||||
if (cr == null)
|
if (cr == null)
|
||||||
{
|
{
|
||||||
log.fine("Line Net Amt=0 - M_Product_ID=" + getM_Product_ID()
|
if (log.isLoggable(Level.FINE)) log.fine("Line Net Amt=0 - M_Product_ID=" + getM_Product_ID()
|
||||||
+ ",Qty=" + getQty() + ",InOutQty=" + m_receiptLine.getMovementQty());
|
+ ",Qty=" + getQty() + ",InOutQty=" + m_receiptLine.getMovementQty());
|
||||||
|
|
||||||
// Invoice Price Variance
|
// Invoice Price Variance
|
||||||
|
@ -222,7 +223,7 @@ public class Doc_MatchInv extends Doc
|
||||||
pv.setUser1_ID(m_invoiceLine.getUser1_ID());
|
pv.setUser1_ID(m_invoiceLine.getUser1_ID());
|
||||||
pv.setUser2_ID(m_invoiceLine.getUser2_ID());
|
pv.setUser2_ID(m_invoiceLine.getUser2_ID());
|
||||||
}
|
}
|
||||||
log.fine("IPV=" + ipv + "; Balance=" + fact.getSourceBalance());
|
if (log.isLoggable(Level.FINE)) log.fine("IPV=" + ipv + "; Balance=" + fact.getSourceBalance());
|
||||||
facts.add(fact);
|
facts.add(fact);
|
||||||
return facts;
|
return facts;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +236,7 @@ public class Doc_MatchInv extends Doc
|
||||||
p_Error = "Invoice not posted yet";
|
p_Error = "Invoice not posted yet";
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
log.fine("DR - Amt(" + temp + "->" + cr.getAcctBalance()
|
if (log.isLoggable(Level.FINE)) log.fine("DR - Amt(" + temp + "->" + cr.getAcctBalance()
|
||||||
+ ") - " + cr.toString());
|
+ ") - " + cr.toString());
|
||||||
}
|
}
|
||||||
else // Cash Acct
|
else // Cash Acct
|
||||||
|
@ -303,7 +304,7 @@ public class Doc_MatchInv extends Doc
|
||||||
pv.setUser1_ID(m_invoiceLine.getUser1_ID());
|
pv.setUser1_ID(m_invoiceLine.getUser1_ID());
|
||||||
pv.setUser2_ID(m_invoiceLine.getUser2_ID());
|
pv.setUser2_ID(m_invoiceLine.getUser2_ID());
|
||||||
}
|
}
|
||||||
log.fine("IPV=" + ipv + "; Balance=" + fact.getSourceBalance());
|
if (log.isLoggable(Level.FINE)) log.fine("IPV=" + ipv + "; Balance=" + fact.getSourceBalance());
|
||||||
|
|
||||||
String error = createMatchInvCostDetail(as);
|
String error = createMatchInvCostDetail(as);
|
||||||
if (error != null && error.trim().length() > 0)
|
if (error != null && error.trim().length() > 0)
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class Doc_MatchPO extends Doc
|
||||||
|| getQty().signum() == 0
|
|| getQty().signum() == 0
|
||||||
|| m_M_InOutLine_ID == 0) // No posting if not matched to Shipment
|
|| m_M_InOutLine_ID == 0) // No posting if not matched to Shipment
|
||||||
{
|
{
|
||||||
log.fine("No Product/Qty - M_Product_ID=" + getM_Product_ID()
|
if (log.isLoggable(Level.FINE)) log.fine("No Product/Qty - M_Product_ID=" + getM_Product_ID()
|
||||||
+ ",Qty=" + getQty());
|
+ ",Qty=" + getQty());
|
||||||
return facts;
|
return facts;
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ public class Doc_MatchPO extends Doc
|
||||||
{
|
{
|
||||||
int stdPrecision = MCurrency.getStdPrecision(getCtx(), m_oLine.getC_Currency_ID());
|
int stdPrecision = MCurrency.getStdPrecision(getCtx(), m_oLine.getC_Currency_ID());
|
||||||
BigDecimal costTax = tax.calculateTax(poCost, true, stdPrecision);
|
BigDecimal costTax = tax.calculateTax(poCost, true, stdPrecision);
|
||||||
log.fine("Costs=" + poCost + " - Tax=" + costTax);
|
if (log.isLoggable(Level.FINE)) log.fine("Costs=" + poCost + " - Tax=" + costTax);
|
||||||
poCost = poCost.subtract(costTax);
|
poCost = poCost.subtract(costTax);
|
||||||
}
|
}
|
||||||
} // correct included Tax
|
} // correct included Tax
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.compiere.acct;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
import org.compiere.model.MCostDetail;
|
import org.compiere.model.MCostDetail;
|
||||||
|
@ -69,7 +70,7 @@ public class Doc_Movement extends Doc
|
||||||
m_DocStatus = move.getDocStatus();
|
m_DocStatus = move.getDocStatus();
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
p_lines = loadLines(move);
|
p_lines = loadLines(move);
|
||||||
log.fine("Lines=" + p_lines.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -88,7 +89,7 @@ public class Doc_Movement extends Doc
|
||||||
DocLine docLine = new DocLine (line, this);
|
DocLine docLine = new DocLine (line, this);
|
||||||
docLine.setQty(line.getMovementQty(), false);
|
docLine.setQty(line.getMovementQty(), false);
|
||||||
docLine.setReversalLine_ID(line.getReversalLine_ID());
|
docLine.setReversalLine_ID(line.getReversalLine_ID());
|
||||||
log.fine(docLine.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
|
||||||
list.add (docLine);
|
list.add (docLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class Doc_Order extends Doc
|
||||||
if (!tax.isZeroTax())
|
if (!tax.isZeroTax())
|
||||||
{
|
{
|
||||||
BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, getStdPrecision());
|
BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, getStdPrecision());
|
||||||
log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax);
|
if (log.isLoggable(Level.FINE)) log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax);
|
||||||
LineNetAmt = LineNetAmt.subtract(LineNetAmtTax);
|
LineNetAmt = LineNetAmt.subtract(LineNetAmtTax);
|
||||||
for (int t = 0; t < m_taxes.length; t++)
|
for (int t = 0; t < m_taxes.length; t++)
|
||||||
{
|
{
|
||||||
|
@ -311,11 +311,11 @@ public class Doc_Order extends Doc
|
||||||
if (retValue.signum() != 0 // Sum of Cost(vs. Price) in lines may not add up
|
if (retValue.signum() != 0 // Sum of Cost(vs. Price) in lines may not add up
|
||||||
&& getDocumentType().equals(DOCTYPE_POrder)) // PO
|
&& getDocumentType().equals(DOCTYPE_POrder)) // PO
|
||||||
{
|
{
|
||||||
log.fine(toString() + " Balance=" + retValue + sb.toString() + " (ignored)");
|
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString() + " (ignored)");
|
||||||
retValue = Env.ZERO;
|
retValue = Env.ZERO;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
log.fine(toString() + " Balance=" + retValue + sb.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getBalance
|
} // getBalance
|
||||||
|
|
||||||
|
@ -486,7 +486,7 @@ public class Doc_Order extends Doc
|
||||||
.append(" AND po.M_Product_ID=ol.M_Product_ID AND po.C_BPartner_ID=o.C_BPartner_ID")
|
.append(" AND po.M_Product_ID=ol.M_Product_ID AND po.C_BPartner_ID=o.C_BPartner_ID")
|
||||||
.append(" AND o.C_Order_ID=").append(get_ID()).append(")");
|
.append(" AND o.C_Order_ID=").append(get_ID()).append(")");
|
||||||
int no = DB.executeUpdate(sql.toString(), getTrxName());
|
int no = DB.executeUpdate(sql.toString(), getTrxName());
|
||||||
log.fine("Updated=" + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Updated=" + no);
|
||||||
} // updateProductPO
|
} // updateProductPO
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class Doc_Production extends Doc
|
||||||
setDateAcct(prod.getMovementDate());
|
setDateAcct(prod.getMovementDate());
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
p_lines = loadLines(prod);
|
p_lines = loadLines(prod);
|
||||||
log.fine("Lines=" + p_lines.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public class Doc_Production extends Doc
|
||||||
// Identify finished BOM Product
|
// Identify finished BOM Product
|
||||||
docLine.setProductionBOM(line.getM_Product_ID() == prod.getM_Product_ID());
|
docLine.setProductionBOM(line.getM_Product_ID() == prod.getM_Product_ID());
|
||||||
//
|
//
|
||||||
log.fine(docLine.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
|
||||||
list.add (docLine);
|
list.add (docLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class Doc_ProjectIssue extends Doc
|
||||||
// Pseudo Line Check
|
// Pseudo Line Check
|
||||||
if (m_line.getM_Product_ID() == 0)
|
if (m_line.getM_Product_ID() == 0)
|
||||||
log.warning(m_line.toString() + " - No Product");
|
log.warning(m_line.toString() + " - No Product");
|
||||||
log.fine(m_line.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(m_line.toString());
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ public class Doc_ProjectIssue extends Doc
|
||||||
if (rs.next())
|
if (rs.next())
|
||||||
{
|
{
|
||||||
retValue = rs.getBigDecimal(1);
|
retValue = rs.getBigDecimal(1);
|
||||||
log.fine("POCost = " + retValue);
|
if (log.isLoggable(Level.FINE)) log.fine("POCost = " + retValue);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
log.warning("Not found for M_InOutLine_ID=" + m_issue.getM_InOutLine_ID());
|
log.warning("Not found for M_InOutLine_ID=" + m_issue.getM_InOutLine_ID());
|
||||||
|
@ -232,7 +232,7 @@ public class Doc_ProjectIssue extends Doc
|
||||||
retValue = rs.getBigDecimal(1);
|
retValue = rs.getBigDecimal(1);
|
||||||
qty = rs.getBigDecimal(2);
|
qty = rs.getBigDecimal(2);
|
||||||
retValue = retValue.multiply(qty);
|
retValue = retValue.multiply(qty);
|
||||||
log.fine("ExpLineCost = " + retValue);
|
if (log.isLoggable(Level.FINE)) log.fine("ExpLineCost = " + retValue);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
log.warning("Not found for S_TimeExpenseLine_ID=" + m_issue.getS_TimeExpenseLine_ID());
|
log.warning("Not found for S_TimeExpenseLine_ID=" + m_issue.getS_TimeExpenseLine_ID());
|
||||||
|
|
|
@ -137,11 +137,11 @@ public final class Fact
|
||||||
{
|
{
|
||||||
if (docLine == null || docLine.getQty() == null || docLine.getQty().signum() == 0)
|
if (docLine == null || docLine.getQty() == null || docLine.getQty().signum() == 0)
|
||||||
{
|
{
|
||||||
log.fine("Both amounts & qty = 0/Null - " + docLine
|
if (log.isLoggable(Level.FINE)) log.fine("Both amounts & qty = 0/Null - " + docLine
|
||||||
+ " - " + toString());
|
+ " - " + toString());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
log.fine("Both amounts = 0/Null, Qty=" + docLine.getQty() + " - " + docLine
|
if (log.isLoggable(Level.FINE)) log.fine("Both amounts = 0/Null, Qty=" + docLine.getQty() + " - " + docLine
|
||||||
+ " - " + toString());
|
+ " - " + toString());
|
||||||
}
|
}
|
||||||
// Convert
|
// Convert
|
||||||
|
@ -151,7 +151,7 @@ public final class Fact
|
||||||
&& (docLine.getAmtAcctDr() != null || docLine.getAmtAcctCr() != null))
|
&& (docLine.getAmtAcctDr() != null || docLine.getAmtAcctCr() != null))
|
||||||
line.setAmtAcct(docLine.getAmtAcctDr(), docLine.getAmtAcctCr());
|
line.setAmtAcct(docLine.getAmtAcctDr(), docLine.getAmtAcctCr());
|
||||||
//
|
//
|
||||||
log.fine(line.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
|
||||||
add(line);
|
add(line);
|
||||||
return line;
|
return line;
|
||||||
} // createLine
|
} // createLine
|
||||||
|
@ -310,7 +310,7 @@ public final class Fact
|
||||||
// Convert
|
// Convert
|
||||||
line.convert();
|
line.convert();
|
||||||
//
|
//
|
||||||
log.fine(line.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
|
||||||
m_lines.add(line);
|
m_lines.add(line);
|
||||||
return line;
|
return line;
|
||||||
} // balancingSource
|
} // balancingSource
|
||||||
|
@ -412,7 +412,7 @@ public final class Fact
|
||||||
if (m_lines.size() == 0)
|
if (m_lines.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
log.fine ("(" + elementType + ") - " + toString());
|
if (log.isLoggable(Level.FINE)) log.fine ("(" + elementType + ") - " + toString());
|
||||||
|
|
||||||
// Org
|
// Org
|
||||||
if (elementType.equals(MAcctSchemaElement.ELEMENTTYPE_Organization))
|
if (elementType.equals(MAcctSchemaElement.ELEMENTTYPE_Organization))
|
||||||
|
@ -481,7 +481,7 @@ public final class Fact
|
||||||
line.setAD_Org_ID(key.intValue());
|
line.setAD_Org_ID(key.intValue());
|
||||||
//
|
//
|
||||||
m_lines.add(line);
|
m_lines.add(line);
|
||||||
log.fine("(" + elementType + ") - " + line);
|
if (log.isLoggable(Level.FINE)) log.fine("(" + elementType + ") - " + line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.clear();
|
map.clear();
|
||||||
|
@ -536,7 +536,7 @@ public final class Fact
|
||||||
public FactLine balanceAccounting()
|
public FactLine balanceAccounting()
|
||||||
{
|
{
|
||||||
BigDecimal diff = getAcctBalance(); // DR-CR
|
BigDecimal diff = getAcctBalance(); // DR-CR
|
||||||
log.fine("Balance=" + diff
|
if (log.isLoggable(Level.FINE)) log.fine("Balance=" + diff
|
||||||
+ ", CurrBal=" + m_acctSchema.isCurrencyBalancing()
|
+ ", CurrBal=" + m_acctSchema.isCurrencyBalancing()
|
||||||
+ " - " + toString());
|
+ " - " + toString());
|
||||||
FactLine line = null;
|
FactLine line = null;
|
||||||
|
@ -598,7 +598,7 @@ public final class Fact
|
||||||
drAmt = difference.negate();
|
drAmt = difference.negate();
|
||||||
}
|
}
|
||||||
line.setAmtAcct(drAmt, crAmt);
|
line.setAmtAcct(drAmt, crAmt);
|
||||||
log.fine(line.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
|
||||||
m_lines.add(line);
|
m_lines.add(line);
|
||||||
}
|
}
|
||||||
else // Adjust biggest (Balance Sheet) line amount
|
else // Adjust biggest (Balance Sheet) line amount
|
||||||
|
@ -611,9 +611,9 @@ public final class Fact
|
||||||
log.severe ("No Line found");
|
log.severe ("No Line found");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log.fine("Adjusting Amt=" + diff + "; Line=" + line);
|
if (log.isLoggable(Level.FINE)) log.fine("Adjusting Amt=" + diff + "; Line=" + line);
|
||||||
line.currencyCorrect(diff);
|
line.currencyCorrect(diff);
|
||||||
log.fine(line.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
|
||||||
}
|
}
|
||||||
} // correct biggest amount
|
} // correct biggest amount
|
||||||
|
|
||||||
|
|
|
@ -653,7 +653,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
boolean negative = deltaAmount.compareTo(Env.ZERO) < 0;
|
boolean negative = deltaAmount.compareTo(Env.ZERO) < 0;
|
||||||
boolean adjustDr = getAmtAcctDr().abs().compareTo(getAmtAcctCr().abs()) > 0;
|
boolean adjustDr = getAmtAcctDr().abs().compareTo(getAmtAcctCr().abs()) > 0;
|
||||||
|
|
||||||
log.fine(deltaAmount.toString()
|
if (log.isLoggable(Level.FINE)) log.fine(deltaAmount.toString()
|
||||||
+ "; Old-AcctDr=" + getAmtAcctDr() + ",AcctCr=" + getAmtAcctCr()
|
+ "; Old-AcctDr=" + getAmtAcctDr() + ",AcctCr=" + getAmtAcctCr()
|
||||||
+ "; Negative=" + negative + "; AdjustDr=" + adjustDr);
|
+ "; Negative=" + negative + "; AdjustDr=" + adjustDr);
|
||||||
|
|
||||||
|
@ -668,7 +668,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
else
|
else
|
||||||
setAmtAcctCr (getAmtAcctCr().add(deltaAmount));
|
setAmtAcctCr (getAmtAcctCr().add(deltaAmount));
|
||||||
|
|
||||||
log.fine("New-AcctDr=" + getAmtAcctDr() + ",AcctCr=" + getAmtAcctCr());
|
if (log.isLoggable(Level.FINE)) log.fine("New-AcctDr=" + getAmtAcctDr() + ",AcctCr=" + getAmtAcctCr());
|
||||||
} // currencyCorrect
|
} // currencyCorrect
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -859,7 +859,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
if (super.getC_SalesRegion_ID() != 0) // save in VO
|
if (super.getC_SalesRegion_ID() != 0) // save in VO
|
||||||
{
|
{
|
||||||
m_doc.setBP_C_SalesRegion_ID(super.getC_SalesRegion_ID());
|
m_doc.setBP_C_SalesRegion_ID(super.getC_SalesRegion_ID());
|
||||||
log.fine("C_SalesRegion_ID=" + super.getC_SalesRegion_ID() + " (from BPL)" );
|
if (log.isLoggable(Level.FINE)) log.fine("C_SalesRegion_ID=" + super.getC_SalesRegion_ID() + " (from BPL)" );
|
||||||
}
|
}
|
||||||
else // From Sales Rep of Document -> Sales Region
|
else // From Sales Rep of Document -> Sales Region
|
||||||
{
|
{
|
||||||
|
@ -869,7 +869,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
if (super.getC_SalesRegion_ID() != 0) // save in VO
|
if (super.getC_SalesRegion_ID() != 0) // save in VO
|
||||||
{
|
{
|
||||||
m_doc.setBP_C_SalesRegion_ID(super.getC_SalesRegion_ID());
|
m_doc.setBP_C_SalesRegion_ID(super.getC_SalesRegion_ID());
|
||||||
log.fine("C_SalesRegion_ID=" + super.getC_SalesRegion_ID() + " (from SR)" );
|
if (log.isLoggable(Level.FINE)) log.fine("C_SalesRegion_ID=" + super.getC_SalesRegion_ID() + " (from SR)" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_doc.setBP_C_SalesRegion_ID(-2); // don't try again
|
m_doc.setBP_C_SalesRegion_ID(-2); // don't try again
|
||||||
|
@ -896,7 +896,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
{
|
{
|
||||||
if (newRecord)
|
if (newRecord)
|
||||||
{
|
{
|
||||||
log.fine(toString());
|
if (log.isLoggable(Level.FINE)) log.fine(toString());
|
||||||
//
|
//
|
||||||
getAD_Org_ID();
|
getAD_Org_ID();
|
||||||
getC_SalesRegion_ID();
|
getC_SalesRegion_ID();
|
||||||
|
@ -985,7 +985,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
int C_Campaign_ID, int C_Activity_ID,
|
int C_Campaign_ID, int C_Activity_ID,
|
||||||
int User1_ID, int User2_ID, int UserElement1_ID, int UserElement2_ID)
|
int User1_ID, int User2_ID, int UserElement1_ID, int UserElement2_ID)
|
||||||
{
|
{
|
||||||
log.fine("From Accout_ID=" + Account_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("From Accout_ID=" + Account_ID);
|
||||||
// get VC for P_Revenue (from Product)
|
// get VC for P_Revenue (from Product)
|
||||||
MAccount revenue = MAccount.get(getCtx(),
|
MAccount revenue = MAccount.get(getCtx(),
|
||||||
AD_Client_ID, AD_Org_ID, getC_AcctSchema_ID(), Account_ID, C_SubAcct_ID,
|
AD_Client_ID, AD_Org_ID, getC_AcctSchema_ID(), Account_ID, C_SubAcct_ID,
|
||||||
|
@ -1050,7 +1050,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
log.severe ("Plan NOT created");
|
log.severe ("Plan NOT created");
|
||||||
return Account_ID;
|
return Account_ID;
|
||||||
}
|
}
|
||||||
log.fine("From Acctount_ID=" + Account_ID + " to " + new_Account_ID
|
if (log.isLoggable(Level.FINE)) log.fine("From Acctount_ID=" + Account_ID + " to " + new_Account_ID
|
||||||
+ " - Plan from UnearnedRevenue_Acct=" + UnearnedRevenue_Acct + " to Revenue_Acct=" + P_Revenue_Acct);
|
+ " - Plan from UnearnedRevenue_Acct=" + UnearnedRevenue_Acct + " to Revenue_Acct=" + P_Revenue_Acct);
|
||||||
return new_Account_ID;
|
return new_Account_ID;
|
||||||
} // createRevenueRecognition
|
} // createRevenueRecognition
|
||||||
|
@ -1114,7 +1114,7 @@ public final class FactLine extends X_Fact_Acct
|
||||||
// end Bayu Sistematika
|
// end Bayu Sistematika
|
||||||
//
|
//
|
||||||
success = true;
|
success = true;
|
||||||
log.fine(new StringBuilder("(Table=").append(AD_Table_ID)
|
if (log.isLoggable(Level.FINE)) log.fine(new StringBuilder("(Table=").append(AD_Table_ID)
|
||||||
.append(",Record_ID=").append(Record_ID)
|
.append(",Record_ID=").append(Record_ID)
|
||||||
.append(",Line=").append(Record_ID)
|
.append(",Line=").append(Record_ID)
|
||||||
.append(", Account=").append(m_acct)
|
.append(", Account=").append(m_acct)
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class Matcher
|
||||||
DB.close(rs, pstmt);
|
DB.close(rs, pstmt);
|
||||||
rs = null; pstmt = null;
|
rs = null; pstmt = null;
|
||||||
}
|
}
|
||||||
log.fine("Matcher.match - Client_ID=" + m_AD_Client_ID
|
if (log.isLoggable(Level.FINE)) log.fine("Matcher.match - Client_ID=" + m_AD_Client_ID
|
||||||
+ ", Records created=" + counter);
|
+ ", Records created=" + counter);
|
||||||
return counter;
|
return counter;
|
||||||
} // match
|
} // match
|
||||||
|
@ -152,7 +152,7 @@ public class Matcher
|
||||||
int M_InOutLine_ID, int C_InvoiceLine_ID,
|
int M_InOutLine_ID, int C_InvoiceLine_ID,
|
||||||
int M_Product_ID, Timestamp DateTrx, BigDecimal Qty)
|
int M_Product_ID, Timestamp DateTrx, BigDecimal Qty)
|
||||||
{
|
{
|
||||||
log.fine("InvLine=" + C_InvoiceLine_ID + ",Rec=" + M_InOutLine_ID + ", Qty=" + Qty + ", " + DateTrx);
|
if (log.isLoggable(Level.FINE)) log.fine("InvLine=" + C_InvoiceLine_ID + ",Rec=" + M_InOutLine_ID + ", Qty=" + Qty + ", " + DateTrx);
|
||||||
|
|
||||||
// MMatchInv inv = new MMatchInv ();
|
// MMatchInv inv = new MMatchInv ();
|
||||||
int M_MatchInv_ID = DB.getNextID (AD_Client_ID, "M_MatchInv", m_trxName);
|
int M_MatchInv_ID = DB.getNextID (AD_Client_ID, "M_MatchInv", m_trxName);
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class WebProjectDeploy extends SvrProcess
|
||||||
{
|
{
|
||||||
String name = container.getName();
|
String name = container.getName();
|
||||||
if (container.delete(true))
|
if (container.delete(true))
|
||||||
log.fine("Deleted: " + name);
|
if (log.isLoggable(Level.FINE)) log.fine("Deleted: " + name);
|
||||||
else // e.g. was referenced
|
else // e.g. was referenced
|
||||||
{
|
{
|
||||||
log.warning("Failed Delete: " + name);
|
log.warning("Failed Delete: " + name);
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class CConnection implements Serializable, Cloneable
|
||||||
s_cc = new CConnection (null);
|
s_cc = new CConnection (null);
|
||||||
s_cc.setAttributes (attributes);
|
s_cc.setAttributes (attributes);
|
||||||
}
|
}
|
||||||
log.fine(s_cc.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(s_cc.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return s_cc;
|
return s_cc;
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class StatementProxy implements InvocationHandler {
|
||||||
}
|
}
|
||||||
if (logOperation != null) {
|
if (logOperation != null) {
|
||||||
logSql = logSql.substring(0, logSql.indexOf(' '));
|
logSql = logSql.substring(0, logSql.indexOf(' '));
|
||||||
log.fine((DisplayType.getDateFormat(DisplayType.DateTime)).format(new Date(System.currentTimeMillis()))+","+logOperation+","+logSql+","+(p_vo.getTrxName() != null ? p_vo.getTrxName() : "")+" (begin)");
|
if (log.isLoggable(Level.FINE)) log.fine((DisplayType.getDateFormat(DisplayType.DateTime)).format(new Date(System.currentTimeMillis()))+","+logOperation+","+logSql+","+(p_vo.getTrxName() != null ? p_vo.getTrxName() : "")+" (begin)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ public abstract class Convert
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_verbose)
|
if (m_verbose)
|
||||||
log.fine("- ok " + no);
|
if (log.isLoggable(Level.FINE)) log.fine("- ok " + no);
|
||||||
}
|
}
|
||||||
catch (SQLException ex)
|
catch (SQLException ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -414,7 +414,7 @@ public final class ImpFormat
|
||||||
list.add(entry.toString());
|
list.add(entry.toString());
|
||||||
//
|
//
|
||||||
if (trace)
|
if (trace)
|
||||||
log.fine(info + "=>" + entry.toString() + " (Length=" + info.length() + ")");
|
if (log.isLoggable(Level.FINE)) log.fine(info + "=>" + entry.toString() + " (Length=" + info.length() + ")");
|
||||||
} // for all columns
|
} // for all columns
|
||||||
|
|
||||||
String[] retValue = new String[list.size()];
|
String[] retValue = new String[list.size()];
|
||||||
|
|
|
@ -20,7 +20,6 @@ import java.util.ArrayList;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.util.CLogMgt;
|
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,8 +116,7 @@ public class AccessSqlParser
|
||||||
m_tableInfo.add(info);
|
m_tableInfo.add(info);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (CLogMgt.isLevelFinest())
|
if (log.isLoggable(Level.FINE)) log.fine(toString());
|
||||||
log.fine(toString());
|
|
||||||
return m_tableInfo.size() > 0;
|
return m_tableInfo.size() > 0;
|
||||||
} // parse
|
} // parse
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ArchiveDB implements IArchiveStore {
|
||||||
if (deflatedData == null)
|
if (deflatedData == null)
|
||||||
return null;
|
return null;
|
||||||
//
|
//
|
||||||
log.fine("ZipSize=" + deflatedData.length);
|
if (log.isLoggable(Level.FINE)) log.fine("ZipSize=" + deflatedData.length);
|
||||||
if (deflatedData.length == 0)
|
if (deflatedData.length == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ public class ArchiveDB implements IArchiveStore {
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
inflatedData = out.toByteArray();
|
inflatedData = out.toByteArray();
|
||||||
log.fine("Size=" + inflatedData.length + " - zip=" + entry.getCompressedSize()
|
if (log.isLoggable(Level.FINE)) log.fine("Size=" + inflatedData.length + " - zip=" + entry.getCompressedSize()
|
||||||
+ "(" + entry.getSize() + ") "
|
+ "(" + entry.getSize() + ") "
|
||||||
+ (entry.getCompressedSize() * 100 / entry.getSize()) + "%");
|
+ (entry.getCompressedSize() * 100 / entry.getSize()) + "%");
|
||||||
}
|
}
|
||||||
|
@ -93,13 +93,13 @@ public class ArchiveDB implements IArchiveStore {
|
||||||
zip.putNextEntry(entry);
|
zip.putNextEntry(entry);
|
||||||
zip.write(inflatedData, 0, inflatedData.length);
|
zip.write(inflatedData, 0, inflatedData.length);
|
||||||
zip.closeEntry();
|
zip.closeEntry();
|
||||||
log.fine(entry.getCompressedSize() + " (" + entry.getSize() + ") "
|
if (log.isLoggable(Level.FINE)) log.fine(entry.getCompressedSize() + " (" + entry.getSize() + ") "
|
||||||
+ (entry.getCompressedSize() * 100 / entry.getSize()) + "%");
|
+ (entry.getCompressedSize() * 100 / entry.getSize()) + "%");
|
||||||
//
|
//
|
||||||
// zip.finish();
|
// zip.finish();
|
||||||
zip.close();
|
zip.close();
|
||||||
deflatedData = out.toByteArray();
|
deflatedData = out.toByteArray();
|
||||||
log.fine("Length=" + inflatedData.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Length=" + inflatedData.length);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.log(Level.SEVERE, "saveLOBData", e);
|
log.log(Level.SEVERE, "saveLOBData", e);
|
||||||
deflatedData = null;
|
deflatedData = null;
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class ArchiveFileSystem implements IArchiveStore {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String filePath = fileNode.getNodeValue();
|
String filePath = fileNode.getNodeValue();
|
||||||
log.fine("filePath: " + filePath);
|
if (log.isLoggable(Level.FINE)) log.fine("filePath: " + filePath);
|
||||||
if(filePath!=null){
|
if(filePath!=null){
|
||||||
filePath = filePath.replaceFirst(ARCHIVE_FOLDER_PLACEHOLDER, archivePathRoot.replaceAll("\\\\","\\\\\\\\"));
|
filePath = filePath.replaceFirst(ARCHIVE_FOLDER_PLACEHOLDER, archivePathRoot.replaceAll("\\\\","\\\\\\\\"));
|
||||||
//just to be shure...
|
//just to be shure...
|
||||||
|
@ -96,7 +96,7 @@ public class ArchiveFileSystem implements IArchiveStore {
|
||||||
filePath = filePath.replaceAll("/", replaceSeparator);
|
filePath = filePath.replaceAll("/", replaceSeparator);
|
||||||
filePath = filePath.replaceAll("\\\\", replaceSeparator);
|
filePath = filePath.replaceAll("\\\\", replaceSeparator);
|
||||||
}
|
}
|
||||||
log.fine("filePath: " + filePath);
|
if (log.isLoggable(Level.FINE)) log.fine("filePath: " + filePath);
|
||||||
final File file = new File(filePath);
|
final File file = new File(filePath);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
// read files into byte[]
|
// read files into byte[]
|
||||||
|
@ -196,7 +196,7 @@ public class ArchiveFileSystem implements IArchiveStore {
|
||||||
final Transformer xformer = TransformerFactory.newInstance().newTransformer();
|
final Transformer xformer = TransformerFactory.newInstance().newTransformer();
|
||||||
xformer.transform(source, result);
|
xformer.transform(source, result);
|
||||||
final byte[] xmlData = bos.toByteArray();
|
final byte[] xmlData = bos.toByteArray();
|
||||||
log.fine(bos.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(bos.toString());
|
||||||
//store xml in db
|
//store xml in db
|
||||||
archive.setByteData(xmlData);
|
archive.setByteData(xmlData);
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class AttachmentDBSystem implements IAttachmentStore
|
||||||
byte[] data = attach.getBinaryData();
|
byte[] data = attach.getBinaryData();
|
||||||
if (data == null)
|
if (data == null)
|
||||||
return true;
|
return true;
|
||||||
log.fine("ZipSize=" + data.length);
|
if (log.isLoggable(Level.FINE)) log.fine("ZipSize=" + data.length);
|
||||||
if (data.length == 0)
|
if (data.length == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ public class AttachmentDBSystem implements IAttachmentStore
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
byte[] dataEntry = out.toByteArray();
|
byte[] dataEntry = out.toByteArray();
|
||||||
log.fine(name
|
if (log.isLoggable(Level.FINE)) log.fine(name
|
||||||
+ " - size=" + dataEntry.length + " - zip="
|
+ " - size=" + dataEntry.length + " - zip="
|
||||||
+ entry.getCompressedSize() + "(" + entry.getSize() + ") "
|
+ entry.getCompressedSize() + "(" + entry.getSize() + ") "
|
||||||
+ (entry.getCompressedSize()*100/entry.getSize())+ "%");
|
+ (entry.getCompressedSize()*100/entry.getSize())+ "%");
|
||||||
|
@ -113,14 +113,14 @@ public class AttachmentDBSystem implements IAttachmentStore
|
||||||
byte[] data = item.getData();
|
byte[] data = item.getData();
|
||||||
zip.write (data, 0, data.length);
|
zip.write (data, 0, data.length);
|
||||||
zip.closeEntry();
|
zip.closeEntry();
|
||||||
log.fine(entry.getName() + " - "
|
if (log.isLoggable(Level.FINE)) log.fine(entry.getName() + " - "
|
||||||
+ entry.getCompressedSize() + " (" + entry.getSize() + ") "
|
+ entry.getCompressedSize() + " (" + entry.getSize() + ") "
|
||||||
+ (entry.getCompressedSize()*100/entry.getSize())+ "%");
|
+ (entry.getCompressedSize()*100/entry.getSize())+ "%");
|
||||||
}
|
}
|
||||||
// zip.finish();
|
// zip.finish();
|
||||||
zip.close();
|
zip.close();
|
||||||
byte[] zipData = out.toByteArray();
|
byte[] zipData = out.toByteArray();
|
||||||
log.fine("Length=" + zipData.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Length=" + zipData.length);
|
||||||
attach.setBinaryData(zipData);
|
attach.setBinaryData(zipData);
|
||||||
attach.setTitle(MAttachment.ZIP);
|
attach.setTitle(MAttachment.ZIP);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -67,13 +67,13 @@ public class AttachmentFileSystem implements IAttachmentStore {
|
||||||
document.setXmlStandalone(true);
|
document.setXmlStandalone(true);
|
||||||
// create xml entries
|
// create xml entries
|
||||||
for (int i = 0; i < attach.m_items.size(); i++) {
|
for (int i = 0; i < attach.m_items.size(); i++) {
|
||||||
log.fine(attach.m_items.get(i).toString());
|
if (log.isLoggable(Level.FINE)) log.fine(attach.m_items.get(i).toString());
|
||||||
File entryFile = attach.m_items.get(i).getFile();
|
File entryFile = attach.m_items.get(i).getFile();
|
||||||
final String path = entryFile.getAbsolutePath();
|
final String path = entryFile.getAbsolutePath();
|
||||||
// if local file - copy to central attachment folder
|
// if local file - copy to central attachment folder
|
||||||
log.fine(path + " - " + attachmentPathRoot);
|
if (log.isLoggable(Level.FINE)) log.fine(path + " - " + attachmentPathRoot);
|
||||||
if (!path.startsWith(attachmentPathRoot)) {
|
if (!path.startsWith(attachmentPathRoot)) {
|
||||||
log.fine("move file: " + path);
|
if (log.isLoggable(Level.FINE)) log.fine("move file: " + path);
|
||||||
FileChannel in = null;
|
FileChannel in = null;
|
||||||
FileChannel out = null;
|
FileChannel out = null;
|
||||||
try {
|
try {
|
||||||
|
@ -130,7 +130,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
|
||||||
final Transformer xformer = TransformerFactory.newInstance().newTransformer();
|
final Transformer xformer = TransformerFactory.newInstance().newTransformer();
|
||||||
xformer.transform(source, result);
|
xformer.transform(source, result);
|
||||||
final byte[] xmlData = bos.toByteArray();
|
final byte[] xmlData = bos.toByteArray();
|
||||||
log.fine(bos.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(bos.toString());
|
||||||
attach.setBinaryData(xmlData);
|
attach.setBinaryData(xmlData);
|
||||||
attach.setTitle(MAttachment.XML);
|
attach.setTitle(MAttachment.XML);
|
||||||
return true;
|
return true;
|
||||||
|
@ -155,7 +155,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
|
||||||
byte[] data = attach.getBinaryData();
|
byte[] data = attach.getBinaryData();
|
||||||
if (data == null)
|
if (data == null)
|
||||||
return true;
|
return true;
|
||||||
log.fine("TextFileSize=" + data.length);
|
if (log.isLoggable(Level.FINE)) log.fine("TextFileSize=" + data.length);
|
||||||
if (data.length == 0)
|
if (data.length == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -175,9 +175,9 @@ public class AttachmentFileSystem implements IAttachmentStore {
|
||||||
attach.m_items = null;
|
attach.m_items = null;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
log.fine("name: " + nameNode.getNodeValue());
|
if (log.isLoggable(Level.FINE)) log.fine("name: " + nameNode.getNodeValue());
|
||||||
String filePath = fileNode.getNodeValue();
|
String filePath = fileNode.getNodeValue();
|
||||||
log.fine("filePath: " + filePath);
|
if (log.isLoggable(Level.FINE)) log.fine("filePath: " + filePath);
|
||||||
if(filePath!=null){
|
if(filePath!=null){
|
||||||
filePath = filePath.replaceFirst(attach.ATTACHMENT_FOLDER_PLACEHOLDER, attachmentPathRoot.replaceAll("\\\\","\\\\\\\\"));
|
filePath = filePath.replaceFirst(attach.ATTACHMENT_FOLDER_PLACEHOLDER, attachmentPathRoot.replaceAll("\\\\","\\\\\\\\"));
|
||||||
//just to be shure...
|
//just to be shure...
|
||||||
|
@ -188,7 +188,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
|
||||||
filePath = filePath.replaceAll("/", replaceSeparator);
|
filePath = filePath.replaceAll("/", replaceSeparator);
|
||||||
filePath = filePath.replaceAll("\\\\", replaceSeparator);
|
filePath = filePath.replaceAll("\\\\", replaceSeparator);
|
||||||
}
|
}
|
||||||
log.fine("filePath: " + filePath);
|
if (log.isLoggable(Level.FINE)) log.fine("filePath: " + filePath);
|
||||||
final File file = new File(filePath);
|
final File file = new File(filePath);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
// read files into byte[]
|
// read files into byte[]
|
||||||
|
@ -273,7 +273,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
|
||||||
//remove files
|
//remove files
|
||||||
final MAttachmentEntry entry = attach.m_items.get(index);
|
final MAttachmentEntry entry = attach.m_items.get(index);
|
||||||
final File file = entry.getFile();
|
final File file = entry.getFile();
|
||||||
log.fine("delete: " + file.getAbsolutePath());
|
if (log.isLoggable(Level.FINE)) log.fine("delete: " + file.getAbsolutePath());
|
||||||
if (file != null && file.exists()) {
|
if (file != null && file.exists()) {
|
||||||
if (!file.delete()) {
|
if (!file.delete()) {
|
||||||
log.warning("unable to delete " + file.getAbsolutePath());
|
log.warning("unable to delete " + file.getAbsolutePath());
|
||||||
|
|
|
@ -274,7 +274,7 @@ public class GridField
|
||||||
if (m_lookup == null || m_lookup.getValidation().length() == 0)
|
if (m_lookup == null || m_lookup.getValidation().length() == 0)
|
||||||
return true;
|
return true;
|
||||||
//
|
//
|
||||||
log.fine("(" + m_vo.ColumnName + ")");
|
if (log.isLoggable(Level.FINE)) log.fine("(" + m_vo.ColumnName + ")");
|
||||||
m_lookup.refresh();
|
m_lookup.refresh();
|
||||||
return m_lookup.isValidated();
|
return m_lookup.isValidated();
|
||||||
} // refreshLookup
|
} // refreshLookup
|
||||||
|
@ -539,13 +539,13 @@ public class GridField
|
||||||
&& (m_vo.DefaultValue == null || m_vo.DefaultValue.length() == 0))
|
&& (m_vo.DefaultValue == null || m_vo.DefaultValue.length() == 0))
|
||||||
{
|
{
|
||||||
String parent = Env.getContext(m_vo.ctx, m_vo.WindowNo, m_vo.ColumnName);
|
String parent = Env.getContext(m_vo.ctx, m_vo.WindowNo, m_vo.ColumnName);
|
||||||
log.fine("[Parent] " + m_vo.ColumnName + "=" + parent);
|
if (log.isLoggable(Level.FINE)) log.fine("[Parent] " + m_vo.ColumnName + "=" + parent);
|
||||||
return createDefault(parent);
|
return createDefault(parent);
|
||||||
}
|
}
|
||||||
// Always Active
|
// Always Active
|
||||||
if (m_vo.ColumnName.equals("IsActive"))
|
if (m_vo.ColumnName.equals("IsActive"))
|
||||||
{
|
{
|
||||||
log.fine("[IsActive] " + m_vo.ColumnName + "=Y");
|
if (log.isLoggable(Level.FINE)) log.fine("[IsActive] " + m_vo.ColumnName + "=Y");
|
||||||
return "Y";
|
return "Y";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,14 +553,14 @@ public class GridField
|
||||||
if (X_AD_Table.ACCESSLEVEL_SystemOnly.equals(Env.getContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, GridTab.CTX_AccessLevel))
|
if (X_AD_Table.ACCESSLEVEL_SystemOnly.equals(Env.getContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, GridTab.CTX_AccessLevel))
|
||||||
&& (m_vo.ColumnName.equals("AD_Client_ID") || m_vo.ColumnName.equals("AD_Org_ID")))
|
&& (m_vo.ColumnName.equals("AD_Client_ID") || m_vo.ColumnName.equals("AD_Org_ID")))
|
||||||
{
|
{
|
||||||
log.fine("[SystemAccess] " + m_vo.ColumnName + "=0");
|
if (log.isLoggable(Level.FINE)) log.fine("[SystemAccess] " + m_vo.ColumnName + "=0");
|
||||||
return new Integer(0);
|
return new Integer(0);
|
||||||
}
|
}
|
||||||
// Set Org to System, if Client access
|
// Set Org to System, if Client access
|
||||||
else if (X_AD_Table.ACCESSLEVEL_SystemPlusClient.equals(Env.getContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, GridTab.CTX_AccessLevel))
|
else if (X_AD_Table.ACCESSLEVEL_SystemPlusClient.equals(Env.getContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, GridTab.CTX_AccessLevel))
|
||||||
&& m_vo.ColumnName.equals("AD_Org_ID"))
|
&& m_vo.ColumnName.equals("AD_Org_ID"))
|
||||||
{
|
{
|
||||||
log.fine("[ClientAccess] " + m_vo.ColumnName + "=0");
|
if (log.isLoggable(Level.FINE)) log.fine("[ClientAccess] " + m_vo.ColumnName + "=0");
|
||||||
return new Integer(0);
|
return new Integer(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ public class GridField
|
||||||
}
|
}
|
||||||
if (defStr != null && defStr.length() > 0)
|
if (defStr != null && defStr.length() > 0)
|
||||||
{
|
{
|
||||||
log.fine("[SQL] " + m_vo.ColumnName + "=" + defStr);
|
if (log.isLoggable(Level.FINE)) log.fine("[SQL] " + m_vo.ColumnName + "=" + defStr);
|
||||||
return createDefault(defStr);
|
return createDefault(defStr);
|
||||||
}
|
}
|
||||||
} // SQL Statement
|
} // SQL Statement
|
||||||
|
@ -630,7 +630,7 @@ public class GridField
|
||||||
|
|
||||||
if (!defStr.equals(""))
|
if (!defStr.equals(""))
|
||||||
{
|
{
|
||||||
log.fine("[DefaultValue] " + m_vo.ColumnName + "=" + defStr);
|
if (log.isLoggable(Level.FINE)) log.fine("[DefaultValue] " + m_vo.ColumnName + "=" + defStr);
|
||||||
return createDefault(defStr);
|
return createDefault(defStr);
|
||||||
}
|
}
|
||||||
} // while more Tokens
|
} // while more Tokens
|
||||||
|
@ -642,7 +642,7 @@ public class GridField
|
||||||
defStr = Env.getPreference (m_vo.ctx, m_vo.AD_Window_ID, m_vo.ColumnName, false);
|
defStr = Env.getPreference (m_vo.ctx, m_vo.AD_Window_ID, m_vo.ColumnName, false);
|
||||||
if (!defStr.equals(""))
|
if (!defStr.equals(""))
|
||||||
{
|
{
|
||||||
log.fine("[UserPreference] " + m_vo.ColumnName + "=" + defStr);
|
if (log.isLoggable(Level.FINE)) log.fine("[UserPreference] " + m_vo.ColumnName + "=" + defStr);
|
||||||
return createDefault(defStr);
|
return createDefault(defStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ public class GridField
|
||||||
defStr = Env.getPreference (m_vo.ctx, m_vo.AD_Window_ID, m_vo.ColumnName, true);
|
defStr = Env.getPreference (m_vo.ctx, m_vo.AD_Window_ID, m_vo.ColumnName, true);
|
||||||
if (!defStr.equals(""))
|
if (!defStr.equals(""))
|
||||||
{
|
{
|
||||||
log.fine("[SystemPreference] " + m_vo.ColumnName + "=" + defStr);
|
if (log.isLoggable(Level.FINE)) log.fine("[SystemPreference] " + m_vo.ColumnName + "=" + defStr);
|
||||||
return createDefault(defStr);
|
return createDefault(defStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,13 +663,13 @@ public class GridField
|
||||||
// Button to N
|
// Button to N
|
||||||
if (m_vo.displayType == DisplayType.Button && !m_vo.ColumnName.endsWith("_ID"))
|
if (m_vo.displayType == DisplayType.Button && !m_vo.ColumnName.endsWith("_ID"))
|
||||||
{
|
{
|
||||||
log.fine("[Button=N] " + m_vo.ColumnName);
|
if (log.isLoggable(Level.FINE)) log.fine("[Button=N] " + m_vo.ColumnName);
|
||||||
return "N";
|
return "N";
|
||||||
}
|
}
|
||||||
// CheckBoxes default to No
|
// CheckBoxes default to No
|
||||||
if (m_vo.displayType == DisplayType.YesNo)
|
if (m_vo.displayType == DisplayType.YesNo)
|
||||||
{
|
{
|
||||||
log.fine("[YesNo=N] " + m_vo.ColumnName);
|
if (log.isLoggable(Level.FINE)) log.fine("[YesNo=N] " + m_vo.ColumnName);
|
||||||
return "N";
|
return "N";
|
||||||
}
|
}
|
||||||
// lookups with one value
|
// lookups with one value
|
||||||
|
@ -680,20 +680,20 @@ public class GridField
|
||||||
// IDs remain null
|
// IDs remain null
|
||||||
if (m_vo.ColumnName.endsWith("_ID"))
|
if (m_vo.ColumnName.endsWith("_ID"))
|
||||||
{
|
{
|
||||||
log.fine("[ID=null] " + m_vo.ColumnName);
|
if (log.isLoggable(Level.FINE)) log.fine("[ID=null] " + m_vo.ColumnName);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// actual Numbers default to zero
|
// actual Numbers default to zero
|
||||||
if (DisplayType.isNumeric(m_vo.displayType))
|
if (DisplayType.isNumeric(m_vo.displayType))
|
||||||
{
|
{
|
||||||
log.fine("[Number=0] " + m_vo.ColumnName);
|
if (log.isLoggable(Level.FINE)) log.fine("[Number=0] " + m_vo.ColumnName);
|
||||||
return createDefault("0");
|
return createDefault("0");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No resolution
|
* No resolution
|
||||||
*/
|
*/
|
||||||
log.fine("[NONE] " + m_vo.ColumnName);
|
if (log.isLoggable(Level.FINE)) log.fine("[NONE] " + m_vo.ColumnName);
|
||||||
return null;
|
return null;
|
||||||
} // getDefault
|
} // getDefault
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
public boolean initTab (boolean async)
|
public boolean initTab (boolean async)
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo + " - Async=" + async + " - Where=" + m_vo.WhereClause);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - Async=" + async + " - Where=" + m_vo.WhereClause);
|
||||||
if (isLoadComplete()) return true;
|
if (isLoadComplete()) return true;
|
||||||
|
|
||||||
if (m_loaderFuture != null && m_loaderFuture.isDone())
|
if (m_loaderFuture != null && m_loaderFuture.isDone())
|
||||||
|
@ -318,7 +318,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
protected void dispose()
|
protected void dispose()
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
|
||||||
m_OrderBys = null;
|
m_OrderBys = null;
|
||||||
//
|
//
|
||||||
m_parents.clear();
|
m_parents.clear();
|
||||||
|
@ -352,7 +352,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
private boolean loadFields()
|
private boolean loadFields()
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
|
||||||
|
|
||||||
if (m_vo.getFields() == null)
|
if (m_vo.getFields() == null)
|
||||||
return false;
|
return false;
|
||||||
|
@ -616,7 +616,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
|
|
||||||
Env.clearTabContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo);
|
Env.clearTabContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo);
|
||||||
|
|
||||||
log.fine("#" + m_vo.TabNo
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo
|
||||||
+ " - Only Current Rows=" + onlyCurrentRows
|
+ " - Only Current Rows=" + onlyCurrentRows
|
||||||
+ ", Days=" + onlyCurrentDays + ", Detail=" + isDetail());
|
+ ", Days=" + onlyCurrentDays + ", Detail=" + isDetail());
|
||||||
// is it same query?
|
// is it same query?
|
||||||
|
@ -730,7 +730,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
/**
|
/**
|
||||||
* Query
|
* Query
|
||||||
*/
|
*/
|
||||||
log.fine("#" + m_vo.TabNo + " - " + where);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - " + where);
|
||||||
if (m_mTable.isOpen())
|
if (m_mTable.isOpen())
|
||||||
{
|
{
|
||||||
if (refresh)
|
if (refresh)
|
||||||
|
@ -761,20 +761,20 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
// Check: only one restriction
|
// Check: only one restriction
|
||||||
if (query.getRestrictionCount() != 1)
|
if (query.getRestrictionCount() != 1)
|
||||||
{
|
{
|
||||||
log.fine("Ignored(More than 1 Restriction): " + query);
|
if (log.isLoggable(Level.FINE)) log.fine("Ignored(More than 1 Restriction): " + query);
|
||||||
return query.getWhereClause();
|
return query.getWhereClause();
|
||||||
}
|
}
|
||||||
|
|
||||||
String colName = query.getColumnName(0);
|
String colName = query.getColumnName(0);
|
||||||
if (colName == null)
|
if (colName == null)
|
||||||
{
|
{
|
||||||
log.fine("Ignored(No Column): " + query);
|
if (log.isLoggable(Level.FINE)) log.fine("Ignored(No Column): " + query);
|
||||||
return query.getWhereClause();
|
return query.getWhereClause();
|
||||||
}
|
}
|
||||||
// a '(' in the name = function - don't try to resolve
|
// a '(' in the name = function - don't try to resolve
|
||||||
if (colName.indexOf('(') != -1)
|
if (colName.indexOf('(') != -1)
|
||||||
{
|
{
|
||||||
log.fine("Ignored(Function): " + colName);
|
if (log.isLoggable(Level.FINE)) log.fine("Ignored(Function): " + colName);
|
||||||
return query.getWhereClause();
|
return query.getWhereClause();
|
||||||
}
|
}
|
||||||
// OK - Query is valid
|
// OK - Query is valid
|
||||||
|
@ -782,7 +782,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
// Simple Query.
|
// Simple Query.
|
||||||
if (getField(colName) != null)
|
if (getField(colName) != null)
|
||||||
{
|
{
|
||||||
log.fine("Field Found: " + colName);
|
if (log.isLoggable(Level.FINE)) log.fine("Field Found: " + colName);
|
||||||
return query.getWhereClause();
|
return query.getWhereClause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -821,7 +821,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
query.setColumnName(0, refColName);
|
query.setColumnName(0, refColName);
|
||||||
if (getField(refColName) != null)
|
if (getField(refColName) != null)
|
||||||
{
|
{
|
||||||
log.fine("Column " + colName + " replaced with " + refColName);
|
if (log.isLoggable(Level.FINE)) log.fine("Column " + colName + " replaced with " + refColName);
|
||||||
return query.getWhereClause();
|
return query.getWhereClause();
|
||||||
}
|
}
|
||||||
colName = refColName;
|
colName = refColName;
|
||||||
|
@ -885,7 +885,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
.append(tableName).append(" xx WHERE ")
|
.append(tableName).append(" xx WHERE ")
|
||||||
.append(query.getWhereClause(true))
|
.append(query.getWhereClause(true))
|
||||||
.append(")");
|
.append(")");
|
||||||
log.fine(result.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(result.toString());
|
||||||
return result.toString();
|
return result.toString();
|
||||||
} // validateQuery
|
} // validateQuery
|
||||||
|
|
||||||
|
@ -913,7 +913,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
public void dataRefreshAll (boolean fireEvent, boolean retainedCurrentRow)
|
public void dataRefreshAll (boolean fireEvent, boolean retainedCurrentRow)
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
|
||||||
/** @todo does not work with alpha key */
|
/** @todo does not work with alpha key */
|
||||||
int keyNo = m_mTable.getKeyID(m_currentRow);
|
int keyNo = m_mTable.getKeyID(m_currentRow);
|
||||||
m_mTable.dataRefreshAll(fireEvent, retainedCurrentRow ? m_currentRow : -1);
|
m_mTable.dataRefreshAll(fireEvent, retainedCurrentRow ? m_currentRow : -1);
|
||||||
|
@ -971,7 +971,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
public void dataRefresh (int row, boolean fireEvent)
|
public void dataRefresh (int row, boolean fireEvent)
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo + " - row=" + row);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - row=" + row);
|
||||||
m_mTable.dataRefresh(row, fireEvent);
|
m_mTable.dataRefresh(row, fireEvent);
|
||||||
setCurrentRow(row, fireEvent);
|
setCurrentRow(row, fireEvent);
|
||||||
if (fireEvent)
|
if (fireEvent)
|
||||||
|
@ -986,7 +986,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
public boolean dataSave(boolean manualCmd)
|
public boolean dataSave(boolean manualCmd)
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo + " - row=" + m_currentRow);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - row=" + m_currentRow);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (hasChangedCurrentTabAndParents())
|
if (hasChangedCurrentTabAndParents())
|
||||||
|
@ -1104,7 +1104,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
public void dataIgnore()
|
public void dataIgnore()
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
|
||||||
if (m_mTable.isInserting())
|
if (m_mTable.isInserting())
|
||||||
{
|
{
|
||||||
m_currentRow--;
|
m_currentRow--;
|
||||||
|
@ -1113,7 +1113,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
setCurrentRow(m_currentRow, false); // re-load data
|
setCurrentRow(m_currentRow, false); // re-load data
|
||||||
|
|
||||||
fireStateChangeEvent(new StateChangeEvent(this, StateChangeEvent.DATA_IGNORE));
|
fireStateChangeEvent(new StateChangeEvent(this, StateChangeEvent.DATA_IGNORE));
|
||||||
log.fine("#" + m_vo.TabNo + "- fini");
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + "- fini");
|
||||||
} // dataIgnore
|
} // dataIgnore
|
||||||
|
|
||||||
|
|
||||||
|
@ -1125,7 +1125,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
public boolean dataNew (boolean copy)
|
public boolean dataNew (boolean copy)
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
|
||||||
if (!isInsertRecord())
|
if (!isInsertRecord())
|
||||||
{
|
{
|
||||||
log.warning ("Inset Not allowed in TabNo=" + m_vo.TabNo);
|
log.warning ("Inset Not allowed in TabNo=" + m_vo.TabNo);
|
||||||
|
@ -1182,7 +1182,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
public boolean dataDelete()
|
public boolean dataDelete()
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo + " - row=" + m_currentRow);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - row=" + m_currentRow);
|
||||||
boolean retValue = m_mTable.dataDelete(m_currentRow);
|
boolean retValue = m_mTable.dataDelete(m_currentRow);
|
||||||
setCurrentRow(m_currentRow, true);
|
setCurrentRow(m_currentRow, true);
|
||||||
fireStateChangeEvent(new StateChangeEvent(this, StateChangeEvent.DATA_DELETE));
|
fireStateChangeEvent(new StateChangeEvent(this, StateChangeEvent.DATA_DELETE));
|
||||||
|
@ -1319,7 +1319,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
rs = null;
|
rs = null;
|
||||||
pstmt = null;
|
pstmt = null;
|
||||||
}
|
}
|
||||||
log.fine("AD_Column_ID=" + m_vo.AD_Column_ID + " - " + m_linkColumnName);
|
if (log.isLoggable(Level.FINE)) log.fine("AD_Column_ID=" + m_vo.AD_Column_ID + " - " + m_linkColumnName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, CTX_LinkColumnName, m_linkColumnName);
|
Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, CTX_LinkColumnName, m_linkColumnName);
|
||||||
|
@ -1418,7 +1418,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
/*private int getTreeID()
|
/*private int getTreeID()
|
||||||
{
|
{
|
||||||
log.fine(m_vo.TableName);
|
if (log.isLoggable(Level.FINE)) log.fine(m_vo.TableName);
|
||||||
String SQL = "SELECT * FROM AD_ClientInfo WHERE AD_Client="
|
String SQL = "SELECT * FROM AD_ClientInfo WHERE AD_Client="
|
||||||
+ Env.getContext(m_vo.ctx, m_vo.WindowNo, "AD_Client_ID")
|
+ Env.getContext(m_vo.ctx, m_vo.WindowNo, "AD_Client_ID")
|
||||||
+ " ORDER BY AD_Org DESC";
|
+ " ORDER BY AD_Org DESC";
|
||||||
|
@ -1747,7 +1747,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
if (m_vo.TableName.startsWith("C_InvoiceBatch"))
|
if (m_vo.TableName.startsWith("C_InvoiceBatch"))
|
||||||
{
|
{
|
||||||
int Record_ID = Env.getContextAsInt(m_vo.ctx, m_vo.WindowNo, "C_InvoiceBatch_ID");
|
int Record_ID = Env.getContextAsInt(m_vo.ctx, m_vo.WindowNo, "C_InvoiceBatch_ID");
|
||||||
log.fine(m_vo.TableName + " - " + Record_ID);
|
if (log.isLoggable(Level.FINE)) log.fine(m_vo.TableName + " - " + Record_ID);
|
||||||
MessageFormat mf = null;
|
MessageFormat mf = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1836,7 +1836,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
}
|
}
|
||||||
sql.append("GROUP BY o.C_Currency_ID, c.ISO_Code, o.TotalLines, o.GrandTotal, o.DateAcct, o.AD_Client_ID, o.AD_Org_ID");
|
sql.append("GROUP BY o.C_Currency_ID, c.ISO_Code, o.TotalLines, o.GrandTotal, o.DateAcct, o.AD_Client_ID, o.AD_Org_ID");
|
||||||
|
|
||||||
log.fine(m_vo.TableName + " - " + Record_ID);
|
if (log.isLoggable(Level.FINE)) log.fine(m_vo.TableName + " - " + Record_ID);
|
||||||
MessageFormat mf = null;
|
MessageFormat mf = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1907,7 +1907,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
else if (m_vo.TableName.startsWith("S_TimeExpense") && m_vo.TabNo == 0)
|
else if (m_vo.TableName.startsWith("S_TimeExpense") && m_vo.TabNo == 0)
|
||||||
{
|
{
|
||||||
int Record_ID = Env.getContextAsInt(m_vo.ctx, m_vo.WindowNo, "S_TimeExpense_ID");
|
int Record_ID = Env.getContextAsInt(m_vo.ctx, m_vo.WindowNo, "S_TimeExpense_ID");
|
||||||
log.fine(m_vo.TableName + " - " + Record_ID);
|
if (log.isLoggable(Level.FINE)) log.fine(m_vo.TableName + " - " + Record_ID);
|
||||||
MessageFormat mf = null;
|
MessageFormat mf = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2108,7 +2108,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
public void loadLocks()
|
public void loadLocks()
|
||||||
{
|
{
|
||||||
int AD_User_ID = Env.getContextAsInt(Env.getCtx(), "#AD_User_ID");
|
int AD_User_ID = Env.getContextAsInt(Env.getCtx(), "#AD_User_ID");
|
||||||
log.fine("#" + m_vo.TabNo + " - AD_User_ID=" + AD_User_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - AD_User_ID=" + AD_User_ID);
|
||||||
if (!canHaveAttachment())
|
if (!canHaveAttachment())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2144,7 +2144,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
rs = null;
|
rs = null;
|
||||||
pstmt = null;
|
pstmt = null;
|
||||||
}
|
}
|
||||||
log.fine("#" + m_Lock.size());
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_Lock.size());
|
||||||
} // loadLooks
|
} // loadLooks
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2173,7 +2173,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
public void lock (Properties ctx, int Record_ID, boolean lock)
|
public void lock (Properties ctx, int Record_ID, boolean lock)
|
||||||
{
|
{
|
||||||
int AD_User_ID = Env.getContextAsInt(ctx, "#AD_User_ID");
|
int AD_User_ID = Env.getContextAsInt(ctx, "#AD_User_ID");
|
||||||
log.fine("Lock=" + lock + ", AD_User_ID=" + AD_User_ID
|
if (log.isLoggable(Level.FINE)) log.fine("Lock=" + lock + ", AD_User_ID=" + AD_User_ID
|
||||||
+ ", AD_Table_ID=" + m_vo.AD_Table_ID + ", Record_ID=" + Record_ID);
|
+ ", AD_Table_ID=" + m_vo.AD_Table_ID + ", Record_ID=" + Record_ID);
|
||||||
MPrivateAccess access = MPrivateAccess.get (ctx, AD_User_ID, m_vo.AD_Table_ID, Record_ID);
|
MPrivateAccess access = MPrivateAccess.get (ctx, AD_User_ID, m_vo.AD_Table_ID, Record_ID);
|
||||||
if (access == null)
|
if (access == null)
|
||||||
|
@ -2194,7 +2194,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
*/
|
*/
|
||||||
public void dataStatusChanged (DataStatusEvent e)
|
public void dataStatusChanged (DataStatusEvent e)
|
||||||
{
|
{
|
||||||
log.fine("#" + m_vo.TabNo + " - " + e.toString());
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - " + e.toString());
|
||||||
int oldCurrentRow = e.getCurrentRow();
|
int oldCurrentRow = e.getCurrentRow();
|
||||||
m_DataStatusEvent = e; // save it
|
m_DataStatusEvent = e; // save it
|
||||||
// when sorted set current row to 0
|
// when sorted set current row to 0
|
||||||
|
@ -2233,7 +2233,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
DataStatusListener[] listeners = m_listenerList.getListeners(DataStatusListener.class);
|
DataStatusListener[] listeners = m_listenerList.getListeners(DataStatusListener.class);
|
||||||
if (listeners.length == 0)
|
if (listeners.length == 0)
|
||||||
return;
|
return;
|
||||||
log.fine(e.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(e.toString());
|
||||||
// WHO Info
|
// WHO Info
|
||||||
if (e.getCurrentRow() >= 0)
|
if (e.getCurrentRow() >= 0)
|
||||||
{
|
{
|
||||||
|
@ -2410,7 +2410,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
if (newRow >= rows)
|
if (newRow >= rows)
|
||||||
{
|
{
|
||||||
newRow = rows-1;
|
newRow = rows-1;
|
||||||
log.fine("Set to max Row: " + newRow);
|
if (log.isLoggable(Level.FINE)) log.fine("Set to max Row: " + newRow);
|
||||||
}
|
}
|
||||||
else if (newRow < 0)
|
else if (newRow < 0)
|
||||||
{
|
{
|
||||||
|
@ -2433,7 +2433,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
{
|
{
|
||||||
int oldCurrentRow = m_currentRow;
|
int oldCurrentRow = m_currentRow;
|
||||||
m_currentRow = verifyRow (newCurrentRow);
|
m_currentRow = verifyRow (newCurrentRow);
|
||||||
log.fine("Row=" + m_currentRow + " - fire=" + fireEvents);
|
if (log.isLoggable(Level.FINE)) log.fine("Row=" + m_currentRow + " - fire=" + fireEvents);
|
||||||
|
|
||||||
// Update Field Values
|
// Update Field Values
|
||||||
int size = m_mTable.getColumnCount();
|
int size = m_mTable.getColumnCount();
|
||||||
|
@ -2592,7 +2592,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
if (field == null)
|
if (field == null)
|
||||||
return "NoField";
|
return "NoField";
|
||||||
|
|
||||||
log.fine(field.getColumnName() + "=" + value + " - Row=" + m_currentRow);
|
if (log.isLoggable(Level.FINE)) log.fine(field.getColumnName() + "=" + value + " - Row=" + m_currentRow);
|
||||||
|
|
||||||
if (DisplayType.isID(field.getDisplayType()) && value instanceof Integer && ((Integer)value).intValue() < 0)
|
if (DisplayType.isID(field.getDisplayType()) && value instanceof Integer && ((Integer)value).intValue() < 0)
|
||||||
value = null;
|
value = null;
|
||||||
|
@ -2662,7 +2662,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
// if the lookup is dynamic (i.e. contains this columnName as variable)
|
// if the lookup is dynamic (i.e. contains this columnName as variable)
|
||||||
if (mLookup.getValidation().indexOf("@"+columnName+"@") != -1)
|
if (mLookup.getValidation().indexOf("@"+columnName+"@") != -1)
|
||||||
{
|
{
|
||||||
log.fine(columnName + " changed - "
|
if (log.isLoggable(Level.FINE)) log.fine(columnName + " changed - "
|
||||||
+ dependentField.getColumnName() + " set to null");
|
+ dependentField.getColumnName() + " set to null");
|
||||||
// invalidate current selection
|
// invalidate current selection
|
||||||
setValue(dependentField, null);
|
setValue(dependentField, null);
|
||||||
|
@ -2754,7 +2754,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
if (callout.length() == 0)
|
if (callout.length() == 0)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
log.fine(field.getColumnName() + "=" + value
|
if (log.isLoggable(Level.FINE)) log.fine(field.getColumnName() + "=" + value
|
||||||
+ " (" + callout + ") - old=" + oldValue);
|
+ " (" + callout + ") - old=" + oldValue);
|
||||||
|
|
||||||
StringTokenizer st = new StringTokenizer(callout, ";,", false);
|
StringTokenizer st = new StringTokenizer(callout, ";,", false);
|
||||||
|
@ -3023,7 +3023,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
* @param ascending sorting modus
|
* @param ascending sorting modus
|
||||||
*/
|
*/
|
||||||
public void switchRows(int from, int to, int sortColumn, boolean ascending) {
|
public void switchRows(int from, int to, int sortColumn, boolean ascending) {
|
||||||
log.fine(from + " - " + to + " - " + sortColumn + " - " + ascending);
|
if (log.isLoggable(Level.FINE)) log.fine(from + " - " + to + " - " + sortColumn + " - " + ascending);
|
||||||
// nothing to do
|
// nothing to do
|
||||||
if (from == to) {
|
if (from == to) {
|
||||||
log.finest("nothing to do - from == to");
|
log.finest("nothing to do - from == to");
|
||||||
|
|
|
@ -48,7 +48,6 @@ import javax.swing.table.AbstractTableModel;
|
||||||
import org.adempiere.exceptions.DBException;
|
import org.adempiere.exceptions.DBException;
|
||||||
import org.adempiere.util.ServerContext;
|
import org.adempiere.util.ServerContext;
|
||||||
import org.compiere.Adempiere;
|
import org.compiere.Adempiere;
|
||||||
import org.compiere.util.CLogMgt;
|
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
|
@ -420,7 +419,7 @@ public class GridTable extends AbstractTableModel
|
||||||
*/
|
*/
|
||||||
public void addField (GridField field)
|
public void addField (GridField field)
|
||||||
{
|
{
|
||||||
log.fine("(" + m_tableName + ") - " + field.getColumnName());
|
if (log.isLoggable(Level.FINE)) log.fine("(" + m_tableName + ") - " + field.getColumnName());
|
||||||
if (m_open)
|
if (m_open)
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE, "Table already open - ignored: " + field.getColumnName());
|
log.log(Level.SEVERE, "Table already open - ignored: " + field.getColumnName());
|
||||||
|
@ -428,7 +427,7 @@ public class GridTable extends AbstractTableModel
|
||||||
}
|
}
|
||||||
if (!MRole.getDefault(m_ctx, false).isColumnAccess (m_AD_Table_ID, field.getAD_Column_ID(), true))
|
if (!MRole.getDefault(m_ctx, false).isColumnAccess (m_AD_Table_ID, field.getAD_Column_ID(), true))
|
||||||
{
|
{
|
||||||
log.fine("No Column Access " + field.getColumnName());
|
if (log.isLoggable(Level.FINE)) log.fine("No Column Access " + field.getColumnName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Set Index for Key column
|
// Set Index for Key column
|
||||||
|
@ -726,7 +725,7 @@ public class GridTable extends AbstractTableModel
|
||||||
{
|
{
|
||||||
if (!m_open)
|
if (!m_open)
|
||||||
return;
|
return;
|
||||||
log.fine("final=" + finalCall);
|
if (log.isLoggable(Level.FINE)) log.fine("final=" + finalCall);
|
||||||
|
|
||||||
// remove listeners
|
// remove listeners
|
||||||
if (finalCall)
|
if (finalCall)
|
||||||
|
@ -1029,7 +1028,7 @@ public class GridTable extends AbstractTableModel
|
||||||
//wait for 30 seconds
|
//wait for 30 seconds
|
||||||
while (row >= m_sort.size() && m_loaderFuture != null && !m_loaderFuture.isDone() && loops < 60)
|
while (row >= m_sort.size() && m_loaderFuture != null && !m_loaderFuture.isDone() && loops < 60)
|
||||||
{
|
{
|
||||||
log.fine("Waiting for loader row=" + row + ", size=" + m_sort.size());
|
if (log.isLoggable(Level.FINE)) log.fine("Waiting for loader row=" + row + ", size=" + m_sort.size());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_loaderFuture.get(500, TimeUnit.MILLISECONDS);
|
m_loaderFuture.get(500, TimeUnit.MILLISECONDS);
|
||||||
|
@ -1224,7 +1223,7 @@ public class GridTable extends AbstractTableModel
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.fine("r=" + row + " c=" + col + " = " + value + " (" + oldValue + ")");
|
if (log.isLoggable(Level.FINE)) log.fine("r=" + row + " c=" + col + " = " + value + " (" + oldValue + ")");
|
||||||
|
|
||||||
// Save old value
|
// Save old value
|
||||||
m_oldValue = new Object[3];
|
m_oldValue = new Object[3];
|
||||||
|
@ -1365,7 +1364,7 @@ public class GridTable extends AbstractTableModel
|
||||||
*/
|
*/
|
||||||
public boolean dataSave (int newRow, boolean manualCmd)
|
public boolean dataSave (int newRow, boolean manualCmd)
|
||||||
{
|
{
|
||||||
log.fine("Row=" + newRow +
|
if (log.isLoggable(Level.FINE)) log.fine("Row=" + newRow +
|
||||||
", Changed=" + m_rowChanged + "/" + m_changed); // m_rowChanged set in setValueAt
|
", Changed=" + m_rowChanged + "/" + m_changed); // m_rowChanged set in setValueAt
|
||||||
// nothing done
|
// nothing done
|
||||||
if (!m_changed && m_rowChanged == -1)
|
if (!m_changed && m_rowChanged == -1)
|
||||||
|
@ -1569,7 +1568,7 @@ public class GridTable extends AbstractTableModel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log.fine("Prepare updating ... manual=" + manualUpdate);
|
if (log.isLoggable(Level.FINE)) log.fine("Prepare updating ... manual=" + manualUpdate);
|
||||||
// get current Data in DB
|
// get current Data in DB
|
||||||
rowDataDB = readData (rs);
|
rowDataDB = readData (rs);
|
||||||
}
|
}
|
||||||
|
@ -1658,7 +1657,7 @@ public class GridTable extends AbstractTableModel
|
||||||
if (m_inserting)
|
if (m_inserting)
|
||||||
insertDoc = DB.getDocumentNo (m_ctx, m_WindowNo,
|
insertDoc = DB.getDocumentNo (m_ctx, m_WindowNo,
|
||||||
m_tableName, true, null); // only doc type - no trx
|
m_tableName, true, null); // only doc type - no trx
|
||||||
log.fine("DocumentNo entered=" + docNo + ", DocTypeInsert=" + insertDoc + ", newDocNo=" + newDocNo);
|
if (log.isLoggable(Level.FINE)) log.fine("DocumentNo entered=" + docNo + ", DocTypeInsert=" + insertDoc + ", newDocNo=" + newDocNo);
|
||||||
// can we use entered DocNo?
|
// can we use entered DocNo?
|
||||||
if (insertDoc == null || insertDoc.length () == 0)
|
if (insertDoc == null || insertDoc.length () == 0)
|
||||||
{
|
{
|
||||||
|
@ -1792,8 +1791,7 @@ public class GridTable extends AbstractTableModel
|
||||||
|| (m_rowData[col] == null && rowDataDB[col] == null)
|
|| (m_rowData[col] == null && rowDataDB[col] == null)
|
||||||
|| (m_rowData[col] != null && m_rowData[col].equals (rowDataDB[col])))
|
|| (m_rowData[col] != null && m_rowData[col].equals (rowDataDB[col])))
|
||||||
{
|
{
|
||||||
if (CLogMgt.isLevelFinest())
|
if (log.isLoggable(Level.FINE)) log.fine(columnName + "=" + rowData[col]
|
||||||
log.fine(columnName + "=" + rowData[col]
|
|
||||||
+ " " + (rowData[col]==null ? "" : rowData[col].getClass().getName()));
|
+ " " + (rowData[col]==null ? "" : rowData[col].getClass().getName()));
|
||||||
//
|
//
|
||||||
boolean encrypted = field.isEncryptedColumn();
|
boolean encrypted = field.isEncryptedColumn();
|
||||||
|
@ -1975,7 +1973,7 @@ public class GridTable extends AbstractTableModel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log.fine("Updating ... " + whereClause);
|
if (log.isLoggable(Level.FINE)) log.fine("Updating ... " + whereClause);
|
||||||
if (manualUpdate)
|
if (manualUpdate)
|
||||||
{
|
{
|
||||||
String sql = createUpdateSql(false, whereClause);
|
String sql = createUpdateSql(false, whereClause);
|
||||||
|
@ -1995,7 +1993,7 @@ public class GridTable extends AbstractTableModel
|
||||||
lobSave(whereClause);
|
lobSave(whereClause);
|
||||||
|
|
||||||
// Need to re-read row to get ROWID, Key, DocumentNo, Trigger, virtual columns
|
// Need to re-read row to get ROWID, Key, DocumentNo, Trigger, virtual columns
|
||||||
log.fine("Reading ... " + whereClause);
|
if (log.isLoggable(Level.FINE)) log.fine("Reading ... " + whereClause);
|
||||||
StringBuffer refreshSQL = new StringBuffer(m_SQL_Select)
|
StringBuffer refreshSQL = new StringBuffer(m_SQL_Select)
|
||||||
.append(" WHERE ").append(whereClause);
|
.append(" WHERE ").append(whereClause);
|
||||||
pstmt = DB.prepareStatement(refreshSQL.toString(), null);
|
pstmt = DB.prepareStatement(refreshSQL.toString(), null);
|
||||||
|
@ -2064,7 +2062,7 @@ public class GridTable extends AbstractTableModel
|
||||||
*/
|
*/
|
||||||
private char dataSavePO (int Record_ID) throws Exception
|
private char dataSavePO (int Record_ID) throws Exception
|
||||||
{
|
{
|
||||||
log.fine("ID=" + Record_ID);
|
if (log.isLoggable(Level.FINE)) log.fine("ID=" + Record_ID);
|
||||||
//
|
//
|
||||||
Object[] rowData = getDataAtRow(m_rowChanged);
|
Object[] rowData = getDataAtRow(m_rowChanged);
|
||||||
//
|
//
|
||||||
|
@ -2177,7 +2175,7 @@ public class GridTable extends AbstractTableModel
|
||||||
|
|
||||||
// Refresh - update buffer
|
// Refresh - update buffer
|
||||||
String whereClause = po.get_WhereClause(true);
|
String whereClause = po.get_WhereClause(true);
|
||||||
log.fine("Reading ... " + whereClause);
|
if (log.isLoggable(Level.FINE)) log.fine("Reading ... " + whereClause);
|
||||||
StringBuffer refreshSQL = new StringBuffer(m_SQL_Select)
|
StringBuffer refreshSQL = new StringBuffer(m_SQL_Select)
|
||||||
.append(" WHERE ").append(whereClause);
|
.append(" WHERE ").append(whereClause);
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
|
@ -2354,7 +2352,7 @@ public class GridTable extends AbstractTableModel
|
||||||
}
|
}
|
||||||
sb.append(" WHERE ").append(whereClause);
|
sb.append(" WHERE ").append(whereClause);
|
||||||
}
|
}
|
||||||
log.fine(sb.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(sb.toString());
|
||||||
// reset
|
// reset
|
||||||
createUpdateSqlReset();
|
createUpdateSqlReset();
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
@ -2427,7 +2425,7 @@ public class GridTable extends AbstractTableModel
|
||||||
*/
|
*/
|
||||||
private void lobAdd (PO_LOB lob)
|
private void lobAdd (PO_LOB lob)
|
||||||
{
|
{
|
||||||
log.fine("LOB=" + lob);
|
if (log.isLoggable(Level.FINE)) log.fine("LOB=" + lob);
|
||||||
if (m_lobInfo == null)
|
if (m_lobInfo == null)
|
||||||
m_lobInfo = new ArrayList<PO_LOB>();
|
m_lobInfo = new ArrayList<PO_LOB>();
|
||||||
m_lobInfo.add(lob);
|
m_lobInfo.add(lob);
|
||||||
|
@ -2536,10 +2534,10 @@ public class GridTable extends AbstractTableModel
|
||||||
m_rowChanged = -1; // only changed in setValueAt
|
m_rowChanged = -1; // only changed in setValueAt
|
||||||
|
|
||||||
// inform
|
// inform
|
||||||
log.fine("Current=" + currentRow + ", New=" + m_newRow);
|
if (log.isLoggable(Level.FINE)) log.fine("Current=" + currentRow + ", New=" + m_newRow);
|
||||||
fireTableRowsInserted(m_newRow, m_newRow);
|
fireTableRowsInserted(m_newRow, m_newRow);
|
||||||
fireDataStatusIEvent(copyCurrent ? "UpdateCopied" : "Inserted", "");
|
fireDataStatusIEvent(copyCurrent ? "UpdateCopied" : "Inserted", "");
|
||||||
log.fine("Current=" + currentRow + ", New=" + m_newRow + " - complete");
|
if (log.isLoggable(Level.FINE)) log.fine("Current=" + currentRow + ", New=" + m_newRow + " - complete");
|
||||||
return true;
|
return true;
|
||||||
} // dataNew
|
} // dataNew
|
||||||
|
|
||||||
|
@ -2684,7 +2682,7 @@ public class GridTable extends AbstractTableModel
|
||||||
m_rowChanged = -1;
|
m_rowChanged = -1;
|
||||||
fireTableRowsDeleted(row, row);
|
fireTableRowsDeleted(row, row);
|
||||||
fireDataStatusIEvent("Deleted", "");
|
fireDataStatusIEvent("Deleted", "");
|
||||||
log.fine("Row=" + row + " complete");
|
if (log.isLoggable(Level.FINE)) log.fine("Row=" + row + " complete");
|
||||||
return true;
|
return true;
|
||||||
} // dataDelete
|
} // dataDelete
|
||||||
|
|
||||||
|
@ -3028,7 +3026,7 @@ public class GridTable extends AbstractTableModel
|
||||||
*/
|
*/
|
||||||
public void setReadOnly (boolean value)
|
public void setReadOnly (boolean value)
|
||||||
{
|
{
|
||||||
log.fine("ReadOnly=" + value);
|
if (log.isLoggable(Level.FINE)) log.fine("ReadOnly=" + value);
|
||||||
m_readOnly = value;
|
m_readOnly = value;
|
||||||
} // setReadOnly
|
} // setReadOnly
|
||||||
|
|
||||||
|
@ -3078,7 +3076,7 @@ public class GridTable extends AbstractTableModel
|
||||||
*/
|
*/
|
||||||
public void setDeleteable (boolean value)
|
public void setDeleteable (boolean value)
|
||||||
{
|
{
|
||||||
log.fine("Deleteable=" + value);
|
if (log.isLoggable(Level.FINE)) log.fine("Deleteable=" + value);
|
||||||
m_deleteable = value;
|
m_deleteable = value;
|
||||||
} // setDeleteable
|
} // setDeleteable
|
||||||
|
|
||||||
|
@ -3410,7 +3408,7 @@ public class GridTable extends AbstractTableModel
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log.isLoggable(Level.FINE))
|
if (log.isLoggable(Level.FINE))
|
||||||
log.fine(info.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(info.toString());
|
||||||
|
|
||||||
return rows;
|
return rows;
|
||||||
} // open
|
} // open
|
||||||
|
@ -3478,7 +3476,7 @@ public class GridTable extends AbstractTableModel
|
||||||
{
|
{
|
||||||
if (Thread.interrupted())
|
if (Thread.interrupted())
|
||||||
{
|
{
|
||||||
log.fine("Interrupted");
|
if (log.isLoggable(Level.FINE)) log.fine("Interrupted");
|
||||||
close();
|
close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3510,7 +3508,7 @@ public class GridTable extends AbstractTableModel
|
||||||
}
|
}
|
||||||
catch (InterruptedException ie)
|
catch (InterruptedException ie)
|
||||||
{
|
{
|
||||||
log.fine("Interrupted while sleeping");
|
if (log.isLoggable(Level.FINE)) log.fine("Interrupted while sleeping");
|
||||||
close();
|
close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3549,7 +3547,7 @@ public class GridTable extends AbstractTableModel
|
||||||
{
|
{
|
||||||
Object para = m_parameterSELECT.get(i);
|
Object para = m_parameterSELECT.get(i);
|
||||||
if (para != null)
|
if (para != null)
|
||||||
log.fine("Select " + i + "=" + para);
|
if (log.isLoggable(Level.FINE)) log.fine("Select " + i + "=" + para);
|
||||||
//
|
//
|
||||||
if (para == null)
|
if (para == null)
|
||||||
;
|
;
|
||||||
|
@ -3568,7 +3566,7 @@ public class GridTable extends AbstractTableModel
|
||||||
{
|
{
|
||||||
Object para = m_parameterWHERE.get(i);
|
Object para = m_parameterWHERE.get(i);
|
||||||
if (para != null)
|
if (para != null)
|
||||||
log.fine("Where " + i + "=" + para);
|
if (log.isLoggable(Level.FINE)) log.fine("Where " + i + "=" + para);
|
||||||
//
|
//
|
||||||
if (para == null)
|
if (para == null)
|
||||||
;
|
;
|
||||||
|
|
|
@ -116,7 +116,7 @@ public abstract class Lookup extends AbstractListModel
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_selectedObject = null;
|
m_selectedObject = null;
|
||||||
log.fine(getColumnName() + ": setSelectedItem - Set to NULL");
|
if (log.isLoggable(Level.FINE)) log.fine(getColumnName() + ": setSelectedItem - Set to NULL");
|
||||||
}
|
}
|
||||||
// if (m_worker == null || !m_worker.isAlive())
|
// if (m_worker == null || !m_worker.isAlive())
|
||||||
fireContentsChanged(this, -1, -1);
|
fireContentsChanged(this, -1, -1);
|
||||||
|
@ -304,10 +304,10 @@ public abstract class Lookup extends AbstractListModel
|
||||||
m_loaded = true;
|
m_loaded = true;
|
||||||
fireContentsChanged(this, 0, p_data.size());
|
fireContentsChanged(this, 0, p_data.size());
|
||||||
if (p_data.size() == 0)
|
if (p_data.size() == 0)
|
||||||
log.fine(getColumnName() + ": #0 - ms="
|
if (log.isLoggable(Level.FINE)) log.fine(getColumnName() + ": #0 - ms="
|
||||||
+ String.valueOf(System.currentTimeMillis()-startTime));
|
+ String.valueOf(System.currentTimeMillis()-startTime));
|
||||||
else
|
else
|
||||||
log.fine(getColumnName() + ": #" + p_data.size() + " - ms="
|
if (log.isLoggable(Level.FINE)) log.fine(getColumnName() + ": #" + p_data.size() + " - ms="
|
||||||
+ String.valueOf(System.currentTimeMillis()-startTime));
|
+ String.valueOf(System.currentTimeMillis()-startTime));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -765,7 +765,7 @@ public class MAccount extends X_C_ValidCombination
|
||||||
super.setDescription(descr.toString());
|
super.setDescription(descr.toString());
|
||||||
if (fullyQualified != isFullyQualified())
|
if (fullyQualified != isFullyQualified())
|
||||||
setIsFullyQualified(fullyQualified);
|
setIsFullyQualified(fullyQualified);
|
||||||
log.fine("Combination=" + getCombination()
|
if (log.isLoggable(Level.FINE)) log.fine("Combination=" + getCombination()
|
||||||
+ " - " + getDescription()
|
+ " - " + getDescription()
|
||||||
+ " - FullyQualified=" + fullyQualified);
|
+ " - FullyQualified=" + fullyQualified);
|
||||||
} // setValueDescription
|
} // setValueDescription
|
||||||
|
|
|
@ -512,7 +512,7 @@ public final class MAcctSchemaElement extends X_C_AcctSchema_Element
|
||||||
.append(" WHERE ").append(element).append(" IS NULL AND C_AcctSchema_ID=").append(getC_AcctSchema_ID());
|
.append(" WHERE ").append(element).append(" IS NULL AND C_AcctSchema_ID=").append(getC_AcctSchema_ID());
|
||||||
int noF = DB.executeUpdate(sql.toString(), get_TrxName());
|
int noF = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
//
|
//
|
||||||
log.fine("ValidCombination=" + noC + ", Fact=" + noF);
|
if (log.isLoggable(Level.FINE)) log.fine("ValidCombination=" + noC + ", Fact=" + noF);
|
||||||
} // updateData
|
} // updateData
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -284,7 +284,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
|
||||||
.append("' WHERE C_AllocationHdr_ID=").append(getC_AllocationHdr_ID());
|
.append("' WHERE C_AllocationHdr_ID=").append(getC_AllocationHdr_ID());
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
m_lines = null;
|
m_lines = null;
|
||||||
log.fine(processed + " - #" + no);
|
if (log.isLoggable(Level.FINE)) log.fine(processed + " - #" + no);
|
||||||
} // setProcessed
|
} // setProcessed
|
||||||
|
|
||||||
|
|
||||||
|
@ -849,7 +849,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
|
||||||
bp.setTotalOpenBalance(); // recalculates from scratch
|
bp.setTotalOpenBalance(); // recalculates from scratch
|
||||||
// bp.setSOCreditStatus(); // called automatically
|
// bp.setSOCreditStatus(); // called automatically
|
||||||
if (bp.save())
|
if (bp.save())
|
||||||
log.fine(bp.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(bp.toString());
|
||||||
else
|
else
|
||||||
log.log(Level.SEVERE, "BP not updated - " + bp);
|
log.log(Level.SEVERE, "BP not updated - " + bp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,7 @@ public class MAllocationLine extends X_C_AllocationLine
|
||||||
*/
|
*/
|
||||||
protected int processIt (boolean reverse)
|
protected int processIt (boolean reverse)
|
||||||
{
|
{
|
||||||
log.fine("Reverse=" + reverse + " - " + toString());
|
if (log.isLoggable(Level.FINE)) log.fine("Reverse=" + reverse + " - " + toString());
|
||||||
int C_Invoice_ID = getC_Invoice_ID();
|
int C_Invoice_ID = getC_Invoice_ID();
|
||||||
MInvoice invoice = getInvoice();
|
MInvoice invoice = getInvoice();
|
||||||
if (invoice != null
|
if (invoice != null
|
||||||
|
@ -286,13 +286,13 @@ public class MAllocationLine extends X_C_AllocationLine
|
||||||
if (reverse)
|
if (reverse)
|
||||||
{
|
{
|
||||||
invoice.setC_Payment_ID(0);
|
invoice.setC_Payment_ID(0);
|
||||||
log.fine("C_Payment_ID=" + C_Payment_ID
|
if (log.isLoggable(Level.FINE)) log.fine("C_Payment_ID=" + C_Payment_ID
|
||||||
+ " Unlinked from C_Invoice_ID=" + C_Invoice_ID);
|
+ " Unlinked from C_Invoice_ID=" + C_Invoice_ID);
|
||||||
}
|
}
|
||||||
else if (invoice.isPaid())
|
else if (invoice.isPaid())
|
||||||
{
|
{
|
||||||
invoice.setC_Payment_ID(C_Payment_ID);
|
invoice.setC_Payment_ID(C_Payment_ID);
|
||||||
log.fine("C_Payment_ID=" + C_Payment_ID
|
if (log.isLoggable(Level.FINE)) log.fine("C_Payment_ID=" + C_Payment_ID
|
||||||
+ " Linked to C_Invoice_ID=" + C_Invoice_ID);
|
+ " Linked to C_Invoice_ID=" + C_Invoice_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ public class MAllocationLine extends X_C_AllocationLine
|
||||||
+ "WHERE o.C_Order_ID = (SELECT i.C_Order_ID FROM C_Invoice i "
|
+ "WHERE o.C_Order_ID = (SELECT i.C_Order_ID FROM C_Invoice i "
|
||||||
+ "WHERE i.C_Invoice_ID=" + C_Invoice_ID + ")";
|
+ "WHERE i.C_Invoice_ID=" + C_Invoice_ID + ")";
|
||||||
if (DB.executeUpdate(update, get_TrxName()) > 0)
|
if (DB.executeUpdate(update, get_TrxName()) > 0)
|
||||||
log.fine("C_Payment_ID=" + C_Payment_ID
|
if (log.isLoggable(Level.FINE)) log.fine("C_Payment_ID=" + C_Payment_ID
|
||||||
+ (reverse ? " UnLinked from" : " Linked to")
|
+ (reverse ? " UnLinked from" : " Linked to")
|
||||||
+ " order of C_Invoice_ID=" + C_Invoice_ID);
|
+ " order of C_Invoice_ID=" + C_Invoice_ID);
|
||||||
}
|
}
|
||||||
|
@ -315,13 +315,13 @@ public class MAllocationLine extends X_C_AllocationLine
|
||||||
if (reverse)
|
if (reverse)
|
||||||
{
|
{
|
||||||
invoice.setC_CashLine_ID(0);
|
invoice.setC_CashLine_ID(0);
|
||||||
log.fine("C_CashLine_ID=" + C_CashLine_ID
|
if (log.isLoggable(Level.FINE)) log.fine("C_CashLine_ID=" + C_CashLine_ID
|
||||||
+ " Unlinked from C_Invoice_ID=" + C_Invoice_ID);
|
+ " Unlinked from C_Invoice_ID=" + C_Invoice_ID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
invoice.setC_CashLine_ID(C_CashLine_ID);
|
invoice.setC_CashLine_ID(C_CashLine_ID);
|
||||||
log.fine("C_CashLine_ID=" + C_CashLine_ID
|
if (log.isLoggable(Level.FINE)) log.fine("C_CashLine_ID=" + C_CashLine_ID
|
||||||
+ " Linked to C_Invoice_ID=" + C_Invoice_ID);
|
+ " Linked to C_Invoice_ID=" + C_Invoice_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ public class MAllocationLine extends X_C_AllocationLine
|
||||||
+ "WHERE o.C_Order_ID = (SELECT i.C_Order_ID FROM C_Invoice i "
|
+ "WHERE o.C_Order_ID = (SELECT i.C_Order_ID FROM C_Invoice i "
|
||||||
+ "WHERE i.C_Invoice_ID=" + C_Invoice_ID + ")";
|
+ "WHERE i.C_Invoice_ID=" + C_Invoice_ID + ")";
|
||||||
if (DB.executeUpdate(update, get_TrxName()) > 0)
|
if (DB.executeUpdate(update, get_TrxName()) > 0)
|
||||||
log.fine("C_CashLine_ID=" + C_CashLine_ID
|
if (log.isLoggable(Level.FINE)) log.fine("C_CashLine_ID=" + C_CashLine_ID
|
||||||
+ (reverse ? " UnLinked from" : " Linked to")
|
+ (reverse ? " UnLinked from" : " Linked to")
|
||||||
+ " order of C_Invoice_ID=" + C_Invoice_ID);
|
+ " order of C_Invoice_ID=" + C_Invoice_ID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,7 +265,7 @@ public class MArchive extends X_AD_Archive {
|
||||||
if (data == null || data.length == 0)
|
if (data == null || data.length == 0)
|
||||||
return false;
|
return false;
|
||||||
//
|
//
|
||||||
log.fine(toString());
|
if (log.isLoggable(Level.FINE)) log.fine(toString());
|
||||||
return true;
|
return true;
|
||||||
} // beforeSave
|
} // beforeSave
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue