<?php echo $this->render('module/header.phtml'); ?>


	
	<style>
	
	.polereg, .polereg2, .polereg3 {
		background: #EDEDED;
		border: 1px solid #333;
		border: 1px solid #fff;
		border-radius: 5px;
		box-shadow: 0 3px 3px rgba(0,0,0,.3);
		-webkit-background-clip: padding;
		-moz-background-clip: padding;
		background-clip: padding-box;
		position: fixed;
		z-index: 99999;
		top: 50px;
		left: 50%;
		width: 850px;
		margin-left: -425px;
		opacity: 1;
		display: none;
		padding:10px;
		overflow-y: auto;
		height: 90%;
	}
	
	.payTypeSelect{
		background: #eee;
		border-radius: 5px;
		border: 1px solid #ccc;
		padding: 10px;
		margin-bottom: 15px;
		margin-top: 15px;
		cursor:pointer;
	}
	
	.payTypeSelect.activ{
		border: 3px solid #da7227;
	}
	
	.payTypeSelect table{
		width:100%;
	}
	
	.payTypeSelect h2{
		font-size: 18px;
		margin: 0px;
		padding-left: 15px;
		font-weight: 600;
	}
	
	.payTypeSelect i{
		font-size:30px;
	}
	
	</style>    
	
	<script>
        $(document).ready(function() {
            $('.chmurkaBox').tooltipster({	
				position: 'right',
                contentAsHTML: true,
				theme: 'tooltipster-shadow'
			});
        });
    </script>
	
	<div class="polereg">
		<div class="alertify-dialog">
			<div>
			
				<h1 style="margin:0;font-size:26px;"><?php echo @Lib_Lang::consta(content_name_.$this->rowContent['content_id']); ?></h1>
					
				<p style="text-align:justify;padding-top:10px;front-size:12px;"><?php echo @Lib_Lang::consta(content_description_.$this->rowContent['content_id']); ?></p>
		
			</div>
			<div style="width:100%;text-align:right;"><button class="btn btn-default marginAdd" id="exitPopup"><i class="fa fa-remove"></i> <?php echo @Lib_Lang::translate(status_exit); ?></button></div>
		</div>
	</div>
	
	<div class="polereg2">
		<div class="alertify-dialog">
			<div>
			
				<h1 style="margin:0;font-size:26px;"><?php echo @Lib_Lang::consta(content_name_.$this->rowContent2['content_id']); ?></h1>
					
				<p style="text-align:justify;padding-top:10px;front-size:12px;"><?php echo @Lib_Lang::consta(content_description_.$this->rowContent2['content_id']); ?></p>
		
			</div>
			<div style="width:100%;text-align:right;"><button class="btn btn-default marginAdd" id="exitPopup2"><i class="fa fa-remove"></i> <?php echo @Lib_Lang::translate(status_exit); ?></button></div>
		</div>
	</div>
	
	<div class="polereg3">
		<div class="alertify-dialog">
			<div>
			
				<h1 style="margin:0;font-size:26px;"><?php echo @Lib_Lang::consta(content_name_.$this->rowContent3['content_id']); ?></h1>
					
				<p style="text-align:justify;padding-top:10px;front-size:12px;"><?php echo @Lib_Lang::consta(content_description_.$this->rowContent3['content_id']); ?></p>
		
			</div>
			<div style="width:100%;text-align:right;"><button class="btn btn-default marginAdd" id="exitPopup3"><i class="fa fa-remove"></i> <?php echo @Lib_Lang::translate(status_exit); ?></button></div>
		</div>
	</div>

