IDEMPIERE-638 Check log level before calling logging method / log.info / Thanks to Richard Morales

This commit is contained in:
Carlos Ruiz 2013-02-27 20:58:38 -05:00
parent 4bf4364757
commit ac93bd4473
476 changed files with 1538 additions and 1410 deletions

View File

@ -125,7 +125,7 @@ public class CalloutInventory extends CalloutEngine
}
//
log.info("M_Product_ID=" + M_Product_ID
if (log.isLoggable(Level.INFO)) log.info("M_Product_ID=" + M_Product_ID
+ ", M_Locator_ID=" + M_Locator_ID
+ ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID
+ " - QtyBook=" + bd);

View File

@ -467,7 +467,7 @@ public class CalloutInvoice extends CalloutEngine
int C_Tax_ID = Tax.get(ctx, M_Product_ID, C_Charge_ID, billDate, shipDate,
AD_Org_ID, M_Warehouse_ID, billC_BPartner_Location_ID, shipC_BPartner_Location_ID,
Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y"));
log.info("Tax ID=" + C_Tax_ID);
if (log.isLoggable(Level.INFO)) log.info("Tax ID=" + C_Tax_ID);
//
if (C_Tax_ID == 0)
mTab.fireDataStatusEEvent(CLogger.retrieveError());
@ -649,7 +649,7 @@ public class CalloutInvoice extends CalloutEngine
BigDecimal LineNetAmt = QtyInvoiced.multiply(PriceActual);
if (LineNetAmt.scale() > StdPrecision)
LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
log.info("amt = LineNetAmt=" + LineNetAmt);
if (log.isLoggable(Level.INFO)) log.info("amt = LineNetAmt=" + LineNetAmt);
mTab.setValue("LineNetAmt", LineNetAmt);
// Calculate Tax Amount for PO

View File

@ -324,7 +324,7 @@ public class CalloutInvoiceBatch extends CalloutEngine
int C_Tax_ID = Tax.get(ctx, 0, C_Charge_ID, billDate, shipDate,
AD_Org_ID, M_Warehouse_ID, C_BPartner_Location_ID, C_BPartner_Location_ID,
Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y"));
log.info("Tax ID=" + C_Tax_ID);
if (log.isLoggable(Level.INFO)) log.info("Tax ID=" + C_Tax_ID);
//
if (C_Tax_ID == 0)
mTab.fireDataStatusEEvent(CLogger.retrieveError());

View File

@ -981,7 +981,7 @@ public class CalloutOrder extends CalloutEngine
int C_Tax_ID = Tax.get (ctx, M_Product_ID, C_Charge_ID, billDate, shipDate,
AD_Org_ID, M_Warehouse_ID, billC_BPartner_Location_ID, shipC_BPartner_Location_ID,
"Y".equals(Env.getContext(ctx, WindowNo, "IsSOTrx")));
log.info("Tax ID=" + C_Tax_ID);
if (log.isLoggable(Level.INFO)) log.info("Tax ID=" + C_Tax_ID);
//
if (C_Tax_ID == 0)
mTab.fireDataStatusEEvent(CLogger.retrieveError());
@ -1166,7 +1166,7 @@ public class CalloutOrder extends CalloutEngine
BigDecimal LineNetAmt = QtyOrdered.multiply(PriceActual);
if (LineNetAmt.scale() > StdPrecision)
LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
log.info("LineNetAmt=" + LineNetAmt);
if (log.isLoggable(Level.INFO)) log.info("LineNetAmt=" + LineNetAmt);
mTab.setValue("LineNetAmt", LineNetAmt);
//
return "";

View File

@ -46,7 +46,7 @@ public class CalloutRequest extends CalloutEngine
public String copyMail (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
String colName = mField.getColumnName();
log.info(colName + "=" + value);
if (log.isLoggable(Level.INFO)) log.info(colName + "=" + value);
if (value == null)
return "";
@ -81,7 +81,7 @@ public class CalloutRequest extends CalloutEngine
public String copyResponse (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
String colName = mField.getColumnName();
log.info(colName + "=" + value);
if (log.isLoggable(Level.INFO)) log.info(colName + "=" + value);
if (value == null)
return "";
@ -128,7 +128,7 @@ public class CalloutRequest extends CalloutEngine
public String type (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
String colName = mField.getColumnName();
log.info(colName + "=" + value);
if (log.isLoggable(Level.INFO)) log.info(colName + "=" + value);
mTab.setValue("R_Status_ID", null);
if (value == null)
return "";

View File

@ -90,7 +90,7 @@ public class CalloutRequisition extends CalloutEngine
if (LineNetAmt.scale() > StdPrecision)
LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP);
line.setLineNetAmt(LineNetAmt);
log.info("amt - LineNetAmt=" + LineNetAmt);
if (log.isLoggable(Level.INFO)) log.info("amt - LineNetAmt=" + LineNetAmt);
//
return "";
} // amt

View File

@ -91,7 +91,7 @@ public class ASPGenerateFields extends SvrProcess
{
StringBuilder msglog = new StringBuilder("ASP_Status=").append(p_ASP_Status)
.append(", ASP_Tab_ID=").append(p_ASP_Tab_ID);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
X_ASP_Tab asptab = new X_ASP_Tab(getCtx(), p_ASP_Tab_ID, get_TrxName());
p_ASP_Level_ID = asptab.getASP_Window().getASP_Level_ID();

View File

@ -110,7 +110,7 @@ public class ASPGenerateLevel extends SvrProcess
StringBuilder msglog = new StringBuilder("ASP_Status=").append(p_ASP_Status)
.append(", AD_Menu_ID=").append(p_AD_Menu_ID)
.append(", IsGenerateFields=").append(p_IsGenerateFields);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
MClientInfo clientInfo = MClientInfo.get(getCtx(), getAD_Client_ID(), get_TrxName());
int AD_Tree_ID = clientInfo.getAD_Tree_Menu_ID();

View File

@ -36,6 +36,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import org.compiere.process.SvrProcess;
import org.compiere.util.CLogger;
@ -64,7 +65,7 @@ public class ApplyMigrationScripts extends SvrProcess {
StringBuilder tmpSql = new StringBuilder(new String(scriptArray));
if (tmpSql.length() > 0) {
log.info("Executing script " + rs.getString(3));
if (log.isLoggable(Level.INFO)) log.info("Executing script " + rs.getString(3));
execOk = executeScript(tmpSql.toString(), rs.getString(3));
System.out.println();
}

View File

@ -97,7 +97,7 @@ public class ClientAcctProcessor extends SvrProcess
protected String doIt () throws Exception
{
StringBuilder msglog = new StringBuilder("C_AcctSchema_ID=").append(p_C_AcctSchema_ID).append(", AD_Table_ID=").append(p_AD_Table_ID);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
if (! MClient.isClientAccounting())
throw new AdempiereUserError(Msg.getMsg(getCtx(), "ClientAccountingNotEnabled"));

View File

@ -121,7 +121,7 @@ public class Export extends SvrProcess
// m_dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, Env.getLanguage(getCtx()));
// m_dateFormat = DisplayType.getDateFormat(DisplayType.Date, Env.getLanguage(getCtx()));
//
log.info(sb.toString());
if (log.isLoggable(Level.INFO)) log.info(sb.toString());
}
// create new Document
@ -141,12 +141,12 @@ public class Export extends SvrProcess
outDocument = createNewDocument();
MClient client = MClient.get (getCtx(), p_AD_Client_ID);
log.info(client.toString());
if (log.isLoggable(Level.INFO)) log.info(client.toString());
// TODO - get proper Export Format!
int EXP_Format_ID = 1000000;
MTable table = MTable.get(getCtx(), AD_Table_ID);
log.info("Table = " + table);
if (log.isLoggable(Level.INFO)) log.info("Table = " + table);
PO po = table.getPO (p_Record_ID, get_TrxName());
if (po.get_KeyColumns().length > 1 || po.get_KeyColumns().length < 1) {
@ -268,7 +268,7 @@ public class Export extends SvrProcess
}
}*/
StringBuilder msglog = new StringBuilder("EXP Field - column=[").append(column.getColumnName()).append("]; value=").append(value);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
if (valueString != null && !"".equals(valueString) && !"null".equals(valueString)) {
Text newText = outDocument.createTextNode(valueString);
newElement.appendChild(newText);
@ -330,7 +330,7 @@ public class Export extends SvrProcess
}
}*/
StringBuilder msglog = new StringBuilder("EXP Field - column=[").append(column.getColumnName()).append("]; value=").append(value);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
if (valueString != null && !"".equals(valueString) && !"null".equals(valueString)) {
rootElement.setAttribute(formatLine.getValue(), valueString);
elementHasValue = true;
@ -346,7 +346,7 @@ public class Export extends SvrProcess
MEXPFormat embeddedFormat = new MEXPFormat(getCtx(), embeddedFormat_ID, get_TrxName());
MTable tableEmbedded = MTable.get(getCtx(), embeddedFormat.getAD_Table_ID());
log.info("Table Embedded = " + tableEmbedded);
if (log.isLoggable(Level.INFO)) log.info("Table Embedded = " + tableEmbedded);
StringBuilder sql = new StringBuilder("SELECT * ")
.append("FROM ").append(tableEmbedded.getTableName()).append(" ")
.append("WHERE ").append(masterPO.get_KeyColumns()[0]).append("=?")

View File

@ -118,7 +118,7 @@ public class ImmediateBankTransfer extends SvrProcess
.append(" - C_CashBook_ID=").append(p_C_CashBook_ID).append(" - Amount=").append(p_Amount).append(" - Name=").append(p_Name)
.append(" - Description=").append(p_Description).append(" - Statement Date=").append(p_StatementDate)
.append(" - Date Account=").append(p_DateAcct);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
if (p_To_C_BankAccount_ID == 0 || p_From_C_BankAccount_ID == 0)
throw new IllegalArgumentException("Banks required");

View File

@ -106,7 +106,7 @@ public class ImportPriceList extends SvrProcess
sql = new StringBuilder("DELETE I_PriceList "
+ "WHERE I_IsImported='Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Delete Old Impored =" + no);
if (log.isLoggable(Level.INFO)) log.info("Delete Old Impored =" + no);
}
// Set Client, Org, IsActive, Created/Updated, EnforcePriceLimit, IsSOPriceList, IsTaxIncluded, PricePrecision
@ -126,7 +126,7 @@ public class ImportPriceList extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info("Reset=" + no);
// Set Optional BPartner
sql = new StringBuilder ("UPDATE I_PriceList ")
@ -135,7 +135,7 @@ public class ImportPriceList extends SvrProcess
.append("WHERE C_BPartner_ID IS NULL AND BPartner_Value IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("BPartner=" + no);
if (log.isLoggable(Level.INFO)) log.info("BPartner=" + no);
//
sql = new StringBuilder ("UPDATE I_PriceList ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid BPartner,' ")
@ -169,7 +169,7 @@ public class ImportPriceList extends SvrProcess
.append("WHERE M_PriceList_ID IS NULL")
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Price List Existing Value=" + no);
if (log.isLoggable(Level.INFO)) log.info("Price List Existing Value=" + no);
// **** Find Price List Version
// List Name (ID) + ValidFrom
@ -179,7 +179,7 @@ public class ImportPriceList extends SvrProcess
.append("WHERE M_PriceList_ID IS NOT NULL AND M_PriceList_Version_ID IS NULL")
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Price List Version Existing Value=" + no);
if (log.isLoggable(Level.INFO)) log.info("Price List Version Existing Value=" + no);
/* UOM For Future USE
// Set UOM (System/own)
@ -224,7 +224,7 @@ public class ImportPriceList extends SvrProcess
.append("WHERE C_Currency_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("doIt- Set Currency=" + no);
if (log.isLoggable(Level.INFO)) log.info("doIt- Set Currency=" + no);
//
sql = new StringBuilder ("UPDATE I_PriceList ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Currency,' ")

View File

@ -168,7 +168,7 @@ public class InitialClientSetup extends SvrProcess
.append(", IsUseSalesRegionDimension=").append(p_IsUseSalesRegionDimension)
.append(", CoAFile=").append(p_CoAFile);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
// Validations
@ -199,7 +199,7 @@ public class InitialClientSetup extends SvrProcess
MCity city = MCity.get(getCtx(), p_C_City_ID);
if (! city.getName().equals(p_CityName)) {
msglog = new StringBuilder("City name changed from ").append(p_CityName).append(" to ").append(city.getName());
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
p_CityName = city.getName();
}
}

View File

@ -73,7 +73,7 @@ public class PrepareMigrationScripts extends SvrProcess {
dirList = dir.listFiles(filter);
StringBuilder msglog = new StringBuilder("Searching for SQL files in the ").append(dir).append(" directory");
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
StringBuilder msg = new StringBuilder();

View File

@ -73,7 +73,7 @@ public class LanguageMaintenance extends SvrProcess
protected String doIt() throws Exception
{
m_language = new MLanguage (getCtx(), p_AD_Language_ID, get_TrxName());
log.info("Mode=" + p_MaintenanceMode + ", ID=" + p_AD_Language_ID
if (log.isLoggable(Level.INFO)) log.info("Mode=" + p_MaintenanceMode + ", ID=" + p_AD_Language_ID
+ " - " + m_language);
if (m_language.isBaseLanguage())

View File

@ -78,7 +78,7 @@ public class AD_PrintPaper_Default extends SvrProcess
sql.append(" AND AD_Client_ID = ").append(p_AD_Client_ID);
}
cnt = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Updated " + cnt + " columns");
if (log.isLoggable(Level.INFO)) log.info("Updated " + cnt + " columns");
log.fine("Committing ...");
DB.commit(true, null);
}

View File

@ -65,7 +65,7 @@ public class AcctSchemaCopyAcct extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("SourceAcctSchema_ID=" + p_SourceAcctSchema_ID
if (log.isLoggable(Level.INFO)) log.info("SourceAcctSchema_ID=" + p_SourceAcctSchema_ID
+ ", TargetAcctSchema_ID=" + p_TargetAcctSchema_ID);
if (p_SourceAcctSchema_ID == 0 || p_TargetAcctSchema_ID == 0)

View File

@ -65,7 +65,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID
if (log.isLoggable(Level.INFO)) log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID
+ ", CopyOverwriteAcct=" + p_CopyOverwriteAcct);
if (p_C_AcctSchema_ID == 0)
throw new AdempiereSystemError("C_AcctSchema_ID=0");

View File

@ -98,7 +98,7 @@ public class Aging extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("StatementDate=" + p_StatementDate + ", IsSOTrx=" + p_IsSOTrx
if (log.isLoggable(Level.INFO)) log.info("StatementDate=" + p_StatementDate + ", IsSOTrx=" + p_IsSOTrx
+ ", C_Currency_ID=" + p_C_Currency_ID + ", AD_Org_ID=" + p_AD_Org_ID
+ ", C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID
+ ", IsListInvoices=" + p_IsListInvoices);
@ -252,7 +252,7 @@ public class Aging extends SvrProcess
rs = null; pstmt = null;
}
//
log.info("#" + counter + " - rows=" + rows);
if (log.isLoggable(Level.INFO)) log.info("#" + counter + " - rows=" + rows);
return "";
} // doIt

View File

@ -94,7 +94,7 @@ public class AllocationAuto extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info ("C_BP_Group_ID=" + p_C_BP_Group_ID
if (log.isLoggable(Level.INFO)) log.info ("C_BP_Group_ID=" + p_C_BP_Group_ID
+ ", C_BPartner_ID=" + p_C_BPartner_ID
+ ", Oldest=" + p_AllocateOldest
+ ", AP/AR=" + p_APAR);
@ -184,7 +184,7 @@ public class AllocationAuto extends SvrProcess
{
getPayments(C_BPartner_ID);
getInvoices(C_BPartner_ID);
log.info ("(1) - C_BPartner_ID=" + C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info ("(1) - C_BPartner_ID=" + C_BPartner_ID
+ " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length);
if (m_payments.length + m_invoices.length < 2)
return 0;
@ -195,7 +195,7 @@ public class AllocationAuto extends SvrProcess
{
getPayments(C_BPartner_ID); // for next
getInvoices(C_BPartner_ID);
log.info ("(2) - C_BPartner_ID=" + C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info ("(2) - C_BPartner_ID=" + C_BPartner_ID
+ " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length);
if (m_payments.length + m_invoices.length < 2)
return count;
@ -209,7 +209,7 @@ public class AllocationAuto extends SvrProcess
getPayments(C_BPartner_ID); // for next
getInvoices(C_BPartner_ID);
processAllocation();
log.info ("(3) - C_BPartner_ID=" + C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info ("(3) - C_BPartner_ID=" + C_BPartner_ID
+ " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length);
if (m_payments.length + m_invoices.length < 2)
return count;
@ -223,7 +223,7 @@ public class AllocationAuto extends SvrProcess
getPayments(C_BPartner_ID); // for next
getInvoices(C_BPartner_ID);
processAllocation();
log.info ("(4) - C_BPartner_ID=" + C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info ("(4) - C_BPartner_ID=" + C_BPartner_ID
+ " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length);
if (m_payments.length + m_invoices.length < 2)
return count;
@ -239,7 +239,7 @@ public class AllocationAuto extends SvrProcess
getPayments(C_BPartner_ID); // for next
getInvoices(C_BPartner_ID);
processAllocation();
log.info ("(5) - C_BPartner_ID=" + C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info ("(5) - C_BPartner_ID=" + C_BPartner_ID
+ " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length);
if (m_payments.length + m_invoices.length < 2)
return count;
@ -366,7 +366,7 @@ public class AllocationAuto extends SvrProcess
if (payment.isAllocated())
continue;
BigDecimal allocatedAmt = payment.getAllocatedAmt();
log.info(payment + ", Allocated=" + allocatedAmt);
if (log.isLoggable(Level.INFO)) log.info(payment + ", Allocated=" + allocatedAmt);
if (allocatedAmt != null && allocatedAmt.signum() != 0)
continue;
BigDecimal availableAmt = payment.getPayAmt()
@ -469,7 +469,7 @@ public class AllocationAuto extends SvrProcess
if (payment.isAllocated())
continue;
BigDecimal allocatedAmt = payment.getAllocatedAmt();
log.info(payment + ", Allocated=" + allocatedAmt);
if (log.isLoggable(Level.INFO)) log.info(payment + ", Allocated=" + allocatedAmt);
if (allocatedAmt != null && allocatedAmt.signum() != 0)
continue;
BigDecimal availableAmt = payment.getPayAmt()
@ -574,7 +574,7 @@ public class AllocationAuto extends SvrProcess
}
BigDecimal difference = totalInvoices.subtract(totalPayments);
log.info("= Invoices=" + totalInvoices
if (log.isLoggable(Level.INFO)) log.info("= Invoices=" + totalInvoices
+ " - Payments=" + totalPayments
+ " = Difference=" + difference);
@ -649,7 +649,7 @@ public class AllocationAuto extends SvrProcess
if (payment.getC_Currency_ID() != C_Currency_ID)
continue;
BigDecimal allocatedAmt = payment.getAllocatedAmt();
log.info(payment + ", Allocated=" + allocatedAmt);
if (log.isLoggable(Level.INFO)) log.info(payment + ", Allocated=" + allocatedAmt);
BigDecimal availableAmt = payment.getPayAmt()
.add(payment.getDiscountAmt())
.add(payment.getWriteOffAmt())
@ -694,7 +694,7 @@ public class AllocationAuto extends SvrProcess
BigDecimal maxAmt = totalInvoices.abs().min(totalPayments.abs());
if (totalInvoices.signum() < 0)
maxAmt = maxAmt.negate();
log.info("= Invoices=" + totalInvoices
if (log.isLoggable(Level.INFO)) log.info("= Invoices=" + totalInvoices
+ " - Payments=" + totalPayments
+ " = Difference=" + difference + " - Max=" + maxAmt);

View File

@ -94,7 +94,7 @@ public class AllocationReset extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info ("C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info ("C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID
+ ", DateAcct= " + p_DateAcct_From + " - " + p_DateAcct_To
+ ", C_AllocationHdr_ID=" + p_C_AllocationHdr_ID
+ ", AllAllocations=" + p_AllAllocations);

View File

@ -179,7 +179,7 @@ public class AssetDelivery extends SvrProcess
rs = null; stmt = null;
}
log.info("Count=" + count + ", Errors=" + errors + ", Reminder=" + reminders
if (log.isLoggable(Level.INFO)) log.info("Count=" + count + ", Errors=" + errors + ", Reminder=" + reminders
+ " - " + (System.currentTimeMillis()-start) + "ms");
StringBuilder msgreturn = new StringBuilder("@Sent@=").append(count).append(" - @Errors@=").append(errors);
return msgreturn.toString();

View File

@ -78,10 +78,10 @@ public class BOMValidate extends SvrProcess
{
if (p_M_Product_ID != 0)
{
log.info("M_Product_ID=" + p_M_Product_ID);
if (log.isLoggable(Level.INFO)) log.info("M_Product_ID=" + p_M_Product_ID);
return validateProduct(new MProduct(getCtx(), p_M_Product_ID, get_TrxName()));
}
log.info("M_Product_Category_ID=" + p_M_Product_Category_ID
if (log.isLoggable(Level.INFO)) log.info("M_Product_Category_ID=" + p_M_Product_Category_ID
+ ", IsReValidate=" + p_IsReValidate);
//
int counter = 0;

View File

@ -79,11 +79,11 @@ public class BOMVerify extends SvrProcess
{
if (p_M_Product_ID != 0)
{
log.info("M_Product_ID=" + p_M_Product_ID);
if (log.isLoggable(Level.INFO)) log.info("M_Product_ID=" + p_M_Product_ID);
checkProduct(new MProduct(getCtx(), p_M_Product_ID, get_TrxName()));
return "Product Checked";
}
log.info("M_Product_Category_ID=" + p_M_Product_Category_ID
if (log.isLoggable(Level.INFO)) log.info("M_Product_Category_ID=" + p_M_Product_Category_ID
+ ", IsReValidate=" + p_IsReValidate);
//
int counter = 0;

View File

@ -65,7 +65,7 @@ public class BPGroupAcctCopy extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID);
if (log.isLoggable(Level.INFO)) log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID);
if (p_C_AcctSchema_ID == 0)
throw new AdempiereSystemError("C_AcctSchema_ID=0");
MAcctSchema as = MAcctSchema.get(getCtx(), p_C_AcctSchema_ID);

View File

@ -77,7 +77,7 @@ public class BPartnerOrgLink extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("C_BPartner_ID=" + p_C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info("C_BPartner_ID=" + p_C_BPartner_ID
+ ", AD_Org_ID=" + p_AD_Org_ID
+ ", AD_OrgType_ID=" + p_AD_OrgType_ID
+ ", AD_Role_ID=" + p_AD_Role_ID);

View File

@ -57,7 +57,7 @@ public class BPartnerOrgUnLink extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("doIt - C_BPartner_ID=" + p_C_BPartner_ID);
if (log.isLoggable(Level.INFO)) log.info("doIt - C_BPartner_ID=" + p_C_BPartner_ID);
if (p_C_BPartner_ID == 0)
throw new IllegalArgumentException ("No Business Partner ID");
MBPartner bp = new MBPartner (getCtx(), p_C_BPartner_ID, get_TrxName());

View File

@ -72,7 +72,7 @@ public class BPartnerValidate extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_BPartner_ID=" + p_C_BPartner_ID + ", C_BP_Group_ID=" + p_C_BP_Group_ID);
if (log.isLoggable(Level.INFO)) log.info("C_BPartner_ID=" + p_C_BPartner_ID + ", C_BP_Group_ID=" + p_C_BP_Group_ID);
if (p_C_BPartner_ID == 0 && p_C_BP_Group_ID == 0)
throw new AdempiereUserError ("No Business Partner/Group selected");

View File

@ -65,7 +65,7 @@ public class BankStatementMatcher extends SvrProcess
if (m_matchers == null || m_matchers.length == 0)
throw new IllegalStateException("No Matchers found");
//
log.info ("doIt - Table_ID=" + Table_ID + ", Record_ID=" + Record_ID
if (log.isLoggable(Level.INFO)) log.info ("doIt - Table_ID=" + Table_ID + ", Record_ID=" + Record_ID
+ ", Matchers=" + m_matchers.length);
if (Table_ID == X_I_BankStatement.Table_ID)

View File

@ -63,7 +63,7 @@ public class BankStatementPayment extends SvrProcess
{
int Table_ID = getTable_ID();
int Record_ID = getRecord_ID();
log.info ("Table_ID=" + Table_ID + ", Record_ID=" + Record_ID);
if (log.isLoggable(Level.INFO)) log.info ("Table_ID=" + Table_ID + ", Record_ID=" + Record_ID);
if (Table_ID == X_I_BankStatement.Table_ID)
return createPayment (new X_I_BankStatement(getCtx(), Record_ID, get_TrxName()));

View File

@ -113,7 +113,7 @@ public class ChangeLogProcess extends SvrProcess
if (p_SetCustomization)
return setCustomization();
log.info("AD_ChangeLog_ID=" + p_AD_ChangeLog_ID
if (log.isLoggable(Level.INFO)) log.info("AD_ChangeLog_ID=" + p_AD_ChangeLog_ID
+ ", CheckOldValue=" + p_CheckOldValue + ", CheckNewValue=" + p_CheckNewValue);
// Single Change or All Customizations
@ -306,7 +306,7 @@ public class ChangeLogProcess extends SvrProcess
if (m_isInsert && m_numberColumns > 2)
{
m_sqlInsert.append(m_sqlInsertValue).append(")");
log.info(m_sqlInsert.toString());
if (log.isLoggable(Level.INFO)) log.info(m_sqlInsert.toString());
//
no = DB.executeUpdate(m_sqlInsert.toString(), get_TrxName());
if (no == -1)
@ -325,7 +325,7 @@ public class ChangeLogProcess extends SvrProcess
else // Update SQL
{
m_sqlUpdate.append(m_sqlUpdateWhere);
log.info(m_sqlUpdate.toString());
if (log.isLoggable(Level.INFO)) log.info(m_sqlUpdate.toString());
//
no = DB.executeUpdate(m_sqlUpdate.toString(), get_TrxName());
if (no == -1)

View File

@ -68,7 +68,7 @@ public class ColumnSync extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("C_Column_ID=" + p_AD_Column_ID);
if (log.isLoggable(Level.INFO)) log.info("C_Column_ID=" + p_AD_Column_ID);
if (p_AD_Column_ID == 0)
throw new AdempiereUserError("@No@ @AD_Column_ID@");
MColumn column = new MColumn (getCtx(), p_AD_Column_ID, get_TrxName());

View File

@ -58,7 +58,7 @@ public class CommissionAPInvoice extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("doIt - C_CommissionRun_ID=" + getRecord_ID());
if (log.isLoggable(Level.INFO)) log.info("doIt - C_CommissionRun_ID=" + getRecord_ID());
// Load Data
MCommissionRun comRun = new MCommissionRun (getCtx(), getRecord_ID(), get_TrxName());
if (comRun.get_ID() == 0)

View File

@ -76,7 +76,7 @@ public class CommissionCalc extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("C_Commission_ID=" + getRecord_ID() + ", StartDate=" + p_StartDate);
if (log.isLoggable(Level.INFO)) log.info("C_Commission_ID=" + getRecord_ID() + ", StartDate=" + p_StartDate);
if (p_StartDate == null)
p_StartDate = new Timestamp (System.currentTimeMillis());
m_com = new MCommission (getCtx(), getRecord_ID(), get_TrxName());

View File

@ -61,7 +61,7 @@ public class CommissionCopy extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("doIt - C_Commission_ID=" + p_C_Commission_ID + " - copy to " + p_C_CommissionTo_ID);
if (log.isLoggable(Level.INFO)) log.info("doIt - C_Commission_ID=" + p_C_Commission_ID + " - copy to " + p_C_CommissionTo_ID);
MCommission comFrom = new MCommission (getCtx(), p_C_Commission_ID, get_TrxName());
if (comFrom.get_ID() == 0)
throw new AdempiereUserError ("No From Commission");

View File

@ -70,7 +70,7 @@ public class CopyColumnsFromTable extends SvrProcess
throw new AdempiereSystemError("@NotFound@ @AD_Table_ID@ " + p_target_AD_Table_ID);
if (p_source_AD_Table_ID == 0)
throw new AdempiereSystemError("@NotFound@ @AD_Table_ID@ " + p_source_AD_Table_ID);
log.info("Source AD_Table_ID=" + p_source_AD_Table_ID
if (log.isLoggable(Level.INFO)) log.info("Source AD_Table_ID=" + p_source_AD_Table_ID
+ ", Target AD_Table_ID=" + p_target_AD_Table_ID);
MTable targetTable = new MTable(getCtx(), p_target_AD_Table_ID, get_TrxName());

View File

@ -61,7 +61,7 @@ public class CopyFromBankStmt extends SvrProcess
protected String doIt() throws Exception
{
int To_C_BankStatement_ID = getRecord_ID();
log.info("From C_BankStatement_ID=" + m_C_BankStatement_ID + " to " + To_C_BankStatement_ID);
if (log.isLoggable(Level.INFO)) log.info("From C_BankStatement_ID=" + m_C_BankStatement_ID + " to " + To_C_BankStatement_ID);
if (To_C_BankStatement_ID == 0)
throw new IllegalArgumentException("Target C_BankStatement_ID == 0");
if (m_C_BankStatement_ID == 0)

View File

@ -57,7 +57,7 @@ public class CopyFromInvoice extends SvrProcess
protected String doIt() throws Exception
{
int To_C_Invoice_ID = getRecord_ID();
log.info("From C_Invoice_ID=" + m_C_Invoice_ID + " to " + To_C_Invoice_ID);
if (log.isLoggable(Level.INFO)) log.info("From C_Invoice_ID=" + m_C_Invoice_ID + " to " + To_C_Invoice_ID);
if (To_C_Invoice_ID == 0)
throw new IllegalArgumentException("Target C_Invoice_ID == 0");
if (m_C_Invoice_ID == 0)

View File

@ -58,7 +58,7 @@ public class CopyFromJournal extends SvrProcess
protected String doIt() throws Exception
{
int To_GL_JournalBatch_ID = getRecord_ID();
log.info("doIt - From GL_JournalBatch_ID=" + m_GL_JournalBatch_ID + " to " + To_GL_JournalBatch_ID);
if (log.isLoggable(Level.INFO)) log.info("doIt - From GL_JournalBatch_ID=" + m_GL_JournalBatch_ID + " to " + To_GL_JournalBatch_ID);
if (To_GL_JournalBatch_ID == 0)
throw new IllegalArgumentException("Target GL_JournalBatch_ID == 0");
if (m_GL_JournalBatch_ID == 0)

View File

@ -54,7 +54,7 @@ public class CopyFromJournalDoc extends SvrProcess
protected String doIt() throws Exception
{
int To_GL_Journal_ID = getRecord_ID();
log.info("doIt - From GL_Journal_ID=" + m_GL_Journal_ID + " to " + To_GL_Journal_ID);
if (log.isLoggable(Level.INFO)) log.info("doIt - From GL_Journal_ID=" + m_GL_Journal_ID + " to " + To_GL_Journal_ID);
if (To_GL_Journal_ID == 0)
throw new IllegalArgumentException("Target GL_Journal_ID == 0");
if (m_GL_Journal_ID == 0)

View File

@ -58,7 +58,7 @@ public class CopyFromOrder extends SvrProcess
protected String doIt() throws Exception
{
int To_C_Order_ID = getRecord_ID();
log.info("From C_Order_ID=" + p_C_Order_ID + " to " + To_C_Order_ID);
if (log.isLoggable(Level.INFO)) log.info("From C_Order_ID=" + p_C_Order_ID + " to " + To_C_Order_ID);
if (To_C_Order_ID == 0)
throw new IllegalArgumentException("Target C_Order_ID == 0");
if (p_C_Order_ID == 0)

View File

@ -57,7 +57,7 @@ public class CopyFromProject extends SvrProcess
protected String doIt() throws Exception
{
int To_C_Project_ID = getRecord_ID();
log.info("doIt - From C_Project_ID=" + m_C_Project_ID + " to " + To_C_Project_ID);
if (log.isLoggable(Level.INFO)) log.info("doIt - From C_Project_ID=" + m_C_Project_ID + " to " + To_C_Project_ID);
if (To_C_Project_ID == 0)
throw new IllegalArgumentException("Target C_Project_ID == 0");
if (m_C_Project_ID == 0)

View File

@ -71,7 +71,7 @@ public class CopyOrder extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("C_Order_ID=" + p_C_Order_ID
if (log.isLoggable(Level.INFO)) log.info("C_Order_ID=" + p_C_Order_ID
+ ", C_DocType_ID=" + p_C_DocType_ID
+ ", CloseDocument=" + p_IsCloseDocument);
if (p_C_Order_ID == 0)

View File

@ -47,7 +47,7 @@ public class CopyProduct extends SvrProcess {
protected String doIt() throws Exception {
int toMProductID = getRecord_ID();
log.info("From M_Product_ID=" + m_copyFromId + " to " + toMProductID);
if (log.isLoggable(Level.INFO)) log.info("From M_Product_ID=" + m_copyFromId + " to " + toMProductID);
if (toMProductID == 0)
throw new IllegalArgumentException("Target M_Product_ID == 0");
if (m_copyFromId == 0)

View File

@ -59,7 +59,7 @@ public class CostCreate extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("M_Product_ID=" + p_M_Product_ID);
if (log.isLoggable(Level.INFO)) log.info("M_Product_ID=" + p_M_Product_ID);
if (p_M_Product_ID == 0)
throw new AdempiereUserError("@NotFound@: @M_Product_ID@ = " + p_M_Product_ID);
MProduct product = MProduct.get(getCtx(), p_M_Product_ID);

View File

@ -101,7 +101,7 @@ public class CostUpdate extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("M_Product_Category_ID=" + p_M_Product_Category_ID
if (log.isLoggable(Level.INFO)) log.info("M_Product_Category_ID=" + p_M_Product_Category_ID
+ ", Future=" + p_SetFutureCostTo
+ ", Standard=" + p_SetStandardCostTo
+ "; M_PriceList_Version_ID=" + p_M_PriceList_Version_ID);
@ -220,7 +220,7 @@ public class CostUpdate extends SvrProcess
rs = null;
pstmt = null;
}
log.info("#" + counter);
if (log.isLoggable(Level.INFO)) log.info("#" + counter);
addLog(0, null, new BigDecimal(counter), "Created for " + as.getName());
} // createNew
@ -283,7 +283,7 @@ public class CostUpdate extends SvrProcess
rs = null;
pstmt = null;
}
log.info("#" + counter);
if (log.isLoggable(Level.INFO)) log.info("#" + counter);
addLog(0, null, new BigDecimal(counter), "@Updated@");
return counter;
} // update

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MDiscountSchema;
import org.compiere.util.AdempiereUserError;
@ -46,7 +48,7 @@ public class DiscountSchemaReSeq extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("M_DiscountSchema_ID=" + p_M_DiscountSchema_ID);
if (log.isLoggable(Level.INFO)) log.info("M_DiscountSchema_ID=" + p_M_DiscountSchema_ID);
if (p_M_DiscountSchema_ID == 0)
throw new AdempiereUserError("@M_DiscountSchema_ID@ = 0");
MDiscountSchema ds = new MDiscountSchema(getCtx(), p_M_DiscountSchema_ID, get_TrxName());

View File

@ -99,11 +99,11 @@ public class DistributionCreate extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("M_DistributionList_ID=" + p_M_DistributionList_ID
if (log.isLoggable(Level.INFO)) log.info("M_DistributionList_ID=" + p_M_DistributionList_ID
+ ", M_Product_ID=" + p_M_Product_ID + ", Qty=" + p_Qty
+ ", Test=" + p_IsTest);
if (p_IsCreateSingleOrder)
log.info("SingleOrder=" + p_IsCreateSingleOrder
if (log.isLoggable(Level.INFO)) log.info("SingleOrder=" + p_IsCreateSingleOrder
+ ", BPartner_ID=" + p_Bill_BPartner_ID
+ ", Location_ID=" + p_Bill_Location_ID);
//

View File

@ -135,7 +135,7 @@ public class DistributionRun extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("M_DistributionRun_ID=" + p_M_DistributionRun_ID
if (log.isLoggable(Level.INFO)) log.info("M_DistributionRun_ID=" + p_M_DistributionRun_ID
+ ", C_DocType_ID=" + p_C_DocType_ID
+ ", DatePromised=" + p_DatePromised
+ ", Test=" + p_IsTest);
@ -331,7 +331,7 @@ public class DistributionRun extends SvrProcess
if (allocationEqTotal && !runLine.isActualAllocationEqTotal())
allocationEqTotal = false;
} // for all run lines
log.info("=" + allocationEqTotal);
if (log.isLoggable(Level.INFO)) log.info("=" + allocationEqTotal);
return allocationEqTotal;
} // isAllocationEqTotal
@ -446,9 +446,9 @@ public class DistributionRun extends SvrProcess
if (!counter || runBPartner == null || runBPartner.get_ID() != runC_BPartner_ID)
counter = false;
if (counter)
log.info("RunBP=" + runBPartner
if (log.isLoggable(Level.INFO)) log.info("RunBP=" + runBPartner
+ " - " + m_docType);
log.info("Single=" + m_run.isCreateSingleOrder()
if (log.isLoggable(Level.INFO)) log.info("Single=" + m_run.isCreateSingleOrder()
+ " - " + m_docType + ",SO=" + m_docType.isSOTrx());
if (log.isLoggable(Level.FINE)) log.fine("Counter=" + counter
+ ",C_BPartner_ID=" + runC_BPartner_ID + "," + runBPartner);
@ -638,12 +638,14 @@ public class DistributionRun extends SvrProcess
MProduct product = MProduct.get(getCtx(), record.getM_Product_ID());
BigDecimal ration = record.getRatio();
BigDecimal totalration = getQtyDemand(record.getM_Product_ID());
log.info("Value:" + product.getValue());
log.info("Product:" + product.getName());
log.info("Qty To Deliver:" + record.getRatio());
log.info("Qty Target:" + record.getMinQty());
log.info("Qty Total Available:" + drl.getTotalQty());
log.info("Qty Total Demand:" + totalration);
if (log.isLoggable(Level.INFO)){
log.info("Value:" + product.getValue());
log.info("Product:" + product.getName());
log.info("Qty To Deliver:" + record.getRatio());
log.info("Qty Target:" + record.getMinQty());
log.info("Qty Total Available:" + drl.getTotalQty());
log.info("Qty Total Demand:" + totalration);
}
BigDecimal factor = ration.divide(totalration, 12 , BigDecimal.ROUND_HALF_UP);
record.setQty(drl.getTotalQty().multiply(factor));
record.saveEx();
@ -844,9 +846,9 @@ public class DistributionRun extends SvrProcess
if (!counter || runBPartner == null || runBPartner.get_ID() != runC_BPartner_ID)
counter = false;
if (counter)
log.info("RunBP=" + runBPartner
if (log.isLoggable(Level.INFO)) log.info("RunBP=" + runBPartner
+ " - " + m_docType);
log.info("Single=" + m_run.isCreateSingleOrder()
if (log.isLoggable(Level.INFO)) log.info("Single=" + m_run.isCreateSingleOrder()
+ " - " + m_docType + ",SO=" + m_docType.isSOTrx());
if (log.isLoggable(Level.FINE)) log.fine("Counter=" + counter
+ ",C_BPartner_ID=" + runC_BPartner_ID + "," + runBPartner);

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MDistribution;
import org.compiere.util.AdempiereSystemError;
import org.compiere.util.AdempiereUserError;
@ -44,7 +46,7 @@ public class DistributionVerify extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("doIt - GL_Distribution_ID=" + getRecord_ID());
if (log.isLoggable(Level.INFO)) log.info("doIt - GL_Distribution_ID=" + getRecord_ID());
MDistribution distribution = new MDistribution (getCtx(), getRecord_ID(), get_TrxName());
if (distribution.get_ID() == 0)
throw new AdempiereUserError("Not found GL_Distribution_ID=" + getRecord_ID());

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MDocTypeCounter;
/**
@ -45,7 +47,7 @@ public class DocTypeCounterValidate extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_DocTypeCounter_ID=" + p_C_DocTypeCounter_ID);
if (log.isLoggable(Level.INFO)) log.info("C_DocTypeCounter_ID=" + p_C_DocTypeCounter_ID);
m_counter = new MDocTypeCounter (getCtx(), p_C_DocTypeCounter_ID, get_TrxName());
if (m_counter == null || m_counter.get_ID() == 0)
throw new IllegalArgumentException("Not found C_DocTypeCounter_ID=" + p_C_DocTypeCounter_ID);

View File

@ -89,7 +89,7 @@ public class DunningPrint extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_DunningRun_ID=" + p_C_DunningRun_ID + ",R_MailText_ID=" + p_R_MailText_ID
if (log.isLoggable(Level.INFO)) log.info("C_DunningRun_ID=" + p_C_DunningRun_ID + ",R_MailText_ID=" + p_R_MailText_ID
+ ", EmailPDF=" + p_EMailPDF + ",IsOnlyIfBPBalance=" + p_IsOnlyIfBPBalance
+ ",PrintUnprocessedOnly=" + p_PrintUnprocessedOnly);

View File

@ -95,7 +95,7 @@ public class DunningRunCreate extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_DunningRun_ID=" + p_C_DunningRun_ID
if (log.isLoggable(Level.INFO)) log.info("C_DunningRun_ID=" + p_C_DunningRun_ID
+ ", Dispute=" + p_IncludeInDispute
+ ", C_BP_Group_ID=" + p_C_BP_Group_ID
+ ", C_BPartner_ID=" + p_C_BPartner_ID);
@ -168,7 +168,7 @@ public class DunningRunCreate extends SvrProcess
sql.append(" AND i.C_Currency_ID=").append(p_C_Currency_ID);
if ( p_AD_Org_ID != 0 )
sql.append(" AND i.AD_Org_ID=").append(p_AD_Org_ID);
// log.info(sql);
// if (log.isLoggable(Level.INFO)) log.info(sql);
String sql2= "";

View File

@ -17,6 +17,7 @@
package org.compiere.process;
import java.io.File;
import java.util.logging.Level;
import org.compiere.model.MClient;
import org.compiere.model.MStore;
@ -51,7 +52,7 @@ public class EMailTest extends SvrProcess
protected String doIt () throws Exception
{
MClient client = MClient.get (getCtx(), p_AD_Client_ID);
log.info(client.toString());
if (log.isLoggable(Level.INFO)) log.info(client.toString());
// Test Client Mail
String clientTest = client.testEMail();

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MEntityType;
import org.compiere.util.AdempiereSystemError;
import org.compiere.util.AdempiereUserError;
@ -47,7 +49,7 @@ public class EntityTypeRegister extends SvrProcess
protected String doIt ()
throws Exception
{
log.info("AD_EntityType_ID=" + p_AD_EntityType_ID);
if (log.isLoggable(Level.INFO)) log.info("AD_EntityType_ID=" + p_AD_EntityType_ID);
MEntityType et = new MEntityType(getCtx(), p_AD_EntityType_ID, get_TrxName());
if (et.isSystemMaintained())
throw new AdempiereUserError("You cannot register a System maintained entity");

View File

@ -119,7 +119,7 @@ public class ExpenseAPInvoice extends SvrProcess
completeInvoice (invoice);
MBPartner bp = new MBPartner (getCtx(), te.getC_BPartner_ID(), get_TrxName());
//
log.info("New Invoice for " + bp);
if (log.isLoggable(Level.INFO)) log.info("New Invoice for " + bp);
invoice = new MInvoice (getCtx(), 0, null);
invoice.setClientOrg(te.getAD_Client_ID(), te.getAD_Org_ID());
invoice.setC_DocTypeTarget_ID(MDocType.DOCBASETYPE_APInvoice); // API

View File

@ -172,7 +172,7 @@ public class ExpenseSOrder extends SvrProcess
{
if (m_order == null)
{
log.info("New Order for " + bp + ", Project=" + tel.getC_Project_ID());
if (log.isLoggable(Level.INFO)) log.info("New Order for " + bp + ", Project=" + tel.getC_Project_ID());
m_order = new MOrder (getCtx(), 0, get_TrxName());
m_order.setAD_Org_ID(tel.getAD_Org_ID());
m_order.setC_DocTypeTarget_ID(MOrder.DocSubTypeSO_OnCredit);

View File

@ -101,7 +101,7 @@ public class FactAcctReset extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("AD_Client_ID=" + p_AD_Client_ID
if (log.isLoggable(Level.INFO)) log.info("AD_Client_ID=" + p_AD_Client_ID
+ ", AD_Table_ID=" + p_AD_Table_ID + ", DeletePosting=" + p_DeletePosting);
// List of Tables with Accounting Consequences
String sql = "SELECT AD_Table_ID, TableName "
@ -178,12 +178,12 @@ public class FactAcctReset extends SvrProcess
Timestamp temp = TimeUtil.addDays(today, - as.getPeriod_OpenHistory());
if ( p_DateAcct_From == null || p_DateAcct_From.before(temp) ) {
p_DateAcct_From = temp;
log.info("DateAcct From set to: " + p_DateAcct_From);
if (log.isLoggable(Level.INFO)) log.info("DateAcct From set to: " + p_DateAcct_From);
}
temp = TimeUtil.addDays(today, as.getPeriod_OpenFuture());
if ( p_DateAcct_To == null || p_DateAcct_To.after(temp) ) {
p_DateAcct_To = temp;
log.info("DateAcct To set to: " + p_DateAcct_To);
if (log.isLoggable(Level.INFO)) log.info("DateAcct To set to: " + p_DateAcct_To);
}
}
@ -292,7 +292,7 @@ public class FactAcctReset extends SvrProcess
int deleted = DB.executeUpdate(sql2, get_TrxName());
//
log.info(TableName + "(" + AD_Table_ID + ") - Reset=" + reset + " - Deleted=" + deleted);
if (log.isLoggable(Level.INFO)) log.info(TableName + "(" + AD_Table_ID + ") - Reset=" + reset + " - Deleted=" + deleted);
String s = TableName + " - Reset=" + reset + " - Deleted=" + deleted;
addLog(s);
//

View File

@ -395,7 +395,7 @@ public class ImportAccount extends SvrProcess
no = 0;
}
if (no == 0)
log.info("Parent not found for " + rs.getString(5));
if (log.isLoggable(Level.INFO)) log.info("Parent not found for " + rs.getString(5));
}
}
catch (SQLException e)

View File

@ -83,7 +83,7 @@ public class ImportBankStatement extends SvrProcess
protected String doIt() throws java.lang.Exception
{
StringBuilder msglog = new StringBuilder("AD_Org_ID=").append(p_AD_Org_ID).append(", C_BankAccount_ID").append(p_C_BankAccount_ID);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
StringBuilder sql = null;
int no = 0;
StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(p_AD_Client_ID);
@ -112,7 +112,7 @@ public class ImportBankStatement extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL OR AD_Client_ID IS NULL OR AD_Org_ID IS NULL OR AD_Client_ID=0 OR AD_Org_ID=0");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info ("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no);
sql = new StringBuilder ("UPDATE I_BankStatement o ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '")
@ -141,7 +141,7 @@ public class ImportBankStatement extends SvrProcess
.append("OR i.I_IsImported IS NULL").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Bank Account (With Routing No)=" + no);
if (log.isLoggable(Level.INFO)) log.info("Bank Account (With Routing No)=" + no);
//
sql = new StringBuilder("UPDATE I_BankStatement i ")
.append("SET C_BankAccount_ID=")
@ -158,7 +158,7 @@ public class ImportBankStatement extends SvrProcess
.append("OR i.I_isImported IS NULL").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Bank Account (Without Routing No)=" + no);
if (log.isLoggable(Level.INFO)) log.info("Bank Account (Without Routing No)=" + no);
//
sql = new StringBuilder("UPDATE I_BankStatement i ")
.append("SET C_BankAccount_ID=(SELECT C_BankAccount_ID FROM C_BankAccount a WHERE a.C_BankAccount_ID=").append(p_C_BankAccount_ID)
@ -169,7 +169,7 @@ public class ImportBankStatement extends SvrProcess
.append("OR i.I_isImported IS NULL").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Bank Account=" + no);
if (log.isLoggable(Level.INFO)) log.info("Bank Account=" + no);
//
sql = new StringBuilder("UPDATE I_BankStatement ")
.append("SET I_isImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Bank Account, ' ")
@ -188,7 +188,7 @@ public class ImportBankStatement extends SvrProcess
.append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Set Currency=" + no);
if (log.isLoggable(Level.INFO)) log.info("Set Currency=" + no);
//
sql = new StringBuilder("UPDATE I_BankStatement i ")
.append("SET C_Currency_ID=(SELECT C_Currency_ID FROM C_BankAccount WHERE C_BankAccount_ID=i.C_BankAccount_ID) ")
@ -196,7 +196,7 @@ public class ImportBankStatement extends SvrProcess
.append("AND i.ISO_Code IS NULL").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Set Currency=" + no);
if (log.isLoggable(Level.INFO)) log.info("Set Currency=" + no);
//
sql = new StringBuilder ("UPDATE I_BankStatement ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency,' ")
@ -215,7 +215,7 @@ public class ImportBankStatement extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Charge Amount=" + no);
if (log.isLoggable(Level.INFO)) log.info("Charge Amount=" + no);
//
sql = new StringBuilder("UPDATE I_BankStatement ")
.append("SET InterestAmt=0 ")
@ -223,7 +223,7 @@ public class ImportBankStatement extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Interest Amount=" + no);
if (log.isLoggable(Level.INFO)) log.info("Interest Amount=" + no);
//
sql = new StringBuilder("UPDATE I_BankStatement ")
.append("SET TrxAmt=StmtAmt - InterestAmt - ChargeAmt ")
@ -231,7 +231,7 @@ public class ImportBankStatement extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Transaction Amount=" + no);
if (log.isLoggable(Level.INFO)) log.info("Transaction Amount=" + no);
//
sql = new StringBuilder("UPDATE I_BankStatement ")
.append("SET I_isImported='E', I_ErrorMsg=I_ErrorMsg||'Err=Invalid Amount, ' ")
@ -239,7 +239,7 @@ public class ImportBankStatement extends SvrProcess
.append("AND I_isImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Invaid Amount=" + no);
if (log.isLoggable(Level.INFO)) log.info("Invalid Amount=" + no);
// Set Valuta Date
sql = new StringBuilder("UPDATE I_BankStatement ")
@ -248,7 +248,7 @@ public class ImportBankStatement extends SvrProcess
.append("AND I_isImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Valuta Date=" + no);
if (log.isLoggable(Level.INFO)) log.info("Valuta Date=" + no);
// Check Payment<->Invoice combination
sql = new StringBuilder("UPDATE I_BankStatement ")
@ -263,7 +263,7 @@ public class ImportBankStatement extends SvrProcess
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Payment<->Invoice Mismatch=" + no);
if (log.isLoggable(Level.INFO)) log.info("Payment<->Invoice Mismatch=" + no);
// Check Payment<->BPartner combination
sql = new StringBuilder("UPDATE I_BankStatement ")
@ -278,7 +278,7 @@ public class ImportBankStatement extends SvrProcess
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Payment<->BPartner Mismatch=" + no);
if (log.isLoggable(Level.INFO)) log.info("Payment<->BPartner Mismatch=" + no);
// Check Invoice<->BPartner combination
sql = new StringBuilder("UPDATE I_BankStatement ")
@ -293,7 +293,7 @@ public class ImportBankStatement extends SvrProcess
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Invoice<->BPartner Mismatch=" + no);
if (log.isLoggable(Level.INFO)) log.info("Invoice<->BPartner Mismatch=" + no);
// Check Invoice.BPartner<->Payment.BPartner combination
sql = new StringBuilder("UPDATE I_BankStatement ")
@ -308,7 +308,7 @@ public class ImportBankStatement extends SvrProcess
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Invoice.BPartner<->Payment.BPartner Mismatch=" + no);
if (log.isLoggable(Level.INFO)) log.info("Invoice.BPartner<->Payment.BPartner Mismatch=" + no);
// Detect Duplicates
sql = new StringBuilder("SELECT i.I_BankStatement_ID, l.C_BankStatementLine_ID, i.EftTrxID ")
@ -357,7 +357,7 @@ public class ImportBankStatement extends SvrProcess
pupdt = null;
}
if (no != 0)
log.info("Duplicates=" + no);
if (log.isLoggable(Level.INFO)) log.info("Duplicates=" + no);
commitEx();
@ -386,7 +386,7 @@ public class ImportBankStatement extends SvrProcess
account = MBankAccount.get (m_ctx, imp.getC_BankAccount_ID());
statement = null;
msglog = new StringBuilder("New Statement, Account=").append(account.getAccountNo());
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
}
// Create a new Bank Statement for every account
else if (account.getC_BankAccount_ID() != imp.getC_BankAccount_ID())
@ -394,7 +394,7 @@ public class ImportBankStatement extends SvrProcess
account = MBankAccount.get (m_ctx, imp.getC_BankAccount_ID());
statement = null;
msglog = new StringBuilder("New Statement, Account=").append(account.getAccountNo());
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
}
// Create a new Bank Statement for every statement name
else if ((statement.getName() != null) && (imp.getName() != null))
@ -403,7 +403,7 @@ public class ImportBankStatement extends SvrProcess
{
statement = null;
msglog = new StringBuilder("New Statement, Statement Name=").append(imp.getName());
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
}
}
// Create a new Bank Statement for every statement reference
@ -413,7 +413,7 @@ public class ImportBankStatement extends SvrProcess
{
statement = null;
msglog = new StringBuilder("New Statement, Statement Reference=").append(imp.getEftStatementReference());
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
}
}
// Create a new Bank Statement for every statement date
@ -423,7 +423,7 @@ public class ImportBankStatement extends SvrProcess
{
statement = null;
msglog = new StringBuilder("New Statement, Statement Date=").append(imp.getStatementDate());
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
}
}

View File

@ -89,7 +89,7 @@ public class ImportConversionRate extends SvrProcess
.append(",C_ConversionType_ID=").append(p_C_ConversionType_ID)
.append(",ValidFrom=").append(p_ValidFrom)
.append(",CreateReciprocalRate=").append(p_CreateReciprocalRate);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
//
StringBuilder sql = null;
int no = 0;
@ -126,7 +126,7 @@ public class ImportConversionRate extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info ("Reset =" + no);
if (log.isLoggable(Level.INFO)) log.info ("Reset =" + no);
// Org
sql = new StringBuilder ("UPDATE I_Conversion_Rate o ")

View File

@ -59,7 +59,7 @@ public class ImportDelete extends SvrProcess
protected String doIt() throws Exception
{
StringBuilder msglog = new StringBuilder("AD_Table_ID=").append(p_AD_Table_ID);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
// get Table Info
MTable table = new MTable (getCtx(), p_AD_Table_ID, get_TrxName());
if (table.get_ID() == 0){

View File

@ -96,7 +96,7 @@ public class ImportGLJournal extends SvrProcess
protected String doIt() throws java.lang.Exception
{
StringBuilder msglog = new StringBuilder("IsValidateOnly=").append(m_IsValidateOnly).append(", IsImportOnlyNoErrors=").append(m_IsImportOnlyNoErrors);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
StringBuilder sql = null;
int no = 0;
StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(m_AD_Client_ID);
@ -123,7 +123,7 @@ public class ImportGLJournal extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info ("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no);
// Set Client from Name
sql = new StringBuilder ("UPDATE I_GLJournal i ")
@ -598,9 +598,9 @@ public class ImportGLJournal extends SvrProcess
BigDecimal source = rs.getBigDecimal(1);
BigDecimal acct = rs.getBigDecimal(2);
if (source != null && source.signum() == 0
&& acct != null && acct.signum() == 0)
log.info ("Import Balance = 0");
else{
&& acct != null && acct.signum() == 0) {
if (log.isLoggable(Level.INFO)) log.info ("Import Balance = 0");
} else {
msglog = new StringBuilder("Balance Source=").append(source).append(", Acct=").append(acct);
log.warning(msglog.toString());
}
@ -638,7 +638,7 @@ public class ImportGLJournal extends SvrProcess
return msgreturn.toString();
}
msglog = new StringBuilder("Validation Errors=").append(errors);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
// moved commit above to save error messages
// commit();

View File

@ -69,7 +69,7 @@ public class ImportInOutConfirm extends SvrProcess
protected String doIt () throws Exception
{
StringBuilder msglog = new StringBuilder("I_InOutLineConfirm_ID=").append(p_I_InOutLineConfirm_ID);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
StringBuilder sql = null;
int no = 0;
StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(p_AD_Client_ID);
@ -94,7 +94,7 @@ public class ImportInOutConfirm extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info ("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no);
// Set Client from Name
sql = new StringBuilder ("UPDATE I_InOutLineConfirm i ")

View File

@ -119,7 +119,7 @@ public class ImportInventory extends SvrProcess
protected String doIt() throws java.lang.Exception
{
StringBuilder msglog = new StringBuilder("M_Locator_ID=").append(p_M_Locator_ID).append(",MovementDate=").append(p_MovementDate);
log.info(msglog.toString());
if (log.isLoggable(Level.INFO)) log.info(msglog.toString());
if (p_UpdateCosting) {
if (p_C_AcctSchema_ID <= 0) {
@ -168,7 +168,7 @@ public class ImportInventory extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate (sql.toString (), get_TrxName());
log.info ("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no);
sql = new StringBuilder ("UPDATE I_Inventory o ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '")

View File

@ -114,7 +114,7 @@ public class ImportInvoice extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info ("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no);
sql = new StringBuilder ("UPDATE I_Invoice o ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '")

View File

@ -116,7 +116,7 @@ public class ImportOrder extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info ("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no);
sql = new StringBuilder ("UPDATE I_Order o ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '")

View File

@ -82,13 +82,13 @@ public class ImportPayment extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("C_BankAccount_ID" + p_C_BankAccount_ID);
if (log.isLoggable(Level.INFO)) log.info("C_BankAccount_ID" + p_C_BankAccount_ID);
MBankAccount ba = MBankAccount.get(getCtx(), p_C_BankAccount_ID);
if (p_C_BankAccount_ID == 0 || ba.get_ID() != p_C_BankAccount_ID)
throw new AdempiereUserError("@NotFound@ @C_BankAccount_ID@ - " + p_C_BankAccount_ID);
if (p_AD_Org_ID != ba.getAD_Org_ID() && ba.getAD_Org_ID() != 0)
p_AD_Org_ID = ba.getAD_Org_ID();
log.info("AD_Org_ID=" + p_AD_Org_ID);
if (log.isLoggable(Level.INFO)) log.info("AD_Org_ID=" + p_AD_Org_ID);
StringBuilder sql = null;
int no = 0;
@ -118,7 +118,7 @@ public class ImportPayment extends SvrProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL OR AD_Client_ID IS NULL OR AD_Org_ID IS NULL OR AD_Client_ID=0 OR AD_Org_ID=0");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info ("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no);
sql = new StringBuilder ("UPDATE I_Payment o ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '")
@ -147,7 +147,7 @@ public class ImportPayment extends SvrProcess
.append("OR i.I_IsImported IS NULL").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Bank Account (With Routing No)=" + no);
if (log.isLoggable(Level.INFO)) log.info("Bank Account (With Routing No)=" + no);
//
sql = new StringBuilder("UPDATE I_Payment i ")
.append("SET C_BankAccount_ID=")
@ -164,7 +164,7 @@ public class ImportPayment extends SvrProcess
.append("OR i.I_isImported IS NULL").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Bank Account (Without Routing No)=" + no);
if (log.isLoggable(Level.INFO)) log.info("Bank Account (Without Routing No)=" + no);
//
sql = new StringBuilder("UPDATE I_Payment i ")
.append("SET C_BankAccount_ID=(SELECT C_BankAccount_ID FROM C_BankAccount a WHERE a.C_BankAccount_ID=").append(p_C_BankAccount_ID);
@ -175,7 +175,7 @@ public class ImportPayment extends SvrProcess
.append("OR i.I_isImported IS NULL").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Bank Account=" + no);
if (log.isLoggable(Level.INFO)) log.info("Bank Account=" + no);
//
sql = new StringBuilder("UPDATE I_Payment ")
.append("SET I_isImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Bank Account, ' ")
@ -194,7 +194,7 @@ public class ImportPayment extends SvrProcess
.append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Set Currency=" + no);
if (log.isLoggable(Level.INFO)) log.info("Set Currency=" + no);
//
sql = new StringBuilder("UPDATE I_Payment i ")
.append("SET C_Currency_ID=(SELECT C_Currency_ID FROM C_BankAccount WHERE C_BankAccount_ID=i.C_BankAccount_ID) ")
@ -202,7 +202,7 @@ public class ImportPayment extends SvrProcess
.append("AND i.ISO_Code IS NULL").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Set Currency=" + no);
if (log.isLoggable(Level.INFO)) log.info("Set Currency=" + no);
//
sql = new StringBuilder ("UPDATE I_Payment ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Currency,' ")
@ -220,7 +220,7 @@ public class ImportPayment extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Charge Amount=" + no);
if (log.isLoggable(Level.INFO)) log.info("Charge Amount=" + no);
//
sql = new StringBuilder("UPDATE I_Payment ")
.append("SET TaxAmt=0 ")
@ -228,7 +228,7 @@ public class ImportPayment extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Tax Amount=" + no);
if (log.isLoggable(Level.INFO)) log.info("Tax Amount=" + no);
//
sql = new StringBuilder("UPDATE I_Payment ")
.append("SET WriteOffAmt=0 ")
@ -236,7 +236,7 @@ public class ImportPayment extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("WriteOff Amount=" + no);
if (log.isLoggable(Level.INFO)) log.info("WriteOff Amount=" + no);
//
sql = new StringBuilder("UPDATE I_Payment ")
.append("SET DiscountAmt=0 ")
@ -244,7 +244,7 @@ public class ImportPayment extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Discount Amount=" + no);
if (log.isLoggable(Level.INFO)) log.info("Discount Amount=" + no);
//
// Set Date
@ -254,7 +254,7 @@ public class ImportPayment extends SvrProcess
.append("AND I_isImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Trx Date=" + no);
if (log.isLoggable(Level.INFO)) log.info("Trx Date=" + no);
sql = new StringBuilder("UPDATE I_Payment ")
.append("SET DateAcct=DateTrx ")
@ -262,7 +262,7 @@ public class ImportPayment extends SvrProcess
.append("AND I_isImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Acct Date=" + no);
if (log.isLoggable(Level.INFO)) log.info("Acct Date=" + no);
// Invoice
sql = new StringBuilder ("UPDATE I_Payment i ")
@ -316,7 +316,7 @@ public class ImportPayment extends SvrProcess
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Payment<->Invoice Mismatch=" + no);
if (log.isLoggable(Level.INFO)) log.info("Payment<->Invoice Mismatch=" + no);
// Check Payment<->BPartner combination
sql = new StringBuilder("UPDATE I_Payment ")
@ -331,7 +331,7 @@ public class ImportPayment extends SvrProcess
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Payment<->BPartner Mismatch=" + no);
if (log.isLoggable(Level.INFO)) log.info("Payment<->BPartner Mismatch=" + no);
// Check Invoice<->BPartner combination
sql = new StringBuilder("UPDATE I_Payment ")
@ -346,7 +346,7 @@ public class ImportPayment extends SvrProcess
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Invoice<->BPartner Mismatch=" + no);
if (log.isLoggable(Level.INFO)) log.info("Invoice<->BPartner Mismatch=" + no);
// Check Invoice.BPartner<->Payment.BPartner combination
sql = new StringBuilder("UPDATE I_Payment ")
@ -361,7 +361,7 @@ public class ImportPayment extends SvrProcess
.append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Invoice.BPartner<->Payment.BPartner Mismatch=" + no);
if (log.isLoggable(Level.INFO)) log.info("Invoice.BPartner<->Payment.BPartner Mismatch=" + no);
// TrxType
sql = new StringBuilder("UPDATE I_Payment ")
@ -370,7 +370,7 @@ public class ImportPayment extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("TrxType Default=" + no);
if (log.isLoggable(Level.INFO)) log.info("TrxType Default=" + no);
// TenderType
sql = new StringBuilder("UPDATE I_Payment ")
@ -379,7 +379,7 @@ public class ImportPayment extends SvrProcess
.append("AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("TenderType Default=" + no);
if (log.isLoggable(Level.INFO)) log.info("TenderType Default=" + no);
// Document Type
sql = new StringBuilder ("UPDATE I_Payment i ")
@ -427,7 +427,7 @@ public class ImportPayment extends SvrProcess
if (account == null || account.getC_BankAccount_ID() != imp.getC_BankAccount_ID())
{
account = MBankAccount.get (m_ctx, imp.getC_BankAccount_ID());
log.info("New Account=" + account.getAccountNo());
if (log.isLoggable(Level.INFO)) log.info("New Account=" + account.getAccountNo());
}
// New Payment

View File

@ -112,7 +112,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
sql = new StringBuilder ("DELETE I_Product ")
.append("WHERE I_IsImported='Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Delete Old Imported =" + no);
if (log.isLoggable(Level.INFO)) log.info("Delete Old Imported =" + no);
}
// Set Client, Org, IaActive, Created/Updated, ProductType
@ -129,7 +129,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append(" I_IsImported = 'N' ")
.append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Reset=" + no);
if (log.isLoggable(Level.INFO)) log.info("Reset=" + no);
ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_BEFORE_VALIDATE);
@ -140,7 +140,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE C_BPartner_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("BPartner=" + no);
if (log.isLoggable(Level.INFO)) log.info("BPartner=" + no);
//
sql = new StringBuilder ("UPDATE I_Product ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid BPartner,' ")
@ -159,7 +159,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE M_Product_ID IS NULL")
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Product Existing UPC=" + no);
if (log.isLoggable(Level.INFO)) log.info("Product Existing UPC=" + no);
// Value
sql = new StringBuilder ("UPDATE I_Product i ")
@ -168,7 +168,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE M_Product_ID IS NULL")
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Product Existing Value=" + no);
if (log.isLoggable(Level.INFO)) log.info("Product Existing Value=" + no);
// BP ProdNo
sql = new StringBuilder ("UPDATE I_Product i ")
@ -178,7 +178,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE M_Product_ID IS NULL")
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Product Existing Vendor ProductNo=" + no);
if (log.isLoggable(Level.INFO)) log.info("Product Existing Vendor ProductNo=" + no);
// Set Product Category
sql = new StringBuilder ("UPDATE I_Product ")
@ -196,7 +196,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE ProductCategory_Value IS NOT NULL AND M_Product_Category_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Set Category=" + no);
if (log.isLoggable(Level.INFO)) log.info("Set Category=" + no);
// Copy From Product if Import does not have value
@ -285,7 +285,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE C_UOM_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Set UOM=" + no);
if (log.isLoggable(Level.INFO)) log.info("Set UOM=" + no);
//
sql = new StringBuilder ("UPDATE I_Product ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid UOM, ' ")
@ -313,7 +313,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE C_Currency_ID IS NULL")
.append(" AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("doIt- Set Currency=" + no);
if (log.isLoggable(Level.INFO)) log.info("doIt- Set Currency=" + no);
//
sql = new StringBuilder ("UPDATE I_Product ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Currency,' ")
@ -370,7 +370,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
.append("WHERE C_BPartner_ID IS NOT NULL AND VendorProductNo IS NULL")
.append(" AND I_IsImported='N'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("VendorProductNo Set to Value=" + no);
if (log.isLoggable(Level.INFO)) log.info("VendorProductNo Set to Value=" + no);
//
sql = new StringBuilder ("UPDATE I_Product i ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=VendorProductNo not unique,' ")

View File

@ -61,7 +61,7 @@ public class InOutCreateConfirm extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("M_InOut_ID=" + p_M_InOut_ID + ", Type=" + p_ConfirmType);
if (log.isLoggable(Level.INFO)) log.info("M_InOut_ID=" + p_M_InOut_ID + ", Type=" + p_ConfirmType);
MInOut shipment = new MInOut (getCtx(), p_M_InOut_ID, get_TrxName());
if (shipment.get_ID() == 0)
throw new IllegalArgumentException("Not found M_InOut_ID=" + p_M_InOut_ID);

View File

@ -73,7 +73,7 @@ public class InOutCreateInvoice extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("M_InOut_ID=" + p_M_InOut_ID
if (log.isLoggable(Level.INFO)) log.info("M_InOut_ID=" + p_M_InOut_ID
+ ", M_PriceList_ID=" + p_M_PriceList_ID
+ ", InvoiceDocumentNo=" + p_InvoiceDocumentNo);
if (p_M_InOut_ID == 0)

View File

@ -135,7 +135,7 @@ public class InOutGenerate extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("Selection=" + p_Selection
if (log.isLoggable(Level.INFO)) log.info("Selection=" + p_Selection
+ ", M_Warehouse_ID=" + p_M_Warehouse_ID
+ ", C_BPartner_ID=" + p_C_BPartner_ID
+ ", Consolidate=" + p_ConsolidateDocument

View File

@ -105,7 +105,7 @@ public class InventoryCountCreate extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("M_Inventory_ID=" + p_M_Inventory_ID
if (log.isLoggable(Level.INFO)) log.info("M_Inventory_ID=" + p_M_Inventory_ID
+ ", M_Locator_ID=" + p_M_Locator_ID + ", LocatorValue=" + p_LocatorValue
+ ", ProductValue=" + p_ProductValue
+ ", M_Product_Category_ID=" + p_M_Product_Category_ID
@ -255,7 +255,7 @@ public class InventoryCountCreate extends SvrProcess
.append("SET QtyCount=0 ")
.append("WHERE M_Inventory_ID=").append(p_M_Inventory_ID);
int no = DB.executeUpdate(sql1.toString(), get_TrxName());
log.info("Set Cont to Zero=" + no);
if (log.isLoggable(Level.INFO)) log.info("Set Cont to Zero=" + no);
}
//

View File

@ -69,7 +69,7 @@ public class InventoryCountUpdate extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("M_Inventory_ID=" + p_M_Inventory_ID);
if (log.isLoggable(Level.INFO)) log.info("M_Inventory_ID=" + p_M_Inventory_ID);
MInventory inventory = new MInventory (getCtx(), p_M_Inventory_ID, get_TrxName());
if (inventory.get_ID() == 0)
throw new AdempiereSystemError ("Not found: M_Inventory_ID=" + p_M_Inventory_ID);
@ -84,10 +84,10 @@ public class InventoryCountUpdate extends SvrProcess
.append(" GROUP BY M_Product_ID, M_Locator_ID, M_AttributeSetInstance_ID ")
.append("HAVING COUNT(*) > 1)");
int multiple = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Multiple=" + multiple);
if (log.isLoggable(Level.INFO)) log.info("Multiple=" + multiple);
int delMA = MInventoryLineMA.deleteInventoryMA(p_M_Inventory_ID, get_TrxName());
log.info("DeletedMA=" + delMA);
if (log.isLoggable(Level.INFO)) log.info("DeletedMA=" + delMA);
// ASI
sql = new StringBuilder("UPDATE M_InventoryLine l ")
@ -103,7 +103,7 @@ public class InventoryCountUpdate extends SvrProcess
.append("WHERE s.M_Product_ID=l.M_Product_ID AND s.M_Locator_ID=l.M_Locator_ID")
.append(" AND s.M_AttributeSetInstance_ID=l.M_AttributeSetInstance_ID)");
int no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Update with ASI=" + no);
if (log.isLoggable(Level.INFO)) log.info("Update with ASI=" + no);
// No ASI
int noMA = updateWithMA();
@ -115,7 +115,7 @@ public class InventoryCountUpdate extends SvrProcess
.append("SET QtyCount=0 ")
.append("WHERE M_Inventory_ID=").append(p_M_Inventory_ID);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.info("Set Count to Zero=" + no);
if (log.isLoggable(Level.INFO)) log.info("Set Count to Zero=" + no);
}
if (multiple > 0){
@ -181,7 +181,7 @@ public class InventoryCountUpdate extends SvrProcess
pstmt = null;
}
//
log.info("#" + no);
if (log.isLoggable(Level.INFO)) log.info("#" + no);
return no;
} // updateWithMA

View File

@ -84,7 +84,7 @@ public class InventoryValue extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("M_Warehouse_ID=" + p_M_Warehouse_ID
if (log.isLoggable(Level.INFO)) log.info("M_Warehouse_ID=" + p_M_Warehouse_ID
+ ",C_Currency_ID=" + p_C_Currency_ID
+ ",DateValue=" + p_DateValue
+ ",M_PriceList_Version_ID=" + p_M_PriceList_Version_ID

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MInvoice;
import org.compiere.model.MInvoiceBatch;
import org.compiere.model.MInvoiceBatchLine;
@ -73,7 +75,7 @@ public class InvoiceBatchProcess extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_InvoiceBatch_ID=" + p_C_InvoiceBatch_ID + ", DocAction=" + p_DocAction);
if (log.isLoggable(Level.INFO)) log.info("C_InvoiceBatch_ID=" + p_C_InvoiceBatch_ID + ", DocAction=" + p_DocAction);
if (p_C_InvoiceBatch_ID == 0)
throw new AdempiereUserError("C_InvoiceBatch_ID = 0");
MInvoiceBatch batch = new MInvoiceBatch(getCtx(), p_C_InvoiceBatch_ID, get_TrxName());

View File

@ -74,7 +74,7 @@ public class InvoiceCreateInOut extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_Invoice_ID=" + p_C_Invoice_ID + ", M_Warehouse_ID=" + p_M_Warehouse_ID);
if (log.isLoggable(Level.INFO)) log.info("C_Invoice_ID=" + p_C_Invoice_ID + ", M_Warehouse_ID=" + p_M_Warehouse_ID);
if (p_C_Invoice_ID <= 0)
throw new FillMandatoryException("C_Invoice_ID");
if (p_M_Warehouse_ID == 0)

View File

@ -124,7 +124,7 @@ public class InvoiceGenerate extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("Selection=" + p_Selection + ", DateInvoiced=" + p_DateInvoiced
if (log.isLoggable(Level.INFO)) log.info("Selection=" + p_Selection + ", DateInvoiced=" + p_DateInvoiced
+ ", AD_Org_ID=" + p_AD_Org_ID + ", C_BPartner_ID=" + p_C_BPartner_ID
+ ", C_Order_ID=" + p_C_Order_ID + ", DocAction=" + p_docAction
+ ", Consolidate=" + p_ConsolidateDocument);

View File

@ -34,7 +34,6 @@ import org.compiere.model.MJournalLine;
import org.compiere.model.MOrg;
import org.compiere.model.Query;
import org.compiere.model.X_T_InvoiceGL;
import org.compiere.util.CLogMgt;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -104,7 +103,7 @@ public class InvoiceNGL extends SvrProcess
{
if (p_IsAllCurrencies)
p_C_Currency_ID = 0;
log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID
if (log.isLoggable(Level.INFO)) log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID
+ ",C_ConversionTypeReval_ID=" + p_C_ConversionTypeReval_ID
+ ",DateReval=" + p_DateReval
+ ", APAR=" + p_APAR
@ -120,7 +119,7 @@ public class InvoiceNGL extends SvrProcess
StringBuilder sql = new StringBuilder("DELETE T_InvoiceGL WHERE AD_PInstance_ID=").append(getAD_PInstance_ID());
int no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no > 0)
log.info("Deleted #" + no);
if (log.isLoggable(Level.INFO)) log.info("Deleted #" + no);
// Insert Trx
String dateStr = DB.TO_DATE(p_DateReval, true);
@ -158,12 +157,13 @@ public class InvoiceNGL extends SvrProcess
sql.append(" AND i.C_Currency_ID=").append(p_C_Currency_ID);
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
log.info("Inserted #" + no);
else if (CLogMgt.isLevelFiner())
log.warning("Inserted #" + no + " - " + sql);
else
log.warning("Inserted #" + no);
if (no != 0) {
if (log.isLoggable(Level.INFO)) log.info("Inserted #" + no);
} else if (log.isLoggable(Level.FINER)) {
log.warning("Inserted #" + no + " - " + sql);
} else {
log.warning("Inserted #" + no);
}
// Calculate Difference
sql = new StringBuilder("UPDATE T_InvoiceGL gl ")
@ -181,13 +181,13 @@ public class InvoiceNGL extends SvrProcess
.append("WHERE GrandTotal=OpenAmt AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no > 0)
log.info("Not Paid #" + no);
if (log.isLoggable(Level.INFO)) log.info("Not Paid #" + no);
sql = new StringBuilder("UPDATE T_InvoiceGL SET Percent = ROUND(OpenAmt*100/GrandTotal,6) ")
.append("WHERE GrandTotal<>OpenAmt AND GrandTotal <> 0 AND AD_PInstance_ID=").append(getAD_PInstance_ID());
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no > 0)
log.info("Partial Paid #" + no);
if (log.isLoggable(Level.INFO)) log.info("Partial Paid #" + no);
sql = new StringBuilder("UPDATE T_InvoiceGL SET AmtRevalDr = AmtRevalDr * Percent/100,")
.append(" AmtRevalCr = AmtRevalCr * Percent/100,")

View File

@ -55,7 +55,7 @@ public class InvoicePayScheduleValidate extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info ("C_InvoicePaySchedule_ID=" + getRecord_ID());
if (log.isLoggable(Level.INFO)) log.info ("C_InvoicePaySchedule_ID=" + getRecord_ID());
MInvoicePaySchedule[] schedule = MInvoicePaySchedule.getInvoicePaySchedule
(getCtx(), 0, getRecord_ID(), null);
if (schedule.length == 0)

View File

@ -108,7 +108,7 @@ public class InvoicePrint extends SvrProcess
// Need to have Template
if (p_EMailPDF && p_R_MailText_ID == 0)
throw new AdempiereUserError ("@NotFound@: @R_MailText_ID@");
log.info ("C_BPartner_ID=" + m_C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info ("C_BPartner_ID=" + m_C_BPartner_ID
+ ", C_Invoice_ID=" + m_C_Invoice_ID
+ ", EmailPDF=" + p_EMailPDF + ",R_MailText_ID=" + p_R_MailText_ID
+ ", DateInvoiced=" + m_dateInvoiced_From + "-" + m_dateInvoiced_To

View File

@ -120,7 +120,7 @@ public class InvoiceWriteOff extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_BPartner_ID=" + p_C_BPartner_ID
if (log.isLoggable(Level.INFO)) log.info("C_BPartner_ID=" + p_C_BPartner_ID
+ ", C_BP_Group_ID=" + p_C_BP_Group_ID
+ ", C_Invoice_ID=" + p_C_Invoice_ID
+ "; APAR=" + p_APAR

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MIssue;
import org.compiere.model.MSystem;
import org.compiere.util.AdempiereSystemError;
@ -46,7 +48,7 @@ public class IssueReport extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("AD_Issue_ID=" + m_AD_Issue_ID);
if (log.isLoggable(Level.INFO)) log.info("AD_Issue_ID=" + m_AD_Issue_ID);
if (!MSystem.get(getCtx()).isAutoErrorReport())
return "NOT reported - Enable Error Reporting in Window System";
//

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MLandedCost;
import org.compiere.util.AdempiereUserError;
@ -48,7 +50,7 @@ public class LandedCostDistribute extends SvrProcess
protected String doIt () throws Exception
{
m_lc = new MLandedCost (getCtx(), p_C_LandedCost_ID, get_TrxName());
log.info(m_lc.toString());
if (log.isLoggable(Level.INFO)) log.info(m_lc.toString());
if (m_lc.get_ID() == 0)
throw new AdempiereUserError("@NotFound@: @C_LandedCost_ID@ - " + p_C_LandedCost_ID);

View File

@ -76,10 +76,12 @@ public class LoadBankStatement extends SvrProcess
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
m_AD_Client_ID = Env.getAD_Client_ID(m_ctx);
log.info("AD_Client_ID=" + m_AD_Client_ID);
if (log.isLoggable(Level.INFO)) log.info("AD_Client_ID=" + m_AD_Client_ID);
m_AD_Org_ID = Env.getAD_Org_ID(m_ctx);
log.info("AD_Org_ID=" + m_AD_Org_ID);
log.info("C_BankStatementLoader_ID=" + m_C_BankStmtLoader_ID);
if (log.isLoggable(Level.INFO)){
log.info("AD_Org_ID=" + m_AD_Org_ID);
log.info("C_BankStatementLoader_ID=" + m_C_BankStmtLoader_ID);
}
} // prepare
@ -94,7 +96,7 @@ public class LoadBankStatement extends SvrProcess
String message = "@Error@";
m_controller = new MBankStatementLoader(m_ctx, m_C_BankStmtLoader_ID, fileName, get_TrxName());
log.info(m_controller.toString());
if (log.isLoggable(Level.INFO)) log.info(m_controller.toString());
if (m_controller == null || m_controller.get_ID() == 0)
log.log(Level.SEVERE, "Invalid Loader");
@ -105,7 +107,7 @@ public class LoadBankStatement extends SvrProcess
else
{
log.info("Imported=" + m_controller.getLoadCount());
if (log.isLoggable(Level.INFO)) log.info("Imported=" + m_controller.getLoadCount());
addLog (0, null, new BigDecimal (m_controller.getLoadCount()), "@Loaded@");
message = "@OK@";
}

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MMatchInv;
import org.compiere.util.AdempiereUserError;
@ -46,7 +48,7 @@ public class MatchInvDelete extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info ("M_MatchInv_ID=" + p_M_MatchInv_ID);
if (log.isLoggable(Level.INFO)) log.info ("M_MatchInv_ID=" + p_M_MatchInv_ID);
MMatchInv inv = new MMatchInv (getCtx(), p_M_MatchInv_ID, get_TrxName());
if (inv.get_ID() == 0)
throw new AdempiereUserError("@NotFound@ @M_MatchInv_ID@ " + p_M_MatchInv_ID);

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.process;
import java.util.logging.Level;
import org.compiere.model.MMatchPO;
import org.compiere.model.MOrderLine;
import org.compiere.util.AdempiereUserError;
@ -50,7 +52,7 @@ public class MatchPODelete extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info ("M_MatchPO_ID=" + p_M_MatchPO_ID);
if (log.isLoggable(Level.INFO)) log.info ("M_MatchPO_ID=" + p_M_MatchPO_ID);
MMatchPO po = new MMatchPO (getCtx(), p_M_MatchPO_ID, get_TrxName());
if (po.get_ID() == 0)
throw new AdempiereUserError("@NotFound@ @M_MatchPO_ID@ " + p_M_MatchPO_ID);

View File

@ -64,7 +64,7 @@ public class NoteDelete extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("doIt - AD_User_ID=" + p_AD_User_ID);
if (log.isLoggable(Level.INFO)) log.info("doIt - AD_User_ID=" + p_AD_User_ID);
StringBuilder sql = new StringBuilder("DELETE FROM AD_Note WHERE AD_BroadcastMessage_ID IS NULL AND AD_Client_ID=").append(getAD_Client_ID());
if (p_AD_User_ID > 0)

View File

@ -88,7 +88,7 @@ public class OrderBatchProcess extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_DocTypeTarget_ID=" + p_C_DocTypeTarget_ID + ", DocStatus=" + p_DocStatus
if (log.isLoggable(Level.INFO)) log.info("C_DocTypeTarget_ID=" + p_C_DocTypeTarget_ID + ", DocStatus=" + p_DocStatus
+ ", IsSelfService=" + p_IsSelfService + ", C_BPartner_ID=" + p_C_BPartner_ID
+ ", DateOrdered=" + p_DateOrdered_From + "->" + p_DateOrdered_To
+ ", DocAction=" + p_DocAction + ", IsDelivered=" + p_IsDelivered
@ -164,7 +164,7 @@ public class OrderBatchProcess extends SvrProcess
*/
private boolean process (MOrder order)
{
log.info(order.toString());
if (log.isLoggable(Level.INFO)) log.info(order.toString());
//
order.setDocAction(p_DocAction);
if (order.processIt(p_DocAction))

View File

@ -75,7 +75,7 @@ public class OrderLineCreateProduction extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_OrderLine_ID=" + p_C_OrderLine_ID );
if (log.isLoggable(Level.INFO)) log.info("C_OrderLine_ID=" + p_C_OrderLine_ID );
if (p_C_OrderLine_ID == 0)
throw new IllegalArgumentException("No OrderLine");
//

View File

@ -70,7 +70,7 @@ public class OrderLineCreateShipment extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("C_OrderLine_ID=" + p_C_OrderLine_ID );
if (log.isLoggable(Level.INFO)) log.info("C_OrderLine_ID=" + p_C_OrderLine_ID );
if (p_C_OrderLine_ID == 0)
throw new IllegalArgumentException("No OrderLine");
//

View File

@ -57,7 +57,7 @@ public class OrderOpen extends SvrProcess
*/
protected String doIt() throws AdempiereSystemError
{
log.info("doIt - Open C_Order_ID=" + p_C_Order_ID);
if (log.isLoggable(Level.INFO)) log.info("doIt - Open C_Order_ID=" + p_C_Order_ID);
if (p_C_Order_ID == 0)
return "";
//

View File

@ -95,7 +95,7 @@ public class OrderPOCreate extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("DateOrdered=" + p_DateOrdered_From + " - " + p_DateOrdered_To
if (log.isLoggable(Level.INFO)) log.info("DateOrdered=" + p_DateOrdered_From + " - " + p_DateOrdered_To
+ " - C_BPartner_ID=" + p_C_BPartner_ID + " - Vendor_ID=" + p_Vendor_ID
+ " - IsDropShip=" + p_IsDropShip + " - C_Order_ID=" + p_C_Order_ID);
if (p_C_Order_ID == 0
@ -175,7 +175,7 @@ public class OrderPOCreate extends SvrProcess
*/
private int createPOFromSO (MOrder so) throws Exception
{
log.info(so.toString());
if (log.isLoggable(Level.INFO)) log.info(so.toString());
MOrderLine[] soLines = so.getLines(true, null);
if (soLines == null || soLines.length == 0)
{

View File

@ -54,7 +54,7 @@ public class OrderPayScheduleValidate extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info ("C_OrderPaySchedule_ID=" + getRecord_ID());
if (log.isLoggable(Level.INFO)) log.info ("C_OrderPaySchedule_ID=" + getRecord_ID());
MOrderPaySchedule[] schedule = MOrderPaySchedule.getOrderPaySchedule
(getCtx(), 0, getRecord_ID(), null);
if (schedule.length == 0)

View File

@ -65,7 +65,7 @@ public class OrderRePrice extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info("C_Order_ID=" + p_C_Order_ID + ", C_Invoice_ID=" + p_C_Invoice_ID);
if (log.isLoggable(Level.INFO)) log.info("C_Order_ID=" + p_C_Order_ID + ", C_Invoice_ID=" + p_C_Invoice_ID);
if (p_C_Order_ID == 0 && p_C_Invoice_ID == 0)
throw new IllegalArgumentException("Nothing to do");

View File

@ -79,7 +79,7 @@ public class OrgOwnership extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info ("doIt - AD_Org_ID=" + p_AD_Org_ID);
if (log.isLoggable(Level.INFO)) log.info ("doIt - AD_Org_ID=" + p_AD_Org_ID);
if (p_AD_Org_ID < 0)
throw new IllegalArgumentException ("OrgOwnership - invalid AD_Org_ID=" + p_AD_Org_ID);
@ -104,7 +104,7 @@ public class OrgOwnership extends SvrProcess
*/
private String warehouseOwnership ()
{
log.info ("warehouseOwnership - M_Warehouse_ID=" + p_M_Warehouse_ID);
if (log.isLoggable(Level.INFO)) log.info ("warehouseOwnership - M_Warehouse_ID=" + p_M_Warehouse_ID);
if (p_AD_Org_ID == 0)
throw new IllegalArgumentException ("Warehouse - Org cannot be * (0)");
@ -169,7 +169,7 @@ public class OrgOwnership extends SvrProcess
*/
private String productOwnership ()
{
log.info ("productOwnership - M_Product_Category_ID=" + p_M_Product_Category_ID
if (log.isLoggable(Level.INFO)) log.info ("productOwnership - M_Product_Category_ID=" + p_M_Product_Category_ID
+ ", M_Product_ID=" + p_M_Product_ID);
StringBuilder set = new StringBuilder(" SET AD_Org_ID=").append(p_AD_Org_ID);
@ -216,7 +216,7 @@ public class OrgOwnership extends SvrProcess
*/
private String bPartnerOwnership ()
{
log.info ("bPartnerOwnership - C_BP_Group_ID=" + p_C_BP_Group_ID
if (log.isLoggable(Level.INFO)) log.info ("bPartnerOwnership - C_BP_Group_ID=" + p_C_BP_Group_ID
+ ", C_BPartner_ID=" + p_C_BPartner_ID);
StringBuilder set = new StringBuilder(" SET AD_Org_ID=").append(p_AD_Org_ID);

View File

@ -73,7 +73,7 @@ public class PackageCreate extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info("doIt - M_InOut_ID=" + p_M_InOut_ID + ", M_Shipper_ID=" + p_M_Shipper_ID);
if (log.isLoggable(Level.INFO)) log.info("doIt - M_InOut_ID=" + p_M_InOut_ID + ", M_Shipper_ID=" + p_M_Shipper_ID);
if (p_M_InOut_ID == 0)
throw new IllegalArgumentException("No Shipment");
if (p_M_Shipper_ID == 0)

View File

@ -70,7 +70,7 @@ public class PaySelectionCreateCheck extends SvrProcess
*/
protected String doIt () throws Exception
{
log.info ("C_PaySelection_ID=" + p_C_PaySelection_ID
if (log.isLoggable(Level.INFO)) log.info ("C_PaySelection_ID=" + p_C_PaySelection_ID
+ ", PaymentRule=" + p_PaymentRule);
MPaySelection psel = new MPaySelection (getCtx(), p_C_PaySelection_ID, get_TrxName());

View File

@ -95,7 +95,7 @@ public class PaySelectionCreateFrom extends SvrProcess
*/
protected String doIt() throws Exception
{
log.info ("C_PaySelection_ID=" + p_C_PaySelection_ID
if (log.isLoggable(Level.INFO)) log.info ("C_PaySelection_ID=" + p_C_PaySelection_ID
+ ", OnlyDiscount=" + p_OnlyDiscount + ", OnlyDue=" + p_OnlyDue
+ ", IncludeInDispute=" + p_IncludeInDispute
+ ", MatchRequirement=" + p_MatchRequirement

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