phpBMS

Show
Ignore:
Timestamp:
12/31/09 13:36:45 (2 years ago)
Author:
brieb
Message:
  • Introduced administratively changeable settings to indvidual reports
  • Modified all reports to work with new settings system
  • Altered invoice and line item total reports to accept parameters from reportsettings: You can now bypass the grouping/column dialog by providing the infrmation administratively
  • Altered all sales order PDF reports to accept parameters from reportsettings: You can now administratively change certain aspects of the print outs, including what parts of the top of the report to show, and what to title the report
  • Altered label reports to accept parameters from reportsettings: printed data as well

as label measurements and layout are now defined by administratively

  • Altered export and tableprint reports to accept parameters from reportsettings: You can specify individual columns and from table instead of just the defaults (all fields, main table only)
  • Added var_dump-esque 'debug' function for development purposes to common functions
  • Integrated FPDI functionality with sales order PDF reports: It is now possible to use a PDF saved in the files table as a background template for your invoices (e.g. watermarks)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/bms/report/invoices_pdfinvoice.php

    r673 r693  
    3838*/ 
    3939 
    40 //PROCESSING 
    41 //============================================================================= 
     40/** 
     41 * PROCESSING 
     42 * ============================================================================= 
     43 */ 
    4244if(!isset($noOutput)){ 
    4345 
    44         //IE needs caching to be set to private in order to display PDFS 
    45         session_cache_limiter('private'); 
     46    //IE needs caching to be set to private in order to display PDFS 
     47    session_cache_limiter('private'); 
    4648 
    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"); 
    5052 
    51         include("modules/bms/report/invoices_pdf_class.php"); 
     53    include("modules/bms/report/invoices_pdf_class.php"); 
    5254 
    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); 
    7075 
    7176}//end if 
    7277 
     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 */ 
     83if(isset($addingReportRecord)){ 
     84 
     85    include("modules/bms/report/invoices_pdf_class.php"); 
     86    $reportClass = "invoicePDF"; 
     87 
     88}//endif 
    7389?> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.