<!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" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{$language.lblBusiness}: {$language.lblReturnRequests}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<link href="{$view_styles}/jquery-ui-1.8.19.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/listing.css" />
{include file='CommonCustomStyles.tpl'}
</head>
	<body class="{$languageDirection}">
	<div class="outer" id="main"> {include file='CommonHeader.tpl'} 
		<!--End:Header Container--> 
			<div class="content-wrapper">
			<div class="container-fluid">

				<div class="clearfix">
			        <div class="pull-right right">
			        {include file='ContentLanguageOptions.tpl'}
			        </div>
			    </div>
						
						<div id="common_message"></div>
						<!--End: Right Block--> 
                    <div class="container-section status-01">
                        <h3 class="border-bottom">{$language.lblReturnRequests}</h3>
						{form->start name="formReturnRequestSearch" action="" method="post" enctype="multipart/form-data"}
							<div class="search_container content-block">
								<div class="inner ">
									<div class="row">
									  <div class="form-group col-xs-12 col-sm-3">
											<label>{$language.lblReturnID}</label>
											<span class="form-field01">
                                                {form->textbox name="returnID" class="form-control"} </span></div>
										  <div class="form-group col-xs-12 col-sm-3">
											<label>{$language.lblOrderID}</label>
											<span class="form-field01">
                                                {form->textbox name="masterOrderID" class="form-control"} </span></div>
                                                <div class="form-group col-xs-12 col-sm-3">
											<label>{$language.lblCustomerName}</label>
											<span class="form-field01">
                                                {form->textbox name="fullName" class="form-control"} </span></div>
										  <div class="form-group col-xs-12 col-sm-3">
											<label>{$language.lblDate}</label>
											<span class="form-field01">
												<div class="text-box-div-date">
													{form->textbox id="searchReturnDate" name="searchReturnDate" readonly="readonly" class="form-control date-picker" value=$searchReturnDate}</div>
                                              </span></div>
									  <div class="form-group col-xs-12 col-sm-3">
											<label>{$language.lblAction} </label>
											<span class="form-field01">
                                                {form->select class="form-control"  name="searchRmaAction" id="searchRmaAction" caption="->{$language.lblSelect}" options=$resRmaActions}  </span></div>
										  <div class="form-group col-xs-12 col-sm-3">
											<label>{$language.lblReturnStatus} </label>
											<span class="form-field01">
                                                {form->select class="form-control"  name="searchRmaStatus" id="searchRmaStatus" caption="->{$language.lblSelect}" options=$resRmaStatus}  </span></div>
										  <div class="col-xs-12 col-sm-3">
                                             <label>&nbsp;</label>
                                              {form->submit name="submitSearch" value="{$language.lblSearch}" class="btn btn-sm btn-primary"} 
                                              {html->anchor href="/rma/index/" class="action-link" caption="{$language.lblListAll}" tabindex="8"}</div>
                                        </div>
								</div>
							</div>
                    </div>
                    
						{form->close}
						<!--END:sEARCH cONTAINER--> 
					{if $resReturnRequest|default:''}
                    <div class="container-section">
						<div class="grid_table00 product-list order-list"> {form->start name="formReturnRequest" action="" method="post" enctype="multipart/form-data"}
							<table width="100%" border="0" cellspacing="0" cellpadding="0" >
							<thead>
							  <tr> 
									<th align="left" valign="middle"  width="" class="sort{if $sortByOption eq 'returnID'}{$sortByOrder}{/if}" >
									{html->anchor href=$link|cat:"sortby/returnID/orderby/$sortReturnID/" title="{$language.lblReturnID}" 	content="{$language.lblReturnID}"}</th>
									<th align="left" valign="middle" width="" class="sort{if $sortByOption eq 'masterOrderID'}{$sortByOrder}{/if}">					
									{html->anchor href=$link|cat:"sortby/masterOrderID/orderby/$sortMasterOrderID/" title="{$language.lblOrderID}" 	content="{$language.lblOrderID}"}
									</th>
									<th align="left" valign="middle" width="" class="sort{if $sortByOption eq 'fullName'}{$sortByOrder}{/if}">
									{html->anchor href=$link|cat:"sortby/fullName/orderby/$sortFullName/" title="{$language.lblCustomerName}" 	content="{$language.lblCustomerName}"}</th>
									<th align="left" valign="middle" width="" >{$language.lblQuantity}</th>
									<th align="left" valign="middle" width="" >{$language.lblAction}</th>
									<th align="left" valign="middle" width="">{$language.lblStatus}</th>
									<th align="left" valign="middle"  width="" class="sort{if $sortByOption eq 'returnDate'}{$sortByOrder}{/if}"> 
									{html->anchor href=$link|cat:"sortby/returnDate/orderby/$sortReturnDate/" title="{$language.lblDate}" 	content="{$language.lblDate}"}</th>
							  </tr>
							</thead>
							<tbody>
								{foreach from=$resReturnRequest item="returnRequest" key="key1"}
								{assign var="returnID" value=$returnRequest.returnID}
								<tr> 
									<td align="left" valign="top">
										{html->anchor class="normal_link" history="yes" caption="<strong>{$returnRequest.returnID}</strong>" href="rma/returndetails/id/{$returnRequest.returnID}/"}
									</td>
									<td align="left" valign="top">
									   {html->anchor class="normal_link" history="yes" caption="<strong>{$returnRequest.orderNumber}</strong>" href="payment/show/id/{$returnRequest.masterOrderID}/"} 
									</td>
									<td align="left" valign="top">{$returnRequest.fullName}</td>
									<td align="left" valign="top">{$returnRequest.quantity}</td>
									<td align="left" valign="top">{$returnRequest.actionReason}</td>
									<td align="left" valign="top">{$returnRequest.statusDescription}</td>
									<td align="left" valign="top">{$returnRequest.returnDate}</td>
								</tr>
								{/foreach}
							</tbody>
						  </table>
						</div>
                    </div>
						<div class="fixing_right pagination_outer pull-right"> {paginate->layout  key="page" label_record="{$language.lblRecorsFound}" label_pages="{$language.lblPages}"} 
							<!--end: Pagination-->
							<div class="clear"></div>
						</div>
					{form->close}
						{else}
						<div  class="message_info">{$language.msgNoRecords}</div>
						{/if} </div>
  </div>

        <!--End:Content Container--> 
   {include file='CommonFooter.tpl'} </div>