<script type="text/javascript" language="javascript">
	
		function changeBasket(){
		
			var dane = {
				basket_invoice: $('[name="basket_invoice"]:checked').val(),
				basket_invoice_name: $('[name="basket_invoice_name"]').val(),
				basket_invoice_address: $('[name="basket_invoice_address"]').val(),
				basket_invoice_zipcode: $('[name="basket_invoice_zipcode"]').val(),
				basket_invoice_city: $('[name="basket_invoice_city"]').val(),
				basket_invoice_country: $('[name="basket_invoice_country"]').val(),
				basket_invoice_nip: $('[name="basket_invoice_nip"]').val(),
				basket_invoice_nip2: $('[name="basket_invoice_nip2"]:checked').val(),
				basket_clientinfo: $('[name="basket_clientinfo"]').val(),
				basket_pay: $('[name="basket_pay"]:checked').val(),
				newsletter: $('[name="newsletter"]:checked').val(),
				time_real: $('[name="time_real"]').val(),
				zaliczka: $('[name="zaliczka"]').val(),
				wartosc_koncowa: $('[name="wartosc_koncowa"]').val()
			};
			
			
			return dane;
		}

	$(document).ready(function () {
	
		$('[name="pack"],[name="transport"],[name="leadtime"]').change(function(){			
			$.post( "<?php echo @$this->url(array('controller' => 'order', 'action' => 'basketupdate'), 'default', true); ?>", { dane: changeBasket() }, function(){
				$('#methodType').submit();
			});
		});
		
		$('#voucherSend').submit(function(){		
			if( $('[name="voucher_code"]').val() ){
				$.post( "<?php echo @$this->url(array('controller' => 'order', 'action' => 'basketupdate'), 'default', true); ?>", { dane: changeBasket() }, function(){
					$('#voucherSend').submit();
				});		
			}else{
				return false;
			}
		});
		
		
		$('.payTypeSelect').click(function(){
		
			var cmd = $(this).attr('cmd');
			$(".payTypeSelect").removeClass('activ');		
			$(this).addClass('activ');
			
			if( cmd == 1 ){
				$('#payTypeSelect2').hide();
				$('#payTypeSelect1').show();
				$("input[name='basket_pay'][value='1']").prop('checked', true);
				$("input[name='basket_pay'][value='1']").attr('checked', 'checked');
			}else{
				$('#payTypeSelect1').hide();
				$('#payTypeSelect2').show();	
				$("input[name='basket_pay'][value='3']").prop('checked', true);	
				$("input[name='basket_pay'][value='3']").attr('checked', 'checked');	
			}
		
		});
		
		$(".payTypeSelect[cmd='1']").click();
		
		$('#orderFinish').click(function(){
		
			if( !$('[name="reg"]').is(':checked') ){
				alert('<?php echo @Lib_Lang::translate(required_status); ?>');
			}else if( !$('[name="reg2"]').is(':checked') ){
				alert('<?php echo @Lib_Lang::translate(required_status2); ?>');
			}else{	
			
				// sprawdzanie czy FV
				var inv = 0;
				
				if( $('[name="basket_invoice"]:checked').val() == 1 ) inv = 1;
				else{
				
					if( 
						!$('[name="basket_invoice_name"]').val() ||
						!$('[name="basket_invoice_address"]').val() ||
						!$('[name="basket_invoice_zipcode"]').val() ||
						!$('[name="basket_invoice_city"]').val() ||
						!$('[name="basket_invoice_country"]').val() ||
						( !$('[name="basket_invoice_nip"]').val() && !$('[name="basket_invoice_nip2"]:checked').val() )
					){
						alert('<?php echo @Lib_Lang::translate(required_inv_data); ?>');					
					}else{
						inv = 1;
					}
				
				}
			
				if( inv == 1 ) $.post( "<?php echo @$this->url(array('controller' => 'order', 'action' => 'basketupdate'), 'default', true); ?>", { dane: changeBasket() }, function(){
					window.location = $('#orderFinish').attr('link');
				});
			}
		
		});
		
		$('#popupStatus').click(function(){
			$('.tlozac').show();
			$('.polereg').show();	
		});
		
		$('#exitPopup').click(function(){			
			$('.tlozac').hide();
			$('.polereg').hide();
		});
		
		$('#popupStatus2').click(function(){
			$('.tlozac').show();
			$('.polereg2').show();	
		});
		
		$('#exitPopup2').click(function(){			
			$('.tlozac').hide();
			$('.polereg2').hide();
		});
		
		$('#popupStatus3').click(function(){
			$('.tlozac').show();
			$('.polereg3').show();	
		});
		
		$('#exitPopup3').click(function(){			
			$('.tlozac').hide();
			$('.polereg3').hide();
		});
		
	});

</script>



