<h2>PayPal Transaktions-Editor</h2>

<form class="edit" method="post" action="index.php?admin_modul=admin_paypal_transaction&action=submit">

<input type="hidden" name="order_id" value="{$order_data->id}" />

<div id="adminLeftFloater">
	<div title="Stammdaten">
		<h3>Alte Bestellung</h3>
		{$old_order}
		
		<h3>Bestellung</h3>
		{$this_order}
		
		<div class="edit_title">Bestellungsdaten</div>
		<div>
			<div class="edit_element_1_5">
				<label>Bestellnummer</label>
				<input type="text" readonly="readonly" value="{$order_data->order_number}" name="order_number" />
			</div>
			
			<div class="edit_element_2_5">
				<label>Name</label>
				<input type="text" readonly="readonly" value="{$order_data->customer_name}" name="customer_name" />
			</div>
			
			<div class="edit_element_2_5">
				<label>Bestelldatum</label>
				<input type="text" readonly="readonly" value="{$order_data->order_date}" name="order_date" />
			</div>
		</div>
			
		<div style="clear:both;">
			<div class="edit_element_2_5">
				<label>Betrag der nicht lieferbaren Artikel</label>
				<input type="text" readonly="readonly" value="{$order_data->item_refund|number_format:2:",":" "}" name="item_refund" />
			</div>
		</div>
		
		<div style="clear:both;">
			<div class="edit_element_2_5">
				<label>Bestellungsbetrag</label>
				<input type="text" readonly="readonly" value="{$order_data->order_total|number_format:2:",":" "}" name="order_total" />
			</div>
			
			<div class="edit_element_2_5">
				<label>Alter Bestellungsbetrag</label>
				<input type="text" readonly="readonly" value="{$order_data->prev_order->order_total|number_format:2:",":" "}" name="order_total" />
			</div>
		</div>
		
		<div style="clear:both;">
			<div class="edit_element_2_5">
				<label>Zahlungsgeb&uuml;ren</label>
				<input type="text" readonly="readonly" value="{$order_data->payment_method_charges|number_format:2:",":" "}" name="payment_method_charges" />
			</div>
			
			<div class="edit_element_2_5">
				<label>Alte Zahlungsgeb&uuml;ren</label>
				<input type="text" readonly="readonly" value="{$order_data->prev_order->payment_method_charges|number_format:2:",":" "}" name="payment_method_charges" />
			</div>
		</div>
		
		<div style="clear:both;">
			<div class="edit_element_2_5">
				<label>Versandgeb&uuml;ren</label>
				<input type="text" readonly="readonly" value="{$order_data->shipping_charges|number_format:2:",":" "}" name="shipping_charges" />
			</div>
			
			<div class="edit_element_2_5">
				<label>Alte Versandgeb&uuml;ren</label>
				<input type="text" readonly="readonly" value="{$order_data->prev_order->shipping_charges|number_format:2:",":" "}" name="shipping_charges" />
			</div>
		</div>
		<div class="edit_endline"></div>
		
		<div class="edit_title">R&uuml;ckzahlung</div>
		<div>
			<div class="edit_element_2_5">
				<label>R&uuml;ckzahlung</label>
				<select name="refund_type">
					<option value="1">Voll</option>
					<option value="2">Teil</option>
				</select>
			</div>
			
			<div class="edit_element_2_5">
				<label>Betrag</label>
				<input type="text" name="refund_amount" />
			</div>
		</div>
		<div class="edit_endline"></div>
		
		<input id="submit" type="submit" style="position:relative;left:185px;width: 200px;" value="Speichern">
	</div>
</div>

<div id="adminRightFloater">
	<div title="PayPal">
		{if $no_order_id}
			<p>Ihre Bestellung existiert entweder nicht oder hat keine Transaktionsidentifikationsnummer von PayPal.</p>
		{elseif $no_transaction_data}
			<p>Ihre Bestellung existiert entweder nicht oder hat keine Transaktionsidentifikationsnummer von PayPal.</p>
		{else}
			<div>
				<label>PayPal E-Mail:</label>
				<input type="text" readonly="readonly" value="{$transaction_data->email}" />
			</div>
			<div>
				<label>Transaktionsnummer</label>
				<input type="text" readonly="readonly" value="{$order_data->paypal_transaction_id}" />
			</div>
			<div>
				<label>PayPal Gebühren:</label>
				<input type="text" readonly="readonly" value="{$transaction_data->paypal_fees|number_format:2:",":" "}" />
			</div>
			<div>
				<label>PayPal Bezahlstatus:</label>
				<input type="text" readonly="readonly" value="{$transaction_data->payment_status}" />
			</div>
		{/if}
	</div>
</div>

</form>

<script type="text/javascript" src="{$info->base_url}/themes/admin/media/js/admin_paypal_transaction.js"></script>

{if $info_message}<div class="info_message message">{$info_message}</div>{/if}
{if $warning_message}<div class="warning_message message">{$warning_message}</div>{/if}
{if $error_message}<div class="error_message message">{$error_message}</div>{/if}