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/base/reports_addedit.php

    r574 r693  
    4646        $therecord = $thetable->processAddEditPage(); 
    4747 
     48        if($therecord["id"]){ 
     49 
     50            $reportSettings = new reportSettings($db, $therecord["uuid"]); 
     51            $reportSettings->get(); 
     52 
     53        }//endif 
     54 
    4855        if(isset($therecord["phpbmsStatus"])) 
    4956                $statusmessage = $therecord["phpbmsStatus"]; 
     
    5158        $pageTitle="Report"; 
    5259 
    53         $phpbms->cssIncludes[] = "pages/reports.css"; 
     60        $phpbms->cssIncludes[] = "pages/base/reports.css"; 
     61        $phpbms->jsIncludes[] = "modules/base/javascript/reports.js"; 
    5462 
    5563                //Form Elements 
    5664                //============================================================== 
    57                 $theform = new phpbmsForm(); 
     65                $theform = new phpbmsForm(NULL, "post", "record", NULL); 
     66                $theform->id = "record"; 
    5867 
    5968                $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,32,64); 
     
    7079                $theform->addField($theinput); 
    7180 
    72                 $theinput = new inputField("reportfile",$therecord["reportfile"],"report file",true,NULL,64,128); 
    73                 $theform->addField($theinput); 
     81                if($therecord["id"]){ 
     82 
     83                    $theinput = new inputField("reportfile",$therecord["reportfile"],"report file",true,NULL,64,128); 
     84                    $theinput->setAttribute("readonly","readonly"); 
     85                    $theinput->setAttribute("class","uneditable"); 
     86 
     87                    $theform->addField($theinput); 
     88 
     89                }//endif 
     90 
     91                $theinput = new inputTextarea("description", $therecord["description"], NULL, false, 3, 48); 
     92                $theform->addField($theinput); 
    7493 
    7594                $thetable->getCustomFieldInfo(); 
     
    82101 
    83102?><div class="bodyline"> 
    84         <?php $theform->startForm($pageTitle)?> 
    85  
     103<?php $theform->startForm($pageTitle) ?> 
    86104        <fieldset id="fsAttributes"> 
    87105                <legend>Attributes</legend> 
     106 
     107                <p><?php $theform->showField("type")?></p> 
    88108 
    89109                <p> 
    90110                        <label for="tabledefid">report table</label><br /> 
    91111                        <?php $thetable->displayTables("tabledefid",$therecord["tabledefid"]);?><br /> 
    92                         <span class="notes">Note: Use the global option to associate the report with every table in the system.</span> 
    93112                </p> 
    94113 
    95114                <p> 
    96115                        <?php $theform->showField("displayorder"); ?><br /> 
    97                         <span class="notes">Lower numbers are displayed first.  Reports with the same order are grouped together.</span> 
    98116                </p> 
    99117 
     
    108126                        <p class="big"><?php $theform->showField("name"); ?></p> 
    109127 
    110                         <p><?php $theform->showField("type")?></p> 
    111  
    112                         <p><?php $theform->showField("reportfile")?></p> 
    113128 
    114129                        <p> 
    115                                 <label for="description">description</label><br /> 
    116                                 <textarea id="description" name="description"  cols="61" rows="5" tabindex="35"><?php echo htmlQuotes($therecord["description"])?></textarea> 
    117                         </p> 
     130                        <?php 
     131                            if($therecord["id"]) 
     132                                $theform->showField("reportfile"); 
     133                            else 
     134                                $thetable->displayRerportFiles(); 
     135                        ?> 
     136                        </p> 
     137 
     138                        <p class="big"><?php $theform->showField("description"); ?></p> 
     139 
    118140                </fieldset> 
     141 
     142                <fieldset> 
     143                    <legend>settings</legend> 
     144                    <?php if(!$therecord["id"]) { 
     145                        ?><p class="notes">Report settings are available after initial record creation.</p><?php 
     146                    } else { 
     147                      ?> 
     148 
     149 
     150                        <textarea class="hiddenTextAreas" id="rsUpdates" name="rsUpdates" rows="1" cols="5"></textarea> 
     151                        <textarea class="hiddenTextAreas" id="rsDelList" name="rsDelList" rows="1" cols="5"></textarea> 
     152                        <textarea class="hiddenTextAreas" id="rsAdds"    name="rsAdds" rows="1" cols="5"></textarea> 
     153                        <table class="querytable simple" id="settingsTable" cellspacing="0" cellpadding="0" border="0" summary="report settings"> 
     154                            <thead> 
     155                                <tr> 
     156                                    <th align="right">name</th> 
     157                                    <th>value</th> 
     158                                    <th>type</th> 
     159                                    <th width="100%">description</th> 
     160                                    <th>&nbsp;</th> 
     161                                </tr> 
     162                            </thead> 
     163                            <tbody id="rsTbody"> 
     164                                <tr id="addNewRow"> 
     165                                    <td> 
     166                                        <input type="text" id="rsAddName"/> 
     167                                    </td> 
     168                                    <td> 
     169                                        <input type="text" id="rsAddValue" size="32"/> 
     170                                    </td> 
     171                                    <td>string</td> 
     172                                    <td>user added setting</td> 
     173                                    <td> 
     174                                        <button title="Add Setting" class="graphicButtons buttonPlus" id="rsButtonAdd" type="button"><span>+</span></button> 
     175                                    </td> 
     176                                </tr> 
     177                                <?php 
     178                                    $reportSettings->display(); 
     179                                ?> 
     180                                <tr class="queryfooter" id="rsFooterTr"> 
     181                                    <td colspan="5">&nbsp;</td> 
     182                                </tr> 
     183                            </tbody> 
     184                        </table> 
     185                      <?php 
     186                    }//endif 
     187                    ?> 
     188                </fieldset> 
    119189 
    120190                <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?> 
     
    124194        <?php 
    125195                $theform->showGeneralInfo($phpbms,$therecord); 
    126                 $theform->endForm(); 
     196                $theform->endForm(); 
    127197        ?> 
    128198</div> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.