<!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.lblAdmin} : Affiliate Transaction Details</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
{include file='CommonCustomStyles.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/grid_listing.css" />
</head><body>
<div class="outer_container">
  {include file='CommonTop.tpl'}
  <!--End:Header Container-->
  <!--***********************************************************************END HEADER CONTAINER******************************************************-->
  <div class="content_container">
   <div class="content_wrapper"> 
   <div class="titile_with_back clearfix">    
       {html->anchor href=$previousURl caption="{$language.lblBack}" class="back-link fixing_right top-space"}
       <h2 class="fixing_left">{$language.lblTransactionDetails} - {$language.lblTransactionID} : {$transactionid} </h2>
    </div>   
          <div id="common_message" ></div>
          {form->start name="frmSearchTransaction"  method="post"}
          <div class="search_container">
             <div class="inner single-box">
             <ul class="clearfix">
            	<li class="column">
                	<p class="label-field01">{$language.lblType}</p>
                    <span class="form-field01">     {form->select name="commissionType" caption="{$language.lblSelect}" class="select-box" options="Order->"|cat:$language.lblOrder|cat:"~*Registration->"|cat:$language.lblRegistration|cat:"~*Subscription->"|cat:$language.lblSubscription|cat:"~*Imported User->"|cat:$language.lblImportedUsers|cat:"~*Imported Subscriber->"|cat:$language.lblImportedSubscribers|cat:"" value=$commissionType}</span>
                </li>
                <li class="column">{form->submit name="searchTransaction" class="button01" value="{$language.lblSearch}"} 
                      {html->anchor href="/affiliate/transactiondetails/transactionid/{$transactionid}/" class="action-link"  content="{$language.lblListAll}"}
                </li> 
             </ul>
            </div>
          </div>
          {form->close}
          <!--END:sEARCH cONTAINER-->
          {if $resTransactionAmount}         
          <div class="grid_table00 " > 
            <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
              <tr>
                <th  align="left" valign="middle" width="30%">{$language.lblType}</th>
                <th  align="left" valign="middle">{$language.lblActionDate}</th>                
                <th   align="left" valign="middle">{$language.lblTransactionDate}</th>
                <th  align="left" valign="middle" width="15%">{$language.lblChargeBackCommission}</th>
                 <th  align="left" valign="middle" width="15%">{$language.lblCommissionAmount} </th>
              </tr>
              {foreach item="resAffTransactions" from=$resTransactionAmount key="key1"}
              {assign var="totalAdjustedQuantity" value=$totalAdjustedQuantity|default:0+$resAffTransactions.orderQty|default:0}
              {assign var="totalAdjustedAmount" value=$totalAdjustedAmount|default:0+$resAffTransactions.adjustedAmount}
              {assign var="totalTransactionTotalAmount" value=$totalTransactionTotalAmount|default:0+$resAffTransactions.commissionAmountChargback}
              <tr>
                <td align="left" valign="top">{$resAffTransactions.orderNumber}  {if !( ($resAffTransactions.orderStatus =='Completed' &&  $resAffTransactions.paymentStatus=='Received') ||
				($resAffTransactions.orderStatus=='Pending' &&  $resAffTransactions.paymentStatus=='Received')	||
				($resAffTransactions.orderStatus=='Process' &&  $resAffTransactions.paymentStatus=='Received')) && $resAffTransactions.type =='Order'} [{$language.lblCancelled}]{/if}</td>
                <td align="left" valign="top">{$resAffTransactions.createdDate|date_format:$settingsDateFormat} 				                                                 {$resAffTransactions.createdDate|date_format:$settingsTimeFormat}
                </td> 
                 <td align="left" valign="top">{$resAffTransactions.affiliateTransDate|date_format:$settingsDateFormat} 				                                                 {$resAffTransactions.affiliateTransDate|date_format:$settingsTimeFormat}</td>               
                <td align="left" valign="top">  {$resAffTransactions.adjustedAmount|price} </td>
                <td align="left" valign="top">{$resAffTransactions.commissionAmountChargback|price}</td>
              </tr>
              {/foreach}
              <tfoot>
              <tr >
                <td align="left" valign="top" colspan="3">{$language.lblTotal}</td>
                <td align="left" valign="top">{$totalAdjustedAmount|price}</td>
                <td align="left" valign="top">{$totalTransactionTotalAmount|price}</td>
                
              </tr>
              </tfoot>
            </table>
            </div>
            {else}
            <div class="message_info" >{$language.msgNoRecords}</div>
            {/if} 
        </div>
       
  </div>
  <!--End:Content Container-->
  {include file='CommonBottom.tpl'}

</div>
{include file='CommonJavaScriptBottom.tpl'}
  {form->rootpath_script}
  {form->basepath_script}
</body>
</html>