Module: SolidusLegacyPromotions::SpreeShipmentPatch

Defined in:
app/patches/models/solidus_legacy_promotions/spree_shipment_patch.rb

Instance Method Summary collapse

Instance Method Details

#total_before_taxBigDecimal

Returns the amount of this item, taking into consideration all non-tax eligible adjustments.

Returns:

  • (BigDecimal)

    the amount of this item, taking into consideration all non-tax eligible adjustments.



7
8
9
# File 'app/patches/models/solidus_legacy_promotions/spree_shipment_patch.rb', line 7

def total_before_tax
  amount + adjustments.select { |adjustment| !adjustment.tax? && adjustment.eligible? }.sum(&:amount)
end