What contains each field of the order and its entries? I answer this question often, so here is the explanation.

 

Contents of the fields of the abstractOrder

Abstract Order Entry

  • basePrice: Price per unit of product
  • quantity
  • discountsValues: List of discounts per entry. Each of them has an appliedValue with the amount which was effectively discounted.
  • taxValues: List of taxes per entry. Each of them has an appliedValue with the amount for that entry.
  • totalPrice (= basePrice * quantity - discounts per entry) It doesn't include taxes.

Abstract Order

  • deliveryCost: Amount of the delivery costs without taxes.
  • subTotal: Price of the entries without taxes and order discounts. It includes the discounts per entry.
  • totalPrice: Total of the order including order discounts, delivery costs, payment costs and discounts per entry. It is called the net price of the order.
  • totalTax: Sum of all applied taxes to the order.
  • totalTaxValues: List of taxes applied to the order. It includes the taxes values which saved in the entries. Each of them has an appliedValue with the amount for that entry, delivery costs, order discount or payment cost.
  • totalGrossPrice (= totalPrice + totalTax): It is the total of the order including taxes and everything else. It is what the customer is going to pay.
  • totalDiscounts: Sum of the order discounts without taxes. It doesn't include the discounts per entry.