Temporary fix for not billable entries in week view.
authoranuko <support@anuko.com>
Sun, 31 Dec 2017 16:07:24 +0000 (16:07 +0000)
committeranuko <support@anuko.com>
Sun, 31 Dec 2017 16:07:24 +0000 (16:07 +0000)
WEB-INF/lib/form/Table.class.php
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/templates/footer.tpl
week.php

index e5aed81..1e692c3 100644 (file)
@@ -53,11 +53,11 @@ class Table extends FormElement {
   }
   
   function setKeyField($value) {
-       $this->mKeyField = $value;
+    $this->mKeyField = $value;
   }
   
   function setData($data) {
-       if (is_array($data) && isset($data[0]) && is_array($data[0]))
+    if (is_array($data) && isset($data[0]) && is_array($data[0]))
       $this->mData = &$data;
   }
   
index e726b92..ba678fc 100644 (file)
@@ -810,9 +810,9 @@ class ttTeamHelper {
     $inactive_teams = array();
     $mdb2 = getConnection();
 
-    // Get all team ids for teams created or modified more than 1 year ago.
+    // Get all team ids for teams created or modified more than 6 months ago.
     // $ts = date('Y-m-d', strtotime('-1 year'));
-    $ts = date('Y-m-d', strtotime('-4 month'));
+    $ts = date('Y-m-d', strtotime('-6 month'));
     $sql =  "select id from tt_teams where timestamp < '$ts' order by id";
     $res = $mdb2->query($sql);
 
index 1d0b382..da58a09 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.13.3.3712| Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.13.4.3713| Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 3cb4ea7..bc1e471 100644 (file)
--- a/week.php
+++ b/week.php
@@ -126,14 +126,13 @@ class LabelCellRenderer extends DefaultCellRenderer {
       $this->setOptions(array('style'=>'text-align: center; font-weight: bold;'));
     }
     // Special handling for not billable entries.
-    /* // TODO: this does not work and should be coded properly.
     if ($row > 0) {
-      $row_id = $table->getValueAt($row,1+$column)['row_id'];
+      $row_id = $table->getValueAtName($row,'row_id');
       $billable = ttTimeHelper::parseFromWeekViewRow($row_id, 'bl');
       if (!$billable) {
-        $this->setOptions(array('class'=>'not_billable')); // TODO: Should not we add options instead? How does it work exactly?
+        $this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS.
       }
-    }*/
+    }
     $this->setValue(htmlspecialchars($value)); // This escapes HTML for output.
     return $this->toString();
   }