Examples of formatCurrency()


Examples of com.habitsoft.kiyaa.server.ServerLocalizedParser.formatCurrency()

public class TestServerLocalizedParser extends TestCase {

    public void testCurrencyFormatting() throws Exception {
        ServerLocalizedParser parser = new ServerLocalizedParser(Locale.US);
        GwtTestLocalizedParser.assertEquals("$1.23", parser.formatCurrency(123, "USD", false, false));
        GwtTestLocalizedParser.assertEquals(-123, parser.parseCurrency("($1.23)", "USD"));
        GwtTestLocalizedParser.assertEquals(123, parser.parseCurrency("$1.23", "USD"));
        /* None of these are supported - the parser is very strict
        assertEquals(123, parser.parseCurrency("$-1.23", "USD"));
        assertEquals(123, parser.parseCurrency("$1.23", "USD"));
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

      form.setShippingCustZipCode(address.getCustZipCode());
      form.setShippingCustPhoneNum(address.getCustPhoneNum());
      form.setShippingCustFaxNum(address.getCustFaxNum());
    }
   
    form.setPriceTotal(numberFormatter.formatCurrency(orderEngine.getOrderSubTotal()));
    form.setShippingTotal(numberFormatter.formatCurrency(orderEngine.getOrderShippingTotal()));
    form.setTaxTotal(numberFormatter.formatCurrency(orderEngine.getOrderTaxTotal()));
    form.setOrderTotal(numberFormatter.formatCurrency(header.getOrderTotal()));
    if (header.getPaymentGatewayProvider() != null) {
      form.setPaymentGateway(header.getPaymentGatewayProvider());
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

      form.setShippingCustPhoneNum(address.getCustPhoneNum());
      form.setShippingCustFaxNum(address.getCustFaxNum());
    }
   
    form.setPriceTotal(numberFormatter.formatCurrency(orderEngine.getOrderSubTotal()));
    form.setShippingTotal(numberFormatter.formatCurrency(orderEngine.getOrderShippingTotal()));
    form.setTaxTotal(numberFormatter.formatCurrency(orderEngine.getOrderTaxTotal()));
    form.setOrderTotal(numberFormatter.formatCurrency(header.getOrderTotal()));
    if (header.getPaymentGatewayProvider() != null) {
      form.setPaymentGateway(header.getPaymentGatewayProvider());
      if (header.getPaymentGatewayProvider().equals(PayPalEngine.class.getSimpleName())) {
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

      form.setShippingCustFaxNum(address.getCustFaxNum());
    }
   
    form.setPriceTotal(numberFormatter.formatCurrency(orderEngine.getOrderSubTotal()));
    form.setShippingTotal(numberFormatter.formatCurrency(orderEngine.getOrderShippingTotal()));
    form.setTaxTotal(numberFormatter.formatCurrency(orderEngine.getOrderTaxTotal()));
    form.setOrderTotal(numberFormatter.formatCurrency(header.getOrderTotal()));
    if (header.getPaymentGatewayProvider() != null) {
      form.setPaymentGateway(header.getPaymentGatewayProvider());
      if (header.getPaymentGatewayProvider().equals(PayPalEngine.class.getSimpleName())) {
        form.setPayPal(true);
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

    }
   
    form.setPriceTotal(numberFormatter.formatCurrency(orderEngine.getOrderSubTotal()));
    form.setShippingTotal(numberFormatter.formatCurrency(orderEngine.getOrderShippingTotal()));
    form.setTaxTotal(numberFormatter.formatCurrency(orderEngine.getOrderTaxTotal()));
    form.setOrderTotal(numberFormatter.formatCurrency(header.getOrderTotal()));
    if (header.getPaymentGatewayProvider() != null) {
      form.setPaymentGateway(header.getPaymentGatewayProvider());
      if (header.getPaymentGatewayProvider().equals(PayPalEngine.class.getSimpleName())) {
        form.setPayPal(true);
      }
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

    Vector<OrderTaxForm> orderTaxes = new Vector<OrderTaxForm>();
    while (iterator.hasNext()) {
      OrderDetailTax orderDetailTax = (OrderDetailTax) iterator.next();
      OrderTaxForm orderTaxForm = new OrderTaxForm();
      orderTaxForm.setTaxName(orderDetailTax.getTaxName());
      orderTaxForm.setTaxAmount(numberFormatter.formatCurrency(orderDetailTax.getTaxAmount()));
      orderTaxes.add(orderTaxForm);
    }
    form.setOrderTaxes(orderTaxes);
   
   
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

      }
     
      dform.setItemNum(detail.getItemNum());
      dform.setItemUpcCd(detail.getItemUpcCd());
      dform.setItemTierQty(numberFormatter.formatNumber(detail.getItemTierQty()));
      dform.setItemTierPrice(numberFormatter.formatCurrency(detail.getItemTierPrice()));

      String priceDisplay = numberFormatter.formatCurrency(detail.getItemTierPrice());
      if (detail.getItemTierQty() > 1) {
        priceDisplay = numberFormatter.formatNumber(detail.getItemTierQty()) + " / " + numberFormatter.formatCurrency(detail.getItemTierPrice());
      }
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

      dform.setItemNum(detail.getItemNum());
      dform.setItemUpcCd(detail.getItemUpcCd());
      dform.setItemTierQty(numberFormatter.formatNumber(detail.getItemTierQty()));
      dform.setItemTierPrice(numberFormatter.formatCurrency(detail.getItemTierPrice()));

      String priceDisplay = numberFormatter.formatCurrency(detail.getItemTierPrice());
      if (detail.getItemTierQty() > 1) {
        priceDisplay = numberFormatter.formatNumber(detail.getItemTierQty()) + " / " + numberFormatter.formatCurrency(detail.getItemTierPrice());
      }
      dform.setPriceDisplay(priceDisplay);
     
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

      dform.setItemTierQty(numberFormatter.formatNumber(detail.getItemTierQty()));
      dform.setItemTierPrice(numberFormatter.formatCurrency(detail.getItemTierPrice()));

      String priceDisplay = numberFormatter.formatCurrency(detail.getItemTierPrice());
      if (detail.getItemTierQty() > 1) {
        priceDisplay = numberFormatter.formatNumber(detail.getItemTierQty()) + " / " + numberFormatter.formatCurrency(detail.getItemTierPrice());
      }
      dform.setPriceDisplay(priceDisplay);
     
      dform.setItemOrderQty(numberFormatter.formatNumber(detail.getItemOrderQty()));
      dform.setItemSubTotal(numberFormatter.formatCurrency(detail.getItemDetailAmount()));
View Full Code Here

Examples of com.jada.content.Formatter.formatCurrency()

        priceDisplay = numberFormatter.formatNumber(detail.getItemTierQty()) + " / " + numberFormatter.formatCurrency(detail.getItemTierPrice());
      }
      dform.setPriceDisplay(priceDisplay);
     
      dform.setItemOrderQty(numberFormatter.formatNumber(detail.getItemOrderQty()));
      dform.setItemSubTotal(numberFormatter.formatCurrency(detail.getItemDetailAmount()));
     
      int itemInvoiceQty = 0;
      for (InvoiceDetail invoiceDetail : detail.getInvoiceDetails()) {
        itemInvoiceQty += invoiceDetail.getItemInvoiceQty();
      }
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.