/**
  * Total all taxes associated with the current order.
  *
  * @return float
  */
 protected function totalTaxAmount()
 {
     $records = array_reduce($this->taxCollector->getTaxRecords(), function ($total, $item) {
         return $total + $item->getCalculatedTax();
     }, 0.0);
     $duties = array_reduce($this->taxCollector->getTaxDuties(), function ($total, $item) {
         return $total + $item->getAmount();
     }, 0.0);
     $fees = array_reduce($this->taxCollector->getTaxFees(), function ($total, $item) {
         return $total + $item->getAmount();
     }, 0.0);
     return $records + $duties + $fees;
 }
 /**
  * Check if there are any errors in the taxes.
  * @param  Mage_Sales_Model_Order_Address
  * @return bool
  */
 protected function _itemsHaveErrors()
 {
     foreach ($this->_taxCollector->getTaxDuties() as $duty) {
         if ($duty->getCalculationError()) {
             return true;
         }
     }
     return false;
 }