Changeset 719 for trunk/Modules/Subject/Subject.php
- Timestamp:
- Jan 2, 2015, 11:16:56 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Subject/Subject.php
r711 r719 36 36 'Invoices' => array('Type' => 'TFinanceInvoiceListSubject', 'Caption' => 'Faktury', 'Default' => ''), 37 37 'Payment' => array('Type' => 'Float', 'Caption' => 'Placení', 'Default' => '', 38 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => 'IFNULL((SELECT SUM(`FinanceOperation`.`Value` ) FROM `FinanceOperation` '.38 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => 'IFNULL((SELECT SUM(`FinanceOperation`.`Value` * `FinanceOperation`.`Direction`) FROM `FinanceOperation` '. 39 39 'WHERE `FinanceOperation`.`Subject`=#Id), 0) - IFNULL((SELECT SUM(`FinanceInvoice`.`Value`) FROM `FinanceInvoice` '. 40 40 'WHERE `FinanceInvoice`.`Subject`=#Id), 0)'), … … 49 49 'Id' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => '', 'ReadOnly' => true), 50 50 'Income' => array('Type' => 'Integer', 'Caption' => 'Příjmy', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 51 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value` )) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '.52 'AND (`FinanceOperation`.` Value` > 0))'),51 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value` * `FinanceOperation`.`Direction`)) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '. 52 'AND (`FinanceOperation`.`Direction` = 1))'), 53 53 'Spending' => array('Type' => 'Integer', 'Caption' => 'Výdaje', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 54 'SQL' => '(SELECT -ROUND(SUM(`FinanceOperation`.`Value` )) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '.55 'AND (`FinanceOperation`.` Value` < 0))'),54 'SQL' => '(SELECT -ROUND(SUM(`FinanceOperation`.`Value` * `FinanceOperation`.`Direction`)) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '. 55 'AND (`FinanceOperation`.`Direction` = -1))'), 56 56 'OperationBalance' => array('Type' => 'Integer', 'Caption' => 'Zisk', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true, 57 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value` )) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '.57 'SQL' => '(SELECT ROUND(SUM(`FinanceOperation`.`Value` * `FinanceOperation`.`Direction`)) FROM `FinanceOperation` WHERE (`FinanceOperation`.`Subject` = TX.`Id`) '. 58 58 ')'), 59 59 ),
Note:
See TracChangeset
for help on using the changeset viewer.