Integrated paid status in emailed reports.
authorNik Okuntseff <support@anuko.com>
Sun, 21 Jan 2018 18:43:44 +0000 (18:43 +0000)
committerNik Okuntseff <support@anuko.com>
Sun, 21 Jan 2018 18:43:44 +0000 (18:43 +0000)
WEB-INF/lib/ttReportHelper.class.php
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/templates/footer.tpl

index ba8c9c9..41ddd0f 100644 (file)
@@ -1166,6 +1166,8 @@ class ttReportHelper {
         $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.note').'</td>';
       if ($bean->getAttribute('chcost'))
         $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.cost').'</td>';
+      if ($bean->getAttribute('chpaid'))
+        $body .= '<td style="'.$tableHeaderCentered.'" width="5%">'.$i18n->getKey('label.paid').'</td>';
       if ($bean->getAttribute('chinvoice'))
         $body .= '<td style="'.$tableHeader.'">'.$i18n->getKey('label.invoice').'</td>';
       $body .= '</tr>';
@@ -1207,6 +1209,7 @@ class ttReportHelper {
                 $body .= ($user->canManageTeam() || $user->isClient()) ? $subtotals[$prev_grouped_by]['cost'] : $subtotals[$prev_grouped_by]['expenses'];
                 $body .= '</td>';
               }
+              if ($bean->getAttribute('chpaid')) $body .= '<td></td>';
               if ($bean->getAttribute('chinvoice')) $body .= '<td></td>';
               $body .= '</tr>';
               $body .= '<tr><td>&nbsp;</td></tr>';
@@ -1239,6 +1242,11 @@ class ttReportHelper {
             $body .= '<td style="'.$cellLeftAligned.'">'.htmlspecialchars($record['note']).'</td>';
           if ($bean->getAttribute('chcost'))
             $body .= '<td style="'.$cellRightAligned.'">'.$record['cost'].'</td>';
+          if ($bean->getAttribute('chpaid')) {
+            $body .= '<td style="'.$cellRightAligned.'">';
+            $body .= $record['paid'] == 1 ? $i18n->getKey('label.yes') : $i18n->getKey('label.no');
+            $body .= '</td>';
+          }
           if ($bean->getAttribute('chinvoice'))
             $body .= '<td style="'.$cellRightAligned.'">'.htmlspecialchars($record['invoice']).'</td>';
           $body .= '</tr>';
@@ -1268,6 +1276,7 @@ class ttReportHelper {
           $body .= ($user->canManageTeam() || $user->isClient()) ? $subtotals[$cur_grouped_by]['cost'] : $subtotals[$cur_grouped_by]['expenses'];
           $body .= '</td>';
         }
+        if ($bean->getAttribute('chpaid')) $body .= '<td></td>';
         if ($bean->getAttribute('chinvoice')) $body .= '<td></td>';
         $body .= '</tr>';
       }
@@ -1290,6 +1299,7 @@ class ttReportHelper {
         $body .= ($user->canManageTeam() || $user->isClient()) ? $totals['cost'] : $totals['expenses'];
         $body .= '</td>';
       }
+      if ($bean->getAttribute('chpaid')) $body .= '<td></td>';
       if ($bean->getAttribute('chinvoice')) $body .= '<td></td>';
       $body .= '</tr>';
 
index 6127123..553ab0d 100644 (file)
@@ -811,7 +811,7 @@ class ttTeamHelper {
     if (isset($fields['tracking_mode'])) $tracking_mode_part = ', tracking_mode = '.intval($fields['tracking_mode']);
     if (isset($fields['record_type'])) $record_type_part = ', record_type = '.intval($fields['record_type']);
     if (isset($fields['uncompleted_indicators'])) $uncompleted_indicators_part = ', uncompleted_indicators = '.intval($fields['uncompleted_indicators']);
-    if (!empty($fields['bcc_email'])) $bcc_email_part = ', bcc_email = '.$mdb2->quote($fields['bcc_email']);
+    if (isset($fields['bcc_email'])) $bcc_email_part = ', bcc_email = '.$mdb2->quote($fields['bcc_email']);
     if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']);
     if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']);
     if (isset($fields['workday_hours'])) $workday_hours_part = ', workday_hours = '.$mdb2->quote($fields['workday_hours']);
index a9a742b..9a14150 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.15.2.3770 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.15.3.3771 | 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>