Changeset 412
- Timestamp:
- 06/18/08 01:13:25
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/phpbms/modules/bms/products_saleshistory.php
r285 r412 46 46 if(!isset($_POST["status"])) $_POST["status"]="Orders/Invoices"; 47 47 if(!isset($_POST["command"])) $_POST["command"]="show"; 48 if(!isset($_POST["date_order"])) $_POST["date_order"]="desc"; 48 49 49 50 if($_POST["command"]=="print") { … … 68 69 break; 69 70 } 71 $date_order_reverse = $_POST['date_order'] == 'desc' ? 'asc' : 'desc'; 70 72 71 73 $mysqlfromdate=sqlDateFromString($_POST["fromdate"]); … … 89 91 AND ".$thestatus." 90 92 HAVING thedate >=\"".$mysqlfromdate."\" 91 and thedate <=\"".$mysqltodate."\" ORDER BY thedate ";93 and thedate <=\"".$mysqltodate."\" ORDER BY thedate " .$_POST["date_order"]; 92 94 $queryresult=$db->query($querystatement); 93 95 … … 133 135 <p id="printP"><br /><input id="print" name="command" type="submit" value="print" class="Buttons" /></p> 134 136 <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"]; ?>" /> 135 138 </div> 136 139 … … 138 141 <table border="0" cellpadding="3" cellspacing="0" class="querytable"> 139 142 <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> 142 147 <th nowrap="nowrap" class="queryheader" width="100%" align="left">Client</th> 143 148 <th align="center" nowrap="nowrap" class="queryheader">Qty.</th> … … 163 168 ?> 164 169 <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> 165 173 <td align="center" nowrap="nowrap"><?php echo $therecord["id"]?></td> 166 174 <td align="center" nowrap="nowrap"><?php echo $therecord["thedate"]?formatFromSQLDate($therecord["thedate"]):" " ?></td>