X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Flib%2FttInvoiceHelper.class.php;h=3d67f6a787b973610556a4ba9342af15f2feea27;hb=fa6508ac21c30d6bfef008387fabd29a843d7b66;hp=13e5dea08a38ca6696acff6545fa33fed4106ece;hpb=7797eda9fb04c217a813db88e00bb9ee541eabbb;p=timetracker.git diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index 13e5dea0..3d67f6a7 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -155,7 +155,7 @@ class ttInvoiceHelper { // It is anticipated to support "totals only" option later on. // Our query is different depending on tracking mode. - if (MODE_TIME == $user->tracking_mode) { + if (MODE_TIME == $user->getTrackingMode()) { // In "time only" tracking mode there is a single user rate. $sql = "select l.date as date, 1 as type, u.name as user_name, p.name as project_name, t.name as task_name, l.comment as note, @@ -258,7 +258,7 @@ class ttInvoiceHelper { if (isset($fields['project_id'])) $project_id = (int) $fields['project_id']; // Our query is different depending on tracking mode. - if (MODE_TIME == $user->tracking_mode) { + if (MODE_TIME == $user->getTrackingMode()) { // In "time only" tracking mode there is a single user rate. $sql = "select count(*) as num from tt_log l, tt_users u where l.status = 1 and l.client_id = $client_id and l.invoice_id is NULL @@ -344,7 +344,7 @@ class ttInvoiceHelper { $last_id = $val['last_insert_id']; // Our update sql is different depending on tracking mode. - if (MODE_TIME == $user->tracking_mode) { + if (MODE_TIME == $user->getTrackingMode()) { // In "time only" tracking mode there is a single user rate. $sql = "update tt_log l left join tt_users u on (u.id = l.user_id) @@ -426,6 +426,9 @@ class ttInvoiceHelper { $style_tableHeader = 'font-weight: bold; background-color: #a6ccf7; text-align: left;'; $style_tableHeaderCentered = 'font-weight: bold; background-color: #a6ccf7; text-align: center;'; + // Determine tracking mode once for multiple reuse below. + $trackingMode = $user->getTrackingMode(); + // Start creating email body. $body = ''; $body .= '
'; @@ -451,9 +454,9 @@ class ttInvoiceHelper { $body .= '