Ensure compatibility with PHP 5.6
This commit is contained in:
parent
8809632f15
commit
d256810e19
1 changed files with 14 additions and 13 deletions
|
@ -859,22 +859,23 @@ function theme_storminvoice_report_html($node, $language) {
|
|||
'style' => 'text-align: right;',
|
||||
),
|
||||
);
|
||||
$rows_keys = array_keys($rows);
|
||||
if ($node->tax1) {
|
||||
$rows[end(array_keys($rows))][] = array(
|
||||
$rows[end($rows_keys)][] = array(
|
||||
'data' => sprintf('%.2f', $i->tax1),
|
||||
'style' => 'text-align: right;',
|
||||
);
|
||||
}
|
||||
if ($node->tax2) {
|
||||
$rows[end(array_keys($rows))][] = array(
|
||||
$rows[end($rows_keys)][] = array(
|
||||
'data' => sprintf('%.2f', $i->tax2),
|
||||
'style' => 'text-align: right;',
|
||||
);
|
||||
}
|
||||
$rows[end(array_keys($rows))][] = array(
|
||||
'data' => sprintf('%.2f', $i->total),
|
||||
'style' => 'text-align: right;',
|
||||
);
|
||||
$rows[end($rows_keys)][] = array(
|
||||
'data' => sprintf('%.2f', $i->total),
|
||||
'style' => 'text-align: right;',
|
||||
);
|
||||
}
|
||||
|
||||
$total = t('Total', array(), $language);
|
||||
|
@ -890,23 +891,23 @@ function theme_storminvoice_report_html($node, $language) {
|
|||
'style' => 'text-align: right;',
|
||||
),
|
||||
);
|
||||
|
||||
$rows_keys = array_keys($rows);
|
||||
if ($node->tax1) {
|
||||
$rows[end(array_keys($rows))][] = array(
|
||||
$rows[end($rows_keys)][] = array(
|
||||
'data' => sprintf('%.2f', $node->tax1),
|
||||
'style' => 'text-align: right;',
|
||||
);
|
||||
}
|
||||
if ($node->tax2) {
|
||||
$rows[end(array_keys($rows))][] = array(
|
||||
$rows[end($rows_keys)][] = array(
|
||||
'data' => sprintf('%.2f', $node->tax2),
|
||||
'style' => 'text-align: right;',
|
||||
);
|
||||
}
|
||||
$rows[end(array_keys($rows))][] = array(
|
||||
'data' => sprintf('%.2f', $node->total),
|
||||
'style' => 'text-align: right;',
|
||||
);
|
||||
$rows[end($rows_keys)][] = array(
|
||||
'data' => sprintf('%.2f', $node->total),
|
||||
'style' => 'text-align: right;',
|
||||
);
|
||||
|
||||
$o .= '<div id="storminvoice_items">'. theme('table', $header, $rows) .'</div>';
|
||||
|
||||
|
|
Reference in a new issue