<!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.lblAffiliate} : {$language.lblChargeBackOrders}</title>
{include file='CommonStyles.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/affiliates.css" />
{include file='CommonJavaScript.tpl'}
</head>
<body>
<!-- Outer container starts-->
<div class="outer_container"> 
  <!-- Header Container starts--> 
  {include file='CommonTop.tpl'} 
  <!-- Header Container ends--> 
  <!-- Content Container starts-->
  <div class="content_container2"> 
    <!-- left wrapper starts-->
    <div class="left_wrapper">
      <div class="content_wrapper">
        <h2>{$language.lblChargeBackOrders}</h2>
        <!-- Inner Content Container starts-->
        <div class="inner_content_wrapper"> 
          <!-- Search container starts -->
          <div class="search_container">
            <div class="inner"> {form->start action="" method="post" name="formOrderSearch"}
              {form->hidden id="searchAlert" name="searchAlert" value=$language.lblSearchAlert}
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="10%"  align="left" valign="middle" class="left">{$language.lblOrderID}</td>
                  <td width="12%"  align="left" valign="middle"><div class="textfield">
                      <div class="text-box-div">{form->textbox name="orderID" class="text-box"}</div>
                    </div></td>
                  <td width="13%"  align="left" valign="middle" class="left">{$language.lblModifiedDate}</td>
                  <td width="25%"  align="left" valign="middle"><div class="textfield">
                      <div class="text-box-div-date">{form->textbox name="date" type="text" class="date-field" id="daterange" readonly="true"} </div>
                    </div></td>
                  <td align="left" valign="middle" class="padding-r-10"> {form->submit name="formSubmitSearch" id="formSubmitSearch"  value=$language.lblSearch class="button01"}
                    {html->anchor href="/reports/chargebackorders/" class="action-link" caption=$language.lblResetFields}</td>
                </tr>
              </table>
              <div class="clear"></div>
            </div>
          </div>
          <!--End:Search container--> 
          {if $resOrderlist} {html->anchor href="$links/export/1/" class=" link-style01 fixing_right" caption="{$language.lblExportToCsv}"}
          <div class="clear"></div>
          <div class="grid01">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="grid_table00">
              {if $sortkey=="asc"}
              {assign var="sortimg" value="sortdesc"} 
              {else}  
              {assign var="sortimg" value="sortasc"}
              {/if}
              {if $sortkey1=="asc"}
              {assign var="sortimg1" value="sortdesc"} 
              {else}  
              {assign var="sortimg1" value="sortasc"}
              {/if}
              {if $sortkey2=="asc"}
              {assign var="sortimg2" value="sortdesc"} 
              {else}  
              {assign var="sortimg2" value="sortasc"}
              {/if}
              {if $sortkey3=="asc"}
              {assign var="sortimg3" value="sortdesc"} 
              {else}  
              {assign var="sortimg3" value="sortasc"}
              {/if}
              {if $sortkey4=="asc"}
              {assign var="sortimg4" value="sortdesc"} 
              {else}  
              {assign var="sortimg4" value="sortasc"}
              {/if}
              <thead>
                <tr>
                  <th  align="left" valign="middle"  {if $sortkey!=""}class={$sortimg}{else}class="sort" {/if}>{html->anchor href="{$links}sortby/oid/orderby/{if $sortkey==''}desc{else}{$sortkey}{/if}/" title=$language.lblOrderID content=$language.lblOrderID} </th>
                  <th align="left" valign="middle"  {if $sortkey1!=""}class={$sortimg1}{else}class="sort" {/if}>{html->anchor href="{$links}sortby/odate/orderby/{if $sortkey1==''}desc{else}{$sortkey1}{/if}/" title=$language.lblOrderDate content=$language.lblOrderDate} </th>
                  <th align="left" valign="middle"  {if $sortkey2!=""}class={$sortimg2}{else}class="sort" {/if}>{html->anchor href="{$links}sortby/ldate/orderby/{if $sortkey2==''}desc{else}{$sortkey2}{/if}/" title=$language.lblLastModifiedDate content=$language.lblLastModifiedDate} </th>
                  <th align="left" valign="middle">{$language.lblQuantity}</th>
                  <th align="left" valign="middle">{$language.lblSubTotalAmount}</th>
                  <th align="left" valign="middle"  {if $sortkey3!=""}class={$sortimg3}{else}class="sort" {/if}>{html->anchor href="{$links}sortby/ocom/orderby/{if $sortkey3==''}desc{else}{$sortkey3}{/if}/" title=$language.lblCommissionAmount content=$language.lblCommissionAmount} </th>
                  <th align="left" valign="middle"  {if $sortkey4!=""}class={$sortimg4}{else}class="sort" {/if}>{html->anchor href="{$links}sortby/ostatus/orderby/{if $sortkey4==''}desc{else}{$sortkey4}{/if}/" title=$language.lblStatus content=$language.lblStatus} </th>
                </tr>
              </thead>
              <tbody>
              {foreach from=$resOrderlist item="resList" key="key1"}
              <tr>
                <td align="left" valign="middle">{$resList.orderNumber}</td>
                <td align="left" valign="middle">{$resList.orderCreatedDate|date_format:$settingsDateFormat} {$resList.orderCreatedDate|date_format:$settingsTimeFormat}</td>
                <td align="left" valign="middle">{$resList.orderStatusDate|date_format:$settingsDateFormat} {$resList.orderStatusDate|date_format:$settingsTimeFormat}</td>
                <td align="left" valign="middle">{$resList.orderQty}</td>
                <td align="left" valign="middle">{$resList.orderSubtotal|price}</td>
                <td align="left" valign="middle">{$resList.commissionAmount|price}</td>
                <td align="left" valign="middle">{$resList.orderStatus}</td>
              </tr>
              {/foreach}
                </tbody>
            </table>
            <div class="pagination_outer fixing_right">{paginate->layout  key="page" label_record="{$language.lblRecorsFound}" label_pages="{$language.lblPages}"}</div>
            <div class="clear"></div>
          </div>
          {else}
          <div class="clear"></div>
          <div class="grid01 message_info"> {$language.msgNoRecords} </div>
          {/if} </div>
        <!-- Inner Content Container ends-->
        <div class="clear"></div>
      </div>
    </div>
    <!-- left wrapper ends--> 
    <!-- right side bar starts-->
    <div class="right-sidebar">
      <div class="side_wrapper"> 
        <!-- right side menu starts--> 
        {include file='AffReportSideMenu.tpl'} 
        <!-- right side menu ends--> 
      </div>
    </div>
    <!-- right side bar ends-->
    <div class="clear"></div>
  </div>
  <!-- Content Container ends--> 
  <!-- Footer starts--> 
  {include file='CommonBottom.tpl'} 
  <!-- Footer ends--> 
</div>
<!-- Outer container ends--> 
<script type="text/javascript" src="{$view_javascript}/message.plugin.js"></script> 
{literal}
<script type="text/javascript">

var d 		= new Date();
var nd 		= new Date(d.getFullYear(),d.getMonth(),d.getDate()+1,d.getHours()-1,d.getMinutes(),d.getSeconds());	
 $(function(){	  
	 $('#daterange').daterangepicker({arrows: false,presets:{		
			specificDate: 'Specific Date', 
			dateRange: 'Date Range'
		},presetRanges: [
			{text: 'Today', dateStart: 'today', dateEnd: 'today' },
			{text: 'Last 7 days', dateStart: 'today-7days', dateEnd: 'today' },
			{text: 'Month to date', dateStart: function(){ return Date.parse('today').moveToFirstDayOfMonth();  }, dateEnd: 'today' },
			{text: 'Previous Month', dateStart: function(){ return Date.parse('1 month ago').moveToFirstDayOfMonth();  }, dateEnd: function(){ return Date.parse('1 month ago').moveToLastDayOfMonth();  } }

		],latestDate:nd,dateFormat:datePickerDateFormat,placeHolder:'dateOverView',rangeDays:90,rangeSplitter:' - ',datepickerOptions: {maxDate:nd}});
	});
	
$('.ui-daterangepicker-dateRange').addClass('ui-state-active');	

$(document).ready(function() {
	$('.side_menu').find("a[rel='chargebackorders']").addClass('selected').removeBorder();
	$('.main_menu').find("a[rel='affReports']").addClass('active');
	$("#formSubmitSearch").click(function(){
			if($.trim($('#orderID').val())=="" && $('#daterange').val()==""){
			jAlert($("#searchAlert").val());
                           return false;
		   }
                            return true;      
         });
	
});

</script>
{/literal}
</body>
</html>