<!-- content_cash_desk/payments.tpl -->

<div class="full_box">
	<div class="title_wrapper">
		<div class="title"><h2>Zahlungsweise</h2></div>
		<div class="clear"></div>
	</div>

	<div class="box_content">
		<div class="box_padder">
			Bitte w&auml;hlen Sie eine der hier aufgef&uuml;hrten Zahlungsweisen aus<br />
			<br />

			{foreach item=pMethod from=$payment_methods name=pMethodLoop}
				{if ($pMethod->helperjoinkey != 'be' && $pMethod->helperjoinkey != 'r') || ($pMethod->helperjoinkey == 'be' && $customer->direct_debit_active == 1) || ($pMethod->helperjoinkey == 'r' && $customer->rechnung_active == 1)}
					{if $pMethod->activeType > 0}
						<div class="payment_method_line {if $personal_data.payment_method == $pMethod->id || (!$personal_data.payment_method == $pMethod->id && $smarty.foreach.pMethodLoop.first)}active{/if}" style="border-bottom:#A4A4A4 1px solid;padding:15px 0px;">
							<div style="float:left;">
								<input type="radio"
								       name="payment_method"
								       value="{$pMethod->id}"
								       id="selection_{$pMethod->helperjoinkey}"
								       {if $personal_data.payment_method == $pMethod->id || $smarty.foreach.pMethodLoop.first}
									       checked="checked"
								       {/if} 
								       />
							</div>
							<div style="float:left;margin-left:10px;font-weight:bold;width:530px;">
								<strong>{$pMethod->name}</strong>
								{if $pMethod->helperjoinkey == 'klarna_rechnung'}
									<br>
									Zahlung innerhalb von 14 Tagen <a href="https://online.klarna.com/villkor_de.yaws?eid={$system_configuration.klarna_eid}&charge=0" target="_blank">Lesen Sie mehr</a><br>
									<br>
									<img src="{$PARENT_THEME_DIR}/media/images/cash_desk/klarna_rechnung.png" style="height: 30px;" /><br>
								{elseif $pMethod->helperjoinkey == 'billpay_invoice'}
									<br>
									Mit der &Uuml;bermittlung der f&uuml;r die Abwicklung des Rechnungskaufs und einer 
									Identit&auml;ts- und Bonit&auml;tspr&uuml;fung erforderlichen Daten an die 
									<a href="https://billpay.de/endkunden" target="blank">Billpay GmbH</a> bin ich einverstanden. 
									Es gelten die <a href="https://www.billpay.de/kunden/agb#datenschutz" target="blank">Datenschutzbestimmungen</a> 
									von Billpay.<br>
									<br>
									<img src="https://www.billpay.de/wp-content/uploads/2011/04/LogoSmall_0.png" alt="Billpay Logo" title="Billpay Logo" style="height: 30px;" /> 
								{elseif $pMethod->helperjoinkey == 'klarna_raten'}
									<br>
									Finanzieren <a href="https://online.klarna.com/account_de.yaws?eid={$system_configuration.klarna_eid}" target="_blank">Lesen Sie mehr</a><br>
									<br>
									<img src="{$PARENT_THEME_DIR}/media/images/cash_desk/klarna_ratenkauf.png" style="height: 30px;" /><br>
									{foreach item=rate from=$klarna_installments}
										{*{$rate.months} Monatsraten zu je  {$rate.monthly_costs|number_format:"2":",":"."} &euro; / Monat<br />*}
									{/foreach}
								{elseif $pMethod->helperjoinkey == 'paymorrow_rechnung'}
									<br>
									<img src="{$PARENT_THEME_DIR}/media/images/cash_desk/paymorrow_rechnung.png" style="height: 30px;" />
								{elseif $pMethod->helperjoinkey == 'paymorrow_raten'}
									<br>
									<img src="{$PARENT_THEME_DIR}/media/images/cash_desk/paymorrow_ratenkauf.png" style="height: 30px;" />
                                                                {else}
                                                                      <br>{$pMethod->order_text|replace:'[#customer_freetextfield3]':$customer->freetextfield3}
								{/if}
							</div>
							<div style="float:right;text-align:right;">
								{if $pMethod->paymentAdd != 0}
									{if $pMethod->accountType == '0'}
										<span class="payment_type_text">Aufschlag in Euro</span><br />
									{elseif $pMethod->accountType == '1'}
										<span class="payment_type_text">Abschlag in Euro</span><br />
									{elseif $pMethod->accountType == '2'}
										<span class="payment_type_text">Prozentualer Aufschlag</span><br />
									{elseif $pMethod->accountType == '3'}
										<span class="payment_type_text">Prozentualer Abschlag</span><br />
									{/if}
								{/if}

								{if $pMethod->paymentAdd != 0}
									{if $pMethod->accountType == '0'}
										<strong>zzgl. {$pMethod->paymentAdd|number_format:"2":",":"."} &euro;</strong>
									{elseif $pMethod->accountType == '1'}
										<strong>abzgl. {$pMethod->paymentAdd|number_format:"2":",":"."} &euro;</strong>
									{elseif $pMethod->accountType == '2'}
										<strong>zzgl. {$pMethod->rawAdd|number_format:"2":",":"."} %</strong>
									{elseif $pMethod->accountType == '3'}
										<strong>abzgl. {$pMethod->rawAdd|number_format:"2":",":"."} %</strong>
									{/if}
								{else}
									{if $pMethod->id != 14}kostenlos{else}nach Vereinbarung{/if}
								{/if}
							</div>

							{if isset($payment_method_feedback) && ($pMethod->id == $payment_method_feedback.payment_method && $payment_method_feedback.message != '')}
								<div style="clear:both;padding-top:10px;color:red;margin-left:30px;margin-right:70px;">
									{$payment_method_feedback.message}
								</div>
							{/if}



							<br style="clear:both;" />
						</div>
					{/if}
				{/if}
			{/foreach}
		</div>
	</div>
</div>
