From 9cec1d18f7c63712e99fe7dd029628c3acb9645a Mon Sep 17 00:00:00 2001 From: antonioscarpino <34765237+antonioscarpino@users.noreply.github.com> Date: Sat, 24 Mar 2018 21:31:49 +0100 Subject: [PATCH] =?UTF-8?q?possibilit=C3=A0=20di=20stampare=20la=20p.iva?= =?UTF-8?q?=20se=20il=20cliente=20ne=20=C3=A8=20in=20possesso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/interventi/body.php | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/templates/interventi/body.php b/templates/interventi/body.php index 54fb4bf83..dae892475 100644 --- a/templates/interventi/body.php +++ b/templates/interventi/body.php @@ -22,19 +22,28 @@ echo ' '.tr('Contratto num.').': '.$records[0]['numero_contratto'].' '; -// Dati cliente -echo ' - - - '.tr('Cliente').': '.$c_ragionesociale.' - '; + // Dati cliente + echo ' + + + '.tr('Cliente').': '.$c_ragionesociale.' + '; -// Codice fiscale -echo ' - - '.tr('P.Iva').': '.strtoupper($c_piva).' - - '; + // Codice fiscale o P.Iva + + if ($c_piva != 0) { + echo ' + + '.tr('P.Iva').': '.strtoupper($c_piva).' + + '; + } else { + echo ' + + '.tr('C.F.').': '.strtoupper($c_codicefiscale).' + + '; + } // riga 2 echo ' @@ -61,7 +70,7 @@ echo ' // Elenco impianti su cui รจ stato fatto l'intervento $rs2 = $dbo->fetchArray('SELECT *, (SELECT nome FROM my_impianti WHERE id=my_impianti_interventi.idimpianto) AS nome, (SELECT matricola FROM my_impianti WHERE id=my_impianti_interventi.idimpianto) AS matricola FROM my_impianti_interventi WHERE idintervento='.prepare($id_record)); $impianti = []; -for ($j = 0; $j < sizeof($rs2); ++$j) { +for ($j = 0; $j < count($rs2); ++$j) { $impianti[] = ''.$rs2[$j]['nome']." (".$rs2[$j]['matricola'].')'; } echo '