<!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.lblLastShipped}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}


<link rel="stylesheet" type="text/css" href="{$view_styles}/listing.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/ui.daterangepicker.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.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="left_wrapper">
     	<div class="container-fluid">

        <div class="clearfix">
          <div class="pull-right right">
            {include file='ContentLanguageOptions.tpl'}
          </div>
        </div>

        <div id="common_message"></div>
     
      <!-- Inner Content Container starts-->
      <div class="inner_content_wrapper">
      <div class="container-section status-01">
             <div class="right-sidebar">
    <div class="side_wrapper">
    <!-- right side menu starts-->
    <div>
   
    </div>
    <!-- right side menu ends-->
    </div>
    </div>
           <h3 class="border-bottom">{$language.lblLastShipped}</h3>
	  <!-- Search container starts -->
         {form->start name="formShippingSearch" action="" method="post" enctype="multipart/form-data"}
          {form->hidden id="searchAlert" name="searchAlert" value=$language.errStartEndDate}
      <div class="search_container content-block">
            <div class="inner">
               <div class="row">
              <div class="form-group col-xs-12 col-sm-4 col-md-3">
                 <label>{$language.lblShippedDate}</label>
                 <span class="form-field01">{form->textbox name="orderStatusDate" readonly="readonly" autocomplete="off" class="form-control date-picker" id="orderStatusDate"}</span>
             </div>
               <div class="form-group col-xs-12 col-sm-4 col-md-3">
                 <label>{$language.lblCusName}</label>
                 <span class="form-field01">{form->textbox name="certificateName" class="form-control"}</span>
                </div>
              <div class="form-group col-xs-12 col-sm-4 col-md-3">
                 <label>{$language.lblShippingBy}</label>
                 <span class="form-field01">{form->select name="shippingSetting"  options="->{$language.lblAny}~*admin->{$language.lblAdmin}~*business->{$language.lblBusiness}" class="form-control"}</span>
                 </div>
                <div class="form-group col-xs-12 col-sm-4 col-md-3">
                 <label>{$language.lblProductIDTitle}</label>
                 <span class="form-field01">{form->textbox name="productKey" class="form-control"}</span>
                 </div>
                <div class="form-group col-xs-12 col-sm-4 col-md-3">
                 <label>{$language.lblOrderID}</label>
                 <span class="form-field01">{form->textbox name="orderNumber" class="form-control"}</span>
                 </div>
			   <div class="col-xs-12 col-sm-4 col-md-3">
                   <label>&nbsp;</label>
                 <span class="form-field01">{form->submit name="submitSearch" class="btn-primary btn btn-sm" form="formShippingSearch" tabindex="1" value="{$language.lblSearch}"}                   
                  {html->anchor href="/shipping/shipped/" caption=$language.lblResetFields class="action-link"}</span>
                 </div>
                </div>       
            </div>
          </div>
        </div>
      <!-- Search container ends --> 
     
      <!-- sort by starts -->
     
    <div class="clear"></div>
     {form->close}
      <!-- sort by ends -->
      {if $resShippedOrders} 
          {form->start name="formShipments" action="" method="post" enctype="multipart/form-data"}
      <!--Start: Active Coupons List-->
            {if $resShippedOrders} {form->submit name="exportAll"  tabindex="1" class="btn-sm btn-primary btn dwn-01" value=$language.lblExport}{/if}
      <div class="container-section shiped-wrapper pull-left">
      <div  class="grid_table00 product-list order-list">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <thead>
              <tr>
              <th align="center" valign="middle">{form->checkbox id="ListStatusLinkCheckbox"}
                  <label for="ListStatusLinkCheckbox"></label></th>
                  
			  
			  
				 <th align="left" valign="middle"  width="150" class="sort{if $sortByOption eq 'sshipmentid'}{$sortByShipmentID}{/if}">
				{html->anchor href="/shipping/shipped/$normallink/sortby/sshipmentid/orderby/$sortByShipmentID/" title="{$language.lblShipmentId}" content="{$language.lblShipmentId}"}
				</th>
			  
                <th align="left" valign="middle" class="sort{if $sortByOption eq 'sorderid'}{$sortByOrder}{/if}" width="10%">
                {html->anchor href="/shipping/shipped/$normallink/sortby/sorderid/orderby/$sortByOrderID/"   title="{$language.lblOrderID}" 	content="{$language.lblOrderID}"}</th>                
                <th align="left" valign="middle" class="sort{if $sortByOption eq 'scustomer'}{$sortByOrder}{/if}">
                {html->anchor href="/shipping/shipped/$normallink/sortby/scustomer/orderby/$sortByOrderCustomer/"   title="{$language.lblCusName}" 	content="{$language.lblCusName}"} 
               
                </th>
                <th align="left" valign="middle" class="sort{if $sortByOption eq 'squantity'}{$sortByOrder}{/if}" width="10%">

                {html->anchor href="/shipping/shipped/$normallink/sortby/squantity/orderby/$sortByOrderQuantity/" title="{$language.lblQuantity}" 	content="{$language.lblQuantity}"}                
                </th>
                <th align="left" valign="middle" class="sort{if $sortByOption eq 'stotal'}{$sortByOrder}{/if}">
                 {html->anchor href="/shipping/shipped/$normallink/sortby/stotal/orderby/$sortByOrderTotal/"    title="{$language.lblOrderTotalAmount}" 	content="{$language.lblOrderTotalAmount}"}                
                </th>				
                <th align="left" valign="middle" class="sort{if $sortByOption eq 'shipdate'}{$sortByOrder}{/if}" >
                {html->anchor href="/shipping/shipped/$normallink/sortby/shipdate/orderby/$sortByOrderStatusDate/"  title="{$language.lblLastUpdatedDate}" 	content="{$language.lblShippedDate}"}
                </th>
                <th align="left" valign="middle"></th>
              </tr>
            </thead>
            <tbody>
			{assign var="checkboxCounter" value="1"}	
             {foreach from=$resShippedOrders item="order" key="key1"}
              {assign var="orderID" value=$order.masterOrderID}
              {assign var="orderNumber" value=$order.orderNumber}
			  {assign var="sID" value=$order.shippingID}
              <tr>
                <td align="center" valign="middle">
                {if $order.orderStatus!='Cancelled'}
                {form->checkbox name="checkOrderIDs[]" id="checkOrderIDs_{$checkboxCounter}" value=$sID class="checkbox01 ListAll List"|cat :{$order.currentShippingStatus}}
               <label for="checkOrderIDs_{$checkboxCounter}" class="checkOrderIDs"></label>
               {else}<strong>X</strong>{/if}
               
               {*{if $order.orderStatus!='Cancelled'}
               {form->checkbox name="checkLabel[]" id="checkLabel_{$checkboxCounter}" value=$sID class="checkbox01 ListAll List"}
               <label for="checkLabel_{$checkboxCounter}" class="checkLabel"></label>
               {else}<strong>X</strong>{/if}*}
               </td>
			   
				<td align="left" valign="top">
					{html->anchor class="normal_link" history="yes" caption="#{$order.shippingID}" href="shipment/show/id/$sID/{if $normallink!=''}{$normallink}{/if}"} 
				</td>
			   
                <td align="left" valign="middle">{$order.orderNumber}</td>                
                <td align="left" valign="middle"> {$order.fullName}</td>
                <td align="left" valign="middle">
                  {$order.quantity} / {$order.ItemQuantity}
                </td>
                <td align="left" valign="middle"> {$order.orderTotalAmount|price:'':$order.purchasedCurrency:$order.purchasedCurrency} </td>
								
                <td align="left" valign="middle"> {$order.orderStatusDate|date_format:$settingsDateFormat} {$order.orderStatusDate|date_format:$settingsTimeFormat} </td>
                <td align="center" valign="middle">
                {html->anchor tabindex="1" history="yes" href="shipment/show/id/$sID/{if $normallink!=''}{$normallink}{/if}" title={$language.lblView}|cat:" "|cat:{$language.lblShippedOrder}|cat:" - "|cat: {$order.orderNumber} class="editproductOrder preview icon-edit-fill hide-txt"}
                {if $order.createdBy == 'business'}
					{assign var="href" value= "/shipment/edit/id/"|cat:{$order.shippingID}|cat:"/"}
					{html->anchor href="{$href}" title="{$language.lblEdit}" class="product-preview icon-set edit03"}
					{html->anchor history="yes" rel="/payment/destroy/id/{$order.shippingID}/newstatus/Deleted/" class="delete02 icon-set" title="{$language.lblDelete}" task='delete'}
				{/if}
				</td>
              </tr>
			  {assign var="checkboxCounter" value=$checkboxCounter+1}	
                  {/foreach}
            </tbody>
          </table>      
          </div>
        </div>
              <!--end: Active Coupons List--> 
      <div class="pull-left">
      <!--Start: Pagination-->
         {form->button name="createLabel" id="createLabel" class="btn btn-sm btn-primary" value=$language.lblCreateLabel title=$language.lblCreateLabel}
		 {html->anchor href="/shipping/label/"  class="createLabelLink" title=$language.lblCreateLabel}

            
            <div class="clear"></div>
            <!--end: Pagination-->
      </div>
           <div class="pagination_outer fixing_right dwn-01">  {paginate->layout  key="page" label_record="{$language.lblRecorsFound}" results_per_page="{$language.lblResultsperpage}" label_pages="{$language.lblPages}"}</div>
   <div class="clearfix"></div>
  				<fieldset class="FieldBx container-section status-01">
    			<h3 class="border-bottom">{$language.lblBulkUpdate}</h3>
    			<div class="BulkUpdate content-block">
                <div class="form_listing-nw clearfix">
                <div class="left-pane flt-left">
                <ul>
              			<li class="row form-group">
						<span class="col-md-2 col-sm-4 col-sm-12">{$language.lblSelectBulkStatus}</span>
						<span class="col-md-3 col-sm-8 col-xs-12 rightside01 pos-relative">
						{form->select name="bulkShippingStatus" class="select-box form-control" post_back="no" options="->{$language.lblSelect}~*Pickup->{$language.lblPickupCreated}~*Dispatched->{$language.lblDispatched}~*Delivered->{$language.lblDelivered}"}
						</span>
			  			</li>
                </ul></div>
                </div>
			<!-- Pickup Details -->
				<div class="contBx Pickup_class common_status">
                <div class="form_listing-nw   clearfix">
           		<div class="left-pane flt-left">
                	<ul>
              			<li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12">{$language.lblPickupDateTime}</span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						{form->textbox name="pickupDate" class="date_picker_field Pickup_class common_status  form-control" validate="bulkShippingStatus->isequal->Pickup~*required" error="{$language.errDate}" placeholder="{$language.lblPickupDateTime}"}
						</span>
			  			</li>
                        <li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12">{$language.lblPickupClosingTime}</span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						{form->textbox  name="pickupClosingTime" class="date_picker_field Pickup_class common_status  form-control" validate="bulkShippingStatus->isequal->Pickup~*required" error="{$language.errTime}" placeholder="{$language.lblPickupClosingTime}"}
						</span>
			  			</li>
                	</ul>  
                </div>
                </div>
                </div>
			<!-- Pickup Details End -->
			<!-- Dispatch Details -->
				<div class="contBx Dispatched_class common_status">
                <div class="form_listing-nw   clearfix">
           		<div class="left-pane flt-left">
                	<ul>
              			<li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12">{$language.lblDispatchedDate}</span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						{form->textbox name="dispatchDate" class="date_picker_field  Dispatched_class common_status form-control" validate="bulkShippingStatus->isequal->Dispatched~*required" error="{$language.errDate}" placeholder="{$language.lblDispatchedDate}"}
						</span>
			  			</li>
                        <li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12">{$language.lblExpectedDeliveryDate}</span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						{form->textbox name="dispatchExpDate" class="date_picker_field  Dispatched_class common_status form-control" validate="bulkShippingStatus->isequal->Dispatched~*required" error="{$language.errDate}" placeholder="{$language.lblExpectedDeliveryDate}"}
						</span>
			  			</li>
                        <li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12">{$language.lblDispatchStatusDetails}</span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						{form->textarea name="dispatchStatusDetails" class="Dispatched_class common_status form-control width-100per" placeholder="{$language.lblDispatchStatusDetails}"}
						</span>
			  			</li>
                         <li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12"></span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						{form->checkbox name="dispatchNotify" value="Yes" class="Dispatched_class common_status"} <span class="Dispatched_class common_status">{$language.lblNotifyCustomer}</span>
						</span>
			  			</li>
                	</ul>  
                </div>
                </div>
                </div>
			<!-- Dispatch Details End -->
			<!-- Delivered Details -->
				<div class="contBx Delivered_class common_status">
                <div class="form_listing-nw   clearfix">
           		<div class="left-pane flt-left">
                	<ul>
              			<li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12">{$language.lblDeliveredDateTime}</span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						 {form->textbox name="deliveredDate" class="date_picker_field Delivered_class form-control common_status width-55per" validate="bulkShippingStatus->isequal->Delivered~*required" error="{$language.errDate}" placeholder="{$language.lblDeliveredDateTime}"}
						</span>
			  			</li>
                        <li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12">{$language.lblMessage}</span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						{form->textarea name="deliveredComment" class=" Delivered_class common_status form-control width-100per" placeholder="{$language.lblMessage}"}
						</span>
			  			</li>
                         <li class="row form-group">
						<span class="leftside01 col-md-2 col-sm-4 col-sm-12"></span>
						<span class="rightside01 col-md-3 col-sm-8 col-xs-12 pos-relative">
						{form->checkbox name="deliveredNotify" value="Yes" class="Delivered_class common_status"} <span class="Delivered_class common_status">{$language.lblNotifyCustomer}</span>
						</span>
			  			</li>
                	</ul>  
                </div>
                </div>
                </div>
			<!-- Delivered Details End -->
                <div class="form_listing-nw clearfix">
                <div class="left-pane flt-left">
                <ul>
              			<li class="clearfix">
						<span class="leftside01"></span>
						<span class="rightside01 pos-relative">
                        <div class="submit-block">
						{form->submit name="submitBulkStatus" id="submitBulkStatus" class="button03 btn-primary btn btn-sm" value=$language.lblUpdateStatus title=$language.lblUpdateStatus}
                        </div>
						</span>
			  			</li>
                </ul></div>
                </div>
                </div>
  				</fieldset>
    
		{form->close}
		{else}	
            <div id="common_message"  class="message_info"> {$language.msgNoRecords}</div>
          {/if}
      </div>
      <!-- Inner Content Container ends-->
      <div class="clear"></div>
    </div>
    </div>
    <!-- left wrapper ends-->
    <!-- right side bar starts-->
 
    <!-- right side bar ends-->
    <div class="clear"></div>
  </div>
  <!--End:Content Container--> 
   {include file='CommonFooter.tpl'}
