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/lineitems_totals.php

    r611 r693  
    3737 +-------------------------------------------------------------------------+ 
    3838*/ 
    39  
    40 require("../../../include/session.php"); 
    41  
    42 class totalReport{ 
     39if(!class_exists("phpbmsReport")) 
     40    include("../../../report/report_class.php"); 
     41 
     42class totalReport extends phpbmsReport{ 
    4343 
    4444        var $selectcolumns; 
    4545        var $selecttable; 
    46         var $whereclause=""; 
    47         var $group=""; 
    48         var $showinvoices=false; 
    49         var $showlineitems=false; 
    50         var $padamount=20; 
    51  
    52         function totalReport($db,$variables = NULL){ 
    53                 $this->db = $db; 
    54  
    55                 // first we define the available groups 
    56                 $this->addGroup("Invoice ID","invoices.id"); //0 
    57                 $this->addGroup("Product","concat(products.partnumber,' - ',products.partname)"); //1 
    58                 $this->addGroup("Product Category","concat(productcategories.id,' - ',productcategories.name)",NULL,"INNER JOIN productcategories ON products.categoryid=productcategories.uuid"); //2 
    59  
    60                 $this->addGroup("Invoice Date - Year","YEAR(invoices.invoicedate)"); //3 
    61                 $this->addGroup("Invoice Date - Quarter","QUARTER(invoices.invoicedate)"); //4 
    62                 $this->addGroup("Invoice Date - Month","MONTH(invoices.invoicedate)"); //5 
    63                 $this->addGroup("Invoice Date","invoices.invoicedate","date"); //6 
    64  
    65                 $this->addGroup("Order Date - Year","YEAR(invoices.orderdate)"); //7 
    66                 $this->addGroup("Order Date - Quarter","QUARTER(invoices.orderdate)");//8 
    67                 $this->addGroup("Order Date - Month","MONTH(invoices.orderdate)");//9 
    68                 $this->addGroup("Order Date","invoices.orderdate","date");//10 
    69  
    70                 $this->addGroup("Client","if(clients.lastname!='',concat(clients.lastname,', ',clients.firstname,if(clients.company!='',concat(' (',clients.company,')'),'')),clients.company)");//11 
    71  
    72                 $this->addGroup("Client Sales Person","concat(salesPerson.firstname,' ',salesPerson.lastname)",NULL, "LEFT JOIN users AS salesPerson ON clients.salesmanagerid = salesPerson.id");//12 
    73  
    74                 $this->addGroup("Client Lead Source","clients.leadsource");//13 
    75  
    76                 $this->addGroup("Invoice Lead Source","invoices.leadsource");//14 
    77  
    78                 $this->addGroup("Payment Method","paymentmethods.name");//15 
    79  
    80                 $this->addGroup("Shipping Method","shippingmethods.name");//16 
    81                 $this->addGroup("Invoice Shipping Country","invoices.shiptocountry");//17 
    82                 $this->addGroup("Invoice Shipping State / Province","invoices.shiptostate");//18 
    83                 $this->addGroup("Invoice Shipping Postal Code","invoices.shiptopostalcode");//19 
    84                 $this->addGroup("Invoice Shipping City","invoices.shiptocity");//20 
    85  
    86                 $this->addGroup("Web Order","invoices.weborder","boolean");//21 
    87  
    88                 $this->addGroup("Invoice billing Country","invoices.country");//22 
    89                 $this->addGroup("Invoice Billing State / Province","invoices.state");//23 
    90                 $this->addGroup("Invoice Billing Postal Code","invoices.postalcode");//24 
    91                 $this->addGroup("Invoice Billing City","invoices.city");//25 
    92  
    93                 //next we do the columns 
    94                 $this->addColumn("Record Count","count(lineitems.id)");//0 
    95                 $this->addColumn("Extended Price","sum(lineitems.unitprice*lineitems.quantity)","currency");//1 
    96                 $this->addColumn("Average Extended Price","avg(lineitems.unitprice*lineitems.quantity)","currency");//2 
    97                 $this->addColumn("Unit Price","sum(lineitems.unitprice)","currency");//3 
    98                 $this->addColumn("Average Unit Price","avg(lineitems.unitprice)","currency");//4 
    99                 $this->addColumn("Quantity","sum(lineitems.quantity)","real");//5 
    100                 $this->addColumn("Average Quantity","avg(lineitems.quantity)","real");//6 
    101                 $this->addColumn("Unit Cost","sum(lineitems.unitcost)","currency");//7 
    102                 $this->addColumn("Average Unit Cost","avg(lineitems.unitcost)","currency");//8 
    103                 $this->addColumn("Extended Cost","sum(lineitems.unitcost*lineitems.quantity)","currency");//9 
    104                 $this->addColumn("Average Extended Cost","avg(lineitems.unitcost*lineitems.quantity)","currency");//10 
    105                 $this->addColumn("Unit Weight","sum(lineitems.unitweight)","real");//11 
    106                 $this->addColumn("Average Unit Weight","avg(lineitems.unitweight)","real");//12 
    107                 $this->addColumn("Extended Unit Weight","sum(lineitems.unitweight*lineitems.quantity)","real");//13 
    108                 $this->addColumn("Extended Average Unit Weight","avg(lineitems.unitweight*lineitems.quantity)","real");//14 
    109  
    110  
    111                 if($variables){ 
    112                         $tempArray = explode("::", $variables["columns"]); 
    113  
    114                         foreach($tempArray as $id) 
    115                                 $this->selectcolumns[] = $this->columns[$id]; 
    116                         $this->selectcolumns = array_reverse($this->selectcolumns); 
    117  
    118                         //change 
    119                         $this->selecttable="(((((lineitems LEFT JOIN products ON lineitems.productid=products.uuid) 
    120                                                                         INNER JOIN invoices ON lineitems.invoiceid=invoices.id) 
    121                                                                         INNER JOIN clients ON invoices.clientid=clients.uuid) 
    122                                                                         LEFT JOIN shippingmethods ON shippingmethods.uuid=invoices.shippingmethodid) 
    123                                                                         LEFT JOIN paymentmethods ON paymentmethods.uuid=invoices.paymentmethodid) 
    124                                                                         "; 
    125  
    126                         if($variables["groupings"] !== ""){ 
    127                                 $this->group = explode("::",$variables["groupings"]); 
    128                                 $this->group = array_reverse($this->group); 
    129                         } else 
    130                                 $this->group = array(); 
    131  
    132                         foreach($this->group as $grp){ 
    133                                 if($this->groupings[$grp]["table"]) 
    134                                         $this->selecttable="(".$this->selecttable." ".$this->groupings[$grp]["table"].")"; 
    135                         } 
    136  
    137                         $this->whereclause=$_SESSION["printing"]["whereclause"]; 
    138                         if($this->whereclause=="") $this->whereclause="WHERE invoices.id!=-1"; 
    139  
    140                         switch($variables["showwhat"]){ 
    141                                 case "invoices": 
    142                                         $this->showinvoices = true; 
    143                                         $this->showlineitems = false; 
    144                                         break; 
    145  
    146                                 case "lineitems": 
    147                                         $this->showinvoices = true; 
    148                                         $this->showlineitems = true; 
    149                                         break; 
    150  
    151                                 default: 
    152                                         $this->showinvoices = false; 
    153                                         $this->showlineitems = false; 
    154                         }// endswitch 
    155  
    156                         if($this->whereclause!="") $this->whereclause=" WHERE (".substr($this->whereclause,6).") "; 
    157                 }// endif 
     46        var $group = ""; 
     47        var $showinvoices = false; 
     48        var $showlineitems = false; 
     49        var $padamount = 20; 
     50        var $title = "Totals"; 
     51 
     52        function totalReport($db, $reportUUID, $tabledefUUID, $variables = NULL){ 
     53 
     54            parent::phpbmsReport($db, $reportUUID, $tabledefUUID); 
     55 
     56            // first we define the available groups 
     57            $this->addGroup("Invoice ID","invoices.id"); //0 
     58            $this->addGroup("Product","concat(products.partnumber,' - ',products.partname)"); //1 
     59            $this->addGroup("Product Category","concat(productcategories.id,' - ',productcategories.name)",NULL,"INNER JOIN productcategories ON products.categoryid=productcategories.uuid"); //2 
     60 
     61            $this->addGroup("Invoice Date - Year","YEAR(invoices.invoicedate)"); //3 
     62            $this->addGroup("Invoice Date - Quarter","QUARTER(invoices.invoicedate)"); //4 
     63            $this->addGroup("Invoice Date - Month","MONTH(invoices.invoicedate)"); //5 
     64            $this->addGroup("Invoice Date","invoices.invoicedate","date"); //6 
     65 
     66            $this->addGroup("Order Date - Year","YEAR(invoices.orderdate)"); //7 
     67            $this->addGroup("Order Date - Quarter","QUARTER(invoices.orderdate)");//8 
     68            $this->addGroup("Order Date - Month","MONTH(invoices.orderdate)");//9 
     69            $this->addGroup("Order Date","invoices.orderdate","date");//10 
     70 
     71            $this->addGroup("Client","if(clients.lastname!='',concat(clients.lastname,', ',clients.firstname,if(clients.company!='',concat(' (',clients.company,')'),'')),clients.company)");//11 
     72 
     73            $this->addGroup("Client Sales Person","concat(salesPerson.firstname,' ',salesPerson.lastname)",NULL, "LEFT JOIN users AS salesPerson ON clients.salesmanagerid = salesPerson.id");//12 
     74 
     75            $this->addGroup("Client Lead Source","clients.leadsource");//13 
     76 
     77            $this->addGroup("Invoice Lead Source","invoices.leadsource");//14 
     78 
     79            $this->addGroup("Payment Method","paymentmethods.name");//15 
     80 
     81            $this->addGroup("Shipping Method","shippingmethods.name");//16 
     82            $this->addGroup("Invoice Shipping Country","invoices.shiptocountry");//17 
     83            $this->addGroup("Invoice Shipping State / Province","invoices.shiptostate");//18 
     84            $this->addGroup("Invoice Shipping Postal Code","invoices.shiptopostalcode");//19 
     85            $this->addGroup("Invoice Shipping City","invoices.shiptocity");//20 
     86 
     87            $this->addGroup("Web Order","invoices.weborder","boolean");//21 
     88 
     89            $this->addGroup("Invoice billing Country","invoices.country");//22 
     90            $this->addGroup("Invoice Billing State / Province","invoices.state");//23 
     91            $this->addGroup("Invoice Billing Postal Code","invoices.postalcode");//24 
     92            $this->addGroup("Invoice Billing City","invoices.city");//25 
     93 
     94            //next we do the columns 
     95            $this->addColumn("Record Count","count(lineitems.id)");//0 
     96            $this->addColumn("Extended Price","sum(lineitems.unitprice*lineitems.quantity)","currency");//1 
     97            $this->addColumn("Average Extended Price","avg(lineitems.unitprice*lineitems.quantity)","currency");//2 
     98            $this->addColumn("Unit Price","sum(lineitems.unitprice)","currency");//3 
     99            $this->addColumn("Average Unit Price","avg(lineitems.unitprice)","currency");//4 
     100            $this->addColumn("Quantity","sum(lineitems.quantity)","real");//5 
     101            $this->addColumn("Average Quantity","avg(lineitems.quantity)","real");//6 
     102            $this->addColumn("Unit Cost","sum(lineitems.unitcost)","currency");//7 
     103            $this->addColumn("Average Unit Cost","avg(lineitems.unitcost)","currency");//8 
     104            $this->addColumn("Extended Cost","sum(lineitems.unitcost*lineitems.quantity)","currency");//9 
     105            $this->addColumn("Average Extended Cost","avg(lineitems.unitcost*lineitems.quantity)","currency");//10 
     106            $this->addColumn("Unit Weight","sum(lineitems.unitweight)","real");//11 
     107            $this->addColumn("Average Unit Weight","avg(lineitems.unitweight)","real");//12 
     108            $this->addColumn("Extended Unit Weight","sum(lineitems.unitweight*lineitems.quantity)","real");//13 
     109            $this->addColumn("Extended Average Unit Weight","avg(lineitems.unitweight*lineitems.quantity)","real");//14 
     110 
     111            //change 
     112            $this->selecttable="(((((lineitems LEFT JOIN products ON lineitems.productid=products.uuid) 
     113                                                            INNER JOIN invoices ON lineitems.invoiceid=invoices.id) 
     114                                                            INNER JOIN clients ON invoices.clientid=clients.uuid) 
     115                                                            LEFT JOIN shippingmethods ON shippingmethods.uuid=invoices.shippingmethodid) 
     116                                                            LEFT JOIN paymentmethods ON paymentmethods.uuid=invoices.paymentmethodid) 
     117                                                            "; 
     118 
     119        }//end function totalReport 
     120 
     121 
     122        function processFromPost($variables){ 
     123 
     124            $tempArray = explode("::", $variables["columns"]); 
     125 
     126            foreach($tempArray as $id) 
     127                    $this->selectcolumns[] = $this->columns[$id]; 
     128 
     129            $this->selectcolumns = array_reverse($this->selectcolumns); 
     130 
     131            if($variables["groupings"] !== ""){ 
     132 
     133                $this->group = explode("::",$variables["groupings"]); 
     134                $this->group = array_reverse($this->group); 
     135 
     136            } else 
     137                $this->group = array(); 
     138 
     139            foreach($this->group as $grp) 
     140                if($this->groupings[$grp]["table"]) 
     141                    $this->selecttable="(".$this->selecttable." ".$this->groupings[$grp]["table"].")"; 
     142 
     143            switch($variables["showwhat"]){ 
     144 
     145                case "invoices": 
     146                    $this->showinvoices = true; 
     147                    $this->showlineitems = false; 
     148                    break; 
     149 
     150                case "lineitems": 
     151                    $this->showinvoices = true; 
     152                    $this->showlineitems = true; 
     153                    break; 
     154 
     155                default: 
     156                    $this->showinvoices = false; 
     157                    $this->showlineitems = false; 
     158 
     159            }// endswitch 
     160 
     161            if($variables["reporttitle"]) 
     162                $this->title = $variables["reporttitle"]; 
     163 
     164        }//end function processFromPost 
     165 
     166 
     167        function processFromSettings(){ 
     168 
     169            foreach($this->settings as $key=>$value) 
     170                if(strpos($key, "column") === 0) 
     171                    $this->selectcolumns[substr($key,6)-1] = $this->columns[$value]; 
     172 
     173            ksort($this->selectcolumns); 
     174            $this->selectcolumns = array_reverse($this->selectcolumns); 
     175 
     176            $this->group = array(); 
     177 
     178            foreach($this->settings as $key=>$value) 
     179                if(strpos($key, "group") === 0) 
     180                    $this->group[substr($key,5)-1] = $value; 
     181 
     182            ksort($this->group); 
     183            $this->group = array_reverse($this->group); 
     184 
     185            foreach($this->group as $grp) 
     186                if($this->groupings[$grp]["table"]) 
     187                    $this->selecttable="(".$this->selecttable." ".$this->groupings[$grp]["table"].")"; 
     188 
     189 
     190            if(isset($this->settings["showWhat"])) 
     191                $showWhat = $this->settings["showWhat"]; 
     192            else 
     193                $showWhat = ""; 
     194 
     195            switch($showWhat){ 
     196 
     197                case "invoices": 
     198                    $this->showinvoices = true; 
     199                    $this->showlineitems = false; 
     200                    break; 
     201 
     202                case "lineitems": 
     203                    $this->showinvoices = true; 
     204                    $this->showlineitems = true; 
     205                    break; 
     206 
     207                default: 
     208                    $this->showinvoices = false; 
     209                    $this->showlineitems = false; 
     210 
     211            }// endswitch 
     212 
     213            if(isset($this->settings["reportTitle"])) 
     214                $this->title = $this->settings["reportTitle"]; 
     215 
     216        }//end function processFromSettings 
     217 
     218 
     219        function addGroup($name, $field, $format = NULL, $tableAddition = NULL){ 
     220 
     221            $temp = array(); 
     222            $temp["name"] = $name; 
     223            $temp["field"] = $field; 
     224            $temp["format"] = $format; 
     225            $temp["table"] = $tableAddition; 
     226 
     227            $this->groupings[] = $temp; 
     228 
    158229        }//end method 
    159230 
    160231 
    161         function addGroup($name, $field, $format = NULL, $tableAddition = NULL){ 
    162                 $temp = array(); 
    163                 $temp["name"] = $name; 
    164                 $temp["field"] = $field; 
    165                 $temp["format"] = $format; 
    166                 $temp["table"] = $tableAddition; 
    167  
    168                 $this->groupings[] = $temp; 
     232        function addColumn($name, $field, $format = NULL){ 
     233 
     234            $temp = array(); 
     235            $temp["name"] = $name; 
     236            $temp["field"] = $field; 
     237            $temp["format"] = $format; 
     238 
     239            $this->columns[] = $temp; 
     240 
    169241        }//end method 
    170242 
    171243 
    172         function addColumn($name, $field, $format = NULL){ 
    173                 $temp = array(); 
    174                 $temp["name"] = $name; 
    175                 $temp["field"] = $field; 
    176                 $temp["format"] = $format; 
    177  
    178                 $this->columns[] = $temp; 
    179         }//end method 
    180  
    181  
    182244        function showReportTable(){ 
    183                 ?><table border="0" cellspacing="0" cellpadding="0"> 
    184                 <tr> 
    185                         <th>&nbsp;</th> 
    186                 <?php 
    187                         foreach($this->selectcolumns as $thecolumn){ 
    188                                 ?><th align="right"><?php echo $thecolumn["name"]?></th><?php 
    189                         }//end foreach 
    190                 ?> 
    191                 </tr> 
    192                 <?php $this->showGroup($this->group,"",10);?> 
    193                 <?php $this->showGrandTotals();?> 
    194                 </table> 
    195                 <?php 
    196         } 
     245 
     246            ?><table border="0" cellspacing="0" cellpadding="0"> 
     247            <tr> 
     248                    <th>&nbsp;</th> 
     249            <?php 
     250                    foreach($this->selectcolumns as $thecolumn){ 
     251                            ?><th align="right"><?php echo $thecolumn["name"]?></th><?php 
     252                    }//end foreach 
     253            ?> 
     254            </tr> 
     255            <?php $this->showGroup($this->group,"",10);?> 
     256            <?php $this->showGrandTotals();?> 
     257            </table> 
     258            <?php 
     259 
     260        }//end function showReportTable(); 
     261 
    197262 
    198263        function showGrandTotals(){ 
    199264 
    200                 $querystatement="SELECT "; 
    201                 foreach($this->selectcolumns as $thecolumn) 
    202                         $querystatement.=$thecolumn["field"]." AS `".$thecolumn["name"]."`,"; 
    203                 $querystatement.=" count(lineitems.id) as thecount "; 
    204                 $querystatement.=" FROM ".$this->selecttable.$this->whereclause; 
    205                 $queryresult=$this->db->query($querystatement); 
    206  
    207                 $therecord=$this->db->fetchArray($queryresult); 
    208                 ?> 
    209                 <tr> 
    210                         <td class="grandtotals" align="right">Totals: (<?php echo $therecord["thecount"]?>)</td> 
    211                         <?php 
    212                                 foreach($this->selectcolumns as $thecolumn){ 
    213                                         ?><td align="right" class="grandtotals"><?php echo formatVariable($therecord[$thecolumn["name"]],$thecolumn["format"])?></td><?php 
    214                                 }//end foreach 
    215                         ?> 
    216                 </tr> 
    217                 <?php 
    218         } 
     265            $querystatement="SELECT "; 
     266            foreach($this->selectcolumns as $thecolumn) 
     267                    $querystatement.=$thecolumn["field"]." AS `".$thecolumn["name"]."`,"; 
     268            $querystatement.=" count(lineitems.id) as thecount "; 
     269            $querystatement.=" FROM ".$this->selecttable.$this->whereClause; 
     270            $queryresult=$this->db->query($querystatement); 
     271 
     272            $therecord=$this->db->fetchArray($queryresult); 
     273            ?> 
     274            <tr> 
     275                    <td class="grandtotals" align="right">Totals: (<?php echo $therecord["thecount"]?>)</td> 
     276                    <?php 
     277                            foreach($this->selectcolumns as $thecolumn){ 
     278                                    ?><td align="right" class="grandtotals"><?php echo formatVariable($therecord[$thecolumn["name"]],$thecolumn["format"])?></td><?php 
     279                            }//end foreach 
     280                    ?> 
     281            </tr> 
     282            <?php 
     283 
     284        }//end function showGrandTotals 
     285 
    219286 
    220287        function showGroup($group,$where,$indent){ 
     
    231298                                $querystatement.=$thecolumn["field"]." AS `".$thecolumn["name"]."`,"; 
    232299                        $querystatement .= $this->groupings[$groupby]["field"]." AS thegroup, count(lineitems.id) as thecount "; 
    233                         $querystatement .= " FROM ".$this->selecttable.$this->whereclause.$where." GROUP BY ".$this->groupings[$groupby]["field"]; 
     300                        $querystatement .= " FROM ".$this->selecttable.$this->whereClause.$where." GROUP BY ".$this->groupings[$groupby]["field"]; 
    234301                        $queryresult=$this->db->query($querystatement); 
    235302 
     
    290357                                `lineitems`.`unitprice`, 
    291358                                `quantity`*`lineitems`.`unitprice` AS `extended` 
    292                         FROM ".$this->selecttable.$this->whereclause.$where." GROUP BY lineitems.id 
     359                        FROM ".$this->selecttable.$this->whereClause.$where." GROUP BY lineitems.id 
    293360                "; 
    294361 
     
    337404        function showReport(){ 
    338405 
    339                 if($_POST["reporttitle"]) 
    340                         $pageTitle = $_POST["reporttitle"]; 
    341                 else 
    342                         $pageTitle = "Line Item Totals"; 
    343  
     406            if(!$this->whereClause) 
     407                $this->whereClause = "invoices.id!=-1"; 
     408 
     409            $this->whereClause = " WHERE ".$this->whereClause; 
     410 
     411            $pageTitle = $this->title; 
    344412 
    345413?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    394462        <div class="bodyline"> 
    395463            <h1>Line Items Total Options</h1> 
    396             <form id="GroupForm" action="<?php echo $_SERVER["PHP_SELF"]?>" method="post" name="GroupForm"> 
     464            <form id="GroupForm" action="<?php echo str_replace("&", "&amp;", $_SERVER["REQUEST_URI"]) ?>" method="post" name="GroupForm"> 
    397465 
    398466                <fieldset> 
     
    465533 
    466534 
    467 // Processing =================================================================================================================== 
    468 if(!isset($dontProcess)){ 
    469         if(isset($_POST["columns"])){ 
    470                 $myreport= new totalReport($db,$_POST); 
    471                 $myreport->showReport(); 
    472         } else { 
    473                 $myreport = new totalReport($db); 
    474                 $myreport->showSelectScreen(); 
    475         } 
    476 }?> 
     535/** 
     536 * PROCESSING 
     537 * ============================================================================= 
     538 */ 
     539if(!isset($noOutput)){ 
     540 
     541    require("../../../include/session.php"); 
     542 
     543    checkForReportArguments(); 
     544 
     545    $report = new totalReport($db, $_GET["rid"], $_GET["tid"]); 
     546 
     547    if(isset($_POST["columns"])){ 
     548 
     549        $report->setupFromPrintScreen(); 
     550        $report->processFromPost($_POST); 
     551        $report->showReport(); 
     552 
     553    } elseif(isset($report->settings["column1"])){ 
     554 
     555        $report->setupFromPrintScreen(); 
     556        $report->processFromSettings(); 
     557        $report->showReport(); 
     558 
     559    } else { 
     560 
     561        $report->showSelectScreen(); 
     562 
     563    }//endif 
     564 
     565}//endif 
     566 
     567/** 
     568 * When adding a new report record, the add/edit needs to know what the class 
     569 * name is so that it can instantiate it, and grab it's default settings. 
     570 */ 
     571if(isset($addingReportRecord)) 
     572    $reportClass ="totalReport"; 
     573 
     574?> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.