IDEMPIERE-638 Check log level before calling logging method / log.fine

This commit is contained in:
Richard Morales 2013-02-25 19:00:59 -05:00
parent be80f21469
commit ce7938424e
372 changed files with 1655 additions and 1587 deletions

View File

@ -89,7 +89,7 @@ public class CalloutAssignment extends CalloutEngine
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)
{
mTab.setValue ("M_Product_ID", new Integer (M_Product_ID));

View File

@ -140,7 +140,7 @@ public class CalloutCashJournal extends CalloutEngine
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue("DiscountAmt");
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue("WriteOffAmt");
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 - calculate write off

View File

@ -177,7 +177,7 @@ public class CalloutGLJournal extends CalloutEngine
BigDecimal CurrencyRate = MConversionRate.getRate(C_Currency_ID, as.getC_Currency_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)
CurrencyRate = Env.ZERO;
mTab.setValue("CurrencyRate", CurrencyRate);

View File

@ -530,10 +530,10 @@ public class CalloutInOut extends CalloutEngine
if (M_Warehouse_ID == loc.getM_Warehouse_ID())
mTab.setValue("M_Locator_ID", new Integer (product.getM_Locator_ID()));
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
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 "";
} // 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);
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 = QtyEntered1;
mTab.setValue("QtyEntered", QtyEntered);
@ -581,7 +581,7 @@ public class CalloutInOut extends CalloutEngine
if (MovementQty == null)
MovementQty = QtyEntered;
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
+ " -> " + conversion
+ " 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);
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 = QtyEntered1;
mTab.setValue("QtyEntered", QtyEntered);
@ -612,7 +612,7 @@ public class CalloutInOut extends CalloutEngine
if (MovementQty == null)
MovementQty = QtyEntered;
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
+ " -> " + conversion
+ " MovementQty=" + MovementQty);
@ -628,7 +628,7 @@ public class CalloutInOut extends CalloutEngine
BigDecimal MovementQty1 = MovementQty.setScale(precision, BigDecimal.ROUND_HALF_UP);
if (MovementQty.compareTo(MovementQty1) != 0)
{
log.fine("Corrected MovementQty "
if (log.isLoggable(Level.FINE)) log.fine("Corrected MovementQty "
+ MovementQty + "->" + MovementQty1);
MovementQty = MovementQty1;
mTab.setValue("MovementQty", MovementQty);
@ -638,7 +638,7 @@ public class CalloutInOut extends CalloutEngine
if (QtyEntered == null)
QtyEntered = MovementQty;
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
+ " -> " + conversion
+ " QtyEntered=" + QtyEntered);
@ -669,7 +669,7 @@ public class CalloutInOut extends CalloutEngine
int M_Product_ID = Env.getContextAsInt(ctx, WindowNo, "M_Product_ID");
int M_Warehouse_ID = Env.getContextAsInt(ctx, WindowNo, "M_Warehouse_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_Warehouse_ID=" + M_Warehouse_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");
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));
}
}

View File

@ -439,7 +439,7 @@ public class CalloutInvoice extends CalloutEngine
C_Charge_ID = ((Integer)value).intValue();
else
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)
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");
if (shipC_BPartner_Location_ID == 0)
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;
log.fine("Bill BP_Location=" + billC_BPartner_Location_ID);
if (log.isLoggable(Level.FINE)) log.fine("Bill BP_Location=" + billC_BPartner_Location_ID);
// Dates
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;
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");
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");
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,
@ -503,15 +503,17 @@ public class CalloutInvoice extends CalloutEngine
// get values
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
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");
PriceActual = (BigDecimal)mTab.getValue("PriceActual");
// Discount = (BigDecimal)mTab.getValue("Discount");
PriceLimit = (BigDecimal)mTab.getValue("PriceLimit");
PriceList = (BigDecimal)mTab.getValue("PriceList");
if (log.isLoggable(Level.FINE)){
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual);// + ", Discount=" + Discount);
}
// No Product
if ( M_Product_ID == 0 )
@ -555,7 +557,7 @@ public class CalloutInvoice extends CalloutEngine
if (PriceEntered == null)
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());
PriceActual = pp.getPriceStd();
mTab.setValue("PriceActual", pp.getPriceStd());
@ -571,7 +573,7 @@ public class CalloutInvoice extends CalloutEngine
if (PriceEntered == null)
PriceEntered = PriceActual;
//
log.fine("amt - PriceActual=" + PriceActual
if (log.isLoggable(Level.FINE)) log.fine("amt - PriceActual=" + PriceActual
+ " -> PriceEntered=" + PriceEntered);
mTab.setValue("PriceEntered", PriceEntered);
}
@ -583,7 +585,7 @@ public class CalloutInvoice extends CalloutEngine
if (PriceActual == null)
PriceActual = PriceEntered;
//
log.fine("amt - PriceEntered=" + PriceEntered
if (log.isLoggable(Level.FINE)) log.fine("amt - PriceEntered=" + PriceEntered
+ " -> PriceActual=" + PriceActual);
mTab.setValue("PriceActual", PriceActual);
}
@ -629,7 +631,7 @@ public class CalloutInvoice extends CalloutEngine
C_UOM_To_ID, PriceLimit);
if (PriceEntered == null)
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 ("PriceEntered", PriceEntered);
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);
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 = QtyEntered1;
mTab.setValue("QtyEntered", QtyEntered);
@ -750,7 +752,7 @@ public class CalloutInvoice extends CalloutEngine
C_UOM_To_ID, PriceActual);
if (PriceEntered == null)
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
+ " -> " + conversion
+ " 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);
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 = QtyEntered1;
mTab.setValue("QtyEntered", QtyEntered);
@ -776,7 +778,7 @@ public class CalloutInvoice extends CalloutEngine
if (QtyInvoiced == null)
QtyInvoiced = QtyEntered;
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
+ " -> " + conversion
+ " QtyInvoiced=" + QtyInvoiced);
@ -792,7 +794,7 @@ public class CalloutInvoice extends CalloutEngine
BigDecimal QtyInvoiced1 = QtyInvoiced.setScale(precision, BigDecimal.ROUND_HALF_UP);
if (QtyInvoiced.compareTo(QtyInvoiced1) != 0)
{
log.fine("Corrected QtyInvoiced Scale "
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyInvoiced Scale "
+ QtyInvoiced + "->" + QtyInvoiced1);
QtyInvoiced = QtyInvoiced1;
mTab.setValue("QtyInvoiced", QtyInvoiced);
@ -802,7 +804,7 @@ public class CalloutInvoice extends CalloutEngine
if (QtyEntered == null)
QtyEntered = QtyInvoiced;
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
+ " -> " + conversion
+ " QtyEntered=" + QtyEntered);

View File

@ -298,7 +298,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
C_Charge_ID = ((Integer)value).intValue();
else
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)
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");
if (C_BPartner_Location_ID == 0)
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
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;
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");
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");
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,
@ -356,7 +356,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
// get values
BigDecimal QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
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)
QtyEntered = Env.ZERO;
if (PriceEntered == null)

View File

@ -945,7 +945,7 @@ public class CalloutOrder extends CalloutEngine
C_Charge_ID = ((Integer)value).intValue();
else
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)
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");
if (shipC_BPartner_Location_ID == 0)
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");
log.fine("Bill Date=" + billDate);
if (log.isLoggable(Level.FINE)) log.fine("Bill Date=" + billDate);
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");
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");
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");
if (billC_BPartner_Location_ID == 0)
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,
@ -1020,15 +1020,17 @@ public class CalloutOrder extends CalloutEngine
// get values
QtyEntered = (BigDecimal)mTab.getValue("QtyEntered");
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");
PriceActual = (BigDecimal)mTab.getValue("PriceActual");
Discount = (BigDecimal)mTab.getValue("Discount");
PriceLimit = (BigDecimal)mTab.getValue("PriceLimit");
PriceList = (BigDecimal)mTab.getValue("PriceList");
if (log.isLoggable(Level.FINE)){
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
}
// No Product
if (M_Product_ID == 0)
@ -1072,7 +1074,7 @@ public class CalloutOrder extends CalloutEngine
if (PriceEntered == null)
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());
PriceActual = pp.getPriceStd();
mTab.setValue("PriceActual", pp.getPriceStd());
@ -1088,7 +1090,7 @@ public class CalloutOrder extends CalloutEngine
if (PriceEntered == null)
PriceEntered = PriceActual;
//
log.fine("PriceActual=" + PriceActual
if (log.isLoggable(Level.FINE)) log.fine("PriceActual=" + PriceActual
+ " -> PriceEntered=" + PriceEntered);
mTab.setValue("PriceEntered", PriceEntered);
}
@ -1100,7 +1102,7 @@ public class CalloutOrder extends CalloutEngine
if (PriceActual == null)
PriceActual = PriceEntered;
//
log.fine("PriceEntered=" + PriceEntered
if (log.isLoggable(Level.FINE)) log.fine("PriceEntered=" + PriceEntered
+ " -> PriceActual=" + PriceActual);
mTab.setValue("PriceActual", PriceActual);
}
@ -1130,7 +1132,7 @@ public class CalloutOrder extends CalloutEngine
Discount = Discount.setScale(2, BigDecimal.ROUND_HALF_UP);
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
String epl = Env.getContext(ctx, WindowNo, "EnforcePriceLimit");
@ -1146,7 +1148,7 @@ public class CalloutOrder extends CalloutEngine
C_UOM_To_ID, PriceLimit);
if (PriceEntered == null)
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 ("PriceEntered", PriceEntered);
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);
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 = QtyEntered1;
mTab.setValue("QtyEntered", QtyEntered);
@ -1220,7 +1222,7 @@ public class CalloutOrder extends CalloutEngine
C_UOM_To_ID, PriceActual);
if (PriceEntered == null)
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
+ " -> " + conversion
+ " 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);
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 = QtyEntered1;
mTab.setValue("QtyEntered", QtyEntered);
@ -1246,7 +1248,7 @@ public class CalloutOrder extends CalloutEngine
if (QtyOrdered == null)
QtyOrdered = QtyEntered;
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
+ " -> " + conversion
+ " QtyOrdered=" + QtyOrdered);
@ -1262,7 +1264,7 @@ public class CalloutOrder extends CalloutEngine
BigDecimal QtyOrdered1 = QtyOrdered.setScale(precision, BigDecimal.ROUND_HALF_UP);
if (QtyOrdered.compareTo(QtyOrdered1) != 0)
{
log.fine("Corrected QtyOrdered Scale "
if (log.isLoggable(Level.FINE)) log.fine("Corrected QtyOrdered Scale "
+ QtyOrdered + "->" + QtyOrdered1);
QtyOrdered = QtyOrdered1;
mTab.setValue("QtyOrdered", QtyOrdered);
@ -1272,7 +1274,7 @@ public class CalloutOrder extends CalloutEngine
if (QtyEntered == null)
QtyEntered = QtyOrdered;
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
+ " -> " + conversion
+ " QtyEntered=" + QtyEntered);

View File

@ -67,7 +67,7 @@ public class CalloutPaySelection extends CalloutEngine
BigDecimal PayAmt = (BigDecimal)mTab.getValue("PayAmt");
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue("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);
mTab.setValue("DifferenceAmt", DifferenceAmt);
@ -133,7 +133,7 @@ public class CalloutPaySelection extends CalloutEngine
DB.close(rs, pstmt);
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("PayAmt", OpenAmt.subtract(DiscountAmt));
mTab.setValue("DiscountAmt", DiscountAmt);

View File

@ -242,7 +242,7 @@ public class CalloutPayment extends CalloutEngine
int C_Invoice_ID = Env.getContextAsInt (ctx, WindowNo, "C_Invoice_ID");
int C_Order_ID = Env.getContextAsInt (ctx, WindowNo, "C_Order_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);
MDocType dt = null;
if (C_DocType_ID != 0)
@ -359,14 +359,14 @@ public class CalloutPayment extends CalloutEngine
pstmt = null;
}
} // 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);
// Get Info from Tab
BigDecimal PayAmt = (BigDecimal)mTab.getValue ("PayAmt");
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue ("DiscountAmt");
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue ("WriteOffAmt");
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);
// Get Currency Info
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_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_ConversionType_ID);
CurrencyRate = MConversionRate.getRate (C_Currency_Invoice_ID,
@ -402,7 +402,7 @@ public class CalloutPayment extends CalloutEngine
//
InvoiceOpenAmt = InvoiceOpenAmt.multiply (CurrencyRate).setScale (
currency.getStdPrecision (), BigDecimal.ROUND_HALF_UP);
log.fine ("Rate=" + CurrencyRate + ", InvoiceOpenAmt="
if (log.isLoggable(Level.FINE)) log.fine ("Rate=" + CurrencyRate + ", InvoiceOpenAmt="
+ InvoiceOpenAmt);
}
// Currency Changed - convert all

View File

@ -156,7 +156,7 @@ public class CalloutPaymentAllocate extends CalloutEngine
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue("WriteOffAmt");
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue("OverUnderAmt");
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
+ ", Invoice=" + InvoiceAmt);

View File

@ -18,6 +18,7 @@ package org.compiere.model;
import java.math.BigDecimal;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.Env;
@ -62,7 +63,7 @@ public class CalloutProject extends CalloutEngine
if (PlannedAmt.scale() > StdPrecision)
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);
return "";
} // planned

View File

@ -19,6 +19,7 @@ package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.model.GridTabWrapper;
import org.compiere.util.Env;
@ -82,7 +83,7 @@ public class CalloutRequisition extends CalloutEngine
int StdPrecision = Env.getContextAsInt(ctx, WindowNo, "StdPrecision");
BigDecimal Qty = line.getQty();
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
BigDecimal LineNetAmt = Qty.multiply(PriceActual);

View File

@ -189,7 +189,7 @@ public class CalloutTimeExpense extends CalloutEngine
int C_Currency_To_ID = Env.getContextAsInt(ctx, "$C_Currency_ID");
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
BigDecimal ConvertedAmt = ExpenseAmt;
// convert if required
@ -202,7 +202,7 @@ public class CalloutTimeExpense extends CalloutEngine
DateExpense, 0, AD_Client_ID, AD_Org_ID);
}
mTab.setValue("ConvertedAmt", ConvertedAmt);
log.fine("= ConvertedAmt=" + ConvertedAmt);
if (log.isLoggable(Level.FINE)) log.fine("= ConvertedAmt=" + ConvertedAmt);
return "";
} // Expense_Amount

View File

@ -221,7 +221,7 @@ public class Aging extends SvrProcess
if (aging != null)
{
aging.saveEx();
log.fine("#" + ++counter + " - " + aging);
if (log.isLoggable(Level.FINE)) log.fine("#" + ++counter + " - " + aging);
}
aging = new MAging (getCtx(), AD_PInstance_ID, p_StatementDate,
C_BPartner_ID, C_Currency_ID,
@ -239,7 +239,7 @@ public class Aging extends SvrProcess
{
aging.saveEx();
counter++;
log.fine("#" + counter + " - " + aging);
if (log.isLoggable(Level.FINE)) log.fine("#" + counter + " - " + aging);
}
}
catch (SQLException e)

