<!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"  ng-app="myapp">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="{$view_styles}/theme.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css" media="print">
.main-table {
	background-color: #ffffff !important;
}
    
{literal}
@media print
  {
  .print {display:none;}
  .table_listing{height:auto;}
      .display-ib{display:inline-block;}
  }
     
    
  {/literal}
   
</style>
 
</head>
<body class=" {$languageDirection}">
 
<table class="main-table" style="height: 100%; background-color: #f4f6f8;font-family:arial;" border="0" cellpadding="0" cellspacing="0" width="100%" dir="{$languageDirection}">
  <tbody>
    <tr>
      <td style="width: 100%; height: 100%;" align="center">
          <img src="{$view_images}/print-icon.png" width="17" height="17" alt="print" class="print fixing_right" onclick="window.print();" style="float: right; padding: 10px;"/>
      <table style=" width: 602px; table-layout: fixed; margin: 24px 0 24px 0;" border="0" cellpadding="0" cellspacing="0" dir="{$languageDirection}">
          <tbody>
            <tr>
              <td style="background-color: #ffffff; border: 1px solid #e6e6e6; margin: 0 auto 0 auto; padding: 0 44px 0 46px; text-align: left;">
              <table style="padding: 15px 0px 15px 0px; border-bottom: 1px solid #868686; margin-bottom: 8px;" border="0" cellpadding="0" cellspacing="0" width="100%" dir="{$languageDirection}" >
                   <tbody>
                    <tr>
                     
                      <td  align="left" style="font-size: 26px; text-transform: uppercase;  margin: 0px;" valign="bottom" width="40%">{$language.lblInvoice}</td>
                         <td style="padding-bottom: 3px;" align="right" valign="middle">
						 {if $defaultLogo} 
			     <img src='{$view_public_path}/uploads/languages/logo/{$defaultLogo}' alt='Logo' class='img-responsive'>
                {else}
                          
                    {if $commonCompanyLogo} 
                        <img src='{$commonCompanyLogo}' border='0' alt='Logo' class='img-responsive'>
					{else}
					  <h2>{$commonSiteName}</h2>
					{/if} 
              {/if}
						</td>
                    </tr>
                  </tbody>
                </table>
                  <table border="0" cellpadding="0" cellspacing="0" width="100%" dir="{$languageDirection}"> 
                    <tr valign="top">
                      <td width=" 50%" align="left" style=" padding: 14px 0px 0px 2px; font-size: 12px; line-height:20px; ">
                      <h2 style="font-size:16px; margin: 0px 0px 3px 0px;">{$commonSiteName}</h2>
							  {$adminInfo}
							</td>
                      <td align="left" style="padding-top: 14px;padding-left:15px;"><h2 style="font-size: 17px; margin: 0px;">{$language.lblOrderID}&nbsp;{$resOrderDetails.orderNumber}</h2>
                        <table border="0" cellpadding="0" cellspacing="5" class="orderID {$languageDirection}"> 
                            <tr valign="top">
                              <td style="font-size: 12px;  text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$language.lblOrderStatus}:</td>
                              <td style="font-size: 12px; " width="100%"><span> {$getDynOrderStatusByKey.{$resOrderDetails.dynamicOrderStatus}}</span></td>
                            </tr>
                            <tr valign="top">
                              <td style="font-size: 12px;  text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$language.lblOrderedAt}:</td>
                              <td style="font-size: 12px; ">{$resOrderDetails.orderCreatedDate|date_format:$settingsDateFormat|default:''}</td>
                            </tr>
                            <tr valign="top">
                              <td style="font-size: 12px;  text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$language.lblPaymentStatus}:</td>
                              <td style="font-size: 12px; ">{$resOrderDetails.paymentStatus}</td>
                            </tr>
                              {if $resProductOrderDetails[0]['shippingMethod'] !=''}
                            <tr valign="top">
                              <td style="font-size: 12px;  text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$language.lblShippingMethod}:</td>
                              <td style="font-size: 12px; "><span>

                                  {if $resProductOrderDetails[0]['shippingMethod'] eq "One Day Delivery"}
                                        {$language.lblOneDayDelivery}
                                        {else if $resProductOrderDetails[0]['shippingMethod'] eq "Free Shipping"}
                                        {$language.lbFreeShipping}
                                        {else if $resProductOrderDetails[0]['shippingMethod'] eq "Flat Rate Shipping"}
                                        {$language.lblFlatRateShipping}
                                        {else if $resProductOrderDetails[0]['shippingMethod'] eq "Same Day Delivery"}
                                        {$language.lblSameDayDelivery}
                                        {else if $resProductOrderDetails[0]['shippingMethod'] eq "All For Free"}
                                        {$language.lblAllForFree}
                                        {else if $resProductOrderDetails[0]['shippingMethod'] eq "Quick Delivery"}
                                        {$language.lblQuickDelivery}
                                        {else if $resProductOrderDetails[0]['shippingMethod'] eq "Same Day Delivery"}
                                        {$language.lblSameDayDelivery}
                                        {else if $resProductOrderDetails[0]['shippingMethod'] eq "Next Day Delivery"}
                                        {$language.lblNextDayDelivery}
                                        {else if $resProductOrderDetails[0]['shippingMethod'] eq "Jihazi Delivery" || $resProductOrderDetails[0]['shippingMethod'] eq "Jihazi Delivery Charge"}
                                        {$language.lblJihaziDelivery}
                                        {/if}
                               
                             {*   {$resProductOrderDetails[0]['shippingMethod']} *}</span> </td>
                            </tr>
                             {/if}                            
                        </table>
                        </td>
                    </tr>
                  </table>
                <table style="padding: 32px 0px 24px 0px;" border="0" cellpadding="0" cellspacing="0" width="100%" dir="{$languageDirection}">
                                     <tr valign="top">
                      <td width="34%" align="left" style="font-size: 12px;  padding-right: 10px; "><h3 style="font-size:17px; padding: 0px 0px 3px 1px; margin: 0px;">{$language.lblBillinginfo}</h3>
                        <p style="margin: 2px 0px 3px 0px;line-height:18px;">  {$resOrderDetails.billingAddress|address_format:$languageIDs} </p>
                        {if $resBillAddress['billingPhone']}
                        <p style="margin: 2px 0px 3px 0px;line-height:18px;">{$resBillAddress['billingPhone']|escape} </p> {/if}
                        <p style="margin: 2px 0px 3px 0px;line-height:18px;"> <a href="mailto:{$resBillAddress['billingEmail']}">{$resBillAddress['billingEmail']}</a></p>
                        
                       </td>
                      <td width="33%" align="left" style="font-size: 12px; "><h3 style="font-size: 17px; padding: 0px 0px 3px 1px; margin: 0px;">{$language.lblShippinginfo}</h3>
                        <p style="margin: 2px 0px 3px 0px;line-height:18px;"> {$resOrderDetails.shippingAddress|address_format:$languageIDs}</p>
                         {if $shippingPhone}
                        <p style="margin: 2px 0px 3px 0px;line-height:18px;">{$shippingPhone|escape} </p> {/if}
                      </td>
                    </tr>
                  
                </table>
               {assign var="taxDescription" value=""}       
                <table style="background-color: #dddddd;" cellpadding="0" cellspacing="1" width="100%" dir="{$languageDirection}">
                 
                    <tr>
                      <th width="30%" align="left" valign="middle" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; ">{$language.lblProduct}</th>
                       <th width="20%" align="left" valign="middle" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; "> {$language.lblShipmentStatus}</th>
                     
                      <th align="left" valign="middle" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; ">{$language.lblQuantity}</th>
                      <th align="left" valign="middle" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; ">{$language.lblPrice}</th>
                      <th align="left" valign="middle" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; ">{$language.lblTotal}</th>
                    </tr>
                    {foreach from=$resProductOrderDetails item="product" key="key1"}
                    {assign var="discount" value=$product.productOptionRegularPrice-$product.productOptionProductPrice}
                    <tr>
                      <td align="left" valign="top" style="padding: 5px 10px; background-color: #ffffff; font-size: 12px; "> {$product.productTitle}
                        {if $product.productTitle neq $product.productOptionName}
                        <br/> {$product.productOptionName}
                          {/if}
                          {if $product.sellAsBatch eq 'Yes'}
                            <small><br/>{$language.lblSetOf} {$product.qtyPerBatch} {$product.batchType}<br/></small>
                        {/if}
                         {assign var="unserialize" value=$product.extra|unserialize}
                         {if $settingsTaxApplicable eq 'Yes' && $unserialize.orderItemTaxDescription neq ''} 		
                                {assign var="taxDescription" value="{$unserialize.orderItemTaxDescription}"}
                        {/if}
                         {if $unserialize.combinationValues.customOption|default:array()|count >0}
                        <strong>{$language.lblCombinationSKU} </strong>&nbsp; - {$unserialize.combinationValues.cimbinationSKU}<br />
                       {foreach from=$unserialize.combinationValues.customOption item="combination" key="key"}
											{if $key neq 0}<span class="x-style">X </span>{/if}
											{$combination.customOptionName}{$combination.variantValue}
										{/foreach}
                                     {/if}<br />
                                     {if $unserialize.customOptionValues|count >0}
                                   {foreach from=$unserialize.customOptionValues item="customOptionValues"}
                        {$customOptionValues.0.customOptionName}
                        {foreach from=$customOptionValues item="customOption" key="key"}
											{if $customOption.inputType != 'file'}
												{$customOption.variantValue}{if $key >0},{/if}
											{else if $customOption.inputType == 'file' && $customOption.variantValue!=''}
												{html->anchor href="/cart/getFile/id/{$customOption.variantValue}/" 
												caption=$customOption.variantValue 
												title=$customOption.customOptionName}
											{/if}
										{/foreach}
                                        
                                        {/foreach}
                                        {/if}
                                         {if $product.carrierDetails!=''}<br>
                        <strong> {$language.lblShippingDetails} :</strong> {$product.carrierDetails}
                        {/if}
                        </td>
                         <td align="left" valign="top" style="padding: 5px 10px; background-color: #ffffff; font-size: 12px; ">
						{if $product.shipmentStatus== 'Delivered'}
							{$language.lblDelivered}
						{else if $product.shipmentStatus== 'Shipment'}
                                                        {$language.lblShipped}
                                                {else if $product.shipmentStatus== 'Dispatched'}
                                                        {$language.lblDispatched}
                                                {else if $product.shipmentStatus== 'Pickup'}
                                                       {$language.lblShipped}
                                                {else if $product.shipmentStatus== 'Cancelled'}
                                                        {$language.lblCancelled}
                                                {else}
                                                        {$language.lblShippingPending}
                                                {/if}
					</td>
                      <td align="left" valign="top" style="padding: 5px 10px; background-color: #ffffff; font-size: 12px; ">{$product.orderItemQuantity}</td>
                      <td align="left" valign="top" style="padding: 5px 10px; background-color: #ffffff;  font-size: 12px; ">{$product.orderItemPrice|price:'':$product.purchasedCurrency:$product.purchasedCurrency}<br />
                        {if $product.isTaxable|default:''=="Yes"}<span class="text-style05">({$language.lblTaxable})</span>{/if}</td>
                      <td align="left" valign="top" style="padding: 5px 10px; background-color: #ffffff;  white-space: nowrap; font-size: 12px; ">{$product.orderItemSubtotal|price:'':$product.purchasedCurrency:$product.purchasedCurrency}</td>
                    </tr>
                     {/foreach}
                </table>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                      <td align="right"><table style="padding: 3px 0px 12px 0px;" border="0" width="70%">
                          <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; "><strong>{$language.lblSubtotalAmount} :</strong>&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; ">{$resOrderDetails.orderSubtotal|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                              {if $resOrderDetails.orderOtherServiceCharge>0}
                            <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; "><strong>{$language.lblServiceCharge}</strong>&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; ">{$resOrderDetails.orderOtherServiceCharge|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                             {if $resOrderDetails.orderConvenientFee>0}
                             <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; "><strong>{$language.lblConvenientFee}</strong>&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; ">{$resOrderDetails.orderConvenientFee|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>                            
                            {/if}
                               {if $resOrderDetails.orderPromoDiscountAmount>0}
                            <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; "><strong>{$language.lblDiscount}</strong>&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; ">{$resOrderDetails.orderPromoDiscountAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}<br >
                              {$resOrderDetails.orderPromoCode}</td>
                            </tr>
                             {/if}
                              {if $resOrderDetails.orderUserCreditAmount>0}
                            <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; "><strong>{$language.lblCreditAmount}</strong>&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; ">{$resOrderDetails.orderUserCreditAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                            {if $resOrderDetails.orderTaxAmount>0}
                            <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; "><strong>{$language.lblTaxAmount}{if $taxDescription|default:'' neq ''} - {$taxDescription}{/if}</strong>&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; ">{$resOrderDetails.orderTaxAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                             {if $resOrderDetails.shippingAmount>0}
                            <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; "><strong>{$language.lblShippingAmount}</strong>&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; ">{$resOrderDetails.shippingAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                             {if $resOrderDetails.redeemDiscountAmount>0}
                            <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; "><strong>{$language.lblRedeemAmount}</strong>&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font-size: 12px; ">- {$resOrderDetails.redeemDiscountAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                             
                            <tr align="right" valign="middle">
                              <td colspan="2"><hr style="border: 0px solid #d5d5d5; border-top-width: 1px;"></td>
                            </tr>
                            <tr>
                              <td align="right" valign="middle" style="text-align: right; white-space: nowrap; font: 15px Tahoma;">{$language.lblTotalAmount}:&nbsp;</td>
                              <td align="right" valign="middle" style="text-align: right;font-size:17px; ">
                                 {$resOrderDetails.orderTotalAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                      </table></td>
                    </tr>
                </table>
                </td>
            </tr>
          </tbody>
        </table></td>
    </tr>
  </tbody>
</table>
</body>
</html>