<div class="conBox">
<div class="container widthDiv" style="padding-top:15px;">
	<div class="row">
		<div class="col-xs-12 categoryBox" style="padding-bottom:15px;">
		
		
		<h1 style="margin:0;font-size:26px;"><?php echo @Lib_Lang::translate(order_send); ?></h1>
		
	<?php if( $this->noLog == true ){ ?>
		<p style="text-align:center;padding-top:10px;front-size:12px;">		
		
		<a class="buttonSendOrder" href="<?php echo @$this->url(array('controller' => 'account', 'action' => 'login'), 'default', true); ?>"><?php echo @Lib_Lang::translate(order_send_log); ?></a>
						
		<a class="buttonSendOrder" href="<?php echo @$this->url(array('controller' => 'account', 'action' => 'registration'), 'default', true); ?>"><?php echo @Lib_Lang::translate(order_send_reg); ?></a>
		<br /><br />
		</p>
	<?php }else if( $this->noProduct == true ){ ?>	
		<p style="text-align:center;padding-top:10px;front-size:12px;">		
		
			<?php echo @Lib_Lang::translate(order_send_noproduct); ?>
		
		</p>
	<?php }else{ ?>	
	<br />
	
	<div class="row">
		<div class="col-xs-3"></div>
		<div class="col-xs-2 text-right"><?php echo @Lib_Lang::translate(order_send_client); ?></div>
		<div class="col-xs-2">
			<b><?php echo$this->rowClient['client_firstname'].' '.$this->rowClient['client_secondname']; ?></b>
			<br />
			<?php echo$this->rowClient['client_address']; ?>
			<br />
			<?php echo$this->rowClient['client_zipcode'].' '.$this->rowClient['client_city']; ?>
			<br />
			<?php echo$this->rowClient['client_country']; ?>
			<br />
			<?php echo @Lib_Lang::translate(order_send_tel); ?> <?php echo$this->rowClient['client_phone']; ?>
			<br />
			<a href="<?php echo @$this->url(array('controller' => 'account', 'action' => 'info'), 'default', true); ?>"><?php echo @Lib_Lang::translate(order_send_changedata); ?></a>
		</div>
		
		<div class="col-xs-2 text-right"><?php echo @Lib_Lang::translate(order_send2_client); ?></div>
		<div class="col-xs-2">
		
		<?php if( $this->rowClient['client_shipment'] == 0 ){ ?>
		
			<b><?php echo$this->rowClient['client_firstname'].' '.$this->rowClient['client_secondname']; ?></b>
			<br />
			<?php echo$this->rowClient['client_address']; ?>
			<br />
			<?php echo$this->rowClient['client_zipcode'].' '.$this->rowClient['client_city']; ?>
			<br />
			<?php echo$this->rowClient['client_country']; ?>
			<br />
			<?php echo @Lib_Lang::translate(order_send_tel); ?> <?php echo$this->rowClient['client_phone']; ?>
			<br />
			<a href="<?php echo @$this->url(array('controller' => 'account', 'action' => 'info'), 'default', true); ?>"><?php echo @Lib_Lang::translate(order_send_changedata); ?></a>
			
		<?php }else{ ?>
		
			<b><?php echo$this->rowClient['client_shipment_name']; ?></b>
			<br />
			<?php echo$this->rowClient['client_shipment_address']; ?>
			<br />
			<?php echo$this->rowClient['client_shipment_zipcode'].' '.$this->rowClient['client_shipment_city']; ?>
			<br />
			<?php echo$this->rowClient['client_shipment_country']; ?>
			<br />
			<?php echo @Lib_Lang::translate(order_send_tel); ?> <?php echo$this->rowClient['client_phone']; ?>
			<br />
			<a href="<?php echo @$this->url(array('controller' => 'account', 'action' => 'info'), 'default', true); ?>"><?php echo @Lib_Lang::translate(order_send_changedata); ?></a>		
		
		<?php } ?>
			
		</div>
		<div class="col-xs-1"></div>
	</div>
	
	<br />
	
	
	<table class="shopinfoListTable table table-hover" style="">
	
		<tr style="border-bottom:2px solid #000;background-color: #fffaaa">
			<th style="width:50px;"><?php echo @Lib_Lang::translate(order_lp); ?></th>
			<th style="width:600px;" colspan="2"><?php echo @Lib_Lang::translate(order_name); ?></th>
			<th style="border-right:1px solid #000;text-align:right;"><?php echo @Lib_Lang::translate(order_am); ?></th>
			<th><?php echo @Lib_Lang::translate(order_amc); ?></th>
			<th></th>
		</tr>
	<?php $sum=0; $i=0; $maxD = $this->config_time['config_value']; foreach ($this->orderData as $key => $val): $i++; $sum = $sum + $val['amount']*$val['price']; ?>
		<tr>
			<td><?php echo $i; ?>.</td>
			<td><?php echo @Lib_Lang::consta(product_name_.$val['idProduct']); ?></td>
			
			<td>
			<?php 
				echo @Lib_Lang::translate(order_send_time_poz).' '.$this->leadTimeTable[$val['idProduct']].' '.@Lib_Lang::translate(order_send_time_short); 
				if( $this->leadTimeTable[$val['idProduct']] > $maxD ){
					$maxD = $this->leadTimeTable[$val['idProduct']];
				}
			?>
			</td>
			
			<td style="border-right:1px solid #000;text-align:right;">

<script type="text/javascript" language="javascript">
	
	$(document).ready(function () {
	
		$('#minus<?php echo$key; ?>').click(function(){
			var i = parseInt($('#amount<?php echo$key; ?>').val()) - 1;
			if( i > 0 ) $('#amount<?php echo$key; ?>').val(i);
				
			$.post( "<?php echo @$this->url(array('controller' => 'order', 'action' => 'basketupdate'), 'default', true); ?>", { dane: changeBasket() }, function(){
				window.location.href = '<?php echo @$this->url(array('controller' => 'order', 'action' => 'minus', 'id' => $key), 'default', true); ?>';
			});
		});
	
		$('#plus<?php echo$key; ?>').click(function(){
			var i = parseInt($('#amount<?php echo$key; ?>').val()) + 1;
			if( i < 11 ) $('#amount<?php echo$key; ?>').val(i);
				
			$.post( "<?php echo @$this->url(array('controller' => 'order', 'action' => 'basketupdate'), 'default', true); ?>", { dane: changeBasket() }, function(){
				window.location.href = '<?php echo @$this->url(array('controller' => 'order', 'action' => 'plus', 'id' => $key), 'default', true); ?>';
			});
		});
			
	});

</script>	
			
			<button id="minus<?php echo$key; ?>" <?php if( $val['amount'] <= 1 ) echo'disabled="disabled"'; ?>>-</button>
			<input id="amount<?php echo$key; ?>" style="width:30px;text-align:center;" value="<?php echo $val['amount']; ?>" disabled="disabled">
			<button id="plus<?php echo$key; ?>" <?php if( $val['amount'] >= 10 ) echo'disabled="disabled"'; ?>>+</button> 
			
			x <b><?php echo number_format($val['price'], 2, ',', ' '); ?></b> zł
			
			<?php
				if( $val['price_update'] == 1 ){ 
					echo'<br /><b style="color:red;">'.@Lib_Lang::translate(product_update).'</b>';
				}
			?>
			</td>
			<td><?php echo number_format($val['amount']*$val['price'], 2, ',', ' '); ?> zł</td>
			<td style="text-align:right;"><a href="<?php echo @$this->url(array('controller' => 'order', 'action' => 'send', 'idDel' => $key), 'default', true); ?>"><button>X</button></a></td>
		</tr>	
		
		<tr style="background-color:#fff;">
			<td></td>
			<td colspan="2">
			
				
					<script type="text/javascript" language="javascript">
						$(document).ready(function () {
							
							$("#szczegolySzafki<?php echo $key; ?>").load("<?php echo $this->url(array('controller' => 'order', 'action' => 'ordereditproduct'), 'default', true); ?>",{id: '<?php echo$key; ?>'}, function(){});
	
						});
					</script>
			
				<div id="szczegolySzafki<?php echo$key; ?>"></div>
			</td>
			<td></td>
		
		</tr>
		
	<?php endforeach; ?>
		<tr style="background-color:#FFC;border-top: 2px solid #000;">
			<td colspan="3" style="text-align:right;border-right:1px solid #000;"><?php echo @Lib_Lang::translate(product_sum); ?></td>
			<td colspan="2"><b><?php echo number_format($this->sum, 2, ',', ' '); ?></b> zł</td>
		</tr>	
	</table>
	<br />
	<input type="hidden" name="sumPrice" value="<?php echo$sum; ?>" />
	
	
	
	
	
	
	
	
	<div class="row">
	
	<div class="col-xs-6">
	<form method="post" id="methodType">
	<div class="row">
		<div class="col-xs-12">
			<?php echo @Lib_Lang::translate(order_send_pack); ?>
			<select name="pack">
	<?php $i=$this->escape($this->page); foreach ($this->dataTypePack as $key => $val): $i=$i+1;?>
			<option value="<?php echo$val['id']; ?>" <?php if( $val['id'] == $this->pack->id ) echo'selected'; ?>><?php echo @Lib_Lang::consta(type_pack_.$val['id']); ?></option>
	<?php endforeach; ?>
			</select> <?php echo number_format($this->rpd, 2, ',', ' '); ?></b> zł
		</div>
	</div>	
	
	
	<br />	
	<div class="row">
		<div class="col-xs-12">
			<?php echo @Lib_Lang::translate(order_send_transport); ?>
			<select name="transport" <?php if( $this->zd == 1 ){echo' disabled';} ?>>
	<?php $i=$this->escape($this->page); foreach ($this->dataTypeTransport as $key => $val): $i=$i+1;?>
			<option value="<?php echo$val['id']; ?>" <?php if( $val['id'] == $this->transport->id ) echo'selected'; ?>><?php echo @Lib_Lang::consta(type_transport_.$val['id']); ?></option>
	<?php endforeach; ?>
			</select> 
			<?php if( $this->transport->id == 2 AND $this->rtd == 0 ){ ?>
				<br /><?php echo Lib_Lang::translate(type_transport_ind); ?>
			<?php }else{ ?>
				<?php echo number_format($this->rtd, 2, ',', ' '); ?></b> zł
			<?php } ?>
			<?php if( $this->zd == 1 ){echo'<br />'.@Lib_Lang::translate(order_send_transport_no);} ?>
			
		</div>
	</div>
	
		
	<br />	
	<div class="row">
		<div class="col-xs-12">
			<?php echo @Lib_Lang::translate(order_send_leadtime); ?>
			<select name="leadtime">
	<?php $i=$this->escape($this->page); foreach ($this->dataTypeLeadTime as $key => $val): $i=$i+1;?>
			<option value="<?php echo$val['id']; ?>" <?php if( $val['id'] == $this->leadtime->id ) echo'selected'; ?>><?php echo @Lib_Lang::consta(type_leadtime_.$val['id']); ?></option>
	<?php endforeach; ?>
			</select> 
			<?php if( $this->leadtime->id == 2 AND $this->rld == 0 ){ ?>
				<br /><?php echo Lib_Lang::translate(type_transport_ind); ?>
			<?php }else{ ?>
				<?php echo number_format($this->rld, 2, ',', ' '); ?></b> zł
			<?php } ?>
			
			
		</div>
	</div>
	
	
	<input name="methodType" type="hidden" value="true" />
	<br />
	</form>
		
	</div>	
	
	<div class="col-xs-6">
		<p style="font-size:20px"><?php echo @Lib_Lang::translate(order_send_time); ?> <a href="javascript:void(0);" class="chmurkaBox" title="<?php echo @Lib_Lang::consta(content_description_.$this->rowContentCrz['content_id']); ?>"><i class="fa fa-question-circle"></i></a></p>
		<b style="font-size:25px"><?php echo $maxD; ?><input type="hidden" name="time_real" value="<?php echo $maxD; ?>" /></b> <?php echo @Lib_Lang::translate(order_send_time_2); ?>
	
	</div>	
	
	
	
	</div>	
	
	
	
	
	
	<div class="row">
		<div class="col-xs-12">
			<h4 style="border-bottom: 1px solid rgb(153, 153, 153);"><?php echo @Lib_Lang::translate(order_invoice); ?></h4>
		</div>
		<div class="col-xs-12">
		

<script type="text/javascript" language="javascript">
	$(document).ready(function () {
	
	<?php if( $this->basket_invoice == 1 ){ ?>
	$('#boxInvoice').hide();
	$('#basketInvoiceNip').hide();
	<?php } ?>
	
	<?php if( $this->basket_invoice_nip2 == 1 ){ ?>
	$('#nipBox').hide();
	<?php } ?>
	
		$('[name="basket_invoice"]').change(function(){
			if( $('[name="basket_invoice"]:checked').val() == 2 ){
				$('#boxInvoice').show();
				$('#basketInvoiceNip').show();
			}else{
				$('#boxInvoice').hide();
				$('#basketInvoiceNip').hide();
			}
		});
	
		$('[name="basket_invoice_nip2"]').change(function(){
			if( $('[name="basket_invoice_nip2"]:checked').val() ){
				$('#nipBox').hide();
			}else{
				$('#nipBox').show();
			}
		});
	
	});
</script>



			<label style="font-weight:normal;">			
			
				<input type="radio" name="basket_invoice" style="margin:5px;" value="1" <?php if( $this->basket_invoice == 1 )echo'checked'; ?>> <?php echo @Lib_Lang::translate(order_basket_invoice_1); ?>
			
			</label>
			
			<label style="font-weight:normal;">		
			
				<input type="radio" name="basket_invoice" style="margin:5px;" value="2" <?php if( $this->basket_invoice == 2 )echo'checked'; ?>> <?php echo @Lib_Lang::translate(order_basket_invoice_2); ?>
				
			</label>
			
			<label id="basketInvoiceNip" style="font-weight:normal;">		
			
				<input type="checkbox" name="basket_invoice_nip2" style="margin:5px;" value="1" <?php if( $this->basket_invoice_nip2 == 1 )echo'checked'; ?>> <?php echo @Lib_Lang::translate(order_basket_invoice_3); ?>
				
			</label>
		
		<style>
			.tableInvoice td{
				padding:5px;
			}
			.tableInvoice input{
				padding:5px;
				width:300px;
			}
		</style>
		
			<div id="boxInvoice">
				<table class="tableInvoice">
					<tr>
						<td><?php echo @Lib_Lang::translate(order_basket_invoice_name); ?> </td>
						<td><input name="basket_invoice_name" value="<?php echo$this->basket_invoice_name; ?>" /></td>
					</tr>
					<tr>
						<td><?php echo @Lib_Lang::translate(order_basket_invoice_address); ?> </td>
						<td><input name="basket_invoice_address" value="<?php echo$this->basket_invoice_address; ?>" /></td>
					</tr>
					<tr>
						<td><?php echo @Lib_Lang::translate(order_basket_invoice_zipcode); ?> </td>
						<td><input name="basket_invoice_zipcode" value="<?php echo$this->basket_invoice_zipcode; ?>" /></td>
					</tr>
					<tr>
						<td><?php echo @Lib_Lang::translate(order_basket_invoice_city); ?> </td>
						<td><input name="basket_invoice_city" value="<?php echo$this->basket_invoice_city; ?>" /></td>
					</tr>
					<tr>
						<td><?php echo @Lib_Lang::translate(order_basket_invoice_country); ?> </td>
						<td><input name="basket_invoice_country" value="<?php echo$this->basket_invoice_country; ?>" /></td>
					</tr>
					<tr id="nipBox">
						<td><?php echo @Lib_Lang::translate(order_basket_invoice_nip); ?> </td>
						<td><input name="basket_invoice_nip" value="<?php echo$this->basket_invoice_nip; ?>" /></td>
					</tr>
				</table>
			</div>
		
		</div>
	</div>
	
	
	
	<div class="row">
		<div class="col-xs-12">
			<h4 style="border-bottom: 1px solid rgb(153, 153, 153);"><?php echo @Lib_Lang::translate(order_clientinfo); ?></h4>
		</div>
		<div class="col-xs-12">
			<?php echo @Lib_Lang::translate(order_clientinfo_line1); ?>
			<textarea name="basket_clientinfo" style="width:100%"><?php echo$this->basket_clientinfo; ?></textarea>
		</div>
	</div>
	
	
	
	
	
	<div class="row">
		<div class="col-xs-12">
			<h4 style="border-bottom: 1px solid rgb(153, 153, 153);"><?php echo @Lib_Lang::translate(order_status); ?></h4>
		</div>
		<div class="col-xs-12">
			
			<?php echo @Lib_Lang::translate(order_send_status_line1); ?> (<a href="<?php echo @$this->url(array('controller' => 'content', 'action' => 'index', 'id' => 40), 'default', true); ?>" target="_blank"><?php echo @Lib_Lang::translate(order_send_status_view_2); ?></a>)<br />
			
			<?php echo @Lib_Lang::translate(order_send_status_line2); ?> (<a href="<?php echo @$this->url(array('controller' => 'content', 'action' => 'index', 'id' => 41), 'default', true); ?>" target="_blank"><?php echo @Lib_Lang::translate(order_send_status_view); ?></a>)<br /><br />
			
			<label style="font-weight:normal;">
			
			<input type="checkbox" name="reg" style="margin:5px;"> <font style="color:red">*</font> <?php echo @Lib_Lang::translate(order_send_status); ?> (<a href="javascript:void(0);" id="popupStatus"><?php echo @Lib_Lang::translate(order_send_status_view); ?></a>) <?php echo @Lib_Lang::translate(order_send_status_2); ?> (<a href="javascript:void(0);" id="popupStatus2"><?php echo @Lib_Lang::translate(order_send_status_view); ?></a>) <?php echo @Lib_Lang::translate(order_send_status_3); ?> (<a href="javascript:void(0);" id="popupStatus3"><?php echo @Lib_Lang::translate(order_send_status_view); ?></a>)
			
			</label>
			
			
			
			
			<br />
			<label style="font-weight:normal;">
			
			<input type="checkbox" name="reg2" style="margin:5px;" value="1"> <font style="color:red">*</font> <?php echo @Lib_Lang::translate(order_send_status_reg2); ?> 
			
			</label>
			
			
			
			<br />
			<label style="font-weight:normal;">
			
			<input type="checkbox" name="newsletter" style="margin:5px;" value="1"> <?php echo @Lib_Lang::translate(order_send_newsletter); ?>
			
			</label>
			
			
			<br />
			<br />
			
			
	<style>
	#boxRodo{
		border: 2px solid #ccc;
		padding:10px;
	}
	</style>
	<script>
        $(document).ready(function() {
            $('#boxRodoButton').click(function(){	
			
				if( $(this).attr('cmd') == 'hide' ){
					$('#boxRodo').show(500);
					$(this).attr('cmd','show');
					$(this).html('<?php echo @Lib_Lang::translate(order_send_rodo_r2); ?>');
				}else{
					$('#boxRodo').hide(500);
					$(this).attr('cmd','hide');
					$(this).html('<?php echo @Lib_Lang::translate(order_send_rodo_r); ?>');				
				}
			
			});
        });
    </script>
			
			<?php echo @Lib_Lang::translate(order_send_rodo); ?> (<a href="javascript:void(0);" cmd="hide" id="boxRodoButton"><?php echo @Lib_Lang::translate(order_send_rodo_r); ?></a>)
			<div id="boxRodo" style="display:none;">
				<?php echo @Lib_Lang::consta(content_description_.$this->rowContentRODO['content_id']); ?>
			</div>
			
			<br />
			<br /> 
		</div>
	</div>
	
	
	
	
	
	<div class="row">
		<div class="col-xs-12">
			<h4 style="border-bottom: 1px solid rgb(153, 153, 153);"><?php echo @Lib_Lang::translate(order_pay); ?></h4>
		</div>
		
		
		<div class="col-xs-12">
		
			<div class="col-xs-6">
				<div class="payTypeSelect activ" cmd="1">
				
					<table>
						<tr>
							<td style="text-align:center;width:50px;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/p1.png" /></td>
							<td><h2><?php echo @Lib_Lang::translate(paytypeselect_1); ?></h2></td>
							<td style="text-align:center;width:50px;"><i class="fa fa-angle-down"></i></td>
						</tr>
					</table>
					
				</div>
			</div>
			
			<div class="col-xs-6">
				<div class="payTypeSelect" cmd="2">
				
					<table>
						<tr>
							<td style="text-align:center;width:50px;"><img src="<?php echo $this->escape($this->baseUrl); ?>/public/images/p2.png" /></td>
							<td><h2><?php echo @Lib_Lang::translate(paytypeselect_2); ?></h2></td>
							<td style="text-align:center;width:50px;"><i class="fa fa-angle-down"></i></td>
						</tr>
					</table>
					
				</div>
			</div>
		
		</div>
		
		<div class="col-xs-12">
		
		
		
		
			<div id="payTypeSelect1">
			
				<label style="font-weight:normal;">			
					<input type="radio" name="basket_pay" style="margin:5px;" value="1" <?php if( $this->basket_pay == 1 )echo'checked'; ?>> <?php echo @Lib_Lang::translate(order_basket_pay_1); ?> <a href="javascript:void(0);" class="chmurkaBox" title="<?php echo @Lib_Lang::consta(content_description_.$this->rowContentP1['content_id']); ?>"><i class="fa fa-question-circle"></i></a>			
				</label>
			
				<br />
			
				<label style="font-weight:normal;">			
					<input type="radio" name="basket_pay" style="margin:5px;" value="2" <?php if( $this->basket_pay == 2 )echo'checked'; ?>> <?php echo @Lib_Lang::translate(order_basket_pay_2); ?> <a href="javascript:void(0);" class="chmurkaBox" title="<?php echo @Lib_Lang::consta(content_description_.$this->rowContentP2['content_id']); ?>"><i class="fa fa-question-circle"></i></a>			
				</label>
				
			</div>
			
			
			
			
			<div id="payTypeSelect2">
			
				<label style="font-weight:normal;">			
					<input type="radio" name="basket_pay" style="margin:5px;" value="3" <?php if( $this->basket_pay == 3 )echo'checked'; ?>> <?php echo @Lib_Lang::translate(order_basket_pay_3); ?> <a href="javascript:void(0);" class="chmurkaBox" title="<?php echo @Lib_Lang::consta(content_description_.$this->rowContentP1['content_id']); ?>"><i class="fa fa-question-circle"></i></a>			
				</label>
				
				
				<?php
				
					$zaliczka = number_format($this->sumC, 2)*0.3;
					$wartosc_koncowa = number_format($this->sumC, 2)-$zaliczka;
				
				?>
				<br />
				<br />
				<input type="hidden" name="zaliczka" value="<?php echo$zaliczka; ?>" />
				<input type="hidden" name="wartosc_koncowa" value="<?php echo$wartosc_koncowa; ?>" />
				
				<font style="font-size: 18px; margin: 10px;padding: 10px;">
				W celu realizacji zlecenia proszę o wpłatę zaliczki w wysokości 30% wartości zlecenia <?php echo number_format($zaliczka, 2, ',', ' '); ?> zł, pozostałą część tj. <?php echo number_format($wartosc_koncowa, 2, ',', ' '); ?> zł ....
				</font>
			
				<br />
				<br />
			</div>
			
			
			
			
		
		</div>
	</div>
	
	
	
	
	
	<div class="row">
		<div class="col-xs-12">
			<h4 style="border-bottom: 1px solid rgb(153, 153, 153);"><?php echo @Lib_Lang::translate(order_voucher); ?></h4>
		</div>
		<div class="col-xs-12">
		
		
		<?php if( !$this->voucher_id ){ ?>
			<form method="post" id="voucherSend">
				<input name="voucher_code" /><input type="submit" value="<?php echo @Lib_Lang::translate(order_voucher_send); ?>" />
			</form>
		<?php }else{ ?>
		
			<?php echo str_replace('%CODE%', $this->voucher_rabate.'%', @Lib_Lang::translate(order_voucher_activ)); ?>
		
		<?php } ?>
		</div>
	</div>
        
        
        <!-- second voucher -->
        <div class="row">
		<div class="col-xs-12">
			<h4 style="border-bottom: 1px solid rgb(153, 153, 153);"><?php echo @Lib_Lang::translate(order_voucher); ?></h4>
		</div>
		<div class="col-xs-12">
		
		
		<?php if( !$this->voucher_id ){ ?>
			<form method="post" id="voucherSend">
				<input name="voucher_code" /><input type="submit" value="<?php echo @Lib_Lang::translate(order_voucher_send); ?>" />
			</form>
		<?php }else{ ?>
		
			<?php echo str_replace('%CODE%', $this->voucher_rabate.'%', @Lib_Lang::translate(order_voucher_activ)); ?>
		
		<?php } ?>
		</div>
	</div>
	
	
	
	
	
	
	
	
	<div class="row">
		<div class="col-xs-9">
		</div>
		<div class="col-xs-3">
			<center>
			<p style="font-size:20px;">
			<?php echo @Lib_Lang::translate(order_send_price); ?>
				<span id="sumPriceC" style="font-weight:bold;color:red;"><?php echo number_format($this->sumC, 2, ',', ' '); ?></span>
			zł
			</p>
			</center>
		</div>
	</div>
	
	<br />
	
	<div class="row">
		<div class="col-xs-9">
		</div>
		<div class="col-xs-3">
			<center>
		<a class="buttonSendOrder2" href="javascript:void(0);" id="orderFinish" link="<?php echo @$this->url(array('controller' => 'order', 'action' => 'finish'), 'default', true); ?>"><?php echo @Lib_Lang::translate(order_send_2); ?></a>
		<br />
		<br />
			<?php echo @Lib_Lang::translate(order_send_3); ?>
			</center>
		<br />
		<br />
		</div>
	</div>
	<?php } ?>	
		
		
		</div>
	</div>
</div>
</div>

<?php echo $this->render('module/footer.phtml'); ?>

