Improvements to the transaction UI.

This commit is contained in:
Jonathan Rosenbaum
2014-12-29 00:14:26 +00:00
parent d2332719a0
commit 203708dad2
6 changed files with 63 additions and 24 deletions
+6 -1
View File
@@ -51,7 +51,12 @@ $editFormAction = $_SERVER['PHP_SELF'] . "?shop_date=$shop_date&shop_id=$shop_id
$editFormAction_no_shopid = $_SERVER['PHP_SELF'] . "?shop_date=$shop_date";
mysql_select_db($database_YBDB, $YBDB);
$query_Recordset1 = "SELECT shops.shop_id, date, DAYNAME(date) as day ,shop_location, shop_type, ip_address, IF(date = curdate(),1,0) as CanEdit, COUNT(shop_visit_id) AS num_visitors, ROUND(SUM(HOUR(SUBTIME( TIME(time_out), TIME(time_in))) + MINUTE(SUBTIME( TIME(time_out), TIME(time_in)))/60)) AS total_hours FROM shops LEFT JOIN shop_hours ON shops.shop_id = shop_hours.shop_id WHERE date <= '{$shop_date}' {$shop_dayname} GROUP BY shop_id ORDER BY date DESC , shop_id DESC LIMIT 0, $record_count;";
$query_Recordset1 = "SELECT shops.shop_id, date, DAYNAME(date) as day ,shop_location, shop_type, ip_address, IF(date = curdate(),1,0)
AS CanEdit, COUNT(shop_visit_id) AS num_visitors, ROUND(SUM(HOUR(SUBTIME( TIME(time_out), TIME(time_in)))
+ MINUTE(SUBTIME( TIME(time_out), TIME(time_in)))/60)) AS total_hours
FROM shops LEFT JOIN shop_hours ON shops.shop_id = shop_hours.shop_id
WHERE date <= '{$shop_date}' {$shop_dayname} GROUP BY shop_id
ORDER BY date DESC , shop_id DESC LIMIT 0, $record_count;";
$Recordset1 = mysql_query($query_Recordset1, $YBDB) or die(mysql_error());
//$row_Recordset1 = mysql_fetch_assoc($Recordset1); //Wait to fetch until do loop
$totalRows_Recordset1 = mysql_num_rows($Recordset1);