{*
* 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
*}
{if $td_id_customer != 0}
	{if !empty($data_option)}
		<input type='hidden' class='address_ids' data-id-address='{$address_ids|escape:'htmlall':'UTF-8'}'>
		<div id="address_delivery" class="col-lg-6 td_float_left">
			<h4>
				<i class="icon-truck"></i>
				{l s='Delivery' mod='askforaquotemodul'}
				<span style="color: red;font-size:  17px;margin-left: 4px;">*</span>
			</h4>
			<div class="row-margin-bottom">
				<select name="id_address_have_id_cus_delivery" class="infor_address_delivery" onchange="changeAddressID('delivery',this);">
					{foreach from=$data_option key=key_data_option item=item_data_option}
						<option value="{$data_option[$key_data_option]['id_address']|escape:'htmlall':'UTF-8'}" {if $data_option[$key_data_option]['id_address'] == $array_address['delivery']['id_address']} selected {/if}>{$data_option[$key_data_option]['alias']|escape:'htmlall':'UTF-8'}</option>
					{/foreach}
				</select>
			</div>
			<div class="well background_address_delivery">
				<div class="img_loading_gif_attr_address_delivery" style="margin-left: 20px;"><img class = "img_loading2" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif"/></div>
				<div class="address_delivery">
					<a class="btn btn-default pull-right edit_delivery fancybox" onClick='openPopupAddress("delivery","{$array_address['delivery']['id_address']|escape:'htmlall':'UTF-8'}","{$array_address['invoice']['id_address']|escape:'htmlall':'UTF-8'}")'>
						<i class="icon-pencil"></i> {l s='Edit' mod='askforaquotemodul'}
					</a>
					<div class="td_address_delivery">
						<input type="hidden" name="id_address_delivery" class="id_address_delivery" value="{$array_address['delivery']['id_address']|escape:'htmlall':'UTF-8'}">
						{$array_address['delivery']['td_popup__address_first_name']|escape:'htmlall':'UTF-8'} {$array_address['delivery']['td_popup__address_last_name']|escape:'htmlall':'UTF-8'}
						<br>
						{$array_address['delivery']['td_popup__address_company']|escape:'htmlall':'UTF-8'}
						<br>
						{$array_address['delivery']['td_popup__address_adres1']|escape:'htmlall':'UTF-8'} {$array_address['delivery']['td_popup__address_adres2']|escape:'htmlall':'UTF-8'}
						<br>{$array_address['delivery']['td_popup__address_city']|escape:'htmlall':'UTF-8'}, {$array_address['delivery']['td_popup__address_state']|escape:'htmlall':'UTF-8'} {$array_address['delivery']['td_popup__address_zip_code']|escape:'htmlall':'UTF-8'}
						<br>{$array_address['delivery']['td_popup__address_country']|escape:'htmlall':'UTF-8'}
						<br>{$array_address['delivery']['td_popup__address_home_phone']|escape:'htmlall':'UTF-8'}{if !empty($array_address['delivery']['td_popup__address_home_phone']) && !empty($array_address['delivery']['td_popup__address_mobile_phone'])},{/if}{$array_address['delivery']['td_popup__address_mobile_phone']|escape:'htmlall':'UTF-8'}
					</div>
				</div>
			</div>
		</div>
		<div id="address_invoice" class="col-lg-6 td_float_left">
			<h4>
				<i class="icon-file-text"></i>
				{l s='Invoice' mod='askforaquotemodul'}
				<span style="color: red;font-size:  17px;margin-left: 4px;">*</span>
			</h4>
			<div class="row-margin-bottom">
				<select name="id_address_have_id_cus_invoice" class="infor_address_invoice" onchange="changeAddressID('invoice',this);">
					{foreach from=$data_option key=key_data_option item=item_data_option}
						<option value="{$data_option[$key_data_option]['id_address']|escape:'htmlall':'UTF-8'}" {if $data_option[$key_data_option]['id_address'] == $array_address['invoice']['id_address']} selected {/if}>{$data_option[$key_data_option]['alias']|escape:'htmlall':'UTF-8'}</option>
					{/foreach}
				</select>
			</div>
			<div class="well background_address_invoice">
				<div class="img_loading_gif_attr_address_invoice" style="margin-left: 20px;"><img class = "img_loading2" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif"/></div>
				<div class="address_invoice">
					<a class="btn btn-default pull-right edit_invoice fancybox" onClick='openPopupAddress("invoice","{$array_address['invoice']['id_address']|escape:'htmlall':'UTF-8'}","{$array_address['invoice']['id_address']|escape:'htmlall':'UTF-8'}")'>
						<i class="icon-pencil"></i> {l s='Edit' mod='askforaquotemodul'}
					</a>
					<div class="td_address_invoice">
						<input type="hidden" name="id_address_invoice" class="id_address_invoice" value="{$array_address['invoice']['id_address']|escape:'htmlall':'UTF-8'}">
						{$array_address['invoice']['td_popup__address_first_name']|escape:'htmlall':'UTF-8'} {$array_address['invoice']['td_popup__address_last_name']|escape:'htmlall':'UTF-8'}
						<br>
						{$array_address['invoice']['td_popup__address_company']|escape:'htmlall':'UTF-8'}
						<br>
						{$array_address['invoice']['td_popup__address_adres1']|escape:'htmlall':'UTF-8'} {$array_address['invoice']['td_popup__address_adres2']|escape:'htmlall':'UTF-8'}
						<br>{$array_address['invoice']['td_popup__address_city']|escape:'htmlall':'UTF-8'}, {$array_address['invoice']['td_popup__address_state']|escape:'htmlall':'UTF-8'} {$array_address['invoice']['td_popup__address_zip_code']|escape:'htmlall':'UTF-8'}
						<br>{$array_address['invoice']['td_popup__address_country']|escape:'htmlall':'UTF-8'}
						<br>{$array_address['invoice']['td_popup__address_home_phone']|escape:'htmlall':'UTF-8'}{if !empty($array_address['invoice']['td_popup__address_home_phone']) && !empty($array_address['invoice']['td_popup__address_mobile_phone'])},{/if}{$array_address['invoice']['td_popup__address_mobile_phone']|escape:'htmlall':'UTF-8'}
					</div>
				</div>
			</div>
		</div>
	{else}
		<div class="alert alert-warning">{l s='No address on this order' mod='askforaquotemodul'}</div>
	{/if}
{else}
	<div class="alert alert-warning">{l s='No address on this order' mod='askforaquotemodul'}</div>
{/if}