src/Model/Modifiers/OrderModifier.php
public function modify($subtotal, $forcecalculation = false)
    {
        $order = $this->Order();
        $value = ($order->IsCart() || $forcecalculation) ? $this->value($subtotal) : $this->Amount;
        switch ($this->Type) {
            case 'Chargable':
                $subtotal += $value;
                break;
            case 'Deductable':
                $subtotal -= $value;
                break;
            case 'Ignored':
                break;
        }
        $value = round($value, Order::config()->rounding_precision);
        $this->Amount = $value;
        return $subtotal;
    }
public function modify($subtotal, $forcecalculation = false)
    {
        $order = $this->Order();
        $value = ($order->IsCart() || $forcecalculation) ? $this->value($subtotal) : $this->Amount;
        switch ($this->Type) {
            case 'Chargable':
                $subtotal += $value;
                break;
            case 'Deductable':
                $subtotal -= $value;
                break;
            case 'Ignored':
                break;
        }
        $value = round($value, Order::config()->rounding_precision);
        $this->Amount = $value;
        return $subtotal;
    }
Modifies the incoming value by adding,
subtracting or ignoring the value this modifier calculates.

Sets $this->Amount to the calculated value;

@param $subtotal - running total to be modified
@param $forcecalculation - force calculating the value, if order isn't in cart

@return $subtotal - updated subtotal