<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$language.lblBusiness} :  {$language.lblPaymentsByOrder}  : {$language.lblPaid}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/listing.css" />
</head>
<body class="{$languageDirection}">
<div class="outer" id="main">
  {include file='CommonHeader.tpl'}
  <!--End:Header Container--> <!--***********************************************************************END HEADER CONTAINER******************************************************-->
 <div class="content-wrapper">
    <!-- left wrapper starts-->
    <div class="container-fluid">
    <div class="content_wrapper">
      <div class="clearfix">
        <div class="pull-left left">
          {include file='ContentLanguageOptions.tpl'}
        </div>
        {html->anchor align="right" href="/payment/paid/$link" caption="{$language.lblBack}" class="back-link pull-right margin-bottom"}
      </div>
      <div class="clearfix">
        <div class="tab-block order_tab pull-right">
          <ul class="listing-01 clearfix">
            <li class="first">
            {html->anchor href="/payment/ordernotpaid/productid/{$productID}/currency/$currency/$link" class="tab order_tab_a" caption=$language.lblNotPaid}
            </li>
            <li>{html->anchor href="/payment/orderpaid/productid/{$productID}/currency/$currency/$link" class="tab order_tab_a  active"  caption=$language.lblPaid}</li>
            <li class="last">{html->anchor href="/payment/ordertransaction/productid/{$productID}/currency/$currency/$link" class="tab order_tab_a" caption=$language.lblTransactions}</li>
          </ul>
        </div>
      </div>
      <h3 class="margin-bottom rmv-padding-left">{$language.lblPaymentsByOrder}</h3>
      <div id="common_message"></div>

      <!-- Inner Content Container starts-->
      <div class="inner_content_wrapper">
     
          <div class="container-section"><h3 class="border-bottom"> {$productKey}</h3>  
{if $resListProductOrders}
<div class="grid_table00" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">

<thead>
              <tr>
				<th align="left" valign="middle">{$language.lblTransactionID}</th>
                <th align="left" valign="middle">{$language.lblOrderID}</th>
                <th align="left" valign="middle">{$language.lblDateTime}</th>
                <th align="left" valign="middle">{$language.lblCustomer}</th>             
				 <th align="left" valign="middle">{$language.lblNoofBought}</th>
                <th align="left" valign="middle">{$language.lblSubtotal}</th>
                 <th align="left" valign="middle">{$language.lblServiceCharge}</th>
                <th align="left" valign="middle">{$language.lblShippingAmount}</th>         
				<th align="left" valign="middle" >{$language.lblTransactionAmount}</th>				
              </tr>	 
              </thead>
              <tbody>             
              {form->hidden  name="productID" class="class01" value=$productID}
			  {form->hidden  name="businessID" class="class01" value=$resListProductOrders.0.businessID|default:0}
              {foreach item="resProductOrders" from=$resListProductOrders key="key1"}
              {if $resProductOrders.orderItemID|default:0>0}
              {if $resProductOrders.transactionTotalAmount< 0}
              	{assign var="sign" value="-"}{else}{assign var="sign" value="+"}{/if}
              {assign var ='firstnameLastname' value=$resProductOrders.userFirstName|cat:'&nbsp;'|cat:$resProductOrders.userLastName}
              {assign var="orderDate" value=$resProductOrders.orderCreatedDate|date_format:$date_format}
              {assign var="orderTime" value=$resProductOrders.orderCreatedDate|date_format:$time_format}
              {assign var="orderDateTime" value=$orderDate|cat:'&nbsp;'|cat:$orderTime}
              <tr {if $resProductOrders@iteration is even by 1} class="shade01" {/if}>
				<td align="left" valign="middle">{$resProductOrders.transactionID} 
                								 </td>
                <td align="left" valign="middle">{$resProductOrders.orderNumber} {if !( ($resProductOrders.orderStatus =='Completed' &&  $resProductOrders.paymentStatus=='Received') ||
				($resProductOrders.orderStatus=='Pending' &&  $resProductOrders.paymentStatus=='Received')	||
				($resProductOrders.orderStatus=='Process' &&  $resProductOrders.paymentStatus=='Received'))} [{$language.lblCancelled}]{/if}</td>
                <td align="left" valign="middle">{$orderDateTime}</td>
                <td align="left" valign="middle">{$firstnameLastname}</td>				
				<td align="left" valign="middle">{$resProductOrders.orderItemQuantity}</td>
                <td align="left" valign="middle">{$sign|cat:$resProductOrders.orderItemMerchantSubtotal|price:'':$currency:$currency}</td> 
                <td align="left" valign="middle">
                {$sign|cat:$resProductOrders.orderOtherServiceCharge|price:'':$currency:$currency}</td>               
                <td align="left" valign="middle">
				{assign var="shippingAmount" value="{$resProductOrders.shippingAmount|default:0}"}
				{$sign|cat:$shippingAmount|price:'':$currency:$currency}</td>  
				<td align="left" valign="middle"><strong>{$resProductOrders.transactionTotalAmount|price:'':$currency:$currency}</strong></td>				
              </tr>
              {/if}
              {/foreach} </tbody>
              <tfoot>
              <tr >			  
                <td align="right" valign="middle" colspan="5">				
					<strong>{$language.lblTotal}</strong></td>
				
            	<td align="left" valign="middle"><strong>{$resListProductOrders.total.orderItemMerchantSubtotal|price}</strong></td>
            	<td align="left" valign="middle"><strong>{$resListProductOrders.total.orderOtherServiceCharge|price}</strong></td>
            	<td align="left" valign="middle"><strong>{$resListProductOrders.total.shippingAmount|default:0|price}</strong></td>  
			    <td align="left" valign="middle"><strong>{$resListProductOrders.total.transactionTotalAmount|price}</strong></td>				
              </tr>
           </tfoot>
            </table>
            </div>
            {else}
               <div id="common_message"  class="message_info"> {$language.msgNoRecords}</div>
            {/if}
         
          <!--End:From Listing--> 
       
    </div>
    </div>
    </div></div>
  <!--End:Content Container--> 
    </div>
   {include file='CommonFooter.tpl'}
</div>
<!--End:Outer Container--> 
{include file='CommonJavaScriptBottom.tpl'}
{html->messages_script id="common_message"}
{form->rootpath_script}
{form->basepath_script}

<script>
	 $('.main_menu li a[rel=payment]').addClass('active');	
</script>
</body>
</html>