Closes #77. Currently search capability specific to report(s);

Could be integrated into transaction_log page search.
This commit is contained in:
Jonathan Rosenbaum
2018-09-04 00:21:43 +00:00
parent 01293db335
commit da1a063a0a
2 changed files with 11 additions and 2 deletions
+10 -1
View File
@@ -101,6 +101,15 @@ if($_GET['search']==''){
$search_state = '';
}
// currently used for links in reports, and not for transaction_log page search mechanism
if($_GET['shop_id_search']==''){
$shop_id_search = '';
} elseif(isset($_GET['shop_id_search'])) {
$shop_id_search = "AND shop_id = '" . $_GET['shop_id_search'] . "'";
} else {
$shop_id_search = '';
}
//record_count (SQL or state)
if($_GET['record_count']>0){
@@ -146,7 +155,7 @@ LEFT(IF(show_startdate, CONCAT(' [',
FROM transaction_log
LEFT JOIN contacts ON transaction_log.sold_to=contacts.contact_id
LEFT JOIN transaction_types ON transaction_log.transaction_type=transaction_types.transaction_type_id
WHERE 1=1 {$trans_date} {$shop_dayname} {$trans_type} {$contact_id} {$search} ORDER BY transaction_id DESC LIMIT 0, $record_count;";
WHERE 1=1 {$trans_date} {$shop_dayname} {$trans_type} {$contact_id} {$search} {$shop_id_search} ORDER BY transaction_id DESC LIMIT 0, $record_count;";
$Recordset1 = mysql_query($query_Recordset1, $YBDB) or die(mysql_error());
$totalRows_Recordset1 = mysql_num_rows($Recordset1);