navigation  interaction  search

 other resources

Changeset 412

Show
Ignore:
Timestamp:
06/18/08 01:13:25
Author:
jceh
Message:

link to invoice from product sales history, and sortable order date (default being desc).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phpbms/modules/bms/products_saleshistory.php

    r285 r412  
    4646        if(!isset($_POST["status"])) $_POST["status"]="Orders/Invoices"; 
    4747        if(!isset($_POST["command"])) $_POST["command"]="show"; 
     48        if(!isset($_POST["date_order"])) $_POST["date_order"]="desc"; 
    4849 
    4950        if($_POST["command"]=="print")  { 
     
    6869                break; 
    6970        } 
     71    $date_order_reverse = $_POST['date_order'] == 'desc' ? 'asc' : 'desc'; 
    7072 
    7173        $mysqlfromdate=sqlDateFromString($_POST["fromdate"]); 
     
    8991                AND ".$thestatus." 
    9092                HAVING thedate >=\"".$mysqlfromdate."\" 
    91                 and thedate <=\"".$mysqltodate."\" ORDER BY thedate"
     93                and thedate <=\"".$mysqltodate."\" ORDER BY thedate " .$_POST["date_order"]
    9294        $queryresult=$db->query($querystatement); 
    9395 
     
    133135                <p id="printP"><br /><input id="print" name="command" type="submit" value="print" class="Buttons" /></p> 
    134136                <p id="changeTimelineP"><br /><input name="command" type="submit" value="change timeframe/view" class="smallButtons" /></p> 
     137                <input name="date_order" id="date_order" type="hidden" value="<?php echo $_POST["date_order"]; ?>" /> 
    135138        </div> 
    136139 
     
    138141   <table border="0" cellpadding="3" cellspacing="0" class="querytable"> 
    139142        <tr> 
    140          <th align="center" nowrap="nowrap" class="queryheader">ID</th> 
    141          <th align="center" nowrap="nowrap" class="queryheader">Order Date</th> 
     143         <th align="center" nowrap="nowrap" class="queryheader" colspan="2">ID</th> 
     144         <th align="center" nowrap="nowrap" class="queryheader"> 
     145                <a onclick="javascript:document.getElementById('date_order').value='<?php echo $date_order_reverse; ?>'; document.record.submit();">Order Date</a> 
     146         </th> 
    142147         <th nowrap="nowrap" class="queryheader" width="100%" align="left">Client</th> 
    143148         <th align="center" nowrap="nowrap" class="queryheader">Qty.</th> 
     
    163168?> 
    164169        <tr class="row<?php echo $row?>"> 
     170         <td> 
     171                <button type="button" class="invisibleButtons" onclick="location.href='<?php echo getAddEditFile($db,3) ?>?id=<?php echo $therecord["id"]?>'"><img src="<?php echo APP_PATH ?>common/stylesheet/<?php echo STYLESHEET ?>/image/button-edit.png" align="middle" alt="edit" width="16" height="16" border="0" /></button> 
     172         </td> 
    165173         <td align="center" nowrap="nowrap"><?php echo $therecord["id"]?></td> 
    166174         <td align="center" nowrap="nowrap"><?php echo $therecord["thedate"]?formatFromSQLDate($therecord["thedate"]):"&nbsp;" ?></td> 
Copyright © 2006-2007 Kreotek, LLC. All Rights reserved.