Fixed display problems with invoices
This commit is contained in:
parent
977630f995
commit
42355f66e6
4 changed files with 14 additions and 28 deletions
|
@ -34,19 +34,22 @@ function theme_storminvoice_list($header, $invoices, $itemsperpage, $totals_topa
|
|||
$invoice->status = 'overdue';
|
||||
}
|
||||
|
||||
$requestdate = format_date($invoice->requestdate, 'small');
|
||||
$requestdate = substr($requestdate, 0, strpos($requestdate, ' '));
|
||||
|
||||
$rows[] = array(
|
||||
array(
|
||||
'data' => storm_icon('invoice_status_'. check_plain($invoice->status), storm_attribute_value('Invoice status', $invoice->status)),
|
||||
'style' => 'text-align: center',
|
||||
),
|
||||
array(
|
||||
'data' => l($invoice->number, 'node/'. $invoice->nid),
|
||||
'data' => '<span class="invoice-number">' . l($invoice->number, 'node/'. $invoice->nid) . '</span>',
|
||||
'style' => 'text-align: right',
|
||||
),
|
||||
l($invoice->organization_title, 'node/'. $invoice->organization_nid),
|
||||
l($invoice->project_title, 'node/'. $invoice->project_nid),
|
||||
l($invoice->title, 'node/'. $invoice->nid),
|
||||
format_date($invoice->requestdate, 'custom', 'Y-m-d'),
|
||||
'<span class="invoice-title">' . l($invoice->title, 'node/'. $invoice->nid) . theme('mark', node_mark($invoice->nid, $invoice->changed)) . '</span><br />' .
|
||||
l($invoice->organization_title, 'node/'. $invoice->organization_nid) .' » '.
|
||||
l($invoice->project_title, 'node/'. $invoice->project_nid),
|
||||
$requestdate,
|
||||
array('data' => sprintf('%.2f', $invoice->total), 'align' => 'right'),
|
||||
array(
|
||||
'data' => storm_icon_edit_node($invoice, $_GET) .' '. storm_icon_delete_node($invoice, $_GET),
|
||||
|
@ -55,7 +58,7 @@ function theme_storminvoice_list($header, $invoices, $itemsperpage, $totals_topa
|
|||
);
|
||||
}
|
||||
|
||||
$o = theme('table', $header, $rows);
|
||||
$o = theme('table', $header, $rows, array('id' => 'storminvoices'));
|
||||
$o .= theme('pager', NULL, $itemsperpage, 0);
|
||||
|
||||
$header = array(
|
||||
|
@ -457,16 +460,6 @@ function theme_storminvoice_view($node, $teaser = FALSE, $page = FALSE) {
|
|||
);
|
||||
}
|
||||
|
||||
if ($node->content['body']['#value']) {
|
||||
$node->content['body_field'] = array(
|
||||
'#prefix' => '<div class="stormbody">',
|
||||
'#suffix' => '</div>',
|
||||
'#value' => theme('storm_view_item', t('Description'), $node->content['body']['#value']),
|
||||
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'body_field') : -18,
|
||||
);
|
||||
unset($node->content['body']);
|
||||
}
|
||||
|
||||
return $node;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue