<?php 
	$id=$_SESSION['id_naloga'];
	$potniki=getPotniki();
	$nalog=getNalog($id);
	$nastavitve=getnastavitve();
	
	$naroc=getNarocilnicaById($id);
	$id_potnika=$nalog['id_zaposlenega']-1;
	
	
?>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
	<head>
		<style>
.linija1 {
    border-top:thin solid black;
	position: center;
    right: 0;
    margin-top:10px;
    bottom: 10%;
    height: 1px;
    background-color: black;
	
}

.neki{
	position:absolute;
	left:500px;
	top:230px;
	}


		</style>

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="stil.css" />
	</head>
<body>

<p align='right'>Številka naloga <?php echo $nalog['st_naloga']; ?></p>
<div class="linija1"></div>

<table align="left" border=0 >
<tr>
<td width=150 align="right">Podjetje:</td>
<td  align="left"><?php echo $nalog['nalogodajalec']; ?></td>
</tr>
<tr>
<td align="right">Sedež:</td>
<td align="left"><?php echo $nastavitve['sedez']." ".$nastavitve['posta']; ?></td>
</tr>
<tr>
<td align="right">Ime in priimek potnika:</td>
<td align="left"><?php echo $potniki[$id_potnika]->ime_priimek; ?></td>
</tr>
<tr>
<td align="right">Naslov bivališča:</td>
<td align="left"><?php echo $potniki[$id_potnika]->naslov; ?></td>
</tr>
<tr>
<td align="right">Delovno mesto:</td>
<td align="left"><?php echo $potniki[$id_potnika]->del_mesto; ?></td>
</tr>
<tr>
<td align="right">Namen potnega naloga:</td>
<td align="left"><?php echo $nalog['namen']; ?></td>
</tr>


</table> 
<br>
<br>
<br>
<br>
<br>



<div class="neki">Nalogodajalec:</div>
<p align="right">Obračun potnih stroškov za relacije v potnem nalogu številka:<b> <?php echo $nalog['st_naloga']; ?></b></p>
<table align="center" style="border-top:2;border-bottom:2" >

<tr>
<td width=100 align="center">RELACIJA</td>
<td width=100 align="center">PRIHOD/ODHOD</td>
<td width=100 align="center">DD:HH:MM</td>
<td width=100 align="center">PREVOZ</td>
<td width=100 align="center">KM</td>
<td width=100 align="center">KM-TRINA</td>
<td width=80 align="center">DNEVNICE</td>
<td align="left">VAL</td>
</tr>
</table>

<table align="center" style="border-bottom:2" >
<tr>
<td width=100 height=50 align="center"><?php echo "test"; ?></td>
<td width=100 align="center"><?php echo $nalog['cas_zacetka']; ?></td>
<td width=100 align="center"><?php  ?></td>
<td width=100 align="center"><?php echo $potniki[$id_potnika]->vozilo; ?></td>
<td width=100 align="center"><?php  ?></td>
<td width=100 align="center"><?php   ?></td>
<td width=80 align="center"><?php   ?></td>
<td align="left"><?php echo "EUR"; ?></td>
</tr>
</table> 


<?php
/*
if(sizeOf($stroski) != 0)

echo "

<table align='right' style='border-bottom:2;' >
<tr>
<td width=100 align='center'>OPIS DODANEGA STROŠKA</td>
<td width=100 align='center'>ZNESEK</td>
<td width=100 align='center'>VAL</td>

</tr>



</table> ";
foreach($stroski as $s)
echo "
<table align='right'  >
<tr>
<td width=100 align='center'> {$s->naziv}</td>
<td width=100 align='center'>{$s->znesek}</td>
<td width=100 align='center'> {$s->valuta}</td>


</tr>

</table>";*/
?>

<p align="left"><i>*1 Potni stroški, obračunani in izplačani v različnih tujih<br>valutah
,so razvidni iz tabele relacij in dodanih stroškov </i></p>

<p align="left"><i>*2 Izplačani predujemi v tujih valutah so samo informativni in niso<br>
upoštevani v seštevku!</i></p>

<table align="right" border="0">
<tr>
<td width=250 align="right">Skupaj znesek kilometrine+</td>
<td width=100 align="right"><?php echo "test"; ?></td>
</tr>
<tr>
<td width=250 align="right">Skupaj znesek dnevnic(v EUR*)+</td>
<td width=100 align="right"><?php echo  "test";?></td>
</tr>
<tr>
<td width=250 align="right">Skupaj znesek dodanih stroškov(v EUR)+</td>
<td width=100 align="right"><?php echo "test"; ?></td>
</tr>	
<tr>
<td width=250 align="right"><i>*2 Izplačani predujem-</i></td>
<td width=100 align="right"><?php echo "test"; ?></td>
</tr>
<tr>
<td width=270 align="right" style="border-top:0,5;border-bottom:0,5;"><b>Skupaj znesek dodanih stroškov(v EUR)+</b></td>
<td width=100 align="right"><b><?php echo "test"; ?></b></td>
</tr>	
</table>

<p align="left">Datum obračuna: <?php echo date('d.m.Y'); ?></p>

<p align="left">Obračun odobril:</p>
<p align="left">Izplačilo prejel:</p>

</body>
</html>
