//end class /** * PROCESSING * ============================================================================= */ if (!isset($noOutput)) { //IE needs caching to be set to private in order to display PDFS session_cache_limiter('private'); //set encoding to latin1 (fpdf doesnt like utf8) $sqlEncoding = "latin1"; require_once "../../../include/session.php"; checkForReportArguments(); $report = new quotePDF($db, $_GET["rid"], $_GET["tid"], 'P', 'in', 'Letter'); $report->showShipNameInShipTo = false; $report->setupFromPrintScreen(); $report->generate(); $filename = "Quote"; if ($report->count === 1) { if ($report->invoicerecord["company"]) { $filename .= "_" . $report->invoicerecord["company"]; } $filename .= "_" . $report->invoicerecord["id"]; } elseif ((int) $report->count) { $filename .= "_Multiple"; } $filename .= ".pdf"; $report->output('screen', $filename); } //end if /** * When adding a new report record, the add/edit needs to know what the class
function email_quote($useUuid = false) { if (DEMO_ENABLED == "true") { return "Functionality disabled in demo."; } $this->db->setEncoding("latin1"); $noOutput = true; require_once "report/report_class.php"; include "modules/bms/report/invoices_pdf_class.php"; include "modules/bms/report/invoices_pdfquote.php"; $processed = 0; foreach ($this->idsArray as $id) { $report = new quotePDF($this->db, 'rpt:b683e2f0-e52b-4dd4-33e1-7566616893ca', 'tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883', 'P', 'in', 'Letter'); if (!$useUuid) { $report->generate("invoices.id = " . $id); } else { $report->generate("invoices.uuid = " . $id); } if ($report->output("email")) { $processed++; } } //end foreach $this->db->setEncoding(); $count = count($this->idsArray); $message = $processed . " of " . $count . " quote PDF"; if ($count !== 1) { $message .= "s"; } $message .= " e-mailed to client."; return $message; }