Exemple #1
0
     } else {
        $movSaldo -= $row['import'];
        $avere = gaz_format_number($row['import']);
        $dare = '';
      }
      $aRiportare['top'][1]['nam'] = gaz_format_number($movSaldo);
      $aRiportare['bot'][1]['nam'] = gaz_format_number($movSaldo);
      $pdf->Cell(18,4,$datareg,1,0,'C');
      if (!empty($row['partner']) || !empty($row['numdoc'])){
          $row['tesdes'].=' ('.$row['partner'];
          if (!empty($row['numdoc'])){
             $row['tesdes'] .= ' n.'.$row['numdoc'].' del '.$datadoc;
             if ($row['protoc']>0) {
                $row['tesdes'] .= ' sez.'.$row['seziva'].' p.'.$row['protoc'];
             }
          }
          $row['tesdes'].=')';
      }
      $pdf->Cell(108,4,$row['tesdes'],'LTB',0,'L',0,'',1);
      $pdf->SetFont('helvetica','',7);
      $pdf->Cell(20,4,$dare,1,0,'R');
      $pdf->Cell(20,4,$avere,1,0,'R');
      $pdf->Cell(20,4,gaz_format_number($movSaldo),1,1,'R');
      $ctrlConto = $row['codcon'];
}
$pdf->SetFont('helvetica','B',8);
$pdf->Cell($aRiportare['top'][0]['lun'],4,'SALDO al '.$descrDatafin.' : ',1,0,'R');
$pdf->Cell($aRiportare['top'][1]['lun'],4,$aRiportare['top'][1]['nam'],1,0,'R');
$pdf->setRiporti('');
$pdf->Output();
?>
Exemple #2
0
        while (list($key, $mv) = each($m)) {
            $saldo += $mv['dare'];
            $saldo -= $mv['avere'];
            echo "<tr><td class=\"FacetDataTD\">".gaz_format_date($mv["datreg"])." &nbsp;</td>";
            echo "<td align=\"center\" class=\"FacetDataTD\"><a href=\"admin_movcon.php?id_tes=".$mv["id_tes"]."&Update\">".$mv["id_tes"]."</a> &nbsp</td>";
            echo "<td class=\"FacetDataTD\">".$mv["tesdes"]." &nbsp;</td>";
            if (!empty($mv['numdoc'])){
                echo "<td align=\"center\" class=\"FacetDataTD\">".$mv["protoc"]." &nbsp;</td>";
                echo "<td align=\"center\" class=\"FacetDataTD\">".$mv["numdoc"]." &nbsp;</td>";
                echo "<td align=\"center\" class=\"FacetDataTD\">".gaz_format_date($mv["datdoc"])." &nbsp;</td>";
            } else {
                echo "<td class=\"FacetDataTD\" colspan=\"3\"></td>";
            }
            echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($mv['dare'])." &nbsp;</td>";
            echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($mv['avere'])." &nbsp;</td>";
            echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($saldo)." &nbsp;</td></tr>";
        }
     }
     echo "\t<tr class=\"FacetFieldCaptionTD\">\n";
     echo '<td colspan="'.$span.'" align="right"><input type="submit" name="print" value="';
     echo $script_transl['print'];
     echo '">';
     echo "\t </td>\n";
     echo "\t </tr>\n";
  } else {
     echo "<tr><td class=\"FacetDataTDred\" align=\"center\">".$script_transl['errors'][4]."</TD></TR>\n";
  }
  echo "</table></form>";
}
?>
</body>
 $pdf->Cell(130,5,
            $paymov->docData[$k]['descri'].' n.'.
            $paymov->docData[$k]['numdoc'].'/'.
            $paymov->docData[$k]['seziva'].' '.
            $paymov->docData[$k]['datdoc']
            ,1,1);
 foreach ($v as $ki=>$vi){
    $pdf->SetFillColor(170,255,170);
    $v_op='';
    $cl_exp='';
    if ($vi['op_val']>=0.01){
       $v_op=gaz_format_number($vi['op_val']);
    }
    $v_cl='';
    if ($vi['cl_val']>=0.01){
        $v_cl=gaz_format_number($vi['cl_val']);
        $cl_exp=gaz_format_date($vi['cl_exp']);
    }
    $expo='';
    if ($vi['expo_day']>=1){ 
       $expo=$vi['expo_day'];
       if ($vi['cl_val']==$vi['op_val']){
          $vi['status']=2; // la partita è chiusa ma è esposta a rischio insolvenza 
          $pdf->SetFillColor(255,245,185);
          $class_paymov='FacetDataTDevidenziaOK';
       }
    } else {
       if ($vi['cl_val']==$vi['op_val']){ // chiusa e non esposta
          $cl_exp='';
          $pdf->SetFillColor(230,255,230);
       } elseif($vi['status']==3){ // SCADUTA
Exemple #4
0
if ($chk_add_iva_tes == 0){// se le spese della testata non sono state aggiunte perchè non si è incontrato uno stesso codice IVA
   $result = gaz_dbi_get_row($gTables['aliiva'],"codice",$form['ivaspe']);
   $impcast = $form['traspo'] + $form['speban']*$form['numrat'] + $form['spevar'];
   $ivacast =  round($impcast * $result['aliquo'])/ 100;
   $totimpfat += $impcast;
   $totivafat += $ivacast;
   if ($i > 0) {
        echo "<tr><td align=\"right\">".number_format ($impcast,2, '.', '')."</td><td align=\"right\">".$result['descri']." ".number_format ($ivacast,2, '.', '')."</td>\n";
   }
   $chk_add_iva_tes = 1;
}

if ($i > 0) {
        echo "<td align=\"right\">".number_format ($totimpmer,2, '.', '')."</td>
               <td align=\"right\">".gaz_format_number (($totimpfat-$totimpmer-$form['traspo']-($form['speban']*$form['numrat'])-$form['spevar']),2, '.', '')."</td>
               <td align=\"right\">".number_format ($totimpfat,2, '.', '')."</td>
               <td align=\"right\">".number_format ($totivafat,2, '.', '')."</td>
               <td align=\"right\">".$quatot."</td>
               <td align=\"right\">".number_format (($totimpfat+$totivafat),2, '.', '')."</td>\n";
        if ($toDo == 'update') {
           echo '<td class="FacetFieldCaptionTD" align="right"><input type="submit" accesskey="m" name="ins" id="preventDuplicate" onClick="chkSubmit();" value="MODIFICA !"></td></tr>';
        } else {
           echo '<td class="FacetFieldCaptionTD" align="right"><input type="submit" accesskey="i" name="ins" id="preventDuplicate" onClick="chkSubmit();" value="INSERISCI !"></td></tr>';
        }
}
echo "</table><br />";
?>
</form>
</body>
</html>
Exemple #5
0
 function pageFooter()
 {
     $this->Cell(186, 6, '', 'T', 1);
     //stampo il castelletto
     $this->SetY(180);
     $this->SetFont('helvetica', 'B', 48);
     $this->SetTextColor(255, 150, 150);
     $this->Cell(186, 20, 'N O N   F I S C A L E', 0, 1, 'C');
     $this->SetTextColor(0, 0, 0);
     $this->SetY(212);
     $this->SetFont('helvetica', '', 8);
     $this->Cell(62, 6, 'Pagamento', 'LTR', 0, 'C', 1);
     $this->Cell(68, 6, 'Castelletto I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(56, 6, 'T O T A L E    F A T T U R A', 'LTR', 1, 'C', 1);
     $this->Cell(62, 6, $this->pagame['descri'], 'LBR', 0, 'L');
     $this->Cell(18, 4, 'Imponibile', 'LR', 0, 'C', 1);
     $this->Cell(32, 4, 'Aliquota', 'LR', 0, 'C', 1);
     $this->Cell(18, 4, 'Imposta', 'LR', 1, 'C', 1);
     $this->docVars->setTotal();
     foreach ($this->docVars->cast as $key => $value) {
         $this->Cell(62);
         $this->Cell(18, 4, gaz_format_number($value['impcast']) . ' ', 'LR', 0, 'R');
         $this->Cell(32, 4, $value['descriz'], 0, 0, 'C');
         $this->Cell(18, 4, gaz_format_number($value['ivacast']) . ' ', 'LR', 1, 'R');
     }
     //azzero il castelletto
     foreach ($this->docVars->castel as $i => $value) {
         unset($this->docVars->castel[$i]);
     }
     $totimpmer = $this->docVars->totimpmer;
     $speseincasso = $this->docVars->speseincasso;
     $totimpfat = $this->docVars->totimpfat;
     $totivafat = $this->docVars->totivafat;
     $vettor = $this->docVars->vettor;
     $impbol = $this->docVars->impbol;
     $totriport = $this->docVars->totriport;
     $taxstamp = $this->docVars->taxstamp;
     //effettuo il calcolo degli importi delle scadenze
     $totpag = $totimpfat + $impbol + $totriport + $totivafat;
     $ratpag = CalcolaScadenze($totpag, $this->giorno, $this->mese, $this->anno, $this->pagame['tipdec'], $this->pagame['giodec'], $this->pagame['numrat'], $this->pagame['tiprat'], $this->pagame['mesesc'], $this->pagame['giosuc']);
     if ($ratpag) {
         //allungo l'array fino alla 4^ scadenza
         $ratpag['import'] = array_pad($ratpag['import'], 4, '');
         $ratpag['giorno'] = array_pad($ratpag['giorno'], 4, '');
         $ratpag['mese'] = array_pad($ratpag['mese'], 4, '');
         $ratpag['anno'] = array_pad($ratpag['anno'], 4, '');
     } else {
         for ($i = 0; $i <= 3; $i++) {
             $ratpag['import'][$i] = "";
             $ratpag['giorno'][$i] = "";
             $ratpag['mese'][$i] = "";
             $ratpag['anno'][$i] = "";
         }
     }
     //stampo i totali
     $this->SetY(200);
     $this->SetFillColor(hexdec(substr($this->colore, 0, 2)), hexdec(substr($this->colore, 2, 2)), hexdec(substr($this->colore, 4, 2)));
     $this->SetFont('helvetica', '', 9);
     $this->Cell(36, 6, 'Totale merce', 'LTR', 0, 'C', 1);
     $this->Cell(16, 6, '% Sconto', 'LTR', 0, 'C', 1);
     $this->Cell(24, 6, 'Spese Incasso', 'LTR', 0, 'C', 1);
     $this->Cell(26, 6, 'Trasporto', 'LTR', 0, 'C', 1);
     $this->Cell(36, 6, 'Tot.Imponibile', 'LTR', 0, 'C', 1);
     $this->Cell(26, 6, 'Tot. I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(22, 6, 'Bolli', 'LTR', 1, 'C', 1);
     if ($totimpmer > 0) {
         $this->Cell(36, 6, gaz_format_number($totimpmer), 'LBR', 0, 'C');
     } else {
         $this->Cell(36, 6, '', 'LBR');
     }
     if ($this->tesdoc['sconto'] > 0) {
         $this->Cell(16, 6, gaz_format_number($this->tesdoc['sconto']), 'LBR', 0, 'C');
     } else {
         $this->Cell(16, 6, '', 'LBR');
     }
     if ($speseincasso > 0) {
         $this->Cell(24, 6, gaz_format_number($speseincasso), 'LBR', 0, 'C');
     } else {
         $this->Cell(24, 6, '', 'LBR');
     }
     if ($this->trasporto > 0) {
         $this->Cell(26, 6, gaz_format_number($this->trasporto), 'LBR', 0, 'C');
     } else {
         $this->Cell(26, 6, '', 'LBR');
     }
     if ($totimpfat > 0) {
         $this->Cell(36, 6, gaz_format_number($totimpfat), 'LBR', 0, 'C');
     } else {
         $this->Cell(36, 6, '', 'LBR');
     }
     if ($totivafat > 0) {
         $this->Cell(26, 6, gaz_format_number($totivafat), 'LBR', 0, 'C');
     } else {
         $this->Cell(26, 6, '', 'LBR');
     }
     if ($impbol > 0) {
         $this->Cell(22, 6, gaz_format_number($impbol), 'LBR', 1, 'C');
     } else {
         $this->Cell(22, 6, '', 'LBR');
     }
     $this->SetY(218);
     $this->Cell(130);
     $totale = $totimpfat + $totivafat + $impbol;
     $this->SetFont('helvetica', 'B', 18);
     $this->Cell(56, 24, '€ ' . gaz_format_number($totale), 'LBR', 1, 'C');
     $this->SetY(224);
     $this->SetFont('helvetica', '', 9);
     $this->Cell(62, 6, 'Banca d\'appoggio', 'LTR', 1, 'C', 1);
     $this->Cell(62, 6, $this->banapp['descri'], 'LR', 1, 'L');
     if (!empty($this->banapp['descri'])) {
         $this->Cell(62, 6, ' ABI ' . sprintf("%05d", $this->banapp['codabi']) . ' CAB ' . $this->banapp['codcab'], 'LRB', 1, 'C');
     } else {
         $this->Cell(62, 6, '', 'LRB', 1);
     }
     $this->Cell(130, 6, 'Date di Scadenza e Importo Rate', 'LTR', 0, 'C', 1);
     $this->Cell(56, 6, 'Totale dei riporti', 'LTR', 1, 'C', 1);
     $this->Cell(32, 6, $ratpag['giorno']['0'] . '-' . $ratpag['mese']['0'] . '-' . $ratpag['anno']['0'], 'LR', 0, 'C');
     $this->Cell(33, 6, $ratpag['giorno']['1'] . '-' . $ratpag['mese']['1'] . '-' . $ratpag['anno']['1'], 'LR', 0, 'C');
     $this->Cell(32, 6, $ratpag['giorno']['2'] . '-' . $ratpag['mese']['2'] . '-' . $ratpag['anno']['2'], 'LR', 0, 'C');
     $this->Cell(33, 6, $ratpag['giorno']['3'] . '-' . $ratpag['mese']['3'] . '-' . $ratpag['anno']['3'], 'LR', 0, 'C');
     $this->Cell(56, 6, '', 'R', 1, 'C');
     if ($ratpag['import']['0'] != 0) {
         $this->Cell(32, 6, gaz_format_number($ratpag['import']['0']), 'LBR', 0, 'C');
     } else {
         $this->Cell(32, 6, '', 'LBR');
     }
     if ($ratpag['import']['1'] != 0) {
         $this->Cell(33, 6, gaz_format_number($ratpag['import']['1']), 'LBR', 0, 'C');
     } else {
         $this->Cell(33, 6, '', 'LBR');
     }
     if ($ratpag['import']['2'] != 0) {
         $this->Cell(32, 6, gaz_format_number($ratpag['import']['2']), 'LBR', 0, 'C');
     } else {
         $this->Cell(32, 6, '', 'LBR');
     }
     if ($ratpag['import']['3'] != 0) {
         $this->Cell(33, 6, gaz_format_number($ratpag['import']['3']), 'LBR', 0, 'C');
     } else {
         $this->Cell(33, 6, '', 'LBR');
     }
     if ($totriport != 0) {
         $this->Cell(56, 6, gaz_format_number($totriport), 'BR', 1, 'C');
     } else {
         $this->Cell(56, 6, '', 'BR', 1);
     }
 }
Exemple #6
0
    } else {
       $title = "";
    }
    print "<tr>";
    print "<td class=\"FacetDataTD\" align=\"right\"><a class=\"btn btn-xs btn-default btn-edit\" href=\"admin_movcon.php?id_tes=".$a_row["id_tes"]."&Update\" title=\"Modifica\"><i class=\"glyphicon glyphicon-edit\"></i>&nbsp;".$a_row["id_tes"]."</a> &nbsp</td>";
    print "<td class=\"FacetDataTD\" align=\"center\">".gaz_format_date($a_row["datreg"])." &nbsp;</td>";
    print "<td class=\"FacetDataTD\" title= \"$title\" align=\"center\">".$a_row["caucon"]." &nbsp;</td>";
    print "<td class=\"FacetDataTD\" title= \"$title\">".$a_row["descri"]." &nbsp;</td>";
    if ($a_row["protoc"] > 0) {
       print "<td class=\"FacetDataTD\" align=\"center\">".$a_row["protoc"]."/".$a_row["seziva"]."";
       print "</td>";
    } else {
       print "<td class=\"FacetDataTD\"></td>";
    }
    print "<td class=\"FacetDataTD\" align=\"center\">".$a_row["numdoc"]."</td>";
    print "<td class=\"FacetDataTD\" title= \"$title\" align=\"right\">".gaz_format_number($a_row['dare'])." </td>";
    print "<td class=\"FacetDataTD\" align=\"center\">";
    $docref=getDocRef($a_row);
    if (!empty($docref)){
      echo "<a class=\"btn btn-xs btn-default btn-default\" title=\"".$script_transl['sourcedoc']."\" href=\"$docref\"><i class=\"glyphicon glyphicon-print\"></i></a>";
    } elseif($paymov)  {
      echo "<a class=\"btn btn-xs btn-default btn-default\" title=\"".$script_transl['customer_receipt']."\" href=\"../vendit/print_customer_payment_receipt.php?id_rig=".$paymov."\"><i class=\"glyphicon glyphicon-check\"></i>&nbsp;<i class=\"glyphicon glyphicon-euro\"></i>&nbsp;<i class=\"glyphicon glyphicon-print\"></i></a>";
    }
    print "</td>";
    print "<td class=\"FacetDataTD\" align=\"center\"><a class=\"btn btn-xs btn-default btn-elimina\" href=\"delete_movcon.php?id_tes=".$a_row["id_tes"]."\"><i class=\"glyphicon glyphicon-remove\"></i></a></td>";
    print "</tr>\n";
}
?>
</table>
</body>
</html>
Exemple #7
0
 function pageFooter()
 {
     $y = $this->GetY();
     $this->Rect(10, $y, 186, 200 - $y);
     //questa marca le linee dx e sx del documento
     //stampo il castelletto
     $this->SetY(212);
     $this->Cell(62, 6, 'Pagamento', 'LTR', 0, 'C', 1);
     $this->Cell(68, 6, 'Castelletto I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(56, 6, 'T O T A L E  P A R C E L L A', 'LTR', 1, 'C', 1);
     $this->SetFont('helvetica', '', 8);
     $this->Cell(62, 6, $this->pagame['descri'], 'LBR', 0, 'L');
     $this->Cell(18, 4, 'Imponibile', 'LR', 0, 'C', 1);
     $this->Cell(32, 4, 'Aliquota', 'LR', 0, 'C', 1);
     $this->Cell(18, 4, 'Imposta', 'LR', 1, 'C', 1);
     $this->docVars->setTotal();
     foreach ($this->docVars->cast as $key => $value) {
         if ($this->tesdoc['id_tes'] > 0) {
             $this->Cell(62);
             $this->Cell(18, 4, gaz_format_number($value['impcast']) . ' ', 'LR', 0, 'R');
             $this->Cell(32, 4, $value['descriz'], 0, 0, 'C');
             $this->Cell(18, 4, gaz_format_number($value['ivacast']) . ' ', 'LR', 1, 'R');
         } else {
             $this->Cell(62);
             $this->Cell(68, 4, '', 'LR', 1);
         }
     }
     //azzero il castelletto
     foreach ($this->docVars->castel as $i => $value) {
         unset($this->docVars->castel[$i]);
     }
     //azzero il trasporto
     $this->tottraspo = 0.0;
     $totimpmer = $this->docVars->totimpmer;
     $speseincasso = $this->docVars->speseincasso;
     $totimpfat = $this->docVars->totimpfat;
     $totivafat = $this->docVars->totivafat;
     $totivasplitpay = $this->docVars->totivasplitpay;
     $vettor = $this->docVars->vettor;
     $impbol = $this->docVars->impbol;
     $totriport = $this->docVars->totriport;
     $ritenuta = $this->docVars->tot_ritenute;
     $taxstamp = $this->docVars->taxstamp;
     if ($this->virtual_taxstamp == 0 || $this->virtual_taxstamp == 3) {
         // azzero i bolli in caso di non addebito al cliente
         $taxstamp = 0;
     }
     //effettuo il calcolo degli importi delle scadenze
     $totpag = $totimpfat + $impbol + $totriport + $totivafat - $ritenuta + $taxstamp - $totivasplitpay;
     $ratpag = CalcolaScadenze($totpag, $this->giorno, $this->mese, $this->anno, $this->pagame['tipdec'], $this->pagame['giodec'], $this->pagame['numrat'], $this->pagame['tiprat'], $this->pagame['mesesc'], $this->pagame['giosuc']);
     if ($ratpag) {
         //allungo l'array fino alla 4^ scadenza
         $ratpag['import'] = array_pad($ratpag['import'], 4, '');
         $ratpag['giorno'] = array_pad($ratpag['giorno'], 4, '');
         $ratpag['mese'] = array_pad($ratpag['mese'], 4, '');
         $ratpag['anno'] = array_pad($ratpag['anno'], 4, '');
     } else {
         for ($i = 0; $i <= 3; $i++) {
             $ratpag['import'][$i] = "";
             $ratpag['giorno'][$i] = "";
             $ratpag['mese'][$i] = "";
             $ratpag['anno'][$i] = "";
         }
     }
     //stampo i totali
     $this->SetY(200);
     $this->SetFillColor(hexdec(substr($this->colore, 0, 2)), hexdec(substr($this->colore, 2, 2)), hexdec(substr($this->colore, 4, 2)));
     $this->SetFont('helvetica', '', 9);
     $this->Cell(36, 6, 'Tot. Corpo', 'LTR', 0, 'C', 1);
     $this->Cell(16, 6, '% Sconto', 'LTR', 0, 'C', 1);
     $this->Cell(24, 6, 'Spese Incasso', 'LTR', 0, 'C', 1);
     $this->Cell(26, 6, 'Trasporto', 'LTR', 0, 'C', 1);
     $this->Cell(36, 6, 'Tot.Imponibile', 'LTR', 0, 'C', 1);
     $this->Cell(26, 6, 'Tot. I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(22, 6, 'Bolli (tratte)', 'LTR', 1, 'C', 1);
     if ($totimpmer > 0) {
         $this->Cell(36, 6, gaz_format_number($totimpmer), 'LBR', 0, 'C');
     } else {
         $this->Cell(36, 6, '', 'LBR');
     }
     if ($this->tesdoc['sconto'] > 0) {
         $this->Cell(16, 6, gaz_format_number($this->tesdoc['sconto']), 'LBR', 0, 'C');
     } else {
         $this->Cell(16, 6, '', 'LBR');
     }
     if ($speseincasso > 0) {
         $this->Cell(24, 6, gaz_format_number($speseincasso), 'LBR', 0, 'C');
     } else {
         $this->Cell(24, 6, '', 'LBR');
     }
     $this->Cell(26, 6, '', 'LBR');
     if ($totimpfat > 0) {
         $this->Cell(36, 6, gaz_format_number($totimpfat), 'LBR', 0, 'C');
     } else {
         $this->Cell(36, 6, '', 'LBR');
     }
     if ($totivafat > 0) {
         $this->Cell(26, 6, gaz_format_number($totivafat), 'LBR', 0, 'C');
     } else {
         $this->Cell(26, 6, '', 'LBR');
     }
     if ($impbol > 0) {
         $this->Cell(22, 6, gaz_format_number($impbol), 'LBR', 1, 'C');
     } else {
         $this->Cell(22, 6, '', 'LBR');
     }
     $this->SetY(218);
     $this->Cell(130);
     $totale = $totimpfat + $totivafat + $impbol;
     if ($this->tesdoc['id_tes'] > 0) {
         if ($ritenuta > 0) {
             $this->SetFont('helvetica', 'B', 12);
             $this->Cell(56, 6, '€ ' . gaz_format_number($totale), 'LBR', 2, 'R');
             $this->SetFont('helvetica', '', 12);
             $this->Cell(56, 6, 'Totale ritenute: € ' . gaz_format_number($ritenuta), 'LR', 2, 'R');
             $this->SetFont('helvetica', '', 9);
             $this->Cell(56, 6, 'T O T A L E   A   P A G A R E', 'LTR', 2, 'C', 1);
             $this->SetFont('helvetica', 'B', 12);
             $this->Cell(56, 6, '€ ' . gaz_format_number($totale - $ritenuta), 'LBR', 1, 'R');
         } else {
             $this->SetFont('helvetica', 'B', 18);
             $this->Cell(56, 24, '€ ' . gaz_format_number($totale), 'LBR', 1, 'C');
         }
     } else {
         $this->Cell(56, 24, '', 'LBR', 1);
     }
     $this->SetY(224);
     $this->SetFont('helvetica', '', 9);
     if (!empty($this->banapp['descri']) and $this->pagame['tippag'] != 'D') {
         $this->Cell(62, 6, 'Banca d\'appoggio', 'LTR', 1, 'C', 1);
         $this->Cell(62, 6, $this->banapp['descri'], 'LR', 1);
         $this->Cell(62, 6, ' ABI ' . sprintf("%05d", $this->banapp['codabi']) . ' CAB ' . $this->banapp['codcab'], 'LRB', 1, 'C');
     } elseif (!empty($this->banacc['iban'])) {
         $this->Cell(62, 6, 'Banca d\'accredito', 'LTR', 1, 'C', 1);
         $this->Cell(62, 5, $this->banacc['ragso1'], 'LR', 1);
         $this->Cell(62, 6, 'IBAN ' . $this->banacc['iban'], 'LRB', 1, 'C');
     } else {
         $this->Cell(62, 6, '', 'LTR', 1, '', 1);
         $this->Cell(62, 6, '', 'LR', 1);
         $this->Cell(62, 6, '', 'LRB', 1);
     }
     $this->Cell(130, 6, 'Date di Scadenza e Importo Rate', 'LTR', 0, 'C', 1);
     $this->Cell(56, 6, 'Totale dei riporti', 'LTR', 1, 'C', 1);
     $this->Cell(32, 6, $ratpag['giorno']['0'] . '-' . $ratpag['mese']['0'] . '-' . $ratpag['anno']['0'], 'LR', 0, 'C');
     $this->Cell(33, 6, $ratpag['giorno']['1'] . '-' . $ratpag['mese']['1'] . '-' . $ratpag['anno']['1'], 'LR', 0, 'C');
     $this->Cell(32, 6, $ratpag['giorno']['2'] . '-' . $ratpag['mese']['2'] . '-' . $ratpag['anno']['2'], 'LR', 0, 'C');
     $this->Cell(33, 6, $ratpag['giorno']['3'] . '-' . $ratpag['mese']['3'] . '-' . $ratpag['anno']['3'], 'LR', 0, 'C');
     $this->Cell(56, 6, '', 'R', 1, 'C');
     if ($ratpag['import']['0'] != 0) {
         $this->Cell(32, 6, gaz_format_number($ratpag['import']['0']), 'LBR', 0, 'C');
     } else {
         $this->Cell(32, 6, '', 'LBR');
     }
     if ($ratpag['import']['1'] != 0) {
         $this->Cell(33, 6, gaz_format_number($ratpag['import']['1']), 'LBR', 0, 'C');
     } else {
         $this->Cell(33, 6, '', 'LBR');
     }
     if ($ratpag['import']['2'] != 0) {
         $this->Cell(32, 6, gaz_format_number($ratpag['import']['2']), 'LBR', 0, 'C');
     } else {
         $this->Cell(32, 6, '', 'LBR');
     }
     if ($ratpag['import']['3'] != 0) {
         $this->Cell(33, 6, gaz_format_number($ratpag['import']['3']), 'LBR', 0, 'C');
     } else {
         $this->Cell(33, 6, '', 'LBR');
     }
     if ($totriport != 0) {
         $this->Cell(56, 6, gaz_format_number($totriport), 'BR', 1, 'C');
     } else {
         $this->Cell(56, 6, '', 'BR', 1);
     }
 }
Exemple #8
0
    echo "</td></tr>\n";
}
//recupero tutti i movimenti contabili del conto insieme alle relative testate...
$result = mergeTable($gTables['rigmoc'],"*",$gTables['tesmov'],"*","id_tes","codcon = ".$conto['codice']." ORDER BY datreg asc");
$nummov = gaz_dbi_num_rows($result);
if ($nummov > 0) {
    echo "</table><br \><table class=\"Tlarge\"><tr><td colspan=\"6\">Questi sono i movimenti contabili relativi al fornitore ".$conto['ragso1']." ".$conto['ragso2'].":<td></tr>\n";
    echo "<tr><th class=\"FacetFieldCaptionTD\">Mov.</th><th class=\"FacetFieldCaptionTD\">Descrizione</th><th class=\"FacetFieldCaptionTD\">N.Doc.</th><th class=\"FacetFieldCaptionTD\">Data Doc.</th><th class=\"FacetFieldCaptionTD\">Importo</th><th class=\"FacetFieldCaptionTD\">D/A</th></tr>\n";
    while ($movimenti = gaz_dbi_fetch_array($result)) {
        $cl="FacetDataTD";
        if ($movimenti["id_tes"] == $testata["id_con"]) {
        $cl="FacetDataTDred";
        }
        echo "<tr><td class=\"$cl\">n.<a href=\"../contab/admin_movcon.php?Update&id_tes=".$movimenti["id_tes"]."\" title=\"Modifica il movimento\">".$movimenti["id_tes"]."</a> del ".gaz_format_date($movimenti["datreg"])." &nbsp;</td>\n";
        echo "<td class=\"$cl\">".$movimenti["descri"]." &nbsp;</td>";
        echo "<td align=\"center\" class=\"$cl\">".$movimenti["numdoc"]." &nbsp;</td>";
        if ( $movimenti['datdoc'] > 0 ){
           echo "<td align=\"center\" class=\"$cl\">".gaz_format_date($movimenti['datdoc'])." &nbsp;</td>";
        } else {
           echo "<td class=\"$cl\"></td>";
        }
        echo "<td align=\"right\" class=\"$cl\">".gaz_format_number($movimenti["import"])." &nbsp;</td>";
        echo "<td align=\"center\" class=\"$cl\">".$movimenti["darave"]." &nbsp;</td></tr>\n";
    }
} else {
    echo "<tr><td colspan=\"6\" class=\"FacetDataTDred\">Non ci sono movimenti contabili relativi al fornitore ".$conto['ragso1']." ".$conto['ragso2']." !<td></tr>\n";
}
echo "</table></form>";
?>
</body>
</html>
Exemple #9
0
if ($next_row > 0) {
        if ($form['stamp'] > 0) {
          $calc->payment_taxstamp($calc->total_imp+$calc->total_vat+$carry-$rit+$form['taxstamp'],$form['stamp'],$form['round_stamp']*$form['numrat']);
          $stamp=$calc->pay_taxstamp;  
        } else {
          $stamp = 0;
        }
        echo "<td align=\"right\">".gaz_format_number($totimp_body)."</td>
              <td align=\"right\">".gaz_format_number(($totimp_body-$totimpfat+$somma_spese),2, '.', '')."</td>
              <td align=\"right\">".gaz_format_number($calc->total_imp)."</td>
              <td align=\"right\">".gaz_format_number($calc->total_vat)."</td>
              <td align=\"right\">".gaz_format_number($stamp)."</td>
              <td align=\"right\" style=\"font-weight:bold;\">".gaz_format_number($calc->total_imp+$calc->total_vat+$stamp+$form['taxstamp'])."</td>\n";
		echo '<td colspan ="2" class="FacetFieldCaptionTD" align="center"><input name="ins" id="preventDuplicate" onClick="chkSubmit();" onClick="chkSubmit();" type="submit" value="'.strtoupper($script_transl[$toDo]).'!"></td></tr>';
        if ($rit > 0) {
            echo "<tr>";
            echo "<td colspan=\"7\" align=\"right\">".$script_transl['ritenuta']."</td>";
            echo "<td align=\"right\">".gaz_format_number($rit)."</td>";
            echo "</tr>\n";
            echo "<tr>";
            echo "<td colspan=\"7\" align=\"right\">".$script_transl['netpay']."</td>";
            echo "<td align=\"right\">".gaz_format_number($totimpfat+$totivafat+$stamp-$rit+$form['taxstamp'])."</td>";
            echo "</tr>\n";
        }
}
echo "</table>";
?>
</form>
</body>
</html>
Exemple #10
0
    $pdf->Cell(30,5,gaz_format_number($pdf->tax),1,0,'R',1);
    $pdf->Cell(30,5,gaz_format_number($pdf->taxable+$pdf->tax),1,1,'R',1);
    if (count($pdf->acc_castle)>0) {
        $pdf->Ln(6);
        $pdf->SetFont('helvetica','B',10);
        $pdf->Cell(35);
        $pdf->Cell(120,6,$pdf->script_transl['acc_castle_title'],1,2,'C',1);
        $pdf->Cell(20,5,'cod.',1,0,'C');
        $pdf->Cell(75,5,$pdf->script_transl['descri'],1,0,'C');
        $pdf->Cell(25,5,$pdf->script_transl['amount'],1,1,'R');
        $pdf->SetFont('helvetica','',8);
        foreach($pdf->acc_castle as $k=>$v) {
            $pdf->Cell(35);
            $pdf->Cell(20,5,$k,1,0,'C');
            $pdf->Cell(75,5,$v['descri'],1,0,'L');
            $pdf->Cell(25,5,gaz_format_number($v['value']),1,1,'R');
        }
    }
}
if ($_GET['sd']=='sta_def') {
    switch($pdf->typbook) { 	 
        case 2: 	 
            $azireg='upgve'.intval($_GET['vs']); 	 
        break; 	 
        case 4: 	 
            $azireg='upgco'.intval($_GET['vs']); 	 
        break; 	 
        case 6: 	 
            $azireg='upgac'.intval($_GET['vs']); 	 
        break; 	 
    }    
Exemple #11
0
$tot=0;
while ($r = gaz_dbi_fetch_array($rs_castel)) {
      if ($r['saldo'] != 0) {
         echo "<tr>";
         echo "<td class=\"FacetDataTD\">".$r['codcon']."&nbsp;</td>";
         echo "<td class=\"FacetDataTD\"><a title=\"Dettagli cliente\" href=\"report_client.php?auxil=".$r["ragso1"]."&search=Cerca\">".$r["ragso1"]."</a> &nbsp;</td>";
         echo "<td class=\"FacetDataTD\">".$r['telefo']." &nbsp;</td>";
         echo "<td class=\"FacetDataTD\" align=\"center\">".$r['nummov']." &nbsp;</td>";
         echo "<td class=\"FacetDataTD\" align=\"right\">".gaz_format_number($r['dare'])." &nbsp;</td>";
         echo "<td class=\"FacetDataTD\" align=\"right\">".gaz_format_number($r['avere'])." &nbsp;</td>";
         echo "<td class=\"FacetDataTD\" align=\"right\">".gaz_format_number($r['saldo'])." &nbsp;</td>";
         echo "<td class=\"FacetDataTD\" align=\"center\"><a class=\"btn btn-xs btn-default btn-pagamento\" title=\"Effettuato un pagamento da ".$r["ragso1"]."\"  href=\"salcon_credit.php?codice=".$r['codcon']."\"><i class=\"glyphicon glyphicon-euro\"></i></a></td>";
         echo "<td class=\"FacetDataTD\" align=\"center\"><a class=\"btn btn-xs btn-default\" title=\"Stampa l'Estratto Conto di {$r['ragso1']}\" href=\"stampa_estcon.php?codice=".$r['codcon']."&annini=".$annini."&annfin=".$annfin."\"><i class=\"glyphicon glyphicon-print\"></i></a></td>";
    // Colonna "Mail"
    echo "<td class=\"FacetDataTD\" align=\"center\">";
    if (!empty($r["e_mail"])) {
        echo '<a class="btn btn-xs btn-default" onclick="confirMail(this);return false;" id="doc'.$r["codcon"].'" url="stampa_estcon.php?codice='.$r["codcon"].'&annini='.$annini.'&annfin='.$annfin.'&dest=E" href="#" title="mailto: '.$r["e_mail"].'"
        mail="'.$r["e_mail"].'" namedoc="Estratto conto '.$annini.'-'.$annfin.'"><i class="glyphicon glyphicon-envelope"></i></a>';
    } else {
		echo '<a title="Non hai memorizzato l\'email per questo cliente, inseriscila ora" href="admin_client.php?codice='.substr($r["codice"],3).'&Update"><i class="glyphicon glyphicon-edit"></i></a>';
	} 
    echo "</td>";
         echo "</tr>";
         $tot += $r['saldo'];
      }
}
echo "<tr><td colspan=\"6\"></td><td class='FacetDataTD' style='border: 2px solid #666; text-align: center;'>".gaz_format_number($tot)."</td><td></td><td></td></tr>\n";
?>
</table>
</body>
</html>
Exemple #12
0
$pdf->Cell(150,8,'TOTALE RISCOSSO',1,0,'R');
$pdf->Cell(40,8,gaz_format_number($importo),1,1,'R',1);

if ($pdf->GetY() <= 135)
    {
    $pdf->SetY(140);
    $pdf->SetFont('helvetica','',8);
    $pdf->MultiCell(190,4,'Copia per il cliente',0,'C',0);
    $pdf->Ln(8);
    $pdf->Line(0,145,210,145);
    $pdf->Header();
    }
 else   $pdf->AddPage();
$rs_rig = gaz_dbi_dyn_query("*", $gTables['rigbro'], "id_tes like '$testat'","id_tes desc");
$importo = 0;
while ($rigo = gaz_dbi_fetch_array($rs_rig)) {
    if ($pdf->GetY() <= 280) {
          $pdf->Cell(150,8,$rigo['descri'],1,0,'L');
          $pdf->Cell(40,8,gaz_format_number($rigo['prelis']),1,1,'R');
          $importo += $rigo['prelis'];
    } else {
       $pdf->SetY(285);
       $pdf->Cell(190,12,'>>> --- SEGUE SU PAGINA SUCCESSIVA --- >>>',1,1,'C');
       $pdf->AddPage();
    }
}
$piede='ad uso amministrativo';
$pdf->Cell(150,8,'TOTALE RISCOSSO',1,0,'R');
$pdf->Cell(40,8,gaz_format_number($importo),1,1,'R',1);
$pdf->Output();
?>
Exemple #13
0
      }
      echo "<tr class=\"FacetDataTD\">
            <td align=\"center\">".gaz_format_date($v['tes']['datemi'])."</td>
            <td align=\"center\">".$v['tes']['numdoc']."</td>
            <td align=\"center\">".$v['tes']['seziva']."</td>
            <td>".$v['tes']['ragsoc'].$v['tes']['citta']."</td>
            <td align=\"right\">".gaz_format_number($v['tot'])."</td>
            </tr>\n";
   }
   echo "<tr class=\"FacetFieldCaptionTD\">\n";
   echo '<td colspan="4" align="right"><input type="submit" name="submit" value="';
   echo $script_transl['submit'];
   echo '">';
   echo "</td>\n";
   echo '<td align="right" style="font-weight=bolt;">';
   echo gaz_format_number($rs['tot']);
   echo "\t </td>\n";
   echo "</tr>\n";
} else {
   echo "\t<tr>\n";
   echo '<td colspan="3" align="center" class="FacetDataTDred">';
   echo $script_transl['message'];
   echo "\t </td>\n";
   echo '<td colspan="2" align="center" class="FacetDataTDred">';
   echo "<input type=\"submit\" name=\"return\" value=\"".$script_transl['return']."\" />\n";
   echo "\t </td>\n";
   echo "\t </tr>\n";
}
?>
</form>
</body>
Exemple #14
0
function printTransact($transact,$error)
{
          global $script_transl,$admin_aziend;
          $nrec=0;
          echo "<td align=\"center\" class=\"FacetDataTD\" >N.Rec.</td>";
          echo "<td align=\"center\" class=\"FacetDataTD\" >N.Mov.</td>";
          echo "<td align=\"center\" class=\"FacetDataTD\" >".$script_transl['sourcedoc']."</td>";
          echo "<td class=\"FacetDataTD\" >".$script_transl['soggetto']."</td>";
          echo "<td align=\"center\" class=\"FacetDataTD\" >".$script_transl['pariva']."</td>";
          echo "<td align=\"center\" class=\"FacetDataTD\" >".$script_transl['codfis']."</td>";
          echo "<td align=\"center\" class=\"FacetDataTD\" >".$script_transl['quadro']."</td>";
          echo "<td align=\"right\" class=\"FacetDataTD\" >".$script_transl['amount']."</td>";
          echo "<td align=\"right\" class=\"FacetDataTD\" >".$script_transl['tax']."</td>";
          echo "</tr>\n";
          foreach ($transact as $key=>$value ) {
               $nrec++;
               $totale = gaz_format_number($value['operazioni_imponibili']+$value['operazioni_nonimp']+$value['operazioni_esente']);
               $class = ' ';
               switch ($value['quadro']) {
                      case 'FE':
                          $class = 'style="color:#000000; background-color: #FFDDDD;"';
                      break;
                      case 'NE':
                          $class = 'style="color:#000000; background-color: #DDFFDD;"';
                      break;
                      case 'FR':
                          $class = 'style="color:#000000; background-color: #AFC8D8"';
                      break;
                      case 'NR':
                          $class = 'style="color:#000000; background-color: #D3CFA8;"';
                      break;
                      case 'DF':
                          $class = 'style="color:#000000; background-color: #DDDDFF;"';
                      break;
               }
               if (isset($error[$key])){
                  $class = ' class="FacetDataTDred" ';
               }
               echo "<tr>";
               echo "<td align=\"right\" $class>$nrec</a></td>";
               echo "<td align=\"center\" $class><a href=\"../contab/admin_movcon.php?id_tes=".$value['id_tes']."&Update\">n.".$value['id_tes']." - ".gaz_format_date($value['datreg'])."</a></td>";
               echo "<td align=\"center\" $class> sez.".$value['seziva']." n.".$value['numdoc'].' del '.gaz_format_date($value['datdoc'])."</td>";
               echo "<td $class>".$value['ragso1'].' '.$value['ragso2']."</td>";
               if ($value['riepil']== 1 ){ // è un riepilogativo quindi il tracciato dovrà prevedere l'apposito flag
                   echo "<td align=\"center\" colspan=\"2\" style=\"color:#000000; background-color: #DDADAF;\">".$script_transl['riepil']."</td>";
               } else {
                   echo "<td align=\"center\" $class>".$value['iso']." ".$value['pariva']."</td>";
                   echo "<td align=\"center\" $class>".$value['codfis']."</td>";
               }
               echo "<td align=\"center\" $class>".$value['quadro']."</td>";
               echo "<td align=\"right\" $class>$totale</td>";
               echo "<td align=\"right\" $class>".gaz_format_number($value['imposte_addebitate'])."</td>";
               echo "</tr>\n";
               if (isset($error[$key])) {
                  foreach ($error[$key] as $val_err ) {
                          echo "<tr>";
                          echo "<td class=\"FacetDataTDred\" colspan=\"10\">".$val_err;
                          if (substr($value['clfoco'],0,3) == $admin_aziend['mascli']) {
                             echo ", <a href='../vendit/admin_client";
                          } else {
                             echo ", <a href='../acquis/admin_fornit";
                          }
                          echo ".php?codice=".substr($value['clfoco'],3,6)."&Update' target='_NEW'>". $script_transl['errors'][0]."</a><br /></td>
                               </tr>\n";
                  }
               }
          }
}
Exemple #15
0
                           $pdf->Cell(8,4,$key.' - ','L',0,'R');
                           $pdf->Cell(72,4,$descricon.' non riclassificato','R');
                           $pdf->Cell(10,4,$admin_aziend['curr_name'],'LR',0,'C');
                           $pdf->Cell(31,4,$stampaval,'LR',1,'R');
                        }
                }
                if ($totrom > 0) $stampaval = gaz_format_number($totrom); else $stampaval = "(".gaz_format_number(-$totrom).")";
                $pdf->Cell(15,4,'','LR');
                $pdf->Cell(50,4,'','B');
                $pdf->Cell(80,4,"Totale ".$nromani[intval($keyrom)],'BTR',0,'R');
                $pdf->Cell(10,4,$admin_aziend['curr_name'],1,0,'C');
                $pdf->Cell(31,4,$stampaval,1,1,'R');
                $totrom=0.00;
     }
     if($totlet > 0) $stampaval = gaz_format_number($totlet); else $stampaval = "(".gaz_format_number(-$totlet).")";
     $pdf->SetFont('helvetica','B',8);
     $pdf->Cell(145,4,"Totale ".$keylet,'LB',0,'R');
     $pdf->Cell(10,4,$admin_aziend['curr_name'],1,0,'C');
     $pdf->Cell(31,4,$stampaval,1,1,'R');
     $pdf->SetFont('helvetica','',8);
     $totlet=0.00;
}
$pdf->SetFont('helvetica','B',12);
$pdf->SetTextColor(255,150,50);
$pdf->Cell(155,6,"UTILE (PERDITA) D'ESERCIZIO ",1,0,'R');
if($totale > 0) $stampaval = gaz_format_number($totale); else $stampaval = "(".gaz_format_number(-$totale).")";
$pdf->Cell(31,6,$stampaval,1,1,'R');
$totale=0.00;
$pdf->SetTextColor(0,0,0);
$pdf->Output();
?>
Exemple #16
0
 function pageFooter()
 {
     $y = $this->GetY();
     $this->Rect(10, $y, 186, 188 - $y);
     //questa marca le linee dx e sx del documento
     //stampo il castelletto
     $this->SetY(208);
     $this->Cell(62, 6, 'Pagamento', 'LTR', 0, 'C', 1);
     $this->Cell(68, 6, 'Castelletto    I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(56, 6, 'T O T A L E    F A T T U R A', 'LTR', 1, 'C', 1);
     $this->SetFont('helvetica', '', 8);
     $this->Cell(62, 6, $this->pagame['descri'], 'LR', 0, 'C');
     $this->Cell(18, 4, 'Imponibile', 'LR', 0, 'C', 1);
     $this->Cell(32, 4, 'Aliquota', 'LR', 0, 'C', 1);
     $this->Cell(18, 4, 'Imposta', 'LR', 1, 'C', 1);
     $this->docVars->setTotal();
     foreach ($this->docVars->cast as $key => $value) {
         if ($this->tesdoc['id_tes'] > 0) {
             $this->Cell(62);
             $this->Cell(18, 4, gaz_format_number($value['impcast']) . ' ', 'R', 0, 'R');
             $this->Cell(32, 4, $value['descriz'], 0, 0, 'C', 0, '', 1);
             $this->Cell(18, 4, gaz_format_number($value['ivacast']) . ' ', 'L', 1, 'R');
         } else {
             $this->Cell(62);
             $this->Cell(68, 4, '', 'LR', 1);
         }
     }
     $totimpmer = $this->docVars->totimpmer;
     $speseincasso = $this->docVars->speseincasso;
     $totimpfat = $this->docVars->totimpfat;
     $totivafat = $this->docVars->totivafat;
     $totivasplitpay = $this->docVars->totivasplitpay;
     $vettor = $this->docVars->vettor;
     $impbol = $this->docVars->impbol;
     $totriport = $this->docVars->totriport;
     $ritenuta = $this->docVars->tot_ritenute;
     $taxstamp = $this->docVars->taxstamp;
     if ($this->virtual_taxstamp == 0 || $this->virtual_taxstamp == 3) {
         // azzero i bolli in caso di non addebito al cliente
         $taxstamp = 0;
     }
     //effettuo il calcolo degli importi delle scadenze
     $totpag = $totimpfat + $impbol + $totriport + $totivafat - $ritenuta + $taxstamp - $totivasplitpay;
     $ratpag = CalcolaScadenze($totpag, $this->giorno, $this->mese, $this->anno, $this->pagame['tipdec'], $this->pagame['giodec'], $this->pagame['numrat'], $this->pagame['tiprat'], $this->pagame['mesesc'], $this->pagame['giosuc']);
     if ($ratpag) {
         //allungo l'array fino alla 4^ scadenza
         $ratpag['import'] = array_pad($ratpag['import'], 4, '');
         $ratpag['giorno'] = array_pad($ratpag['giorno'], 4, '');
         $ratpag['mese'] = array_pad($ratpag['mese'], 4, '');
         $ratpag['anno'] = array_pad($ratpag['anno'], 4, '');
     } else {
         for ($i = 0; $i <= 3; $i++) {
             $ratpag['import'][$i] = "";
             $ratpag['giorno'][$i] = "";
             $ratpag['mese'][$i] = "";
             $ratpag['anno'][$i] = "";
         }
     }
     //stampo i totali
     $this->SetY(188);
     $this->SetFont('helvetica', '', 9);
     $this->Cell(82, 5, 'Agente', 'LTR', 0, 'C', 1);
     $this->Cell(26, 5, 'Peso netto', 'LTR', 0, 'C', 1);
     $this->Cell(26, 5, 'Peso lordo', 'LTR', 0, 'C', 1);
     $this->Cell(26, 5, 'N.colli', 'LTR', 0, 'C', 1);
     $this->Cell(26, 5, 'Volume', 'LTR', 1, 'C', 1);
     $this->Cell(82, 5, $this->agente, 'LR');
     if ($this->tesdoc['net_weight'] > 0) {
         $this->Cell(26, 5, gaz_format_number($this->tesdoc['net_weight']), 'LR', 0, 'C');
     } else {
         $this->Cell(26, 5, '', 'LR');
     }
     if ($this->tesdoc['gross_weight'] > 0) {
         $this->Cell(26, 5, gaz_format_number($this->tesdoc['gross_weight']), 'LR', 0, 'C');
     } else {
         $this->Cell(26, 5, '', 'LR');
     }
     if ($this->tesdoc['units'] > 0) {
         $this->Cell(26, 5, $this->tesdoc['units'], 'LR', 0, 'C');
     } else {
         $this->Cell(26, 5, '', 'LR');
     }
     if ($this->tesdoc['volume'] > 0) {
         $this->Cell(26, 5, gaz_format_number($this->tesdoc['volume']), 'LR', 1, 'C');
     } else {
         $this->Cell(26, 5, '', 'LR', 1);
     }
     $this->Cell(36, 5, 'Tot. Corpo', 'LTR', 0, 'C', 1);
     $this->Cell(16, 5, '% Sconto', 'LTR', 0, 'C', 1);
     $this->Cell(24, 5, 'Spese Incasso', 'LTR', 0, 'C', 1);
     $this->Cell(26, 5, 'Trasporto', 'LTR', 0, 'C', 1);
     $this->Cell(36, 5, 'Tot.Imponibile', 'LTR', 0, 'C', 1);
     $this->Cell(26, 5, 'Tot. I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(22, 5, 'Bolli(tratte)', 'LTR', 1, 'C', 1);
     if ($totimpmer > 0) {
         $this->Cell(36, 5, gaz_format_number($totimpmer), 'LBR', 0, 'C');
     } else {
         $this->Cell(36, 5, '', 'LBR');
     }
     if ($this->tesdoc['sconto'] > 0) {
         $this->Cell(16, 5, gaz_format_number($this->tesdoc['sconto']), 'LBR', 0, 'C');
     } else {
         $this->Cell(16, 5, '', 'LBR');
     }
     if ($speseincasso > 0) {
         $this->Cell(24, 5, gaz_format_number($speseincasso), 'LBR', 0, 'C');
     } else {
         $this->Cell(24, 5, '', 'LBR');
     }
     if ($this->trasporto > 0) {
         $this->Cell(26, 5, gaz_format_number($this->trasporto), 'LBR', 0, 'C');
     } else {
         $this->Cell(26, 5, '', 'LBR');
     }
     if ($totimpfat > 0) {
         $this->Cell(36, 5, gaz_format_number($totimpfat), 'LBR', 0, 'C');
     } else {
         $this->Cell(36, 5, '', 'LBR');
     }
     if ($totivafat > 0) {
         $this->Cell(26, 5, gaz_format_number($totivafat), 'LBR', 0, 'C');
     } else {
         $this->Cell(26, 5, '', 'LBR');
     }
     if ($impbol > 0) {
         $this->Cell(22, 5, gaz_format_number($impbol), 'LBR', 0, 'C');
     } else {
         $this->Cell(22, 5, '', 'LBR');
     }
     $this->SetY(214);
     $this->Cell(130);
     $totale = $totimpfat + $totivafat + $impbol + $taxstamp;
     if ($this->tesdoc['id_tes'] > 0) {
         if ($ritenuta > 0) {
             $this->SetFont('helvetica', 'B', 11);
             $this->Cell(56, 6, '€ ' . gaz_format_number($totale), 'LBR', 2, 'R');
             $this->SetFont('helvetica', '', 11);
             $this->Cell(56, 4, 'Totale ritenute: € ' . gaz_format_number($ritenuta), 'LR', 2, 'R');
             $this->Cell(56, 6, 'Totale a pagare: € ' . gaz_format_number($totale - $ritenuta - $totivasplitpay), 'LBR', 1, 'R');
         } else {
             $this->SetFont('helvetica', 'B', 18);
             $this->Cell(56, 16, '€ ' . gaz_format_number($totale - $totivasplitpay), 'LBR', 1, 'C');
         }
     } else {
         $this->Cell(56, 24, '', 'LBR', 1);
     }
     $this->SetY(220);
     $this->SetFont('helvetica', '', 9);
     if (!empty($this->banapp['descri']) and $this->pagame['tippag'] != 'D') {
         $this->Cell(62, 5, 'Banca d\'appoggio', 'LTR', 1, 'C', 1);
         $this->Cell(62, 5, $this->banapp['descri'], 'LR', 1);
         $this->Cell(62, 5, ' ABI ' . sprintf("%05d", $this->banapp['codabi']) . ' CAB ' . $this->banapp['codcab'], 'LRB', 0, 'C');
     } elseif (!empty($this->banacc['iban'])) {
         $this->Cell(62, 5, 'Banca d\'accredito', 'LTR', 1, 'C', 1);
         $this->Cell(62, 5, $this->banacc['ragso1'], 'LR', 1);
         $this->Cell(62, 5, 'IBAN ' . $this->banacc['iban'], 'LRB');
     } else {
         $this->Cell(62, 5, '', 'LTR', 1, '', 1);
         $this->Cell(62, 5, '', 'LR', 1);
         $this->Cell(62, 5, '', 'LRB', 0);
     }
     $this->Cell(124, 5, 'Date di Scadenza e Importo Rate', 'LTR', 1, 'C', 1);
     $this->Cell(62, 5, 'Spedizione', 'LTR', 0, 'C', 1);
     if ($this->pagame['tippag'] != 'D') {
         $this->Cell(31, 5, $ratpag['giorno']['0'] . '-' . $ratpag['mese']['0'] . '-' . $ratpag['anno']['0'], 'LR', 0, 'C');
         $this->Cell(31, 5, $ratpag['giorno']['1'] . '-' . $ratpag['mese']['1'] . '-' . $ratpag['anno']['1'], 'LR', 0, 'C');
         $this->Cell(31, 5, $ratpag['giorno']['2'] . '-' . $ratpag['mese']['2'] . '-' . $ratpag['anno']['2'], 'LR', 0, 'C');
         $this->Cell(31, 5, $ratpag['giorno']['3'] . '-' . $ratpag['mese']['3'] . '-' . $ratpag['anno']['3'], 'LR', 1, 'C');
         $this->Cell(62, 5, $this->tesdoc['spediz'], 'LRB', 0, 'C');
         if ($ratpag['import']['0'] != 0) {
             $this->Cell(31, 5, gaz_format_number($ratpag['import']['0']), 'LBR', 0, 'C');
         } else {
             $this->Cell(31, 5, '', 'LBR');
         }
         if ($ratpag['import']['1'] != 0) {
             $this->Cell(31, 5, gaz_format_number($ratpag['import']['1']), 'LBR', 0, 'C');
         } else {
             $this->Cell(31, 5, '', 'LBR');
         }
         if ($ratpag['import']['2'] != 0) {
             $this->Cell(31, 5, gaz_format_number($ratpag['import']['2']), 'LBR', 0, 'C');
         } else {
             $this->Cell(31, 5, '', 'LBR');
         }
         if ($ratpag['import']['3'] != 0) {
             $this->Cell(31, 5, gaz_format_number($ratpag['import']['3']), 'LBR', 1, 'C');
         } else {
             $this->Cell(31, 5, '', 'LBR', 1);
         }
     } else {
         $this->Cell(124, 5, '', 'LR', 1);
         $this->Cell(62, 5, $this->tesdoc['spediz'], 'LRB', 0, 'C');
         $this->Cell(124, 5, '', 'LBR', 1);
     }
     if ($this->pagame['incaut'] == 'S' || $this->pagame['tippag'] == 'C') {
         $this->docVars->open_drawer();
     }
     if (empty($this->docVars->vettor['ragione_sociale'])) {
         $signature = ' Firma del conducente :';
     } else {
         $signature = ' Firma/vettore:';
     }
     $this->Cell(35, 5, $signature, 'LT', 0, 'L', 1);
     $this->Cell(55, 5);
     $this->Cell(40, 5, 'Inizio trasporto', 'LTR', 0, 'C', 1);
     $this->Cell(56, 5, 'Firma destinatario', 'LTR', 1, 'C', 1);
     $this->Cell(90, 5, '', 'L');
     if ($this->tesdoc['id_tes'] > 0) {
         $this->Cell(40, 5, $this->day . '.' . $this->month . '.' . $this->year . ' ore ' . $this->ora . ':' . $this->min, 'LBR', 0, 'C');
     } else {
         $this->Cell(40, 5, 'data:              ore:    ', 'LBR', 0, 'L');
     }
     $this->Cell(56, 5, '', 'LR', 1);
     $this->Cell(130, 5, $this->docVars->vettor['ragione_sociale'] . ' ' . $this->docVars->vettor['indirizzo'] . ' ' . $this->docVars->vettor['citta'] . ' ' . $this->docVars->vettor['provincia'], 'LBR', 0, 'L', 0, '', 1);
     $this->Cell(56, 5, '', 'LBR', 1);
     if (!empty($this->docVars->vettor['ragione_sociale'])) {
         $this->StartPageGroup();
         $this->appendix = true;
         $this->addPage();
         $this->SchedaTrasporto();
         $this->appendix = false;
     }
 }
Exemple #17
0
        $ctr_mv='';
        echo "<tr>";
        $linkHeaders=new linkHeaders($script_transl['header']);
        $linkHeaders->output();
        echo "</tr>";
        $sum=0.00;
        while (list($key, $mv) = each($m)) {
            $datedoc = substr($mv['datdoc'],8,2).'-'.substr($mv['datdoc'],5,2).'-'.substr($mv['datdoc'],0,4);
            $datereg = substr($mv['datreg'],8,2).'-'.substr($mv['datreg'],5,2).'-'.substr($mv['datreg'],0,4);
            $movQuanti = $mv['quanti']*$mv['operat'];
            $sum += $movQuanti;
            echo "<tr><td class=\"FacetDataTD\">".$datereg." &nbsp;</td>";
            echo "<td  align=\"center\" class=\"FacetDataTD\">".$mv['caumag'].'-'.substr($mv['descri'],0,20)." &nbsp</td>";
            echo "<td class=\"FacetDataTD\">".substr($mv['desdoc'].' del '.$datedoc.' - '.$mv['ragsoc'],0,85)." &nbsp;</td>";
            echo "<td align=\"right\" class=\"FacetDataTD\">".number_format($mv['prezzo'],$admin_aziend['decimal_price'],',','.')." &nbsp;</td>";
            echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_number(CalcolaImportoRigo($mv['quanti'],$mv['prezzo'],array($mv['scochi'],$mv['scorig'])))." &nbsp;</td>";
            echo "<td align=\"right\" class=\"FacetDataTD\">".$mv['unimis']." &nbsp;</td>\n";
            echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_quantity($movQuanti,1,$admin_aziend['decimal_quantity'])." &nbsp;</td>\n";
            echo "</tr>\n";
            $ctr_mv = $mv['artico'];
         }
         echo "\t<tr class=\"FacetFieldCaptionTD\">\n";
         echo '<td colspan="7" align="right"><input type="submit" name="print" value="';
         echo $script_transl['print'];
         echo '">';
         echo "\t </td>\n";
         echo "\t </tr>\n";
  }
  echo "</table></form>";
}
?>
      $row_provvig = round($row_importo*$row['provvigione']/100,3);
      $tot_prov += $row_provvig;
      $aRiportare['top'][1]['nam'] = gaz_format_number($tot_prov);
      $aRiportare['bot'][1]['nam'] = gaz_format_number($tot_prov);
      if ($ctrlDoc != $row['id_tes']) {
         if ($row['tipdoc'] == 'FAD') {
             $desdoc =  'da '.$strScript['admin_docven.php'][0][$row['tipdoc']].' n.'.$row['numdoc'].' del '.$row['datemi'].' -> Fattura n.'.$row['numfat'].'/'.$row['seziva'].' del '.$row['datfat'].' a '.$row['ragso1'].' '.$row['ragso2'];
         } else {
             $desdoc =  'da '.$strScript['admin_docven.php'][0][$row['tipdoc']].' n.'.$row['numfat'].'/'.$row['seziva'].' del '.$row['datfat'].' a '.$row['ragso1'].' '.$row['ragso2'];
         }
         $pdf -> Cell(187,4,$desdoc,1,1);
      }
      $pdf -> Cell(25,4,$row['codart'],1);
      $pdf -> Cell(74,4,$row['descri'],1);
      $pdf -> Cell(5,4,$row['unimis'],1);
      $pdf -> Cell(14,4,gaz_format_number($row['quanti']),1,0,'R');
      $pdf -> Cell(14,4,number_format($row['prelis'],$admin_aziend['decimal_price'],',','.'),1,0,'R');
      $pdf -> Cell(8,4,$row['sconto'],1,0,'R');
      $pdf -> Cell(20,4,gaz_format_number($row_importo),1,0,'R');
      $pdf -> Cell(11,4,gaz_format_number($row['provvigione']),1,0,'R');
      $pdf -> Cell(16,4,gaz_format_number($row_provvig),1,1,'R');
      $ctrlAgente = $row['id_agente'];
      $ctrlDoc = $row['id_tes'];
}
$pdf->SetFont('helvetica','B',8);
$pdf->Cell($aRiportare['top'][0]['lun'],4,'Totale provvigioni: ',1,0,'R');
$pdf->Cell($aRiportare['top'][1]['lun'],4,$aRiportare['top'][1]['nam'],1,0,'R');
$pdf->SetFont('helvetica','',8);
$pdf->setRiporti('');
$pdf->Output();
?>
Exemple #19
0
 function pageFooter()
 {
     $y = $this->GetY();
     $this->Rect(10, $y, 186, 212 - $y);
     //questa marca le linee dx e sx del documento
     //stampo il castelletto
     $this->SetY(212);
     $this->SetFillColor(hexdec(substr($this->colore, 0, 2)), hexdec(substr($this->colore, 2, 2)), hexdec(substr($this->colore, 4, 2)));
     $this->Cell(62, 6, 'Pagamento', 1, 0, 'C', 1);
     $this->Cell(68, 6, 'Castelletto I.V.A.', 1, 0, 'C', 1);
     $this->Cell(56, 6, 'T O T A L E', 1, 1, 'C', 1);
     $this->SetFont('helvetica', '', 8);
     $this->Cell(62, 6, $this->pagame['descri'], 1, 0, 'C');
     $this->Cell(25, 4, 'Imponibile', 1, 0, 'C', 1);
     $this->Cell(18, 4, 'Aliquota', 1, 0, 'C', 1);
     $this->Cell(25, 4, 'Imposta', 1, 1, 'C', 1);
     $this->docVars->setTotal($this->tesdoc['traspo']);
     foreach ($this->docVars->cast as $key => $value) {
         $this->Cell(62);
         $this->Cell(18, 4, gaz_format_number($value['impcast']) . ' ', 0, 0, 'R');
         $this->Cell(32, 4, $value['descriz'], 0, 0, 'C');
         $this->Cell(18, 4, gaz_format_number($value['ivacast']) . ' ', 0, 1, 'R');
     }
     $totimpmer = $this->docVars->totimpmer;
     $speseincasso = $this->docVars->speseincasso;
     $totimpfat = $this->docVars->totimpfat;
     $totivafat = $this->docVars->totivafat;
     $vettor = $this->docVars->vettor;
     $impbol = $this->docVars->impbol;
     if ($impbol > 0) {
         $this->Cell(62);
         $this->Cell(18, 4, gaz_format_number($impbol) . ' ', 0, 0, 'R');
         $this->Cell(32, 4, $this->docVars->iva_bollo['descri'], 'LR', 0, 'C');
         $this->Cell(18, 4, gaz_format_number($this->docVars->iva_bollo['aliquo'] * $impbol) . ' ', 0, 1, 'R');
     }
     //stampo i totali
     $this->SetY(200);
     $this->SetFont('helvetica', '', 9);
     $this->Cell(36, 6, 'Tot. Corpo', 1, 0, 'C', 1);
     $this->Cell(16, 6, '% Sconto', 1, 0, 'C', 1);
     $this->Cell(24, 6, 'Spese Incasso', 1, 0, 'C', 1);
     $this->Cell(26, 6, 'Trasporto', 1, 0, 'C', 1);
     $this->Cell(36, 6, 'Tot.Imponibile', 1, 0, 'C', 1);
     $this->Cell(26, 6, 'Tot. I.V.A.', 1, 0, 'C', 1);
     $this->Cell(22, 6, 'Peso in kg', 1, 1, 'C', 1);
     $this->Cell(36, 6, gaz_format_number($totimpmer), 1, 0, 'C');
     $this->Cell(16, 6, gaz_format_number($this->tesdoc['sconto']), 1, 0, 'C');
     $this->Cell(24, 6, gaz_format_number($speseincasso), 1, 0, 'C');
     $this->Cell(26, 6, gaz_format_number($this->tesdoc['traspo']), 1, 0, 'C');
     $this->Cell(36, 6, gaz_format_number($totimpfat), 1, 0, 'C');
     $this->Cell(26, 6, gaz_format_number($totivafat), 1, 0, 'C');
     $this->Cell(22, 6, '', 1, 0, 'C');
     $this->SetY(218);
     $this->Cell(130);
     $this->SetFont('helvetica', 'B', 18);
     $this->Cell(56, 24, '€ ' . gaz_format_number($totimpfat + $totivafat + $impbol), 1, 1, 'C');
     $this->SetY(224);
     $this->SetFont('helvetica', '', 9);
     $this->Cell(62, 6, 'Spedizione', 1, 1, 'C', 1);
     $this->Cell(62, 6, $this->tesdoc['spediz'], 1, 1, 'C');
     $this->Cell(62, 6, 'Vettore', 1, 1, 'C', 1);
     $this->Cell(186, 6, $vettor['descri'], 1, 1, 'L');
 }
Exemple #20
0
                echo "<tr><td class=\"FacetDataTD\" rowspan=\"$r_span\">".gaz_format_date($mv['datreg'])." id:".$mv['id_mov']."</td>";
                echo "<td align=\"center\" class=\"FacetDataTD\" rowspan=\"$r_span\">".$mv['caumag'].'-'.substr($mv['descri'],0,20)."</td>";
                echo "<td class=\"FacetDataTD\" rowspan=\"$r_span\">".substr($mv['desdoc'].' del '.gaz_format_date($mv['datdoc']).' - '.$mv['ragso1'].' '.$mv['ragso2'],0,85)."</td>";
                echo "<td align=\"right\" class=\"FacetDataTD\" rowspan=\"$r_span\">".number_format($mv['prezzo'],$admin_aziend['decimal_price'],',','.')."</td>";
                echo "<td align=\"right\" class=\"FacetDataTD\" rowspan=\"$r_span\">".$mv['unimis']."</td>\n";
              } else {
                echo "<tr>";
              }
              echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_quantity($mval['q']*$mv['operat'],1,$admin_aziend['decimal_quantity'])."</td>";
              if ($mv['operat']==1) {
                echo "<td align=\"right\" class=\"FacetDataTD\">".number_format($mval['v'],$admin_aziend['decimal_price'],',','')."</td><td></td>";
              } else {
                echo "<td></td><td align=\"right\" class=\"FacetDataTD\">".number_format($mval['v'],$admin_aziend['decimal_price'],',','')."</td>";
              }
              echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_quantity($mval['q_g'],1,$admin_aziend['decimal_quantity'])."</td>";
              echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($mval['v_g'])."</td>";
              echo "</tr>";
              $ctrl_id = $mv['id_mov'];
            }
            $ctr_mv = $mv['artico'];
         }
         echo "\t<tr class=\"FacetFieldCaptionTD\">\n";
         echo '<td colspan="10" align="right"><input type="submit" name="print" value="'.$script_transl['print'].'">';
         echo "\t </td>\n";
         echo "\t </tr>\n";
  }
  echo "</table></form>";
}
?>
</body>
</html>
Exemple #21
0
echo '<div align="center" class="FacetFormHeaderFont">Controllo sbilancio movimenti contabili</div>';
?>
<table class="Tlarge">
<form method="POST">
<?php
$where = "codcon not like '%000000' group by ".$gTables['rigmoc'].".id_tes";
$result = gaz_dbi_dyn_query ($gTables['tesmov'].".id_tes, ".$gTables['rigmoc'].".codcon as accnum,descri,sum(import*(darave='D')) as dare,sum(import*(darave='A')) as avere", $gTables['rigmoc']." left join ".$gTables['tesmov']." on ".$gTables['rigmoc'].".id_tes = ".$gTables['tesmov'].".id_tes ", $where, 1);
$message = '<tr><th class="FacetFieldCaptionTD">Numero ID</th><th class="FacetFieldCaptionTD">Descrizione </th><th class="FacetFieldCaptionTD">DARE </th><th class="FacetFieldCaptionTD">AVERE </th><th class="FacetFieldCaptionTD">SBILANCIO</th></tr>
         <tr><td class="FacetDataTDred" align="left" colspan="5">I seguenti movimenti contabili presentano degli errori e quindi sono da modificare cliccando sul numero di ID :</td></tr>';
while ($a_row = gaz_dbi_fetch_array($result)) {
      if ($a_row['dare'] != $a_row['avere']){
       if ($message != "") {
            echo $message;
            $message = "";
       }                         
         echo "<tr><td class=\"FacetDataTD\" align=\"center\"><a href=\"../contab/admin_movcon.php?Update&id_tes=".$a_row["id_tes"]."\" title=\"Modifica il movimento\" >".$a_row["id_tes"]."</a></td><td class=\"FacetDataTD\">".$a_row["descri"]."</td><td class=\"FacetDataTD\" align=\"right\">".$a_row["dare"]."</td><td class=\"FacetDataTD\" align=\"right\">".$a_row["avere"]."</td><td class=\"FacetDataTDred\" align=\"right\">".gaz_format_number($a_row["dare"]-$a_row["avere"])."</td></tr>\n";
      }
}

$where = "codcon < 1";
$result = gaz_dbi_dyn_query ($gTables['tesmov'].".id_tes, ".$gTables['rigmoc'].".codcon as accnum, id_rig,descri ", $gTables['rigmoc']." left join ".$gTables['tesmov']." on ".$gTables['rigmoc'].".id_tes = ".$gTables['tesmov'].".id_tes ", $where, 1);
while ($a_row = gaz_dbi_fetch_array($result)) {
      if ($a_row['accnum'] < 100000000 ){
       if ($message != "") {
            echo $message;
            $message = "";
       }                         
         echo "<tr><td class=\"FacetDataTD\" align=\"center\"><a href=\"../contab/admin_movcon.php?Update&id_tes=".$a_row["id_tes"]."\" title=\"Modifica il movimento\" >".$a_row["id_tes"]."</a></td><td class=\"FacetDataTD\">".$a_row["descri"]."</td><td class=\"FacetDataTDred\" colspan=\"3\" align=\"center\">Il rigo ".$a_row["id_rig"]." non ha il conto di riferimento</td></tr>\n";
      }
}
Exemple #22
0
      echo "<td $class align=\"center\">".$v['i_u']."</td>\n";
      echo "<td $class align=\"center\" align=\"right\">".gaz_format_quantity($v['v_a'],0,$admin_aziend['decimal_price'])."</td>\n";
      echo "<td $class align=\"right\">
            <input id=\"vac$k\" name=\"vac$k\" ".$form['vac_on'.$k]." onClick=\"toggle('vac$k', 'a[$k][v_r]')\" type=\"checkbox\" />
            <input type=\"text\" size=\"10\" style=\"text-align:right\" onchange=\"document.maschera.chk$k.checked=true\" id=\"a[$k][v_r]\" name=\"a[$k][v_r]\" value=\"".gaz_format_quantity($v['v_r'],0,$admin_aziend['decimal_price'])."\" disabled ></td>\n";
      echo "<td $class align=\"center\" align=\"right\">".gaz_format_quantity($v['g_a'],0,$admin_aziend['decimal_quantity'])."</td>\n";
      echo "<td $class align=\"right\"><input type=\"text\" style=\"text-align:right\" onchange=\"document.maschera.chk$k.checked=true\" name=\"a[$k][g_r]\" value=\"".$v['g_r']."\"></td>\n";
      echo "<td $class align=\"center\" align=\"right\">".gaz_format_quantity($v['v_g'],0,$admin_aziend['decimal_price'])."</td>\n";
      echo "</tr>\n";
      $ctrl_cm = $v['i_g'];
      $elem_n++;
 }
 echo "<tr>
    <td  colspan=\"2\" class=\"FacetFieldCaptionTD\"><input type=\"submit\" name=\"Return\" value=\"".$script_transl['return']."\">&nbsp;</td>
    <td align=\"center\" colspan=\"6\" class=\"FacetFooterTD\"><input type=\"submit\" name=\"preview\" value=\"".$script_transl['view']."!\">&nbsp;</td>
    <td align=\"center\" class=\"FacetFormHeaderFont\">Tot. ".gaz_format_number($tot_val_giac)."</td>
    </tr>\n";
 if (isset($_POST['preview']) && empty($msg)) { // e' possibile confermare, non i sono errori formali
     echo "</table><table class=\"Tlarge\">\n";
     echo "<tr><td colspan=\"8\" class=\"FacetFormHeaderFont\">".$script_transl['preview_title']."</td></tr>\n";
     echo "<tr><td class=\"FacetFieldCaptionTD\"></td>
       <td class=\"FacetFieldCaptionTD\">".$script_transl['code']."</td>
       <td class=\"FacetFieldCaptionTD\">".$script_transl['descri']."</td>
       <td class=\"FacetFieldCaptionTD\">".$script_transl['mu']."</td>
       <td align=\"right\" class=\"FacetFieldCaptionTD\">".$script_transl['load']."</td>
       <td align=\"right\" class=\"FacetFieldCaptionTD\">".$script_transl['unload']."</td>
       <td align=\"right\" class=\"FacetFieldCaptionTD\">".$script_transl['v_r']."</td>
       <td class=\"FacetFieldCaptionTD\">".$script_transl['value']."</td>
       </tr>\n";
     foreach ($form['a'] as $k=>$v) { // ciclo delle singole righe (a)
       if ($form['chk_on'.$k] == ' checked ') {   // e' un rigo da movimentare
Exemple #23
0
    $pdf->Cell(18,4,$scadenza,'LR',0,'L');
    $pdf->Cell(18,4,$emission,'R',0,'L');
    $pdf->Cell(100,4,$cliente["indspe"].' '.sprintf("%05d",$cliente["capspe"]).' '.$cliente["citspe"].' ('.$cliente["prospe"].') P.IVA '.$cliente["pariva"],0,0,'L');
    $pdf->Cell(30,4,'CAB '.$banapp["codcab"],'R',0,'R');
    $pdf->Cell(24,4,'','R',1,'R');
    $pdf->Cell(18,4,'','LRB',0,'L');
    $pdf->Cell(18,4,$saldoacco,'RB',0,'R');
    $pdf->Cell(80,4,'Fatt.n.'.$a_row["numfat"].' del '.$datafatt,'B',0,'L');
    $pdf->Cell(20,4,'','B');
    $pdf->Cell(30,4,$banapp["descri"],'RB',0,'R');
    $aRiportare['top'][1]['nam'] = gaz_format_number($totaletipo);
    $aRiportare['bot'][1]['nam'] = gaz_format_number($totaletipo);
    $pdf->setRiporti($aRiportare);
    $pdf->Cell(24,4,gaz_format_number($a_row["impeff"]),'RB',1,'R');
    //aggiorno il db solo se non è una ristampa
    if ($a_row["status"] <> 'DISTINTATO')
        {
        gaz_dbi_put_row($gTables['effett'], "id_tes",$a_row["id_tes"],"status",'DISTINTATO');
        gaz_dbi_put_row($gTables['effett'], "id_tes",$a_row["id_tes"],"banacc",$_GET['ba']);
        }
    $ctrltipo = $a_row["tipeff"];
}
$pdf->SetFillColor(hexdec(substr($admin_aziend['colore'],0,2)),hexdec(substr($admin_aziend['colore'],2,2)),hexdec(substr($admin_aziend['colore'],4,2)));
$pdf->setRiporti();
$pdf->Cell(190,4,$totnumtipo.' '.$descreff.' per un totale di € '.gaz_format_number($totaletipo),1,1,'R',1);
$pdf->SetFont('helvetica','B',12);
$pdf->Cell(80);
$pdf->Cell(80,10,'TOTALE DEGLI EFFETTI VERSATI    € ',1,0,'L');
$pdf->Cell(30,10,gaz_format_number($totaleff),1,1,'R',1);
$pdf->Output();
?>
$pdf->setRiporti('');
$pdf->AddPage();
$config = new Config;
$paymov = new Schedule;
$ctrl_pm=0;
$pdf->SetFont('helvetica','',10);
$pdf->Cell(100,6,$d['d'][1]['descri'],1,1,'L',1,'',1);

while (list($k, $mv) = each($d['d'])) {
    if ($ctrl_pm <> $mv["id_tesdoc_ref"]){
    }
    $pdf->Cell(30,6,$mv['id_tesdoc_ref'],'LTB',0,'L',0,'',1);
    $pdf->Cell(70,6,$mv['t']['descri'],1,0,'L',0,'',1);
    $pdf->Cell(25,6,$mv['t']["numdoc"].'/'.$mv['t']['seziva'],1,0,'C',0);
    $pdf->Cell(25,6,gaz_format_date($mv['t']["datdoc"]),1,0,'C',0);
    $pdf->Cell(36,6,gaz_format_number($mv['amount']),1,1,'R',0);
    $ctrl_pm=$mv["id_tesdoc_ref"];
}
$pdf->Ln(10);
$pdf->SetFont('helvetica','B',10);
$pdf->Cell(150,6,$script_transl['tot'].': ','LTB',0,'R');
$pdf->Cell(36,6,'€ '.gaz_format_number($d['d'][1]['import']),'RTB',1,'R',1,'',1);
$pdf->Ln(10);
$pdf->SetFont('courier','',8);
$pdf->Cell(100,6,'');
$pdf->Cell(60,6,$admin_aziend['Nome'].' '.$admin_aziend['Cognome'],0,1,'C');
$pdf->Cell(100,6,'');
$pdf->Cell(60,20,'____________________________',0,0,'C');
$pdf->setRiporti('');
$pdf->Output();
?>
Exemple #25
0
    $result = gaz_dbi_dyn_query($gTables['rigdoc'].".*,".$gTables['tesdoc'].".id_tes,".$gTables['tesdoc'].".tipdoc,".$gTables['tesdoc'].".numdoc,".$gTables['tesdoc'].".datemi,".$gTables['tesdoc'].".datfat,".$gTables['tesdoc'].".imball,".$gTables['tesdoc'].".clfoco,".$gTables['tesdoc'].".caumag,".$gTables['tesdoc'].".sconto as scochi", $gTables['rigdoc']." LEFT JOIN ".$gTables['tesdoc']." ON ".$gTables['rigdoc'].".id_tes = ".$gTables['tesdoc'].".id_tes LEFT JOIN ".$gTables['caumag']." ON ".$gTables['tesdoc'].".caumag = ".$gTables['caumag'].".codice", "tiprig = 0 AND id_mag = 0 AND caumag > 0 AND datemi BETWEEN $datainizio AND $datafine ", " datemi ASC, ".$gTables['tesdoc'].".id_tes ASC, id_rig ASC");
    $numrow = gaz_dbi_num_rows($result);
    echo "<table class=\"Tlarge\">";
    if ($numrow > 0) {
       echo "<tr><td class=\"FacetFieldCaptionTD\" colspan=\"6\" >$numrow ".$script_transl[5]."</td></tr>";
       require("../../modules/vendit/lang.".$admin_aziend['lang'].".php");
       $desdoc = $strScript["admin_docven.php"][0];
       require("../../modules/acquis/lang.".$admin_aziend['lang'].".php");
       $desdoc += $strScript["admin_docacq.php"][0];
       while ($row = gaz_dbi_fetch_array($result)) {
             echo "<tr>\n";
             $valore = CalcolaImportoRigo($row['quanti'], $row['prelis'], $row['sconto']) ;
             $valore = CalcolaImportoRigo(1, $valore, $row['scochi']) ;
             $descri = $desdoc[$row['tipdoc']]." n.".$row['numdoc'];
             echo "<td class=\"FacetDataTD\" align=\"center\">".gaz_format_date($row["datemi"])." &nbsp;</td>\n";
             echo "<td class=\"FacetDataTD\" align=\"center\">".$row["caumag"]." - ".$row["descri"]."</td>\n";
             echo "<td class=\"FacetDataTD\" align=\"center\">$descri</td>\n";
             echo "<td class=\"FacetDataTD\" align=\"center\">".$row["codart"]."</td>\n";
             echo "<td class=\"FacetDataTD\" align=\"center\">".gaz_format_quantity($row["quanti"],1,$admin_aziend['decimal_quantity'])."</td>\n";
             echo "<td class=\"FacetDataTD\" align=\"right\">".gaz_format_number($valore)." </td>";
             echo "</tr>\n";
       }
       echo "<tr><td colspan=\"6\" align=\"center\"><input type=\"submit\" name=\"insert\" value=\"".strtoupper($script_transl[0])." !\"></TD></TR>";
    } else {
       echo "<tr><td class=\"FacetDataTDred\" align=\"center\">".$script_transl[6]."</td></tr>";
    }
}
?>
</form>
</body>
</html>
Exemple #26
0
             echo "<td class=\"FacetDataTD$red_p\">".$mv['protoc']." &nbsp;</td>";
             echo "<td class=\"FacetDataTD\">".$mv['dr']."<br /><a href=\"admin_movcon.php?id_tes=".$mv['id_tes']."&Update\" title=\"Modifica il movimento contabile\">id ".$mv['id_tes']."</a> &nbsp;</td>";
             echo "<td class=\"FacetDataTD$red_d\">".$mv['descri']." n.".$mv['numdoc'].$script_transl['of'].$mv['dd']." &nbsp;</td>";
             echo "<td class=\"FacetDataTD\">".substr($mv['ragsoc'],0,30)." &nbsp;</td>";
             echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($imponi)." &nbsp;</td>";
             echo "<td align=\"right\" class=\"FacetDataTD$red_t\">".$mv['periva']." &nbsp;</td>";
             echo "<td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($impost)." &nbsp;</td></tr>";
             echo "</tr>";
        }
        echo "<tr><td colspan=7><HR></td></tr>";
        $totale = number_format(($totimponi+$totimpost),2,'.','');
        foreach ($castle_imponi as $key=>$value) {
           echo "<tr><td colspan=3></td><td class=\"FacetDataTD\">".$script_transl['tot'].$castle_descri[$key]."</td><td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($value)." &nbsp;</td><td align=\"right\" class=\"FacetDataTD\">".$castle_percen[$key]."% &nbsp;</td><td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($castle_impost[$key])." &nbsp;</td></tr>";
        }
        echo "<tr><td colspan=3></td><td colspan=4><HR></td></tr>";
        echo "<tr><td colspan=2></td><td class=\"FacetDataTD\">".$script_transl['tot'].$script_transl['t_gen']."</td><td class=\"FacetDataTD\"align=\"right\">".gaz_format_number($totale)." &nbsp;</td><td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($totimponi,2, '.', '')." &nbsp;</td><TD></TD><td align=\"right\" class=\"FacetDataTD\">".gaz_format_number($totimpost,2, '.', '')." &nbsp;</td></tr>";
        if ($err==0) {
            echo "\t<tr class=\"FacetFieldCaptionTD\">\n";
            echo '<td colspan="7" align="right"><input type="submit" name="print" value="';
            echo $script_transl['print'];
            echo '">';
            echo "\t </td>\n";
            echo "\t </tr>\n";
        } else {
            echo "<tr>";
            echo "<td colspan=\"7\" align=\"right\" class=\"FacetDataTDred\">".$script_transl['errors']['err']."</td>";
            echo "</tr>\n";
        }
  }
  echo "</table>\n";
}
Exemple #27
0
}