View File

@ -375,7 +375,7 @@ public class AllocationAuto extends SvrProcess
.add(payment.getOverUnderAmt());
if (!payment.isReceipt())
availableAmt = availableAmt.negate();
log.fine("Available=" + availableAmt);
if (log.isLoggable(Level.FINE)) log.fine("Available=" + availableAmt);
//
if (payment.getC_Invoice_ID() != 0)
{
@ -392,7 +392,7 @@ public class AllocationAuto extends SvrProcess
BigDecimal openAmt = invoice.getOpenAmt(true, null);
if (!invoice.isSOTrx())
openAmt = openAmt.negate();
log.fine(invoice + ", Open=" + openAmt);
if (log.isLoggable(Level.FINE)) log.fine(invoice + ", Open=" + openAmt);
// With Discount, etc.
if (availableAmt.compareTo(openAmt) == 0)
{
@ -432,7 +432,7 @@ public class AllocationAuto extends SvrProcess
.subtract(line.getDifferenceAmt()).subtract(overUnder);
if (!invoice.isSOTrx())
invoiceAmt = invoiceAmt.negate();
log.fine(invoice + ", Invoice=" + invoiceAmt);
if (log.isLoggable(Level.FINE)) log.fine(invoice + ", Invoice=" + invoiceAmt);
totalInvoice = totalInvoice.add(invoiceAmt);
}
else // Multi-Currency
@ -478,7 +478,7 @@ public class AllocationAuto extends SvrProcess
.add(payment.getOverUnderAmt());
if (!payment.isReceipt())
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++)
{
MInvoice invoice = m_invoices[i];
@ -491,7 +491,7 @@ public class AllocationAuto extends SvrProcess
if (!invoice.isSOTrx())
openAmt = openAmt.negate();
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)
{
Timestamp dateAcct = payment.getDateAcct();
@ -657,7 +657,7 @@ public class AllocationAuto extends SvrProcess
availableAmt = availableAmt.subtract(allocatedAmt);
if (!payment.isReceipt())
availableAmt = availableAmt.negate();
log.fine("Available=" + availableAmt);
if (log.isLoggable(Level.FINE)) log.fine("Available=" + availableAmt);
if (dateAcct == null || payment.getDateAcct().after(dateAcct))
dateAcct = payment.getDateAcct();
totalPayments = totalPayments.add(availableAmt);
@ -672,11 +672,11 @@ public class AllocationAuto extends SvrProcess
if (invoice.getC_Currency_ID() != C_Currency_ID)
continue;
BigDecimal openAmt = invoice.getOpenAmt(true, null);
log.fine("" + invoice);
if (log.isLoggable(Level.FINE)) log.fine("" + invoice);
if (!invoice.isSOTrx())
openAmt = openAmt.negate();
// Foreign currency
log.fine("Open=" + openAmt);
if (log.isLoggable(Level.FINE)) log.fine("Open=" + openAmt);
if (dateAcct == null || invoice.getDateAcct().after(dateAcct))
dateAcct = invoice.getDateAcct();
totalInvoices = totalInvoices.add(openAmt);
@ -685,7 +685,7 @@ public class AllocationAuto extends SvrProcess
// must be either AP or AR balance
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());
return 0;
}
@ -727,7 +727,7 @@ public class AllocationAuto extends SvrProcess
availableAmt = availableAmt.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() + ")",
dateAcct, availableAmt, null, null, null,
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)
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() + ")",
dateAcct, openAmt, null, null, null,
invoice.getC_BPartner_ID(), 0, invoice.getC_Invoice_ID(), invoice.getAD_Org_ID()))

View File

@ -59,7 +59,7 @@ public class AllocationReset extends SvrProcess
ProcessInfoParameter[] para = getParameter();
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();
if (para[i].getParameter() == null && para[i].getParameter_To() == null)
;
@ -183,7 +183,7 @@ public class AllocationReset extends SvrProcess
boolean success = false;
if (hdr.delete(true, m_trx.getTrxName()))
{
log.fine(hdr.toString());
if (log.isLoggable(Level.FINE)) log.fine(hdr.toString());
success = true;
}
if (success)

View File

@ -235,7 +235,7 @@ public class AssetDelivery extends SvrProcess
*/
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();
//
MAsset asset = new MAsset (getCtx(), A_Asset_ID, get_TrxName());
@ -297,7 +297,7 @@ public class AssetDelivery extends SvrProcess
ad.saveEx();
asset.saveEx();
//
log.fine((System.currentTimeMillis()-start) + " ms");
if (log.isLoggable(Level.FINE)) log.fine((System.currentTimeMillis()-start) + " ms");
// success
StringBuilder msgreturn = new StringBuilder().append(user.getEMail()).append(" - ").append(asset.getVersionNo());
return msgreturn.toString();

View File

@ -183,7 +183,7 @@ public class BOMValidate extends SvrProcess
return false;
}
m_products.add(product);
log.fine(product.getName());
if (log.isLoggable(Level.FINE)) log.fine(product.getName());
//
MProductBOM[] productsBOMs = MProductBOM.getBOMLines(product);
for (int i = 0; i < productsBOMs.length; i++)
@ -242,7 +242,7 @@ public class BOMValidate extends SvrProcess
return false;
}
m_products.add(product);
log.fine(product.getName());
if (log.isLoggable(Level.FINE)) log.fine(product.getName());
//
MBOM bom = boms[0];
MBOMProduct[] BOMproducts = MBOMProduct.getOfBOM(bom);

View File

@ -88,7 +88,7 @@ public class BankStatementMatcher extends SvrProcess
if (m_matchers == null || ibs == null || ibs.getC_Payment_ID() != 0)
return "--";
log.fine("" + ibs);
if (log.isLoggable(Level.FINE)) log.fine("" + ibs);
BankStatementMatchInfo info = null;
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)
return "--";
log.fine("match - " + bsl);
if (log.isLoggable(Level.FINE)) log.fine("match - " + bsl);
BankStatementMatchInfo info = null;
for (int i = 0; i < m_matchers.length; i++)
{
@ -154,7 +154,7 @@ public class BankStatementMatcher extends SvrProcess
{
if (m_matchers == null || bs == null)
return "--";
log.fine("match - " + bs);
if (log.isLoggable(Level.FINE)) log.fine("match - " + bs);
int count = 0;
MBankStatementLine[] lines = bs.getLines(false);
for (int i = 0; i < lines.length; i++)

View File

@ -83,7 +83,7 @@ public class BankStatementPayment extends SvrProcess
{
if (ibs == null || ibs.getC_Payment_ID() != 0)
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)
throw new AdempiereUserError ("@NotFound@ @C_Invoice_ID@ / @C_BPartner_ID@");
if (ibs.getC_BankAccount_ID() == 0)
@ -117,7 +117,7 @@ public class BankStatementPayment extends SvrProcess
{
if (bsl == null || bsl.getC_Payment_ID() != 0)
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)
throw new AdempiereUserError ("@NotFound@ @C_Invoice_ID@ / @C_BPartner_ID@");
//

View File

@ -241,7 +241,7 @@ public class CommissionCalc extends SvrProcess
if (!m_com.isListDetails())
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);
comAmt.calculateCommission();
@ -319,7 +319,7 @@ public class CommissionCalc extends SvrProcess
cal.add(Calendar.DAY_OF_YEAR, -1);
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);

View File

@ -237,7 +237,7 @@ public class DistributionRun extends SvrProcess
// Delete Old
sql = "DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=?";
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
sql = "INSERT INTO T_DistributionRunDetail "
+ "(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=?"
+ " AND l.RatioTotal<>0 AND rl.IsActive='Y' AND ll.IsActive='Y'";
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;
} // insertDetails
@ -291,7 +291,7 @@ public class DistributionRun extends SvrProcess
runLine.addActualAllocation(detail.getActualAllocation());
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()
+ ", Min=" + detail.getMinQty()
+ ", Qty=" + detail.getQty()
@ -305,7 +305,7 @@ public class DistributionRun extends SvrProcess
for (int j = 0; j < m_runLines.length; j++)
{
MDistributionRunLine runLine = m_runLines[j];
log.fine("Run - " + runLine.getInfo());
if (log.isLoggable(Level.FINE)) log.fine("Run - " + runLine.getInfo());
}
} // addAllocations
@ -360,7 +360,7 @@ public class DistributionRun extends SvrProcess
// Adjust when difference is -1->1 or last difference is the same
boolean adjustBiggest = difference.abs().compareTo(Env.ONE) <= 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);
// Adjust Biggest Amount
if (adjustBiggest)
@ -370,7 +370,7 @@ public class DistributionRun extends SvrProcess
MDistributionRunDetail detail = m_details[i];
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()
+ ", Qty Difference=" + difference);
if (detail.getActualAllocation().compareTo(runLine.getMaxAllocation()) == 0
@ -414,7 +414,7 @@ public class DistributionRun extends SvrProcess
{
BigDecimal diffRatio = detail.getRatio().multiply(difference)
.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()
+ ", DiffRatio=" + diffRatio);
detail.adjustQty(diffRatio);
@ -450,7 +450,7 @@ public class DistributionRun extends SvrProcess
+ " - " + m_docType);
log.info("Single=" + m_run.isCreateSingleOrder()
+ " - " + 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);
//
MBPartner bp = null;
@ -517,7 +517,7 @@ public class DistributionRun extends SvrProcess
// Counter Doc
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);
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
MOrgInfo oi = MOrgInfo.get(getCtx(), bp.getAD_OrgBP_ID_Int(), get_TrxName());
@ -527,7 +527,7 @@ public class DistributionRun extends SvrProcess
}
else // normal
{
log.fine("From_Org=" + runAD_Org_ID
if (log.isLoggable(Level.FINE)) log.fine("From_Org=" + runAD_Org_ID
+ ", To_BP=" + bp);
order.setAD_Org_ID(runAD_Org_ID);
order.setBPartner(bp);
@ -601,7 +601,7 @@ public class DistributionRun extends SvrProcess
sql = new StringBuilder("DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=")
.append(p_M_DistributionRun_ID);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("insertDetails - deleted #" + no);
if (log.isLoggable(Level.FINE)) log.fine("insertDetails - deleted #" + no);
// Insert New
sql = new StringBuilder("INSERT INTO T_DistributionRunDetail ")
@ -648,7 +648,7 @@ public class DistributionRun extends SvrProcess
record.setQty(drl.getTotalQty().multiply(factor));
record.saveEx();
}
log.fine("inserted #" + no);
if (log.isLoggable(Level.FINE)) log.fine("inserted #" + no);
return no;
} // insertDetails
@ -713,7 +713,7 @@ public class DistributionRun extends SvrProcess
sql = new StringBuilder("DELETE FROM T_DistributionRunDetail WHERE M_DistributionRun_ID=")
.append(p_M_DistributionRun_ID);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("insertDetails - deleted #" + no);
if (log.isLoggable(Level.FINE)) log.fine("insertDetails - deleted #" + no);
// Insert New
sql = new StringBuilder("INSERT INTO T_DistributionRunDetail ")
@ -752,7 +752,7 @@ public class DistributionRun extends SvrProcess
record.setQty(factor.multiply(drl.getTotalQty()));
record.saveEx();
}
log.fine("inserted #" + no);
if (log.isLoggable(Level.FINE)) log.fine("inserted #" + no);
return no;
} // insertDetails
@ -848,7 +848,7 @@ public class DistributionRun extends SvrProcess
+ " - " + m_docType);
log.info("Single=" + m_run.isCreateSingleOrder()
+ " - " + 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);
//
MBPartner bp = null;
@ -965,7 +965,7 @@ public class DistributionRun extends SvrProcess
// Counter Doc
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);
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
if (ws[0].getM_Warehouse_ID() > 0)
@ -974,7 +974,7 @@ public class DistributionRun extends SvrProcess
}
else // normal
{
log.fine("From_Org=" + runAD_Org_ID
if (log.isLoggable(Level.FINE)) log.fine("From_Org=" + runAD_Org_ID
+ ", To_BP=" + bp);
order.setAD_Org_ID(bp.getAD_OrgBP_ID_Int());
order.setBPartner(bp);

View File

@ -199,7 +199,7 @@ public class DunningPrint extends SvrProcess
if (re != null) {
File attachment = re.getPDF(File.createTempFile("Dunning", ".pdf"));
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);
}
//

View File

@ -234,12 +234,12 @@ public class DunningRunCreate extends SvrProcess
StringBuilder msglog = new StringBuilder()
.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()
.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);
log.fine(msglog.toString());
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
//
// Check for Dispute
if (!p_IncludeInDispute && IsInDispute)

View File

@ -257,7 +257,7 @@ public class ExpenseSOrder extends SvrProcess
// Update TimeExpense Line
tel.setC_OrderLine_ID(ol.getC_OrderLine_ID());
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
log.log(Level.SEVERE, "Not Updated " + tel + " with C_OrderLine_ID");

View File

@ -158,7 +158,7 @@ public class FactAcctReset extends SvrProcess
int invalid = DB.executeUpdate(sql, get_TrxName());
//
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;
} // reset

View File

@ -100,7 +100,7 @@ public class ImportAccount extends SvrProcess
sql = new StringBuilder ("DELETE I_ElementValue ")
.append("WHERE I_IsImported='Y'").append(clientCheck);
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
@ -118,7 +118,7 @@ public class ImportAccount extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("Reset=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Reset=" + no);
// **** Prepare ****
@ -130,7 +130,7 @@ public class ImportAccount extends SvrProcess
.append("WHERE ElementName IS NULL AND C_Element_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
@ -139,7 +139,7 @@ public class ImportAccount extends SvrProcess
.append("WHERE C_Element_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
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(" AND I_IsImported<>'Y'").append(clientCheck);
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
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(" AND I_IsImported='N'").append(clientCheck);
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
sql = new StringBuilder ("UPDATE I_ElementValue ")
@ -210,7 +210,7 @@ public class ImportAccount extends SvrProcess
.append("WHERE AccountType IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("Found ElementValue=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Found ElementValue=" + no);
commitEx();
@ -349,7 +349,7 @@ public class ImportAccount extends SvrProcess
.append("WHERE ParentElementValue_ID IS NULL")
.append(" AND I_IsImported='Y'").append(clientCheck);
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 ")
.append("SET I_ErrorMsg=I_ErrorMsg||'Info=ParentNotFound, ' ")
@ -421,7 +421,7 @@ public class ImportAccount extends SvrProcess
if (m_updateDefaultAccounts)
sql.append(" AND AD_Column_ID IS NULL");
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)
updateDefaults(clientCheck.toString());
@ -437,7 +437,7 @@ public class ImportAccount extends SvrProcess
.append("WHERE I_IsImported='Y'")
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("Processed=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Processed=" + no);
return "";
} // 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)
{
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;
StringBuilder sql = new StringBuilder ("SELECT x.")
.append(ColumnName).append(",Account_ID FROM ")
@ -620,7 +620,7 @@ public class ImportAccount extends SvrProcess
msglog = new StringBuilder("New #").append(no).append(" - ")
.append(TableName).append(".").append(ColumnName).append(" - ").append(C_ElementValue_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)
retValue = UPDATE_YES;
}
@ -636,7 +636,7 @@ public class ImportAccount extends SvrProcess
int no = DB.executeUpdate(sql.toString(), get_TrxName());
msglog = new StringBuilder("Replace #").append(no).append(" - ")
.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)
{
retValue = UPDATE_YES;
@ -646,13 +646,13 @@ public class ImportAccount extends SvrProcess
no = DB.executeUpdate(sql.toString(), get_TrxName());
msglog = new StringBuilder("ImportAccount.updateDefaultAccount - Replace VC #").append(no).append(" - ")
.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=")
.append(C_ElementValue_ID).append(" WHERE Account_ID=").append(Account_ID);
no = DB.executeUpdate(sql.toString(), get_TrxName());
msglog = new StringBuilder("ImportAccount.updateDefaultAccount - Replace Fact #").append(no).append(" - ")
.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
} // need to update

View File

@ -103,7 +103,7 @@ implements ImportProcess
sql = new StringBuilder ("DELETE I_BPartner ")
.append("WHERE I_IsImported='Y'").append(clientCheck);
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
@ -119,7 +119,7 @@ implements ImportProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
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);
@ -130,7 +130,7 @@ implements ImportProcess
sql.append("WHERE GroupValue IS NULL AND C_BP_Group_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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 IS NOT NULL AND I_IsImported='N'").append(clientCheck);
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
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(" AND I_IsImported='N'").append(clientCheck);
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
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(" AND I_IsImported='N'").append(clientCheck);
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
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(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
log.fine("Found Location=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Found Location=" + no);
// Interest Area
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(" AND I_IsImported='N'").append(clientCheck);
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
sql = new StringBuilder ("UPDATE I_BPartner ")
@ -318,7 +318,7 @@ implements ImportProcess
.append(", C_BPartner_ID=").append(impBP.getC_BPartner_ID())
.append(", C_BPartner_Location_ID=").append(impBP.getC_BPartner_Location_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)) {

View File

@ -96,7 +96,7 @@ public class ImportBankStatement extends SvrProcess
sql = new StringBuilder ("DELETE I_BankStatement ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
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

View File

@ -102,7 +102,7 @@ public class ImportConversionRate extends SvrProcess
sql = new StringBuilder ("DELETE I_Conversion_Rate ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
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
@ -146,7 +146,7 @@ public class ImportConversionRate extends SvrProcess
.append(" AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid ConversionType, ' ")
.append("WHERE (C_ConversionType_ID IS NULL")
@ -166,7 +166,7 @@ public class ImportConversionRate extends SvrProcess
.append(" AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency, ' ")
.append("WHERE (C_Currency_ID IS NULL")
@ -186,7 +186,7 @@ public class ImportConversionRate extends SvrProcess
.append(" AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency To, ' ")
.append("WHERE (C_Currency_ID_To IS NULL")
@ -205,14 +205,14 @@ public class ImportConversionRate extends SvrProcess
.append(" AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.append("SET DivideRate = 1 / MultiplyRate ")
.append("WHERE (DivideRate IS NULL OR DivideRate = 0) AND MultiplyRate IS NOT NULL AND MultiplyRate<>0")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.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)")

View File

@ -109,7 +109,7 @@ public class ImportGLJournal extends SvrProcess
sql = new StringBuilder ("DELETE I_GLJournal ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
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
@ -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(" AND I_IsImported<>'Y'");
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
sql = new StringBuilder ("UPDATE I_GLJournal ")
@ -144,7 +144,7 @@ public class ImportGLJournal extends SvrProcess
sql.append(" Updated = COALESCE (Updated, SysDate) ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
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
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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_GLJournal i ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("Set DateAcct=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set DateAcct=" + no);
// Document Type
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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocType, '")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Category, '")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 C_Currency_ID IS NULL AND ISO_Code IS NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency, '")
.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(" AND I_IsImported='N'").append (clientCheck);
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 ")
.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_ConversionType_ID IS NULL AND ConversionTypeValue IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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")
@ -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(" AND C_Currency_ID IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_GLJournal i ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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")
@ -307,7 +307,7 @@ public class ImportGLJournal extends SvrProcess
.append(") WHERE CurrencyRate IS NULL OR CurrencyRate=0 AND C_Currency_ID>0")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Rate, '")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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")
@ -355,7 +355,7 @@ public class ImportGLJournal extends SvrProcess
.append("SET PostingType='A' ")
.append("WHERE PostingType IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid PostingType, ' ")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'");
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 ")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_GLJournal o ")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Account, '")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid BPartner, '")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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)")
@ -452,7 +452,7 @@ public class ImportGLJournal extends SvrProcess
.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);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Project, '")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Campaign, '")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Activity, '")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid SalesRegion, '")
.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(" AND (C_ValidCombination_ID IS NULL OR C_ValidCombination_ID=0) AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid OrgTrx, '")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET AmtSourceCr = 0 ")
.append("WHERE AmtSourceCr IS NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_ErrorMsg=I_ErrorMsg||'WARN=Zero Source Balance, ' ")
.append("WHERE (AmtSourceDr-AmtSourceCr)=0")
@ -555,13 +555,13 @@ public class ImportGLJournal extends SvrProcess
.append("WHERE AmtAcctDr IS NULL OR AmtAcctDr=0")
.append(" AND I_IsImported='N'").append (clientCheck);
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 ")
.append("SET AmtAcctCr = ROUND(AmtSourceCr * CurrencyRate, 2) ")
.append("WHERE AmtAcctCr IS NULL OR AmtAcctCr=0")
.append(" AND I_IsImported='N'").append (clientCheck);
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 ")
.append("SET I_ErrorMsg=I_ErrorMsg||'WARN=Zero Acct Balance, ' ")
.append("WHERE (AmtSourceDr-AmtSourceCr)<>0 AND (AmtAcctDr-AmtAcctCr)=0")

View File

@ -80,7 +80,7 @@ public class ImportInOutConfirm extends SvrProcess
sql = new StringBuilder ("DELETE I_InOutLineConfirm ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
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
@ -102,7 +102,7 @@ public class ImportInOutConfirm extends SvrProcess
.append("WHERE (AD_Client_ID IS NULL OR AD_Client_ID=0)")
.append(" AND I_IsImported<>'Y'");
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
sql = new StringBuilder ("UPDATE I_InOutLineConfirm i ")

View File

@ -149,7 +149,7 @@ public class ImportInventory extends SvrProcess
sql = new StringBuilder ("DELETE I_Inventory ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
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
@ -186,7 +186,7 @@ public class ImportInventory extends SvrProcess
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocType, ' ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 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);
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)
{
sql = new StringBuilder ("UPDATE I_Inventory ")
@ -217,7 +217,7 @@ public class ImportInventory extends SvrProcess
.append (" WHERE M_Locator_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Warehouse, ' ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 M_Product_ID IS NULL AND UPC IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Product, ' ")
.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 C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
.append("WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)")

View File

@ -98,7 +98,7 @@ public class ImportInvoice extends SvrProcess
sql = new StringBuilder ("DELETE I_Invoice ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
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
@ -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);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.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("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());
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 ")
.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) ")
@ -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);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set DocType=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set DocType=" + no);
sql = new StringBuilder ("UPDATE I_Invoice ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
.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);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.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("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.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("WHERE C_DocType_ID IS NULL AND IsSOTrx IS NULL AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No DocType, ' ")
.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 I_IsImported<>'Y'").append (clientCheck);
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' ")
.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 I_IsImported<>'Y'").append (clientCheck);
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
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("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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("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());
log.fine("Set Default PriceList=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set Default PriceList=" + no);
sql = new StringBuilder ("UPDATE I_Invoice o ")
.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 M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 C_PaymentTerm_ID IS NULL AND PaymentTermValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 C_PaymentTerm_ID IS NULL AND o.PaymentTermValue IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 C_Project_ID IS NULL AND ProjectValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Project, ' ")
.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 C_Activity_ID IS NULL AND ActivityValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Activity, ' ")
.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 C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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
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")
@ -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 I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_Invoice o ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_Invoice o ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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
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(" AND I_IsImported='N'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_Invoice o ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 M_Product_ID IS NULL AND UPC IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 M_Product_ID IS NULL AND SKU IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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)")
@ -467,7 +467,7 @@ public class ImportInvoice extends SvrProcess
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Tax, ' ")
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")

View File

@ -100,7 +100,7 @@ public class ImportOrder extends SvrProcess
sql = new StringBuilder ("DELETE I_Order ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
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
@ -133,20 +133,20 @@ public class ImportOrder extends SvrProcess
.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);
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
.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("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());
log.fine("Set SO DocType=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set SO DocType=" + no);
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(" 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);
.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());
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
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
.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("WHERE C_DocType_ID IS NULL AND IsSOTrx='N' AND I_IsImported<>'Y'").append (clientCheck);
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
.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("WHERE C_DocType_ID IS NULL AND IsSOTrx='Y' AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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("WHERE C_DocType_ID IS NULL AND IsSOTrx IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No DocType, ' ")
.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 I_IsImported<>'Y'").append (clientCheck);
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' ")
.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 I_IsImported<>'Y'").append (clientCheck);
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
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("WHERE M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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("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());
log.fine("Set Default PriceList=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set Default PriceList=" + no);
sql = new StringBuilder ("UPDATE I_Order o ")
.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 M_PriceList_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 M_PriceList_ID IS NULL AND C_Currency_ID IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 C_OrderSource_ID IS NULL AND C_OrderSourceValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_Order ")
.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 C_PaymentTerm_ID IS NULL AND PaymentTermValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 C_PaymentTerm_ID IS NULL AND o.PaymentTermValue IS NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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);
no = DB.executeUpdate(sql.toString(), get_TrxName()); // Warehouse for Org
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 ")
.append("SET M_Warehouse_ID=(SELECT M_Warehouse_ID FROM M_Warehouse w")
.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);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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
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")
@ -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 I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_Order o ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_Order o ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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
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(" AND I_IsImported='N'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_Order o ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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
sql = new StringBuilder ("UPDATE I_Order o ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 M_Product_ID IS NULL AND UPC IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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 M_Product_ID IS NULL AND SKU IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.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)")
@ -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 C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' ")
.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(" AND I_IsImported<>'Y'").append (clientCheck);
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 ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Tax, ' ")
.append("WHERE C_Tax_ID IS NULL AND TaxIndicator IS NOT NULL")

View File

@ -102,7 +102,7 @@ public class ImportPayment extends SvrProcess
sql = new StringBuilder ("DELETE I_Payment ")
.append("WHERE I_IsImported='Y'").append (clientCheck);
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
@ -272,7 +272,7 @@ public class ImportPayment extends SvrProcess
.append(" AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set Invoice from DocumentNo=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set Invoice from DocumentNo=" + no);
// BPartner
sql = new StringBuilder ("UPDATE I_Payment i ")
@ -282,7 +282,7 @@ public class ImportPayment extends SvrProcess
.append(" AND I_IsImported<>'Y'").append (clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.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);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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 ")
.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);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set DocType=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set DocType=" + no);
sql = new StringBuilder ("UPDATE I_Payment ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid DocTypeName, ' ")
.append("WHERE C_DocType_ID IS NULL AND DocTypeName IS NOT NULL")

View File

@ -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 I_IsImported<>'Y'").append(clientCheck);
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 ")
.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);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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",
"Volume","Weight","ShelfWidth","ShelfHeight","ShelfDepth","UnitsPerPallet"};
@ -224,7 +224,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
@ -242,7 +242,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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",
"PriceList","PricePO","RoyaltyAmt",
@ -258,7 +258,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
@ -278,7 +278,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE X12DE355 IS NULL AND C_UOM_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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;
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);
@ -509,7 +509,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
int M_Product_ID = imp.getM_Product_ID();
int C_BPartner_ID = imp.getC_BPartner_ID();
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);
// Product

View File

