		<table border="0" cellpadding="0" cellspacing="0" width="100%">

{if $tab == 'info'}

		<tr>
			<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="2">
		          	<tr>
			            	<td colspan="2">
			            		<table border="0" cellpadding="0" cellspacing="2" width="100%">
			            		<tr class="dataTableHeadingRow">
			            			<td>&nbsp;</td><td class="main"><b>Kundenadresse</b></td><td class="main"><b>Versandadresse</b></td><td class="main"><b>Rechnungsadresse</b></td>
					        </tr><tr>
					            	<td class="dataTableContent"><b>Firma</b></td><td class="dataTableContent">{$order.customer.company}&nbsp;</td><td class="dataTableContent">{$order.delivery.company}&nbsp;</td><td class="dataTableContent">{$order.billing.company}&nbsp;</td>
					        </tr><tr>
					            	<td class="dataTableContent"><b>Name</b></td><td class="dataTableContent">{$order.customer.name}&nbsp;</td><td class="dataTableContent">{$order.delivery.name}&nbsp;</td><td class="dataTableContent">{$order.billing.name}&nbsp;</td>
					        </tr><tr>
					            	<td class="dataTableContent"><b>Strasse</b></td><td class="dataTableContent">{$order.customer.street_address}&nbsp;</td><td class="dataTableContent">{$order.delivery.street_address}&nbsp;</td><td class="dataTableContent">{$order.billing.street_address}&nbsp;</td>
					        </tr><tr>
					            	<td class="dataTableContent"><b>Adresszusatz</b></td><td class="dataTableContent">{$order.customer.suburb}&nbsp;</td><td class="dataTableContent">{$order.delivery.suburb}&nbsp;</td><td class="dataTableContent">{$order.billing.suburb}&nbsp;</td>
					        </tr><tr>
					            	<td class="dataTableContent"><b>PLZ Ort</b></td><td class="dataTableContent">{$order.customer.postcode}&nbsp;{$order.customer.city}</td><td class="dataTableContent">{$order.delivery.postcode} {$order.delivery.city}&nbsp;</td><td class="dataTableContent">{$order.billing.postcode}&nbsp;{$order.billing.city}</td>
					        </tr><tr>
					            	<td class="dataTableContent"><b>Land</b></td><td class="dataTableContent">{$order.customer.country}&nbsp;</td><td class="dataTableContent">{$order.delivery.country}&nbsp;</td><td class="dataTableContent">{$order.billing.country}&nbsp;</td>
					        </tr>
						</table>
					</td>
				</tr>
				<tr>
					<td valign="top">
						<table border="0" cellspacing="0" cellpadding="2" width="450">
						{if $order.customer.csID != ''}
						<tr>
							<td class="main" valign="top" bgcolor="#FFCC33"><b>Kundennummer:</b></td>
							<td class="main" bgcolor="#FFCC33">{$order.customer.csID}</td>
						</tr>
						{/if}
		
						<tr>
							<td class="main" valign="top"><b>Memos:</b></td>
							<td class="main">
							{if $memos}
								<b>{$memos}</b>
							{else}
								<b>0</b>
							{/if}
								&nbsp;{$memos_link}
							</td>
						</tr>
						{if $order.customer.telephone != ''}
						<tr>
							<td class="main"><b>{$ENTRY_TELEPHONE}</b></td>
							<td class="main">{$order.customer.telephone}</td>
						</tr>
						{/if}
						{if $order.customer.mobile != ''}
						<tr>
							<td class="main"><b>Handynummer:</b></td>
							<td class="main">{$order.customer.mobile}</td>
						</tr>
						{/if}
						<tr>
							<td class="main"><b>{$ENTRY_EMAIL_ADDRESS}</b></td>
							<td class="main">
							{if $mail_popup_link}
								{$mail_popup_link}<u>
							{/if} 
								{$order.customer.email_address}
							{if $mail_popup_link}
								</u></a>
							{/if}
							</td>
						</tr>
						{if $order.customer.vat_id != ''}
						<tr>
							<td class="main"><b>{$ENTRY_CUSTOMERS_VAT_ID}</b></td>
							<td class="main">{$order.customer.vat_id}</td>
						</tr>
						{/if}
						{if $order.info.ebay_id}
			
						<tr>
							<td valign="top" class="main"><b>Ebay-Nummer:</b></td>
							<td class="main">{$EBAY_LINK}</td>
						</tr>
						
						{/if}
						
						{if $order.info.orders_split_id > 0}
			
						<tr>
							<td valign="top" class="main"><b>Erzeugt aus Rechnungssplit</b></td>
							<td class="main">Re-Nr: {$order.info.orders_split_id}</td>
						</tr>
			
						{/if}
						
						{if $rueckstand}

						<tr>
							<td valign="top" class="main"><b><font color="#FF0000">R&uuml;ckstand:</font></b><br></td>
							<td class="main">
								<table border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td class="main"><font color="#FF0000">Produkte dieser Bestellung sind im R&uuml;ckstand</font></td>
									{if $rueckstand_delete_link}
									<td class="main">&nbsp;&nbsp;</td><td>{$rueckstand_delete_link}</td>
									{/if}
								</tr>
								</table>
							</td>
						</tr>
						
						{/if}
			
						{if $order.info.ebay_no_shippingaddress == '1'}
			
						<tr class="dataTableRowSelected">
							<td valign="top" class="main"><b>EBAY-API Bug:</b></td>
							<td class="main">Versandadresse wurde von Ebay nicht &uuml;bergeben und wurde durch Rechnungsadresse ersetzt.
							&nbsp;<a href="#" onClick="window.open('popup_get_ebay_address.php?orders_id={$order.info.id}','getad','width=450,height=600,scrollbars=yes,resizable=yes');">[Neu einlesen]</a>
							</td>
						</tr>
			
						{/if}
						
						{if $order.info.ebay_no_registrationaddress == '1'}
			
						<tr class="dataTableRowSelected">
							<td valign="top" class="main"><b>EBAY-API Bug:</b></td>
							<td class="main">Rechnungsadresse wurde von Ebay nicht vollst&auml;ndig &uuml;bergeben und wurde durch Versandadresse ersetzt.
							&nbsp;<a href="#" onClick="window.open('popup_get_ebay_address.php?orders_id={$order.info.id}','getad','width=450,height=600,scrollbars=yes,resizable=yes');">[Neu einlesen]</a>
							</td>
						</tr>
						
						{/if}
			
						{if $order.info.ebay_different_address == '1'}
			
						<tr class="dataTableRowSelected">
							<td valign="top" class="main"><b>EBAY-API Bug:</b></td>
							<td class="main">Versandadresse wurde von Ebay nicht vollst&auml;ndig &uuml;bergeben wurde aber nicht durch Registrieradresse ersetzt, da die beiden Adressen unterschiedliche Postleitzahlen enthielten.</td>
						</tr>

						{/if}		
			
						{if $order.info.date_shipping != '0000-00-00 00:00:00'}
						
						<tr>
							<td class="main"><b>Versanddatum:</b></td>
							<td class="main">{$order.info.date_shipping|date_format:"%d.%m.%Y"}</td>
						</tr>
						
						{/if}
			
						{if $order.customer.cIP != ''}
						
						<tr>
							<td class="main" valign="top" bgcolor="#FFCC33"><b>IP:</b></td>
							<td class="main" bgcolor="#FFCC33"><b>{$order.customer.cIP}</b></td>
						</tr>

						{/if}
						<tr>
							<td class="main"><b>{$ENTRY_LANGUAGE}</b></td>
							<td class="main">{$order.info.language}</td>
						</tr>
						<tr>
							<td class="main"><b>{$ENTRY_PAYMENT_METHOD}</b></td>
							<td class="main">{$PAYMENT_METHOD}</td>
						</tr>
						<tr>
							<td class="main" valign="top"><b>Versandart:</b></td>
							<td>
							<table border="0" cellpadding="1" cellspacing="0"><tr>
								<td class="main" valign="top">{$order.info.shipping_class}</td>
							{if $insel_plz == 1}
								<td valign="top">&nbsp;<img src="images/icons/inselzuschlag.gif" border="0" alt="Versand in PLZ die bei den meisten Versendern extra Aufschlag kostet" title="Versand in PLZ die bei den meisten Versendern extra Aufschlag kostet"></td>
							{/if}
							</tr></table>
							</td>
						</tr>
						


						{if $PAYPAL_NOTE}

						{$PAYPAL_NOTE}
						
						{/if}

						{if $kasse}
						
						<tr>
							<td class="main" valign="top"><b>Kassenbuchung:</b></td>
							<td class="main">{$kasse.paymode} am {$kasse.date_purchased|date_format:"%d.%m.%Y"} in Filiale &quot;{$kasse.filiale}&quot;
							{if $change_kasse_paymode_link}
						    	&nbsp;<a href="{$change_kasse_paymode_link}">[bearbeiten]</a>
							{else}
							&nbsp;<span class=errorText>[Keine Berechtigung um Bezahlart zu &auml;ndern]</span>
							{/if}
							</td>
						</tr>
		          
						{/if}

						{if $order.info.cc_type != '' or $order.info.cc_owner !='' or $order.info.cc_number != ''}
				
						<tr>
							<td colspan="2">&nbsp;</td>
						</tr>
						<tr>
							<td class="main">{$ENTRY_CREDIT_CARD_TYPE}</td>
							<td class="main">{$order.info.cc_type}</td>
						</tr>
						<tr>
							<td class="main">{$ENTRY_CREDIT_CARD_OWNER}</td>
							<td class="main">{$order.info.cc_owner}</td>
						</tr>
						<tr>
							<td class="main">{$ENTRY_CREDIT_CARD_NUMBER}</td>
							<td class="main">{$order.info.cc_number}</td>
						</tr>
						<tr>
							<td class="main">{$ENTRY_CREDIT_CARD_EXPIRES}</td>
							<td class="main">{$order.info.cc_expires}</td>
						</tr>

						{/if}
						
						{if $banktransfer}
								
						<tr>
							<td colspan="2">&nbsp;</td>
						</tr>
						<tr>
							<td class="main">{$TEXT_BANK_NAME}</td>
							<td class="main">{$banktransfer.banktransfer_bankname}</td>
						</tr>
						<tr>
							<td class="main">{$TEXT_BANK_BLZ}</td>
							<td class="main">{$banktransfer.banktransfer_blz}</td>
						</tr>
						<tr>
							<td class="main">{$TEXT_BANK_NUMBER}</td>
							<td class="main">{$banktransfer.banktransfer_number}</td>
						</tr>
						<tr>
							<td class="main">{$TEXT_BANK_OWNER}</td>
							<td class="main">{$banktransfer.banktransfer_owner}</td>
						</tr>
				          
							{if $banktransfer.banktransfer_status == 0}
						
						<tr>
							<td class="main">{$TEXT_BANK_STATUS}</td>
							<td class="main">OK</td>
						</tr>

				      	{else}

						<tr>
							<td class="main">{$TEXT_BANK_STATUS}</td>
							<td class="main">{$banktransfer.banktransfer_status}</td>
						</tr>
						<tr>
							<td class="main">{$TEXT_BANK_ERRORCODE}</td>
							<td class="main">{$error_val}</td>
						</tr>
						<tr>
							<td class="main">{$TEXT_BANK_PRZ}</td>
							<td class="main">{$banktransfer.banktransfer_prz}</td>
						</tr>
						
				      	{/if}
				    
				    		{if $banktransfer.banktransfer_fax}

						<tr>
							<td class="main">{$TEXT_BANK_FAX}</td>
							<td class="main">{$banktransfer.banktransfer_fax}</td>
						</tr>
				          
							{/if}
							
						{/if}
						</table>
					</td><td valign="top" align="right">
						<table border="0">
						{if $orders_update_link}
						<tr><td><input type="button" onClick="window.location.href='{$orders_update_link}';" value='Status/Kommentar' title='Rechnungsstatus &auml;ndern / Kommentar hinterlegen' class="iButton" style="width:160px;"></td></tr>
						{/if}
						
						{if $warenausgabe_allow}
						<tr><td><input type="button" onClick="window.location.href='{$warenausgabe_link}';" value="Warenausgabe" style="width:160px;" class="iButton" title='Warenausgabe'></td></tr>
						{/if}

						{if $kasse_set_error}
						<tr><td><font color="red" class="main"><b>DIESE BESTELLUNG ENTH&Auml;LT EIN AUSWAHLSET WAS NOCH NICHT GEW&Auml;HLT WURDE</b></font></td></tr>
						{/if}
						
						
						{if $rueckstand_allow}
						<tr><td><input type="button" style="width:160px;" value="Ware im R&uuml;ckstand" onClick="really_rueckstand('{$order.info.id}');" class="iButton" title='Rechnung als Im R&uuml;ckstand markieren'></td></tr>
						{/if}
						
						{if $set_block_shipping_link}	
						<tr><td>{$set_block_shipping_button}</td></tr>
						{/if}
						
						{if $set_unblock_shipping_button}	
						<tr><td>{$set_unblock_shipping_button}</td></tr>
						{/if}
						
						{if $set_no_warn_span_link}
						<tr><td>{$set_no_warn_span_button}</td></tr>
						{/if}
		
						{if $unset_no_warn_span_button}
						<tr><td>{$unset_no_warn_span_button}</td></tr>
						{/if}
						
						{if $recla_ext_storno_link}
						<tr><td><input type="button" onClick="window.location.href='{$recla_ext_storno_link}';" value="Storno/R&uuml;cktritt" title="Erweitertes Storno/R&uuml;cktritt" class="iButton" style="width:160px;"></td></tr>
						{/if}
						</table>
					</td>
				</tr>
				<tr>
					<td class="dataTableContent" colspan="2">
						{if $FEEDBACKS}
							<b>Bewertungen</b>
							<table border="0" cellpadding="3" cellspacing="0">
							<tr class="dataTableHeadingRow">
								<td class="dataTableHeadingContent"><b>Auktion</b></td>
								<td class="dataTableHeadingContent"><b>K&auml;ufer</b></td>
								<td class="dataTableHeadingContent"><b>Art</b></td>
								<td class="dataTableHeadingContent"><b>Bewertung</b></td>
								<td class="dataTableHeadingContent"><b>Bewertung vom</b></td>
								<td class="dataTableHeadingContent"><b>Zur&uuml;ck bewertet</b></td>
							</tr>
							{foreach from=$FEEDBACKS item=feedback}
							<tr class="dataTableRow">
								<td class="dataTableContent">{$feedback.ItemNumber}</td>
								<td class="dataTableContent">{$feedback.CommentingUser}</td>
								<td class="dataTableContent">{$feedback.CommentType}</td>
								<td class="dataTableContent">{$feedback.CommentText}</td>
								<td class="dataTableContent">{$feedback.TimeOfComment|date_format:"%d.%m.%Y"}</td>
								<td class="dataTableContent">{if $feedback.status == 1}Ja{else}Nein{/if}</td>
							</tr>
							{foreachelse}
							<tr class="dataTableRow">
								<td class="dataTableContent" colspan="5">Noch keine Bewertung</td>
							</tr>
							{/foreach}
							</table>
						{/if}
	
				<!--
				KOMBINIEREN HANDLING START
				//-->

				{if $combined_child_orders}
				
				  	<br>Wurde kombiniert aus:
				  	
					{foreach name=blahparents item=child from=$combined_child_orders}
						
						{if $child.link != ''}<a href="{$child.link}"><u>{/if}Best.-Nr {$child.orders_id}{if $child.link != ''}</u></a>{/if}&nbsp;
						
					{/foreach}
					
				{/if}
				  
				{if $combined_orders_link}
					
					<br><font color=red>Diese Rechnung wurde kombiniert:
					
					<a href='{$combined_orders_link}'><u>Best.-Nr {$order.info.combined_orders_id}</u></a></font>
					
					&nbsp;
					
				{/if}

				<!--
				KOMBINIEREN HANDLING ENDE
				//-->

				<!--
				ALTES KOMBINIEREN HANDLING START
				//-->

				{if $child_orders}
				
				  	<br>Enth&auml;lt:
				  	
					{foreach name=blahparents item=child from=$child_order}
						
						{if $child.link != ''}<a href="{$child.link}"><u>{/if}Best.-Nr {$child.orders_id}{if $child.link != ''}</u></a>{/if}&nbsp;
						
					{/foreach}
					
				{/if}
				  
				{if $order.info.parent_orders_id > 0}
					
					<br><font color=red>Diese Rechnung wurde kombiniert und ist Bestandteil von:
					
					{if $parent_orders_link}<a href='{$parent_orders_link}'><u>{/if}Best.-Nr {$order.info.parent_orders_id}{if $parent_orders_link}</u></a></font>{/if}
					
					&nbsp;
					
				{/if}

				<!--
				ALTES KOMBINIEREN HANDLING ENDE
				//-->
					
			</td>
		</tr>
		<tr>

