From: Nik Okuntseff Date: Sun, 24 Feb 2019 23:26:25 +0000 (+0000) Subject: Fixed creating invoices by excluding uncompleted records. X-Git-Tag: timetracker_1.19-1~273 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2ad495c118de835e3c6902a328b153d30bc3b0fa;p=timetracker.git Fixed creating invoices by excluding uncompleted records. --- diff --git a/WEB-INF/lib/ttInvoiceHelper.class.php b/WEB-INF/lib/ttInvoiceHelper.class.php index becea87b..4c1bd2b0 100644 --- a/WEB-INF/lib/ttInvoiceHelper.class.php +++ b/WEB-INF/lib/ttInvoiceHelper.class.php @@ -351,7 +351,7 @@ class ttInvoiceHelper { " where l.status = 1 and l.client_id = $client_id and l.invoice_id is null". " and l.group_id = $group_id and l.org_id = $org_id". " and l.date >= ".$mdb2->quote($start)." and l.date <= ".$mdb2->quote($end). - " and l.billable = 1"; // l.billable * u.rate * time_to_sec(l.duration)/3600 > 0"; // See explanation below. + " and l.duration > 0 and l.billable = 1"; // l.billable * u.rate * time_to_sec(l.duration)/3600 > 0"; // See explanation below. } else { // sql part for project id. if ($project_id) $project_part = " and l.project_id = $project_id"; @@ -363,7 +363,7 @@ class ttInvoiceHelper { " where l.status = 1 and l.client_id = $client_id $project_part and l.invoice_id is null". " and l.group_id = $group_id and l.org_id = $org_id". " and l.date >= ".$mdb2->quote($start)." and l.date <= ".$mdb2->quote($end). - " and l.billable = 1"; // l.billable * upb.rate * time_to_sec(l.duration)/3600 > 0"; + " and l.duration > 0 and l.billable = 1"; // l.billable * upb.rate * time_to_sec(l.duration)/3600 > 0"; // Users with a lot of clients and projects (Jaro) may forget to set user rates properly. // Specifically, user rate may be set to 0 on a project, by mistake. This leads to error.no_invoiceable_items // and increased support cost. Commenting out allows us to include 0 cost items in invoices so that diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 6cb7a806..62960af6 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.43.4773 | Copyright © Anuko | +  Anuko Time Tracker 1.18.43.4774 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}