@ -88,7 +88,7 @@ public class ImportReportLine extends SvrProcess
sql = new StringBuilder ("DELETE I_ReportLine ")
.append("WHERE I_IsImported='Y'").append(clientCheck);
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
@ -104,7 +104,7 @@ public class ImportReportLine extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("Reset=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Reset=" + no);
// ReportLineSetName (Default)
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(" AND I_IsImported<>'Y'").append(clientCheck);
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
sql = new StringBuilder ("UPDATE I_ReportLine i ")
@ -124,7 +124,7 @@ public class ImportReportLine extends SvrProcess
.append("WHERE PA_ReportLineSet_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
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 ")
.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(" AND I_IsImported<>'Y'").append(clientCheck);
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
sql = new StringBuilder ("UPDATE I_ReportLine ")
@ -164,7 +164,7 @@ public class ImportReportLine extends SvrProcess
.append("WHERE SeqNo IS NULL")
.append(" AND I_IsImported='N'").append(clientCheck);
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
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(" AND I_IsImported='N'").append(clientCheck); // not if previous error
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
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(" AND I_IsImported<>'Y'").append(clientCheck);
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
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(" AND I_IsImported<>'Y'").append(clientCheck);
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
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(" AND I_IsImported<>'Y'").append(clientCheck);
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
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(" AND I_IsImported='N'").append(clientCheck);
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();
@ -334,7 +334,7 @@ public class ImportReportLine extends SvrProcess
.append("WHERE PA_ReportLine_ID IS NULL AND PA_ReportLineSet_ID IS NOT NULL")
.append(" AND I_IsImported='N'").append(clientCheck);
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
sql = new StringBuilder ("UPDATE PA_ReportLine r ")

View File

@ -224,7 +224,7 @@ public class InOutGenerate extends SvrProcess
&& (m_shipment.getC_BPartner_Location_ID() != order.getC_BPartner_Location_ID()
|| m_shipment.getM_Shipper_ID() != order.getM_Shipper_ID() )))
completeShipment();
log.fine("check: " + order + " - DeliveryRule=" + order.getDeliveryRule());
if (log.isLoggable(Level.FINE)) log.fine("check: " + order + " - DeliveryRule=" + order.getDeliveryRule());
//
Timestamp minGuaranteeDate = m_movementDate;
boolean completeOrder = MOrder.DELIVERYRULE_CompleteOrder.equals(order.getDeliveryRule());
@ -251,7 +251,7 @@ public class InOutGenerate extends SvrProcess
MOrderLine line = lines[i];
if (line.getM_Warehouse_ID() != p_M_Warehouse_ID)
continue;
log.fine("check: " + line);
if (log.isLoggable(Level.FINE)) log.fine("check: " + line);
BigDecimal onHand = Env.ZERO;
BigDecimal toDeliver = line.getQtyOrdered()
.subtract(line.getQtyDelivered());
@ -284,7 +284,7 @@ public class InOutGenerate extends SvrProcess
}
// Adjust On Hand
onHand = onHand.subtract(unconfirmedShippedQty);
log.fine(logInfo.toString());
if (log.isLoggable(Level.FINE)) log.fine(logInfo.toString());
}
// Comments & lines w/o product & services
@ -315,7 +315,7 @@ public class InOutGenerate extends SvrProcess
// Complete Order
if (completeOrder && !fullLine)
{
log.fine("Failed CompleteOrder - OnHand=" + onHand
if (log.isLoggable(Level.FINE)) log.fine("Failed CompleteOrder - OnHand=" + onHand
+ " (Unconfirmed=" + unconfirmedShippedQty
+ "), ToDeliver=" + toDeliver + " - " + line);
completeOrder = false;
@ -324,7 +324,7 @@ public class InOutGenerate extends SvrProcess
// Complete Line
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
+ ", ToDeliver=" + toDeliver + " - " + line);
//
@ -338,7 +338,7 @@ public class InOutGenerate extends SvrProcess
BigDecimal deliver = toDeliver;
if (deliver.compareTo(onHand) > 0)
deliver = onHand;
log.fine("Available - OnHand=" + onHand
if (log.isLoggable(Level.FINE)) log.fine("Available - OnHand=" + onHand
+ " (Unconfirmed=" + unconfirmedShippedQty
+ "), ToDeliver=" + toDeliver
+ ", Delivering=" + deliver + " - " + line);
@ -349,7 +349,7 @@ public class InOutGenerate extends SvrProcess
else if (MOrder.DELIVERYRULE_Force.equals(order.getDeliveryRule()))
{
BigDecimal deliver = toDeliver;
log.fine("Force - OnHand=" + onHand
if (log.isLoggable(Level.FINE)) log.fine("Force - OnHand=" + onHand
+ " (Unconfirmed=" + unconfirmedShippedQty
+ "), ToDeliver=" + toDeliver
+ ", Delivering=" + deliver + " - " + line);
@ -358,11 +358,11 @@ public class InOutGenerate extends SvrProcess
}
// Manual
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
+ ") - " + line);
else
log.fine("Failed: " + order.getDeliveryRule() + " - OnHand=" + onHand
if (log.isLoggable(Level.FINE)) log.fine("Failed: " + order.getDeliveryRule() + " - OnHand=" + onHand
+ " (Unconfirmed=" + unconfirmedShippedQty
+ "), ToDeliver=" + toDeliver + " - " + line);
} // for all order lines
@ -450,7 +450,7 @@ public class InOutGenerate extends SvrProcess
line.setLine(m_line + orderLine.getLine());
if (!line.save())
throw new IllegalStateException("Could not create Shipment Line");
log.fine(line.toString());
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
return;
}
@ -506,7 +506,7 @@ public class InOutGenerate extends SvrProcess
line.setLine(m_line + orderLine.getLine());
if (!line.save())
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);
// Temp adjustment, actual update happen in MInOut.completeIt
storage.setQtyOnHand(storage.getQtyOnHand().subtract(deliver));

View File

@ -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(" AND Processed='N' AND M_Inventory_ID=").append(p_M_Inventory_ID).append(")");
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
StringBuilder sql = new StringBuilder("DELETE M_InventoryLine WHERE Processed='N' ")
.append("AND M_Inventory_ID=").append(p_M_Inventory_ID);
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
@ -156,7 +156,7 @@ public class InventoryCountCreate extends SvrProcess
.append("WHERE sl.M_Warehouse_ID=l.M_Warehouse_ID")
.append(" AND s.M_Product_ID=p.M_Product_ID)");
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,");
@ -394,7 +394,7 @@ public class InventoryCountCreate extends SvrProcess
ret.append(",");
}
}
log.fine(ret.toString());
if (log.isLoggable(Level.FINE)) log.fine(ret.toString());
StringBuilder msgreturn = new StringBuilder(ret).append(productCategoryId);
return msgreturn.toString();
}

View File

