<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"  dir="{if $languageDirection =='rtl'}rtl{else}ltr{/if}"> 
 <tr>
    <td align="center" valign="middle"><img src="{$view_images}/BMW_Invoice_Header.png"/></td>
  </tr>  
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="font-size:8pt;font-weight:400;">
      <tr> <td align="center" valign="bottom"><div style="font-weight:600;font-size:14pt;padding-bottom:10pt;font-family:BMWTypeGlobalPro">{$language.lblProductInfo}</div>
       </td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td height="20" style="height:20px;"></td>
  </tr>
  <tr>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="line-height:2.5pt;font-size:11pt;">
  <tr>
    <td width="15%" align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$language.lblModel}:</td>
    <td width="45%" align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$resSpecificationSummary['productTitle']}</td>
    <td width="2%" align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">&nbsp;</td>
    <td width="13%" align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$language.lblName}:</td>
    <td width="25%" align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$resSpecificationSummary['extraData']['informationDownload']['userFirstName']} {$resSpecificationSummary['extraData']['informationDownload']['userLastName']}</td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$language.lblColor}:</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$Color}</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">&nbsp;</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$language.lblEmail}:</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$resSpecificationSummary['extraData']['informationDownload']['userEmail']}</td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$language.lblUpholstery}:</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$Upholstery}</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">&nbsp;</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$language.lblContact}:</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">+{$resSpecificationSummary['extraData']['informationDownload']['userPhone']}</td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$language.lblWheel}:</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" colspan="3">{$Wheel}</td>
    <td align="{if $languageDirection =='rtl'}left{else}right{/if}" valign="top" rowspan="2" class="qrcode"><img src="{$resSpecificationSummary['qrimage']}" alt="qr code" title="qr code" height="80"/></td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$language.lblTrim}:</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" colspan="3">{$Trim}</td>
  </tr>
