<?php

/*------------------------------------------------------------------------
# com_invoices - Invoice Manager for Joomla
# ------------------------------------------------------------------------
# author				Germinal Camps
# copyright 			Copyright (C) 2012 - 2016 JoomlaThat.com. All Rights Reserved.
# @license				http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: 			http://www.joomlathat.com
# Technical Support:	Forum - http://www.joomlathat.com/support
-------------------------------------------------------------------------*/

//no direct access
defined('_JEXEC') or die('Restricted access.');

jimport( 'joomla.application.component.view');

class InvoicesViewPayment extends JViewLegacy
{
	public $_path = array(
		'template' => array()
	);
	
	function display($tpl = null)
	{
		$mainframe = JFactory::getApplication();
		
		$pathway	= $mainframe->getPathway();
		$document	= JFactory::getDocument();
		$uri	= JFactory::getURI();
		
		jimport('joomla.html.pane');
		
		$payment		= $this->get( 'Data');
		
		$params = JComponentHelper::getParams( 'com_invoices' );
		
		$this->assignRef('payment',		$payment);
		
		$this->assignRef('params',		$params);
		
		if($payment->id){
			//creem els breadcrumbs
			
			//$pathway->addItem($item->name, 'index.php?option=com_finances&view=item&id='.$item->id);
			
			//creem el titol
			
			$document->setTitle( $payment->invoice_num );
			
		}
		
		//$sliders = JPane::getInstance( 'tabs' );		
		//$this->assign('sliders', $sliders);
			
		//cridem els CSS
		$document->addStyleSheet($uri->base() . 'components/com_invoices/assets/styles.css');
		
		parent::display($tpl);
	}

}
?>