<script language="javascript">
<!--
	var data = new Array();

	{$javascript_string}
	
//-->
</script>
      
			<td class="main" colspan="2">
				<br />
				<table border="0" width="100%" cellspacing="0" cellpadding="2">
				<tr class="dataTableHeadingRow">
					<td class="dataTableHeadingContent">&nbsp;</td>
					<td class="dataTableHeadingContent" colspan="2">{$TABLE_HEADING_PRODUCTS}</td>
					<td class="dataTableHeadingContent">{$TABLE_HEADING_PRODUCTS_MODEL}</td>
					<td class="dataTableHeadingContent">Gewicht</td>
					<td class="dataTableHeadingContent" align="right">Einzelpreis</td>
					<td class="dataTableHeadingContent" align="right">Preis</td>
				</tr>

			{foreach name=blahprod item=product from=$products}

				<tr class="dataTableRow">
					<td class="dataTableContent" align="center">
						{if $product.date_available}
						<img src="images/icons/icon_calendar.gif" border="0" alt="Erscheinungsdatum {$product.date_available|date_format:"%d.%m.%Y"}" title="Erscheinungsdatum {$product.date_available|date_format:"%d.%m.%Y"}">
						{/if}
						{if $product.reclamation_link != ''}{$product.reclamation_link}{/if}
						{if !$product.date_available and !$product.reclamation_link}
						&nbsp;
						{/if}
					</td>
					<td class="dataTableContent" valign="top" align="right">{$product.qty}&nbsp;x</td>
					<td class="dataTableContent" valign="top"><a href="{$product.edit_link}"><u>{$product.name}</u> ({$product.weight|string_format:"%.4f"}kg)</a>

					{if $product.collies}
					
						<!-- COLLIBLOCK START //-->
						
						<table border="0" cellpadding="0" cellspacing="2">
						<tr>
							<td width="10" class="smallText" rowspan="{$collies_rowspan}">&nbsp;</td>
							<td class="smallText">&nbsp;</td>
							<td bgcolor="#CACACA" class="smallText">Dieses Produkt enth&auml;lt die folgenden Collis</td>
						</tr>

						{foreach name=blahprodcol item=collie from=$product.collies}
									
						<tr>
							<td class="smallText" valign="top">{$collie.order_qty}&nbsp;x</td>
							<td class="smallText" colspan="2">{$collie.name}{$collie.$model}<font color="green">[pID: {$collie.collie_products_id}]</font>

									{if $collie.serials}
										
								<table border="0" cellspacing="0">
								<tr>
									<td class="smallText">
										<font color="darkblue"><br><b>SN:</b>&nbsp;
													
												{foreach name=blahprodcolsn item=sn from=$collie.serials}
												
										{$sn.serial_number|escape:"htmlall"}&nbsp;
										
												{/foreach}
										</font>
									</td>
									<td><a href="{$collie.serials_edit_link}">[Edit]</a></td>
								</tr>
								</table>
						
									{/if}
												

							</td>
						</tr>

						{/foreach}

						</table>

					{/if}
			
					{if $product.serials}
										
						<table border="0" cellspacing="0">
						<tr>
							<td class="smallText">
								<font color="darkblue"><br><b>SN:</b>&nbsp;
											
										{foreach name=blahprodsn item=sn from=$product.serials}
										
								{$sn.serial_number|escape:"htmlall"}&nbsp;
								
										{/foreach}
								</font>
							</td>
							{if $product.serials_edit_link}
							<td><a href="{$product.serials_edit_link}">[Edit]</a></td>
							{/if}
						</tr>
						</table>
						
					{/if}

					</td>
					<td class="dataTableContent" valign="top">{$product.model}&nbsp;[ID {$product.id}]</td>
					<td class="dataTableContent" valign="top">{$product.weight_total|string_format:"%.4f"}</td>
					<td class="dataTableContent" align="right" valign="top">{$product.single_price}</td>
			     		<td class="dataTableContent" align="right" valign="top"><b>{$product.price}</b></td>
				</tr>
			
			{/foreach}
			
