$pdf->Cell(17, 5, number_format($debe, 2, ',', '.'), 0, 1, 'R', true); /**/ } else { $pdf->Cell(48, 5, substr($rowCliente['fullName'], 0, 50), 0, 0, 'L', true); $pdf->Cell(43, 5, substr($rowCliente['productoDes'], 0, 43), 0, 0, 'L', true); $pdf->Cell(20, 5, $rowCliente['giro'], 0, 0, 'C', true); $pdf->Cell(17, 5, number_format($total, 2, ',', '.'), 0, 0, 'R', true); $pdf->Cell(17, 5, number_format($pagado, 2, ',', '.'), 0, 0, 'R', true); $pdf->Cell(17, 5, number_format($debe, 2, ',', '.'), 0, 1, 'R', true); /**/ } } while ($rowCliente = mysql_fetch_assoc($cliente)); if (!isset($imp)) { $pdf->Ln(7); $pdf->SetFont('arial', 'B', 9); $pdf->cell(35, 5, " "); $pdf->cell(17, 5, "Total de Ventas: " . $acumTotArt); $pdf->cell(28, 5, " "); $pdf->cell(17, 5, "Total Cobrado: " . $acumPag); $pdf->cell(25, 5, " "); $pdf->cell(17, 5, "Total Deudas: " . $acumDebe); } } $pdf->AddPage(); //T�tulo del Reporte $pdf->Cell(3, 4, '', 0, 1); $pdf->SetFont('times', 'B', 12); $pdf->Cell(1, 4, 'Clientes' . $text, 0, 1); $pdf->Cell(1, 10, utf8_decode("Listado de Morosos Préstamos con") . $giros . utf8_decode(" o más cuotas vencidas"), 0, 1, 'L'); $pdf->SetFont('Arial', '', 10); //Connect to database
$pdf->Cell(60, 4, $oDados->q86_numcgm . " - " . $oDados->z01_nome, "", 1, "L", 0); $pdf->Cell(30, 1, "", "", 0, "R", 0); $pdf->Cell(60, 1, "", "", 1, "L", 0); } } $pdf->Cell(180, 3, "", "", 1, "L", 0); $pdf->Cell(200, 4, "", "", 1, "C", 0); $pdf->setX(5); $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(200, 4, "Atividades", "LRBT", 1, "C", 0); $pdf->setX(5); $pdf->Cell(200, 4, "", "", 1, "C", 0); if ($iLinhasConsultaAtividade > 0) { $pdf->setX(10); $pdf->SetFont('Arial', '', $titulo); $pdf->cell(15, 4, "Cod.", 0, 0, "C", 1); $pdf->cell(95, 4, "Atividade", 0, 0, "C", 1); $pdf->cell(10, 4, "Tipo", 0, 1, "C", 1); for ($iInd = 0; $iInd < $iLinhasConsultaAtividade; $iInd++) { $oDadosAtividade = db_utils::fieldsmemory($rsSimulacaoCalculoAtividade, $iInd); $sTipoAtividade = "S"; if ($oDadosAtividade->q131_principal == "t") { $sTipoAtividade = "P"; } $pdf->setX(10); $pdf->SetFont('Arial', '', $texto); $pdf->cell(15, 4, $oDadosAtividade->q131_atividade, 0, 0, "C", 0); $pdf->cell(95, 4, $oDadosAtividade->q03_descr, 0, 0, "L", 0); $pdf->cell(10, 4, $sTipoAtividade, 0, 1, "L", 0); } } else {
// $this->Cell(80); // Title $this->Cell(0, 20, 'SAMARTHYA COURSES CERTIFICATION', 0, 1, 'C'); // Line break $this->Ln(10); } // Page footer function Footer() { // Position at 1.5 cm from bottom $this->SetY(-15); // Arial italic 8 $this->SetFont('Arial', 'I', 8); // Page number $this->Cell(0, 10, 'Powered by Central Government of India', 0, 0, 'C'); } } // Instanciation of inherited class $pdf = new PDF('P', 'mm', array(200, 300)); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times', 'I', 14); $pdf->cell(0, 10, "\t\t\t\t\t\t\t\t\t\t This certifies that " . $Name . " has successfully completed the training program ", 0, 1); $pdf->Cell(0, 10, "\t\t\t\t\t\t\t\t\t\t of Samarthya Educational Courses ", 0, 0); $pdf->Output(); ?> */
<?php $pdf = new PDF(); $pdf->FPDF('P', 'mm', 'Letter'); $pdf->AddPage(); $title = 'PAGARE '; $pdf->SetFont('Arial', 'B', 12); $pdf->CELL(0, 5, $title, 0, 1, 'C'); $pdf->ln(15); $pdf->SetFont('Arial', '', 10); $pdf->cell(20, 1, "DEUDOR:", 0, 0, 'L'); $pdf->cell(100, 1, $nombreapo, 0, 0, 'L'); $pdf->cell(20, 1, "R.U.N:", 0, 0, 'L'); $pdf->cell(0, 1, $rutapo, 0, 1, 'L'); $pdf->cell(20, 3, "", 0, 0); $pdf->cell(90, 3, "-----------------------------------------------------------------------------------", 0, 0, 'L'); $pdf->cell(20, 3, "", 0, 0); $pdf->cell(0, 3, "----------------------------------", 0, 1); $pdf->ln(); $pdf->cell(23, 1, "DIRECCION:", 0, 0); $pdf->cell(0, 1, $direccion, 0, 1); $pdf->cell(23, 5, "", 0, 0); $pdf->cell(0, 5, "--------------------------------------------------------------------------------------------------------------------------------", 0, 1); $pdf->ln(8); $firma = "NANCY JEANETTE ZAMORA MORENO"; $txt = "Debo y Pagaré a la orden del " . $_SESSION['colegio']->nombre . ", {$ciudad}, representante legal: NANCY JEANETTE ZAMORA MORENO R.U.T : 7.495.478 - 2, factor de comercio, ambos domiciliados para estos efectos en calle Portales Nº 1680, de la ciudad de La Ligua, la suma de \$" . $total . ", dicha cantidad la adeudo por concepto de las pertinentes mensualidades correspondientes al alumno(a):"; $pdf->MultiCell(0, 5, $txt); $pdf->ln(15); $pdf->cell(15, 1, "Don(ña):", 0, 0, 'L'); $pdf->cell(110, 1, $nombrecompleto, 0, 0, 'L'); $pdf->cell(13, 1, 'Curso:', 0, 0, 'L');
$pdf->AliasNbPages(); $pdf->SetFont('Arial', '', 9); $pdf->AddPage(); $pdf->Ln(); //Construcción de la tabla a mostrar $pdf->SetY(90); $pdf->SetFont('Arial', 'b', 11); $pdf->Text(23, 80, iconv('utf-8', 'cp1252', 'Item')); $pdf->Text(35, 80, iconv('utf-8', 'cp1252', 'Productos')); $pdf->Text(125, 80, 'Total Ventas'); $pdf->Text(167, 80, iconv('utf-8', 'cp1252', 'Fecha')); $pdf->SetFont('Arial', '', 10); $pdf->Line(20, 82, 190, 82); $pdf->Line(20, 83, 190, 83); $j = 0; foreach ($fila as $key) { $j = $j + 1; $productos = iconv('utf-8', 'cp1252', $key[0]); $TotalVentas = iconv('utf-8', 'cp1252', $key[1]); $fecha = date_format(date_create($key[2]), 'd/m/Y'); $pdf->Text(25, $pdf->GetY(), $j); $pdf->Text(35, $pdf->GetY(), $productos); $pdf->Text(135, $pdf->GetY(), $TotalVentas); $pdf->Text(165, $pdf->GetY(), $fecha); $pdf->cell(0, 6.5, '', 0, 1); } $pdf->cell(0, 8, '', 0, 1); $pdf->Output(); } else { header('Location: ../../index.php'); }
$pdf->SetCreator('Manobo PDF Generator'); $pdf->SetDisplayMode('real'); $pdf->SetAutoPageBreak(true, 25); $pdf->AliasNbPages(); $pdf->AddPage('L'); $margin = 30; $ypos = 10; $cellstart = $margin; $cellsize = 48; $cellsize_half = $cellsize / 2; $cellsizecollweek = $cellsize + $margin; $cell_height_col = 55; $cell_height = 5; $pdf->setXY($margin, $ypos); $pdf->setFont('Arial', 'B', '14'); $pdf->cell(240, 5, 'SALES REPORT WEEKLY PRODUCT KW ' . date('W') . ' (' . date('d.m.Y', strtotime($filter_date)) . ')', 0, 0, 'C'); $pdf->setFont('Arial', '', '10'); $ypos += 10; $pdf->setXY($cellstart, $ypos); $firstorder = true; $no = 1; $catids = load_config('products-categories-sorting'); if (SERVER_IS_LOCAL) { use_class('CategoryTop'); //load all categories which not sorted while ($ct = CategoryTop::getOneByOneAsObject()) { if ($ct->getCategoriesTotalCount() > 0) { while ($cat = $ct->getCategoriesOneByOneAsObject()) { if (!in_array($cat->id, $catids)) { $catids[] = $cat->id; }
$ypos += 10; $pdf->Text($boxes_tab_env, $ypos, "Carton #:"); $pdf->Line($boxes_tab_env + 24, $ypos + 1, 103, $ypos + 1, $solid_style_med); $pdf->Text($boxes_tab_env + 74, $ypos, "of"); $pdf->Line($boxes_tab_env + 80, $ypos + 1, 140, $ypos + 1, $solid_style_med); $ypos += 30; $pdf->setFont('Arial', 'B', '19'); $pdf->Text($margin_env, $ypos, strtoupper($orders_data[$po]['customer_billing_name'])); //CREATE PACKING SLIP $pdf->AddPage(); $pdf->current_page = 1; $pdf->printed_po = "PO # {$po}"; $ypos = $margin; $pdf->setXY($margin, $ypos); $pdf->setFont('Arial', 'B', '12'); $pdf->cell($box_width, $box1_height, "PO # {$po}", 1, 0, 'L'); $pdf->OrderBarcode($po, $barcode_start, $ypos + 1, 0, $barcode_height); //ORDER DETAILS BOX $ypos += $box1_height + $gap_between_boxes; $pdf->setXY($margin, $ypos); $pdf->cell($box_width, $box2_height, "", 1, 0, 'L'); $pdf->setXY($margin, $ypos - 1); $pdf->cell($box_width, 10, "Order Details:"); $pdf->setXY($boxes_tab, $ypos + $lineheight + 2); $pdf->setFont('Arial', '', '12'); $order_details = "PO # {$po} \n"; $order_details .= "Order Placed: " . date('d. F Y', strtotime($orders_data[$po]['order_date'])) . "\n"; if (strtotime($orders_data[$po]['expected_delivery_date_from']) - strtotime($orders_data[$po]['expected_delivery_date_until']) == 0) { $order_details .= "Ship Window: -"; } else { $order_details .= "Ship Window: " . date('d. M. Y', strtotime($orders_data[$po]['expected_delivery_date_from']));
$ya = $yi + $row; include "../config/koneksi.php"; $tahun = $_GET['tahun']; $sql = mysql_query("select * from mst_anggota where status_pegawai = 0") or die("salah sql"); $i = 1; $no = 1; $max = 31; $row = 6; while ($data = mysql_fetch_array($sql)) { $pdf->setXY(35, $ya); $pdf->setFont('arial', '', 6); $pdf->setFillColor(255, 255, 255); if ($data[aktivasi] == 0) { $ak = "Belum Aktif"; } else { $ak = "Sudah Aktif"; } $pdf->cell(20, 5, $data[no_anggota], 1, 0, 'L', 1); $pdf->CELL(20, 5, $data[nama_lengkap], 1, 0, 'C', 1); $pdf->CELL(25, 5, $data[no_ktp], 1, 0, 'C', 1); $pdf->CELL(30, 5, $data[alamat], 1, 0, 'C', 1); $pdf->CELL(15, 5, $data[kota], 1, 0, 'C', 1); $pdf->CELL(15, 5, $ak, 1, 0, 'C', 1); $ya = $ya + $row; $no++; $i++; $dm[kode] = $data[kdprog]; } $pdf->text(120, $ya + 6, "Bandung , " . $tgl); $pdf->text(125, $ya + 20, "MANAGER"); $pdf->Output();
$sinal = chr(253); } else { // senao $sinal = ""; } // defina sinal em branco $pdf->SetFont('zapfdingbats', '', 6); $pdf->Cell(2, 4, $sinal, "", 0, "C", 0); $pdf->SetFont('arial', '', 6); $pdf->Cell($TamNumpar, 4, pg_result($result, $i, "k00_numpar"), "LR", 0, "C", 0); $pdf->Cell($TamNumtot, 4, pg_result($result, $i, "k00_numtot"), "R", 0, "C", 0); $dtoper = pg_result($result, $i, "k00_dtoper"); $dtoper = mktime(0, 0, 0, substr($dtoper, 5, 2), substr($dtoper, 8, 2), substr($dtoper, 0, 4)); $pdf->Cell(13, 4, date("d-m-Y", $dtoper), "R", 0, "C", 0); $pdf->Cell(13, 4, date("d-m-Y", $dtvenc), "R", 0, "C", 0); $pdf->cell(13, 4, $matinsc, "R", 0, "L", 0); $pdf->Cell($TamK01_descr, 4, substr(trim(pg_result($result, $i, "k01_descr")), 0, 20), "R", 0, "L", 0); $pdf->Cell($TamReceit, 4, pg_result($result, $i, "k00_receit"), "R", 0, "C", 0); $pdf->Cell($TamK02_descr, 4, substr(trim(pg_result($result, $i, "k02_descr")), 0, 15), "R", 0, "L", 0); $pdf->SetFont('arial', '', 6); $pdf->Cell($TamVlrhis + 6, 4, db_formatar(pg_result($result, $i, "vlrhis"), 'f'), "R", 0, "R", 0); $pdf->Cell($TamVlrcor + 6, 4, db_formatar(pg_result($result, $i, "vlrcor"), 'f'), "R", 0, "R", 0); $pdf->Cell($TamVlrjuros + 6, 4, db_formatar(pg_result($result, $i, "vlrjuros"), 'f'), "R", 0, "R", 0); $pdf->Cell($TamVlrmulta + 6, 4, db_formatar(pg_result($result, $i, "vlrmulta"), 'f'), "R", 0, "R", 0); $pdf->Cell($TamVlrdesconto + 6, 4, db_formatar(pg_result($result, $i, "vlrdesconto"), 'f'), "R", 0, "R", 0); $pdf->Cell($TamTotal + 6, 4, db_formatar(pg_result($result, $i, "total"), 'f'), "R", 0, "R", 0); $pdf->Cell(1, 4, "", 0, 1, 0, 0); $tothisp += pg_result($result, $i, "vlrhis"); $totcorp += pg_result($result, $i, "vlrcor"); $totjurosp += pg_result($result, $i, "vlrjuros"); $totmultap += pg_result($result, $i, "vlrmulta");
<?php $pdf = new PDF(); $pdf->FPDF('P', 'mm', 'Letter'); $pdf->AddPage(); $title = 'PAGARÉ '; $pdf->SetFont('Arial', 'B', 12); $pdf->CELL(0, 5, $title, 0, 1, 'C'); $pdf->ln(15); $pdf->SetFont('Arial', '', 10); $pdf->cell(20, 1, "DEUDOR:", 0, 0, 'L'); $pdf->cell(100, 1, $nombreapo, 0, 0, 'L'); $pdf->cell(20, 1, "R.U.N:", 0, 0, 'L'); $pdf->cell(0, 1, $rutapo, 0, 1, 'L'); $pdf->cell(20, 3, "", 0, 0); $pdf->cell(90, 3, "-----------------------------------------------------------------------------------", 0, 0, 'L'); $pdf->cell(20, 3, "", 0, 0); $pdf->cell(0, 3, "----------------------------------", 0, 1); $pdf->ln(); $pdf->cell(23, 1, "DIRECCION:", 0, 0); $pdf->cell(0, 1, $direccion, 0, 1); $pdf->cell(23, 5, "", 0, 0); $pdf->cell(0, 5, "-----------------------------------------------------------------------------------------------------------------------------", 0, 1); $pdf->ln(2); $pdf->cell(23, 1, "FONO:", 0, 0); $pdf->cell(0, 1, $telefono, 0, 1); $pdf->cell(23, 5, "", 0, 0); $pdf->cell(0, 5, "-------------------------", 0, 1); $pdf->ln(8); $firma = "SOCIEDAD EDUCACIONAL OSORIO Y ZAMORA LIMITADA"; $txt = "Debo y pagaré a la orden de SOCIEDAD EDUCACIONAL OSORIO Y ZAMORA LTDA., RUT 79.995.880-5 domicilio en calle Errazuriz N 295 de Cabildo la suma de \$" . $total . ", Dicha cantidad la adeudo por concepto de las pertinentes mensualidades del alumno(a):";
//**************************************** P D F Servidor Público ***********************************************// if (isset($sHeader) && $sHeader == 'E') { $sImpHeader = "Esqueci Minha Senha"; } else { if (isset($sHeader) && $sHeader == 'P') { $sImpHeader = "Pedido de Senha"; } } $head4 = "Informações Servidor Público"; $head5 = $sImpHeader; $pdf = new PDF(); $pdf->Open(); $pdf->aliasNBpages(); $pdf->setfillcolor(235); $pdf->Addpage(); $pdf->cell(30, 5, '', 0, 1, "L", 0); $pdf->cell(30, 5, '', 0, 1, "L", 0); $pdf->SetFont('Arial', 'b', 8); $pdf->cell(30, 5, 'Nº do CGM:', 0, 0, "L", 1); $pdf->cell(0, 5, $z01_numcgm, 0, 1, "L", 1); $pdf->cell(30, 5, 'Nome:', 0, 0, "L", 0); $pdf->cell(0, 5, $z01_nome, 0, 1, "L", 0); $pdf->cell(30, 5, 'Matricula:', 0, 0, "L", 1); $pdf->cell(0, 5, $rh01_regist, 0, 1, "L", 1); $sCgCcPf = trim($z01_cgccpf); if (strlen($sCgCcPf) <= 11) { $sTipo = "cpf"; } else { $sTipo = "cnpj"; } $pdf->cell(30, 5, 'CPF:', 0, 0, "L", 0);
} if ($image3 != "" && file_exists(ATLAS11_PHOTOS_PATH . $image3)) { $size = getimagesize(ATLAS11_PHOTOS_PATH . $image3); $largeur = $size[0]; $hauteur = $size[1]; $ratio = 60 / $hauteur; //hauteur imposée de 60 mm $newlargeur = $largeur * $ratio; $posi = 115 + (90 - $newlargeur) / 2; $pdf->Image(ATLAS11_PHOTOS_PATH . $image3, $posi, $yphotos, null, 60); $yphotos += 64; if (strlen($image3t) > 0) { $pdf->SetXY(115, $yphotos - 4); $pdf->SetFont("Arial", "I", 8); $pdf->SetTextColor(70, 130, 180); $pdf->cell(90, 4, $image3t, 0, 0, 'C', false); } } if ($image4 != "" && file_exists(ATLAS11_PHOTOS_PATH . $image4)) { $size = getimagesize(ATLAS11_PHOTOS_PATH . $image4); $largeur = $size[0]; $hauteur = $size[1]; $ratio = 60 / $hauteur; //hauteur imposée de 60 mm $newlargeur = $largeur * $ratio; $posi = 115 + (90 - $newlargeur) / 2; $pdf->Image(ATLAS11_PHOTOS_PATH . $image4, $posi, $yphotos, null, 60); $yphotos += 64; if (strlen($image4t) > 0) { $pdf->SetXY(115, $yphotos - 4); $pdf->SetFont("Arial", "I", 8);
/** * * @global array $DIAMOND_BRAND_IDS * @global string $server * @global jng_sp $class_sp * @global products_minierp $class_pm * @global logger $logger * @global string $icon_diamond * @global string $icon_gold_585_w * @global string $icon_gold_585_g * @param string $timestamp * @param int $jng_sp_id * @return boolean */ function generateReports($timestamp, $jng_sp_id) { global $DIAMOND_BRAND_IDS, $server, $class_sp, $class_pm, $logger, $icon_diamond, $icon_gold_585_w, $icon_gold_585_g; $log_date = strtotime($timestamp); $sp_detail = $jng_sp_id > 0 ? $class_sp->retrieveDetail($jng_sp_id) : array('package_prefix' => 'JG.DE'); $filter_sold = 1; $filter_age = 56; $logger->write("GENERATING REPORT {$sp_detail['package_prefix']}"); /* * Query get new products which: * 1) age <= 8 weeks (56 days) * 2) total sold >= 1 */ $q = "SELECT p.products_id, p.products_model, p.products_image, p.products_price, p.material_expenses, p.stars "; $q .= " , ptc.categories_id AS catid, cd.categories_name"; $q .= " , IFNULL(plps.sold_monthly_1, 0) AS sold_monthly_1, IFNULL(plps.sold_monthly_2, 0) AS sold_monthly_2"; if ($jng_sp_id > 0) { $q .= " , ((jc.total_returned / jc.total_sold) * 100) AS returned_rate, jc.active_age"; } else { $q .= " , 'N/A' AS returned_rate, DATEDIFF(NOW(), p.products_date_added) AS active_age"; } $q .= " FROM products p"; if ($jng_sp_id > 0) { $q .= " INNER JOIN jng_sp_catalog jc ON jc.jng_sp_id = {$jng_sp_id} AND jc.products_id = p.products_id"; } else { $q .= " INNER JOIN orders_products op ON op.products_id = p.products_id"; } $q .= " LEFT JOIN products_log_per_sp plps ON plps.products_id = p.products_id AND plps.jng_sp_id = {$jng_sp_id}"; $q .= " LEFT JOIN products_to_categories ptc ON ptc.products_id = p.products_id"; $q .= " LEFT JOIN categories_description cd ON cd.categories_id = ptc.categories_id AND cd.language_id = 1"; $q .= " WHERE"; if ($jng_sp_id > 0) { $q .= " jc.active_age <= {$filter_age}"; $q .= " AND jc.active_status = 1"; $q .= " AND total_sold >= {$filter_sold}"; } else { //$q .= " p.products_date_added >= '2013-01-01 00:00:00'"; $q .= " DATEDIFF(NOW(), p.products_date_added) <= {$filter_age}"; $q .= " AND p.products_status = 1"; $q .= " AND op.status NOT IN (10, 12)"; $q .= " GROUP BY p.products_id"; $q .= " HAVING SUM(op.products_quantity) >= {$filter_sold}"; } //$q .= " LIMIT 5"; $dbq = tep_db_query($q); $products = array(); while ($row = tep_db_fetch_array($dbq)) { $row['margin'] = $class_pm->calculateMargin($row['products_price'], $row['material_expenses'], 1); $products[$row['catid']][$row['products_id']] = $row; } if (count($products) == 0) { $logger->write("NO DATA RETRIEVED"); return false; } //Start Creating PDF Reports $margin = 20; $ypos = 10; $col_width = 48; $col_height = 77; $line_height = 5; $cell_text_width = $col_width - 3; $no = 0; $row = 1; $icon_w = 4; $icon_h = 4; $first_page = true; $pdf = new PDF('P', 'mm', 'A4'); $pdf->setTitle('New Comer Report'); $pdf->SetAuthor('JULIE GRACE'); $pdf->SetCreator('Manobo PDF Generator'); $pdf->SetDisplayMode('real'); $pdf->SetAutoPageBreak(true, 25); $pdf->AliasNbPages(); $pdf->AddPage('L'); $pdf->setXY($margin, $ypos); $pdf->setFont('Arial', 'B', '14'); $pdf->cell(240, 5, 'SALES REPORT NEWCOMER PRODUCT ' . $sp_detail['package_prefix'] . ' (' . date('d.m.Y', $log_date) . ')', 0, 0, 'C'); $pdf->setFont('Arial', '', '10'); $ypos += 15; $pdf->setXY($margin, $ypos); $catids = load_config('products-categories-sorting'); foreach ($catids as $catid) { $xpos = $margin; if (is_array($products[$catid])) { foreach ($products[$catid] as $pid => $p) { $obj_product = new product($pid); $no++; if ($ypos >= 150 || $no == 1 && !$first_page) { //Reset vars to new page state $xpos = $margin; $ypos = 25; $row = 1; $pdf->AddPage('L'); $pdf->setXY($margin, $ypos); } //Draw product box $pdf->Cell($col_width, $col_height, '', 1, 0); //Start drawing contents $pdf->drawProductsImage($xpos + 10, $ypos + 1, $p['products_image']); if (is_object($obj_product) && in_array($obj_product->brand_id, $DIAMOND_BRAND_IDS)) { $ypos_icon = $ypos + 3; $pdf->drawIcon($icon_diamond, $xpos + 39.5, $ypos_icon, $icon_w, $icon_h); } if (is_object($obj_product) && ($obj_product->metal_stamp_code > 0 && $obj_product->metal_stamp_code != 925)) { $icon_gold_selected = "icon_gold_" . $obj_product->metal_stamp_code . '_' . strtolower(substr($obj_product->metal_stamp_info, 0, 1)); $icon_gold = ${$icon_gold_selected}; $ypos_icon += $icon_h; //gold icon dimension is 21 x 16 $icon_gold_w = 21 / 16 * $icon_h; $pdf->drawIcon($icon_gold, $xpos + 38, $ypos_icon, $icon_gold_w, $icon_h); } $pdf->setXY($xpos + 2, $ypos + 3); $pdf->setFont('Arial', 'B', '10'); $pdf->Cell($col_width, $line_height, $no . ". " . ($no == 1 ? $p['categories_name'] : '')); $pdf->setFont('Arial', '', '10'); $pdf->drawStar($p['stars'], $xpos + 15, $ypos + 29); $pdf->setXY($xpos + 2, $ypos + 35); $link = "http://{$server}/?open=product-detail&products_id=" . $pid; $pdf->SetFont('Arial', 'U'); $pdf->SetTextColor(0, 0, 255); $pdf->Cell($cell_text_width, $line_height, $pid . ' / ' . $p['products_model'], 0, 0, 'C', 0, $link); $pdf->SetFont('Arial', ''); $pdf->SetTextColor(0, 0, 0); $pdf->setXY($xpos + 2, $ypos + 40); $pdf->Cell($cell_text_width, $line_height, 'Price: ' . displayCurrency('EUR', $p['products_price'], false) . ' EUR', 0, 0, 'C'); $pdf->setXY($xpos + 2, $ypos + 45); $pdf->Cell($cell_text_width, $line_height, 'Margin: ' . number_format($p['margin'], 1) . '%', 0, 0, 'C'); $pdf->setXY($xpos + 2, $ypos + 50); $pdf->Cell($cell_text_width, $line_height, 'Return Rate: ' . ($jng_sp_id > 0 ? number_format($p['returned_rate'], 1) . '%' : $p['returned_rate']), 0, 0, 'C'); $pdf->setXY($xpos + 2, $ypos + 60); $pdf->Cell($cell_text_width, $line_height, 'Age in ' . ($jng_sp_id > 0 ? 'SP' : 'JG') . ': ' . $p['active_age'] . ' days', 0, 0, 'C'); $pdf->setXY($xpos + 2, $ypos + 65); $pdf->Cell($cell_text_width, $line_height, 'Sold L30D in ' . ($jng_sp_id > 0 ? 'SP' : 'JG') . ': ' . $p['sold_monthly_1'], 0, 0, 'C'); $pdf->setXY($xpos + 2, $ypos + 70); $pdf->Cell($cell_text_width, $line_height, 'Sold L60D in ' . ($jng_sp_id > 0 ? 'SP' : 'JG') . ': ' . $p['sold_monthly_2'], 0, 0, 'C'); if ($no % 5 == 0) { $row++; $xpos = $margin; $ypos += $col_height * ($row - 1) + 5; } else { $xpos += $col_width + 5; } $pdf->setXY($xpos, $ypos); } $first_page = false; } $no = 0; } $filepath = 'sales-report-newcomer-products/'; $yeardir = $filepath . date('Y/', $log_date); if (!file_exists(DIR_FS_ARCHIVES . $yeardir) || !is_dir(DIR_FS_ARCHIVES . $yeardir)) { mkdir(DIR_FS_ARCHIVES . $yeardir); } $monthdir = $yeardir . date('m/', $log_date); if (!file_exists(DIR_FS_ARCHIVES . $monthdir) || !is_dir(DIR_FS_ARCHIVES . $monthdir)) { mkdir(DIR_FS_ARCHIVES . $monthdir); } $path_location = DIR_FS_ARCHIVES . $monthdir; $filename = date('YmdHi', strtotime($timestamp)) . '-sales-report-newcomer-products-' . $sp_detail['package_prefix'] . '.pdf'; $pdf->Output($path_location . $filename, 'F'); $logger->write("PDF CREATED: {$filename}"); //$pdf->Output($filename, 'D'); return true; }
$parrafo = "La repitencia del alumno/a será considerada causal de término del presente contrato, haciendo imposible su renovación. Sin embargo, el COLEGIO podrá, tratándose de la primera repitencia, considerar la situación personal del afectado y evaluar su continuidad en el establecimiento."; $pdf->MultiCell(0, 5, $parrafo); $pdf->SetFont('Arial', 'U', 10); $pdf->ln(2); $pdf->CELL(0, 5, "UNDÉCIMO:", 0, 1, 'L'); $pdf->ln(2); $pdf->SetFont('Arial', '', 10); $parrafo = "Las partes declaran expresamente que se libera al COLEGIO de toda responsabilidad por los daños ocasionados a los alumnos, apoderados o terceros, cuando éstos provengan de un caso fortuito o de fuerza mayor, cuando éste se produzca en dependencias del Colegio o fuera de ellas"; $pdf->MultiCell(0, 5, $parrafo); $pdf->SetFont('Arial', 'U', 10); $pdf->ln(2); $pdf->CELL(0, 5, "DUODÉCIMO:", 0, 1, 'L'); $pdf->ln(2); $pdf->SetFont('Arial', '', 10); $parrafo = "El presente contrato comenzará a regir desde la fecha de su suscripción, y durará hasta el término del año escolar 2014, podrá ser renovado por el mutuo y expreso acuerdo de las partes, que se demostrará por la suscripción de un nuevo contrato."; $pdf->MultiCell(0, 5, $parrafo); $pdf->SetFont('Arial', 'U', 10); $pdf->ln(2); $pdf->CELL(0, 5, "DÉCIMO TERCERO:", 0, 1, 'L'); $pdf->ln(2); $pdf->SetFont('Arial', '', 10); $parrafo = "El presente documento se suscribe en dos ejemplares, quedando uno en poder del APODERADO y otro en poder del COLEGIO."; $pdf->MultiCell(0, 5, $parrafo); $pdf->ln(25); $pdf->cell(40, 6, "___________________", 0, 0, "C"); $pdf->cell(80, 6, "", 0, 0, "C"); $pdf->cell(0, 6, "________________________________", 0, 1, "C"); $pdf->cell(40, 1, "Apoderado", 0, 0, "C"); $pdf->cell(80, 1, "", 0, 0, "C"); $pdf->cell(0, 1, "(Repte. Colegio)", 0, 1, "C"); $pdf->Output();
//$pacientes = $con->conectar(); //$strConsulta = "SELECT * from paciente where id_paciente = '$paciente'"; //$pacientes = mysql_query($strConsulta); //$f1 = mysql_fetch_array($pacientes); $pdf = new PDF('L', 'mm', 'Letter'); $pdf->Open(); $pdf->AddPage(); $pdf->SetMargins(20, 20, 20); //$historial = $con->conectar(); //strConsulta = "SELECT * FROM recetas WHERE id_paciente = '$paciente'"; //$historial = mysql_query($strConsulta); //$numfilas = mysql_num_rows($historial); //$fila = mysql_fetch_array($historial); $pdf->SetFont('Arial', '', 8); $pdf->SetTextColor(220, 50, 50); $pdf->cell(222, -10, 'Recibo No [' . $id . ' ]', 0, 0, 'C'); $pdf->Ln(1); $pdf->SetFont('Arial', '', 10); //$pdf->SetWidths(array(150, 90)); //$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(2); //$pdf->Row(array('Comprador:'.$p , 'Fecha: '.$f), 0); $pdf->Cell(0, 6, 'Atendio: ', 0, 1); $pdf->Cell(0, 6, 'Fecha: ', 0, 1); $pdf->Cell(0, 6, 'Comprador: ', 0, 1); $pdf->Ln(2); $pdf->SetFont('Arial', '', 10); $pdf->SetWidths(array(100, 20, 30, 30)); $pdf->SetFillColor(255, 255, 255); $pdf->SetTextColor(2); $pdf->Row(array('Descripcion', ' Cantidad', 'Precio Unit', 'Precio'), 0);
$firstorder = true; foreach ($clean_picklists as $bin_code => $data) { if ($ypos >= 260 || $order_counter >= $order_counter_max) { $pdf->AddPage(); $ypos = $margin; $order_counter = 0; } else { if (!$firstorder) { $pdf->SetDrawColor(200, 200, 200); $pdf->Line($margin - 5, $ypos - 5, 210 - $margin, $ypos - 5); } } $order_counter++; $pdf->setXY($margin, $ypos); $pdf->setFont('Arial', 'B', '14'); $pdf->cell($counter_size, 5, $class_bin->getCleanBinCode($data['code']), 0, 0, 'C'); if ($data['products_ean'] != '') { $pdf->EANBarcode($data['products_ean'], $barcode_start, $ypos, $barcode_width); } $pdf->setFont('Arial', 'B', '12'); //$pdf->cell($barcode_start+20, 40, $data['products_ean'], 0, 0, 'C'); $pdf->setXY($cellstart, $ypos); $pdf->setFont('Arial', 'B', '10'); $pdf->Cell($cell1size, $cell_height, 'PRODUCT ID'); $pdf->Cell($cell1size, $cell_height, 'ARTICLE ID'); $pdf->Cell($counter_size + 10, $cell_height, 'QTY'); $pdf->Cell($counter_size, $cell_height, 'QTY ACTUAL', 0, 1); $pdf->setFont('Arial', '', '10'); $pdf->setX($cellstart); $pdf->Cell($cell1size, $cell_height + 10, $data['products_id']); $pdf->Cell($cell1size, $cell_height + 10, $data['articles_id']);
$head3 = "Consulta de Processo "; $head4 = "Processo N° {$codproc}"; $pdf = new PDF(); $pdf->Open(); $pdf->AliasNbPages(); $pdf->addpage('L'); $total = 0; $pdf->setfillcolor(235); $pdf->setfont('arial', 'b', 8); $troca = 1; $alt = 4; $total = 0; $result_protprocesso = $clprotprocesso->sql_record($clprotprocesso->sql_query($codproc)); if ($clprotprocesso->numrows != 0) { db_fieldsmemory($result_protprocesso, 0); $pdf->cell(50, $alt, 'Número de Controle do Processo :', 0, 0, "R", 0); $pdf->cell(75, $alt, $codproc, 0, 1, "L", 0); $pdf->cell(50, $alt, 'Número do Processo :', 0, 0, "R", 0); $pdf->cell(75, $alt, $p58_numero . '/' . $p58_ano, 0, 0, "L", 0); $pdf->cell(50, $alt, 'Titular do Processo :', 0, 0, "R", 0); $pdf->cell(75, $alt, $z01_nome, 0, 1, "L", 0); $pdf->cell(50, $alt, 'Data :', 0, 0, "R", 0); $pdf->cell(75, $alt, db_formatar($p58_dtproc, 'd'), 0, 0, "L", 0); $pdf->cell(50, $alt, 'Hora :', 0, 0, "R", 0); $pdf->cell(75, $alt, $p58_hora, 0, 1, "L", 0); $pdf->cell(50, $alt, 'Tipo :', 0, 0, "R", 0); $pdf->cell(75, $alt, $p51_descr, 0, 0, "L", 0); $pdf->cell(50, $alt, 'Atendente :', 0, 0, "R", 0); $pdf->cell(75, $alt, $nome, 0, 1, "L", 0); $pdf->cell(50, $alt, 'Requerente :', 0, 0, "R", 0); $pdf->cell(75, $alt, $p58_requer, 0, 0, "L", 0);
$this->Ln(5); $this->Cell(220, 12, 'www.endoperio.com.mx', 0, 10, 'C'); } } $id = $_GET['id']; $p = $_GET['p']; $f = $_GET['f']; $m = $_GET['m']; $o = $_GET['o']; $pdf = new PDF('L', 'mm', 'Letter'); $pdf->Open(); $pdf->AddPage(); $pdf->SetMargins(20, 20, 20); $pdf->SetFont('Arial', '', 8); $pdf->SetTextColor(220, 50, 50); $pdf->cell(222, -10, 'Receta No [' . $id . ' ]', 0, 0, 'C'); $pdf->Ln(1); $pdf->SetWidths(array(150, 90)); $pdf->SetFont('Arial', '', 10); $pdf->SetFillColor(255, 255, 255); $pdf->SetTextColor(2); $pdf->Row(array('Paciente : _' . $p, 'Fecha : _' . $f), 0); $pdf->Ln(5); $pdf->SetTextColor(0); $pdf->Cell(0, 3, 'Medicamento: ', 0, 1); $pdf->Write(6, "____________________________________________________________________________________________________________________"); $pdf->Ln(8); $miarreglo = $m; $renglon = explode('<br />', $miarreglo); $i = 0; while ($i <= 10) {
$pdf->AliasNbPages(); $head2 = "Relatório de Empenhos por CGM"; $head3 = "CGM:" . $numcgm; $pri = true; $p = 0; $flt_vlrcorr = 0; $flt_juro = 0; $flt_multa = 0; $flt_desconto = 0; for ($x = 0; $x < $clempempenho->numrows; $x++) { db_fieldsmemory($result, $x); if ($pdf->gety() > $pdf->h - 30 || $pri == true) { $pdf->addpage(); $pdf->setfillcolor(235); $pdf->setfont('arial', 'b', 7); $pdf->cell(19, 4, "Empenho", 1, 0, "C", 1); $pdf->cell(19, 4, "Dotação", 1, 0, "C", 1); $pdf->cell(20, 4, "Emissão", 1, 0, "C", 1); $pdf->cell(19, 4, "Ordem", 1, 0, "C", 1); $pdf->cell(19, 4, "Nº Lic.", 1, 0, "C", 1); $pdf->cell(19, 4, "NF", 1, 0, "C", 1); $pdf->cell(19, 4, "Valor Emp.", 1, 0, "C", 1); $pdf->cell(19, 4, "Valor Liq.", 1, 0, "C", 1); $pdf->cell(19, 4, "Valor Pago", 1, 0, "C", 1); $pdf->cell(19, 4, "Valor Anul.", 1, 1, "C", 1); $pri = false; } $pdf->setfont('arial', '', 7); $pdf->cell(19, 4, $e60_numemp, 0, 0, "R", $p); $pdf->cell(19, 4, $e60_coddot, 0, 0, "R", $p); $pdf->cell(20, 4, db_formatar($e60_emiss, "d"), 0, 0, "C", $p);
$pdf->Cell(22, 8, number_format($Total, 2), 1, 0, "C"); $pdf->Ln(); $alto = $alto + 8; $pdf->SetXY(14, $alto); $suma = $suma + $Total; } //Calculando el SubTotal, Igv y Total a pagar $SubTotal = $suma / 1.18; $Igv = $SubTotal * 0.18; $arrayTotal[] = array('SUBTOTAL' => number_format($SubTotal, 2), 'I.G.V.' => number_format($Igv, 2), 'TOTAL' => $suma); // Damos formato al texto en negrita $pdf->SetFont('Arial', 'b', 9); $pdf->Cell(120, 5, 'SON:', 1, 0, "L"); $pdf->Cell(20, 5, 'SUBTOTAL', 1, 0, "C"); $pdf->Cell(20, 5, 'I.G.V.', 1, 0, "C"); $pdf->Cell(22, 5, 'TOTAL', 1, 0, "C"); $pdf->Ln(); $pdf->SetXY(14, $alto + 5); //Recorremos nuestros datos a mostrar foreach ($arrayTotal as $key) { $con_letra = strtoupper($moneda->ValorEnLetras($key['TOTAL'], "con")); $pdf->Cell(120, 5, $con_letra, 1, 0, "L"); $pdf->Cell(20, 5, $key['SUBTOTAL'], 1, 0, "C"); $pdf->Cell(20, 5, $key['I.G.V.'], 1, 0, "C"); $pdf->Cell(22, 5, $key['TOTAL'], 1, 0, "C"); } $pdf->cell(0, 8, '', 0, 1); $pdf->Output(); } else { header('Location: ../../index.php'); }
$pdf->SetFont('Arial', '', 6); $pdf->Ln(); if ($pdf->GetY() > 140 and $pdf->col < 1) { $pdf->AcceptPageBreak(); } if ($pdf->GetY() > 140 and $pdf->col > 0) { //$pdf->lewat=true; // $pdf->AcceptPageBreak(); //$pdf->SetY(277-$pdf->GetY()); $r = 275 - $pdf->GetY(); $pdf->Cell(80, $r, '', 0, 1, 'L'); //$pdf->ln(); } //else //$pdf->lewat=false; $pdf->cell(-1, 3, '', 0, 0, 'L'); } } else { $pdf->Image('images/logo.jpg', $pdf->GetX(), $pdf->GetY(), 10); $pdf->SetX($pdf->getX() + 8); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(70, 5, $_SESSION['org']['namaorganisasi'], 0, 1, 'L'); $pdf->SetFont('Arial', '', 5); $pdf->Cell(60, 3, 'NOT FOUND', 'T', 0, 'L'); } $pdf->Output(); break; /*case'excel': //periode gaji $bln=explode('-',$perod); $idBln=intval($bln[1]);
function Header() { // Logo $this->image('logo.png', 10, 6, 30); // Arial bold 15 $this->setFont('Arial', 'B', 15); // Move to the right $this->cell(80); // Title $this->cell(30, 10, 'Title', 1, 0, 'C'); // Line break $this->ln(20); } // Page footer function Footer() { // Position at 1.5 cm from bottom $this->setY(-15); // Arial italic 8 $this->setFont('Arial', 'I', 8); // Page number $this->cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C'); } } // Instanciation of inherited class $pdf = new PDF(); $pdf->aliasNbPages()->addPage()->setFont('Times', '', 12); for ($i = 1; $i <= 40; $i++) { $pdf->cell(0, 10, 'Printing line number ' . $i, 0, 1); } $pdf->output();