Current Path : /web/htdocs/www.entinoprofit.org/home/database/cofapi/
Upload File :
Current File : /web/htdocs/www.entinoprofit.org/home/database/cofapi/Admin_Mov_Iva.php

<?php

include("dblib.inc");

include("clublib.inc");

checkAdmin();

$message = "";
$_SESSION['passo'] = 20; //imposto il passo a 20 per questo script
?>

<?php
include("Header.php"); 
include("movimentinav.php");
echo "<p><br></p>";
include("movimentifunz.php");

?>

<p><div align="center"><font class="FacetFormHeaderFont">Nota di pagamento</font>&nbsp;&nbsp; <a href="movIvaReport.php" alt="Stampa"><img src="images/printer.gif" border="0"></a></div>


<?php
$recordnav = new recordnav($mov_table, "Data_Valuta like '%".$_SESSION['anno_ref']."%' AND Data_Valuta <> '".$_SESSION['anno_ref']."-01-01' AND (ID_Fornitore='0' AND ID_Cliente='0')", $_SESSION['limit'], $_SESSION['passo']);
$recordnav -> output();
?>


<table border="0" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="center">
 <tr>
<?php
  // creo l'array (header => campi) per l'ordinamento dei record
  $headers_movimenti = array  (
			  "Data Valuta" => "Data_Valuta", 
			  "Tipo Pagamento" => "Tipo_Pagamento",
			  "Cliente/Fornitore" => "Ragione_Sociale", 
			  "Descrizione" => "Descrizione", 
			  "Entrate" => "Entrate", 
			  "Uscite" => "Uscite",
			  "Banca/Cassa" => "ID_Banca",
			  "Saldo Banca/Cassa" => "",
			  "Cancella" => ""
			  );
  
  $linkHeaders = new linkHeaders($headers_movimenti);
  $linkHeaders -> output();
?>
   </tr>

  <?php


if ($orderby == "2 DESC")
	{
	$orderby = "Data_Valuta Desc";
	}

$result = dynQuery ('*', $mov_table, "Data_Valuta like '%".$_SESSION['anno_ref']."%' AND Data_Valuta <> '".$_SESSION['anno_ref']."-01-01' AND (Id_Cliente='0' AND Id_Fornitore='0')", $orderby, $_SESSION['limit'], $_SESSION['passo']);


while ($a_row = dbms_fetch_array($result))

	{
	// per il momento la gestione degli allegati e' rimandata
	$a_row["Allegato"] = "";
	// ricavo l'intestazione della  banca e il saldo parziale
	$banca = getRow($bank_table, "ID_Banca", $a_row['ID_Banca']);
	$saldo = Saldo($a_row['ID_Banca'], $a_row["Data_Valuta"], $_SESSION['anno_ref']);

	print "<tr>";
	$href = "Admin_Upd_MovErario.php?ID_Movimento=";	
	print "<td class=\"FacetDataTD\"><a href=\"$href".$a_row["ID_Movimento"]."\">".formatDate($a_row["Data_Valuta"])."</a> &nbsp;</td>";
	print "<td class=\"FacetDataTD\">".$a_row["Tipo_Pagamento"]." &nbsp;</td>";
	print "<td class=\"FacetDataTD\">".$a_row["Ragione_Sociale"]." &nbsp;</td>";
	print "<td class=\"FacetDataTD\">".$a_row["Descrizione"]." &nbsp;</td>";
	print "<td class=\"FacetDataTD\">".formatEuro($a_row["Entrate"])." &nbsp;</td>";
	print "<td class=\"FacetDataTD\">".formatEuro($a_row["Uscite"])." &nbsp;</td>";
	print "<td class=\"FacetDataTD\">".$banca['Banca']." &nbsp;</td>";
	if ($saldo <= 0)
		$color = "Red";
		else $color = "";
		
	print "<td class=\"FacetDataTD\" style=\"color: $color;\">".($saldo)."</td>";
	print "<td class=\"FacetDataTD\"><a href=\"Admin_Del_Movimento.php?ID_Movimento=".$a_row["ID_Movimento"]."\"><img src=\"images/x.gif\" alt=\"Cancella\" border=\"0\"></a></td>";
	
	print "</tr>";
	
	}   

   ?>

 </table>







</body>

</html>