Package org.joda.money

Examples of org.joda.money.BigMoney.plus()


    // TODO Allow for currency conversion
    BigMoney deliveryTotal = MoneyUtils.parseBitcoin("BTC 0.0000");
    BigMoney taxTotal = MoneyUtils.parseBitcoin("BTC 0.0000");
    for (DeliveryItem deliveryItem: delivery.getDeliveryItems()) {
      deliveryTotal = deliveryTotal.plus(deliveryItem.getPriceSubtotal());
      taxTotal = taxTotal.plus(deliveryItem.getTaxSubtotal());
    }

    // Create top-level resource
    Representation deliveryRepresentation = new DefaultRepresentationFactory()
      .newRepresentation(basePath)
View Full Code Here


    // TODO Allow for currency conversion
    BigMoney purchaseOrderTotal = MoneyUtils.parseBitcoin("BTC 0.0000");
    BigMoney taxTotal = MoneyUtils.parseBitcoin("BTC 0.0000");
    for (PurchaseOrderItem purchaseOrderItem: purchaseOrder.getPurchaseOrderItems()) {
      purchaseOrderTotal = purchaseOrderTotal.plus(purchaseOrderItem.getPriceSubtotal());
      taxTotal = taxTotal.plus(purchaseOrderItem.getTaxSubtotal());
    }

    // Create top-level resource
    Representation purchaseOrderRepresentation = new DefaultRepresentationFactory()
      .newRepresentation(basePath)
View Full Code Here

    // TODO Allow for currency conversion
    BigMoney cartTotal = MoneyUtils.parseBitcoin("BTC 0.0000");
    BigMoney taxTotal = MoneyUtils.parseBitcoin("BTC 0.0000");
    for (CartItem cartItem : cart.getCartItems()) {
      cartTotal = cartTotal.plus(cartItem.getPriceSubtotal());
      taxTotal = taxTotal.plus(cartItem.getTaxSubtotal());
    }

    // Create top-level resource
    Representation cartRepresentation= new DefaultRepresentationFactory()
      .newRepresentation(basePath)
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.