</table></td>
  </tr>
    
   <tr>
       <td><hr></td>
  </tr>
   <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:18pt;">
  <tr>
      
      <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" width="50%" ><span style="color:#1c69d4;">{$language.lblFinanceEMI}  </span></td>
    {*<td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" width="50%" ><span style="color:#1c69d4;">{$language.lblVechilePrice}  </span><br><small style="font-size:11pt;" >({$language.lblInclusiveVAT})</small></td>*}
    <td  align="{if $languageDirection =='rtl'}left{else}right{/if}" valign="top" width="50%">
       <table width="100%" border="0" cellspacing="0" cellpadding="0">    
  {*<tr>
    <td  align="{if $languageDirection =='rtl'}left{else}right{/if}" valign="top" style="color:#1c69d4;font-family:BMWTypeGlobalPro" >{$resSpecificationSummary['productOptionProductPrice']|price:'':$resSpecificationSummary['defaultCurrencyID']:$resSpecificationSummary['defaultCurrencyID']}</td></tr>*}
   <tr>
    <td  align="{if $languageDirection =='rtl'}left{else}right{/if}" valign="top" style="color:#1c69d4;font-family:BMWTypeGlobalPro" >{$resSpecificationSummary['monthlyInstallment']|price:'':$resOrderDetails['purchasedCurrency']:$resOrderDetails['userCurrencyID']} pm</td></tr>
    <tr>
    <td  align="{if $languageDirection =='rtl'}left{else}right{/if}" valign="top" style="font-size:10pt;color:#000;font-family:BMWTypeGlobalPro"></td></tr>
   <tr>
    <td  align="{if $languageDirection =='rtl'}left{else}right{/if}" valign="top" style="font-size:10pt;color:#000;font-family:BMWTypeGlobalPro">{$language.lblLeaseEMI} <strong> {$resSpecificationSummary.leasePrice|price:'':$resOrderDetails['purchasedCurrency']:$resOrderDetails['userCurrencyID']} pm</strong></td>
  </tr>
</table>
    </td>
  </tr>
</table>
    </td>
    </tr>
    <tr>
    <td height="10" style="height:10px;"></td>
  </tr>
   <tr>
       <td><hr></td>
  </tr>
  <tr>
    <td style="font-size:18pt;">{$resSpecificationSummary['productTitle']}</td>
  </tr>
   
   <tr style="page-break-after: always;"><td><img src="{$resSpecificationSummary['summaryImage']}" />
</td></tr>
  <tr >
    <td>
    	<table width="100%" style="font-size:14pt;font-weight:400;">
           <tr>
                        {assign var="counter" value="0"} 
                        {foreach name="customopts" from=$resSpecificationSummary['selectedvariants'] item="po" key="optkey"}
                        {if $counter=='2'}
                        </tr>
                        <tr> 
                        {/if}
                    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">
                    	<div style="padding-bottom:20px;font-family:BMWTypeGlobalPro">{$language.{"lbl"|cat:$po['optionName']}}</div>
                    	<div style="padding-bottom:30px;">
                          <table width="{if $po['optionName'] eq 'Wheel'}40{else if $po['optionName'] eq 'Color' }106{else}95%{/if}" border="0" cellspacing="0" cellpadding="0" style="width: {if $po['optionName'] eq 'Wheel'}40px{else if $po['optionName'] eq 'Color' }106px{else}95%{/if}">
                       <tr>
                           <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">
                               {*<img src="{$view_public_path}/uploads/catalog/custom-option-variant/{$po['variantImage']}" width="{if $po['optionName'] eq 'Wheel'}40{else}106{/if}"/>*}
                               {if $po['optionName'] eq 'Upholstery'}
                                    <img src="{$view_public_path}/uploads/catalog/vehicles/thumb/{$resSpecificationSummary['summaryIntrImage']}" width="500"/>
                               {elseif $po['optionName'] eq 'Trim'}
                                   <img src="{$view_public_path}/uploads/catalog/vehicles/thumb/{$resSpecificationSummary['summaryTrimImage']}" width="500"/>
                                {else}   
                                    <img src="{$view_public_path}/uploads/catalog/custom-option-variant/{$po['variantImage']}" width="{if $po['optionName'] eq 'Wheel'}40{else}106{/if}"/>
                               {/if}
                           </td>
                       </tr>
                            </table>
                       <br />
                        <span style="font-size:9pt;font-family:BMWTypeGlobalPro">{$po['variantName']}</span>
                        </div>
                    </td>
                    {assign var="counter" value=$counter+1}
                          {/foreach}
                           </tr>
            </table>
    </td>
  </tr>
   <tr>
    <td height="20" style="height:20px;"></td>
  </tr> 
   <tr>
    <td  align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" style="font-size:14pt;font-weight:400;line-height:2pt">{$language.lblSpecifications}</td>
  </tr>
   <tr>
    <td height="20" style="height:20px;"></td>
  </tr> 
   <tr>
    <td>
    	<table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:10pt;font-weight:400;line-height:1.5pt">
         {assign var="spaceCounter" value="0"} 
		 {foreach name="specs" from=$resSpecificationSummary['specificationDetails'] item="po" key="optkey"}
  <tr>
	  {if $po['value'] eq 'space'}
		{assign var="spaceCounter" value=$spaceCounter+1}
	  {else}
		{assign var="spaceCounter" value="0"} 
	  {/if}
      {if {$po['value']} neq 'space'} 
          {if $po.type eq 'H'}
           <td width="10%"  valign="top" height="25"></td>
            <td  align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" style="font-size:11pt;">{$po['value']|upper}</td>
          {else}
             <td width="10%" align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" >{$po['profileCode']}</td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" width="90%" >{$po['value']|upper}</td> 
          {/if}    
    {else}
		{if $spaceCounter eq 1}
			<td colspan='3' height="30px;" valign="middle" width="100%"> <hr></td>
		{/if}
    {/if}
  </tr>
  {/foreach}
</table>

    </td>
  </tr>
  <tr>
    <td height="10" style="height:10px;"></td>
  </tr>
  <tr>
       <td><hr></td>
  </tr>
  {if !empty($resSpecificationSummary['serviceDetails'])}
   <tr> 
    <td height="20" style="height:20px;"></td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" style="font-size:14pt;font-weight:400;line-height:2pt">{$language.lblServicePackageDetails}</td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">{$resSpecificationSummary['serviceDetails']}</td>
  </tr>
   {/if}  
   
   <tr>
    <td height="10" style="height:10px;"></td>
  </tr>
 
   
   <tr>
    <td height="10" style="height:10px;"></td>
  </tr>
   <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" style="font-size:15pt;font-weight:700;line-height:2pt">{$language.lblForfurtherdetailscontact}</td>
  </tr> 
  
   <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:13pt;">
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" style="line-height:2pt;font-size:15pt;font-family:BMWTypeGlobalPro">{$resSpecificationSummary['showroomDetails']['name']}</td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" >{$resSpecificationSummary['showroomDetails']['address']|nl2br}</td>
  </tr>
  
</table>
       </td></tr>

<tr>
    <td height="20" style="height:20px;"></td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" >
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="line-height:2pt;font-size:10pt;color:#666">
  
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="middle" width="25" height="25"><img src="{$view_images}/phone-receiver.gif" width="16" height="16" hspace="0" vspace="0"  /></td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="middle" ><a href="tel:{$resSpecificationSummary['showroomDetails']['codedPhone']}">{$resSpecificationSummary['showroomDetails']['phone']}</a></td>
  </tr>
</table>
   </td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="center">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="middle" width="25" height="25"><img src="{$view_images}/mail-black-envelope-symbol.gif" width="16" height="16" hspace="0" vspace="0"  /></td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="middle" >{$resSpecificationSummary['showroomDetails']['email']}</td>
  </tr>
</table>
   </td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="center">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="middle" width="25" height="25"><a href="{$resSpecificationSummary['showroomDetails']['mapLink']}" ><img src="{$view_images}/placeholder-filled-point.gif" width="16" height="16" hspace="0" vspace="0"  /></a></td>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="middle" ><a href="{$resSpecificationSummary['showroomDetails']['mapLink']}" style="color:#666;text-decoration: none;font-family:BMWTypeGlobalPro">Get Directions</a></td>
  </tr>
</table>
    </td>
  </tr>
  
</table>
        
    </td>
  </tr>
  <tr>
    <td height="10"></td>
  </tr>
  <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" style="font-size:13pt">
        {$language.lblDisclaimer}:
    </td>
  </tr>
   <tr>
    <td align="{if $languageDirection =='rtl'}right{else}left{/if}" valign="top" style="font-size:13pt">
        {$language.lblDisclaimerPDFText}
        </td>
  </tr>

</table>