Examples of Currency


Examples of org.jquantlib.currencies.Currency

    QL.validateExperimentalMode();

    iborIndex = new IborIndex(
        "no-fix", // never take fixing into account
        new Period(monthsToEnd - monthsToStart, TimeUnit.Months),
        fixingDays, new Currency(), calendar, convention, endOfMonth,
        dayCounter, this.termStructureHandle);

    initializeDates();
  }
View Full Code Here

Examples of org.jquantlib.currencies.Currency

    QL.validateExperimentalMode();
   
    iborIndex = new IborIndex(
        "no-fix", // never take fixing into account
        i.tenor(), i.fixingDays(), new Currency(), i.fixingCalendar(),
        i.businessDayConvention(), i.endOfMonth(), i.dayCounter(),
        this.termStructureHandle);

    initializeDates();
  }
View Full Code Here

Examples of org.jscience.economics.money.Currency

      if (!rates.base.equalsIgnoreCase("usd")) {
        log.warning("We assume base rate of USD, but it is " + rates.base);
      }
      final Map<String, Currency> currencies = Maps.newHashMap();
      for (final Entry<String, Double> e : rates.rates.entrySet()) {
        final Currency currency = new Currency(e.getKey());
        currency.setExchangeRate(1.0 / e.getValue());
        currencies.put(e.getKey(), currency);
      }

      currenciesByCode = currencies;
    } catch (final Exception e) {
View Full Code Here

Examples of org.nightlabs.jfire.accounting.Currency

    try {
      RecurringTrader recurringTrader = RecurringTrader.getRecurringTrader(pm);
      Trader trader = Trader.getTrader(pm);

      pm.getExtent(Currency.class);
      Currency currency = (Currency)pm.getObjectById(currencyID);

      pm.getExtent(LegalEntity.class);
      LegalEntity customer = (LegalEntity) pm.getObjectById(customerID);

      RecurringOrder order = recurringTrader.createRecurringOrder(trader.getMandator(), customer, orderIDPrefix, currency);
View Full Code Here

Examples of org.openbravo.model.common.currency.Currency

    setBigBazaarAdminContext();
    final OBCriteria<Currency> obc = OBDal.getInstance().createCriteria(Currency.class);
    obc.add(Expression.eq(Currency.PROPERTY_ISOCODE, "TE2"));
    final List<Currency> cs = obc.list();
    if (cs.size() == 0) {
      final Currency c = OBProvider.getInstance().get(Currency.class);
      c.setSymbol("TE2");
      c.setDescription("test currency");
      c.setISOCode("TE2");
      c.setPricePrecision((long) 5);
      c.setStandardPrecision((long) 6);
      c.setCostingPrecision((long) 4);
      OBDal.getInstance().save(c);
    }
  }
View Full Code Here

Examples of quickfix.field.Currency

    public static Price toFixPrice(Money money) {
        return new Price(money.getAmount().doubleValue());
    }

    public static Currency toFixCurrency(Money money) {
        return new Currency(money.getCurrency().getCurrencyCode());
    }
View Full Code Here

Examples of util.Currency

        if (bookId != null) {

            // and the information about the book
            try {
               BookDetails bd = bookDB.getBookDetails(bookId);
               Currency c = new Currency();
               c.setLocale(request.getLocale());
               c.setAmount(bd.getPrice());
     

               //Print out the information obtained
               out.println("<h2>" + bd.getTitle() + "</h2>" +
                           "&nbsp; By <em>" + bd.getFirstName() + " " +
                           bd.getSurname() + "</em> &nbsp; &nbsp; " +
                           "(" + bd.getYear() + ")<br> &nbsp; <br>" +
                           "<h4>Here's what the critics say: </h4>" +
                           "<blockquote>" + bd.getDescription() +
                           "</blockquote>" +
                           "<h4>Our price: " + c.getFormat() + "</h4>" +
                           "<p><strong><a href=\"" +
                           response.encodeURL(request.getContextPath() + "/catalog?bookId=" + bookId) +
                           "\"> Add To Your Shopping Cart</a>&nbsp;&nbsp;&nbsp;" +
                           "<a href=\"" +
                           response.encodeURL(request.getContextPath() + "/catalog") + "\">Continue Shopping</a></p></strong>");
View Full Code Here

Examples of util.Currency

                        "<th align=left>Title</TH>" +
                        "<th align=left>Price</TH>" +
                        "</tr>");
           
            Iterator i = cart.getItems().iterator();
             Currency c = new Currency();
             c.setLocale(request.getLocale());
             while (i.hasNext()) {
                ShoppingCartItem item = (ShoppingCartItem) i.next();
                bd = (BookDetails) item.getItem();
                c.setAmount(bd.getPrice());
               
                out.println("<tr>" +
                            "<td align=\"right\" bgcolor=\"#ffffff\">" +
                            item.getQuantity() +
                            "</td>" +

                            "<td bgcolor=\"#ffffaa\">" +
                            "<strong><a href=\"" +
                            response.encodeURL(request.getContextPath() + "/bookdetails?bookId=" + bd.getBookId()) +
                            "\">" + bd.getTitle() + "</a></strong>" +
                            "</td>" +

                            "<td bgcolor=\"#ffffaa\" align=\"right\">" +
                            c.getFormat() +
                            "</td>" +

                            "<td bgcolor=\"#ffffaa\">" +
                            "<strong>" +
                            "<a href=\"" +
                            response.encodeURL(request.getContextPath() + "/showcart?Remove=" + bd.getBookId()) +
                            "\">Remove Item</a></strong>" +
                            "</td></tr>");
            }

            c.setAmount(cart.getTotal());
             // Print the total at the bottom of the table
            out.println("<tr><td colspan=\"5\" bgcolor=\"#ffffff\">" +
                        "<br></td></tr>" +
                          "<tr>" +
                        "<td colspan=\"2\" align=\"right\"" +
                        "bgcolor=\"#ffffff\">" +
                        "Total:</td>" +
                        "<td bgcolor=\"#ffffaa\" align=\"right\">" +
                        c.getFormat() + "</td>" +
                        "</td><td><br></td></tr></table>");

          
            // Where to go and what to do next
            out.println("<p> &nbsp; <p><strong><a href=\"" +
View Full Code Here

Examples of util.Currency

         
         try {
               Collection coll = bookDB.getBooks();

               Iterator i = coll.iterator();
               Currency curr = new Currency();
               curr.setLocale(request.getLocale());
            while (i.hasNext()) {
                     BookDetails book = (BookDetails)i.next();
                     bookId = book.getBookId();
                     curr.setAmount(book.getPrice());
     
               //Print out info on each book in its own two rows
               out.println("<tr>" +

                           "<td bgcolor=\"#ffffaa\">" +
                           "<a href=\"" +
                           response.encodeURL(request.getContextPath() + "/bookdetails?bookId=" + bookId) +
                           "\"> <strong>" + book.getTitle() +
                           "&nbsp; </strong></a></td>" +

                           "<td bgcolor=\"#ffffaa\" rowspan=2>" +
                           curr.getFormat() +
                           "&nbsp; </td>" +

                           "<td bgcolor=\"#ffffaa\" rowspan=2>" +
                           "<a href=\"" +
                           response.encodeURL(request.getContextPath() + "/catalog?bookId=" + bookId)
View Full Code Here

Examples of util.Currency

        }
       
   // set content-type header before accessing Writer
       response.setContentType("text/html");
          PrintWriter out = response.getWriter();
       Currency c = new Currency();
       c.setLocale(request.getLocale());
       c.setAmount(cart.getTotal());

   // then write the data of the response
        out.println("<html>" +
                    "<head><title> Cashier </title></head>");

        // Get the dispatcher; it gets the banner to the user
        RequestDispatcher dispatcher =
               getServletContext().getRequestDispatcher("/banner");
                                      
            if (dispatcher != null)
               dispatcher.include(request, response);
              
       // Print out the total and the form for the user
        out.println("<p>Your total purchase amount is: " +
                    "<strong>" + c.getFormat() + "</strong>" +
                    "<p>To purchase the items in your shopping cart," +
                    " please provide us with the following information:" +

                    "<form action=\"" +
                    response.encodeURL(request.getContextPath() + "/receipt") +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.