{config_load file="$language_path_admin/$language.conf" section="general"}
{config_load file="$language_path_admin/$language.conf" section="imports_overview"}

<script type="text/javascript">
{literal}
/*
 * PRUEFT OB BEIM ANLEGEN EINER RECHNUNG ZUM IMPORT
 * EINE RECHNUNGSADRESSE/SCHIFF AUSGEWAEHLT WURDE
 * @TEMPLATE: invoice_change_address.html
*/
function check_form(){
	dom = document.forms['invoice_address'];
	checked = false;
	for(i=0;i<dom.elements['invoice_company_id'].length;i++){
		if(dom.elements['invoice_company_id'][i].checked == true){
			return true;
		}
	}
	return false;
}
{/literal}

snippets = new Array();
snippets[0] = new Array('snippet_history','history','&class=imports&id={$id}');

window.onload=load_snippets();
{literal}
function load_snippets(){
	if(snippets.length > 0 && snippet_counter <= (snippets.length-1) ){
		snippet_div = snippets[snippet_counter][0];
		snippet_page = snippets[snippet_counter][1];
		snippet_params = snippets[snippet_counter][2];
		ajax_show_snippet(snippet_div,snippet_page,snippet_params);
	}
}
{/literal}
</script>



<div id="page_title">{#heading_title#} {$import.import_number}</div>

{if $import.action_array}
	{draw_actions items=$import.action_array}
{/if}

<div class="main">
	<div class="main" style="float:left;">
	<table border="0" cellspacing="0" cellpadding="3">
	<tr>
		<th class="main">{#date_added#}</td><td class="main">{$import.date_added|date_format:"%d.%m.%Y"}</td>
	</tr>
	{if $import.date_export > 0}
	<tr>
		<th class="main">{#date_export#}</td><td class="main">{$import.date_export|date_format:"%d.%m.%Y"}</td>
	</tr>
	{/if}
	<tr>
		<th class="main">{#shipper_reference_number#}</td><td class="main">{$import.shipper_reference_number}</td>
	</tr>
	{if $import.routing_source != '' or $import.routing_target != ''} 
	<tr>
		<th class="main">{#routing#}</td><td class="main">{$import.routing_class} / {$import.routing_target}</td>
	</tr>
	{/if}
	</table>
	</div>
	<div class="main" style="float:left;">
	<table border="0" cellspacing="0" cellpadding="3">
	
	
	<tr>
		<th class="main">{#transport_type#}</td><td class="main">{$import.transport_type}</td>
	</tr>
	<tr>
		<th class="main">{#transport_code#}</td><td class="main">{$import.transport_types_code}</td>
	</tr>
	<tr>
		<th class="main">{#status#}</td><td class="main">{$import.status_name}</td>
	</tr>
	</table>
	</div>
	<div style="clear:both;"></div>
	

	<div class="main" style="float:left;">{draw_address_table title=#shipper_address# values=$import.shipper_address source="company"}</div>
	<div class="main" style="float:left;">{draw_address_table title=#transport_agent_address# values=$import.transport_agent_address source="company"}</div>
	<div class="main" style="float:left;">{draw_address_table title=#haulage_service_address# values=$import.haulage_service_address source="company"}</div>
	<div style="clear:both;"></div>

	{if $import.comments != ''}
	<br />
		{if $import.comments != ''}
	<div class="main" style="float:left;">{include file="snippet_import_comments.html"}</div>
		{/if}
	<div style="clear:both;"></div>
	<br />
	{/if}
</div>
<br />
<div class="main">
	{include file="snippet_import_costs.html"}
</div>
<br />
<div class="main">
	{include file="snippet_import_ships.html"}
</div>

<div class="main">
	<b>{#history#}</b>
	<div id="snippet_history"></div>
</div>