private function create_delivery_note($data) { $this->load->helper(array('dompdf', 'file')); $html = $this->load->view('admin/includes/delivery_note', $data, true); $pdf_data = pdf_create($html, '', false, '', 'delivery_note'); return $pdf_data; }
function ver() { $parametros = func_get_args(); if (count($parametros) > 0) { $_arch_nombre = implode('-', $parametros); $_fnombre = array_shift($parametros); $this->_direccion = 'http://localhost/' . trim_slashes($this->config->item('base_url')); $this->load->plugin('html2pdf'); //$this->rapyd->load('dataobject'); $this->db->_escape_char = ''; $this->db->_protect_identifiers = false; $query = $this->db->query("SELECT proteo FROM formatos WHERE nombre='{$_fnombre}'"); if ($query->num_rows() > 0) { $row = $query->row(); ob_start(); echo eval('?>' . preg_replace("/;*\\s*\\?>/", "; ?>", str_replace('<?=', '<?php echo ', $row->proteo)) . '<?php '); $_html = ob_get_contents(); @ob_end_clean(); pdf_create($_html, $_arch_nombre); } else { echo 'Formato no existe'; } } else { echo 'Faltan parametros'; } }
private function create_request_slip($data) { $this->load->helper(array('dompdf', 'file')); $html = $this->load->view('admin/includes/request_slip', $data, true); $pdf_data = pdf_create($html, '', false, 123, 'request_slip'); return $pdf_data; }
function multiple() { $action = $this->input->post('action'); if ($action == "delete") { $delete = $this->input->post('msg'); for ($i = 0; $i < count($delete); $i++) { $this->Bpjs_model->delete($delete[$i]); } } elseif ($action == "uncheck") { $uncheck = $this->input->post('msg'); for ($i = 0; $i < count($uncheck); $i++) { $this->Bpjs_model->add(array('bpjs_id' => $uncheck[$i], 'bpjs_cetak' => 0)); $this->session->set_flashdata('success', 'Sunting Remove berhasil'); } } elseif ($action == "printPdf") { $this->load->helper(array('dompdf')); $this->load->helper(array('tanggal')); $bpjsk = $this->input->post('msg'); for ($i = 0; $i < count($bpjsk); $i++) { $print[] = $bpjsk[$i]; } $data['bpjs'] = $this->Bpjs_model->get(array('multiple_id' => $print)); for ($i = 0; $i < count($data['bpjs']); $i++) { $this->barcode2($data['bpjs'][$i]['bpjs_noka'], ''); } $html = $this->load->view('admin/bpjs/bpjs_multiple_pdf', $data, true); $data = pdf_create($html, '', TRUE, [0, 0, 325, 620], 'landscape'); } redirect('admin/cetak'); }
function generate_quote_pdf($quote_id, $stream = TRUE, $quote_template = NULL) { $CI = &get_instance(); $CI->load->model('quotes/mdl_quotes'); $CI->load->model('quotes/mdl_quote_items'); $CI->load->model('quotes/mdl_quote_tax_rates'); $quote = $CI->mdl_quotes->get_by_id($quote_id); if (!$quote_template) { $quote_template = $CI->mdl_settings->setting('pdf_quote_template'); } $data = array( 'quote' => $quote, 'quote_tax_rates' => $CI->mdl_quote_tax_rates->where('quote_id', $quote_id)->get()->result(), 'items' => $CI->mdl_quote_items->where('quote_id', $quote_id)->get()->result(), 'output_type' => 'pdf' ); $html = $CI->load->view('quote_templates/pdf/' . $quote_template, $data, TRUE); $CI->load->helper('mpdf'); //return pdf_create($html, lang('quote') . '_' . str_replace(array('\\', '/'), '_', $quote->quote_number), $stream,$quote->quote_password); //16133 - IPA - MK Snap return pdf_create($html, $quote->quote_number . '-' . str_replace(array('\\', '/'), '_',$quote->client_name), $stream,$quote->quote_password); }
function ver1() { $parametros = func_get_args(); $this->_direccion = 'http://localhost/' . trim_slashes($this->config->item('base_url')); if (count($parametros) > 0) { $_fnombre = array_shift($parametros); $_dbfnombre = $this->db->escape($_fnombre); $this->load->plugin('html2pdf'); $query = $this->db->query('SELECT proteo FROM formatos WHERE nombre=' . $_dbfnombre); if ($query->num_rows() > 0) { $row = $query->row(); ob_start(); echo eval('?>' . preg_replace('/;*\\s*\\?>/', '; ?>', str_replace('<?=', '<?php echo ', $row->proteo)) . '<?php '); $_html = ob_get_contents(); @ob_end_clean(); if (strlen($_html) > 0) { pdf_create($_html, $_arch_nombre); } else { echo 'Formato no definido'; } } else { echo 'Formato no existe'; } } else { echo 'Faltan parametros'; } }
function view($id, $fid, $p = 0) { if (isset($id)) { $this->load->model('student_sem_form/sbasic_model', '', TRUE); $this->load->model('student_sem_form/get_subject', '', TRUE); $this->load->model('student_sem_form/get_results', '', TRUE); $this->load->model('student_sem_form/get_carryover', '', TRUE); $data['student'] = $this->sbasic_model->hod_view_student($id, $fid); $data['subjects'] = $this->get_subject->getSubject($data['student'][0]->course_id, $data['student'][0]->branch_id, $data['student'][0]->semester + 1, $data['student'][0]->admission_id); $data['carryover'] = $this->get_carryover->getCarryoverByformId($data['student'][0]->form_id); // Elective Subject $data['confirm'] = $this->get_subject->getConfirm($data['student'][0]->form_id); //Change Branch $data['CB'] = $this->sbasic_model->getCbByfromId($data['student'][0]->form_id); $this->load->view('templates/header_assets'); if ($p == 1) { $this->load->helper(array('dompdf', 'file')); //$html.= $this->load->view('templates/header_assets'); $html = $this->load->view('student_sem_form/department/view1.php', $data, TRUE); pdf_create($html, 'Regform_' . $data['student'][0]->admn_no); } else { $this->load->view('student_sem_form/department/view.php', $data); } } }
private function debit_note($data) { $this->load->helper(array('dompdf', 'file')); $html = $this->load->view('underwriter/motor_private/includes/debit_note', $data, true); $pdf_data = pdf_create($html, '', false, $data['print_array']['motor_takaful_id'], 'debit_note'); return $pdf_data; }
function per_project_pdf() { $this->load->model('modules'); $this->modules->analyze_clock_entries_per_project_report(); $html = $this->load->view('tpl/result/per_project_results', $this->data, true); pdf_create($html, 'filename'); //if you want to write it to disk and/or send it as an attachment }
function pdf() { $this->load->helper('file'); $this->load->plugin('to_pdf'); // page info here, db calls, etc. $html = $this->load->view('test', false, true); pdf_create($html, 'filename'); }
function pdf() { $this->load->helper($this->mdl_mcb_data->setting('pdf_plugin')); $invoices = $this->_get_results(); $totals = $this->_get_totals($invoices); $data = array('invoices' => $invoices, 'totals' => $totals); $html = $this->load->view('html', $data, TRUE); pdf_create($html, $this->lang->line('invoice_summary_report'), TRUE); }
function generate_pdf_quote($quote_data, $stream = TRUE) { $CI =& get_instance(); $data = array('quote_details' => $quote_data, 'output_type' => 'pdf'); $html = $CI->load->view('pdf_templates/quotes', $data, TRUE); $CI->load->helper('mpdf'); $filename = 'quote_' . strtolower(trim(preg_replace('#\\W+#', '_', $quote_data['quote_details']->quote_id), '_')); return pdf_create($html, $filename, $stream); }
function exportMeAsDOMPDF($htmView, $fileName) { $CI =& get_instance(); $CI->load->helper(array('dompdf', 'file')); $CI->load->helper('file'); $pdfName = $fileName; $pdfData = pdf_create($htmView, $pdfName); write_file('Progress Repost', $pdfData); }
function pdf($invoice_id, $invoice_template) { $this->CI->load->helper($this->CI->mdl_mcb_data->setting('pdf_plugin')); $invoice = $this->get_invoice($invoice_id); $invoice_number = $invoice->invoice_number; $data = array('invoice' => $invoice, 'output_type' => 'pdf'); $html = $this->CI->load->view('invoices/invoice_templates/' . $invoice_template, $data, TRUE); $file_prefix = !$data['invoice']->invoice_is_quote ? $this->CI->lang->line('invoice') . '_' : $this->CI->lang->line('quote') . '_'; pdf_create($html, $file_prefix . $invoice_number, TRUE); }
function pdf($invoice_id, $payment_id, $template) { $this->CI->load->helper($this->CI->mdl_mcb_data->setting('pdf_plugin')); $params = array('where' => array('mcb_invoices.invoice_id' => $invoice_id)); $invoice = $this->CI->mdl_invoices->get($params); $invoice_payments = $this->CI->mdl_invoices->get_invoice_payments($invoice->invoice_id); $data = array('invoice' => $invoice, 'invoice_payments' => $invoice_payments); $html = $this->CI->load->view('payments/receipt_templates/' . $template, $data, TRUE); pdf_create($html, 'receipt_' . $invoice->invoice_number, TRUE); }
public function invoice_aging() { if ($this->input->post('btn_submit')) { $data = array('results' => $this->mdl_reports->invoice_aging()); $html = $this->load->view('reports/invoice_aging', $data, TRUE); $this->load->helper('mpdf'); pdf_create($html, lang('invoice_aging'), TRUE); } $this->layout->buffer('content', 'reports/invoice_aging_index')->render(); }
public function sales_by_year() { if ($this->input->post('btn_submit')) { $data = array('results' => $this->mdl_reports->sales_by_year($this->input->post('from_date'), $this->input->post('to_date'), $this->input->post('minQuantity'), $this->input->post('maxQuantity'), $this->input->post('checkboxTax'))); $html = $this->load->view('reports/sales_by_year', $data, TRUE); $this->load->helper('mpdf'); pdf_create($html, lang('sales_by_date'), TRUE); } $this->layout->buffer('content', 'reports/sales_by_year_index')->render(); }
public function print_report($id) { $this->load->helper('to_pdf'); $data = null; $data['data_detail_eks'] = $this->kumuh_detail_model->select_by_field(array('id_kumuh_detail' => $id))->row(); $data['kawasan'] = $this->kumuh_model->select_by_field(array('id_kaw_kumuh' => $data['data_detail_eks']->id_kaw_kumuh))->row(); $data['kota'] = $this->view_kabupaten_model->select_by_field(array('kode_daerah' => $data['kawasan']->kode_daerah))->row(); $data['text'] = $this->text; $html = $this->load->view('admin/report/view1', $data, TRUE); pdf_create($html, "landscape", "Profil Kawasan Kumuh " . date('mdy'), true, "a3"); }
function pdf() { $this->load->helper(array('dompdf', 'file')); // page info here, db calls, etc. $html = $this->load->view('controller/viewfile', $data, true); pdf_create($html, 'filename'); //or //$data = pdf_create($html, '', false); //write_file('name', $data); //if you want to write it to disk and/or send it as an attachment }
function printPdf($id = NULL) { $this->load->helper(array('dompdf')); $this->load->helper(array('tanggal')); if ($id == NULL) { redirect('admin/memorandum'); } $data['memorandum'] = $this->Memorandum1_model->get(array('id' => $id)); $html = $this->load->view('admin/memorandum/memorandum_pdf', $data, true); $data = pdf_create($html, '$paper', TRUE); }
public function generate_pdf($quote_id, $stream = TRUE, $quote_template = NULL) { $this->load->model('quotes/mdl_quote_items'); $quote = $this->mdl_quotes->get_by_id($quote_id); if (!$quote_template) { $quote_template = $this->mdl_settings->setting('default_quote_template'); } $data = array('quote' => $this->mdl_quotes->where('fi_quotes.quote_id', $quote_id)->where_in('fi_quotes.client_id', $this->user_clients)->get()->row(), 'items' => $this->mdl_quote_items->where('quote_id', $quote_id)->get()->result(), 'output_type' => 'pdf'); $html = $this->load->view('quote_templates/' . $quote_template, $data, TRUE); $this->load->helper('dompdf'); return pdf_create($html, 'Quote_' . $quote->quote_number, $stream); }
public function jquery_display_results($output_type = 'view') { $this->load->model(array('invoices/mdl_items', 'mdl_inventory_sales')); $data = array('items' => $this->mdl_inventory_sales->get()); if ($output_type == 'view') { $this->load->view('inventory_sales_view', $data); } elseif ($output_type == 'pdf') { $this->load->helper($this->mdl_mcb_data->setting('pdf_plugin')); $html = $this->load->view('inventory_sales_pdf', $data, TRUE); pdf_create($html, url_title($this->lang->line('inventory_sales'), '_'), TRUE); } }
public function download_pdf() { //load helper $this->load->helper('dompdf'); $data['data'] = "Hallo Ini Adalah File PDF"; // page info here, db calls, etc. $html = $this->load->view('test_print', $data, true); pdf_create($html, 'filename'); //or //$data = pdf_create($html, '', false); //write_file('name', $data); }
public function ar_summary_report() { $this->load->model("accounts_receivable_model"); if ($this->session->userdata('islogged')) { $ar_customer = $this->input->get('ar'); $html = $this->config->item('report_header'); $data = array('ar' => $this->accounts_receivable_model->summary_ar($ar_customer)->result(), 'ar_tot' => $this->accounts_receivable_model->search_ar_tot($ar_customer)->result()); $html .= $this->load->view('report/ar_summary_report', $data, true); $html .= $this->config->item('report_footer'); pdf_create($html, 'Accounts-Receivable'); } else { echo jcode(array('success' => 1)); } }
function pdf($id) { $this->load->helper('dompdf'); $this->load->helper('file'); $this->load->model('booking'); $data['booking'] = $this->booking->get_booking($id); $data['booking_returned'] = $this->booking->get_booking_returned($id); $data['company_info'] = $this->booking->get_company_info(); $data['id'] = $id; $html = $this->load->view('backend/bookings/pdf_generator', $data, true); pdf_create($html, 'filename', TRUE); //$data = pdf_create($html, 'sss', TRUE); //write_file('name', $data); //if you want to write it to disk and/or send it as an attachment }
public function jquery_display_results() { $this->load->model('mdl_sales'); $items = $this->mdl_sales->get($this->input->post('from_date'), $this->input->post('to_date'), $this->input->post('client_id')); $data = array('items' => $items); if ($this->input->post('output_type') == 'view') { $this->load->view('sales_view', $data); } elseif ($this->input->post('output_type') == 'pdf') { $this->load->helper($this->mdl_mcb_data->setting('pdf_plugin')); $html = $this->load->view('sales_pdf', $data, TRUE); $filename = url_title($this->lang->line('sales_report'), '_'); pdf_create($html, $filename, FALSE); echo base_url() . 'uploads/temp/' . $filename . '.pdf'; } }
function generate() { $slug = $this->uri->segment(3); $idtutorial = ''; //$limit = 10; $data1 = $this->frontend_model->generate_detail_tutorial($slug); foreach ($data1->result() as $d) { $judul = $d->title; } $data['title'] = $judul . " yudi purwanto"; $data['detail'] = $this->frontend_model->generate_detail_tutorial($slug); // page info here, db calls, etc. $html = $this->load->view('pdf_message', $data, true); pdf_create($html, url_title($data['title']), 'dash', TRUE); }
public function generate_quote_pdf($quote_url_key, $stream = TRUE, $quote_template = NULL) { $this->load->model('quotes/mdl_quotes'); $this->load->model('quotes/mdl_quote_items'); $quote = $this->mdl_quotes->where('quote_url_key', $quote_url_key)->get(); if ($quote->num_rows() == 1) { $quote = $quote->row(); if (!$quote_template) { $quote_template = $this->mdl_settings->setting('default_quote_template'); } $data = array('quote' => $quote, 'items' => $this->mdl_quote_items->where('quote_id', $quote->quote_id)->get()->result(), 'output_type' => 'pdf'); $html = $this->load->view('quote_templates/' . $quote_template, $data, TRUE); $this->load->helper('dompdf'); return pdf_create($html, 'Quote_' . $quote->quote_number, $stream); } }
public function jquery_display_results($output_type = 'view', $client_id = NULL, $include_closed_invoices, $include_quotes) { $this->load->model(array('invoices/mdl_invoices', 'reports/mdl_client_statement')); $include_closed_invoices = $include_closed_invoices == 'undefined' ? FALSE : TRUE; $include_quotes = $include_quotes == 'undefined' ? FALSE : TRUE; $invoices = $this->mdl_client_statement->get_invoices($client_id, $include_closed_invoices, $include_quotes); $totals = $this->mdl_client_statement->get_totals($invoices); $data = array('invoices' => $invoices, 'totals' => $totals); if ($output_type == 'view') { $this->load->view('client_statement_view', $data); } elseif ($output_type == 'pdf') { $this->load->helper($this->mdl_mcb_data->setting('pdf_plugin')); $html = $this->load->view('client_statement_pdf', $data, TRUE); pdf_create($html, url_title($this->lang->line('client_statement'), '_'), TRUE); } }
function download($id = FALSE) { $this->load->helper(array('dompdf', 'file')); $this->load->library('parser'); $data["invoice"] = Invoice::find($id); $data['items'] = InvoiceHasItem::find('all', array('conditions' => array('invoice_id=?', $id))); if ($data['invoice']->company_id != $this->client->company->id) { redirect('cinvoices'); } $data["core_settings"] = Setting::first(); $due_date = date($data["core_settings"]->date_format, human_to_unix($data["invoice"]->due_date . ' 00:00:00')); $parse_data = array('due_date' => $due_date, 'invoice_id' => $data["invoice"]->reference, 'client_link' => $data["core_settings"]->domain, 'company' => $data["core_settings"]->company); $html = $this->load->view($data["core_settings"]->template . '/' . $data["core_settings"]->invoice_pdf_template, $data, true); $html = $this->parser->parse_string($html, $parse_data); $filename = 'Invoice_' . $data["invoice"]->reference; pdf_create($html, $filename, TRUE); }