<?php
	date_default_timezone_set("Europe/Ljubljana");
	$serija=$_SESSION['serija'];
	$nalog=getNalogBySerija($serija);
	$tblNalog=getTBLNalog($serija);
	$avto=getAvto($tblNalog['avto_id']);
?>

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
<style>
.opomba{
position:absolute;
	left:500px;
	top:120px;
}


</style>
<body>
	<div align='right'>Datum izpisa: <?php echo date('Y-m-d'); ?></div>
	<div align='center'><b>REKAPITULACIJA POTNIH STROŠKOV</b></div><br>
	<br>
	<table border=0>
	<tr>
	<td align='right'>Obdobje:</td>
	<td><?php echo $tblNalog['datum_od']." - ".$tblNalog['datum_do'];?></td>
	</tr>
	<tr>
	<td align='right'>Podjetje:</td>
	<td>Pc pomoc d.o.o.</td>
	</tr>
	<tr>
	<td align='right'>Naslov:</td>
	<td>Senožeti 75, 1262 Dol pri Ljubljani</td>
	</tr>
	<tr>
	<td align='right'>Oseba-potnik:</td>
	<td><?php echo $avto['potnik']; ?></td>
	</tr>
	<tr>
	<td align='right'>Avto:</td>
	<td><?php echo $avto['opis']." - ".$avto['registracija']; ?></td>
	</tr>
	</table>
	
	<div class="opomba">Upoštevani so samo potni stroški, ki<br> so obračunani in izplačani v EUR</div>
	
	<br>
	<br>
	<br>
	
	<table align="center" style="border-top:2;border-bottom:1;">
	<tr>
	<td width=70>DATUM</td>
	<td width=200 align='center'>POT</td>
	<td width=100>KILOMETRINA</td>
	<td width=100>KM</td>
	<td width=100>CENA</td>
	<td width=100>OBRAČUNANO</td>
	</tr>
	</table>
	<table style="border-bottom:1; border-top:1" align="center">
	<?php
		foreach($nalog as $n){
			echo "<tr>
				<td width=70>{$n->datum}</td>
				<td width=200 align='center'>{$n->pot}</td>
				<td width=100>{$tblNalog['kilometrina']} €</td>
				<td width=100>{$n->km}</td>
				<td width=100>{$n->cena} €</td>
				<td width=100>{$n->datum}</td>
				</tr>";
		}
		
	?>
	<!--tr>
	<td width=70>12.10.2012</td>
	<td width=200 align='center'>Leipzig-konferenca</td>
	<td width=100>0,00</td>
	<td width=100>83,60</td>
	<td width=100>64,30</td>
	<td width=100>19.10.2012</td>
	</tr>
	<tr>
	<td width=70>12.10.2012</td>
	<td width=200 align='center'>Leipzig-konferenca</td>
	<td width=100>0,00</td>
	<td width=100>83,60</td>
	<td width=100>64,30</td>
	<td width=100>19.10.2012</td>
	</tr-->
	</table>
	
	<!-- border=0 style="right:200px">
	<tr>
	<td align="right" width=150>Skupaj za mesec</td>
	<td><b>  OKTOBER</b></td>
	<td align="right" width=97>0,00</td>
	<td align="right" width=109>83,60</td>
	<td align="right" width=100>63,30</td>
	</tr>
	</table-->
<br>

<table style="border-top:1;border-bottom:1;">
<tr>
<td width=235 align="right"><b>SKUPAJ VSE</b></td>
<td width=93 align="right"><b><?php //echo $tblNalog['kilometrina'];?></b></td>
<td width=95 align="right"><b><?php echo $tblNalog['skupaj_km'];?></b></td>
<td width=130 align="right"><b><?php echo $tblNalog['skupna_cena'];?> €</b></td>
</tr>
</table>
<br>
<br>
<table style="border-top:1;border-bottom:1;">
<tr>
<td width=235 align="right"><b>SEŠTEVEK VSEH POTNIH STROŠKOV</b></td>
<td width=90 align="right"><b><?php echo $tblNalog['skupna_cena'];?> €</b></td>
</tr>
</table>	
	
</body>
</html>