/**
  * This method returns a list of line items with the residual amount to refund.
  *
  * @return Customweb_Payment_Authorization_IInvoiceItem[]
  */
 public function getNonRefundedLineItems()
 {
     $resultingItems = $this->getCapturedLineItems();
     foreach ($this->getRefunds() as $refund) {
         $items = $refund->getRefundItems();
         if ($items === null) {
             $items = Customweb_Util_Invoice::getItemsByReductionAmount($resultingItems, $refund->getAmount(), $this->getCurrencyCode());
         }
         $resultingItems = Customweb_Util_Invoice::substractLineItems($resultingItems, $items);
     }
     return $resultingItems;
 }