<!--
			{if $order.products.0.allow_tax == '1' and $order.products.0.tax > 0}

				<tr class="dataTableRowOver">
					<td align="right" colspan="12">
				    		<table border="0" cellspacing="0" cellpadding="2">
			    			<tr>
							<td align="right" class="smallText">Zwischensumme, netto:&nbsp;</td>
			    				<td align="right" class="smallText">{$sum_netto}</td>
						</tr>
						</table>
					</td>
				</tr>
			
			{/if}
//-->

				<tr>
					<td align="right" colspan="12">
						<table border="0" cellspacing="0" cellpadding="2">
					
			{foreach name=blahtot item=total from=$order.totals}
			
						<tr>
							<td align="right" class="smallText">{$total.title}</td>
							<td align="right" class="smallText">{$total.text}</td>
						</tr>
					
			{/foreach}
			
			{if $notax != ''}
			
						<tr>
							<td colspan="2" class="smallText"><br>{$notax}</td>
						</tr>
			
			{/if}
			
						<tr>
							<td align="right" class="smallText"><b>Gesamtgewicht</b></td>
							<td align="right" class="smallText">{$weight_total|string_format:"%.4f"}kg</td>
						</tr>
						<tr>
							<td align="right" class="smallText"><b>Gesamtvolumen</b></td>
							<td align="right" class="smallText">{$volume_total|string_format:"%.4f"}m&sup3;</td>
						</tr>
						</table>
					</td>
				</tr>
				</table>
			
			{if $orders_split_link}
					
				<div align="right"><input type="button" onClick="window.location.href='{$orders_split_link}';" value="Rechnungssplit" class="iButton"></div>
			
			{/if}

			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td class="main">
		

		{if $hermes_array}

				<br><br>
				<span class="main"><b>Hermes-Status</b></span>
				<table border="0" cellspacing="0" cellpadding="5">
				<tr class="dataTableHeadingRow">
					<td class="dataTableHeadingContent" align="right"><b>Datum</b></td>
					<td class="dataTableHeadingContent" ><b>Vorgang</b></td>
					<td class="dataTableHeadingContent"><b>Artikel</b></td>
				</tr>

					{foreach name=blahherm item=hermes from=$hermes_array}

				<tr class="{$hermes.trclass}">
					<td class="dataTableContent" align="right">{$hermes.date_saved|date_format:"%d.%m.%Y"}</td>
					<td class="dataTableContent">{$hermes.text}</td>
					<td class="dataTableContent">{$hermes.artikelname}</td>
				</tr>
					
					{/foreach}
					
				</table>
				<br>
				{$separator}
				<br><br>

		{/if}
		
		{if $hermes_stat_array}

				<br><br>
				<span class="main"><b>Hermes-Bestellstatus</b></span>
				<table border="0" cellspacing="0" cellpadding="5">
				<tr class="dataTableHeadingRow">
					<td class="dataTableHeadingContent" align="right"><b>Datum</b></td>
					<td class="dataTableHeadingContent" ><b>Vorgang</b></td>
					<td class="dataTableHeadingContent"><b>Versender</b></td>
					<td class="dataTableHeadingContent"><b>ID</b></td>
				</tr>

					{foreach name=blahhermstat item=hermes from=$hermes_stat_array}
					
				<tr class="{$hermes.trclass}">
					<td class="dataTableContent" align="right">{$hermes.d_create|date_format:"%d.%m.%Y"}</td>
					<td class="dataTableContent">[{$hermes.i_delivery}] {$hermes.i_packunit} x {$hermes.s_itemname}</td>
					<td class="dataTableContent">{$hermes.i_carrier}</td>
					<td class="dataTableContent">{$hermes.i_shipment_id}</td>
				</tr>
				
					{/foreach}
					
				</table>
				<br>
				{$separator}
				<br><br>

		{/if}
		
		<!-- MAHNSPERRE START //-->
			</td>
		</tr>
		<tr>
			<td colspan="3" align="right" valign="bottom">
	   
			   	<table border="0" cellspacing="0" cellpadding="2">
			   	<tr>
	   
		{if $order_email_allow}
		   
					<td><input type="button" style="width:160px;" value="Rechnung per Email" onClick="ask_email('{$order.customer.email_address}');" class="iButton"></td>
					<td><input type="button" style="width:180px;" value="R&uuml;cksendeschein per Email" onClick="ask_email_packing('{$order.customer.email_address}');" class="iButton"></td>
	   
		{/if}
	   
		{if $order_print_allow}
	   
					<td><input type="button" style="width:160px;" value="Rechnung Drucken" onClick="window.open('{$print_order_link}', 'popup', 'toolbar=0, width=640, height=600, resizable=1,scrollbars=1');" class="iButton"></td>
					<td><input type="button" style="width:160px;" value="Buchhaltungsausdruck" onClick="window.open('{$print_order_admin_link}', 'popup', 'toolbar=0, width=640, height=600, resizable=1,scrollbars=1');" class="iButton"></td>
	   
		{/if}
		   
		{if $order_print_packingslip_allow}
		   
					<td><input type="button" style="width:160px;" value="Lieferschein Drucken" onClick="window.open('{$order_print_packingslip_link}', 'popup', 'toolbar=0, width=640, height=600, resizable=1,scrollbars=1');" class="iButton"></td>
	 
		{/if}
				</tr>
				</table>
		
				<br>
				<p align="left">
				<font face="arial,helvetica,sans-serif" color="green" size=2><b>Kommentare:</b> {if $order.info.comments != ''}{$order.info.comments}{else}Kein Kommentar hinterlegt{/if}</font><br><br>
		
				</p>
		
		{if $warnings}
			
				<table border="0" cellspacing="0" cellpadding="2" bgcolor="#DCDCDC">
				<tr bgcolor="#AA0000">
					<td class="main" colspan="2"><img src="images/icons/warning.gif">&nbsp;<font color="white"><b>Mahnungen</b></font></td>
				</tr>
				<tr>
					<td colspan="2">{$separator}</td>
				</tr>
				
					{foreach name=blahwarn item=warn from=$warnings}
					
				<tr>
					<td class="errortext">{$warn.wd}</td>
					<td class="errortext">{$warn.action}</td>
				</tr>
				<tr>
					<td colspan="2">{$separator}</td>
				</tr>
				
					{/foreach}
				
				</table>
				<br><br>

		{/if}
			
			</td>
		</tr>
{elseif $tab == 'stammdaten'}

		<tr>
			<td>
            
		    				<table border="0" cellspacing="0" cellpadding="2">
						<tr>
							<td valign="top" class="formAreaTitle">

							{if $crm_edit_link}
								<a href="{$crm_edit_link}"><img src="images/icons/icon_edit.gif" border="0" alt="Stammdaten bearbeiten" title="Stammdaten bearbeiten"></a>
							{else}
								<a href="#" onClick="alert('Kunde Kasse darf nicht editiert werden.');"><img src="images/icons/icon_edit.gif" border="0" alt="Stammdaten bearbeiten" title="Stammdaten bearbeiten"></a>
							{/if}
							&nbsp;<b>Stamm-Daten</b>
							
							</td>
						</tr>
						<tr>
							<td valign="top">{$separator}</td>
						</tr>
						<tr>
							<td valign="top" class="main">
			
								<table border="0" cellpadding="0">
								<tr>
									<td class="main"><b>Firma:</b></td><td class="main">{$cInfo.entry_company}</td>
								</tr><tr>
									<td class="main"><b>Name:</b></td><td class="main">{$cInfo.customers_firstname} {$cInfo.customers_lastname}</td>
								</tr><tr>
									<td class="main"><b>Strasse:</b></td><td class="main">{$cInfo.entry_street_address}</td>
								</tr><tr>
									<td class="main"><b>PLZ:</b></td><td class="main">{$cInfo.entry_postcode}</td>
								</tr><tr>
									<td class="main"><b>Ort:</b></td><td class="main" colspan="3">{$cInfo.entry_city}</td>
								</tr><tr>
									<td class="main"><b>Land:</b></td><td class="main" colspan="3">{$cInfo.country_name}</td>
								</tr><tr>
									<td width="100" class="main"><b>Telefon:</b></td><td class="main">{$cInfo.customers_telephone}</td>
								</tr><tr>
									<td width="100" class="main"><b>Handy:</b></td><td class="main">{$cInfo.mobile}</td>
								</tr><tr>
									<td class="main"><b>Email:</b></td><td class="main">{$cInfo.customers_email_address}</td>
								</tr><tr>
									<td class="main"><b>Fax:</b></td><td class="main">{$cInfo.customers_fax}</td>
								</tr><tr>
									<td class="main"><b>Ebayuser:</b></td><td class="main">{$cInfo.customers_ebay_userid}</td>

								{if $cInfo.kto_inhaber != ''}
								</tr><tr>
									<td class="main"><b>Kontoinhaber:</b></td><td class="main">{$cInfo.kto_inhaber}</td>
								</tr><tr>
									<td class="main"><b>Kontonummer:</b></td><td class="main">{$cInfo.kto_nummer}</td>
								</tr><tr>
									<td class="main"><b>Bankinstitut:</b></td><td class="main">{$cInfo.kto_bank}</td>
								</tr><tr>
									<td class="main"><b>BLZ:</b></td><td class="main">{$cInfo.kto_blz}</td>
								{/if}
								
								{if $cInfo.customers_vat_id != ''}
								</tr><tr>
									<td class="main"><b>Ust.-ID:</b></td><td class="main">{$cInfo.customers_vat_id}</td>
								{/if}
								
								{if $cInfo.block_warnings == 1}
								</tr><tr>
									<td class="main" valign="top"><b>Mahnsperre:</b></td><td class="main">
									{if $cInfo.block_warnings_span == 0}
										Dauerhaft ausgeschlossen
									{else}
										F&uuml;r {$cInfo.block_warnings_dayspan} Tage ausgeschlossen, am {$cInfo.block_warnings_date|date_format:"%d.%m.%Y"}
									{/if}
									</td>
								{/if}
								</tr>
								</table>
				<!-- ADDRESS DATA END //-->
							</td>
						</tr>
						</table>
			</td>
		</tr>

