mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2026-09-03 10:21:38 -04:00
Replaces some hardwired variables with user-defined constants.
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user