Changeset 720 for trunk/Modules/Finance/UserState.php
- Timestamp:
- Jan 3, 2015, 5:55:34 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/UserState.php
r719 r720 12 12 'FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '. 13 13 '(SELECT (SELECT GROUP_CONCAT(Description SEPARATOR ",") FROM FinanceInvoiceItem WHERE FinanceInvoice=FinanceInvoice.Id) AS Text, '. 14 'Time, - Valueas Value, File, BillCode, PeriodFrom, PeriodTo FROM FinanceInvoice WHERE (Subject='.$Subject['Id'].')))';14 'Time, -(Value*Direction) as Value, File, BillCode, PeriodFrom, PeriodTo FROM FinanceInvoice WHERE (Subject='.$Subject['Id'].')))'; 15 15 16 16 $Output = '<div style="text-align:center">Výpis finančních operací</div>'; … … 104 104 'FROM FinanceOperation WHERE (Subject='.$Subject['Id'].')) UNION ALL '. 105 105 '(SELECT (SELECT GROUP_CONCAT(Description SEPARATOR ",") FROM FinanceInvoiceItem WHERE FinanceInvoice=FinanceInvoice.Id) AS Text, '. 106 'Time, - Valueas Value, File, BillCode, PeriodFrom, PeriodTo FROM FinanceInvoice WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1';106 'Time, -(Value*Direction) as Value, File, BillCode, PeriodFrom, PeriodTo FROM FinanceInvoice WHERE (Subject='.$Subject['Id'].')) ORDER BY Time DESC) AS T1'; 107 107 $DbResult = $this->Database->query('SELECT SUM(T1.Value) AS Total FROM '.$UserOperationTableQuery); 108 108 $DbRow = $DbResult->fetch_array();
Note:
See TracChangeset
for help on using the changeset viewer.