Logo Search packages:      
Sourcecode: odontolinux version File versions  Download package

nuovavoceinserimento.php

<? require("testa.php");?>

<B><? echo gettext ("Invoice update");?></B>

<TABLE Border="0" >
 <TR>
  <TD COLSPAN="6">
  <HR noshade size="2">
  </TD>
 </TR>
 <TR>
  <TH><? echo gettext ("Date");?></TH>
  <TH><U><? echo gettext ("Treatment");?></U></TH>
  <TH><? echo gettext ("Q.");?></TH>
  <TH><U><? echo gettext ("charge/U");?></U></TH>
  <TH><? echo gettext ("Total charge");?></TH>
 </TR>

 <TR>
  <TD COLSPAN="6">
  <HR noshade size="2">
  </TD>
 </TR>

<?PHP
   $esito = pg_Exec($conn, "SELECT * FROM fattura where idfattura = $idfatta;");
   if (!$esito) {
                 echo "Si &egrave; verificato un errore.\n";
                 exit;
                 } // Errore interrogazione database
   $nume = pg_NumRows($esito); //inizia l'output tabelare della query
   $i = 0;
   $totale=0;
   while ($i < $nume) {
                                    if (!($i % 2)) {
                                                               echo "<TR bgcolor=\"#C0C0C0\"><TD>";
                                                              } else {
                                                                           echo "<TR bgcolor=\"#ffffff\"><TD>";
                                                                          }
                       echo pg_Result($esito, $i, "data");
                       echo "&nbsp;&nbsp;</TD><TD><FONT COLOR=\"#FF0000\">";
                       echo pg_Result($esito, $i, "prestazione");
                       echo "&nbsp;&nbsp;</FONT></TD><TD><CENTER>";
                       echo pg_Result($esito, $i, "quantita");
                       echo "</CENTER></TD><TD ALIGN=RIGHT>";
                       echo number_format(pg_Result($esito, $i, "prezzounitario"),2);
                       echo "</TD><TD ALIGN=RIGHT>";
                       echo number_format(pg_Result($esito, $i, "prezzomoltiplicato"),2);
                       $totale=$totale + pg_Result($esito, $i, "prezzomoltiplicato");
                       echo "</TD></TR>";
/*                     echo "</TD><TD><FONT COLOR=\"#FF0000\"><CENTER><B><a href=\"stampafattura.php?idfattu=";
                       echo pg_Result($esito, $i, "idfattura");
                       echo "\">",pg_Result($esito, $i, "idfattura"),"</a></B></CENTER></FONT></TD></TR>"; */

                       $i++;
                      } // Estrazione delle righe dell'interrogazione
?>

 <TR>
  <TD COLSPAN="6">
  <HR noshade size="2">
  </TD>
 </TR>

</TABLE> 

<B><? echo gettext ("Adding new items in invoice");?></B>

<?php
                        //Settaggio data Formato Europeo 
                        pg_Exec($conn,"SET DATESTYLE TO 'European';");
                        $esito = pg_Exec($conn,
                        "SELECT * FROM anagrafica WHERE id = $idpz;");
                        if (!$esito) {
                                      echo "Si &egrave; verificato un errore.\n";
                                      exit;
                                      } // Errore interrogazione database
                        $i = pg_getlastoid($esito);
?>
 
<FORM METHOD="post" ACTION="nuovavoceinsert.php">

<TABLE Border="0">
 <TR>
  <TD ALIGN="CENTER"><INPUT NAME="id" TYPE="HIDDEN" VALUE="<?PHP echo $idpz; ?>" SIZE="10" MAXLENGTH="15"></TD>
</TR>

<TR>
  <TD ALIGN="CENTER"><? echo gettext ("Surname:");?><INPUT NAME="cognome"
           VALUE="<?php echo pg_Result($esito, $i, "cognome"); ?>" SIZE="10"
           MAXLENGTH="15">
           <? echo gettext ("Name:");?><INPUT NAME="nome"  VALUE="<?php echo pg_Result($esito, $i, "nome"); ?>"
           SIZE="10" MAXLENGTH="15">
   </TD>
</TR>

<TR>
  <TD ALIGN="CENTER">
           <? echo gettext ("City of birth:");?>
           <INPUT NAME="luogonascita"  VALUE="<?php echo pg_Result($esito, $i, "luogonascita"); ?>" SIZE="10" MAXLENGTH="15">
           <? echo gettext ("birthdate:");?>
           <INPUT NAME="datanascita"  VALUE="<?php echo pg_Result($esito, $i, "datanascita"); ?>" SIZE="10" MAXLENGTH="15">
  </TD>