@ -17,6 +17,7 @@
package org.compiere.process;
import java.sql.Timestamp;
import java.util.logging.Level;
import org.compiere.model.MAcctSchema;
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("WHERE w.M_Warehouse_ID=").append(p_M_Warehouse_ID);
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)
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_AttributeSetInstance_ID=c.M_AttributeSetInstance_ID)");
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
sql = new StringBuilder ("UPDATE T_InventoryValue iv ")
.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(" AND ivv.M_CostElement_ID IS NULL)");
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)
return "No Costs found";
@ -171,7 +172,7 @@ public class InventoryValue extends SvrProcess
.append("C_Currency_ID=").append(p_C_Currency_ID)
.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
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
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(" AND iv.M_AttributeSetInstance_ID<>0");
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
sql = new StringBuilder ("UPDATE T_InventoryValue iv SET QtyOnHand = ")
.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(" AND iv.M_AttributeSetInstance_ID=0");
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
sql = new StringBuilder("UPDATE T_InventoryValue iv ")
@ -208,7 +209,7 @@ public class InventoryValue extends SvrProcess
.append("WHERE iv.M_AttributeSetInstance_ID<>0" )
.append(" AND iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
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 ")
.append("SET QtyOnHand=")
@ -222,13 +223,13 @@ public class InventoryValue extends SvrProcess
.append("AND iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
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
sql = new StringBuilder("DELETE T_InventoryValue ")
.append("WHERE (QtyOnHand=0 OR QtyOnHand IS NULL) AND AD_PInstance_ID=").append(getAD_PInstance_ID());
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
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("WHERE iv.AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdateEx (sql.toString(), get_TrxName());
log.fine("Converted=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Converted=" + no);
}
// Update Values
@ -287,7 +288,7 @@ public class InventoryValue extends SvrProcess
.append("WHERE AD_PInstance_ID=").append(getAD_PInstance_ID()
);
no = DB.executeUpdateEx(dbeux.toString(), get_TrxName());
log.fine("Calculation=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Calculation=" + no);
//
return msg;
} // doIt

View File

@ -269,7 +269,7 @@ public class InvoiceGenerate extends SvrProcess
// Complete Order
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
completeOrder = false;
break;
@ -277,7 +277,7 @@ public class InvoiceGenerate extends SvrProcess
// Immediate
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;
// Correct UOM for QtyEntered
if (oLine.getQtyEntered().compareTo(oLine.getQtyOrdered()) != 0)
@ -288,7 +288,7 @@ public class InvoiceGenerate extends SvrProcess
}
else
{
log.fine("Failed: " + order.getInvoiceRule()
if (log.isLoggable(Level.FINE)) log.fine("Failed: " + order.getInvoiceRule()
+ " - ToInvoice=" + toInvoice + " - " + oLine);
addLog(0, null, null,"Failed: " + order.getInvoiceRule()
+ " - 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());
if (!line.save())
throw new IllegalStateException("Could not create Invoice Line (o)");
log.fine(line.toString());
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
} // createLine
/**
@ -436,7 +436,7 @@ public class InvoiceGenerate extends SvrProcess
if (!sLine.save())
throw new IllegalStateException("Could not update Shipment Line");
log.fine(line.toString());
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
} // createLine

View File

@ -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
log.fine(sql.toString());
if (log.isLoggable(Level.FINE)) log.fine(sql.toString());
MPrintFormat format = null;
int old_AD_PrintFormat_ID = -1;
@ -313,7 +313,7 @@ public class InvoicePrint extends SvrProcess
if (!Ini.isClient())
invoice = new File(MInvoice.getPDFFileName(documentDir, C_Invoice_ID));
File attachment = re.getPDF(invoice);
log.fine(to + " - " + attachment);
if (log.isLoggable(Level.FINE)) log.fine(to + " - " + attachment);
email.addAttachment(attachment);
//
String msg = email.send();

View File

@ -108,7 +108,7 @@ public class M_PriceList_Create extends SvrProcess {
"Update The PriceList to zero of M_Product_PO WHERE PriceList IS NULL",
sqlupd.toString());
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.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",
sqlupd.toString());
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.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 ",
sqlupd.toString());
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.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",
sqlupd.toString());
totu += cntu;
log.fine("Updated " + cntu);
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
//
// Set default current vendor
//
@ -155,7 +155,7 @@ public class M_PriceList_Create extends SvrProcess {
if (cntu == -1)
raiseError("Update IsCurrentVendor to Y of M_Product_PO ", sqlupd.toString());
totu += cntu;
log.fine("Updated " + cntu);
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
// let the commit for SvrProcess
// 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",
sqlupd.toString());
totu += cntu;
log.fine("Updated " + cntu);
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
}
}
} catch (SQLException e) {
@ -232,7 +232,7 @@ public class M_PriceList_Create extends SvrProcess {
raiseError(" DELETE M_ProductPrice ", sqldel.toString());
totd += cntd;
message = new StringBuilder("@Deleted@=").append(cntd).append(" - ");
log.fine("Deleted " + cntd);
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
}
//
// Get PriceList Info
@ -284,7 +284,7 @@ public class M_PriceList_Create extends SvrProcess {
if (cntd == -1)
raiseError(" DELETE T_Selection ", sqldel.toString());
totd += cntd;
log.fine("Deleted " + cntd);
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
//
//Create Selection in temporary table
//
@ -332,7 +332,7 @@ public class M_PriceList_Create extends SvrProcess {
if (cnti == -1)
raiseError(" INSERT INTO T_Selection ", sqlins.toString());
toti += cnti;
log.fine("Inserted " + cnti);
if (log.isLoggable(Level.FINE)) log.fine("Inserted " + cnti);
} else {
//
@ -382,7 +382,7 @@ public class M_PriceList_Create extends SvrProcess {
" INSERT INTO T_Selection from existing PriceList",
sqlins.toString());
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());
totd += 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",
sqlins.toString());
toti += cnti;
log.fine("Inserted " + cnti);
if (log.isLoggable(Level.FINE)) log.fine("Inserted " + cnti);
} else {
//
//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",
sqlins.toString());
toti += cnti;
log.fine("Inserted " + cnti);
if (log.isLoggable(Level.FINE)) log.fine("Inserted " + cnti);
}
message.append(", @Inserted@=").append(cnti);
@ -612,7 +612,7 @@ public class M_PriceList_Create extends SvrProcess {
if (cntu == -1)
raiseError("Update M_ProductPrice ", sqlupd.toString());
totu += cntu;
log.fine("Updated " + cntu);
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
//
//Rounding (AD_Reference_ID=155)
@ -665,7 +665,7 @@ public class M_PriceList_Create extends SvrProcess {
if (cntu == -1)
raiseError("Update M_ProductPrice ", sqlupd.toString());
totu += cntu;
log.fine("Updated " + cntu);
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
message.append(", @Updated@=").append(cntu);
//
@ -691,7 +691,7 @@ public class M_PriceList_Create extends SvrProcess {
if (cntu == -1)
raiseError("Update M_ProductPrice ", sqlupd.toString());
totu += cntu;
log.fine("Updated " + cntu);
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
v_NextNo = v_NextNo + 1;
addLog(0, null, null, message.toString());
@ -705,7 +705,7 @@ public class M_PriceList_Create extends SvrProcess {
if (cntd == -1)
raiseError(" DELETE T_Selection ", sqldel.toString());
totd += cntd;
log.fine("Deleted " + cntd);
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
//
//commit;
@ -797,7 +797,7 @@ public class M_PriceList_Create extends SvrProcess {
ret.append(",");
}
}
log.fine(ret.toString());
if (log.isLoggable(Level.FINE)) log.fine(ret.toString());
return ret.toString() + productCategoryId;
}

View File

@ -130,7 +130,7 @@ public class M_Product_BOM_Check extends SvrProcess
rs = null;
pstmt = null;
}
log.fine("Count T_Selection =" + countno);
if (log.isLoggable(Level.FINE)) log.fine("Count T_Selection =" + countno);
if (countno == 0)
break;

View File

@ -162,7 +162,7 @@ public class OrderPOCreate extends SvrProcess
rs = null; pstmt = null;
}
if (counter == 0)
log.fine(sql.toString());
if (log.isLoggable(Level.FINE)) log.fine(sql.toString());
StringBuilder msgreturn = new StringBuilder("@Created@ ").append(counter);
return msgreturn.toString();
} // doIt

View File

@ -180,7 +180,7 @@ public class OrgOwnership extends SvrProcess
else
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);
log.fine("productOwnership - " + set);
if (log.isLoggable(Level.FINE)) log.fine("productOwnership - " + set);
// Product
StringBuilder sql = new StringBuilder("UPDATE M_Product x ").append(set);
@ -225,7 +225,7 @@ public class OrgOwnership extends SvrProcess
else
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);
log.fine("bPartnerOwnership - " + set.toString());
if (log.isLoggable(Level.FINE)) log.fine("bPartnerOwnership - " + set.toString());
// BPartner
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);
int no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("generalOwnership - R_ContactInterest=" + no);
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - R_ContactInterest=" + no);
// AD_User_Roles
sql = new StringBuilder("UPDATE AD_User_Roles ").append(set);
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
sql = new StringBuilder("UPDATE C_BPartner_Product ").append(set);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("generalOwnership - C_BPartner_Product=" + no);
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - C_BPartner_Product=" + no);
// Withholding
sql = new StringBuilder("UPDATE C_BP_Withholding x ").append(set);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("generalOwnership - C_BP_Withholding=" + no);
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - C_BP_Withholding=" + no);
// Replenish
sql = new StringBuilder("UPDATE M_Replenish ").append(set);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("generalOwnership - M_Replenish=" + no);
if (log.isLoggable(Level.FINE)) log.fine("generalOwnership - M_Replenish=" + no);
} // generalOwnership

View File

@ -127,7 +127,7 @@ public class RegisterSystem extends SvrProcess
.append("&NumInvoice=").append(URLEncoder.encode(String.valueOf(
DB.getSQLValue(null, "SELECT Count(*) FROM C_Invoice")), enc));
}
log.fine(urlString.toString());
if (log.isLoggable(Level.FINE)) log.fine(urlString.toString());
// Send it
URL url = new URL (urlString.toString());

View File

@ -144,7 +144,7 @@ public class ReplenishReport extends SvrProcess
.append("WHERE Level_Max < Level_Min");
int no = DB.executeUpdate(sql.toString(), get_TrxName());
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
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");
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Corrected Order Min=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Corrected Order Min=" + no);
// Pack should be 1
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");
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
@ -173,7 +173,7 @@ public class ReplenishReport extends SvrProcess
.append("HAVING COUNT(*) = 1)");
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
sql = new StringBuilder("UPDATE M_Product_PO p")
@ -185,13 +185,13 @@ public class ReplenishReport extends SvrProcess
.append("HAVING COUNT(*) > 1)");
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Corrected CurrentVendor(N)=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Corrected CurrentVendor(N)=" + no);
// Just to be sure
sql = new StringBuilder("DELETE T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Delete Existing Temp=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Delete Existing Temp=" + no);
} // prepareTable
/**
@ -223,7 +223,7 @@ public class ReplenishReport extends SvrProcess
sql.append(" AND po.C_BPartner_ID=").append(p_C_BPartner_ID);
int no = DB.executeUpdate(sql.toString(), get_TrxName());
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)
{
@ -246,7 +246,7 @@ public class ReplenishReport extends SvrProcess
sql.append("WHERE r.M_Product_ID=t.M_Product_ID");
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID()).append(")");
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.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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Update #" + no);
if (log.isLoggable(Level.FINE)) log.fine("Update #" + no);
// Delete inactive products and replenishments
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Delete Inactive=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Delete Inactive=" + no);
// Ensure Data consistency
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Update Type-2=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Update Type-2=" + no);
// Minimum Order Quantity
@ -312,7 +312,7 @@ public class ReplenishReport extends SvrProcess
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set MinOrderQty=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set MinOrderQty=" + no);
// Even dividable by Pack
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set OrderPackQty=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set OrderPackQty=" + no);
// Source from other warehouse
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set Source Warehouse=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set Source Warehouse=" + no);
}
// Check Source Warehouse
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set same Source Warehouse=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set same Source Warehouse=" + no);
// Custom Replenishment
String className = wh.getReplenishmentClass();
@ -388,7 +388,7 @@ public class ReplenishReport extends SvrProcess
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Delete No QtyToOrder=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Delete No QtyToOrder=" + no);
} // fillTable
/**
@ -424,7 +424,7 @@ public class ReplenishReport extends SvrProcess
order.setM_Warehouse_ID(wh.getM_Warehouse_ID());
if (!order.save())
return;
log.fine(order.toString());
if (log.isLoggable(Level.FINE)) log.fine(order.toString());
noOrders++;
info.append(" - ");
info.append(order.getDocumentNo());
@ -468,7 +468,7 @@ public class ReplenishReport extends SvrProcess
requisition.setM_Warehouse_ID(wh.getM_Warehouse_ID());
if (!requisition.save())
return;
log.fine(requisition.toString());
if (log.isLoggable(Level.FINE)) log.fine(requisition.toString());
noReqs++;
info.append(" - ");
info.append(requisition.getDocumentNo());
@ -525,7 +525,7 @@ public class ReplenishReport extends SvrProcess
move.setAD_Org_ID(whSource.getAD_Org_ID());
if (!move.save())
return;
log.fine(move.toString());
if (log.isLoggable(Level.FINE)) log.fine(move.toString());
noMoves++;
info.append(" - ").append(move.getDocumentNo());
}
@ -648,7 +648,7 @@ public class ReplenishReport extends SvrProcess
if (!order.save())
return;
log.fine(order.toString());
if (log.isLoggable(Level.FINE)) log.fine(order.toString());
noMoves++;
info.append(" - ").append(order.getDocumentNo());
}

View File

@ -155,7 +155,7 @@ public class ReplenishReportProduction extends SvrProcess
.append("WHERE Level_Max < Level_Min");
int no = DB.executeUpdate(sql.toString(), get_TrxName());
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
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");
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Corrected Order Min=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Corrected Order Min=" + no);
// Pack should be 1
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");
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
sql = new StringBuilder("UPDATE M_Product_PO p")
@ -183,7 +183,7 @@ public class ReplenishReportProduction extends SvrProcess
.append("HAVING COUNT(*) = 1)");
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
sql = new StringBuilder("UPDATE M_Product_PO p")
@ -195,13 +195,13 @@ public class ReplenishReportProduction extends SvrProcess
.append("HAVING COUNT(*) > 1)");
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Corrected CurrentVendor(N)=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Corrected CurrentVendor(N)=" + no);
// Just to be sure
sql = new StringBuilder("DELETE T_Replenish WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Delete Existing Temp=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Delete Existing Temp=" + no);
} // prepareTable
/**
@ -237,7 +237,7 @@ public class ReplenishReportProduction extends SvrProcess
sql.append(" AND p.IsKanban = '").append(isKanban).append("' ");
int no = DB.executeUpdate(sql.toString(), get_TrxName());
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)
{
@ -265,7 +265,7 @@ public class ReplenishReportProduction extends SvrProcess
if ( isKanban != null )
sql.append(" AND p.IsKanban = '").append(isKanban).append("' ");
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 ");
@ -280,7 +280,7 @@ public class ReplenishReportProduction extends SvrProcess
sql.append(" WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Update #" + no);
if (log.isLoggable(Level.FINE)) log.fine("Update #" + no);
// add production lines
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Update #" + no);
if (log.isLoggable(Level.FINE)) log.fine("Update #" + no);
// Delete inactive products and replenishments
@ -306,7 +306,7 @@ public class ReplenishReportProduction extends SvrProcess
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Delete Inactive=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Delete Inactive=" + no);
// Ensure Data consistency
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
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
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Update Type-2=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Update Type-2=" + no);
// Minimum Order Quantity
@ -346,7 +346,7 @@ public class ReplenishReportProduction extends SvrProcess
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set MinOrderQty=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set MinOrderQty=" + no);
// Even dividable by Pack
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set OrderPackQty=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set OrderPackQty=" + no);
// Source from other warehouse
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set Source Warehouse=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set Source Warehouse=" + no);
}
// Check Source Warehouse
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());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Set same Source Warehouse=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Set same Source Warehouse=" + no);
// Custom Replenishment
String className = wh.getReplenishmentClass();
@ -422,7 +422,7 @@ public class ReplenishReportProduction extends SvrProcess
sql.append(" AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.fine("Delete No QtyToOrder=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Delete No QtyToOrder=" + no);
} // fillTable
@ -459,7 +459,7 @@ public class ReplenishReportProduction extends SvrProcess
order.setM_Warehouse_ID(wh.getM_Warehouse_ID());
if (!order.save())
return;
log.fine(order.toString());
if (log.isLoggable(Level.FINE)) log.fine(order.toString());
noOrders++;
info.append(" - ");
info.append(order.getDocumentNo());
@ -503,7 +503,7 @@ public class ReplenishReportProduction extends SvrProcess
requisition.setM_Warehouse_ID(wh.getM_Warehouse_ID());
if (!requisition.save())
return;
log.fine(requisition.toString());
if (log.isLoggable(Level.FINE)) log.fine(requisition.toString());
noReqs++;
info.append(" - ");
info.append(requisition.getDocumentNo());
@ -561,7 +561,7 @@ public class ReplenishReportProduction extends SvrProcess
move.setAD_Org_ID(whSource.getAD_Org_ID());
if (!move.save())
return;
log.fine(move.toString());
if (log.isLoggable(Level.FINE)) log.fine(move.toString());
noMoves++;
info.append(" - ").append(move.getDocumentNo());
}
@ -684,7 +684,7 @@ public class ReplenishReportProduction extends SvrProcess
if (!order.save())
return;
log.fine(order.toString());
if (log.isLoggable(Level.FINE)) log.fine(order.toString());
noMoves++;
info.append(" - ").append(order.getDocumentNo());
}
@ -814,7 +814,7 @@ public class ReplenishReportProduction extends SvrProcess
production.setIsCreated("Y");
production.saveEx(get_TrxName());
log.fine(production.toString());
if (log.isLoggable(Level.FINE)) log.fine(production.toString());
noProds++;
info.append(" - ");
info.append(production.getDocumentNo());

View File

@ -280,7 +280,7 @@ public class ReplicationLocal extends SvrProcess
data.CentralData = getRowSet(data.Sql, 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;
return false;
}
@ -312,7 +312,7 @@ public class ReplicationLocal extends SvrProcess
{data.TableName, data.KeyColumns, sourceRS, targetRS, m_test, Boolean.TRUE});
boolean replicated = isReplicated(result);
if (replicated)
log.fine("mergeDataTable -> " + TableName + " - " + result);
if (log.isLoggable(Level.FINE)) log.fine("mergeDataTable -> " + TableName + " - " + result);
else
{
m_replicated = false;
@ -458,7 +458,7 @@ public class ReplicationLocal extends SvrProcess
data.CentralData = getRowSet(data.Sql, null);
if (data.CentralData == null)
{
log.fine("sendUpdatesTable - Null - " + TableName);
if (log.isLoggable(Level.FINE)) log.fine("sendUpdatesTable - Null - " + TableName);
m_replicated = false;
return false;
}
@ -471,17 +471,17 @@ public class ReplicationLocal extends SvrProcess
}
catch (SQLException ex)
{
log.fine("RowCheck " + ex);
if (log.isLoggable(Level.FINE)) log.fine("RowCheck " + ex);
m_replicated = false;
return false;
}
if (rows == 0)
{
log.fine("No Rows - " + TableName);
if (log.isLoggable(Level.FINE)) log.fine("No Rows - " + TableName);
return true;
}
else
log.fine(TableName + " #" + rows);
if (log.isLoggable(Level.FINE)) log.fine(TableName + " #" + rows);
// Process Info
ProcessInfo pi = new ProcessInfo("SendUpdates", 0);

View File

@ -111,7 +111,7 @@ public class ReplicationRemote extends SvrProcess
//int AD_Table_ID = rs.getInt(1);
String ReplicationType = rs.getString(2);
String TableName = rs.getString(3);
log.fine("setupRemote - " + TableName + " - " + ReplicationType);
if (log.isLoggable(Level.FINE)) log.fine("setupRemote - " + TableName + " - " + ReplicationType);
if (!data.Test.booleanValue())
setupRemoteAD_Table(TableName, ReplicationType);
}
@ -237,7 +237,7 @@ public class ReplicationRemote extends SvrProcess
RowSet targetRS = ReplicationLocal.getRowSet(data.Sql, null);
Object result = doIt (ReplicationLocal.START, "sync", new Object[] // Merge
{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);
boolean replicated = ReplicationLocal.isReplicated(result);
if (!replicated)
@ -280,7 +280,7 @@ public class ReplicationRemote extends SvrProcess
RowSet targetRS = ReplicationLocal.getRowSet(data.Sql, null);
Object result = doIt (ReplicationLocal.START, "sync", new Object[] // Sync
{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);
boolean replicated = ReplicationLocal.isReplicated(result);
if (!replicated)

View File

@ -186,7 +186,7 @@ public class RequestEMailProcessor extends SvrProcess
//
m_session = Session.getDefaultInstance(props, auth);
m_session.setDebug(CLogMgt.isLevelFinest());
log.fine("getSession - " + m_session);
if (log.isLoggable(Level.FINE)) log.fine("getSession - " + m_session);
return m_session;
} // getSession
@ -208,7 +208,7 @@ public class RequestEMailProcessor extends SvrProcess
// Connect
m_store.connect();
//
log.fine("getStore - " + m_store);
if (log.isLoggable(Level.FINE)) log.fine("getStore - " + m_store);
return m_store;
} // getStore
@ -229,7 +229,7 @@ public class RequestEMailProcessor extends SvrProcess
if (!inbox.exists())
throw new IllegalStateException("No Inbox");
inbox.open(Folder.READ_WRITE);
log.fine("processInBox - " + inbox.getName()
if (log.isLoggable(Level.FINE)) log.fine("processInBox - " + inbox.getName()
+ "; Messages Total=" + inbox.getMessageCount()
+ "; New=" + inbox.getNewMessageCount());

View File

@ -82,7 +82,7 @@ public class RfQResponseRank extends SvrProcess
// Get Completed, Active Responses
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)
throw new IllegalArgumentException("No completed RfQ Responses found");
if (responses.length == 1)
@ -120,7 +120,7 @@ public class RfQResponseRank extends SvrProcess
MRfQLine rfqLine = rfqLines[i];
if (!rfqLine.isActive())
continue;
log.fine("rankLines - " + rfqLine);
if (log.isLoggable(Level.FINE)) log.fine("rankLines - " + rfqLine);
MRfQLineQty[] rfqQtys = rfqLine.getQtys();
for (int j = 0; j < rfqQtys.length; j++)
{
@ -128,7 +128,7 @@ public class RfQResponseRank extends SvrProcess
MRfQLineQty rfqQty = rfqQtys[j];
if (!rfqQty.isActive() || !rfqQty.isRfQQty())
continue;
log.fine("rankLines Qty - " + rfqQty);
if (log.isLoggable(Level.FINE)) log.fine("rankLines Qty - " + rfqQty);
MRfQResponseLineQty[] respQtys = rfqQty.getResponseQtys(false);
for (int kk = 0; kk < respQtys.length; kk++)
{
@ -138,14 +138,14 @@ public class RfQResponseRank extends SvrProcess
{
respQty.setRanking(999);
respQty.saveEx();
log.fine(" - ignored: " + respQty);
if (log.isLoggable(Level.FINE)) log.fine(" - ignored: " + respQty);
}
} // for all respones line qtys
// Rank RfQ Line Qtys
respQtys = rfqQty.getResponseQtys(false);
if (respQtys.length == 0)
log.fine(" - No Qtys with valid Amounts");
if (log.isLoggable(Level.FINE)) log.fine(" - No Qtys with valid Amounts");
else
{
Arrays.sort(respQtys, respQtys[0]);
@ -164,7 +164,7 @@ public class RfQResponseRank extends SvrProcess
{
qty.setRanking(999);
qty.saveEx();
log.fine(" - Rank 999: " + qty);
if (log.isLoggable(Level.FINE)) log.fine(" - Rank 999: " + qty);
continue;
}
@ -174,7 +174,7 @@ public class RfQResponseRank extends SvrProcess
lastAmt = qty.getNetAmt();
}
qty.setRanking(lastRank);
log.fine(" - Rank " + lastRank + ": " + qty);
if (log.isLoggable(Level.FINE)) log.fine(" - Rank " + lastRank + ": " + qty);
qty.saveEx();
//
if (rank == 0) // Update RfQ
@ -224,7 +224,7 @@ public class RfQResponseRank extends SvrProcess
}
response.setRanking(ranking);
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 (winner == null && ranking > 0)
@ -239,7 +239,7 @@ public class RfQResponseRank extends SvrProcess
{
winner.setIsSelectedWinner(true);
winner.saveEx();
log.fine("- Response Winner: " + winner);
if (log.isLoggable(Level.FINE)) log.fine("- Response Winner: " + winner);
}
} // rankLines
@ -272,7 +272,7 @@ public class RfQResponseRank extends SvrProcess
response.setIsSelectedWinner(false);
}
response.saveEx();
log.fine("rankResponse - " + response);
if (log.isLoggable(Level.FINE)) log.fine("rankResponse - " + response);
}
} // rankResponses

View File

@ -116,7 +116,7 @@ public class SendMailText extends SvrProcess
if (m_from.getAD_User_ID() == 0)
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();
if (m_R_InterestArea_ID > 0)
@ -284,7 +284,7 @@ public class SendMailText extends SvrProcess
new MUserMail(m_MailText, AD_User_ID, email).saveEx();
//
if (OK)
log.fine(to.getEMail());
if (log.isLoggable(Level.FINE)) log.fine(to.getEMail());
else
log.warning("FAILURE - " + to.getEMail());
StringBuilder msglog = new StringBuilder((OK ? "@OK@" : "@ERROR@")).append(" - ").append(to.getEMail());

View File

@ -167,7 +167,7 @@ public class TableCreateColumns extends SvrProcess
|| tn.indexOf("EXPLAIN") != -1 // explain plan
)
{
log.fine("Ignored: " + tableName + " - " + tableType);
if (log.isLoggable(Level.FINE)) log.fine("Ignored: " + tableName + " - " + tableType);
continue;
}
//

View File

@ -134,7 +134,7 @@ public class TransactionXRef extends SvrProcess
.append(") ORDER BY M_Transaction_ID");
//
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);
// Multi-Level

View File

@ -82,7 +82,7 @@ public class UserPassword extends SvrProcess
MUser user = MUser.get(getCtx(), p_AD_User_ID);
user.load(get_TrxName());
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);

View File

@ -35,7 +35,6 @@ import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.compiere.Adempiere;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -457,7 +456,7 @@ public abstract class AbstractExcelExporter
//
// Workbook Info
if (CLogMgt.isLevelFine()) {
if (log.isLoggable(Level.FINE)) {
log.fine("Sheets #"+m_sheetCount);
log.fine("Styles used #"+m_styles.size());
}

View File

@ -28,6 +28,7 @@ import java.util.Calendar;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.Level;
import java.util.UUID;
import org.adempiere.base.IGridTabImporter;
@ -195,7 +196,7 @@ public class GridTabCSVImporter implements IGridTabImporter
StringBuilder lineError = new StringBuilder();
String headName = set.getKey();
Object value = set.getValue();
log.fine("Setting " + headName + " to " + value);
if (log.isLoggable(Level.FINE)) log.fine("Setting " + headName + " to " + value);
String columnName = headName;

View File

@ -36,6 +36,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.Vector;
import java.util.logging.Level;
import org.compiere.model.MColumn;
import org.compiere.model.MQuery;
@ -67,7 +68,7 @@ public abstract class AbstractDocumentSearch {
StringBuilder msglog = new StringBuilder();
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
if (! Util.isEmpty(searchString)) {
@ -104,12 +105,12 @@ public abstract class AbstractDocumentSearch {
msglog = new StringBuilder("Search with Transaction: '");
msglog.append(codeList.get(i)).append("' for: '")
.append(search.toString()).append("'");
log.fine(msglog.toString());
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
getID(codeList.get(i), search.toString());
}
} else {
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());
}
} else {
@ -195,7 +196,7 @@ public abstract class AbstractDocumentSearch {
}
if (pstmtSO != null) {
msglog = new StringBuilder("SQL Sales: ").append(sqlSO.toString());
log.fine(msglog.toString());
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
rsSO = pstmtSO.executeQuery();
Vector<Integer> idSO = new Vector<Integer>();
while (rsSO.next()) {
@ -204,7 +205,7 @@ public abstract class AbstractDocumentSearch {
if (role.getWindowAccess(msd.getAD_Window_ID()) != null) {
msglog = new StringBuilder("Open Window: ").append(msd.getAD_Window_ID()).append(" / Table: ")
.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)) {
// No search string - open the window with new record
@ -218,7 +219,7 @@ public abstract class AbstractDocumentSearch {
}
if (pstmtPO != null) {
msglog = new StringBuilder("SQL Purchase: ").append(sqlPO);
log.fine(msglog.toString());
if (log.isLoggable(Level.FINE)) log.fine(msglog.toString());
rsPO = pstmtPO.executeQuery();
Vector<Integer> idPO = new Vector<Integer>();
while (rsPO.next()) {
@ -227,7 +228,7 @@ public abstract class AbstractDocumentSearch {
if (role.getWindowAccess(msd.getPO_Window_ID()) != null) {
msglog = new StringBuilder("Open Window: ").append(msd.getPO_Window_ID()).append(" / Table: ")
.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());
} else {
log.warning("Role is not allowed to view this window");
@ -287,7 +288,7 @@ public abstract class AbstractDocumentSearch {
final MQuery query = new MQuery(tableName);
if (whereString != null) {
log.fine(whereString.toString());
if (log.isLoggable(Level.FINE)) log.fine(whereString.toString());
query.addRestriction(whereString.toString());
}
final boolean ok = openWindow(windowId, query);

View File

@ -24,6 +24,7 @@ import java.io.OutputStreamWriter;
import java.io.Writer;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.logging.Level;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
@ -47,7 +48,7 @@ public class LogAuthFailure {
file = new FileOutputStream(fileName, true);
writer = new BufferedWriter(new OutputStreamWriter(file, "UTF8"));
} catch (IOException e) {
log.fine(e.getMessage());
if (log.isLoggable(Level.FINE)) log.fine(e.getMessage());
e.printStackTrace();
}
}
@ -70,7 +71,7 @@ public class LogAuthFailure {
writer.append("\n");
writer.flush();
} catch (Exception e) {
log.fine(e.getMessage());
if (log.isLoggable(Level.FINE)) log.fine(e.getMessage());
}
}

View File

@ -308,7 +308,7 @@ public final class ProcessUtil {
public static MWFProcess startWorkFlow(Properties ctx, ProcessInfo pi, int AD_Workflow_ID) {
MWorkflow wf = MWorkflow.get (ctx, AD_Workflow_ID);
MWFProcess wfProcess = wf.start(pi, pi.getTransactionName());
log.fine(pi.toString());
if (log.isLoggable(Level.FINE)) log.fine(pi.toString());
return wfProcess;
}

View File

@ -916,7 +916,7 @@ public abstract class Doc
//
boolean retValue = getBalance().signum() == 0;
if (retValue)
log.fine("Yes " + toString());
if (log.isLoggable(Level.FINE)) log.fine("Yes " + toString());
else
log.warning("NO - " + toString());
return retValue;
@ -932,7 +932,7 @@ public abstract class Doc
// No Currency in document
if (getC_Currency_ID() == NO_CURRENCY)
{
log.fine("(none) - " + toString());
if (log.isLoggable(Level.FINE)) log.fine("(none) - " + toString());
return true;
}
// Journal from a different acct schema
@ -954,7 +954,7 @@ public abstract class Doc
// just one and the same
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;
}
@ -975,11 +975,11 @@ public abstract class Doc
+ " - " + toString());
}
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;
} // isConvertible
@ -1009,7 +1009,7 @@ public abstract class Doc
else
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);
} // setC_Period_ID
@ -1033,7 +1033,7 @@ public abstract class Doc
setPeriod();
boolean open = m_C_Period_ID > 0;
if (open)
log.fine("Yes - " + toString());
if (log.isLoggable(Level.FINE)) log.fine("Yes - " + toString());
else
log.warning("NO - " + toString());
return open;

View File

@ -18,6 +18,7 @@ package org.compiere.acct;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.logging.Level;
import org.compiere.model.MAccount;
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=?";
m_C_SalesRegion_ID = DB.getSQLValue (null,
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)
m_C_SalesRegion_ID = -2; // don't try again
}

View File

@ -109,7 +109,7 @@ public class Doc_AllocationHdr extends Doc
docLine.setC_ConversionType_ID(C_ConversionType_ID);
}
//
log.fine(docLine.toString());
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
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)
.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
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";
StringBuilder d2 = new StringBuilder("Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource)
.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);
allocationSource = allocationSourceNew;
}
@ -772,7 +772,7 @@ public class Doc_AllocationHdr extends Doc
{
acctDifference = invoiceAccounted.subtract(allocationAccounted); // gain is negative
StringBuilder d2 = new StringBuilder("(full) = ").append(acctDifference);
log.fine(d2.toString());
if (log.isLoggable(Level.FINE)) log.fine(d2.toString());
description.append(" - ").append(d2);
}
else // partial or MC
@ -791,7 +791,7 @@ public class Doc_AllocationHdr extends Doc
if (acctDifference.scale() > precision)
acctDifference = acctDifference.setScale(precision, BigDecimal.ROUND_HALF_UP);
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);
}
@ -1092,7 +1092,7 @@ class Doc_AllocationTax
*/
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
|| total.signum() == 0
|| amt.signum() == 0)
@ -1102,7 +1102,7 @@ class Doc_AllocationTax
BigDecimal retValue = multiplier.multiply(amt);
if (retValue.scale() > precision)
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;
} // calcAmount