</div>
<!--End:Outer Container--> 
{include file='CommonJavaScriptBottom.tpl'}
{html->messages_script id="common_message"}
{form->validate_script form="formShipments"}  
{form->rootpath_script}
{form->basepath_script}
<script>
var lblSelectItem ="{$language.lblSelectItem}";
var msgConfirmDelete="{$language.msgConfirmDelete}";
var orderStatusDateValue = "{$orderStatusDate}";
if(orderStatusDateValue=='') {
    defaultDateNeeded ="No"; 
}
</script>
<script type="text/javascript" src="{$view_javascript}/moment.min.js"></script>
<script type="text/javascript" src="{$view_javascript}/daterangepicker.js"></script>
<script type="text/javascript" src="{$view_javascript}/jquery.colorbox.js"></script>
<script type="text/javascript" src="{$view_javascript}/shipping.page.js"></script>
<script type="text/javascript" src="{$common_js}/date.js"></script>
<script type="text/javascript" src="{$view_javascript}/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript">
var lblSelectAction			= '{$language.lblSelectAction}';
var lblSelectItem			= '{$language.lblSelectItem}';
var msgSelectSearchCriteria	= '{$language.msgSelectSearchCriteria}';
var lblSelectBusiness		= "{$language.lblSelectBusiness}";
var msgConfirmDelete		= "{$language.msgConfirmDelete}";
{literal}
$(function(){
	 $('#date').daterangepicker({arrows: false});
	 });
{/literal}
</script>
<!--[if IE 6]>
<script src="js/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
      DD_belatedPNG.fix('img,div,ul,li,li a,a,input,p,blockquote,span,h1,h2,h3,.last-child');
</script>
<![endif]-->
<!--[if IE]>
<link href="styles/iefix.css" rel="stylesheet" type="text/css" media="screen" />
<![endif]-->
</body>
</html>