Work in progress integrating paid status plugin.
authorNik Okuntseff <support@anuko.com>
Fri, 19 Jan 2018 16:18:38 +0000 (16:18 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 19 Jan 2018 16:18:38 +0000 (16:18 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/reports.tpl
charts.php
expenses.php
login.php
reports.php

index 52573e7..f994bf1 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.0.3759 | 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.0.3760 | 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 5ca7a17..0f9b129 100644 (file)
@@ -209,6 +209,14 @@ function handleCheckboxes() {
           <td>{$forms.reportForm.invoice.control}</td>
         </tr>
 {/if}
+{if ($user->canManageTeam() && $user->isPluginEnabled('ps'))}
+        <tr>
+          <td><b>{$i18n.label.paid_status}</b></td>
+        </tr>
+        <tr>
+          <td>{$forms.reportForm.paid_status.control}</td>
+        </tr>
+{/if}
 {if $user->canManageTeam() || $user->isClient()}
         <tr>
           <td colspan="3"><b>{$i18n.label.users}</b></td>
index 985a1ae..c76eddf 100644 (file)
@@ -84,7 +84,7 @@ $_SESSION['chart_type'] = $cl_type;
 // Who do we draw charts for?
 $on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id'])? $_SESSION['behalf_id'] : $user->id));
 
-if ($request->getMethod( )== 'POST') {
+if ($request->isPost()) {
   // If chart interval changed - save it.
   $cl_interval = $request->getParameter('interval');
   if ($cl_interval) {
index 93161f0..8db2865 100644 (file)
@@ -50,9 +50,9 @@ $_SESSION['date'] = $cl_date;
 
 // Initialize variables.
 $on_behalf_id = $request->getParameter('onBehalfUser', (isset($_SESSION['behalf_id']) ? $_SESSION['behalf_id'] : $user->id));
-$cl_client = $request->getParameter('client', ($request->getMethod()=='POST' ? null : @$_SESSION['client']));
+$cl_client = $request->getParameter('client', ($request->isPost() ? null : @$_SESSION['client']));
 $_SESSION['client'] = $cl_client;
-$cl_project = $request->getParameter('project', ($request->getMethod()=='POST' ? null : @$_SESSION['project']));
+$cl_project = $request->getParameter('project', ($request->isPost() ? null : @$_SESSION['project']));
 $_SESSION['project'] = $cl_project;
 $cl_item_name = $request->getParameter('item_name');
 $cl_cost = $request->getParameter('cost');
index b0c583f..d398794 100644 (file)
--- a/login.php
+++ b/login.php
@@ -32,9 +32,8 @@ import('ttTeamHelper');
 import('ttUser');
 
 $cl_login = $request->getParameter('login');
+if ($cl_login == null && $request->isGet()) $cl_login = @$_COOKIE['tt_login'];
 $cl_password = $request->getParameter('password');
-if ($cl_login == null && $request->getMethod() == 'GET')
-  $cl_login = @$_COOKIE['tt_login'];
 
 $form = new Form('loginForm');
 $form->addInput(array('type'=>'text','size'=>'25','maxlength'=>'100','name'=>'login','style'=>'width: 220px;','value'=>$cl_login));
index 69e7423..f6d9cf0 100644 (file)
@@ -122,6 +122,16 @@ $form->addInput(array('type'=>'combobox',
   'data'=>$include_options,
   'empty'=>array(''=>$i18n->getKey('dropdown.all'))));
 
+if ($user->isPluginEnabled('ps')) {
+  $form->addInput(array('type'=>'combobox',
+   'name'=>'paid_status',
+   'style'=>'width: 250px;',
+   'data'=>array('1'=>$i18n->getKey('dropdown.paid'),'2'=>$i18n->getKey('dropdown.not_paid')),
+   'empty'=>array(''=>$i18n->getKey('dropdown.all'))
+ ));
+}
+
+
 // Add invoiced / not invoiced selector.
 $invoice_options = array('1'=>$i18n->getKey('form.reports.include_invoiced'),
   '2'=>$i18n->getKey('form.reports.include_not_invoiced'));