</TR>

<TR>
  <TD ALIGN="CENTER">
           <? echo gettext ("Address:");?>
           <INPUT NAME="via"  VALUE="<?php echo pg_Result($esito, $i, "via"); ?>" SIZE="20" MAXLENGTH="15">
           <? echo gettext ("City:");?>
           <INPUT NAME="citta"  VALUE="<?php echo pg_Result($esito, $i, "citta"); ?>" SIZE="10" MAXLENGTH="15"> 
           <? echo gettext ("ZIP:");?>
           <INPUT NAME="cap"   SIZE="5" VALUE="<?php echo pg_Result($esito, $i, "cap"); ?>" SIZE="10" MAXLENGTH="15">
  </TD>
</TR>

<TR>
  <TD ALIGN="CENTER"><? echo gettext ("ID:");?>
           <INPUT NAME="codicefiscale" SIZE="16" VALUE="<?php echo pg_Result($esito, $i, "codicefiscale"); ?>" MAXLENGTH="16">
           <? echo gettext ("Invoice n.:"); ?>
           <INPUT NAME="idfatt"  SIZE="10" VALUE="<? echo $idfatta; ?>" >
           <? echo gettext ("Invoice date:");?>
           <INPUT NAME="data" SIZE="13" VALUE="<? $quero=pg_Exec($conn, "SELECT data FROM fattura WHERE idfattura = $idfatta");     $valore=pg_Result($quero, 0, "data"); if (!$valore) { echo "0"; } else { print $valore; } pg_FreeResult($quero); pg_FreeResult($esito); ?>">
</TD></TR>
</TABLE>

<TABLE>

<TR>
  <TD><? echo gettext ("Treatment:");?></TD>
  <TD><? echo gettext ("Q.:");?></TD>
  <TD><? echo gettext ("Charge/U:");?></TD>
</TR>
<TR>
  <TD><INPUT NAME="prestazione1" SIZE="30"></TD>
  <TD><INPUT NAME="quantita1" SIZE="2"></TD>
  <TD><INPUT NAME="prezzounitario1" SIZE="8"></TD>
</TR>
<TR>
  <TD><INPUT NAME="prestazione2" SIZE="30"></TD>
  <TD><INPUT NAME="quantita2" SIZE="2"></TD>
  <TD><INPUT NAME="prezzounitario2" SIZE="8"></TD>
</TR>

<TR>
  <TD><INPUT NAME="prestazione3" SIZE="30"></TD>
  <TD><INPUT NAME="quantita3" SIZE="2"></TD>
  <TD><INPUT NAME="prezzounitario3" SIZE="8"></TD>
</TR>

<TR>
  <TD><INPUT NAME="prestazione4" SIZE="30"></TD>
  <TD><INPUT NAME="quantita4" SIZE="2"></TD>
  <TD><INPUT NAME="prezzounitario4" SIZE="8"></TD>
</TR>

<TR>
  <TD><INPUT NAME="prestazione5" SIZE="30"></TD>
  <TD><INPUT NAME="quantita5" SIZE="2"></TD>
  <TD><INPUT NAME="prezzounitario5" SIZE="8"></TD>
</TR>

<TR>
  <TD><INPUT NAME="prestazione6" SIZE="30"></TD>
  <TD><INPUT NAME="quantita6" SIZE="2"></TD>
  <TD><INPUT NAME="prezzounitario6" SIZE="8"></TD>
</TR>

<TR>
  <TD><INPUT NAME="prestazione7" SIZE="30"></TD>
  <TD><INPUT NAME="quantita7" SIZE="2"></TD>
  <TD><INPUT NAME="prezzounitario7" SIZE="8"></TD>
</TR>

<TR>
  <TD><INPUT NAME="prestazione8" SIZE="30"></TD>
  <TD><INPUT NAME="quantita8" SIZE="2"></TD>
  <TD><INPUT NAME="prezzounitario8" SIZE="8"></TD>
</TR>

</TABLE>
<?
echo "<INPUT TYPE=\"submit\" VALUE=\"";
echo gettext ("Show data to be added");
echo "\">";
?>
<INPUT TYPE="reset" VALUE="Reset">
</FORM>


<? include("piede.php");?>

Generated by  Doxygen 1.6.0   Back to index