<?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.');

?>

<div>

  <?php include(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_invoices'.DS.'templates'.DS.'contact'.DS.'totals.php'); ?>

  <ul class="nav nav-tabs invoice-tabs">
    <li class="active"><a href="#form" data-toggle="tab" ><span class="glyphicon glyphicon-user"></span> <?php echo JText::_( 'DETAILS' ); ?></a></li>
    <li v-if="contact.id"><a href="#invoices" data-toggle="tab" ><span class="glyphicon glyphicon-list"></span> <?php echo JText::_( 'INVOICES' ); ?> <span class='badge'>{{ contact.invoices.length }}</span></a></li>
    <li v-if="contact.id"><a href="#quotes" data-toggle="tab" ><span class="glyphicon glyphicon-list"></span> <?php echo JText::_( 'QUOTES' ); ?> <span class='badge'>{{ contact.quotes.length }}</span></a></li>
    <li v-if="contact.id"><a href="#payments" data-toggle="tab" ><span class="glyphicon glyphicon-usd"></span> <?php echo JText::_( 'PAYMENTS' ); ?> <span class='badge'>{{ contact.payments.length }}</span></a></li>
  </ul>
  <div class="tab-content">
    <div class="tab-pane active" id="form"> <?php include(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_invoices'.DS.'templates'.DS.'contact'.DS.'edit.php'); ?> </div>
    <div class="tab-pane " id="invoices" v-if="contact.id"> <?php include(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_invoices'.DS.'templates'.DS.'contact'.DS.'invoices.php'); ?> </div>
    <div class="tab-pane " id="quotes" v-if="contact.id"> <?php include(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_invoices'.DS.'templates'.DS.'contact'.DS.'quotes.php'); ?> </div>
    <div class="tab-pane " id="payments" v-if="contact.id"> <?php include(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_invoices'.DS.'templates'.DS.'contact'.DS.'payments.php'); ?> </div>
  </div>

</div>
