print "Error al actualizar";
		$class_report->is_msg_error;	
		$class_report->SQL->rollback();
	}
	else
	{
		$class_report->SQL->commit();
	}
	$ds_voucher->data=$data;
	error_reporting(E_ALL);
	set_time_limit(1800);
	$io_pdf=new Cezpdf('LETTER','portrait'); // Instancia de la clase PDF
	$io_pdf->selectFont('../../shared/ezpdf/fonts/Helvetica.afm'); // Seleccionamos el tipo de letra
	$io_pdf->ezSetCmMargins(0.5,3.5,1,1); // Configuración de los margenes en centímetros
	$li_totrow=$ds_voucher->getRowCount("numdoc");
	$io_pdf->transaction('start'); // Iniciamos la transacción
	$thisPageNum=$io_pdf->ezPageCount;
	for($li_i=1;$li_i<=$li_totrow;$li_i++)
	{
		unset($la_data);
		$li_totprenom=0;
		$ldec_mondeb=0;
		$ldec_monhab=0;
		$li_totant=0;
		$ls_numdoc=$ds_voucher->data["numdoc"][$li_i];
		$ls_codban=$ds_voucher->data["codban"][$li_i];
		$ls_nomban=$class_report->uf_select_data($io_sql,"SELECT * FROM scb_banco WHERE codban ='".$ls_codban."' AND codemp='".$ls_codemp."'","nomban");
		$ls_ctaban=$ds_voucher->data["ctaban"][$li_i];
		$ls_chevau=$ds_voucher->data["chevau"][$li_i];
		$ld_fecmov=$io_funciones->uf_convertirfecmostrar($ds_voucher->data["fecmov"][$li_i]);
		$ls_nomproben=$ds_voucher->data["nomproben"][$li_i];
} else {
    $ls_aux = " AND ced_bene='" . $ls_codproben . "' ";
}
$la_nota = $io_report->uf_select_notaformatosalida($ls_codemp, $ls_numnota, $ls_tiponota, $ls_numord, $ls_numrecdoc, $ls_codtipdoc, $ls_aux);
if (count($la_nota) > 0) {
    error_reporting(E_ALL);
    set_time_limit(1800);
    $io_pdf = new Cezpdf('LETTER', 'portrait');
    // Instancia de la clase PDF
    $io_pdf->selectFont('../../shared/ezpdf/fonts/Helvetica.afm');
    // Seleccionamos el tipo de letra
    $io_pdf->ezSetCmMargins(3.5, 3, 3, 3);
    // Configuración de los margenes en centímetros
    $io_pdf->ezStartPageNumbers(550, 50, 10, '', '', 1);
    // Insertar el número de página
    $io_pdf->transaction('start');
    // Iniciamos la transacción
    $li_numpag = $io_pdf->ezPageCount;
    // Número de página
    $ls_tiponota = $la_nota["codope"];
    $ls_descripcion = $la_nota["desope"];
    $ls_fecha = $la_nota["fecope"];
    $ls_fecha = $io_funciones->uf_convertirfecmostrar($la_nota["fecope"]);
    $ls_estatus = $la_nota["estnotadc"];
    if ($ls_estatus == "R") {
        $ls_estatusnota = "Registrada";
    }
    if ($ls_estatus == "C") {
        $ls_estatusnota = "Contabilizada";
    }
    if ($ls_estatus == "A") {
Example #3
0
 function addTable(Cezpdf &$pdf, &$data, $cols = '', $title = '', $options = '')
 {
     $pdf->transaction('start');
     $pageNumber = $pdf->ezGetCurrentPageNumber();
     $pdf->ezTable($data, $cols, $title, $options);
     if ($pageNumber < $pdf->ezGetCurrentPageNumber()) {
         $pdf->transaction('rewind');
     } else {
         $pdf->transaction('commit');
         return;
     }
     $pdf->ezNewPage();
     $pageNumber = $pdf->ezGetCurrentPageNumber();
     $pdf->ezTable($data, $cols, $title, $options);
     if ($pageNumber < $pdf->ezGetCurrentPageNumber()) {
         $pdf->transaction('rewind');
         $pdf->ezTable($data, $cols, $title, $options);
     }
     $pdf->transaction('commit');
 }
Example #4
0
            // set table data and draw table
            $cols = array('item' => 'Item', 'value' => 'Value');
            $pdf->ezText($strings["task"] . ": " . $listSubTasks->subtas_name[$j] . "\n", 12);
            $pdf->saveState();
            $pdf->ezTable($data, $cols, '', array('xPos' => 50, 'xOrientation' => 'right', 'width' => 510, 'fontSize' => 10, 'showHeadings' => 0, 'protectRows' => 2, 'cols' => array('item' => array('width' => 90))));
            $pdf->restoreState();
            $pdf->ezText("\n");
        }
        // end for complistsubtask
    }
    // end if subtask
}
// close task loop
// add a grey bar and output the hours worked
$tmp = $strings["Total_Hours_Worked"] . ": " . $sum;
$pdf->transaction('start');
$ok = 0;
while (!$ok) {
    $thisPageNum = $pdf->ezPageCount;
    $pdf->saveState();
    $pdf->setColor(0.9, 0.9, 0.9);
    $pdf->filledRectangle($pdf->ez['leftMargin'], $pdf->y - $pdf->getFontHeight(12) + $pdf->getFontDecender(12), $pdf->ez['pageWidth'] - $pdf->ez['leftMargin'] - $pdf->ez['rightMargin'], $pdf->getFontHeight(12));
    $pdf->restoreState();
    $pdf->ezText($tmp, 12, array('justification' => 'left'));
    if ($pdf->ezPageCount == $thisPageNum) {
        $pdf->transaction('commit');
        $ok = 1;
    } else {
        // then we have moved onto a new page, bad bad, as the background rectangle will be on the old one
        $pdf->transaction('rewind');
        $pdf->ezNewPage();
Example #5
0
 function hga_uebersicht_pdf(Cezpdf $pdf, $eigentuemer_id)
 {
     $e_konto = 6050;
     // echo "funkt $eigentuemer_id";
     $this->get_eigentumer_id_infos($eigentuemer_id);
     if (isset($_REQUEST['jahr']) && !empty($_REQUEST['jahr'])) {
         $jahr = $_REQUEST['jahr'];
         $akt_jahr = date("Y");
     } else {
         $jahr = $akt_jahr = date("Y");
     }
     $gg = new geldkonto_info();
     $gg->geld_konto_ermitteln('Objekt', $this->objekt_id);
     $geldkonto_id = $gg->geldkonto_id;
     $eigentuemer_ids = $this->get_eigentuemer_arr($this->einheit_id);
     $g_soll = 0;
     $g_ist = 0;
     $anz = count($eigentuemer_ids);
     for ($a = 0; $a < $anz; $a++) {
         $g_ist += $this->get_ergebnis_hga_ist($eigentuemer_ids[$a]['ID'], $jahr, $geldkonto_id, $e_konto);
     }
     $ergebnisse_hga = $this->get_ergebnisse_hga_soll($this->einheit_id, $jahr, $e_konto);
     $anz = count($ergebnisse_hga);
     for ($a = 0; $a < $anz; $a++) {
         $g_soll += $ergebnisse_hga[$a]['SOLL'];
         $ergebnisse_hga[$a]['SOLL'] = nummer_punkt2komma($ergebnisse_hga[$a]['SOLL']);
     }
     $g_saldo = $g_ist - $g_soll;
     if ($a > 0) {
         $ergebnisse_hga[0]['IST'] = nummer_punkt2komma($g_ist);
         $ergebnisse_hga[0]['SALDO'] = nummer_punkt2komma($g_saldo);
     }
     $ergebnisse_hga[$a + 1]['HGA'] = '<b>Summen</b>';
     $ergebnisse_hga[$a + 1]['SOLL'] = '<b>' . nummer_punkt2komma($g_soll) . '</b>';
     $ergebnisse_hga[$a + 1]['IST'] = '<b>' . nummer_punkt2komma($g_ist) . '</b>';
     $ergebnisse_hga[$a + 1]['SALDO'] = '<b>' . nummer_punkt2komma($g_saldo) . '</b>';
     // print_r($soll_ist_arr);
     $cols = array('HGA' => "<b>HGA</b>", 'SOLL' => "<b>SOLL (- ist Guthaben)</b>", 'IST' => "<b>IST</b>", 'SALDO' => "<b>SALDO</b>");
     $page = $pdf->ezGetCurrentPageNumber();
     $pdf->transaction('start');
     $pdf->ezSetDy(-10);
     $pdf->ezText("ERGEBNISSE HAUSGELDABRECHNUNGEN", 11, array('justification' => 'full'));
     $pdf->ezSetDy(-5);
     $pdf->ezTable($ergebnisse_hga, $cols, "", array('showHeadings' => 1, 'shaded' => 0, 'titleFontSize' => 11, 'titleJustification' => 'left', 'fontSize' => 7, 'xPos' => 50, 'xOrientation' => 'right', 'width' => 500, 'rowGap' => 1, 'cols' => array('DATUM' => array('justification' => 'right', 'width' => 70), 'BEMERKUNG' => array('justification' => 'left', 'width' => 300), 'BETRAG' => array('justification' => 'right', 'width' => 75), 'SALDO' => array('justification' => 'right', 'width' => 75))));
     if ($pdf->ezGetCurrentPageNumber() > $page) {
         $pdf->transaction('abort');
         $pdf->ezNewPage();
         $pdf->ezText("ERGEBNISSE HAUSGELDABRECHNUNGEN", 11, array('justification' => 'full'));
         $pdf->ezSetDy(-5);
         $pdf->ezTable($ergebnisse_hga, $cols, "", array('showHeadings' => 1, 'shaded' => 0, 'titleFontSize' => 11, 'titleJustification' => 'left', 'fontSize' => 7, 'xPos' => 50, 'xOrientation' => 'right', 'width' => 500, 'rowGap' => 1, 'cols' => array('DATUM' => array('justification' => 'right', 'width' => 70), 'BEMERKUNG' => array('justification' => 'left', 'width' => 300), 'BETRAG' => array('justification' => 'right', 'width' => 75), 'SALDO' => array('justification' => 'right', 'width' => 75))));
     } else {
         $pdf->transaction('commit');
     }
     return $pdf;
 }