X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2FttInvoiceHelper.class.php;h=3980b8fb5425dfcc0c23b73821d715ff8cb104a2;hb=e897b5c63d2e36b018970e1305760fc14976d7d3;hp=aecafbdb11fc6b9b8140ef0f8e92d36a89c99f12;hpb=477644e55b7496eae44f40cb75cd721c659d8e9f;p=timetracker.git diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index aecafbdb..3980b8fb 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -129,7 +129,7 @@ class ttInvoiceHelper { } // If we have expenses, we need to do a union with a separate query for expense items from tt_expense_items table. - if (in_array('ex', explode(',', $user->plugins))) { // if ex(penses) plugin is enabled + if ($user->isPluginEnabled('ex')) { $sql_for_expense_items = "select ei.date as date, 2 as type, u.name as user_name, p.name as project_name, null as task_name, ei.name as note, null as duration, ei.cost as cost from tt_expense_items ei @@ -336,7 +336,7 @@ class ttInvoiceHelper { foreach($invoice_items as $item) $subtotal += $item['cost']; if ($tax_percent) { - $tax_expenses = in_array('et', explode(',', $user->plugins)); + $tax_expenses = $user->isPluginEnabled('et'); foreach($invoice_items as $item) { if ($item['type'] == 2 && !$tax_expenses) continue; @@ -423,7 +423,9 @@ class ttInvoiceHelper { $body .= ''; // Output footer. - $body .= '
'.$i18n->getKey('form.mail.footer').'
'; + if (!defined('REPORT_FOOTER') || !(REPORT_FOOTER == false)) + $body .= ''.$i18n->getKey('form.mail.footer').'
'; + // Finish creating email body. $body .= '