Package org.openbravo.erpCommon.utility

Examples of org.openbravo.erpCommon.utility.OBError


    String c_Currency_To_ID = Utility.getContext(this, vars, "$C_Currency_ID", "");
    // Checks if there is a conversion rate for each of the transactions of
    // the report
    String strConvRateErrorMsg = "";
    OBError myMessage = null;
    myMessage = new OBError();

    if (strDateexpense.equals("")) {
      strDateexpense = SEExpenseAmountData.selectReportDate(this, strTimeExpenseId).equals("") ? DateTimeData
          .today(this)
          : SEExpenseAmountData.selectReportDate(this, strTimeExpenseId);
    }

    BigDecimal amount = null;
    if (!strExpenseAmt.equals("")) {
      amount = new BigDecimal(strExpenseAmt);
    } else {
      amount = new BigDecimal(0.0);
    }
    String strPrecision = "0";
    if (!strcCurrencyId.equals("")) {
      strPrecision = SEExpenseAmountData.selectPrecision(this, strcCurrencyId);
    }
    int stdPrecision = Integer.valueOf(strPrecision).intValue();
    if (amount.scale() > stdPrecision)
      amount = amount.setScale(stdPrecision, BigDecimal.ROUND_HALF_UP);

    String convertedAmount = strExpenseAmt;
    BigDecimal convAmount = amount;

    if (!strcCurrencyId.equals(c_Currency_To_ID)) {
      String strPrecisionConv = "0";
      if (!c_Currency_To_ID.equals("")) {
        strPrecisionConv = SEExpenseAmountData.selectPrecision(this, c_Currency_To_ID);
      }
      int stdPrecisionConv = Integer.valueOf(strPrecisionConv).intValue();
      try {
        convertedAmount = SEExpenseAmountData.selectConvertedAmt(this, strExpenseAmt,
            strcCurrencyId, c_Currency_To_ID, strDateexpense, vars.getClient(), vars.getOrg());
      } catch (ServletException e) {
        convertedAmount = "";
        myMessage = Utility.translateError(this, vars, vars.getLanguage(), e.getMessage());
        strConvRateErrorMsg = myMessage.getMessage();
        log4j.warn("Currency does not exist. Exception:" + e);
      }
      if (!convertedAmount.equals("")) {
        convAmount = new BigDecimal(convertedAmount);
      } else {
View Full Code Here


      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("DriverReport");
      vars.removeMessage("DriverReport");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
View Full Code Here

    } catch (Exception ex) {
      throw new ServletException(ex);
    }

    {
      OBError myMessage = vars.getMessage("ReportStandardCostJR");
      vars.removeMessage("ReportStandardCostJR");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
    xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
View Full Code Here

      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("ReportInventory");
      vars.removeMessage("ReportInventory");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    // xmlDocument.setData("structure",
    // WarehouseComboData.selectFilter(this, Utility.getContext(this, vars,
View Full Code Here

      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("GroupedOrderReport");
      vars.removeMessage("GroupedOrderReport");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
View Full Code Here

    XmlDocument xmlDocument = null;
    ReportExpenseData[] data1 = null;
    // Checks if there is a conversion rate for each of the transactions of
    // the report
    String strConvRateErrorMsg = "";
    OBError myMessage = null;
    myMessage = new OBError();

    if (vars.commandIn("DEFAULT") && strDateFrom.equals("") && strDateTo.equals("")
        && strcBpartnerId.equals("") && strPartner.equals("")) {
      printPageDataSheet(response, vars, strDateFrom, strDateTo, strcBpartnerId, strPartner,
          strProject, strExpense, strCurrencyId);
    } else {
      String strBaseCurrencyId = Utility.stringBaseCurrencyId(this, vars.getClient());
      try {
        data1 = ReportExpenseData.select(this, strCurrencyId, strBaseCurrencyId,
            vars.getLanguage(), Utility.getContext(this, vars, "#User_Client", "ReportExpense"),
            Utility.getContext(this, vars, "#AccessibleOrgTree", "ReportExpense"), strDateFrom,
            DateTimeData.nDaysAfter(this, strDateTo, "1"), strcBpartnerId, strPartner, strProject,
            (strExpense.equals("time") ? "Y" : ""), (strExpense.equals("expense") ? "N" : ""));
      } catch (ServletException ex) {
        myMessage = Utility.translateError(this, vars, vars.getLanguage(), ex.getMessage());
      }
    }
    strConvRateErrorMsg = myMessage.getMessage();
    // If a conversion rate is missing for a certain transaction, an error
    // message window pops-up.
    if (!strConvRateErrorMsg.equals("") && strConvRateErrorMsg != null) {
      advisePopUp(request, response, "ERROR", Utility.messageBD(this, "NoConversionRateHeader",
          vars.getLanguage()), strConvRateErrorMsg);
View Full Code Here

      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("ReportExpense");
      vars.removeMessage("ReportExpense");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
View Full Code Here

      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("PayrollReport");
      vars.removeMessage("PayrollReport");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
View Full Code Here

      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("IncomeReport");
      vars.removeMessage("IncomeReport");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
View Full Code Here

      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
    } catch (Exception ex) {
      throw new ServletException(ex);
    }
    {
      OBError myMessage = vars.getMessage("RentalOrder");
      vars.removeMessage("RentalOrder");
      if (myMessage != null) {
        xmlDocument.setParameter("messageType", myMessage.getType());
        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
      }
    }

    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
View Full Code Here

TOP

Related Classes of org.openbravo.erpCommon.utility.OBError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.