Class FulfillmentOperationHelper

java.lang.Object
com.broadleafcommerce.orderoperation.service.FulfillmentOperationHelper

public class FulfillmentOperationHelper extends Object
Contains methods to help with fulfillment operations, such as calculating specific totals for a fulfillment.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.money.MonetaryAmount
    calculateFulfillmentTaxableAmount(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
    Calculate the taxable portion of the OrderFulfillment#totalFulfillmentPrice.
    javax.money.MonetaryAmount
    calculateGrandTotal(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
    Calculate the fulfillment's OrderFulfillment.grandTotal.
    javax.money.MonetaryAmount
    calculateTotalFulfillmentPrice(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
    Calculate the fulfillment's OrderFulfillment#totalFulfillmentPrice.
    javax.money.MonetaryAmount
    sumAdjustments(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
    Sum up the fulfillment's OrderFulfillment.adjustments.
    javax.money.MonetaryAmount
    sumItemFulfillmentTotals(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
    Sum up the OrderFulfillmentItem.fulfillmentTotal across all of the fulfillment's items.
    javax.money.MonetaryAmount
    sumItemMerchandiseTotalTax(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
    Total up the OrderFulfillmentItem#merchandiseTotalTax for all the items in the fulfillment.
    javax.money.MonetaryAmount
    sumTaxDetailTaxableAmount(com.broadleafcommerce.order.client.domain.OrderFulfillmentItem item, javax.money.CurrencyUnit currencyUnit)
     
    javax.money.MonetaryAmount
    sumTaxDetailTaxCalculated(com.broadleafcommerce.order.client.domain.OrderFulfillmentItem item, javax.money.CurrencyUnit currencyUnit)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FulfillmentOperationHelper

      public FulfillmentOperationHelper()
  • Method Details

    • calculateTotalFulfillmentPrice

      public javax.money.MonetaryAmount calculateTotalFulfillmentPrice(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
      Calculate the fulfillment's OrderFulfillment#totalFulfillmentPrice.

      This is the OrderFulfillment.fulfillmentCharge plus the items' OrderFulfillmentItem.fulfillmentTotal, less the total of adjustment amounts from OrderFulfillment.adjustments.

      Parameters:
      fulfillment - the fulfillment to calculate the total fulfillment price for
      Returns:
      the total fulfillment price calculated for the fulfillment
    • sumAdjustments

      public javax.money.MonetaryAmount sumAdjustments(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
      Sum up the fulfillment's OrderFulfillment.adjustments.
      Parameters:
      fulfillment - the fulfillment to sum the adjustments for
      Returns:
      the sum of the fulfillment's adjustments
    • sumItemFulfillmentTotals

      public javax.money.MonetaryAmount sumItemFulfillmentTotals(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
      Sum up the OrderFulfillmentItem.fulfillmentTotal across all of the fulfillment's items.
      Parameters:
      fulfillment - the fulfillment to sum the item fulfillment total for
      Returns:
      the sum of the fulfillment's items' fulfillment totals
    • sumItemMerchandiseTotalTax

      public javax.money.MonetaryAmount sumItemMerchandiseTotalTax(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
      Total up the OrderFulfillmentItem#merchandiseTotalTax for all the items in the fulfillment.
      Parameters:
      fulfillment - the fulfillment to total the merchandise total tax for
      Returns:
      the total of all the merchandise tax for all items in the fulfillment
    • sumTaxDetailTaxableAmount

      public javax.money.MonetaryAmount sumTaxDetailTaxableAmount(com.broadleafcommerce.order.client.domain.OrderFulfillmentItem item, javax.money.CurrencyUnit currencyUnit)
    • sumTaxDetailTaxCalculated

      public javax.money.MonetaryAmount sumTaxDetailTaxCalculated(com.broadleafcommerce.order.client.domain.OrderFulfillmentItem item, javax.money.CurrencyUnit currencyUnit)
    • calculateFulfillmentTaxableAmount

      public javax.money.MonetaryAmount calculateFulfillmentTaxableAmount(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
      Calculate the taxable portion of the OrderFulfillment#totalFulfillmentPrice.
      Parameters:
      fulfillment - the fulfillment to calculate the taxable fulfillment price for
      Returns:
      the taxable amount of the fulfillment price
    • calculateGrandTotal

      public javax.money.MonetaryAmount calculateGrandTotal(com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment)
      Calculate the fulfillment's OrderFulfillment.grandTotal.

      This is the OrderFulfillment#totalFulfillmentPrice and OrderFulfillment#totalTax plus the items' OrderFulfillmentItem#merchandiseTotalAmount.

      Parameters:
      fulfillment - the fulfillment to calculate the grand total for
      Returns:
      the calculated grand total for the fulfillment