<!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} : {$language.lblOrderDetails}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
<script type="text/javascript" src="{$view_javascript}/orderEdit.page.js"></script>
{include file='CommonCustomStyles.tpl'}
<link href="{$view_styles}/jqueryui.plugin.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/product-details.css" media="screen" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/colorbox.css" />
<link rel="stylesheet" href="{$view_styles}/print.css" media="print" />
</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="top-bt">
      <div class="product-basic-info"> {if $user|default:'' neq ''}
        {html->anchor href="user/show/id/$user/" caption="{$language.lblBack}" class="back-link fixing_right top-space"}
        {else}
        {html->anchor href=$history caption="{$language.lblBack}" class="back-link fixing_right top-space"}
        {/if}

        </div>
        {assign var="unserializesingle" value=$resProductOrderDetails[0].extra|unserialize}	
		<div id="common_message"></div>
                <div id="common_message_rma"></div>
        <div class="content-tab-block">
            <input type="hidden" name="orderIDHid" id="orderIDHid" value="{$masterOrderID|default:''}">
          <div class="content-block clearfix">  <h2>{$language.lblOrderDetails}
                  
                  {if $masterOrderID > 0}
                      {if $resProductOrderDetails[0].orderStatus neq 'Error'}
                      <a target="_blank" href="{$view_root_path}/public/uploads/invoice/{$resOrderDetails.orderFileName}"><img src="{$view_root_path}/public/default/manage/standard/images/print-icon.png" width="24" height="24" alt="print" class="print"/></a>
                      {/if}
              {/if}
          </h2>
            <!--order_details :: Starts-->
            <div class="product-info-details">
              <div class="order_details clearfix padding-b-15">
                <div class="pane02 width-31per fixing_left">
                  <ul class="listing-03">
                    <li class="clearfix"> <span class="col-frst">{$language.lblOrderID}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderNumber}</span> </li>
                     {if $brandName|default:'' neq ''}
					<li class="clearfix"> <span class="col-frst">{$language.lblMenuBrands}</span> <span class="col-septr">:</span> <span class="col-lst">{$brandName}</span> </li>
                    
                    {/if}
                    {if $resOrderDetails.orderSource =='flipkart'}
					<li class="clearfix"> <span class="col-frst">Flipkart Ordr ID</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.orderId}</span> </li>
                    <li class="clearfix"> <span class="col-frst">Flipkart Ordr ItemID</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.orderItemId}</span> </li>
                    {/if} <li class="clearfix"> <span class="col-frst">{$language.lblUserName}</span> <span class="col-septr">:</span> <span class="col-lst">
                    
                                {assign var="fullname" value=$resOrderDetails.billingFirstName|decode_str}
                                {assign var="fullname" value=$resOrderDetails.subtitle|cat:''|cat:$fullname}
                                {$fullname}
                            
              </span> </li>
                    <li class="clearfix"> <span class="col-frst">{$language.lblEmailID}</span> <span class="col-septr">:</span> <span class="col-lst"><a href="mailto:{$resOrderDetails.customer_email|decode_str}">{$resOrderDetails.customer_email|decode_str}</a></span> </li>
                    <li class="clearfix"> <span class="col-frst">{$language.lblPhone}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.billingPhone|decode_str}</span> </li>
                    <li class="clearfix"> <span class="col-frst">{$language.lblOrderedAt} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderCreatedDate|date_format:$date_format}</span> </li>
                    <li class="clearfix"> <span class="col-frst">{$language.lblOrderStatus}</span> <span class="col-septr">:</span> <span class="col-lst">{$getDynOrderStatusByKey[$resOrderDetails.dynamicOrderStatus]}</span> </li>
                     {if $resOrderDetails.manifestNumber}
                    <li class="clearfix"> <span class="col-frst">{$language.lblManifestNumber}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.manifestNumber}</span> </li>
                    {/if}
                    <li class="clearfix"> <span class="col-frst">{$language.lblPaymentStatus} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.paymentStatus}</span> </li>
                    {if $resOrderDetails.orderPaymentMethodName}
                    <li class="clearfix"> <span class="col-frst">{$language.lblPaymentMethod} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderPaymentMethodName}</span> </li>
                    {/if}
                    {if $unserializesingle.vsbID|default:'' neq ''}
                    <li class="clearfix"> <span class="col-frst">{$language.lblVSBID} </span> <span class="col-septr">:</span> <span class="col-lst">{$unserializesingle.vsbID}</span> </li>
                    {/if}
					{assign var="linkedOrderID" value=$unserializedExtraData['linkedOrder']['orderID']|default:''}
					{assign var="linkedOrderNumber" value=$unserializedExtraData['linkedOrder']['orderNumber']|default:''}
					{if $linkedOrderID >0}
						<li class="clearfix"> <span class="col-frst">Link to the Previous Order </span> <span class="col-septr">:</span> <span class="col-lst">
						{html->anchor href="/order/show/id/{$linkedOrderID}/" history="yes" 
                        caption=$linkedOrderNumber 
                        title=$linkedOrderNumber}
						</span> </li>
					{/if}
					
                  </ul>
                </div>
                <!--End:Order Details-->
                <div class="details">
                  <div class="pane">
                    <h3 class="padding-b-8">{$language.lblShowroom}</h3>
                    <address>
						{*{$billingAddress|address_format:$languageIDs:'':'':$currentLangID}
						<br />*}
                                                {$resShowroom.name}<br/>
                                    {$resShowroom.address|nl2br}<br/>
                                    {$resShowroom.phone}<br/>
                                    		<a href="mailto:{$resShowroom.email}">{$resShowroom.email}</a> {if $resShowroom.phone} <br />
						<span> {$language.lblPhone}:</span>{$resShowroom.phone|escape} {/if}
                    </address>
                  </div>
                  <!--End:BILLING information--> 
                 
                </div>
              </div>
              <div class="clear"></div>
              {form->start name="formOrder" action="" method="post" enctype="multipart/form-data"} 
              <div class="products_ordered clearfix padding-b-15">
                <h3><span>{$language.lblProductsOrdered} </span></h3>
                <div class="grid_table00">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0"   >
                    <tr>
                      <th  width="10%"  align="left" valign="middle">  {$language.lblSKU}</th>
                      <th align="left" valign="middle" width="30%" >{$language.lblProductTitle}</th>
                      <th align="left" valign="middle" width="5%" >
                          {$language.lblPrice}
                        </th>
                     
                      
                    </tr>
				{assign var="prevElement" value=''}
				 {assign var="flag" value=0}
                                 {assign var="taxDescription" value=""}
                    {foreach from=$resProductOrderDetails item="product" key="key1"}
						{if $prevElement!='' && $prevElement!=$product.shipmentStatus|default:''}
							{assign var="flag" value=1}
						{/if}
                                                
					{assign var="prevElement" value=$product.shipmentStatus|default:''}		
					{assign var="unserialize" value=$product.extra|unserialize}	
                                        {if $settingsTaxApplicable eq 'Yes' && $unserialize.orderItemTaxDescription neq ''} 		
                                                {assign var="taxDescription" value="{$unserialize.orderItemTaxDescription}"}
                                        {/if}
                    <tr >
                      <td align="left" valign="top">
					 {$product.optionSKU}</td>
                      
					  <td align="left" valign="top">
					  {if $productShowPrivilege}
						{html->anchor href="product/show/id/{$product.productID}/" caption=$unserialize.itemDetails.admin.productTitle|default:''}
						{*{$unserialize.itemDetails.admin.productTitle|default:''}*}
					  {else}{$unserialize.itemDetails.admin.productTitle|default:''}{/if}
                                          {if $product.sellAsBatch eq 'Yes'}
                                                <small><br/>{$language.lblSetOf} {$product.qtyPerBatch} {$product.batchType}<br/></small>
                                            {/if}
                        {if $product.orderGiveAsGift|default:'' eq 'Yes'} &nbsp;(Gift){/if} <br />
						{if $unserialize.itemDetails.admin.productTitle|default:'' != $unserialize.itemDetails.admin.productOptionName|default:''}
							(option : {$unserialize.itemDetails.admin.productOptionName|default:''})<br/>
						{/if}
						
                        
                        {if $unserialize.combinationValues.customOption|count|default:0 >0}
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td colspan="2"><strong>{$language.lblCombination}</strong></td>
                          </tr>
                          <tr>
                            <td width="30%">{$language.lblSKU} </td>
                            <td>{$unserialize.combinationValues.cimbinationSKU}</td>
                          </tr>
                          {foreach from=$unserialize.combinationValues.customOption item="combination" key="key"}
                          <tr>
                            <td>
								{if $combination.admin.customOptionName|default:'' != ''}
									{$combination.admin.customOptionName}
								{else}
									{$combination.customOptionName|default:''}
								{/if}
							</td>
                            <td>
								{if $combination.admin.variantValue|default:'' != ''}
									{$combination.admin.variantValue}
								{else}
									{$combination.variantValue|default:''}
								{/if}
							</td>
                          </tr>
                          {/foreach}
                        </table>
                        {/if}
                        
                        {if $unserialize.customOptionValues|count >0}
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td colspan="2"><strong>{$language.lblOption}</strong></td>
                          </tr>
                          {foreach from=$unserialize.customOptionValues item="customOptionValues"}
                          <tr>
                            <td width="30%">{$customOptionValues.0.customOptionName|default:''} </td>
                            {foreach from=$customOptionValues item="customOption" key="key"}
							
                            <td> 
								{if $customOption.inputType=='file'}
									{if $combination.admin.customOptionName|default:'' != ''}
									  {html->anchor href="/order/getFile/id/{$customOption.variantValue}/" 
									  caption=$customOption.admin.variantValue|default:'' 
									  title=$customOption.admin.customOptionName|default:''}
								  {else}
									{html->anchor href="/order/getFile/id/{$customOption.variantValue}/" 
									  caption=$customOption.variantValue|default:'' 
									  title=$customOption.customOptionName|default:''}

								  {/if}
                              {if $key >0},{/if}
                              {else}
								
								{if $customOption.admin.variantValue|default:'' != ''}
									{$customOption.admin.variantValue|default:''}
								{else}
									{$customOption.variantValue|default:''}
								{/if}
									{if $key >0},{/if}
                              {/if} </td>
                            {/foreach} </tr>
                          {/foreach}
                        </table>
                        {/if} 
						
						
						</td>
                      <td align="left" valign="top">
                          {$product.orderItemPrice|price:'':$product.purchasedCurrency|default:0:$product.purchasedCurrency|default:0}
						  
						  
						
                        </td>
                     
                      
                      {*<td  align="left" valign="top"> 
						{if $product.shipmentStatus== 'Delivered'}
							{$language.lblDelivered}
						{else if $product.shipmentStatus== 'Shipment'}
							{$language.lblShipmentcreated}
						{else if $product.shipmentStatus== 'Dispatched'}
							{$language.lblDispatched}
						{else if $product.shipmentStatus== 'Pickup'}
							{$language.lblPickupCreated}
						{else if $product.shipmentStatus== 'Pending'}
							{$language.lblPending}
                                                {else if $product.shipmentStatus== 'Cancelled'}
							{$language.lblCancelled}        
						{/if}
                        {if $product.shipmentStatus !='Pending'} <br>
                        ({$product.shipmentDate|default:''|date_format:$date_format} 
                        {$product.shipmentDate|default:''|date_format:$time_format})
                        {/if} </td>*}
                    </tr>
                    {/foreach}
                  </table>
                </div>
                <div class="clearfix">
                  <table width="47%" align="right">
                    <tr>
                      <td align="right"><div class="order_amount pane02 grand-total">
                          <ul class="listing-03">
                            <li class="clearfix"> <span class="col-frst">{$language.lblSubtotal} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderSubtotal|price:'':$resOrderDetails.purchasedCurrency|default:0:$resOrderDetails.purchasedCurrency|default:0}</span> </li>
                            {if $resOrderDetails.shippingAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblShippingAmount}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.shippingAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderOtherServiceCharge>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblServiceCharge} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderOtherServiceCharge|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderConvenientFee>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblConvenientFee} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderConvenientFee|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderPromoDiscountAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblDiscount} </span><span class="col-septr">:</span> <span class="col-lst">-{$resOrderDetails.orderPromoDiscountAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency} {if $resOrderDetails.orderPromoCode}({$resOrderDetails.orderPromoCode}){/if}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderUserCreditAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblCreditAmount}</span><span class="col-septr">:</span> <span class="col-lst">-{$resOrderDetails.orderUserCreditAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
                            {/if}
							 {if $resOrderDetails.redeemDiscountAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblRedeemAmount}</span> <span class="col-septr">:</span> <span class="col-lst">-{$resOrderDetails.redeemDiscountAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderTaxAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblTaxAmount} {if $taxDescription|default:'' neq ''} - {$taxDescription}{/if}</span><span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderTaxAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
                            {/if}
                            <li class="clearfix"> <span class="col-frst">{$language.lblTotal}</span><span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderTotalAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
                            {if $resOrderDetails.orderPaidAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblOrderPaidAmount}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderPaidAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</span> </li>
                            {/if}
                          </ul>
                        </div></td>
                    </tr>
                  </table>                        
                     {if $applied_promotions|count >0}
            <div  class=" pane02 fixing_left width-47per">
				<ul class="coupon-items discount-info">
					<li class="caret-info"> <span class="caret-outer"></span> <span class="caret-inner"></span></li>
					<li>
						<div id="applied_promotions">
							<strong class="block strong">{$language.lblAppliedPromotions}</strong>
							<ul>
								{foreach from=$applied_promotions item="promo" key="key"}
									<li class="promo-item">
										{$promo.ruleName} - 
										{if $promo.apply == 'by_percentage' && $promo.discountAmount >0}
											<span>{$promo.discountAmount|string_format:"%.2f"} % Off on </span>
										{/if}
										{if $promo.apply == 'by_fixed' && $promo.discountAmount >0}
											<span>{$promo.discountAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency} Off on </span>
										{/if}
										{if $promo.apply == 'cart_fixed' && $promo.discountAmount >0}
											<span>{$promo.discountAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency} Off</span>
										{/if}
										{if $promo.couponCode|default:'' !=''}
											<span> (CODE - {$promo.couponCode}) </span>
										{/if}
										{if $promo.discount|default:0 >0}
											[{$promo.discount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}]
										{/if}
										{if $promo.freeShipping =='yes' && $resOrderDetails.shippingAmount >0}
											<span> 
												{$language.lblShippingCostWillBe}
												({$resOrderDetails.shippingAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency})
											</span>
										{/if}
										
										{if $promo.giftCoupon > 0}
											<span> <strong>
												{$language.lblFreeGiftCouponWorth}
												({$promo.giftCoupon|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency})
											</strong> </span>
										{/if}
										
									</li>
								{/foreach}
							</ul>
							<!--applied_promotions--></div>
					</li>
				</ul>
				</div>
				{/if}
                                  {if $resOrderDetails.purchasedCurrency!=$resOrderDetails.userCurrencyID}
                                      <div class="clearfix"></div>
                                     Amount shown in purchased currency
                              <table width="47%" align="right">
                    <tr>
                      <td align="right"><div class="order_amount pane02 grand-total">
                          <ul class="listing-03">
                            <li class="clearfix"> <span class="col-frst">{$language.lblSubtotal} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderSubtotal|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate}</span> </li>
                            {if $resOrderDetails.shippingAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblShippingAmount}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.shippingAmount|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderOtherServiceCharge>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblServiceCharge} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderOtherServiceCharge|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderConvenientFee>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblConvenientFee} </span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderConvenientFee|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderPromoDiscountAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblDiscount} </span><span class="col-septr">:</span> <span class="col-lst">-{$resOrderDetails.orderPromoDiscountAmount|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate} {if $resOrderDetails.orderPromoCode}({$resOrderDetails.orderPromoCode}){/if}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderUserCreditAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblCreditAmount}</span><span class="col-septr">:</span> <span class="col-lst">-{$resOrderDetails.orderUserCreditAmount|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate}</span> </li>
                            {/if}
							 {if $resOrderDetails.redeemDiscountAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblRedeemAmount}</span> <span class="col-septr">:</span> <span class="col-lst">-{$resOrderDetails.redeemDiscountAmount|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate}</span> </li>
                            {/if}
                            {if $resOrderDetails.orderTaxAmount>0}
                            <li class="clearfix"> <span class="col-frst">{$language.lblTaxAmount} {if $taxDescription|default:'' neq ''} - {$taxDescription}{/if}</span><span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderTaxAmount|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate}</span> </li>
                            {/if}
                            <li class="clearfix"> <span class="col-frst">{$language.lblTotal}</span><span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.orderTotalAmount|price_order:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.userCurrencyID:$resOrderDetails.userCurrencyExcRate}</span> </li>
                          </ul>
                        </div></td>
                    </tr>
                  </table>
                          {/if}
                </div>
              </div>
            </div>
            <!--End:Table Listing--> 
            {form->hidden name="paymentSettingsGroupID" value=$resOrderDetails.paymentSettingsGroupID}
            <br><br>
            <div class="manage_order_status padding-b-15 clearfix">
			<div id="common_message_error"></div>
              <div class="width-47per fixing_left manage-order">
                <h3 ><span>{$language.lblManageOrderStatus}</span></h3>
              <div class="pane02 ">
                <ul class="listing-03">
                  <li class="clearfix"> <span class="col-frst">{$language.lblPaymentMethod}</span> <span class="col-septr">:</span>
                    <div class="col-lst"><strong>
                                    {if $resOrderDetails.orderPaymentMethodName eq 'Account Credit'}
                                        {if ($resOrderDetails.orderUserCreditAmount>0)}Account Credit{/if}                                       
                                    {else if ($resOrderDetails.orderPaymentMethodName neq 'Account Credit') && ($resOrderDetails.orderUserCreditAmount>0) } {$resOrderDetails.orderPaymentMethodName} / Gift Card {else} {$resOrderDetails.orderPaymentMethodName} {/if}
                            </strong> </div>
                  </li>
                  {*<li class="clearfix"> <span class="col-frst">{$language.lblShowroom}</span> <span class="col-septr">:</span>
                    <div class="col-lst"><strong>
                                    {$resShowroom.name}<br/>
                                    {$resShowroom.address|nl2br}<br/>
                                    {$resShowroom.phone}<br/>
                                    {$resShowroom.email}<br/>
                            </strong> </div>
                  </li>   *}       
                   {*<li class="clearfix"> <span class="col-frst">{$language.lblCurrentOrderStatus}</span> <span class="col-septr">:</span>
                    <div class="col-lst"><strong> {$getDynOrderStatusByKey[$resOrderDetails.dynamicOrderStatus]}</strong> </div>
                  </li>*}
                  <li class="clearfix"> <span class="col-frst">
                    {$language.lblOrderStatus}</span> <span class="col-septr">:</span>
                    <div class="col-lst"> {form->select name="dynamicOrderStatus" caption="->Do not change" options=$dynamicOrdersStatus class="width-auto fixing_right select-box" style="width:100% !important" value=$resOrderDetails.dynamicOrderStatus}                   
                      {form->hidden name="currOrderStatus" value=$resOrderDetails.orderStatus} </div>
                  </li>
                  {if $resOrderDetails.reasonID|default:0>0}
                      {assign var="rmaReasonStyle" value=""}
                  {else}
                      {assign var="rmaReasonStyle" value="hide"}
                  {/if}
                  <li class="clearfix orderReason {$rmaReasonStyle}"> <span class="col-frst">{$language.lblReason}</span> <span class="col-septr">:</span>
                    <div class="col-lst">{form->select name="rmaReason" options=$resReasons class="width-auto select-box" style="width:100% !important"}
                  </li>
                  
                  {if $resAction|count>0}
                    {if $resOrderDetails.actionID|default:0>0}
                      {assign var="rmaActionStyle" value=""}
                    {else}
                      {assign var="rmaActionStyle" value="hide"}
                    {/if}
                    <li class="clearfix orderReason {$rmaActionStyle}"> <span class="col-frst">{$language.lblAction}</span> <span class="col-septr">:</span>
                      <div class="col-lst">{form->select name="rmaAction" options=$resAction class="width-auto select-box" style="width:100% !important"}
                    </li>
                  {else}
                      {form->hidden name="rmaAction" value="10"}
                  {/if}
                  
                  {*<li class="clearfix"> <span class="col-frst">{$language.lblCurrentPaymentStatus}</span> <span class="col-septr">:</span>
                    <div class="col-lst">{form->select name="paymentStatus" caption="->Do not change" options="Pending~*Denied~*Received~*Refunded~*Error" onchange="manageOrderStatus();" class="width-auto select-box" style="width:100% !important" value=$resOrderDetails.paymentStatus}
                      {form->hidden name="currPaymentStatus" value=$resOrderDetails.paymentStatus} </div>
                  </li>
                  <li class="clearfix notes-sec">  <span class="col-frst">{$language.lblPaymentNotes}</span> <span class="col-septr">:</span>
                    <div class="col-lst"><strong> {form->textarea name="PaymentNotes" id="PaymentNotes" class="textbox"  maxlength="175" value=$resOrderDetails.paymentNotes}</strong> </div>
                  </li>
                    <li class="clearfix">  <span class="col-frst">{$language.lblNotifyCustomer}</span> <span class="col-septr">:</span>
                      <div class="col-lst"><strong> {form->checkbox name="notifyCustomer" value="Yes" class="checkbox01" checked="{if $notifyCustomer|default:'' == 'Yes'}checked{/if}"}</strong> </div>
                  </li>*}
                  <li class="clearfix">
                    <div class="col-frst">&nbsp;</div>
                    <div class="col-septr">&nbsp;</div>
                    <div class="col-lst">
                      <div class="submit-block"> {form->hidden name="previousURl" value=$previousURl}
                        {form->submit name="submitOrder" class="button03 curve-3" value="{$language.lblUpdateStatus}"}
                        {$language.lblOr}
                        <input name="text3" type="reset"  value="{$language.lblListAll}" class="action-link2 button-link" />
                      </div>
                    </div>
                    <!--End:right-->
                    <div class="clear"></div>
                  </li>
				  
				 {*<li id="check_refund_now" class="clearfix " style="display: none;"> 
					<span class="col-frst">{$language.lblOrderRefundNote}</span> <span class="col-septr">:</span>
					<div class="col-lst">
						<strong>
						
								{$language.lblOrderRefundToGateway}
									
									{if $gateWayRefund|default:''=='No'}
										<br>{$language.errGateWayRefundNotSupport}
									{else}
										{if $paySetGroupKey == 'Authorize'}
											<br>{$language.lblOrderRefundAuthrizeNetText}
										{/if}
										{if $paySetGroupKey == 'Paypalexprescheckout' && $resOrderDetails.paymentType=='AUTH_ONLY'}
											<br>{$language.lblOrderRefundPaypalText}
										{/if}
										{if $paySetGroupKey == 'Paypalpro' && $resOrderDetails.paymentType=='AUTH_ONLY'}
											<br>{$language.lblOrderRefundPaypalText}
										{/if}
										{if $paySetGroupKey == 'Paypalexprescheckout' && $resOrderDetails.paymentType=='AUTH_CAPTURE'}
											<br>{$language.lblOrderRefundPaypalPaymentText}
										{/if}
										{if $paySetGroupKey == 'Paypalpro' && $resOrderDetails.paymentType=='AUTH_CAPTURE'}
											<br>{$language.lblOrderRefundPaypalPaymentText}
										{/if}
										{if $resShippingHistory|count >0}
											<br>{$language.lblOrderRefundNoteShipped}
										{/if}
									{/if}
							
							
							
						</strong>
					</div>
				</li>*}
				  
				{if $resRefundDetails|count >0}
					
				<li class="clearfix "> 
					<span class="col-frst">{$language.lblOrderRefundDetails}</span>
					<div class="col-lst">
							<div class="payment_response"> 
								<strong>{$language.lblOrderRefundResponse}</strong>
								<div class="padding-t-8 payment-responcediv">
									{$resRefundDetails.refundResponse|html_entity_decode}
								</div>
								<strong>{$language.lblDate}</strong>
								<div class="padding-t-8 payment-responcediv">
									{$resRefundDetails.completedDate|date_format:$date_format} 
									{$resRefundDetails.completedDate|date_format:$time_format}
								</div>
							</div>
					</div>
				</li>
				{/if}
				
				{*{if $orderstatuslog|count|default:0 >0}
					<li class="clearfix"> 
						<span class="col-frst">Order Status Log</span>
                        <span class="col-septr">:</span>
						<div class="col-lst">
						{foreach from=$orderstatuslog item="log" key="key1"}
								<p > 
									<strong>
										{if $log.dynamicOrderStatus!=''}
											{$getDynOrderStatusByKey[$log.dynamicOrderStatus]}
										{/if}
                                        ({$log.updatedDate|date_format:$date_format}
										{$log.updatedDate|date_format:$time_format})
									</strong>
                                            <br>{if $log.comments!=''}
										{if $log.adminName} {$log.adminName}{/if} -	{$log.comments}
										{/if}</br>
								</p>
						{/foreach}		
						</div>
					</li>
				{/if}*}
				
                </ul>
              </div>
			  </div>
                                    {if $resOrderDetails.orderSource =='amazon'}
                    <div class="width-47per fixing_right">
                    <h3 ><span>{$language.lblAmazonOrderDet}</span></h3>
                      <div  class=" pane02" >
                                    <ul class="listing-03">
                                            <li class="clearfix"> <span class="col-frst">{$language.lblOrderID}</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.order.AmazonOrderId}</span> </li>
                                            <li class="clearfix"> <span class="col-frst">{$language.lblOrderitemID}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.mPlaceOrderID}</span> </li>
                                            <li class="clearfix"> <span class="col-frst">{$language.lblOrderStatus}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.mPlaceOrderStatus}</span> </li>
                                            <li class="clearfix"> <span class="col-frst">{$language.lblEsku}</span> <span class="col-septr">:</span> <span class="col-lst">
                                                    {if is_array($unserializedExtraData.MarketPlaceDetails.admin.items.0)}
                                                    {$unserializedExtraData.MarketPlaceDetails.admin.items.0.SellerSKU}
                                                    {else}
                                                        {$unserializedExtraData.MarketPlaceDetails.admin.items.SellerSKU}
                                                        {/if}
                                                    </span> </li>
                                            <li class="clearfix"> <span class="col-frst">{$language.lblOrderDate}</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.order.PurchaseDate}</span> </li>
                                            <li class="clearfix"> <span class="col-frst">{$language.lblLastUpdateAt}</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.order.LastUpdateDate}</span> </li>							
                                    </ul>
                            </div> 
                    </div>
                    {else if $resOrderDetails.orderSource =='flipkart'}
				<div class="width-47per fixing_right">
				<h3 ><span>Flipkart Order Details</span></h3>
				  <div  class=" pane02" >
						<ul class="listing-03">
							<li class="clearfix"> <span class="col-frst">{$language.lblOrderID}</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.orderId}</span> </li>
							<li class="clearfix"> <span class="col-frst">{$language.lblOrderitemID}</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.orderItemId}</span> </li>
							<li class="clearfix"> <span class="col-frst">{$language.lblOrderStatus}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.mPlaceOrderStatus}</span> </li>
							<li class="clearfix"> <span class="col-frst">ListingId</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.listingId}</span> </li>
							<li class="clearfix"> <span class="col-frst">{$language.lblEsku}</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.sku}</span> </li>
							<li class="clearfix"> <span class="col-frst">{$language.lblOrderDate}</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.orderDate}</span> </li>
							<li class="clearfix"> <span class="col-frst">{$language.lblLastUpdateAt}</span> <span class="col-septr">:</span> <span class="col-lst">{$unserializedExtraData.MarketPlaceDetails.admin.updatedAt}</span> </li>							
						</ul>
					</div> 
				</div>
				{else}
			  {*<div class="width-47per fixing_right payment-sec">
              <h3 ><span>{$language.lblPaymentStatus}</span></h3>
              <div  class=" pane02" >
                <ul class="listing-03">
                  <li class="clearfix"> <span class="col-frst">{$language.lblPaymentType}</span> <span class="col-septr">:</span> <span class="col-lst">{$resOrderDetails.paymentType}</span> </li>
                  {if $resTransactionDetails.transactionID>0}
					<li class="clearfix"> <span class="col-frst">{$language.lblTransactionID}</span> <span class="col-septr">:</span> <span class="col-lst">{if $resTransactionDetails.transactionID} {$resTransactionDetails.transactionID}{/if}</span> </li>
                  {/if}
				  {if $sameTrasactionOrder|count >0}
					<li class="clearfix"> <span class="col-frst">{$language.lblSameTrasactionOrder}</span> <span class="col-septr">:</span> 
						<span class="col-lst">
						{foreach from=$sameTrasactionOrder item="trasactionOrder" key="key1"}
							{html->anchor href="/order/show/id/{$trasactionOrder.masterOrderID}/" caption="#{$trasactionOrder.orderNumber}"  class="" title="Show"}
							<br>
						{/foreach}
						</span> 
					</li>
                  {/if}
                </ul>
                <div class="payment_response"> <strong>{$language.lblPaymentResponse}</strong>
                  <div class="padding-t-8 payment-responcediv">{$transactionDescription|html_entity_decode}</div>
                </div>
                {if $resOrderDetails.paymentType eq 'AUTH_ONLY' && $resOrderDetails.paymentSettingsGroupID>0 && $resOrderDetails.paymentSettingsGroupID!=4 && $resOrderDetails.paymentSettingsGroupID!=17 && $resOrderDetails.paymentSettingsGroupID!=18}
                <div class="submit-block"> {form->submit name="completeOrder" class="button03 curve-3" value="{$language.lblCompleteOrder}"} </div>
                {/if} 
				</div>
                 
				</div>*}
                                {/if}
            </div>
			
			
            {form->close} </div>        
	</div> 
     
    </div>
  </div>
  <!--End:Content Container--> 
  {include file='CommonBottom.tpl'} </div>
<!--End:Outer Container--> 
{include file='CommonJavaScriptBottom.tpl'} 
<!--End:Outer Container--> 
{html->messages_script id="common_message"}
{html->messages_script section="rma" id="common_message_rma"}
</div>
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/tab.plugin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/table.plugin.js"></script> 
<script type="text/javascript"  src="{$view_javascript}/jquery.colorbox.js"></script>
<script type="text/javascript" src="{$view_javascript}/jquery-ui-timepicker-addon.js"></script>
{form->validate_script form="formCertificates"} 
{form->validate_script form="formChangeShippingStatus"} 
<script type="text/javascript">
var msgConfirmDelete="{$language.msgConfirmDelete}";
var lblSelectItems	=	"{$language.lblSelectItems}";
var lblNoDataDefault = "{$language.lblNoDataDefault}";
var msgShipMismatch = "{$language.msgShipMismatch}";
var msgDeliveredStatus = "{$language.msgDeliveredStatus}";
var msgPendingStatus = "{$language.msgPendingStatus}";
{literal}
$(document).ready(function(){
	$('#downloadLabel').click(function(){			
			setTimeout(function(){ window.location = window.location.href; }, 7000);
	})
        $("#createInvoiceLink,#InvoiceLink").colorbox({iframe:true, width:"90%", height:"90%"});
        $("#createReturn").colorbox({iframe:true, width:"80%", height:"90%"});
});	
{/literal}
</script>
{form->rootpath_script}
{form->basepath_script}
</body>
</html>