View File

@ -19,6 +19,7 @@ package org.compiere.acct;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.logging.Level;
import org.compiere.model.MAccount;
import org.compiere.model.MAcctSchema;
@ -79,7 +80,7 @@ public class Doc_BankStatement extends Doc
// Contained Objects
p_lines = loadLines(bs);
log.fine("Lines=" + p_lines.length);
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
return null;
} // loadDocumentDetails
@ -132,7 +133,7 @@ public class Doc_BankStatement extends Doc
}
sb.append("]");
//
log.fine(toString() + " Balance=" + retValue + sb.toString());
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
return retValue;
} // getBalance

View File

@ -68,7 +68,7 @@ public class Doc_Cash extends Doc
// Contained Objects
p_lines = loadLines(cash, cb);
log.fine("Lines=" + p_lines.length);
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
return null;
} // loadDocumentDetails
@ -117,7 +117,7 @@ public class Doc_Cash extends Doc
}
sb.append("]");
//
log.fine(toString() + " Balance=" + retValue + sb.toString());
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
// return retValue;
return Env.ZERO; // Lines are balanced
} // getBalance

View File

@ -65,7 +65,7 @@ public class Doc_GLJournal extends Doc
// Contained Objects
p_lines = loadLines(journal);
log.fine("Lines=" + p_lines.length);
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
return null;
} // loadDocumentDetails
@ -117,7 +117,7 @@ public class Doc_GLJournal extends Doc
}
sb.append("]");
//
log.fine(toString() + " Balance=" + retValue + sb.toString());
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
return retValue;
} // getBalance

View File

@ -76,7 +76,7 @@ public class Doc_InOut extends Doc
m_DocStatus = inout.getDocStatus();
// Contained Objects
p_lines = loadLines(inout);
log.fine("Lines=" + p_lines.length);
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
return null;
} // 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()});
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);
}
@ -410,7 +410,7 @@ public class Doc_InOut extends Doc
{
int stdPrecision = MCurrency.getStdPrecision(getCtx(), C_Currency_ID);
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);
}
} // correct included Tax

View File

@ -19,6 +19,7 @@ package org.compiere.acct;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.logging.Level;
import org.compiere.model.MAccount;
import org.compiere.model.MAcctSchema;
@ -72,7 +73,7 @@ public class Doc_Inventory extends Doc
m_DocStatus = inventory.getDocStatus();
// Contained Objects
p_lines = loadLines(inventory);
log.fine("Lines=" + p_lines.length);
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
return null;
} // loadDocumentDetails
@ -105,7 +106,7 @@ public class Doc_Inventory extends Doc
}
docLine.setQty (Qty, false); // -5 => -5
docLine.setReversalLine_ID(line.getReversalLine_ID());
log.fine(docLine.toString());
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
list.add (docLine);
}

View File

@ -88,7 +88,7 @@ public class Doc_Invoice extends Doc
// Contained Objects
m_taxes = loadTaxes();
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;
} // loadDocumentDetails
@ -121,7 +121,7 @@ public class Doc_Invoice extends Doc
//
DocTax taxLine = new DocTax(C_Tax_ID, name, rate,
taxBaseAmt, amount, salesTax);
log.fine(taxLine.toString());
if (log.isLoggable(Level.FINE)) log.fine(taxLine.toString());
list.add(taxLine);
}
}
@ -173,7 +173,7 @@ public class Doc_Invoice extends Doc
if (!tax.isZeroTax())
{
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);
for (int t = 0; t < m_taxes.length; t++)
{
@ -194,7 +194,7 @@ public class Doc_Invoice extends Doc
else
m_allLinesItem = false;
//
log.fine(docLine.toString());
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
list.add(docLine);
}
@ -266,7 +266,7 @@ public class Doc_Invoice extends Doc
}
sb.append("]");
//
log.fine(toString() + " Balance=" + retValue + sb.toString());
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
return retValue;
} // 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 i.C_Invoice_ID=").append(get_ID()).append(")");
int no = DB.executeUpdate(sql.toString(), getTrxName());
log.fine("Updated=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Updated=" + no);
} // updateProductPO
} // Doc_Invoice

View File

@ -19,6 +19,7 @@ package org.compiere.acct;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.logging.Level;
import org.compiere.model.MAccount;
import org.compiere.model.MAcctSchema;
@ -131,7 +132,7 @@ public class Doc_MatchInv extends Doc
|| getQty().signum() == 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());
return facts;
}
@ -178,7 +179,7 @@ public class Doc_MatchInv extends Doc
p_Error = "Mat.Receipt not posted yet";
return null;
}
log.fine("CR - Amt(" + temp + "->" + dr.getAcctBalance()
if (log.isLoggable(Level.FINE)) log.fine("CR - Amt(" + temp + "->" + dr.getAcctBalance()
+ ") - " + dr.toString());
// InventoryClearing CR
@ -201,7 +202,7 @@ public class Doc_MatchInv extends Doc
as.getC_Currency_ID(), null, LineNetAmt); // updated below
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());
// Invoice Price Variance
@ -222,7 +223,7 @@ public class Doc_MatchInv extends Doc
pv.setUser1_ID(m_invoiceLine.getUser1_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);
return facts;
}
@ -235,7 +236,7 @@ public class Doc_MatchInv extends Doc
p_Error = "Invoice not posted yet";
return null;
}
log.fine("DR - Amt(" + temp + "->" + cr.getAcctBalance()
if (log.isLoggable(Level.FINE)) log.fine("DR - Amt(" + temp + "->" + cr.getAcctBalance()
+ ") - " + cr.toString());
}
else // Cash Acct
@ -303,7 +304,7 @@ public class Doc_MatchInv extends Doc
pv.setUser1_ID(m_invoiceLine.getUser1_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);
if (error != null && error.trim().length() > 0)

View File

@ -129,7 +129,7 @@ public class Doc_MatchPO extends Doc
|| getQty().signum() == 0
|| 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());
return facts;
}
@ -311,7 +311,7 @@ public class Doc_MatchPO extends Doc
{
int stdPrecision = MCurrency.getStdPrecision(getCtx(), m_oLine.getC_Currency_ID());
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);
}
} // correct included Tax

View File

@ -19,6 +19,7 @@ package org.compiere.acct;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.logging.Level;
import org.compiere.model.MAcctSchema;
import org.compiere.model.MCostDetail;
@ -69,7 +70,7 @@ public class Doc_Movement extends Doc
m_DocStatus = move.getDocStatus();
// Contained Objects
p_lines = loadLines(move);
log.fine("Lines=" + p_lines.length);
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
return null;
} // loadDocumentDetails
@ -88,7 +89,7 @@ public class Doc_Movement extends Doc
DocLine docLine = new DocLine (line, this);
docLine.setQty(line.getMovementQty(), false);
docLine.setReversalLine_ID(line.getReversalLine_ID());
log.fine(docLine.toString());
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
list.add (docLine);
}

