| [ PHPXref.com ] | [ Generated: Sun Jul 20 17:56:38 2008 ] | [ Gazie 2.0.11 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /* $Id: ddt.php,v 1.17 2006/07/03 06:01:01 devincen Exp $ 3 -------------------------------------------------------------------------- 4 Gazie - Gestione Azienda 5 Copyright (C) 2004-2006 - Antonio De Vincentiis Montesilvano (PE) 6 (info@devincentiis.it) 7 <http://gazie.sourceforge.net> 8 -------------------------------------------------------------------------- 9 Questo programma e` free software; e` lecito redistribuirlo e/o 10 modificarlo secondo i termini della Licenza Pubblica Generica GNU 11 come e` pubblicata dalla Free Software Foundation; o la versione 2 12 della licenza o (a propria scelta) una versione successiva. 13 14 Questo programma e` distribuito nella speranza che sia utile, ma 15 SENZA ALCUNA GARANZIA; senza neppure la garanzia implicita di 16 NEGOZIABILITA` o di APPLICABILITA` PER UN PARTICOLARE SCOPO. Si 17 veda la Licenza Pubblica Generica GNU per avere maggiori dettagli. 18 19 Ognuno dovrebbe avere ricevuto una copia della Licenza Pubblica 20 Generica GNU insieme a questo programma; in caso contrario, si 21 scriva alla Free Software Foundation, Inc., 675 Mass Ave, 22 Cambridge, MA 02139, Stati Uniti. 23 -------------------------------------------------------------------------- 24 */ 25 require ('../../inc/fpdf.php'); 26 27 class DDT extends MEM_IMAGE 28 { 29 function setVars(&$docVars) 30 { 31 $this->docVars =& $docVars; 32 $this->gaz_path = '../../'; 33 $this->rigbro_table = $docVars->gTables['rigbro_table']; 34 $this->aliiva_table = $docVars->gTables['aliiva_table']; 35 $this->tesdoc = $docVars->tesdoc; 36 $this->testat = $docVars->testat; 37 $this->emissione = $docVars->emissioneddt; 38 $this->pagame = $docVars->pagame; 39 $this->intesta1 = $docVars->intesta1; 40 $this->intesta1bis = $docVars->intesta1bis; 41 $this->intesta2 = $docVars->intesta2; 42 $this->intesta3 = $docVars->intesta3.$docVars->intesta4; 43 $this->intesta4 = $docVars->codici; 44 $this->colore = $docVars->colore; 45 $this->perbollo = $docVars->perbollo; 46 $this->cliente1 = $docVars->cliente1; 47 $this->cliente2 = $docVars->cliente2; 48 $this->cliente3 = $docVars->cliente3; 49 $this->cliente4 = $docVars->cliente4; 50 $this->cliente5 = $docVars->cliente5; 51 $this->clientSedeLegale = ""; 52 if (!empty ($docVars->clientSedeLegale)) { 53 foreach($docVars->clientSedeLegale as $value) { 54 $this->clientSedeLegale .= $value." "; 55 } 56 } 57 $this->min = $docVars->min; 58 $this->ora = $docVars->ora; 59 $this->day = $docVars->day; 60 $this->month = $docVars->month; 61 $this->year = $docVars->year; 62 } 63 64 function Header() 65 { 66 $this->SetFillColor(hexdec(substr($this->colore,0,2)),hexdec(substr($this->colore,2,2)),hexdec(substr($this->colore,4,2))); 67 $this->SetFont('Times','B',16); 68 $this->Cell(130,6,$this->intesta1,0,1,'L'); 69 $this->SetFont('Arial','',9); 70 $interlinea = 14; 71 if (!empty($this->intesta1bis)) { 72 $this->Cell(130,4,$this->intesta1bis,0,2,'L'); 73 $interlinea = 10; 74 } 75 $this->Cell(130,4,$this->intesta2,0,2,'L'); 76 $this->Cell(130,4,$this->intesta3,0,2,'L'); 77 $this->Cell(130,4,$this->intesta4,0,0,'L'); 78 $this->Image('var://logo',140,5,40,0,'JPEG'); 79 $this->Line(0,97,3,97); //questa marca la linea d'aiuto per la piegatura del documento 80 $this->Line(0,147,3,147); //questa marca la linea d'aiuto per la foratura del documento 81 $this->Ln($interlinea); 82 $this->SetFont('Arial','',12); 83 if ($this->tesdoc['tipdoc'] == 'DDR') { 84 $this->Cell(110,5,'D.d.T. per Reso n.'.$this->emissione,1,1,'L',1); 85 } elseif ($this->tesdoc['tipdoc'] == 'DDL') { 86 $this->Cell(110,5,'D.d.T. c/lavorazione n.'.$this->emissione,1,1,'L',1); 87 } else { 88 $this->Cell(110,5,'Documento di Trasporto n.'.$this->emissione,1,1,'L',1); 89 } 90 $this->Cell(30,5,'Pagina '.$this->PageNo().' di {nb}',0,0,'L'); 91 $this->Ln(6); 92 $this->Cell(115,5,'Spett.le ',0,0,'R'); 93 $this->Cell(130,5,$this->cliente1,0,1,'L'); 94 if (! empty ($this->cliente2)) { 95 $this->Cell(115); 96 $this->Cell(130,5,$this->cliente2,0,1,'L'); 97 } 98 $this->Cell(115); 99 $this->Cell(130,5,$this->cliente3,0,1,'L'); 100 $this->Cell(115); 101 $this->Cell(130,5,$this->cliente4,0,1,'L'); 102 $this->Cell(115); 103 $this->Cell(130,5,$this->cliente5,0,1,'L'); 104 if (!empty ($this->clientSedeLegale)) { 105 $this->SetFont('Arial','',8); 106 $this->Cell(115,8,'Sede legale: ',0,0,'R'); 107 $this->Cell(130,8,$this->clientSedeLegale,0,1); 108 $this->SetFont('Arial','',12); 109 } else { 110 $this->Ln(4); 111 } 112 $this->SetFont('Arial','',9); 113 $this->Cell(30,6,'Codice',1,0,'L',1); 114 $this->Cell(85,6,'Descrizione',1,0,'L',1); 115 $this->Cell(10,6,'U.m.',1,0,'L',1); 116 $this->Cell(30,6,'Quantità',1,0,'R',1); 117 $this->Cell(25,6,'Prezzo',1,0,'R',1); 118 $this->Cell(10,6,'%Sc.',1,1,'R',1); 119 } 120 121 function pageHeader() 122 { 123 $this->AddPage(); 124 } 125 126 function compose() 127 { 128 $lines = $this->docVars->getRigo(); 129 while (list($key, $rigo) = each($lines)) { 130 if ($this->GetY() >= 225) { 131 $this->Cell(155,6,'','T',1); 132 $this->SetFont('Arial','',20); 133 $this->SetY(235); 134 $this->Cell(190,12,'>>> --- SEGUE SU PAGINA SUCCESSIVA --- >>>',1,1,'C'); 135 $this->SetFont('Arial','',9); 136 $this->AddPage(); 137 } 138 if ($rigo['tiprig'] < 2) { 139 $this->Cell(30,6,$rigo['codart'],1,0,'L'); 140 $this->Cell(85,6,$rigo['descri'],1,0,'L'); 141 $this->Cell(10,6,$rigo['unimis'],1,0,'L'); 142 $this->Cell(30,6,number_format($rigo['quanti'],1,',',''),1,0,'R'); 143 if ($this->docVars->client['stapre'] == 'S') { 144 $this->Cell(25,6,number_format($rigo['prelis'],3,',',''),1,0,'R'); 145 $this->Cell(10,6,$rigo['sconto'],1,1,'R'); 146 } else { 147 $this->Cell(25,6); 148 $this->Cell(10,6,'',0,1); 149 } 150 } elseif ($rigo['tiprig'] == 2) { 151 $this->Cell(30,6,'','L'); 152 $this->Cell(125,6,$rigo['descri'],'LR',1,'L'); 153 } 154 } 155 } 156 157 function pageFooter() { 158 if ($this->docVars->quatot > 0) { 159 $this->Cell(115,6,'TOTALE DEL PESO per gli articoli con unità di misura in','T',0,'R'); 160 $this->Cell(10,6,'kg ',1,0,'L'); 161 $this->Cell(30,6,$this->docVars->quatot,1,0,'R'); 162 } else { 163 $this->Cell(155,6,'','T',1); 164 } 165 $this->SetY(240); 166 $this->SetFillColor(hexdec(substr($this->colore,0,2)),hexdec(substr($this->colore,2,2)),hexdec(substr($this->colore,4,2))); 167 $this->SetFont('Arial','',9); 168 $this->Cell(62,6,'Spedizione',1,0,'C',1); 169 $this->Cell(105,6,'Vettore',1,0,'C',1); 170 $this->Cell(23,6,'Trasporto',1,1,'C',1); 171 $this->Cell(62,6,$this->tesdoc['spediz'],1,0,'C'); 172 $this->Cell(105,6,$this->docVars->vettor['descri'],1,0,'C'); 173 if ($this->docVars->tesdoc['traspo'] == 0) { 174 $ImportoTrasporto = ""; 175 } else { 176 $ImportoTrasporto = gaz_format_number($this->docVars->tesdoc['traspo']); 177 } 178 $this->Cell(23,6,$ImportoTrasporto,1,1,'C'); 179 $this->Cell(56,6,'Inizio trasporto',1,0,'C',1); 180 $this->Cell(67,6,'Firma vettore',1,0,'C',1); 181 $this->Cell(67,6,'Firma destinatario',1,1,'C',1); 182 if ($this->day > 0) { 183 $this->Cell(56,6,'data '.$this->day.'-'.$this->month.'-'.$this->year,'LR',0,'C'); 184 } else { 185 $this->Cell(56,6,' data','LR',0,'L'); 186 } 187 $this->Cell(67,6,'','R',0); 188 $this->Cell(67,6,'','R',1); 189 $this->Cell(56,6,'ora '.$this->ora.':'.$this->min,'LRB',0,'C'); 190 $this->Cell(67,6,'','RB',0); 191 $this->Cell(67,6,'','RB',1); 192 } 193 194 function Footer() 195 { 196 //Page footer 197 $this->SetY(-25); 198 $this->SetFont('Arial','',8); 199 $this->MultiCell(190,4,$this->intesta1.' '.$this->intesta2.' '.$this->intesta3.' '.$this->intesta4.' ',0,'C',0); 200 } 201 } 202 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |