Fixed display errors in reports of expenses
This commit is contained in:
parent
527efa9b29
commit
7d5864b347
8 changed files with 51 additions and 40 deletions
|
@ -55,20 +55,12 @@ function stormexpense_list() {
|
|||
$i->type = 'stormexpense';
|
||||
|
||||
$report_attrs = array(
|
||||
'onclick' => "storm_popup(this, 'expense_list_form_report', 'Expenses', 300, 244, 'stormexpense_list_form_report', 'l'); return false;",
|
||||
'onclick' => "storm_popup(this, 'expense_list_form_report', '" . t('Expenses') . "', 300, 244, 'stormexpense_list_form_report', 'l'); return false;",
|
||||
);
|
||||
|
||||
$header = array(
|
||||
array(
|
||||
'data' => t('Organization'),
|
||||
'field' => 'sex.organization_title',
|
||||
),
|
||||
array(
|
||||
'data' => t('Project'),
|
||||
'field' => 'sex.project_title',
|
||||
),
|
||||
array(
|
||||
'data' => t('Title'),
|
||||
'data' => t('Title') . ' / ' . t('Organization') . ' » ' . t('Project') . ' » ' . t('Detail'),
|
||||
'field' => 'n.title',
|
||||
),
|
||||
array(
|
||||
|
@ -407,7 +399,7 @@ function stormexpense_list_form_report_submit($form, &$form_state) {
|
|||
}
|
||||
|
||||
function stormexpense_list_report($report, $language) {
|
||||
$timetrackings = array();
|
||||
$expenses = array();
|
||||
|
||||
$s = "SELECT n.*, sex.* FROM {node} AS n INNER JOIN {stormexpense} AS sex ON n.vid=sex.vid WHERE n.status=1 AND n.type='stormexpense' ";
|
||||
$s = stormexpense_access_sql($s, array());
|
||||
|
@ -415,8 +407,8 @@ function stormexpense_list_report($report, $language) {
|
|||
|
||||
$sql = isset($_SESSION['stormexpense_list_filter']['sql']) ? $_SESSION['stormexpense_list_filter']['sql'] : $s;
|
||||
$args = isset($_SESSION['stormexpense_list_filter']['args']) ? $_SESSION['stormexpense_list_filter']['args'] : array();
|
||||
|
||||
$r = db_query($sql, $args);
|
||||
$expenses = array();
|
||||
while ($e = db_fetch_object($r)) {
|
||||
$expense = node_load($e->nid);
|
||||
$expenses[] = $expense;
|
||||
|
|
Reference in a new issue