{*
* 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
*}
<script>
    var format_currency = {$format_currency|escape:'htmlall':'UTF-8'};
    var link_to_admin = "{$link_to_admin|escape:'htmlall':'UTF-8'}";
</script>
<div class="alert alert-success show_message" >
    {l s='Delete' mod='askforaquotemodul'}<strong> {l s='Success!' mod='askforaquotemodul'}</strong>.
</div>
<div class="alert alert-warning show_warning" >
    {l s='Settings' mod='askforaquotemodul'}<strong> {l s='Empty!' mod='askforaquotemodul'}</strong>.
</div>
<div class="bootstrap">
    <div class="module_error alert alert-danger show_demoMod">
        {l s='You are use ' mod='askforaquotemodul'}
        <strong>{l s='Demo Mode ' mod='askforaquotemodul'}</strong>
        {l s=', so some buttons, functions will be disabled because of security. ' mod='askforaquotemodul'}
        {l s='You can use them in Live mode after you puchase our module. ' mod='askforaquotemodul'}
        {l s='Thanks !' mod='askforaquotemodul'}
    </div>
</div>

<div class="ba_newsletter_popup_background" style=""></div>
<div class = "panel" style = "float: left;border-radius: 0px 5px 5px 5px;">
<div class="ba_newsletter_popup_background" style=""></div>
    <div class = "panel-heading">
        <i class = "fa fa-calculator"></i> <label>{l s='Quote' mod='askforaquotemodul'}</label>
    </div>
    <div style="display:inline-flex;">
        <form class="td_customer_admin" method="POST" action="" >
            <div class = "panel">
                <div class = "panel-heading">
                    <i class = "icon-user"></i> <label>{l s='Customer' mod='askforaquotemodul'}{if $info_customer[0]['check_guest']|escape:'htmlall':'UTF-8' == 0} #{$info_customer[0]['id_customer'|escape:'htmlall':'UTF-8']}{/if}</label>
                    <input type="hidden" name="td_id_customer" class="td_id_customer" value="{$info_customer[0]['id_customer']|escape:'htmlall':'UTF-8'}">
                </div>
                <div class = "dp_info ">
                    <label class="control-label col-lg-3">
                        <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;">{$info_customer[0]['first_name']|escape:'htmlall':'UTF-8'}</span>                                                
                    </span>
                </div>
                <div class = "dp_info">
                    <label class="control-label col-lg-3">
                        <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;">{$info_customer[0]['last_name']|escape:'htmlall':'UTF-8'}</span>                                            
                    </span>
                </div>
                {if $info_customer[0]['company_name'] != null}
                    <div class = "dp_info">
                        <label class="control-label col-lg-3">
                            <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;">{$info_customer[0]['company_name']|escape:'htmlall':'UTF-8'}</span>                                            
                        </span>
                    </div>
                {/if}
				{if $info_customer[0]['company_address'] != null}
                    <div class = "dp_info">
                        <label class="control-label col-lg-3">
                            <span class="label-tooltip">
                                {l s='Company address:' mod='askforaquotemodul'}
                            </span>
                        </label>
                        <span class="col-lg-4 ">                    
                            <span name="companyname" id="companyname" style = "width:240px;">{$info_customer[0]['company_address']|escape:'htmlall':'UTF-8'}</span>                                            
                        </span>
                    </div>
                {/if}					
                <div class = "dp_info">
                    <label class="control-label col-lg-3">
                        <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;">{$info_customer[0]['phone']|escape:'htmlall':'UTF-8'}</span>                                    
                    </span>
                </div>
                <div class = "dp_info">
                    <label class="control-label col-lg-3">
                        <span class="label-tooltip txtEmail">
                            {l s='Email:' mod='askforaquotemodul'}
                        </span>
                    </label>
                    <span class="col-lg-4">                    
                        <span id="email" style="width:240px;">{$info_customer[0]['email']|escape:'htmlall':'UTF-8'}</span>                                
                    </span>
                </div>
				{if $info_customer[0]['quote_name'] != null}
				<div class = "dp_info">
					<label class="control-label col-lg-3">
						<span class="label-tooltip">
							{l s='Subject:' mod='askforaquotemodul'}
						</span>
					</label>
					<span class="col-lg-4 ">                    
						<span style = "width:240px;">{$info_customer[0]['quote_name']|escape:'htmlall':'UTF-8'}</span>                                            
					</span>
				</div>
                {/if}
				
            </div>{if $infor_order != 0}
					<div class="panel" style="padding-bottom: 70px;">
						<div class = "panel-heading">
							<i class="icon-credit-card"></i>
							<label>{l s='Reference Order' mod='askforaquotemodul'}</label>
							<span class="badge">{$infor_order[0]['reference']|escape:'htmlall':'UTF-8'}</span>
						</div>
						<div style="float:left;width:100%;">
							<label class="control-label" style="float: left;">
								<span class="label-tooltip txtEmail">
									{l s='This order was created:' mod='askforaquotemodul'}
								</span>
							</label>
							<span class="" style="float:left;margin-left: 10px;">
								<span class="value" style="">
									{$infor_order[0]['date_add']|escape:'htmlall':'UTF-8'}
								</span>
							</span>
						</div>
						<div style="float:left;width:100%;margin-top: 10px;">
							<label class="control-label" style="float: left;">
								<span class="label-tooltip txtEmail">
									{l s='ID Order:' mod='askforaquotemodul'}
								</span>
							</label>
							<span class="col-lg-4" style="float:left;margin-left: 10px;">
								<a class="value" href="{$link_order|escape:'htmlall':'UTF-8'}" target="blank">
									#{$infor_order[0]['id_order']|escape:'htmlall':'UTF-8'}
								</a>
							</span>
						</div>
					</div>
				{/if}
        </form>
        <form class="td_order_note" method="POST" action="">
            <div class = "panel panel_Message_dbboo" style="padding-bottom:65px;">
                <div class = "panel-heading col-lg-12">
                    <i></i> <label>{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'}   <a onclick="del_message({$item_m['id']|escape:'htmlall':'UTF-8'},{$item_m['id_quote']|escape:'htmlall':'UTF-8'})" href="javascript:void(0);" type="submit" class = "del_message" id = "{$item_m['id_quote']|escape:'htmlall':'UTF-8'}" value = "{$item_m['id']|escape:'htmlall':'UTF-8'}">{l s='Delete message' mod='askforaquotemodul'}</a>
                                </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'} <a onclick="del_message({$item_m['id']|escape:'htmlall':'UTF-8'},{$item_m['id_quote']|escape:'htmlall':'UTF-8'})" href="javascript:void(0);" type="submit" class = "del_message" id = "{$item_m['id_quote']|escape:'htmlall':'UTF-8'}" value = "{$item_m['id']|escape:'htmlall':'UTF-8'}">{l s='Delete message' mod='askforaquotemodul'}</a>
                                </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 name="message_dbboo" class = "content_mess_dbboo" rows="4" cols="5"></textarea>
                </div>
                <div class = "btn_message_adm">
                    <button name= "btn_send" type="submit" class = "btn_messages btn btn-default">
                        <span style = "padding-left:2px;">{l s='Send' mod='askforaquotemodul'}</span>
                    </button>
                </div>
            </div>
        </form>
    </div>
    <form method="POST" action="">
        <div class = "panel">
            <div class = "panel-heading">
                <i class = "icon-user"></i> <label>{l s='Products' mod='askforaquotemodul'}</label>
                <span class="panel-heading-action">
                    <span  class="list-toolbar-btn td_new_quote" href="#">
                        <span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="Add new" data-html="true" data-placement="top">
                                <i class="process-icon-new" style="text-align: center;font-size: 18px;line-height: 30px;"></i>
                        </span>
                    </span>
                    <a  class="list-toolbar-btn" href="{$link_export|escape:'htmlall':'UTF-8'}">
                        <span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="Export" data-html="true">
                            <i class="process-icon-export "></i>
                        </span>
                    </a>
                </span>
            </div>
            <div id="td_add_new">
                <label class="control-label col-lg-3">
                    <span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="Search for an existing product by typing the first letters of its name.">
                        {l s='Search for a product' mod='askforaquotemodul'}
                    </span>
                </label>
                <div class="col-lg-6">
                        <div class="input-group">
                            <input type="text" id="customer" class= "td_search_product" value="">
                            <span class="input-group-addon" onClick="searchproduct()">
								<span class="loadicon"><i class="icon-refresh icon-spin"></i></span>
                                <i class="icon-search"></i>
                            </span>
                        </div>
                    </div>
            </div>
            <div id="products_found" >
                <div class="abc">
                        <div id="td_product_list" class="form-group">
                            <label class="control-label col-lg-3">{l s='Product' mod='askforaquotemodul'}</label>
                            <div id="img_loading_gif"><img class = "img_loading" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif"/></div>
                        
                            <div id="td_list_product"></div>
                        </div>
                        </br>
                        <div class="td_show_attr_price">
                            <label class="control-label combiornot col-lg-3">{*{l s='Combination' mod='askforaquotemodul'}*}</label>
                            <div id="img_loading_gif_attr" style="margin-left: 265px;"><img class = "img_loading2" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif"/></div>
                            <div id="td_attributes_list" class="form-group" >
                                <div class="col-lg-6">
                                    <select class="id_product_attribute" id="combi_product" style="">
                                        <option value="">{l s='Select Combination' mod='askforaquotemodul'}</option>                                       
                                    </select>
                                </div>
                            </div>
                            </br>
                            <div class="td_quanity_max">                              
                            </div>
                                <div class="form-group">
									<div class="col-lg-9 col-lg-offset-3">
										<a class="btn btn-default td_add_new_product" id="td_add_new_pro_newquote_an">
											<i class="icon-ok text-success"></i>
											{l s='Add New Product' mod='askforaquotemodul'}
										</a>
										<span class="loadicon_addp" style="display: none;"><i class="icon-refresh icon-spin"></i></span>
									</div>
                                </div>
                        </div>
                    </div>
            </div>
            <div id="products_err" style="display:none;" class="alert alert-danger">Product not found</div>
			<input type="hidden" name="edited" class="edited" value="0">
			<input type="hidden" name="edited_product" class="edited_product" value="">
            <div class = "list_product table-responsive">
                <table class="table" id="orderProducts">
                    <thead>
                        <tr>
                            <th><span class="title_box ">{l s='Position' mod='askforaquotemodul'}</span></th>
                            <th>#</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 ">{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 ">{l s='Total' mod='askforaquotemodul'}</span>
                            </th>
                            <th colspan="2"></th>
                            <th></th>
                        </tr>
                    </thead>
					<tbody class="product_table_newquote">
                    {if $count > 0}
						{if !empty($product_quote)}
							{foreach from=$product_quote key=key item=item}
								{assign var="count" value=$key+1}
									<tr height="52" class="td_check_exist_pro {$item['id_product']|escape:'htmlall':'UTF-8'}-{$product_quote[$key]['id_combination']|escape:'htmlall':'UTF-8'}">
										<input type="hidden" class="row_product id_productt_{$key + 1|escape:'htmlall':'UTF-8'}" value="{$product_quote[$key]['id_product']}" data-id-product="{$product_quote[$key]['id_product']}" data-id-combination="{$product_quote[$key]['id_combination']}">
										<td><input type="text" class="quote-position form-control" name="baproduct[{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}][position]" value="{$item['position']|escape:'htmlall':'UTF-8'}" onkeypress="return event.charCode >= 48 && event.charCode <= 57" onpaste="return false;" />
										</td>
										<td><img src="{$item['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><a href="{$item['link_product']|escape:'htmlall':'UTF-8'}" target="_blank">
												<span>{$item['product_name']|escape:'htmlall':'UTF-8'}</span>
											</a>
											{if $item['pro_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>{$item['reference']|escape:'htmlall':'UTF-8'}</span>
										</td>
										<td style="width:15%;" class = "price_{$item['id_quote']|escape:'htmlall':'UTF-8'}_{$product_quote[$key]['id_product']|escape:'htmlall':'UTF-8'}_{$product_quote[$key]['id_combination']|escape:'htmlall':'UTF-8'}">
											<span style="float: left;padding-top: 5px;" class="signstyle">
												{$item['sign']|escape:'htmlall':'UTF-8'}
											</span>
											<span style="display: table-cell">
												<input type="text" class="pri_product_{$key + 1|escape:'htmlall':'UTF-8'} form-control price_pro edit_price edit_price_{$item['id_product']|escape:'htmlall':'UTF-8'}-{$item['id_combination']|escape:'htmlall':'UTF-8'} price_quote_admin_{$item['id_quote']|escape:'htmlall':'UTF-8'}_{$product_quote[$key]['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}" data-special-product="{$item['id_quote']|escape:'htmlall':'UTF-8'}_{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}" name="baproduct[{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}][price]" autocomplete="off" style="width:85%;" value="{$item['product_pri']|replace:$item['sign']:''|regex_replace:"/[^-0-9\.]/":""|string_format:"%.2f"|escape:'htmlall':'UTF-8'}" onkeypress="return baquote_keyPressPrice(this, event);" onpaste="return false;" onkeyup="baquote_EditUnitPrice({$item['id_product']|escape:'htmlall':'UTF-8'}, {$item['id_combination']|escape:'htmlall':'UTF-8'}, this)"></input>
											</span>
										</td>
										<td style="width:9%;" class="qty_pro_{$item['id_product']|escape:'htmlall':'UTF-8'}-{$product_quote[$key]['id_combination']|escape:'htmlall':'UTF-8'}">
											<span>
												<input type="text" class="qty_productt_{$key + 1|escape:'htmlall':'UTF-8'} form-control qty_pro edit_quantity edit_quantity_{$item['id_product']|escape:'htmlall':'UTF-8'}-{$item['id_combination']|escape:'htmlall':'UTF-8'} quanty_quote_admin_{$item['id_quote']|escape:'htmlall':'UTF-8'}_{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}" style="width:70%;" data-special-product="{$item['id_quote']|escape:'htmlall':'UTF-8'}_{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}" name="baproduct[{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}][quantity]" value = "{$item['product_qty']|escape:'htmlall':'UTF-8'}" onkeypress="return event.charCode >= 48 && event.charCode <= 57" onpaste="return false;" onkeyup="baquote_EditQty({$item['id_product']|escape:'htmlall':'UTF-8'}, {$item['id_combination']|escape:'htmlall':'UTF-8'}, this)"></input>
											</span>
										</td>
										<td style="width:15%;">
											<span style="float: left;padding-top: 5px;" class="signstyle">
												{$item['sign']|escape:'htmlall':'UTF-8'}
											</span>
											<span style="display: table-cell" class="td_total_pri_product_{$item['id_product']|escape:'htmlall':'UTF-8'}-{$product_quote[$key]['id_combination']|escape:'htmlall':'UTF-8'}">
												<input type="text" class="form-control total_price_{$key + 1|escape:'htmlall':'UTF-8'} edit_total_price td_total_pri_pro_newquote_{$item['id_product']|escape:'htmlall':'UTF-8'}-{$item['id_combination']|escape:'htmlall':'UTF-8'} total_price_quote_admin_{$item['id_quote']|escape:'htmlall':'UTF-8'}_{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}" style="width:85%;" data-count-dbboo="dbboo" name="baproduct[{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}][total_price_product]" data-special-product="{$item['id_quote']|escape:'htmlall':'UTF-8'}_{$item['id_product']|escape:'htmlall':'UTF-8'}_{$item['id_combination']|escape:'htmlall':'UTF-8'}" value = "{$item['total_pri']|replace:$item['sign']:''|regex_replace:"/[^-0-9\.]/":""|string_format:"%.2f"|escape:'htmlall':'UTF-8'}" onkeypress="return baquote_keyPressPrice(this, event);" onpaste="return false;" onkeyup="baquote_EditTotal({$item['id_product']|escape:'htmlall':'UTF-8'}, {$item['id_combination']|escape:'htmlall':'UTF-8'}, this)"></input>
											</span>
										</td>
										<td colspan="2">&nbsp;</td>
										<td class="text-right">
											<div class="btn-group">
												<a onclick="del_product_view({$item['id_combination']|escape:'htmlall':'UTF-8'},{$product_quote[$key]['id_quote']|escape:'htmlall':'UTF-8'},{$product_quote[$key]['id_product']|escape:'htmlall':'UTF-8'},this)" href="javascript:void(0);" name = "btn_del_view" value = "{$product_quote[$key]['id_combination']|escape:'htmlall':'UTF-8'}_{$product_quote[$key]['id_product']|escape:'htmlall':'UTF-8'}" class="btn btn-default del_product_view">
													<i class="icon-trash"></i> 
													{l s='Delete' mod='askforaquotemodul'}
												</a>
											</div>
										</td>
									</tr>
								
							{/foreach}
							<input type = "hidden" value="{$count|escape:'htmlall':'UTF-8'}" data-sign-dbboo="{$product_quote[0]['sign']|escape:'htmlall':'UTF-8'}" class = "qty_product_dbboo"></input>
						{/if}
					{/if}
					</tbody>
                </table>
            </div>
        </div> 
            <div class="td_shipping_popup col-sm-4" style="padding: 12px 15px 9px 15px;">
            <div class="block_content">
                <div style="background-color: #fff;border: solid 1px #d3d8db;border-radius: 5px;float: left;width: 100%;">
                    <h3 class="page-subheading" style="margin-top: 10px;margin-bottom: -8px;margin-left:15px;margin-right: 35px;">{l s='Choose a shipping option' mod='askforaquotemodul'}</h3>
                    
                        <div class="ba_newsletter_mail_list checkbox" style="line-height:13px;float:left;width: 100%;">
                            <ul style="float:left">
                                {foreach from=$delay key="key" item=nameshipping}
                                {assign var="count" value=$key+1}
                                    <div class="td_checkbox">
										<span style="float:left;"><input type="radio" name="radio_shipping" class="td_checkbox_shippingcost" value="{$nameshipping.id_carrier|escape:'htmlall':'UTF-8'}"></span>
										<span class="td_name_delay">
										{if $nameshipping.name != '0'}
											{$nameshipping.name|escape:'htmlall':'UTF-8'}
										{else}
											{$PS_SHOP_NAME|escape:'htmlall':'UTF-8'}
										{/if}
										</span>
                                    </div>
                                {/foreach}
                                
                            </ul>
                        </div>
                </div>   
					<div class="button_choose" style="padding-left: 12.5%;padding-top: 12px;" align="center">
						<img class="img_loading2 td_choose_shipping_loading" style="display:none;margin:10px 0 0 7px;float:right;" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif" />
						<button type="button" class="td_choose_shipping setup-customer btn btn-default pull-right">
							<i class="icon-arrow-right"></i> {l s='Choose' mod='askforaquotemodul'}
						</button> 						
					</div> 
            </div>
            <span class="close_popup_td_shipping"><a title="Close" class="fancybox-close exit_popup" href="javascript:;"></a></span>
        </div>
           <div>
            <div class="panel total_price admin_view_panel_total_price" style="width: 33%;margin-left: 67%;margin-top:30px;padding-top: 222px;position: relative;">
                <div class="table_total_pri" style="position:absolute;top:10px;width: 94%;border:none;">
                    <div class="row">
                        <div class="col-sm-4" style="float:left;display:block;padding-top:8px;width: 33.3333%;text-align: right;">{l s='Shipping cost:' mod='askforaquotemodul'}</div>
                        <div class="col-sm-8">
						<span class="td_shippingtax" style="float:left;width: 72%;">
							<input onkeyup="baquote_EditShippingCost(this)" onkeypress="return baquote_keyPressPrice(this, event);" type="text" class="td_shipping_price form-control" name="baproduct[shipping_cost]" style="width:100%;" {if !empty({$info_customer[0]['shipping_cost']|escape:'htmlall':'UTF-8'})} value="{$info_customer[0]['shipping_cost']|replace:$info_customer[0]['sign']:''|regex_replace:"/[^-0-9\.]/":""|string_format:"%.2f"|escape:'htmlall':'UTF-8'}" {else} value="0.00" {/if}>
							<input type="hidden" class="shipping_cost_tax_plain form-control" data-tax-rate="{$shipping_cost_tax_rate|escape:'htmlall':'UTF-8'}" name="shipping_cost_tax_plain" style="width:100%;" {if isset($info_customer[0]['shipping_cost_tax'])} value="{$info_customer[0]['shipping_cost_tax']|replace:$info_customer[0]['sign']:''|regex_replace:"/[^-0-9\.]/":""|string_format:"%.2f"|escape:'htmlall':'UTF-8'}" {else} value="0.00" {/if} />
						</span>
                        <span class="estimate-block" style="float:left;padding: 7px 5px 0px 3px;">
                            <a id="td_auto_shipping" name="td_auto_shipping" style="color: #0077a4;text-decoration: none;font-size:11px;cursor:pointer;">{l s='Calc' mod='askforaquotemodul'}
                            </a>
                        </span>
                        <div class="infor_shipping" style="float: left;height: 34px;clear:both;"><p class="help-block">{l s='Estimate Shipping Cost.' mod='askforaquotemodul'}</p></div>
						</div>
					</div>
                </div>
                <div class="table_total_pri" style="position:absolute;top:70px;width: 94%;border:none;">
                    <div class="row">
						<div class="col-sm-4" style="float:left;display:block;padding-top:8px; width: 33.3333%;text-align: right;">{l s='Tax cost:' mod='askforaquotemodul'}</div>
                        <div class="col-sm-8">
							<span class="td_autotax" style="float:left;width: 72%;"><input onkeyup="baquote_EditTaxCost(this)" onkeypress="return baquote_keyPressPrice(this, event);" type="text" class="td_tax_price form-control" name="baproduct[tax_cost]"  style="width:100%;" {if !empty({$info_customer[0]['tax_cost']|escape:'htmlall':'UTF-8'})} value="{$info_customer[0]['tax_cost']|replace:$info_customer[0]['sign']:''|regex_replace:"/[^-0-9\.]/":""|string_format:"%.2f"|escape:'htmlall':'UTF-8'}" {else} value="0.00" {/if}></span>
							<span class="estimate-block" style="float:left;padding: 7px 5px 0px 3px;">
								 <a id="td_auto_tax" name="td_auto_tax" style="color: #0077a4;text-decoration: none;font-size:11px;cursor:pointer;">{l s='Calc' mod='askforaquotemodul'}
								</a>
								<span class="loadicon_tax" style="display: none;"><i class="icon-refresh icon-spin"></i></span>
							</span>
							<div class="infor_tax" style="float: left;height: 34px;"><p class="help-block">{l s='Estimate Tax Cost.' mod='askforaquotemodul'}</p></div>
						</div>
					</div>
                </div>
                <input type="hidden" class="td_id_quote" value="{$id_quote_view|escape:'htmlall':'UTF-8'}">
                <div class="table_total_pri" style="position:absolute;top:130px;width: 94%;">
                    <div class="row">
                        <div class="col-sm-4" style="float:left;display:block;padding-top:8px; width: 33.3333%;text-align: right;">{l s='Coupon:' mod='askforaquotemodul'}</div>
                        <div class="col-sm-8">
							<span class="td_coupon" style="float:left;width: 72%;">
							<input type="text" class="td_coupon_code form-control" name="baproduct[coupon]" id="td_coupon_code"  style="width:100%;" {if !empty({$info_customer[0]['coupon_code']|escape:'htmlall':'UTF-8'})} value="{$info_customer[0]['coupon_code']|escape:'htmlall':'UTF-8'}" {else} value="" {/if}>
							</span>
							<span class="estimate-block" style="float:left;padding: 7px 5px 0px 3px;">
								 <a id="td_auto_coupon" name="td_auto_coupon" style="color: #0077a4;text-decoration: none;font-size:11px;cursor:pointer;">Check
								</a>
							</span>
							<div class="infor_coupon" style="clear:both;min-height: 25px;">
							{if $infor_coupon == 0}
								<p class="help-block">
									{l s='Please enter your coupon.' mod='askforaquotemodul'}
								</p>
							{else}
								{if $infor_coupon[0]['reduction_product']|escape:'htmlall':'UTF-8' == 0}
								<p class="help-block" style="margin-top: 10px;">
									{if $infor_coupon[0]['coupon_type']|escape:'htmlall':'UTF-8' == 1}
										-{$infor_coupon[0]['reduction_amount']|string_format:"%.2f"|escape:'htmlall':'UTF-8'}% {if $infor_coupon[0]['free_shipping']|escape:'htmlall':'UTF-8' == 1}{l s='and Free shipping' mod='askforaquotemodul'}{/if}
									{else}
										-{displayPrice price=$infor_coupon[0]['reduction_amount'] currency=$info_customer[0]['id_currency']} {if $infor_coupon[0]['free_shipping']|escape:'htmlall':'UTF-8' == 1}{l s='and Free shipping' mod='askforaquotemodul'}{/if}
									{/if}
								</p>
								{elseif $infor_coupon[0]['reduction_product'] == -1}
								<p class="help-block" style="margin-top: 10px;">
									{if $infor_coupon[0]['coupon_type'] == 1}
										{l s='Cheapest Product ' mod='askforaquotemodul'} -{$infor_coupon[0]['reduction_amount']|string_format:"%.2f"|escape:'htmlall':'UTF-8'}% {if $infor_coupon[0]['free_shipping']|escape:'htmlall':'UTF-8' == 1}{l s='and Free shipping' mod='askforaquotemodul'}{/if}
									{else}
										{l s='Cheapest Product ' mod='askforaquotemodul'} -{displayPrice price=$infor_coupon[0]['reduction_amount'] currency=$info_customer[0]['id_currency']} {if $infor_coupon[0]['free_shipping']|escape:'htmlall':'UTF-8' == 1}{l s='and Free shipping' mod='askforaquotemodul'}{/if}
									{/if}
								</p>
								{/if}
								{if $infor_pro_coupon}
									<p class="help-block" style="margin-top: 10px;">
										{if $infor_coupon[0]['coupon_type'] == 1}
											{l s='Product:' mod='askforaquotemodul'}{$infor_pro_coupon[0]['product_name']|escape:'htmlall':'UTF-8'} -{$infor_coupon[0]['reduction_amount']|string_format:"%.2f"}% {if $infor_coupon[0]['free_shipping']|escape:'htmlall':'UTF-8' == 1}{l s='and Free shipping' mod='askforaquotemodul'}{/if}
										{else}
											{l s='Product:' mod='askforaquotemodul'}{$infor_pro_coupon[0]['product_name']|escape:'htmlall':'UTF-8'} -{displayPrice price=$infor_coupon[0]['reduction_amount'] currency=$info_customer[0]['id_currency']} {if $infor_coupon[0]['free_shipping']|escape:'htmlall':'UTF-8' == 1}{l s='and Free shipping' mod='askforaquotemodul'}{/if}
										{/if}
									</p>
								{/if}
							{/if}
							</div>
						</div>
                    </div>
                </div>
                <div class="table_total_pri table_total_pri_total" style="position:absolute;top:196px;width: 94%;">
                    <div style="float: left;margin-left: 60px;">
                        <span class="table_total_pri_total" style="float:left;display:block;padding-top:8px;border:none;">{l s='Total:' mod='askforaquotemodul'}</span>
                    </div>
                    <div class="total_price_quote_dbboo" style="float: right;height: 40px;display: block;padding-top: 10px;padding-right:5px;">
                        {if $count > 0}
								<input type = "hidden" value="{$info_customer[0]['total_pri']|escape:'htmlall':'UTF-8'}" id="td_totalprice_newquote" class="total_price_quote_dbboo td_total_pri_newquote">
                                <input type = "hidden" value="{$info_customer[0]['total_pri']|escape:'htmlall':'UTF-8'}" class="td_fixed_total_price">
								<input type="hidden" class="batotalproducts" value="{$info_customer[0]['total_pri']|escape:'htmlall':'UTF-8'}" name="baproduct[total_price_quote]"></input>
                                <span>{$info_customer[0]['price_full']|escape:'htmlall':'UTF-8'}</span>
                            {else}
                                <input type = "hidden" class="td_total_priceeeee" value="0.00" name="baproduct[total_price_quote]"></input>
                                <span>{$info_customer[0]['sign']|escape:'htmlall':'UTF-8'} 0,00</span>
                        {/if}
						<input type = "hidden" value="0.00" class="td_fixed_total_price">
                        <input type = "hidden" value="0" id="td_pri_pro_havetax_max_fixed" class="td_pri_pro_havetax_max_fixed">
                        <input type = "hidden" value="0" id="td_pri_pro_havetax_min_fixed" class="td_pri_pro_havetax_min_fixed">
                        <input type = "hidden" value="0" id="td_price_have_shippingcost" class="td_price_have_shippingcost">
                        <input type = "hidden" value="0" id="td_price_have_tax" class="td_price_have_tax">
                    </div>
					<p class="help-block">{l s='Please click Check after change Shipping cost, Tax cost to view FINAL price (included Coupon)' mod='askforaquotemodul'}</p>
                </div>
            </div>
        </div>
		<div class="td_order_new td_float_left" style="margin-top: 22px;">
            <div class="td_float_left" style="">
				<div class="panel-heading" style="border-top: solid 1px #eee;">
                    <i class="icon-envelope"></i>
                    {l s='Addresses' mod='askforaquotemodul'}
                </div>
				<div id="addresses_err" class="alert alert-warning" style="display:none;"></div>
				<div class="ba_new_address_popup_background"></div>
				<span id='boxaddress'>
					<div><img class="img_loading2" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif"/></div>
				</span>
				<span id='popupaddress'></span>
				{*include file="{$moduledir}askforaquotemodul/views/templates/admin/popupaddnewaddress.tpl"*}
				
				<div style="width:100%;text-align:center;">
					<a class="fancybox btn btn-default add_new_address" onClick='openPopupAddress("addnew")'>
						<i class="icon-plus-sign-alt"></i>
						{l s='Add a new address' mod='askforaquotemodul'}
					</a>
				</div>
				<span id='boxshipping' style="display: inline-block; width: 100%;"></span>
				<span id='boxvoucher' style="display: inline-block; width: 100%;"></span>
				<div class="panel-heading" style="margin-top: 10px;border-top: solid 1px #eee;">
					<i class="icon-align-justify"></i>
					{l s='Summary' mod='askforaquotemodul'}
				</div>
				{include file="{$moduledir}askforaquotemodul/views/templates/admin/summaryorder.tpl"}
				<div class="row td_float_left">
					<div class="td_float_left order_message_right col-lg-12">
						<div class="form-group td_float_left">
							<label class="control-label col-lg-3" for="order_message">{l s='Order message' mod='askforaquotemodul'}</label>
							<div class="col-lg-6">
								<textarea name="order_message" id="order_message" rows="3" cols="45"></textarea>
							</div>
						</div>
						<div class="col-lg-9 col-lg-offset-3" style="margin-bottom: 15px;">
							<a href="javascript:void(0);" id="td_send_email_to_customer" class="btn btn-default">
								<i class="icon-credit-card"></i>
								{l s='Send an email to the customer with the link to process the payment.' mod='askforaquotemodul'}
							</a>
						</div>
						<div class="form-group td_float_left">
							<label class="control-label col-lg-3">{l s='Payment' mod='askforaquotemodul'}</label>
							<div class="col-lg-9">
								<select name="td_payment_name" id="payment_module_name" style="text-transform:capitalize;">
									{foreach from=$payment_method item=payment}
										{if $payment['name']}
										<option value="{$payment['name']|escape:'htmlall':'UTF-8'}" style="text-transform:capitalize;">{$payment['displayName']|escape:'htmlall':'UTF-8'}</option>
										{/if}
									{/foreach}
								</select>

							</div>
						</div>
						<div class="form-group td_float_left">
							<label class="control-label col-lg-3">
									{l s='Order status' mod='askforaquotemodul'}</label>
							<div class="col-lg-9">
								<select name="id_order_state" id="id_order_state">
								{foreach from=$order_state item=foo}
									<option value="{$foo['id_order_state']|escape:'htmlall':'UTF-8'}">{$foo['name']|escape:'htmlall':'UTF-8'}</option>
								{/foreach}
								</select>
							</div>
						</div>
						<div class="form-group td_float_left">
							<div class="col-lg-9 col-lg-offset-3">
								<button type="submit" name="add_order" class="btn btn-default td_add_order">
									<i class="icon-check"></i>
									{l s='Create the order' mod='askforaquotemodul'}
								</button>
							</div>
						</div>
					</div>
				</div>
				<input type="hidden" name="td_id_customer" class="td_id_customer" value="{$info_customer[0]['id_customer']|escape:'htmlall':'UTF-8'}">
				<input type="hidden" name="td_id_quoteee" class="td_id_quoteee" value="{$info_customer[0]['id_quote']|escape:'htmlall':'UTF-8'}">
				<input type="hidden" name="td_firstname" class="td_firstname" value="{$info_customer[0]['first_name']|escape:'htmlall':'UTF-8'}">
				<input type="hidden" name="td_lastname" class="td_lastname" value="{$info_customer[0]['last_name']|escape:'htmlall':'UTF-8'}">
				<input type="hidden" name="td_email" class="td_email" value="{$info_customer[0]['email']|escape:'htmlall':'UTF-8'}">
			</div>
		</div>
        <div class="panel-footer" style="float: right; width: -webkit-fill-available;">
            <a href="{$bamodul|escape:'htmlall':'UTF-8'}&token={$token_adm|escape:'htmlall':'UTF-8'}&configure=askforaquotemodul&tab_module=shipping_logistics&module_name=askforaquotemodul" class="btn btn-default"><i class="process-icon-cancel"></i> {l s='Cancel' mod='askforaquotemodul'}</a>
            <button type="submit" name="save_quote_form" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save' mod='askforaquotemodul'}</button>
            <button type="submit" id="file_pdf_id" name="file_pdf_name" class="btn btn-default pull-right" style="margin-right:20px;">
                <i class="process-icon-download-alt"></i> {l s='Generate PDF file' mod='askforaquotemodul'}
            </button>
            <button type="submit" name="mail_quote_form" class="btn btn-default pull-right" style="margin-right:20px;"><i class="process-icon-envelope"></i> {l s='Email to Customer' mod='askforaquotemodul'}</button>
            {if $file_attached != null}
                <button type="submit" id="download_attached_file" name="file_attached_name" class="btn btn-default file_attached_class pull-right" style="margin-right:20px;">
                    <i class="fa fa-file fa-2x"></i> 
                    <div style="margin-top: 6px;">{l s='Download attached file' mod='askforaquotemodul'}</div>
                </button>
            {/if}
            {if $infor_order == 0 && $info_customer[0]['id_cart_create'] == 0}
                <a class="btn btn-default pull-right make_an_order" style="margin-right:20px;">
					<i class="icon-AdminParentOrders" style="font-size: 26px;"></i>
					<div style="margin-top: 6px;">{l s='MAKE AN ORDER' mod='askforaquotemodul'}</div>
                </a>
            {/if}
        </div>    
    </form>
</div>    

