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

    r606 r693  
    4040        include("include/fields.php"); 
    4141 
    42         if(!hasRights("role:259ead9f-100b-55b5-508a-27e33a6216bf")) goURL(APP_PATH."noaccess.php"); 
    43  
    44         if(!isset($_POST["fromdate"])) $_POST["fromdate"]=dateToString(strtotime("-1 year")); 
    45         if(!isset($_POST["todate"])) $_POST["todate"]=dateToString(mktime()); 
    46         if(!isset($_POST["status"])) $_POST["status"]="Orders/Invoices"; 
    47         if(!isset($_POST["command"])) $_POST["command"]="show"; 
    48         if(!isset($_POST["date_order"])) $_POST["date_order"]="DESC"; 
     42        if(!hasRights("role:259ead9f-100b-55b5-508a-27e33a6216bf")) 
     43            goURL(APP_PATH."noaccess.php"); 
     44 
     45        if(!isset($_POST["fromdate"])) 
     46            $_POST["fromdate"] = dateToString(strtotime("-1 year")); 
     47 
     48        if(!isset($_POST["todate"])) 
     49            $_POST["todate"] = dateToString(mktime()); 
     50 
     51        if(!isset($_POST["status"])) 
     52            $_POST["status"] = "Orders and Invoices"; 
     53 
     54        if(!isset($_POST["command"])) 
     55            $_POST["command"] = "show"; 
     56 
     57        if(!isset($_POST["date_order"])) 
     58            $_POST["date_order"] = "DESC"; 
    4959 
    5060        if($_POST["command"]=="print")  { 
    51                         $_SESSION["printing"]["whereclause"]="WHERE products.id=".$_GET["id"]; 
    52                         $_SESSION["printing"]["dataprint"]="Single Record"; 
    53                         $fromProduct=true; 
    54                         require("report/products_saleshistory.php"); 
     61 
     62            $_SESSION["printing"]["whereclause"]="products.id=".$_GET["id"]; 
     63            $_SESSION["printing"]["dataprint"]="Single Record"; 
     64 
     65            goURL("report/products_saleshistory.php?rid=".urlencode("rpt:a278af28-9c34-da2e-d81b-4caa36dfa29f")."&tid=".urlencode("tbld:7a9e87ed-d165-c4a4-d9b9-0a4adc3c5a34")."&status=".urlencode($_POST["status"])."&fromdate=".urlencode($_POST["fromdate"])."&todate=".urlencode($_POST["todate"])); 
     66 
    5567        } else { 
    56         $thestatus="(invoices.type =\""; 
    57         switch($_POST["status"]){ 
    58                 case "Orders/Invoices": 
    59                         $thestatus.="Order\" or invoices.type=\"Invoice\")"; 
    60                         $searchdate="orderdate"; 
    61                 break; 
     68 
     69            $thestatus="(invoices.type =\""; 
     70            switch($_POST["status"]){ 
     71 
     72                case "Orders and Invoices": 
     73                    $thestatus.="Order\" or invoices.type=\"Invoice\")"; 
     74                    $searchdate="orderdate"; 
     75                    break; 
     76 
    6277                case "Invoices": 
    63                         $thestatus.="Invoice\")"; 
    64                         $searchdate="invoicedate"; 
    65                 break; 
     78                    $thestatus.="Invoice\")"; 
     79                    $searchdate="invoicedate"; 
     80                    break; 
     81 
    6682                case "Orders": 
    67                         $thestatus.="Order\")"; 
    68                         $searchdate="orderdate"; 
    69                 break; 
    70         } 
     83                    $thestatus.="Order\")"; 
     84                    $searchdate="orderdate"; 
     85                    break; 
     86 
     87            }//endswitch 
    7188        $dateOrder = ($_POST['date_order'] == 'DESC') ? 'ASC' : 'DESC'; 
    7289 
     
    132149                   <label for="status">type</label><br /> 
    133150                   <select name="status" id="status"> 
    134                                 <option value="Orders/Invoices" <?php if($_POST["status"]=="Orders/Invoices") echo "selected=\"selected\""?>>Orders/Invoices</option> 
     151                                <option value="Orders and Invoices" <?php if($_POST["status"]=="Orders and Invoices") echo "selected=\"selected\""?>>Orders and Invoices</option> 
    135152                                <option value="Invoices" <?php if($_POST["status"]=="Invoices") echo "selected=\"selected\""?>>Invoices</option> 
    136153                                <option value="Orders" <?php if($_POST["status"]=="Orders") echo "selected=\"selected\""?>>Orders</option> 
     
    143160 
    144161                <p id="printP"><br /><input id="print" name="command" type="submit" value="print" class="Buttons" /></p> 
    145                 <p id="changeTimelineP"><br /><input name="command" type="submit" value="change timeframe/view" class="smallButtons" /></p> 
     162                <p id="changeTimelineP"><br /><input name="command" type="submit" value="update" class="smallButtons" /></p> 
    146163                <input name="date_order" id="date_order" type="hidden" value="<?php echo $_POST["date_order"]; ?>" /> 
    147164        </div> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.