{elseif $tab == 'reclamations'}
			
		<tr>
			<td colspan="3" class="main"><br>
				{if $reclamations}
				<table border="0" cellspacing="0" cellpadding="5">
				<!-- RECLAMATIONS START //-->

				<tr>
					<td class="main"><b>F&uuml;r diesen Auftrag wurden folgende Reklamationen angelegt:</b>
					
						{foreach name=blahrec item=reclamation from=$reclamations}
						<br><a href="{$reclamation.link}"><u>{$reclamation.rID} {$reclamation.reclamations_types_name}</u></a> ({$reclamation.reclamations_status_name})
						{foreachelse}
						<br /><i>Keine Reklamation zur Rechnung gespeichert.</i>
						{/foreach}
				
					</td>
				</tr>
				<tr>
					<td class="main">&nbsp;</td>
				</tr>
				</table>
		
				{/if}		
		
				<!-- RECLAMATIONS ENDE //-->
		
		
		{if $order_costs}
				<b>Entstandene Kosten</b><br>
				<table border="0" cellspacing="0" cellpadding="5">
				<tr class="dataTableHeadingRow">
					<td class="dataTableHeadingContent"><b>Typ</b></td>
					<td class="dataTableHeadingContent" align="right"><b>Reklamation</b></td>
					<td class="dataTableHeadingContent" align="right"><b>Angelegt</b></td>
					<td class="dataTableHeadingContent" align="right"><b>Betrag</b></td>
					<td class="dataTableHeadingContent"><b>Kommentar</b></td>
					<td class="dataTableHeadingContent"><b>Bearbeiter</b></td>
				</tr>

				{foreach name=blahcosts item=cost from=$order_costs}

				<tr class="dataTableRow">
					<td class="dataTableContent">{$cost.class}</td>
					<td class="dataTableContent">{if $cost.reclamations_id > 0}<a href="{$cost.reclamation_link}"><u>{$cost.reclamations_id}</u></a>{/if}&nbsp;</td>
					<td class="dataTableContent" align="right">{$cost.date_created|date_format:"%d.%m.%Y"}</td>
					<td class="dataTableContent" align="right">{$cost.value|string_format:"%.2f"} {$order.info.currency}</td>
					<td class="dataTableContent">{$cost.comments}</td>
					<td class="dataTableContent">{$cost.editor}</td>
				</tr>

				{/foreach}

				</table>
				<br><br>

			{/if}
				<!-- REKLAMATIONEN start //-->
				
				<br /><br /><b>Aktionen</b><br />
				<table border="0" width="100%" cellspacing="1" cellpadding="5">
				<tr>
		

			{if $reclamations_types}
			
				{foreach name=blahrecl item=recla from=$reclamations_types}
				
						<td align="center" class="main"><input type="button" onClick="window.location.href='{$recla.link}';" value="{$recla.text}" title="{$recla.text}" class="iButton" style="width:200px;"></td>
				
				{/foreach}
			
			{/if}
				</tr>
				<tr>
			
			{if $reclamations_error_storno}
			
						<td align="center" class="main"><i>Reklamationen nicht mehr m&ouml;glich da bereits storniert</i></td>
				
			{/if}
	
						<td align="center" class="main"><input type="button" onClick="window.location.href='{$rueckerstattung_link}';" value="Nur R&uuml;ckerstattung" title="Nur R&uuml;ckerstattung" class="iButton" style="width:200px;"></td>
	
			{if $rueckerstattung_not_allowed}
			
						<td align="center" class="main">Sie haben keine Berechtigung um Reklamationen anzulegen.</td>
			
			{/if}
	
					</tr>
					</table>
			
				<!-- REKLAMATIONEN end //-->
			
			</td>
		</tr>


