{*
* 2007-2020 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@buy-addons.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author    Buy-addons    <contact@buy-addons.com>
* @copyright 2007-2020 Buy-addons
* @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{capture name=path}
    <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
        {l s='My account' mod='askforaquotemodul'}
    </a>
    {if $logged}
        <a href="{$link_myquote_seo|escape:'htmlall':'UTF-8'}" style="padding-left:15px;">
            {l s='Your quotes' mod='askforaquotemodul'}
        </a>
    {else}
        <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" style="padding-left:15px;">
            {l s='Your quotes' mod='askforaquotemodul'}
        </a>
    {/if}
    <span class="navigation_page" style="padding-left:15px;">
        {l s='Quote Detail' mod='askforaquotemodul'}
    </span>
{/capture}
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
<div class="success_send_mail_customer">
</div>
<div class="myquote_detail_customer">
    <div class = "form-horizontal clearfix bootstrap panel col-lg-12" style = "margin-top: 8px;border: 1px solid #dadada;border-radius: 4px;z-index:2">
        <div class = "panel-heading col-lg-12 header_quote_customer">
             <i class = "fa fa-calculator"></i> <label>{l s='Quote' mod='askforaquotemodul'}</label>
        </div>
        <form method="POST" action="">
            <div class="bootstrap panel col-lg-6 info_customer">
                <div class="panel-heading col-lg-12x header_customer">
                     <i class = "icon-user"></i> <label>{l s='Customer' mod='askforaquotemodul'}</label>
                </div>
                <div style="margin: 20px 0px 30px 42px;" class="quotedetailcustomer_customer" >
                    <div class = "dp_info_cus">
                        <label class="control-label col-lg-4 title_dbboo">
                            <span class="label-tooltip">
                                {l s='First name :' mod='askforaquotemodul'}
                            </span>
                        </label>
                        <span class="col-lg-4 ">                    
                            <span name="firstname" id="firstname" style = "width:240px;">{$tb_quote_dbboo[0]['first_name']|escape:'htmlall':'UTF-8'}</span>                                                
                        </span>
                    </div>
                    <div class = "dp_info_cus">
                        <label class="control-label col-lg-4 title_dbboo">
                            <span class="label-tooltip">
                                {l s='Last name :' mod='askforaquotemodul'}
                            </span>
                        </label>
                        <span class="col-lg-4 ">                    
                            <span name="lastname" id="lastname" style = "width:240px;">{$tb_quote_dbboo[0]['last_name']|escape:'htmlall':'UTF-8'}</span>                                            
                        </span>
                    </div>
                    {if $tb_quote_dbboo[0]['company_name'] != null}
                        <div class = "dp_info_cus">
                            <label class="control-label col-lg-4 title_dbboo">
                                <span class="label-tooltip">
                                    {l s='Company name :' mod='askforaquotemodul'}
                                </span>
                            </label>
                            <span class="col-lg-4 ">                    
                                <span name="companyname" id="companyname" style = "width:240px;">{$tb_quote_dbboo[0]['company_name']|escape:'htmlall':'UTF-8'}</span>                                            
                            </span>
                        </div>
                    {/if}
					{if $tb_quote_dbboo[0]['company_address']}
                        <div class = "dp_info_cus">
                            <label class="control-label col-lg-4 title_dbboo">
                                <span class="label-tooltip">
                                    {l s='Company address :' mod='askforaquotemodul'}
                                </span>
                            </label>
                            <span class="col-lg-4 ">                    
                                <span name="companyaddress" id="companyaddress" style="width:240px;">{$tb_quote_dbboo[0]['company_address']|escape:'htmlall':'UTF-8'}</span>                                            
                            </span>
                        </div>
                    {/if}
                    <div class = "dp_info_cus ">
                        <label class="control-label col-lg-4 title_dbboo">
                            <span class="label-tooltip txtPhone">
                                {l s='Phone :' mod='askforaquotemodul'}
                            </span>
                        </label>
                        <span class="col-lg-4 ">                    
                            <span name="phone" id="phone" style = "width:240px;">{$tb_quote_dbboo[0]['phone']|escape:'htmlall':'UTF-8'}</span>                                    
                        </span>
                    </div>
                    <div class = "dp_info_cus">
                        <label class="control-label col-lg-4 title_dbboo">
                            <span class="label-tooltip txtEmail">
                                {l s='Email :' mod='askforaquotemodul'}
                            </span>
                        </label>
                        <span class="col-lg-4 ">                    
                            <span name="email" id="email" style = "width:240px;">{$tb_quote_dbboo[0]['email']|escape:'htmlall':'UTF-8'}</span>                                
                        </span>
                    </div>
                </div>
            </div>
        </form>


        <form method="POST" action="">
            <div class = "bootstrap panel col-lg-5 mess_cus_rep">
                <div class = "panel-heading col-lg-12 mess_cus_rep-header" style="border-bottom-color: #dedede;">
                     <i class="fa fa-envelope" aria-hidden="true"></i><label style="margin-left:20px;">{l s='Order Notes' mod='askforaquotemodul'}</label>
                </div>
                <div class = "box_message">
                    {foreach from=$detail_mess key=key_m item=item_m}
                        {if $item_m['type'] == 0}
                            <div class = "message_quote_adm">
                                <div class = "box_chat">
                                    <span class = "text_chat">{$item_m['content_mes']|escape:'htmlall':'UTF-8'|nl2br nofilter}</span>
                                </div>
                                <div class = "date_info">
                                    {l s='added on' mod='askforaquotemodul'} {$item_m['date_send_format_2']|escape:'htmlall':'UTF-8'} {l s='by' mod='askforaquotemodul'} {$item_m['email']|escape:'htmlall':'UTF-8'} 
                                </div>
                            </div>
                        {else}
                            <div class = "message_quote_adm" >
                                <div class = "box_chat" style = "background-color:#e8d6b7;">
                                    <span class = "text_chat">{$item_m['content_mes']|escape:'htmlall':'UTF-8'|nl2br nofilter}</span>
                                </div>
                                <div class = "date_info">
                                    {l s='added on' mod='askforaquotemodul'} {$item_m['date_send_format_2']|escape:'htmlall':'UTF-8'} {l s='by' mod='askforaquotemodul'} {$item_m['email']|escape:'htmlall':'UTF-8'} 
                                </div> 
                            </div>
                        {/if}
                    {/foreach}
                </div>
                <div class = "header_messages" >
                    <span>{l s='Messages' mod='askforaquotemodul'}</span><i class = "icon-envelope" style = "margin-left:10px;"></i> 
                </div>
                <div class = "text_message_adm">
                    <textarea style="width:100%;border-radius: 4px;border-color:#bbbbbb;margin-bottom: 20px;" name="message_customer" class = "content_mess_customer" rows="4" cols="5"></textarea>
                </div>
            
                <div class = "btn_message_adm">
                    <a name= "btn_send_by_customer" style="background: #f6f6f6;" id_quote_customer_dbboo = "{$tb_quote_dbboo[0]['id_quote']|escape:'htmlall':'UTF-8'}" class = "btn_customer_send btn btn-default">
                        <span style = "padding-left:2px;">{l s='Send' mod='askforaquotemodul'}</span>
                    </a>
                </div>
            </div>
        </form>

        <form method="POST" action="" class="myquotedetail_products">
            <div class = "bootstrap panel col-lg-12 table_product_cus" >
                <div class = "panel-heading col-lg-12 header_product_customer">
                     <i class = "icon-user"></i> <label>{l s='Products' mod='askforaquotemodul'}</label>
                     <span class="panel_heading_action_dbboo">
                        <a  class="list_toolbar_btn_dbboo" href="{$link_myquotedetail_seo|escape:'htmlall':'UTF-8'}">
                            <span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="Export" data-html="true">
                                <i class="fa fa-share-square"></i>
                            </span>
                        </a>
                    </span>
                </div>
                <div class = "list_product table-responsive">
                    <table class="table" id="orderProducts">
                        <thead>
                            <tr>
                                <th></th>
                                <th><span class="title_box">{l s='#ID' mod='askforaquotemodul'}</span></th>
                                <th><span class="title_box">{l s='Product' mod='askforaquotemodul'}</span></th>
                                <th>
                                    <span class="title_box">{l s='SKU' mod='askforaquotemodul'}</span>
                                </th>
                                <th>
                                    <span class="title_box ba-text-right">{l s='Unit Price' mod='askforaquotemodul'}</span>
                                </th>
                                <th><span class="title_box">{l s='Qty' mod='askforaquotemodul'}</span></th>                        
                                <th>
                                    <span class="title_box ba-text-right">{l s='Total excl Tax' mod='askforaquotemodul'}</span>
                                </th>
								<th>
                                    <span class="title_box ba-text-right">{l s='Total incl Tax' mod='askforaquotemodul'}</span>
                                </th>
                                <th colspan="2"></th>
                                <th></th>
                            </tr>
                        </thead>
                    {if $count > 0}
                        {foreach from=$tb_detail key=key item=item}
                            <tbody>
                                <tr class = "tr_product" height="52">
                                    <td><img src="{$tb_detail[$key]['link_img']|escape:'htmlall':'UTF-8'}" style="width: 60px;border: 1px solid #cacaca;border-radius: 6px;" alt="" class="imgm img-thumbnail" style = "width: 60px;"></td>
                                    <td style="vertical-align:middle">{$tb_detail[$key]['id_product']|escape:'htmlall':'UTF-8'}</td>
                                    <td><a href="{$tb_detail[$key]['link_product']|escape:'htmlall':'UTF-8'}">
                                        <span>{$tb_detail[$key]['product_name']|escape:'htmlall':'UTF-8'}</span>
                                        </a>
										{if $item['cache_is_pack'] != 0}
										<ul style="padding-left: 15px;">    
											<li>
												{$item['combination']|escape:'htmlall':'UTF-8'|replace:"\n":'</li><li>' nofilter}
											</li>
										</ul>
										{else}
											<div>{$item['combination']|escape:'htmlall':'UTF-8'}</div>
										{/if}
                                    </td>
                                    <td>
                                        <span>{$tb_detail[$key]['reference']|escape:'htmlall':'UTF-8'}</span>
                                    </td>
                                    <td class="ba-text-right">
                                        {if $option_price_total == 1}
                                            <span>
                                                {$tb_detail[$key]['product_pri']|escape:'htmlall':'UTF-8'}
                                            </span>
                                            {else}
                                                <span style="margin-left: 25%;">
                                                    -
                                                </span>
                                        {/if}
                                    </td>
                                    <td class="ba-text-center">
                                        <span>{$tb_detail[$key]['product_qty']|escape:'htmlall':'UTF-8'}</span>
                                    </td>
                                    <td class="ba-text-right">
                                        {if $option_price_total == 1}
                                            <span>
                                                {$tb_detail[$key]['total_pri']|escape:'htmlall':'UTF-8'}
                                            </span>
                                            {else}
                                                <span style="margin-left: 25%;">
                                                    -
                                                </span>
                                        {/if}
                                    </td>
									<td class="ba-text-right">
                                        {if $option_price_total == 1}
                                            <span>
                                                {$tb_detail[$key]['total_price_incl_tax']|escape:'htmlall':'UTF-8'}
                                            </span>
                                            {else}
											<span style="margin-left: 25%;">
												-
											</span>
                                        {/if}
                                    </td>
                                    <td colspan="2">&nbsp;</td>
                                    <td></td>
                                </tr>
                            </tbody>
                        {/foreach}
                    {/if}
                    </table>
                </div>
            </div>
            <div>
                <div class="panel_dbboo total_price" style="width: 32%;margin-left: 68%;">
                    <table style="width: 100%;">                                                                    
                        <tbody>
                            <tr style="border-bottom:1px solid #b9b9b9">
								{if preg_replace("/[^-0-9\.]/", "", $tb_quote_dbboo[0]['shipping_cost']) > 0}
                                <tr><td class="text-right">{l s='Shipping cost' mod='askforaquotemodul'}: </td>
                                    <td class="text-right " style="float: right;text-align: right;">
									<span type="text"name="product[shipping_cost]"> {$tb_quote_dbboo[0]['shipping_cost']|escape:'htmlall':'UTF-8'}</span>
									</td>
								</tr>
								{/if}
								{if preg_replace("/[^-0-9\.]/", "", $tb_quote_dbboo[0]['tax_cost']) > 0}
                                <tr><td class="text-right">{l s='Tax cost' mod='askforaquotemodul'}: </td>
                                    <td class="text-right " style="float: right;text-align: right;">
									<span type="text"name="product[tax_cost]"> {$tb_quote_dbboo[0]['tax_cost']|escape:'htmlall':'UTF-8'}</span>
									</td>
								</tr>
								{/if}
                                <tr>
                                <td class="text-right">{l s='Total' mod='askforaquotemodul'}: </td>
                                <td class="text-right total_price_quote_dbboo " style="text-align: right;">
                                    {if $count > 0}
                                        <input type = "hidden" value="{$tb_quote_dbboo[0]['total_pri']|escape:'htmlall':'UTF-8'}" name="product[total_price_quote]"></input>
                                       {$tb_quote_dbboo[0]['price_full']|escape:'htmlall':'UTF-8'}
                                    {else}
                                        <input type = "hidden" value="0.00" name="product[total_price_quote]"></input>
                                        {$tb_quote_dbboo[0]['sign']|escape:'htmlall':'UTF-8'} 0,00 
                                    {/if}
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="panel_footer_dbboo" style="width:100%;float:left;">      
                <div class = "btn_back">
                    <a href="{$link_myquote_seo|escape:'htmlall':'UTF-8'}" class="btn btn-default button button-small"><span><i class="icon-chevron-left left"></i> {l s='Back' mod='askforaquotemodul'}</span></a>
                    </div> 
                    <div class="pdf_dbboo">
                    <button type="submit" id="file_pdf_id" name="file_pdf_name" class="btn btn-default pull-right" style="border-radius: 3px;">
                        <i class="fa fa-arrow-circle-o-down fa-2x"></i> {l s='Generate PDF file' mod='askforaquotemodul'}
                    </button>
                </div>
            </div>
        </form>
    </div>    
</div>