$pdf = new PDF('P', 'cm', 'A4'); $pdf->SetDisplayMode(100, 'continuous'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 'cm', 12); $pdf->Cell(19.2, 0.4, 'Protocolo de Atendimento nº ' . $pedido->id_pedido, '', 1, 'C'); $pdf->Ln(1); $pdf->SetFont('Arial', '', 10); $pdf->Cell(19.2, 0.4, invert($pedido->data, '/', 'PHP'), '', 1, 'R'); $pdf->Cell(19.2, 0.6, 'Cliente: ' . $pedido->nome, 'LRT', 1); $pdf->Cell(19.2, 0.6, 'CPF: ' . $pedido->cpf, 'RL', 1); $pdf->Cell(19.2, 0.6, 'Endereço: ' . $pedido->cidade . '/' . $pedido->estado . ' - ', 'RL', 1); $pdf->Cell(19.2, 0.6, 'Atendente: ' . $pedido->contato, 'LR', 1); $pdf->Cell(19.2, 0.6, 'Telefone: ' . $pedido->tel, 'LR', 1); $pdf->Cell(9.199999999999999, 0.6, 'Origem: ' . $pedido->origem, 'LB', 0); $pdf->setX(10.2); $pdf->Cell(10, 0.6, 'Forma Pagamento: ' . $pedido->forma_pagamento, 'RB', 1, 'R'); $pdf->Ln(); $dias = -1; $valor = 0; for ($i = 0; $i < count($item); $i++) { $texto = 'O.S.: #' . $item[$i]['id_pedido'] . '/' . $item[$i]['ordem'] . ' - Serviço: ' . $item[$i]['servico'] . ' ' . '(' . $item[$i]['departamento'] . ')'; $pdf->Cell(16.2, 0.75, $texto, 1, 0); $pdf->Cell(3, 0.75, 'R$ ' . $item[$i]['valor'], 1, 1, 'R'); $valor += $item[$i]['valor']; if ($dias < $item[$i]['dias']) { $dias = $item[$i]['dias']; } } $prazo = somar_dias_uteis($pedido->data, $dias); $financeiroDAO = new FinanceiroDAO();
if ($ypos >= 260) { $pdf->AddPage(); $pdf->current_page++; $pdf->printed_po = "PO # {$po}"; $ypos = $margin; if (!$firstorder) { $pdf->setXY($cellstart, $ypos); $pdf->setFont('Arial', 'B', '12'); $pdf->Cell($cell1size, $cell_height, 'EAN', 1, 0, 'L'); $pdf->Cell($cell2size, $cell_height, 'Title', 1, 0, 'L'); $pdf->Cell($cell3size, $cell_height, 'Submitted', 1, 0, 'C'); $pdf->Cell($cell4size, $cell_height, 'Accepted', 1, 1, 'C'); $ypos += $cell_height; } } $pdf->setX($cellstart); $pdf->setFont('Arial', '', '12'); $lange_text = ''; $lange2_text = ''; $grosse_text = ''; $grosse2_text = ''; $grosse3_text = ''; //DECODING utf-8 IF billing_text IS utf-8 if (preg_match('!\\S!u', $dt['billing_text'])) { $dt['billing_text'] = utf8_decode($dt['billing_text']); } /*REPLACE THIS COMMENT WITH "SEARCHING 925 Silber" SINCE AMAZON SUDDENLY ALSO REMOVE Lange text SO IT NOT CAPTURED BY THIS METHOD $lange_text = strstr($dt['billing_text'], 'Länge'); $grosse_text = strstr($dt['billing_text'], 'Größe'); $grosse2_text = strstr($dt['billing_text'], 'Gr.'); $added_cell_height = 0;
$pdf->ln(); $pdf->Cell(26, 5, $desc_status); $pdf->SetFont("Arial", "B", 10); $pdf->Cell(80, 5, $dados["atividade_nome"]); $pdf->SetFont("Arial", "", 10); $pdf->Cell(14, 5, $dados["atividade_dias"], 0, 'C'); $pdf->Cell(30, 5, DataMySQLRetornar($dados["data_prazo"])); if ($dados["data_execucao"] != '0000-00-00') { $pdf->Cell(30, 5, DataMySQLRetornar($dados["data_execucao"])); } else { $pdf->Cell(30, 5, ' '); } $pdf->Cell(0, 5, $dados["usuario_nome"]); if ($dados["obs"] != '') { $pdf->ln(); $pdf->setX(36); $pdf->SetFont("Arial", "I", 9); $pdf->Multicell(0, 3, $dados["obs"]); $pdf->SetFont("Arial", "", 10); } $quebra = $dados["evento_id"]; } $pdf->SetFont("Arial", "B", 10); $pdf->ln(); $pdf->Cell(0, 6, "Total Geral de Atividades: " . $registros, "T"); $pdf->ln(); $pdf->Cell(0, 6, "Em Aberto: " . $soma_aberto, "T"); $pdf->ln(); $pdf->Cell(0, 6, "Concluídas: " . $soma_fechado, "T"); //Gera o PDF $pdf->Output();
$pdf->SetFont('Arial', 'U', 6); $pdf->Cell(0, 40, '', 0, 1); $pdf->Cell(0, 5, utf8_decode('Biothys GmbH | Gewerbestr. 6 | D-77731 Willstätt'), 0, 1, 'L', false); $pdf->SetFont('Arial', '', 10); $pdf->Cell(0, 5, utf8_decode($company->getName()), 0, 1, 'L', false); $pdf->Cell(0, 5, utf8_decode($receiving_address->getLine() . ' ' . $receiving_address->getComplement()), 0, 1, 'L', false); $pdf->Cell(0, 5, utf8_decode($receiving_address->getZip() . ' ' . $receiving_address->getCity() . ' ' . $receiving_address->getCountry()), 0, 1, 'L', false); //Marge left $pdf->SetFont('Arial', 'B', 20); $pdf->Cell(180, 15, utf8_decode('Invoice for samples'), 0, 1, 'R', false); //Marge top $pdf->Cell(0, 10, '', 0, 1); //CellBorder//remplacer le ust-id quand il sera setup $pdf->SetFont('Arial', 'B', 11); $pdf->Cell(185, 21, '', 1); $pdf->setX($pdf->GetX() - 185); $pdf->setY($pdf->GetY() + 2); $pdf->FirstTable(array(array(utf8_decode('n° :'), $id_document, date('d.m.y', $order->getDate_entry())), array('UST-ID :', $company->getUst_id(), $order->getEmployee()->getSurname() . ' ' . $order->getEmployee()->getName()), array('Your ID :', $company->getId(), '1/1'))); $pdf->SetFont('Arial', '', 8); $pdf->setY($pdf->GetY() + 2); $pdf->MultiCell(100, 3, utf8_decode($text_intro)); $pdf->setY($pdf->GetY() + 2); $pdf->SecondTable($order); $pdf->setY($pdf->GetY() + 5); $pdf->SetFont('Arial', '', 8); $pdf->SetTextColor(0); // Delivery Address $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(180, 6, utf8_decode('Delivery Address : '), 0, 1, 'L', false); $pdf->SetFont('Arial', '', 8); $delivery_address = new address($order->getId_delivery_address());
// CREAR PDF $pdf = new PDF('Landscape', 'mm', 'Letter', $header); $pdf->AliasNbPages(); $pdf->AddPage(); $fs = 8; $lh = 8; $pdf->SetFont('Arial', '', $fs); $pdf->SetFillColor(255, 255, 255); $pdf->SetDrawColor(0, 0, 0); $pdf->Ln(2); $y = $pdf->getY(); $x = $pdf->getX(); $pdf->Celda(256, 160, '', 1, 1, '', true); $y2 = $pdf->getY(); $pdf->setY($y + 1); $pdf->setX($x + 1); $pdf->Celda(20, 5, 'Estado: ', 0, 0, '', true); $pdf->Celda(100, 5, $pdf->capitalizar($header['estado']), 'B', 0, '', true); $pdf->Celda(20, 5, 'Municipio: ', 0, 0, '', true); $pdf->Celda(110, 5, $pdf->capitalizar($header['municipio']), 'B', 1, '', true); $y = $pdf->getY(); $pdf->setY($y + 1); $pdf->setX($x + 1); $pdf->Celda(50, 5, 'Unidad de Trabajo o Dependencia: ', 0, 0, '', true); $pdf->Celda(200, 5, $pdf->capitalizar($header['dependencia']), 'B', 1, '', true); $yt = $pdf->getY(); $pdf->setX($yt + 1); $pdf->setX($x + 1); $lh2 = 5; $yt = $pdf->getY(); $pdf->setY($yt + 5);
$iLinhasConsultaAtividade = $oIssSimulaCalculoAtividade->numrows; $head4 = "BIC simulada de Alvara"; $pdf = new PDF(); $pdf->Open(); $pdf->AliasNbPages(); $total = 0; $alt = 4; $pri = true; for ($iInd = 0; $iInd < $iLinhasConsulta; $iInd++) { $oDados = db_utils::fieldsmemory($rsSimulacaoCalculo, $iInd); if ($pdf->gety() > $pdf->h - 30 || $pri == true) { $pdf->addpage(""); $pdf->setfillcolor(235); $titulo = 9; $texto = 8; $pdf->setX(5); $pdf->SetFont('Arial', 'B', $titulo); $pdf->Cell(200, 4, "Dados Cadastrais da Simulação de Alvará", "LRBT", 1, "C", 0); $pdf->setX(5); $pdf->Cell(200, 4, "", "", 1, "C", 0); $pdf->setX(10); $pdf->SetFont('Arial', '', $titulo); $pdf->Cell(30, 4, "Nome:", "", 0, "L", 1); $pdf->SetFont('Arial', '', $texto); $pdf->Cell(60, 4, "{$oDados->q130_razaosocial}", "", 0, "L", 0); $pdf->Cell(30, 1, "", "", 0, "R", 0); $pdf->Cell(60, 1, "", "", 0, "L", 0); //lado direito da tela $pdf->setX(105); $pdf->SetFont('Arial', '', $titulo); $pdf->Cell(30, 4, "CNPJ/CPF:", "", 0, "L", 1);
$this->SetY(-15); $this->SetFont('Arial', 'B', 8); $this->Cell(100, 10, 'Angytours Reporte de Ventas ', 0, 0, 'L'); } } // $paciente= $_GET['id']; // $con = new DB; // $pacientes = $con->conectar(); // $strConsulta = "SELECT * from Cliente "; // $pacientes = mysql_query($conexion,$strConsulta); // $fila = mysql_fetch_array($pacientes); $pdf = new PDF('L', 'mm', 'Letter'); $pdf->Open(); $pdf->AddPage(); $pdf->setY(10); $pdf->setX(100); $pdf->Cell(60, 8, "Este reporte de ventas corresponde a las siguentes fechas: ", 0, 1); $pdf->setX(120); $pdf->Cell(60, 8, "del " . $fecha . "al " . $fechaFinal, 0, 0); $pdf->SetMargins(20, 20, 20); $pdf->Ln(10); // $pdf->SetFont('Arial','',12); // $pdf->Cell(0,6,'Clave: '.$fila['idViajero'],0,1); // $pdf->Cell(0,6,'Nombre: '.$fila['Nombre'].' '.$fila['Direccion'].' '.$fila['Telefono'],0,1); // $pdf->Cell(0,6,'Sexo: '.$fila['Correo'],0,1); // $pdf->Cell(0,6,'Domicilio: '.$fila['Correo'],0,1); // $pdf->Ln(10); $pdf->SetWidths(array(15, 55, 60, 40, 35, 35, 18)); $pdf->SetFont('Arial', 'B', 10); $pdf->SetFillColor(85, 107, 47); $pdf->SetTextColor(255);
} } foreach ($dtKode2 as $brsKd => $lstKd) { $no += 1; if ($no == 1) { $pdf->Cell(15, $height, $no, 1, 0, 'C'); $pdf->Cell(125, $height, $optNmOrg[$lstKd], 1, 0, 'L'); } else { $bmilY = $pdf->GetY(); $bmilX = $pdf->GetX(); $pdf->Cell(15, $height, $no, 1, 0, 'C'); $pdf->Cell(125, $height, $optNmOrg[$lstKd], 1, 0, 'L'); } //$yTinggi=$pdf->GetY(); //$pdf->SetY($yTinggi); $pdf->setX(168); $b = 168; $dc = 22; // $tnggi=$yxti+10; for ($c = 1; $c <= $totalTipe; $c++) { $dc += 22; if ($c != $totalTipe) { $yxti = $yTinggi = $pdf->GetY(); $xyti = $pdf->GetX(); $pdf->setY($yxti); $pdf->setX($xyti); $pdf->Cell(30, $height, $dataKary[$lstKd][$dataTipeKary[$c]], 1, 0, 'R'); $pdf->Cell(40, $height, $dataTanggugan[$lstKd][$dataTipeKary[$c]], 1, 0, 'R'); $pdf->Cell(30, $height, $dataKaryIstri[$lstKd][$dataTipeKary[$c]], 1, 0, 'R'); } else { $yxti = $yTinggi = $pdf->GetY();
$this->SetFont('Arial', '', 10); $this->Text(20, 10, "Angytours Rooming List", 0, 'C', 0); $this->Ln(30); } function Footer() { $this->SetY(-15); $this->SetFont('Arial', 'B', 8); $this->Cell(100, 10, 'Angytours Rooming List ', 0, 0, 'L'); } } $pdf = new PDF("L"); $pdf->Open(); $pdf->AddPage(); $pdf->setY(10); $pdf->setX(100); $pdf->Cell(60, 8, "Rooming List Correspondiente a: ", 0, 1); $pdf->setX(120); $pdf->Cell(60, 8, "Grupo " . utf8_decode($NombreGrupo) . " al " . utf8_decode($nombreHotel) . " del " . $FechaIn . " al " . $FechaOut, 0, 0); $pdf->SetMargins(20, 20, 20); $pdf->Ln(10); $pdf->setX(8); $pdf->SetWidths(array(8, 80, 15, 20, 20, 15, 75, 50)); $pdf->SetFont('Arial', 'B', 8); $pdf->SetFillColor(85, 107, 47); $pdf->SetTextColor(255); for ($i = 0; $i < 1; $i++) { $pdf->Row(array('Hab', 'Pasajeros', 'TipoHab', 'Entrada', 'Salida', 'Adultos', 'Menores', 'Observaciones')); } $strConsulta = "SELECT \n\tNumeroHab as Hab,\n\t NombreTitular as Pasajeros,\n\t NombreA as NombreA,\n\t Menores as Menores,\n\t Observaciones as Observaciones,\n\t TipoHab as TipoHab,\n\t EdadesMenores as Edades,\n\t \tcantAdultos as Adultos,\n\t \t`ventagrupo`.`FechaIn` as Entrada,\n\t \t`ventagrupo`.`FechaOut` as Salida\n\t FROM cuponesgrupo LEFT JOIN ventagrupo ON `cuponesgrupo`.`FolioGrupoC` = `ventagrupo`.`FolioGrupo`\n\t\twhere FolioGrupoC = '{$FolioGrupo}'"; $historial = mysql_query($strConsulta) or die(mysql_error());
public function pdfreportmakerAction() { require "fpdf/pdfheader.php"; $month = $this->getRequest()->getParam('pdf_month'); $year = $this->getRequest()->getParam('pdf_year'); $email = $this->getRequest()->getParam('email'); $apper_id = $this->getRequest()->getParam('apper_id'); $cc = Mage::getModel('customer/customer')->load($apper_id); $apper_email = $cc->getEmail(); $zmodel = Mage::getModel('zcredit/zcredit'); $cus = $zmodel->checkmail($apper_email); $s_id = $cus[s_id]; //$cus_id=$cus['cus_id']; $customer = Mage::getModel('customer/customer')->loadByEmail($email); $cus_data = $customer->getData(); $agent_name = $cus_data['agent_name']; $defaultBilling = $customer->getDefaultBillingAddress(); $address = $defaultBilling->getData(); $full_name = $address['firstname'] . " " . $address['lastname']; $cus_id = $customer->getId(); $results1 = $zmodel->frontsortorderpdf($s_id); $tot_amt_paid1 = 0; $tot_amt_invoice1 = 0; foreach ($results1 as $result) { $or_id = $result[order_id]; $getdate = $zmodel->getbaltablecomdate($or_id); $date = $getdate['amt_paid_date']; $byear = date('Y', strtotime($date)); $bmonth = date('m', strtotime($date)); $inv_detail = $zmodel->getBaltrantopdf($result[order_id]); //$pdf->SetX(5); //$pdf->Cell(40,7,"$result[payment_status],"); $tot_balsheet = $zmodel->getTotCnOaa($or_id); if ($year == $byear && $month == $bmonth && $result[maker] == $email) { foreach ($inv_detail as $inv) { $tot_amt_invoice1 = $tot_amt_invoice1 + $inv[invoice_amount]; } $tot_amt_paid1 = $tot_amt_paid1 + $tot_balsheet[amt_paid] + $tot_balsheet[sus_ac_use_pay]; } } $pdf = new PDF(); //$m_start=date('Y', strtotime($year)); //$m_end=date('F', strtotime($month)); $m_start = $year; $m_end = date('F', mktime(0, 0, 0, $month, 10)); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetY(30); $pdf->Line(10, 31, 200, 31); $pdf->SetFont('Times', 'B', 12); $pdf->Cell(40, 7, 'CREDIT STATEMENT'); $pdf->setX(120); $pdf->SetFont('Times', '', 10); $pdf->Cell(40, 7, "Year: {$m_start}"); $pdf->Cell(20, 7, "Month: {$m_end}", 2, 2, 'C'); $pdf->Line(10, 36, 200, 36); //$pdf->Ln(10); //Customer detail start// $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Customer Name'); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ": {$full_name}"); $pdf->SetX(120); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Total Amount Paid'); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, ": {$tot_amt_paid1}", 2, 2, 'L'); $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Company Name &'); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ":{$cus['company_name']}"); $pdf->SetX(120); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Total Amount Invoice'); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, ": {$tot_amt_invoice1}", 2, 2, 'L'); $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Address '); $pdf->SetFont('Times', '', 10); $pdf->Cell(20, 5, ": {$address['street']}"); //$pdf->Cell(20,5,'Address1',2,2); //$pdf->Cell(20,5,'Address1'); $pdf->SetX(120); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Credit Limit'); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, ": {$cus['credit_limit']}", 2, 2, 'L'); $pdf->SetX(45); $pdf->Cell(25, 5, " {$address['city']},{$address['region']}"); $pdf->SetX(120); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Available Limit '); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, ": {$cus['avail_bal']}", 2, 2, 'L'); $pdf->SetX(45); $pdf->Cell(25, 5, " {$address['postcode']}"); $pdf->SetX(120); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'A/C Mgr Name '); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, ': ' . $agent_name, 2, 2, 'L'); $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Customer Email Id '); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ": {$email}", 2, 2, 'L'); $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Customer Id :'); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ": {$cus_id}", 2, 2); //Customer detail end// //data start// $linestyle = array('width' => 1.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '', 'phase' => 10, 'color' => array(255, 0, 0)); $pdf->SetX(10); $pdf->Line(10, 72, 200, 72); //$pdf->Line(10,85.5,200,85.5); $pdf->SetX(80); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(30, 5, 'Transction Details', 2, 2, 'C'); $pdf->Line(10, 77, 200, 77); $pdf->Line(10, 77.3, 200, 77.3); $pdf->SetX(10); $pdf->SetFont('Times', '', 10); $pdf->Cell(10, 5, 'S.No.', 0, 0, 'C'); $pdf->Cell(25, 5, 'Order #', 0, 0, 'C'); $pdf->Cell(25, 5, 'Inv #', 0, 0, 'C'); $pdf->Cell(15, 5, 'Inv Amt', 0, 0, 'C'); $pdf->Cell(20, 5, 'Inv Date', 0, 0, 'C'); $pdf->Cell(25, 5, 'Amt Paid', 0, 0, 'C'); $pdf->Cell(15, 5, 'Credit Note', 0, 0, 'C'); $pdf->Cell(30, 5, 'Payment Status', 0, 0, 'C'); //$pdf->MultiCell(20,5,'Payment Status'); $pdf->Cell(25, 5, 'Pending Amt', 2, 2, 'C'); $pdf->Line(10, 83, 200, 83); $pdf->Ln(); //data end// //order data start// $i = 1; //$height=count($results)*5+83+5; $height = 83; $results = $zmodel->frontsortorderpdf($s_id); //echo "<pre>"; print_r($results); foreach ($results as $res) { $order_id = $res['order_id']; $getdate = $zmodel->getbaltablecomdate($order_id); $date = $getdate['amt_paid_date']; $byear = date('Y', strtotime($date)); $bmonth = date('m', strtotime($date)); if ($year == $byear && $month == $bmonth && $res[maker] == $email) { $inv_detail = $zmodel->getBaltrantopdf($res[order_id]); $tot_balsheet = $zmodel->getTotCnOaa($res[order_id]); $cur_bal1 = $zmodel->getCurBalData($res[order_id]); $pdf->SetX(10); $pdf->Cell(10, 5, "{$i}"); $pdf->Cell(25, 5, "{$res['order_id']}", 0, 0, 'C'); foreach ($inv_detail as $inv) { $pdf->SetX(20); $pdf->Cell(25, 5, ""); $pdf->Cell(25, 5, "{$inv['invoice_id']}", 0, 0, 'C'); $pdf->Cell(15, 5, "{$inv['invoice_amount']}", 0, 0, 'C'); $pdf->Cell(20, 5, "{$inv['amt_paid_date']}", 0, 0, 'C'); if ($inv[amt_paid] == 0) { $amt_paid = '-'; } else { $amt_paid = $inv[amt_paid]; } if ($inv[cash_off] == 0) { $cash_off = '-'; } else { $cash_off = $inv[cash_off]; } $pdf->Cell(25, 5, "{$amt_paid}", 0, 0, 'C'); $pdf->Cell(15, 5, "{$cash_off}", 0, 0, 'C'); $pdf->Cell(30, 5, "-", 0, 0, 'C'); $pdf->Cell(25, 5, "-", 2, 2, 'C'); $height = $height + 5; } $pdf->SetX(20); $pdf->Cell(25, 5, ""); $pdf->Cell(25, 5, "-", 0, 0, 'C'); $pdf->Cell(15, 5, "-", 0, 0, 'C'); $pdf->Cell(20, 5, "-", 0, 0, 'C'); $tot_amt_paid = $tot_balsheet[amt_paid] + $tot_balsheet[sus_ac_use_pay]; $pdf->SetFont('Times', 'B', 10); $pdf->Cell(25, 5, "{$tot_amt_paid}", 0, 0, 'C'); $pdf->Cell(15, 5, "{$tot_balsheet['cn']}", 0, 0, 'C'); $pdf->Cell(30, 5, "{$res['payment_status']}", 0, 0, 'C'); $pdf->Cell(25, 5, "{$cur_bal1['bal_amt']}", 2, 2, 'C'); $i = $i + 1; $height = $height + 10; $pdf->SetFont('Times', '', 10); //$pdf->Line(10,$height,200,$height); $pdf->Ln(); } } $height = $height + 3; $pdf->Line(10, $height, 200, $height); $height = $height + 0.5; $pdf->Line(10, $height, 200, $height); //order data end// $pdf->SetX(150); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(50, 5, "Total Pending Amount: 0", 2, 2, 'L'); $height = $height + 5; $pdf->Line(10, $height, 200, $height); $pdf->Line(5, 290, 205, 290); $pdf->Line(5, 6, 205, 6); $pdf->Line(5, 6, 5, 290); $pdf->Line(205, 6, 205, 290); $pdf->Output('credit invoice.pdf', 'D'); }
public function pdfSusAction() { $img_path = $_GET['img_path']; require "fpdf/pdfheader.php"; $email = $_GET['email']; $model = Mage::getModel('zcredit/zcredit'); $detail = $model->checkmail($_GET['email']); $full_name = $detail['fname'] . " " . $detail['lname']; $date1 = $_GET['Priod']; $cus_id = $detail['cus_id']; $company_name = $detail['company_name']; $m_start = date("M d, Y", strtotime("{$date1} first day of this month")); $m_end = date("M d, Y", strtotime("{$date1} last day of this month")); $s_id = $_GET['s_id']; $customer = Mage::getModel('customer/customer')->load($cus_id); $defaultBilling = $customer->getDefaultBillingAddress(); $address = $defaultBilling->getData(); $pdf = new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetY(30); $pdf->Line(10, 31, 200, 31); $pdf->SetFont('Times', 'B', 12); $pdf->Cell(40, 7, 'SUSPENSE ACCOUNT STATEMENT'); $pdf->setX(120); $pdf->SetFont('Times', '', 10); $pdf->Cell(40, 7, "Date: "); $pdf->Cell(20, 7, "To: ", 2, 2, 'C'); $pdf->Line(10, 36, 200, 36); $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Customer Name'); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ": {$full_name}", 0, 0, 'L'); $pdf->SetX(120); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(20, 5, 'Address'); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ": {$address['street']}", 2, 2, 'L'); $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Company Name &'); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ": {$company_name}", 0, 0, 'L'); $pdf->SetX(140); $pdf->Cell(150, 5, ": {$address['city']},{$address['region']}", 2, 2, 'L'); /*$pdf->SetX(10); $pdf->SetFont('Times','B',10); $pdf->Cell(35,7,'Address'); $pdf->SetFont('Times','',10); $pdf->Cell(150,7,": $address[street]",2,2,'L'); $pdf->SetX(45); $pdf->Cell(150,7,": $address[city],$address[region]",2,2,'L'); $pdf->Cell(150,7,": $address[postcode]",2,2,'L'); */ $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Customer Email Id'); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ": {$email}", 0, 0, 'L'); $pdf->SetX(140); $pdf->Cell(150, 5, ": {$address['postcode']}", 2, 2, 'L'); $pdf->SetX(10); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(35, 5, 'Customer Id'); $pdf->SetFont('Times', '', 10); $pdf->Cell(150, 5, ": {$cus_id}", 2, 2, 'L'); $linestyle = array('width' => 1.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '', 'phase' => 10, 'color' => array(255, 0, 0)); $pdf->SetX(10); $pdf->Line(10, 57, 200, 57); $pdf->SetX(80); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(30, 5, 'Transction Details', 2, 2, 'C'); $pdf->Line(10, 62, 200, 62); $pdf->Line(10, 62.3, 200, 62.3); $pdf->SetX(10); $pdf->SetFont('Times', '', 10); $pdf->Cell(10, 5, 'S.No.', 0, 0, 'C'); $pdf->Cell(25, 5, 'Order #', 0, 0, 'C'); $pdf->Cell(30, 5, 'Txn Date', 0, 0, 'C'); $pdf->Cell(20, 5, 'Deposit', 0, 0, 'C'); $pdf->Cell(20, 5, 'Withdrawl', 0, 0, 'C'); $pdf->Cell(30, 5, 'Balance', 0, 0, 'C'); $pdf->Cell(60, 5, 'Txn Details', 2, 2, 'C'); $pdf->Line(10, 67, 200, 67); $pdf->Ln(); $pdf->SetX(10); $sus_his = $model->getSusHis($s_id); $tot_bal = 0; $a = 1; $height = count($sus_his) * 5 + 67 + 5; foreach ($sus_his as $sus) { $pdf->SetX(10); $pdf->Cell(10, 5, "{$a}", 0, 0, 'C'); $pdf->Cell(25, 5, "{$sus['order_id']}", 0, 0, 'C'); $pdf->Cell(30, 5, "{$sus['tran_date']}", 0, 0, 'C'); if ($sus[amt] > 0) { $pdf->Cell(20, 5, "{$sus['amt']}", 0, 0, 'C'); $pdf->Cell(20, 5, "", 0, 0, 'C'); } else { $susnatot = abs($sus[amt]); $pdf->Cell(20, 5, "", 0, 0, 'C'); $pdf->Cell(20, 5, "{$susnatot}", 0, 0, 'C'); } $pdf->Cell(30, 5, "{$sus['total_amt']}", 0, 0, 'C'); $pdf->Cell(60, 5, "{$sus['trans_detail']}", 2, 2, 'C'); $tot_bal = $sus[total_amt]; $a = $a + 1; } $pdf->Line(10, $height, 200, $height); $height1 = $height + 0.4; $pdf->Line(10, $height1, 200, $height1); $pdf->SetX(89); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(30, 6, "Total Balance Amount : {$tot_bal}", 2, 2, 'L'); $pdf->Line(10, $height = $height + 5, 200, $height); //$pdf->Cell(30,6,"$height,test,",1,1,'C'); //outer box start// $pdf->Line(5, 290, 205, 290); $pdf->Line(5, 6, 205, 6); $pdf->Line(5, 6, 5, 290); $pdf->Line(205, 6, 205, 290); //outer box end// $pdf->Output('Suspence A/C Detail.pdf', 'D'); }
if (empty($secretary[$row['secretary']])) { $secretary[$row['secretary']] = ""; } $data = array(date("F j, Y", strtotime($row['date_created'])), $row['letter_code'], $row['payment_type'], $row['company_name'], $engineer[$row['engineer']], $secretary[$row['secretary']], $row['po'], $row['jo'], $row['item_description'], $row['page'], $row['supplier'], $row['total_amount']); $SELECT = "select * from po_item_file where trans_no='" . $row['trans_no'] . "' and item!=''"; $result1 = $conn->query($SELECT); $rows = 1; // echo "<br>Rows".$rows; //$y=$pdf->getY(); $width2 = array($width[count($width) - 1]); $data2 = array(); while ($row1 = $result1->fetch_assoc()) { //$pdf->setX($x); $data2[] = array($row1['item'] . " " . $row1['description'] . " " . $row1['quantity'] . " " . $row1['unit_price']); //$pdf->row($width2,$data2); } $max = $pdf->row($width, $data, $rows, $data2, $head); $data2 = array(); $x = $pdf->getX(); $x2 = $x; for ($a = 0; $a < count($width) - 1; $a++) { $x += $width[$a]; } $pdf->setX($x2); } $title = '20000 Leagues Under the Seas'; $pdf->SetTitle($title); $pdf->SetAuthor('Jules Verne'); //$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); //$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); $pdf->Output();
$this->SetY(-15); $this->SetFont('Arial', 'B', 8); $this->Cell(100, 10, 'Angytours Reporte de Ventas ', 0, 0, 'L'); } } // $paciente= $_GET['id']; // $con = new DB; // $pacientes = $con->conectar(); // $strConsulta = "SELECT * from Cliente "; // $pacientes = mysql_query($conexion,$strConsulta); // $fila = mysql_fetch_array($pacientes); $pdf = new PDF('L', 'mm', 'Letter'); $pdf->Open(); $pdf->AddPage(); $pdf->setY(10); $pdf->setX(100); $pdf->Cell(60, 8, "Este reporte de ventas corresponde a las siguentes fechas: ", 0, 1); $pdf->setX(120); $pdf->Cell(60, 8, "del " . $fecha . "al " . $fechaFinal, 0, 0); $pdf->SetMargins(20, 20, 20); $pdf->Ln(10); // $pdf->SetFont('Arial','',12); // $pdf->Cell(0,6,'Clave: '.$fila['idViajero'],0,1); // $pdf->Cell(0,6,'Nombre: '.$fila['Nombre'].' '.$fila['Direccion'].' '.$fila['Telefono'],0,1); // $pdf->Cell(0,6,'Sexo: '.$fila['Correo'],0,1); // $pdf->Cell(0,6,'Domicilio: '.$fila['Correo'],0,1); // $pdf->Ln(10); $pdf->SetWidths(array(15, 60, 55, 50, 60)); $pdf->SetFont('Arial', 'B', 10); $pdf->SetFillColor(85, 107, 47); $pdf->SetTextColor(255);