protected function calculateDiscountAmount(Mage_Sales_Model_Quote_Item_Abstract $item, Varien_Object $result, array $data)
    {
        /** @var float */
        $itemRowTotal = $item->getBaseRowTotal();
        /** @var float */
        $currentDiscountAmount = $result->getBaseDiscountAmount();
        /** @var float */
        $previousAppliedDiscountAmount = 0.00;
        foreach ($data as $discount) {
            $previousAppliedDiscountAmount += $discount['amount'];
        }
        /** @var float */
        $itemRowTotalWithAppliedPreviousDiscount = $itemRowTotal - $previousAppliedDiscountAmount;
        if ($itemRowTotalWithAppliedPreviousDiscount < 0) {
            $itemRowTotalWithAppliedPreviousDiscount = 0;
        }
        return $itemRowTotalWithAppliedPreviousDiscount < $currentDiscountAmount
            ? $itemRowTotalWithAppliedPreviousDiscount
            : $currentDiscountAmount;
    }