View File

@ -121,7 +121,7 @@ public class Doc_Order extends Doc
if (!tax.isZeroTax())
{
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);
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
&& 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;
}
else
log.fine(toString() + " Balance=" + retValue + sb.toString());
if (log.isLoggable(Level.FINE)) log.fine(toString() + " Balance=" + retValue + sb.toString());
return retValue;
} // 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 o.C_Order_ID=").append(get_ID()).append(")");
int no = DB.executeUpdate(sql.toString(), getTrxName());
log.fine("Updated=" + no);
if (log.isLoggable(Level.FINE)) log.fine("Updated=" + no);
} // updateProductPO

View File

@ -66,7 +66,7 @@ public class Doc_Production extends Doc
setDateAcct(prod.getMovementDate());
// Contained Objects
p_lines = loadLines(prod);
log.fine("Lines=" + p_lines.length);
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
return null;
} // loadDocumentDetails
@ -103,7 +103,7 @@ public class Doc_Production extends Doc
// Identify finished BOM Product
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);
}
}

View File

@ -75,7 +75,7 @@ public class Doc_ProjectIssue extends Doc
// Pseudo Line Check
if (m_line.getM_Product_ID() == 0)
log.warning(m_line.toString() + " - No Product");
log.fine(m_line.toString());
if (log.isLoggable(Level.FINE)) log.fine(m_line.toString());
return null;
} // loadDocumentDetails
@ -189,7 +189,7 @@ public class Doc_ProjectIssue extends Doc
if (rs.next())
{
retValue = rs.getBigDecimal(1);
log.fine("POCost = " + retValue);
if (log.isLoggable(Level.FINE)) log.fine("POCost = " + retValue);
}
else
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);
qty = rs.getBigDecimal(2);
retValue = retValue.multiply(qty);
log.fine("ExpLineCost = " + retValue);
if (log.isLoggable(Level.FINE)) log.fine("ExpLineCost = " + retValue);
}
else
log.warning("Not found for S_TimeExpenseLine_ID=" + m_issue.getS_TimeExpenseLine_ID());

View File

@ -137,11 +137,11 @@ public final class Fact
{
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());
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());
}
// Convert
@ -151,7 +151,7 @@ public final class Fact
&& (docLine.getAmtAcctDr() != null || docLine.getAmtAcctCr() != null))
line.setAmtAcct(docLine.getAmtAcctDr(), docLine.getAmtAcctCr());
//
log.fine(line.toString());
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
add(line);
return line;
} // createLine
@ -310,7 +310,7 @@ public final class Fact
// Convert
line.convert();
//
log.fine(line.toString());
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
m_lines.add(line);
return line;
} // balancingSource
@ -412,7 +412,7 @@ public final class Fact
if (m_lines.size() == 0)
return;
log.fine ("(" + elementType + ") - " + toString());
if (log.isLoggable(Level.FINE)) log.fine ("(" + elementType + ") - " + toString());
// Org
if (elementType.equals(MAcctSchemaElement.ELEMENTTYPE_Organization))
@ -481,7 +481,7 @@ public final class Fact
line.setAD_Org_ID(key.intValue());
//
m_lines.add(line);
log.fine("(" + elementType + ") - " + line);
if (log.isLoggable(Level.FINE)) log.fine("(" + elementType + ") - " + line);
}
}
map.clear();
@ -536,7 +536,7 @@ public final class Fact
public FactLine balanceAccounting()
{
BigDecimal diff = getAcctBalance(); // DR-CR
log.fine("Balance=" + diff
if (log.isLoggable(Level.FINE)) log.fine("Balance=" + diff
+ ", CurrBal=" + m_acctSchema.isCurrencyBalancing()
+ " - " + toString());
FactLine line = null;
@ -598,7 +598,7 @@ public final class Fact
drAmt = difference.negate();
}
line.setAmtAcct(drAmt, crAmt);
log.fine(line.toString());
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
m_lines.add(line);
}
else // Adjust biggest (Balance Sheet) line amount
@ -611,9 +611,9 @@ public final class Fact
log.severe ("No Line found");
else
{
log.fine("Adjusting Amt=" + diff + "; Line=" + line);
if (log.isLoggable(Level.FINE)) log.fine("Adjusting Amt=" + diff + "; Line=" + line);
line.currencyCorrect(diff);
log.fine(line.toString());
if (log.isLoggable(Level.FINE)) log.fine(line.toString());
}
} // correct biggest amount

View File

@ -653,7 +653,7 @@ public final class FactLine extends X_Fact_Acct
boolean negative = deltaAmount.compareTo(Env.ZERO) < 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()
+ "; Negative=" + negative + "; AdjustDr=" + adjustDr);
@ -668,7 +668,7 @@ public final class FactLine extends X_Fact_Acct
else
setAmtAcctCr (getAmtAcctCr().add(deltaAmount));
log.fine("New-AcctDr=" + getAmtAcctDr() + ",AcctCr=" + getAmtAcctCr());
if (log.isLoggable(Level.FINE)) log.fine("New-AcctDr=" + getAmtAcctDr() + ",AcctCr=" + getAmtAcctCr());
} // currencyCorrect
/**
@ -859,7 +859,7 @@ public final class FactLine extends X_Fact_Acct
if (super.getC_SalesRegion_ID() != 0) // save in VO
{
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
{
@ -869,7 +869,7 @@ public final class FactLine extends X_Fact_Acct
if (super.getC_SalesRegion_ID() != 0) // save in VO
{
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
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)
{
log.fine(toString());
if (log.isLoggable(Level.FINE)) log.fine(toString());
//
getAD_Org_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 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)
MAccount revenue = MAccount.get(getCtx(),
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");
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);
return new_Account_ID;
} // createRevenueRecognition
@ -1114,7 +1114,7 @@ public final class FactLine extends X_Fact_Acct
// end Bayu Sistematika
//
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(",Line=").append(Record_ID)
.append(", Account=").append(m_acct)

View File

@ -132,7 +132,7 @@ public class Matcher
DB.close(rs, pstmt);
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);
return counter;
} // match
@ -152,7 +152,7 @@ public class Matcher
int M_InOutLine_ID, int C_InvoiceLine_ID,
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 ();
int M_MatchInv_ID = DB.getNextID (AD_Client_ID, "M_MatchInv", m_trxName);

View File

@ -110,7 +110,7 @@ public class WebProjectDeploy extends SvrProcess
{
String name = container.getName();
if (container.delete(true))
log.fine("Deleted: " + name);
if (log.isLoggable(Level.FINE)) log.fine("Deleted: " + name);
else // e.g. was referenced
{
log.warning("Failed Delete: " + name);

View File

@ -98,7 +98,7 @@ public class CConnection implements Serializable, Cloneable
s_cc = new CConnection (null);
s_cc.setAttributes (attributes);
}
log.fine(s_cc.toString());
if (log.isLoggable(Level.FINE)) log.fine(s_cc.toString());
}
return s_cc;

View File

@ -115,7 +115,7 @@ public class StatementProxy implements InvocationHandler {
}
if (logOperation != null) {
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)");
}
}
}

View File

@ -148,7 +148,7 @@ public abstract class Convert
}
}
if (m_verbose)
log.fine("- ok " + no);
if (log.isLoggable(Level.FINE)) log.fine("- ok " + no);
}
catch (SQLException ex)
{

View File

@ -414,7 +414,7 @@ public final class ImpFormat
list.add(entry.toString());
//
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
String[] retValue = new String[list.size()];

View File

@ -20,7 +20,6 @@ import java.util.ArrayList;
import java.util.StringTokenizer;
import java.util.logging.Level;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
/**
@ -117,8 +116,7 @@ public class AccessSqlParser
m_tableInfo.add(info);
}
//
if (CLogMgt.isLevelFinest())
log.fine(toString());
if (log.isLoggable(Level.FINE)) log.fine(toString());
return m_tableInfo.size() > 0;
} // parse

View File

@ -41,7 +41,7 @@ public class ArchiveDB implements IArchiveStore {
if (deflatedData == null)
return null;
//
log.fine("ZipSize=" + deflatedData.length);
if (log.isLoggable(Level.FINE)) log.fine("ZipSize=" + deflatedData.length);
if (deflatedData.length == 0)
return null;
@ -61,7 +61,7 @@ public class ArchiveDB implements IArchiveStore {
}
//
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.getCompressedSize() * 100 / entry.getSize()) + "%");
}
@ -93,13 +93,13 @@ public class ArchiveDB implements IArchiveStore {
zip.putNextEntry(entry);
zip.write(inflatedData, 0, inflatedData.length);
zip.closeEntry();
log.fine(entry.getCompressedSize() + " (" + entry.getSize() + ") "
if (log.isLoggable(Level.FINE)) log.fine(entry.getCompressedSize() + " (" + entry.getSize() + ") "
+ (entry.getCompressedSize() * 100 / entry.getSize()) + "%");
//
// zip.finish();
zip.close();
deflatedData = out.toByteArray();
log.fine("Length=" + inflatedData.length);
if (log.isLoggable(Level.FINE)) log.fine("Length=" + inflatedData.length);
} catch (Exception e) {
log.log(Level.SEVERE, "saveLOBData", e);
deflatedData = null;

View File

@ -85,7 +85,7 @@ public class ArchiveFileSystem implements IArchiveStore {
return null;
}
String filePath = fileNode.getNodeValue();
log.fine("filePath: " + filePath);
if (log.isLoggable(Level.FINE)) log.fine("filePath: " + filePath);
if(filePath!=null){
filePath = filePath.replaceFirst(ARCHIVE_FOLDER_PLACEHOLDER, archivePathRoot.replaceAll("\\\\","\\\\\\\\"));
//just to be shure...
@ -96,7 +96,7 @@ public class ArchiveFileSystem implements IArchiveStore {
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);
if (file.exists()) {
// read files into byte[]
@ -196,7 +196,7 @@ public class ArchiveFileSystem implements IArchiveStore {
final Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
final byte[] xmlData = bos.toByteArray();
log.fine(bos.toString());
if (log.isLoggable(Level.FINE)) log.fine(bos.toString());
//store xml in db
archive.setByteData(xmlData);

View File

@ -41,7 +41,7 @@ public class AttachmentDBSystem implements IAttachmentStore
byte[] data = attach.getBinaryData();
if (data == null)
return true;
log.fine("ZipSize=" + data.length);
if (log.isLoggable(Level.FINE)) log.fine("ZipSize=" + data.length);
if (data.length == 0)
return true;
@ -70,7 +70,7 @@ public class AttachmentDBSystem implements IAttachmentStore
}
//
byte[] dataEntry = out.toByteArray();
log.fine(name
if (log.isLoggable(Level.FINE)) log.fine(name
+ " - size=" + dataEntry.length + " - zip="
+ entry.getCompressedSize() + "(" + entry.getSize() + ") "
+ (entry.getCompressedSize()*100/entry.getSize())+ "%");
@ -113,14 +113,14 @@ public class AttachmentDBSystem implements IAttachmentStore
byte[] data = item.getData();
zip.write (data, 0, data.length);
zip.closeEntry();
log.fine(entry.getName() + " - "
if (log.isLoggable(Level.FINE)) log.fine(entry.getName() + " - "
+ entry.getCompressedSize() + " (" + entry.getSize() + ") "
+ (entry.getCompressedSize()*100/entry.getSize())+ "%");
}
// zip.finish();
zip.close();
byte[] zipData = out.toByteArray();
log.fine("Length=" + zipData.length);
if (log.isLoggable(Level.FINE)) log.fine("Length=" + zipData.length);
attach.setBinaryData(zipData);
attach.setTitle(MAttachment.ZIP);
return true;

View File

@ -67,13 +67,13 @@ public class AttachmentFileSystem implements IAttachmentStore {
document.setXmlStandalone(true);
// create xml entries
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();
final String path = entryFile.getAbsolutePath();
// 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)) {
log.fine("move file: " + path);
if (log.isLoggable(Level.FINE)) log.fine("move file: " + path);
FileChannel in = null;
FileChannel out = null;
try {
@ -130,7 +130,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
final Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
final byte[] xmlData = bos.toByteArray();
log.fine(bos.toString());
if (log.isLoggable(Level.FINE)) log.fine(bos.toString());
attach.setBinaryData(xmlData);
attach.setTitle(MAttachment.XML);
return true;
@ -155,7 +155,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
byte[] data = attach.getBinaryData();
if (data == null)
return true;
log.fine("TextFileSize=" + data.length);
if (log.isLoggable(Level.FINE)) log.fine("TextFileSize=" + data.length);
if (data.length == 0)
return true;
@ -175,9 +175,9 @@ public class AttachmentFileSystem implements IAttachmentStore {
attach.m_items = null;
return false;
}
log.fine("name: " + nameNode.getNodeValue());
if (log.isLoggable(Level.FINE)) log.fine("name: " + nameNode.getNodeValue());
String filePath = fileNode.getNodeValue();
log.fine("filePath: " + filePath);
if (log.isLoggable(Level.FINE)) log.fine("filePath: " + filePath);
if(filePath!=null){
filePath = filePath.replaceFirst(attach.ATTACHMENT_FOLDER_PLACEHOLDER, attachmentPathRoot.replaceAll("\\\\","\\\\\\\\"));
//just to be shure...
@ -188,7 +188,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
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);
if (file.exists()) {
// read files into byte[]
@ -273,7 +273,7 @@ public class AttachmentFileSystem implements IAttachmentStore {
//remove files
final MAttachmentEntry entry = attach.m_items.get(index);
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.delete()) {
log.warning("unable to delete " + file.getAbsolutePath());

View File

@ -274,7 +274,7 @@ public class GridField
if (m_lookup == null || m_lookup.getValidation().length() == 0)
return true;
//
log.fine("(" + m_vo.ColumnName + ")");
if (log.isLoggable(Level.FINE)) log.fine("(" + m_vo.ColumnName + ")");
m_lookup.refresh();
return m_lookup.isValidated();
} // refreshLookup
@ -539,13 +539,13 @@ public class GridField
&& (m_vo.DefaultValue == null || m_vo.DefaultValue.length() == 0))
{
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);
}
// Always Active
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";
}
@ -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))
&& (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);
}
// 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))
&& 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);
}
@ -605,7 +605,7 @@ public class GridField
}
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);
}
} // SQL Statement
@ -630,7 +630,7 @@ public class GridField
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);
}
} // 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);
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);
}
@ -652,7 +652,7 @@ public class GridField
defStr = Env.getPreference (m_vo.ctx, m_vo.AD_Window_ID, m_vo.ColumnName, true);
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);
}
@ -663,13 +663,13 @@ public class GridField
// Button to N
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";
}
// CheckBoxes default to No
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";
}
// lookups with one value
@ -680,20 +680,20 @@ public class GridField
// IDs remain null
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;
}
// actual Numbers default to zero
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");
}
/**
* No resolution
*/
log.fine("[NONE] " + m_vo.ColumnName);
if (log.isLoggable(Level.FINE)) log.fine("[NONE] " + m_vo.ColumnName);
return null;
} // getDefault