<!--End:Outer Container--> 
{include file='CommonJavaScriptBottom.tpl'}
{form->rootpath_script}
{form->basepath_script} 
<script type="text/javascript">
var msgSelectSearchCriteria		=	"{$language.msgSelectSearchCriteria}";
</script> 
<script type="text/javascript" src="{$view_javascript}/moment.min.js"></script>
<script type="text/javascript" src="{$view_javascript}/bootstrap-daterangepicker-min.js"></script>
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script type="text/javascript">
{literal}
	$(function() {

    function cb(start, end) {
        $('#searchReturnDate').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
    }
    cb(moment().subtract(29, 'days'), moment());

   $('#searchReturnDate').daterangepicker({
        ranges: {
           [lblToday]: [moment(), moment()],
           [lblYesterday]: [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
           [lblLast7Days]: [moment().subtract(6, 'days'), moment()],
           [lblLast30Days]: [moment().subtract(29, 'days'), moment()],
           [lblThisMonth]: [moment().startOf('month'), moment().endOf('month')],
           [lblLastMonth]: [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
        },
		 locale: {
          cancelLabel: cancelLabel,
          applyLabel: applyLabel,
		  customRangeLabel: customRangeLabel
      }
    }, cb);

});
{/literal}
</script>
{html->messages_script id="common_message"}
</body>
</html>