Replaces some hardwired variables with user-defined constants.

This commit is contained in:
Jonathan Rosenbaum
2014-12-27 07:59:59 +00:00
parent 2274b69a8e
commit d2332719a0
4 changed files with 27 additions and 10 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
require_once('../Connections/YBDB.php');
require_once('../Connections/database_functions.php');
$page_individual_history_log = INDIVIDUAL_HISTORY_LOG;
$accounting_group = ACCOUNTING_GROUP;
switch ($_GET['error']) {
case 'no_shop':
@@ -19,7 +20,7 @@ mysql_select_db($database_YBDB, $YBDB);
$query_Recordset1 = "SELECT year(t.date) as Year,quarter(t.date) as Quarter, month(t.date) as Month, round(sum(amount),2) as TotalSales, tt.accounting_group as AccountingGroup
FROM transaction_log t
LEFT JOIN transaction_types tt ON t.transaction_type = tt.transaction_type_id
WHERE tt.accounting_group = 'Sales'
WHERE tt.accounting_group = '$accounting_group'
GROUP BY year(t.date), month(t.date)
ORDER BY year(t.date) DESC, month(t.date) DESC;";
$Recordset1 = mysql_query($query_Recordset1, $YBDB) or die(mysql_error());