View File

@ -272,7 +272,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
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 (m_loaderFuture != null && m_loaderFuture.isDone())
@ -318,7 +318,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
protected void dispose()
{
log.fine("#" + m_vo.TabNo);
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
m_OrderBys = null;
//
m_parents.clear();
@ -352,7 +352,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
private boolean loadFields()
{
log.fine("#" + m_vo.TabNo);
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
if (m_vo.getFields() == null)
return false;
@ -616,7 +616,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
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
+ ", Days=" + onlyCurrentDays + ", Detail=" + isDetail());
// is it same query?
@ -730,7 +730,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
/**
* Query
*/
log.fine("#" + m_vo.TabNo + " - " + where);
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - " + where);
if (m_mTable.isOpen())
{
if (refresh)
@ -761,20 +761,20 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
// Check: only one restriction
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();
}
String colName = query.getColumnName(0);
if (colName == null)
{
log.fine("Ignored(No Column): " + query);
if (log.isLoggable(Level.FINE)) log.fine("Ignored(No Column): " + query);
return query.getWhereClause();
}
// a '(' in the name = function - don't try to resolve
if (colName.indexOf('(') != -1)
{
log.fine("Ignored(Function): " + colName);
if (log.isLoggable(Level.FINE)) log.fine("Ignored(Function): " + colName);
return query.getWhereClause();
}
// OK - Query is valid
@ -782,7 +782,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
// Simple Query.
if (getField(colName) != null)
{
log.fine("Field Found: " + colName);
if (log.isLoggable(Level.FINE)) log.fine("Field Found: " + colName);
return query.getWhereClause();
}
@ -821,7 +821,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
query.setColumnName(0, refColName);
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();
}
colName = refColName;
@ -885,7 +885,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
.append(tableName).append(" xx WHERE ")
.append(query.getWhereClause(true))
.append(")");
log.fine(result.toString());
if (log.isLoggable(Level.FINE)) log.fine(result.toString());
return result.toString();
} // validateQuery
@ -913,7 +913,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
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 */
int keyNo = m_mTable.getKeyID(m_currentRow);
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)
{
log.fine("#" + m_vo.TabNo + " - row=" + row);
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - row=" + row);
m_mTable.dataRefresh(row, fireEvent);
setCurrentRow(row, fireEvent);
if (fireEvent)
@ -986,7 +986,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
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
{
if (hasChangedCurrentTabAndParents())
@ -1104,7 +1104,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
public void dataIgnore()
{
log.fine("#" + m_vo.TabNo);
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
if (m_mTable.isInserting())
{
m_currentRow--;
@ -1113,7 +1113,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
setCurrentRow(m_currentRow, false); // re-load data
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
@ -1125,7 +1125,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
public boolean dataNew (boolean copy)
{
log.fine("#" + m_vo.TabNo);
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo);
if (!isInsertRecord())
{
log.warning ("Inset Not allowed in TabNo=" + m_vo.TabNo);
@ -1182,7 +1182,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
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);
setCurrentRow(m_currentRow, true);
fireStateChangeEvent(new StateChangeEvent(this, StateChangeEvent.DATA_DELETE));
@ -1319,7 +1319,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
rs = 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);
@ -1418,7 +1418,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
/*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="
+ Env.getContext(m_vo.ctx, m_vo.WindowNo, "AD_Client_ID")
+ " ORDER BY AD_Org DESC";
@ -1747,7 +1747,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
if (m_vo.TableName.startsWith("C_InvoiceBatch"))
{
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;
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");
log.fine(m_vo.TableName + " - " + Record_ID);
if (log.isLoggable(Level.FINE)) log.fine(m_vo.TableName + " - " + Record_ID);
MessageFormat mf = null;
try
{
@ -1907,7 +1907,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
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");
log.fine(m_vo.TableName + " - " + Record_ID);
if (log.isLoggable(Level.FINE)) log.fine(m_vo.TableName + " - " + Record_ID);
MessageFormat mf = null;
try
{
@ -2108,7 +2108,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
public void loadLocks()
{
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())
return;
@ -2144,7 +2144,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
rs = null;
pstmt = null;
}
log.fine("#" + m_Lock.size());
if (log.isLoggable(Level.FINE)) log.fine("#" + m_Lock.size());
} // loadLooks
/**
@ -2173,7 +2173,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
public void lock (Properties ctx, int Record_ID, boolean lock)
{
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);
MPrivateAccess access = MPrivateAccess.get (ctx, AD_User_ID, m_vo.AD_Table_ID, Record_ID);
if (access == null)
@ -2194,7 +2194,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
*/
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();
m_DataStatusEvent = e; // save it
// 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);
if (listeners.length == 0)
return;
log.fine(e.toString());
if (log.isLoggable(Level.FINE)) log.fine(e.toString());
// WHO Info
if (e.getCurrentRow() >= 0)
{
@ -2410,7 +2410,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
if (newRow >= rows)
{
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)
{
@ -2433,7 +2433,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
{
int oldCurrentRow = m_currentRow;
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
int size = m_mTable.getColumnCount();
@ -2592,7 +2592,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
if (field == null)
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)
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 (mLookup.getValidation().indexOf("@"+columnName+"@") != -1)
{
log.fine(columnName + " changed - "
if (log.isLoggable(Level.FINE)) log.fine(columnName + " changed - "
+ dependentField.getColumnName() + " set to null");
// invalidate current selection
setValue(dependentField, null);
@ -2754,7 +2754,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
if (callout.length() == 0)
return "";
log.fine(field.getColumnName() + "=" + value
if (log.isLoggable(Level.FINE)) log.fine(field.getColumnName() + "=" + value
+ " (" + callout + ") - old=" + oldValue);
StringTokenizer st = new StringTokenizer(callout, ";,", false);
@ -3023,7 +3023,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
* @param ascending sorting modus
*/
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
if (from == to) {
log.finest("nothing to do - from == to");

View File

@ -48,7 +48,6 @@ import javax.swing.table.AbstractTableModel;
import org.adempiere.exceptions.DBException;
import org.adempiere.util.ServerContext;
import org.compiere.Adempiere;
import org.compiere.util.CLogMgt;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
@ -420,7 +419,7 @@ public class GridTable extends AbstractTableModel
*/
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)
{
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))
{
log.fine("No Column Access " + field.getColumnName());
if (log.isLoggable(Level.FINE)) log.fine("No Column Access " + field.getColumnName());
return;
}
// Set Index for Key column
@ -726,7 +725,7 @@ public class GridTable extends AbstractTableModel
{
if (!m_open)
return;
log.fine("final=" + finalCall);
if (log.isLoggable(Level.FINE)) log.fine("final=" + finalCall);
// remove listeners
if (finalCall)
@ -1029,7 +1028,7 @@ public class GridTable extends AbstractTableModel
//wait for 30 seconds
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
{
m_loaderFuture.get(500, TimeUnit.MILLISECONDS);
@ -1224,7 +1223,7 @@ public class GridTable extends AbstractTableModel
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
m_oldValue = new Object[3];
@ -1365,7 +1364,7 @@ public class GridTable extends AbstractTableModel
*/
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
// nothing done
if (!m_changed && m_rowChanged == -1)
@ -1569,7 +1568,7 @@ public class GridTable extends AbstractTableModel
}
else
{
log.fine("Prepare updating ... manual=" + manualUpdate);
if (log.isLoggable(Level.FINE)) log.fine("Prepare updating ... manual=" + manualUpdate);
// get current Data in DB
rowDataDB = readData (rs);
}
@ -1658,7 +1657,7 @@ public class GridTable extends AbstractTableModel
if (m_inserting)
insertDoc = DB.getDocumentNo (m_ctx, m_WindowNo,
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?
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 && m_rowData[col].equals (rowDataDB[col])))
{
if (CLogMgt.isLevelFinest())
log.fine(columnName + "=" + rowData[col]
if (log.isLoggable(Level.FINE)) log.fine(columnName + "=" + rowData[col]
+ " " + (rowData[col]==null ? "" : rowData[col].getClass().getName()));
//
boolean encrypted = field.isEncryptedColumn();
@ -1975,7 +1973,7 @@ public class GridTable extends AbstractTableModel
}
else
{
log.fine("Updating ... " + whereClause);
if (log.isLoggable(Level.FINE)) log.fine("Updating ... " + whereClause);
if (manualUpdate)
{
String sql = createUpdateSql(false, whereClause);
@ -1995,7 +1993,7 @@ public class GridTable extends AbstractTableModel
lobSave(whereClause);
// 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)
.append(" WHERE ").append(whereClause);
pstmt = DB.prepareStatement(refreshSQL.toString(), null);
@ -2064,7 +2062,7 @@ public class GridTable extends AbstractTableModel
*/
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);
//
@ -2177,7 +2175,7 @@ public class GridTable extends AbstractTableModel
// Refresh - update buffer
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)
.append(" WHERE ").append(whereClause);
PreparedStatement pstmt = null;
@ -2354,7 +2352,7 @@ public class GridTable extends AbstractTableModel
}
sb.append(" WHERE ").append(whereClause);
}
log.fine(sb.toString());
if (log.isLoggable(Level.FINE)) log.fine(sb.toString());
// reset
createUpdateSqlReset();
return sb.toString();
@ -2427,7 +2425,7 @@ public class GridTable extends AbstractTableModel
*/
private void lobAdd (PO_LOB lob)
{
log.fine("LOB=" + lob);
if (log.isLoggable(Level.FINE)) log.fine("LOB=" + lob);
if (m_lobInfo == null)
m_lobInfo = new ArrayList<PO_LOB>();
m_lobInfo.add(lob);
@ -2536,10 +2534,10 @@ public class GridTable extends AbstractTableModel
m_rowChanged = -1; // only changed in setValueAt
// 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);
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;
} // dataNew
@ -2684,7 +2682,7 @@ public class GridTable extends AbstractTableModel
m_rowChanged = -1;
fireTableRowsDeleted(row, row);
fireDataStatusIEvent("Deleted", "");
log.fine("Row=" + row + " complete");
if (log.isLoggable(Level.FINE)) log.fine("Row=" + row + " complete");
return true;
} // dataDelete
@ -3028,7 +3026,7 @@ public class GridTable extends AbstractTableModel
*/
public void setReadOnly (boolean value)
{
log.fine("ReadOnly=" + value);
if (log.isLoggable(Level.FINE)) log.fine("ReadOnly=" + value);
m_readOnly = value;
} // setReadOnly
@ -3078,7 +3076,7 @@ public class GridTable extends AbstractTableModel
*/
public void setDeleteable (boolean value)
{
log.fine("Deleteable=" + value);
if (log.isLoggable(Level.FINE)) log.fine("Deleteable=" + value);
m_deleteable = value;
} // setDeleteable
@ -3410,7 +3408,7 @@ public class GridTable extends AbstractTableModel
}
if (log.isLoggable(Level.FINE))
log.fine(info.toString());
if (log.isLoggable(Level.FINE)) log.fine(info.toString());
return rows;
} // open
@ -3478,7 +3476,7 @@ public class GridTable extends AbstractTableModel
{
if (Thread.interrupted())
{
log.fine("Interrupted");
if (log.isLoggable(Level.FINE)) log.fine("Interrupted");
close();
return;
}
@ -3510,7 +3508,7 @@ public class GridTable extends AbstractTableModel
}
catch (InterruptedException ie)
{
log.fine("Interrupted while sleeping");
if (log.isLoggable(Level.FINE)) log.fine("Interrupted while sleeping");
close();
return;
}
@ -3549,7 +3547,7 @@ public class GridTable extends AbstractTableModel
{
Object para = m_parameterSELECT.get(i);
if (para != null)
log.fine("Select " + i + "=" + para);
if (log.isLoggable(Level.FINE)) log.fine("Select " + i + "=" + para);
//
if (para == null)
;
@ -3568,7 +3566,7 @@ public class GridTable extends AbstractTableModel
{
Object para = m_parameterWHERE.get(i);
if (para != null)
log.fine("Where " + i + "=" + para);
if (log.isLoggable(Level.FINE)) log.fine("Where " + i + "=" + para);
//
if (para == null)
;

View File

@ -116,7 +116,7 @@ public abstract class Lookup extends AbstractListModel
else
{
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())
fireContentsChanged(this, -1, -1);
@ -304,10 +304,10 @@ public abstract class Lookup extends AbstractListModel
m_loaded = true;
fireContentsChanged(this, 0, p_data.size());
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));
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));

View File

@ -765,7 +765,7 @@ public class MAccount extends X_C_ValidCombination
super.setDescription(descr.toString());
if (fullyQualified != isFullyQualified())
setIsFullyQualified(fullyQualified);
log.fine("Combination=" + getCombination()
if (log.isLoggable(Level.FINE)) log.fine("Combination=" + getCombination()
+ " - " + getDescription()
+ " - FullyQualified=" + fullyQualified);
} // setValueDescription

View File

@ -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());
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
@Override

View File

@ -284,7 +284,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
.append("' WHERE C_AllocationHdr_ID=").append(getC_AllocationHdr_ID());
int no = DB.executeUpdate(sql.toString(), get_TrxName());
m_lines = null;
log.fine(processed + " - #" + no);
if (log.isLoggable(Level.FINE)) log.fine(processed + " - #" + no);
} // setProcessed
@ -849,7 +849,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
bp.setTotalOpenBalance(); // recalculates from scratch
// bp.setSOCreditStatus(); // called automatically
if (bp.save())
log.fine(bp.toString());
if (log.isLoggable(Level.FINE)) log.fine(bp.toString());
else
log.log(Level.SEVERE, "BP not updated - " + bp);
}

View File

@ -248,7 +248,7 @@ public class MAllocationLine extends X_C_AllocationLine
*/
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();
MInvoice invoice = getInvoice();
if (invoice != null
@ -286,13 +286,13 @@ public class MAllocationLine extends X_C_AllocationLine
if (reverse)
{
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);
}
else if (invoice.isPaid())
{
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);
}
@ -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 i.C_Invoice_ID=" + C_Invoice_ID + ")";
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")
+ " order of C_Invoice_ID=" + C_Invoice_ID);
}
@ -315,13 +315,13 @@ public class MAllocationLine extends X_C_AllocationLine
if (reverse)
{
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);
}
else
{
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);
}
@ -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 i.C_Invoice_ID=" + C_Invoice_ID + ")";
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")
+ " order of C_Invoice_ID=" + C_Invoice_ID);
}

View File

@ -265,7 +265,7 @@ public class MArchive extends X_AD_Archive {
if (data == null || data.length == 0)
return false;
//
log.fine(toString());
if (log.isLoggable(Level.FINE)) log.fine(toString());
return true;
} // beforeSave

Some files were not shown because too many files have changed in this diff Show More