<?php
/**
 * @version		3.0.0
 * @package		JomLand TicketCenter
 * @copyright	Copyright (C) 2010 JomLand.com. All rights reserved.
 * @link 		www.jomland.com
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
$pparams = new JLTicketCenterHelperSetup;
if ($params->get('logo')){
	$logo = JHtml::image(JURI::root().'images/stories/'.$params->get('logo'),$config->get( 'config.sitename'));
	//echo JHtml::link(JURI::base(),$logo);
	$logo = JHtml::link(JURI::base(),$logo);
}else{
	$logo ='';
}
?>
<table width="100%" cellspacing="0" cellpadding="0" border="0"
	align="center">
	<tr>
		<td align="right"><?php echo $logo;?></td>
	</tr>
	<tr>
		<td><?php echo JText::sprintf("JLTC_ORDER_MAIL_HELLO",$order['first_name'].' '.$order['last_name'])?>
			<br> <?php echo JText::sprintf('JLTC_EMAIL_ORDER_MASSAGE', $config->get( 'config.sitename'))?>.
			<br> <br> <strong><?php echo JText::sprintf('JLTC_EMAIL_ORDER_NUMBER',$order['order_id']);?>
		</strong> <br> <u><?php echo JText::_('JLTC_EMAIL_ORDER_DETIALS');?> </u>
			<br>
		</td>
	</tr>
</table>

<table width="100%" cellspacing="0" cellpadding="0" border="0"
	align="left">
	<tr>
		<th><?php echo JText::_('JLTC_EMAIL_ORDER_EVENT_NAME');?></th>
		<th><?php echo JText::_('JLTC_EMAIL_ORDER_EVENT_DATE');?></th>
		<th><?php echo JText::_('JLTC_EMAIL_ORDER_EVENT_LOCATION');?></th>
		<th><?php echo JText::_('JLTC_EMAIL_ORDER_EVENT_QUANTITY');?></th>
		<th style="padding: 0 5px;"><?php echo JText::_('JLTC_EMAIL_ORDER_EVENT_TICKET_PRICE');?></th>
	</tr>

	<?php foreach ($order_lines as $line){?>
	<tr>
		<td><?php echo $line->event_name;?></td>
		<td><?php echo JHTML::_('date',$line->event_date, JText::_('DATE_FORMAT_LC4').' H:i',null);?>
		</td>
		<td><?php echo $line->venue_name .' '.$line->city_name.' '.$line->state_name.' '.$line->country;?>
		</td>
		<td><?php if($line->ticket_desc>''){ echo $line->ticket_desc.' - ';} ?>
		<?php echo $line->quantity;?>
		</td>
		<td><?php if($line->ticket_price>0){echo $params->get('currency_symbol').' '.$line->ticket_price;}?>
		</td>
		<td align="center"><?php if($line->ticket_price>0){echo $params->get('currency_symbol').' '.$line->ticket_price * $line->quantity;}?>
		</td>
	</tr>
	<?php }?>

	<?php if($order['commission']>0){?>
	<tr>
		<td colspan="5" align="right"><?php echo  JText::_('JLTC_COMMISSION');?>
		</td>
		<td colspan="1" align="center"><?php echo $params->get('currency_symbol').' '.number_format($order['commission'],2);?>
		</td>
	</tr>
	<?php }?>

	<?php if($order['delivery_rate']>0){?>
	<tr>
		<td colspan="5" align="right"><?php echo  JText::_('DELIVERY_METHOD');?>
		</td>
		<td colspan="1" align="center"><?php echo $params->get('currency_symbol').' '.$order['delivery_rate'];?>
		</td>
	</tr>
	<?php }?>

	<?php if($order['tax']>0){?>
	<tr>
		<td colspan="5" align="right"><?php echo  JText::_('TAX');?></td>
		<td colspan="1" align="center"><?php echo $params->get('currency_symbol').' '.$order['tax'];?>
		</td>
	</tr>
	<?php }?>


	<tr>
		<td colspan="5" align="right"><?php echo  JText::_('ORDER_TOTAL');?></td>
		<td colspan="1" align="center"><?php echo $params->get('currency_symbol').' '.$order['order_total'];?>
		</td>
	</tr>
</table>
<br>
<br>
	<?php echo JText::sprintf('DELIVERY_METHOD_S',$delivery_method );?>
<br>
	<?php if (!empty($payment_method)){?>
	<?php echo JText::sprintf('PAYMENT_METHOD_S',$payment_method);?>
<br>
<?php }?>
<?php echo nl2br($pparams->get('order_sign'));?>