<!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">
<style type="text/css" media="print">
.main-table {
	background-color: #ffffff !important;
}
{literal}
@media print
  {
  .print {display:none;}
  .table_listing{height:auto;}
  }
  {/literal}
</style>
</head>
<body ng-controller="SearchCtrl"> 
<img src="{$view_images}/print-icon.png" width="24" height="24" alt="print" class="print" onclick="window.print();"/> 
<table class="main-table" style="height: 100%; background-color: #f4f6f8; font-size: 12px; font-family: Arial;" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tbody>
    <tr>
      <td style="width: 100%; height: 100%;" align="center">
      <table style=" width: 602px; table-layout: fixed; margin: 24px 0 24px 0;" border="0" cellpadding="0" cellspacing="0">
          <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: 27px 0px 0px 0px; border-bottom: 1px solid #868686; margin-bottom: 8px;" border="0" cellpadding="0" cellspacing="0" width="100%">
                   <tbody>
                    <tr>
                      <td style="padding-bottom: 3px;" align="left" valign="middle">
						{if $commonCompanyLogo} 
							<img src='{$commonCompanyLogo}' border='0' alt='Logo' />
						{else}
							{$commonSiteName}
						{/if} 
						</td>
                      <td style="text-align: right;  font: bold 26px Arial; text-transform: uppercase;  margin: 0px;" valign="bottom" width="40%">Invoice</td>
                    </tr>
                  </tbody>
                </table>
                  <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr valign="top">
                      <td width=" 50%" style=" padding: 14px 0px 0px 2px; font-size: 12px; font-family: Arial;">
                      <h2 style="font: bold 12px Arial; margin: 0px 0px 3px 0px;">{$resProductOrderDetails[0]['businessName']}</h2>
							  {$resBusinessDetails.businessAddress|address_format:$languageIDs}
							</td>
                      <td style="padding-top: 14px;padding-left:15px;"><h2 style="font: bold 17px Tahoma; margin: 0px;">{$language.lblOrderID}&nbsp;{$resOrderDetails.orderNumber}</h2>
                        <table border="0" cellpadding="0" cellspacing="5">
                            <tr valign="top">
                              <td style="font-size: 12px; font-family: verdana, helvetica, arial, sans-serif; text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$language.lblOrderStatus}:</td>
                              <td style="font-size: 12px; font-family: Arial;" width="100%">{$resOrderDetails.orderStatus}</td>
                            </tr>
                            <tr valign="top">
                              <td style="font-size: 12px; font-family: verdana, helvetica, arial, sans-serif; text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$language.lblOrderedAt}:</td>
                              <td style="font-size: 12px; font-family: Arial;">{$resOrderDetails.orderCreatedDate|date_format:$settingsDateFormat|default:''}</td>
                            </tr>
                            <tr valign="top">
                              <td style="font-size: 12px; font-family: verdana, helvetica, arial, sans-serif; text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$language.lblPaymentStatus}:</td>
                              <td style="font-size: 12px; font-family: Arial;">{$resOrderDetails.paymentStatus}</td>
                            </tr>
                              {if $resProductOrderDetails[0]['shippingMethod'] !=''}
                            <tr valign="top">
                              <td style="font-size: 12px; font-family: verdana, helvetica, arial, sans-serif; text-transform: uppercase; color: #000000; padding-right: 10px; white-space: nowrap;">{$language.lblShippingMethod}:</td>
                              <td style="font-size: 12px; font-family: Arial;"> {$resProductOrderDetails[0]['shippingMethod']} </td>
                            </tr>
                             {/if}
                         
                        </table>
                        </td>
                    </tr>
                  </table>
                <table style="padding: 32px 0px 24px 0px;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                     <tr valign="top">
                      <td style="font-size: 12px; font-family: Arial; padding-right: 10px; " width="34%"><h3 style="font: bold 17px Tahoma; padding: 0px 0px 3px 1px; margin: 0px;">{$language.lblBillinginfo}</h3>
                        <p style="margin: 2px 0px 3px 0px;">  {$resOrderDetails.billingAddress|address_format:$languageIDs} </p>
                        {if $resBillAddress['billingPhone']}
                        <p style="margin: 2px 0px 3px 0px;">{$resBillAddress['billingPhone']|escape} </p> {/if}
                        <p style="margin: 2px 0px 3px 0px;"> <a href="mailto:{$resBillAddress['billingEmail']}">{$resBillAddress['billingEmail']}</a></p>
                        
                       </td>
                      <td style="font-size: 12px; font-family: Arial;" width="33%"><h3 style="font: bold 17px Tahoma; padding: 0px 0px 3px 1px; margin: 0px;">{$language.lblShippinginfo}</h3>
                        <p style="margin: 2px 0px 3px 0px;"> {$resOrderDetails.shippingAddress|address_format:$languageIDs}</p>
                        {if $shippingPhone}<p style="margin: 2px 0px 3px 0px;">{$shippingPhone|escape} </p> {/if}
                      </td>
                    </tr>
                  
                </table>
                <table style="background-color: #dddddd;" cellpadding="0" cellspacing="1" width="100%">
                 
                    <tr>
                      <th width="30%" align="left" valign="middle" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; font-family: Arial;">{$language.lblProduct}</th>
                       <th width="20%" align="left" valign="middle" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; font-family: Arial;"> {$language.lblShipmentStatus}</th>
                     
                      <th align="right" valign="top" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; font-family: Arial;">{$language.lblQuantity}</th>
                      <th align="right" valign="top" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; font-family: Arial;">{$language.lblPrice}</th>
                      <th align="right" valign="middle" style="background-color: #eeeeee; padding: 6px 10px; white-space: nowrap; font-size: 12px; font-family: Arial;">{$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; font-family: Arial;"> {$product.productTitle}
                        <p style="margin: 2px 0px 3px 0px;"> {$resOrderDetails.productType}</p>
                        <br>
                        <strong>option :</strong>&nbsp;
                         {$product.productOptionName}
                         {assign var="unserialize" value=$product.extra|unserialize}
                         {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}
                                     <strong>Options:</strong>&nbsp;{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; font-family: Arial;">
						{if $product.shipmentStatus== 'Delivered'}
							{$language.lblShipped}
						{else}
							{$language.lblPending}
						{/if}
					</td>
                      <td align="right" valign="top" style="padding: 5px 10px; background-color: #ffffff; font-size: 12px; font-family: Arial;">{$product.orderItemQuantity}</td>
                      <td align="right" valign="top" style="padding: 5px 10px; background-color: #ffffff;  font-size: 12px; font-family: Arial;">{$product.orderItemPrice|price:'':$product.purchasedCurrency:$product.purchasedCurrency}<br />
                        {if $product.isTaxable|default:''=="Yes"}<span class="text-style05">({$language.lblTaxable})</span>{/if}</td>
                      <td align="right" valign="top" style="padding: 5px 10px; background-color: #ffffff;  white-space: nowrap; font-size: 12px; font-family: Arial;">{$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 style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;"><strong>{$language.lblSubtotalAmount} :</strong>&nbsp;</td>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;">{$resOrderDetails.orderSubtotal|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                              {if $resOrderDetails.orderOtherServiceCharge>0}
                            <tr>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;"><strong>{$language.lblServiceCharge}</strong>&nbsp;</td>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;">{$resOrderDetails.orderOtherServiceCharge|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                               {if $resOrderDetails.orderPromoDiscountAmount>0}
                            <tr>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;"><strong>{$language.lblDiscount}</strong>&nbsp;</td>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;">{$resOrderDetails.orderPromoDiscountAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}<br >
                              {$resOrderDetails.orderPromoCode}</td>
                            </tr>
                             {/if}
                              {if $resOrderDetails.orderUserCreditAmount>0}
                            <tr>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;"><strong>{$language.lblCreditAmount}</strong>&nbsp;</td>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;">{$resOrderDetails.orderUserCreditAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                            {if $resOrderDetails.orderTaxAmount>0}
                            <tr>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;"><strong>{$language.lblTaxAmount}</strong>&nbsp;</td>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;">{$resOrderDetails.orderTaxAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                             {if $resOrderDetails.shippingAmount>0}
                            <tr>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;"><strong>{$language.lblShippingAmount}</strong>&nbsp;</td>
                              <td style="text-align: right; white-space: nowrap; font-size: 12px; font-family: Arial;">{$resOrderDetails.shippingAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</td>
                            </tr>
                             {/if}
                            <tr>
                              <td colspan="2"><hr style="border: 0px solid #d5d5d5; border-top-width: 1px;"></td>
                            </tr>
                            <tr>
                              <td style="text-align: right; white-space: nowrap; font: 15px Tahoma;">Total Amount:&nbsp;</td>
                              <td style="text-align: right; "><strong style="font:normal 17px Tahoma;">{$resOrderDetails.orderTotalAmount|price:'':$resOrderDetails.purchasedCurrency:$resOrderDetails.purchasedCurrency}</strong></td>
                            </tr>
                        </table></td>
                    </tr>
                </table>
                </td>
            </tr>
          </tbody>
        </table></td>
    </tr>
  </tbody>
</table>
</body>
</html>
