<?php
	include_once("../../core.php");
	


	if( $docroot == '' ){
		die( _("Accesso negato!") );
	}


	$q_art = "SELECT * FROM co_solleciti WHERE idscadenza='".$id_record."'";
	$rs_art = $dbo->fetchArray( $q_art );
	$tot_art = sizeof($rs_art);
	
	$imponibile_art = 0.0;
	$iva_art = 0.0;
	$sconto_art = 0.0;
	
	//se ho almeno un articolo caricato mostro la riga
	if( $tot_art>0 ){
		for( $i=0; $i<$tot_art; $i++ ){

			echo "<tr><td>\n";
			echo nl2br( html_entity_decode($rs_art[$i]['numero'], ENT_QUOTES, "utf-8") )."\n";	
			echo "</td>\n";
			
			//data
			echo "<td class='text-center'>\n";
			echo date("d/m/Y", strtotime($rs_art[$i]['datadoc']))."\n";		
			echo "</td>\n";
			
			//data
			echo "<td class='text-center'>\n";
			echo date("d/m/Y", strtotime($rs_art[$i]['datasoll']))."\n";		
			echo "</td>\n";
			
			//Totale fattura
			echo "<td class='text-right'>\n";
			echo "	".number_format( $rs_art[$i]['da_pagare'], get_var("Cifre decimali"), ",", "." )." &euro;\n";					
			echo "</td>\n";
			
			//indirizzo inviata
			echo "<td class='text-center'>\n";
			echo "	".$rs_art[$i]['mailsoll']."\n";
			echo "</td>\n";
			
			//testo mail
			echo "<td class='text-left'>\n";
			echo "	".$rs_art[$i]['tipomail']."\n";
			echo "</td>\n";
									
			echo "</td></tr>\n";

			
		}
	}

	
	

?>
