<!-- content_cash_desk/address_invoice.tpl -->
<div class="arrow_title">Rechnungsadresse</div><br />

<div style="width:100%;">
	<div class="dropdown_wrapper" id="billing_address" style="width:460px;">
		<div class="dropdown_title">
			<span class="info">Rechnungsadresse ausw&auml;hlen</span>
			<div class="arrow">&nbsp;</div>
		</div>
		<div class="dropdown_item_wrapper">
			<div class="dropdown_item" title="">
				<span class="dropdown_item_title">Neue Adresse hinzuf&uuml;gen</span>
			</div>
			{foreach from=$addresses key=num item=address}
				<div class="dropdown_item" title="{$num}">
					<span class="dropdown_item_title">{$address->firstname} {$address->surname}, {if $address->company}{$address->company}, {/if}{$address->city}</span>
				</div>
			{/foreach}
		</div>
	</div>
	<input id="input_billing_address" type="hidden" name="billing[billing_address]" value="{if $personal_data.billing.billing_address}{$personal_data.billing.billing_address}{else}{$customer->default_address}{/if}" />
</div>

<div style="float:left;width:110px;margin-right:10px;">
	<label>Anrede</label>
	<div class="dropdown_wrapper" id="billing_honorific">
		<div class="dropdown_title">
			<span class="info">
{if $personal_data.billing.honorific || $personal_data.billing|is_array}
    {if $personal_data.billing.honorific == '0'}Herr
    {elseif $personal_data.billing.honorific == '1'}Frau
    {elseif $personal_data.billing.honorific == '2'}Firma
    {/if}
{elseif $customer->default_address_honorific == '0'}Herr
{elseif $customer->default_address_honorific == '1'}Frau
{elseif $customer->default_address_honorific == '2'}Firma
{/if}
			</span>
			<div class="arrow">&nbsp;</div>
		</div>
		<div class="dropdown_item_wrapper">
			<div class="dropdown_item" title="0"><span class="dropdown_item_title">Herr</span></div>
			<div class="dropdown_item" title="1"><span class="dropdown_item_title">Frau</span></div>
			<div class="dropdown_item" title="2"><span class="dropdown_item_title">Firma</span></div>
		</div>
		<input id="billing_honorific_input" type="hidden" name="billing[honorific]" value="{if $personal_data.billing|is_array}{$personal_data.billing.honorific}{elseif $customer->default_address_honorific >= '0'}{$customer->default_address_honorific}{/if}" />
	</div>
</div>

<div style="float:left;width:170px;margin-right:10px;">
	<label>Vorname</label><br />
	<div class="v_input_wrapper">
		<div class="v_input_left">&nbsp;</div>
		<div class="v_input_middle">
			<input type="text" name="billing[firstname]" value="" />
		</div>
		<div class="v_input_right">&nbsp;</div>
		<div class="clear"></div>
	</div>
</div>

<div style="float:left;width:170px;">
	<label>Nachname</label><br />
	<div class="v_input_wrapper">
		<div class="v_input_left">&nbsp;</div>
		<div class="v_input_middle">
			<input type="text" name="billing[surname]" value="" />
		</div>
		<div class="v_input_right">&nbsp;</div>
		<div class="clear"></div>
	</div>
</div>
<br style="clear:left;" />
<br />

<div style="width:470px;float:left;">
	<label>Firma</label><br />
	<div class="v_input_wrapper">
		<div class="v_input_left">&nbsp;</div>
		<div class="v_input_middle">
			<input type="text" name="billing[company]" value="" />
		</div>
		<div class="v_input_right">&nbsp;</div>
		<div class="clear"></div>
	</div>
</div>
<br style="clear:left;" />
<br />

<div style="float:left;width:290px;margin-right:10px;">
	<label>Strasse</label><br />
	<div class="v_input_wrapper">
		<div class="v_input_left">&nbsp;</div>
		<div class="v_input_middle">
			<input type="text" name="billing[street]" value="" />
		</div>
		<div class="v_input_right">&nbsp;</div>
		<div class="clear"></div>
	</div>
</div>

<div style="float:left;width:170px;">
	<label>Haus-Nr.</label><br />
	<div class="v_input_wrapper">
		<div class="v_input_left">&nbsp;</div>
		<div class="v_input_middle">
			<input type="text" name="billing[house_number]" value="" />
		</div>
		<div class="v_input_right">&nbsp;</div>
		<div class="clear"></div>
	</div>
</div>
<br style="clear:left;" />
<br />

<div style="float:left;width:110px;margin-right:10px;">
	<label>PLZ</label><br />
	<div class="v_input_wrapper">
		<div class="v_input_left">&nbsp;</div>
		<div class="v_input_middle">
			<input type="text" name="billing[zip_code]" value="" />
		</div>
		<div class="v_input_right">&nbsp;</div>
		<div class="clear"></div>
	</div>
</div>

<div style="float:left;width:170px;margin-right:10px;">
	<label>Ort</label><br />
	<div class="v_input_wrapper">
		<div class="v_input_left">&nbsp;</div>
		<div class="v_input_middle">
			<input type="text" name="billing[city]" value="" />
		</div>
		<div class="v_input_right">&nbsp;</div>
		<div class="clear"></div>
	</div>
</div>

<div style="float:left;width:170px;">
	<label>Land</label><br />
	<div class="dropdown_wrapper" id="billing_country" style="width:163px;">
		<div class="dropdown_title">
			{assign var=tmp_billing_country_id value=$personal_data.billing.country}
			{assign var=tmp_default_country_id value=$customer->default_address_country_id}
			<span class="info">{if $personal_data.billing|is_array}{$countries.$tmp_billing_country_id->name}{elseif $customer->default_address_country_id}{$countries.$tmp_default_country_id->name}{else}Bitte w&auml;hlen{/if}</span>
			<div class="arrow">&nbsp;</div>
		</div>
		<div class="dropdown_item_wrapper">
			{foreach from=$countries item=country}
				<div class="dropdown_item" title="{$country->id}"><span class="dropdown_item_title">{$country->name}</span></div>
			{/foreach}
		</div>
		<input type="hidden" name="billing[country]" value="{if $personal_data.billing|is_array}{$personal_data.billing.country}{elseif $customer->default_address_country_id}{$customer->default_address_country_id}{/if}" />
	</div>
	
</div>
<br style="clear:left;" />
<br />

<div style="float:left;">
	<input id="cashdesk_button_save_billing" type="button" class="cashdesk_black_button" value="&gt;&gt; Daten speichern" style="border:0px solid transparent;cursor:pointer;" />
</div>
<div id="billing_save_message" style="float:left;font-weight:bold;margin-left:20px;"></div>
<br style="clear:left;" />