Changeset 693 for trunk/phpbms/modules/bms/report/invoices_pdfinvoice.php
- Timestamp:
- 12/31/09 13:36:45 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/bms/report/invoices_pdfinvoice.php
r673 r693 38 38 */ 39 39 40 //PROCESSING 41 //============================================================================= 40 /** 41 * PROCESSING 42 * ============================================================================= 43 */ 42 44 if(!isset($noOutput)){ 43 45 44 //IE needs caching to be set to private in order to display PDFS45 session_cache_limiter('private');46 //IE needs caching to be set to private in order to display PDFS 47 session_cache_limiter('private'); 46 48 47 //set encoding to latin1 (fpdf doesnt like utf8)48 $sqlEncoding = "latin1";49 require_once("../../../include/session.php");49 //set encoding to latin1 (fpdf doesnt like utf8) 50 $sqlEncoding = "latin1"; 51 require_once("../../../include/session.php"); 50 52 51 include("modules/bms/report/invoices_pdf_class.php");53 include("modules/bms/report/invoices_pdf_class.php"); 52 54 53 $report = new invoicePDF($db, 'P', 'in', 'Letter'); 54 $report->setupFromPrintScreen(); 55 $report->generate(); 56 57 $filename = "Invoice"; 58 if($report->count === 1){ 59 60 if($report->invoicerecord["company"]) 61 $filename .= "_".$report->invoicerecord["company"]; 62 63 $filename .= "_".$report->invoicerecord["id"]; 64 65 }elseif((int)$report->count) 66 $filename .= "_Multiple"; 67 68 $filename .= ".pdf"; 69 $report->output('screen', $filename); 55 checkForReportArguments(); 56 57 $report = new invoicePDF($db, $_GET["rid"], $_GET["tid"], 'P', 'in', 'Letter'); 58 $report->setupFromPrintScreen(); 59 $report->generate(); 60 61 $filename = "Invoice"; 62 if($report->count === 1){ 63 64 if($report->invoicerecord["company"]) 65 $filename .= "_".$report->invoicerecord["company"]; 66 67 $filename .= "_".$report->invoicerecord["id"]; 68 69 }elseif((int)$report->count) 70 $filename .= "_Multiple"; 71 72 $filename .= ".pdf"; 73 74 $report->output('screen', $filename); 70 75 71 76 }//end if 72 77 78 79 /** 80 * When adding a new report record, the add/edit needs to know what the class 81 * name is so that it can instantiate it, and grab it's default settings. 82 */ 83 if(isset($addingReportRecord)){ 84 85 include("modules/bms/report/invoices_pdf_class.php"); 86 $reportClass = "invoicePDF"; 87 88 }//endif 73 89 ?>