require("../../library/include/header.php");
$script_transl=HeadMain(0,0,'admin_movmag');
print "<form method=\"POST\">\n";
echo "<input type=\"hidden\" value=\"".$form['id_mov']."\" name=\"id_mov\">\n";
print "<div align=\"center\" class=\"FacetFormHeaderFont\">".$script_transl['del_this']."</div>\n";
print "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" class=\"FacetFormTABLE\" align=\"center\">\n";
$anagrafica = new Anagrafica();
$a_part = $anagrafica->getPartner($form['clfoco']);
$partner =  $a_part['ragso1']." ".$a_part['ragso2'];
print "<tr><td class=\"FacetFieldCaptionTD\">n. ID </td><td class=\"FacetDataTD\">".$form["id_mov"]."</td></tr>";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl[1]."</td><td class=\"FacetDataTD\">".$form["datreg"]."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl[2]."</td><td class=\"FacetDataTD\">".$causal["descri"]."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl["operat"]."</td><td class=\"FacetDataTD\">".$script_transl["operat_value"][$form["operat"]]."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl["partner"]."</td><td class=\"FacetDataTD\">".$partner."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl[8]."</td><td class=\"FacetDataTD\">".$form["datdoc"]."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl[7]."</td><td class=\"FacetDataTD\">".$form["artico"]."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl[12]."</td><td class=\"FacetDataTD\">".$form["quanti"]."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl[13]."</td><td class=\"FacetDataTD\">".$form["prezzo"]."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl[14]."</td><td class=\"FacetDataTD\">".$form["scorig"]."</td></tr>\n";
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl[10]."</td><td class=\"FacetDataTD\">".$form["scochi"]."</td></tr>\n";
$valore = CalcolaImportoRigo($form['quanti'], $form['prezzo'], $form['scorig']) ;
$valore = CalcolaImportoRigo(1, $valore, $form['scochi']) ;
print "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl["amount"]."</td><td class=\"FacetDataTD\">".gaz_format_number($valore)."</td></tr>\n";
print "<td colspan=\"2\" align=\"right\"><input type=\"submit\" name=\"Return\" value=\"".$script_transl['return']."\"><input type=\"submit\" name=\"Delete\" value=\"".strtoupper($script_transl['delete'])."!\"></td></tr>";
?>
</table>
</form>
</body>
</html>
Exemple #28
0
 function pageFooter()
 {
     $y = $this->GetY();
     $this->Rect(10, $y, 186, 200 - $y);
     //questa marca le linee dx e sx del documento
     //stampo il castelletto
     $this->SetY(212);
     $this->Cell(62, 6, 'Pago', 'LTR', 0, 'C', 1);
     $this->Cell(68, 6, 'Resumen Tasas I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(56, 6, 'TOTALES HONORARIOS', 'LTR', 1, 'C', 1);
     $this->SetFont('helvetica', '', 8);
     $this->Cell(62, 6, $this->pagame['descri'], 'LBR', 0, 'L');
     $this->Cell(18, 4, 'Imponible', 'LR', 0, 'C', 1);
     $this->Cell(32, 4, 'Tasa', 'LR', 0, 'C', 1);
     $this->Cell(18, 4, 'Impuesto', 'LR', 1, 'C', 1);
     $totTrasporto = $this->tottraspo;
     $this->docVars->setTotal($totTrasporto);
     foreach ($this->docVars->cast as $key => $value) {
         if ($this->tesdoc['id_tes'] > 0) {
             $this->Cell(62);
             $this->Cell(18, 4, gaz_format_number($value['impcast']) . ' ', 'LR', 0, 'R');
             $this->Cell(32, 4, $value['descriz'], 0, 0, 'C');
             $this->Cell(18, 4, gaz_format_number($value['ivacast']) . ' ', 'LR', 1, 'R');
         } else {
             $this->Cell(62);
             $this->Cell(68, 4, '', 'LR', 1);
         }
     }
     //azzero il castelletto
     foreach ($this->docVars->castel as $i => $value) {
         unset($this->docVars->castel[$i]);
     }
     //azzero il trasporto
     $this->tottraspo = 0.0;
     $totimpmer = $this->docVars->totimpmer;
     $speseincasso = $this->docVars->speseincasso;
     $totimpfat = $this->docVars->totimpfat;
     $totivafat = $this->docVars->totivafat;
     $vettor = $this->docVars->vettor;
     $impbol = $this->docVars->impbol;
     $totriport = $this->docVars->totriport;
     $ritenuta = $this->docVars->tot_ritenute;
     if ($impbol > 0) {
         $this->Cell(62);
         $this->Cell(18, 4, gaz_format_number($impbol) . ' ', 0, 0, 'R');
         $this->Cell(32, 4, $this->docVars->iva_bollo['descri'], 'LR', 0, 'C');
         $this->Cell(18, 4, gaz_format_number($this->docVars->iva_bollo['aliquo'] * $impbol) . ' ', 0, 1, 'R');
     }
     //effettuo il calcolo degli importi delle scadenze
     $totpag = $totimpfat + $impbol + $totriport + $totivafat - $ritenuta;
     $ratpag = CalcolaScadenze($totpag, $this->giorno, $this->mese, $this->anno, $this->pagame['tipdec'], $this->pagame['giodec'], $this->pagame['numrat'], $this->pagame['tiprat'], $this->pagame['mesesc'], $this->pagame['giosuc']);
     if ($ratpag) {
         //allungo l'array fino alla 4^ scadenza
         $ratpag['import'] = array_pad($ratpag['import'], 4, '');
         $ratpag['giorno'] = array_pad($ratpag['giorno'], 4, '');
         $ratpag['mese'] = array_pad($ratpag['mese'], 4, '');
         $ratpag['anno'] = array_pad($ratpag['anno'], 4, '');
     } else {
         for ($i = 0; $i <= 3; $i++) {
             $ratpag['import'][$i] = "";
             $ratpag['giorno'][$i] = "";
             $ratpag['mese'][$i] = "";
             $ratpag['anno'][$i] = "";
         }
     }
     //stampo i totali
     $this->SetY(200);
     $this->SetFillColor(hexdec(substr($this->colore, 0, 2)), hexdec(substr($this->colore, 2, 2)), hexdec(substr($this->colore, 4, 2)));
     $this->SetFont('helvetica', '', 9);
     $this->Cell(36, 6, 'Tot. Cuerpo', 'LTR', 0, 'C', 1);
     $this->Cell(16, 6, '% Descuento', 'LTR', 0, 'C', 1);
     $this->Cell(24, 6, 'Gasto en efectivo', 'LTR', 0, 'C', 1);
     $this->Cell(26, 6, 'Trasporte', 'LTR', 0, 'C', 1);
     $this->Cell(36, 6, 'Tot.Imponible', 'LTR', 0, 'C', 1);
     $this->Cell(26, 6, 'Tot. I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(22, 6, 'Sellos', 'LTR', 1, 'C', 1);
     if ($totimpmer > 0) {
         $this->Cell(36, 6, gaz_format_number($totimpmer), 'LBR', 0, 'C');
     } else {
         $this->Cell(36, 6, '', 'LBR');
     }
     if ($this->tesdoc['sconto'] > 0) {
         $this->Cell(16, 6, gaz_format_number($this->tesdoc['sconto']), 'LBR', 0, 'C');
     } else {
         $this->Cell(16, 6, '', 'LBR');
     }
     if ($speseincasso > 0) {
         $this->Cell(24, 6, gaz_format_number($speseincasso), 'LBR', 0, 'C');
     } else {
         $this->Cell(24, 6, '', 'LBR');
     }
     if ($totTrasporto > 0) {
         $this->Cell(26, 6, gaz_format_number($totTrasporto), 'LBR', 0, 'C');
     } else {
         $this->Cell(26, 6, '', 'LBR');
     }
     if ($totimpfat > 0) {
         $this->Cell(36, 6, gaz_format_number($totimpfat), 'LBR', 0, 'C');
     } else {
         $this->Cell(36, 6, '', 'LBR');
     }
     if ($totivafat > 0) {
         $this->Cell(26, 6, gaz_format_number($totivafat), 'LBR', 0, 'C');
     } else {
         $this->Cell(26, 6, '', 'LBR');
     }
     if ($impbol > 0) {
         $this->Cell(22, 6, gaz_format_number($impbol), 'LBR', 1, 'C');
     } else {
         $this->Cell(22, 6, '', 'LBR');
     }
     $this->SetY(218);
     $this->Cell(130);
     $totale = $totimpfat + $totivafat + $impbol;
     if ($this->tesdoc['id_tes'] > 0) {
         if ($ritenuta > 0) {
             $this->SetFont('helvetica', 'B', 12);
             $this->Cell(56, 6, '€ ' . gaz_format_number($totale), 'LBR', 2, 'R');
             $this->SetFont('helvetica', '', 12);
             $this->Cell(56, 6, 'Totale descuento: $ ' . gaz_format_number($ritenuta), 'LR', 2, 'R');
             $this->SetFont('helvetica', '', 9);
             $this->Cell(56, 6, 'T O T A L    A   P A G A R ', 'LTR', 2, 'C', 1);
             $this->SetFont('helvetica', 'B', 12);
             $this->Cell(56, 6, '€ ' . gaz_format_number($totale - $ritenuta), 'LBR', 1, 'R');
         } else {
             $this->SetFont('helvetica', 'B', 18);
             $this->Cell(56, 24, '€ ' . gaz_format_number($totale), 'LBR', 1, 'C');
         }
     } else {
         $this->Cell(56, 24, '', 'LBR', 1);
     }
     $this->SetY(224);
     $this->SetFont('helvetica', '', 9);
     if (!empty($this->banapp['descri']) and $this->pagame['tippag'] != 'D') {
         $this->Cell(62, 6, 'Banco de apoyo', 'LTR', 1, 'C', 1);
         $this->Cell(62, 6, $this->banapp['descri'], 'LR', 1);
         $this->Cell(62, 6, ' ABI ' . sprintf("%05d", $this->banapp['codabi']) . ' CAB ' . $this->banapp['codcab'], 'LRB', 1, 'C');
     } elseif (!empty($this->banacc['iban'])) {
         $this->Cell(62, 6, 'Banca de abono', 'LTR', 1, 'C', 1);
         $this->Cell(62, 5, $this->banacc['ragso1'], 'LR', 1);
         $this->Cell(62, 6, 'IBAN ' . $this->banacc['iban'], 'LRB', 1, 'C');
     } else {
         $this->Cell(62, 6, '', 'LTR', 1, '', 1);
         $this->Cell(62, 6, '', 'LR', 1);
         $this->Cell(62, 6, '', 'LRB', 1);
     }
     $this->Cell(130, 6, 'Fecha de vencimiento y el importe a tanto alzado', 'LTR', 0, 'C', 1);
     $this->Cell(56, 6, 'Total de saldos', 'LTR', 1, 'C', 1);
     $this->Cell(32, 6, $ratpag['giorno']['0'] . '-' . $ratpag['mese']['0'] . '-' . $ratpag['anno']['0'], 'LR', 0, 'C');
     $this->Cell(33, 6, $ratpag['giorno']['1'] . '-' . $ratpag['mese']['1'] . '-' . $ratpag['anno']['1'], 'LR', 0, 'C');
     $this->Cell(32, 6, $ratpag['giorno']['2'] . '-' . $ratpag['mese']['2'] . '-' . $ratpag['anno']['2'], 'LR', 0, 'C');
     $this->Cell(33, 6, $ratpag['giorno']['3'] . '-' . $ratpag['mese']['3'] . '-' . $ratpag['anno']['3'], 'LR', 0, 'C');
     $this->Cell(56, 6, '', 'R', 1, 'C');
     if ($ratpag['import']['0'] != 0) {
         $this->Cell(32, 6, gaz_format_number($ratpag['import']['0']), 'LBR', 0, 'C');
     } else {
         $this->Cell(32, 6, '', 'LBR');
     }
     if ($ratpag['import']['1'] != 0) {
         $this->Cell(33, 6, gaz_format_number($ratpag['import']['1']), 'LBR', 0, 'C');
     } else {
         $this->Cell(33, 6, '', 'LBR');
     }
     if ($ratpag['import']['2'] != 0) {
         $this->Cell(32, 6, gaz_format_number($ratpag['import']['2']), 'LBR', 0, 'C');
     } else {
         $this->Cell(32, 6, '', 'LBR');
     }
     if ($ratpag['import']['3'] != 0) {
         $this->Cell(33, 6, gaz_format_number($ratpag['import']['3']), 'LBR', 0, 'C');
     } else {
         $this->Cell(33, 6, '', 'LBR');
     }
     if ($totriport != 0) {
         $this->Cell(56, 6, gaz_format_number($totriport), 'BR', 1, 'C');
     } else {
         $this->Cell(56, 6, '', 'BR', 1);
     }
 }
 function pageFooter()
 {
     $y = $this->GetY();
     $this->Rect(10, $y, 186, 210 - $y);
     //questa marca le linee dx e sx del documento
     $this->SetY(222);
     $this->SetFillColor(hexdec(substr($this->colore, 0, 2)), hexdec(substr($this->colore, 2, 2)), hexdec(substr($this->colore, 4, 2)));
     $this->Cell(62, 6, 'Pagamento', 1, 0, 'C', 1);
     $this->Cell(68, 6, 'Castelletto I.V.A.', 1, 0, 'C', 1);
     $this->Cell(56, 6, 'T O T A L E', 'LTR', 1, 'C', 1);
     $this->SetFont('helvetica', '', 8);
     $this->Cell(62, 6, $this->pagame['descri'], 1, 0, 'C');
     $this->Cell(25, 4, 'Imponibile', 'LR', 0, 'C', 1);
     $this->Cell(18, 4, 'Aliquota', 'LR', 0, 'C', 1);
     $this->Cell(25, 4, 'Imposta', 'LR', 1, 'C', 1);
     $this->docVars->setTotal();
     $totimpmer = $this->docVars->totimpmer;
     $speseincasso = $this->docVars->speseincasso;
     $totimpfat = $this->docVars->totimpfat;
     $totivafat = $this->docVars->totivafat;
     $vettor = $this->docVars->vettor;
     $impbol = $this->docVars->impbol;
     //stampo i totali
     $this->SetY(210);
     $this->SetFont('helvetica', '', 9);
     $this->Cell(36, 6, 'Tot. Corpo', 'LTR', 0, 'C', 1);
     $this->Cell(16, 6, '% Sconto', 'LTR', 0, 'C', 1);
     $this->Cell(24, 6, 'Spese Incasso', 'LTR', 0, 'C', 1);
     $this->Cell(26, 6, 'Trasporto', 'LTR', 0, 'C', 1);
     $this->Cell(36, 6, 'Tot.Imponibile', 'LTR', 0, 'C', 1);
     $this->Cell(26, 6, 'Tot. I.V.A.', 'LTR', 0, 'C', 1);
     $this->Cell(22, 6, 'Bolli', 'LTR', 1, 'C', 1);
     $this->Cell(36, 6, '', 'LBR');
     $this->Cell(16, 6, '', 'LBR');
     $this->Cell(24, 6, '', 'LBR');
     $this->Cell(26, 6, '', 'LBR');
     $this->Cell(36, 6, '', 'LBR');
     $this->Cell(26, 6, '', 'LBR');
     $this->Cell(22, 6, '', 'LBR');
     $this->SetY(228);
     $this->Cell(130);
     $this->SetFont('helvetica', 'B', 18);
     $this->Cell(56, 18, '', 'LBR', 1);
     $this->SetY(234);
     $this->SetFont('helvetica', '', 9);
     $this->Cell(62, 6, 'Spedizione', 'LTR', 1, 'C', 1);
     $this->Cell(62, 6, $this->tesdoc['spediz'], 'LBR', 1, 'C');
     $this->Cell(72, 6, 'Porto', 'LTR', 0, 'C', 1);
     $this->Cell(29, 6, 'Peso netto', 'LTR', 0, 'C', 1);
     $this->Cell(29, 6, 'Peso lordo', 'LTR', 0, 'C', 1);
     $this->Cell(28, 6, 'N.colli', 'LTR', 0, 'C', 1);
     $this->Cell(28, 6, 'Volume', 'LTR', 1, 'C', 1);
     $this->Cell(72, 6, $this->tesdoc['portos'], 'LBR', 0, 'C');
     if ($this->tesdoc['net_weight'] > 0) {
         $this->Cell(29, 6, gaz_format_number($this->tesdoc['net_weight']), 'LRB', 0, 'C');
     } else {
         $this->Cell(29, 6, '', 'LRB');
     }
     if ($this->tesdoc['gross_weight'] > 0) {
         $this->Cell(29, 6, gaz_format_number($this->tesdoc['gross_weight']), 'LRB', 0, 'C');
     } else {
         $this->Cell(29, 6, '', 'LRB');
     }
     if ($this->tesdoc['units'] > 0) {
         $this->Cell(28, 6, $this->tesdoc['units'], 'LRB', 0, 'C');
     } else {
         $this->Cell(28, 6, '', 'LRB');
     }
     if ($this->tesdoc['volume'] > 0) {
         $this->Cell(28, 6, gaz_format_number($this->tesdoc['volume']), 'LRB', 1, 'C');
     } else {
         $this->Cell(28, 6, '', 'LRB', 1);
     }
 }
Exemple #30
0
        if ($v["status"]=='DISTINTATO') {
           echo "<td class=\"FacetDataTDred\" align=\"center\" colspan=\"4\">".strtoupper($script_transl['reprint'])."!";
        } else {
           echo "<td colspan=\"4\">";
        }
        echo "</td>";
        echo "<td>".$v["pariva"]."</td>";
        echo "<td align=\"right\">".gaz_format_number($v["totfat"])."</td>";
        echo "<td align=\"center\">".$v["coordi"]." </td>";
        echo "</tr>\n";
    }
    echo '<TD colspan="4" class="FacetDataTD">'.
                 $script_transl['tot']." n.".
                 $r['tot']['num'].' '.
                 $admin_aziend['symbol'].' '.
                 gaz_format_number($r['tot']['value'])."</td>\n".
                 '<TD colspan="3" class="FacetDataTD"></td>';
    echo "</tr>";
    echo "\t<tr class=\"FacetFieldCaptionTD\">\n";
    echo '<td colspan="7" align="right"><input type="submit" name="print" value="';
    echo $script_transl['submit'];
    echo '">';
    echo "\t </td>\n";
    echo "\t </tr>\n";
  } else {
        echo "<tr>";
        echo '<TD colspan="7" align="center" class="FacetDataTDred">'.$script_transl['errors'][0]."</td>\n";
        echo "</tr>";
  }
  echo "</table>\n";
}