{elseif $tab == 'rueckerstattungen'}

	      
		<tr>
			<td class="main"><br>
				{if $order_rueckerstattungen}
				<b>R&uuml;ckerstattungen</b><br>
				<table border="0" cellspacing="0" cellpadding="5">
				<tr class="dataTableHeadingRow">
					<td class="dataTableHeadingContent"><b>ID</b></td>
					<td class="dataTableHeadingContent"><b>Reklamation</b></td>
					<td class="dataTableHeadingContent" align="right"><b>Betrag</b></td>
					<td class="dataTableHeadingContent" align="right"><b>Modus</b></td>
					<td class="dataTableHeadingContent" align="right"><b>Angelegt</b></td>
					<td class="dataTableHeadingContent"><b>Bezahlt</b></td>
					<td class="dataTableHeadingContent"><b>Kommentar</b></td>
					<td class="dataTableHeadingContent"><b>Status</b></td>
					<td class="dataTableHeadingContent"><b>Bearbeiter</b></td>
				</tr>
				
				{foreach name=blahrueck item=rueck from=$order_rueckerstattungen}
				
				<tr class="dataTableRow">
					<td class="dataTableContent"><a href="{$rueck.link}"><u>{$rueck.id}</u></a>&nbsp;</td>
					<td class="dataTableContent">{if $rueck.reclamations_id > 0}<a href="{$rueck.reclamation_link}"><u>{$rueck.reclamations_id}</u></a>{/if}&nbsp;</td>
					<td class="dataTableContent" align="right">{$rueck.betrag} {$order.info.currency}</td>
					<td class="dataTableContent">{$rueck.paymode}</td>
					<td class="dataTableContent" align="right">{$rueck.date_created|date_format:"%d.%m.%Y"}</td>
					<td class="dataTableContent" align="right">{if $rueck.date_payment != '0000-00-00 00:00:00'}{$rueck.date_payment|date_format:"%d.%m.%Y"}{else}-{/if}</td>
					<td class="dataTableContent">{$rueck.comments}</td>
					<td class="dataTableContent">{if $rueck.status == '1'}Offen{else}Abgeschlossen{/if}</td>
					<td class="dataTableContent">{$rueck.editor}</td>
				</tr>
				
				{/foreach}		
				
				</table>
				<br><br>
		{else}
			<br /><i>Keine R&uuml;ckerstattungen zur Rechnung gespeichert.</i>
		{/if}
			</td>
		</tr>


{elseif $tab == 'retouren'}

	      
		<tr>
			<td colspan="3" class="main">

		{if $order_retouren}

				<b>Retouren zur Rechnung</b><br>
				<table border="0" cellspacing="0" cellpadding="5">
				<tr class="dataTableHeadingRow">
					<td class="dataTableHeadingContent" align="right"><b>ID</b></td>
					<td class="dataTableHeadingContent" align="right"><b>Reklamation</b></td>
					<td class="dataTableHeadingContent" align="right"><b>Vom</b></td>
					<td class="dataTableHeadingContent"><b>Status</b></td>
					<td class="dataTableHeadingContent"><b>Kosten</b></td>
					<td class="dataTableHeadingContent"><b>Versender</b></td>
				</tr>

				{foreach name=blahret item=retoure from=$order_retouren}

				<tr class="dataTableRow">
					<td class="dataTableContent" align="right"><a href="{$retoure.link}"><u>{$retoure.retoure_id}</u></a></td>
					<td class="dataTableContent">{if $retoure.reclamations_id > 0}<a href="{$retoure.reclamation_link}"><u>{$retoure.reclamations_id}</u></a>{/if}&nbsp;</td>
					<td class="dataTableContent" align="right">{$retoure.date_created|date_format:"%d.%m.%Y"}</td>
					<td class="dataTableContent" align="right">{$retoure.retoure_status_name}</td>
					<td class="dataTableContent" align="right">{$retoure.costs|string_format:"%.2f"} {$order.info.currency}</td>
					<td class="dataTableContent">{$retoure.versender}</td>
				</tr>
				
				{/foreach}
				
				</table>
				<br><br>
		        
		{else}
			<br /><i>Keine Retouren zur Rechnung gespeichert.</i>
		{/if}

			</td>
		</tr>

		      
{elseif $tab == 'history'}

		<tr>
			<td class="main" colspan="3">
				<br><b>Bestell-Historie:</b>

				<table border="1" cellspacing="0" cellpadding="5">
				<tr>
					<td class="smallText" align="center"><b>{$TABLE_HEADING_DATE_ADDED}</b></td>
					<td class="smallText" align="center"><b>{$TABLE_HEADING_CUSTOMER_NOTIFIED}</b></td>
					<td class="smallText" align="center"><b>{$TABLE_HEADING_STATUS}</b></td>
					<td class="smallText" align="center"><b>{$TABLE_HEADING_COMMENTS}</b></td>
					<td class="smallText" align="center"><b>Bearbeiter</b></td>
				</tr>
				
				{if $history_array}
					
					{foreach name=blahhist item=history from=$history_array}
					
				<tr>
					<td class="smallText" align="center">{$history.date_added|date_format:"%d.%m.%Y %H:%M"}</td>
					<td class="smallText" align="center">{$history.notified_icon}</td>
					<td class="smallText">{$history.status_name}</td>
					<td class="smallText">{$history.comments}&nbsp;</td>
					<td class="smallText">{$history.editor}&nbsp;</td>
				</tr>

					{/foreach}
					
				{else}
			    
				<tr>
					<td class="smallText" colspan="6">{$TEXT_NO_ORDER_HISTORY}</td>
				</tr>
				
				{/if}
				
				</table>
			</td>
		</tr>
		

{else if $tab == 'payments'}

		<tr>
			<td>

				{if $payment_array}
				<table border="1" cellspacing="0" cellpadding="5">
				
				<tr>
					<td colspan="6" class="main"><br>Zahlungseing&auml;nge:<BR>
					<table width="100%" cellpadding="0" cellspacing="0">
					<tr class="dataTableHeadingRow">
						<td class="dataTableHeadingContent">Buchungstag</td>
						<td class="dataTableHeadingContent">Zuweisung</td>
						<td class="dataTableHeadingContent" align="right">Betrag</td>
					</tr>
					
					{foreach name=blahpay item=payment from=$payment_array}
					
					<tr class="dataTableContentRow">
						<td class="dataTableContent">{$payment.buchungstag}</td>
						<td class="dataTableContent">{$payment.created}</td>
						<td class="smallText" align="right">{$payment.betrag|string_format:"%.2f"}</td>
					</tr>
						
					{/foreach}

					</table>
					</td>
				</tr>
				{else}
				<tr>
					<td colspan="6" class="main">
					<br /><i>Noch keine Zahlungseing&auml;nge zugewiesen</i>
					</td>
				</tr>
				{/if}
				</table>
			</td>
		</tr>

{/if}

		</table>

