fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [12104] Property: fix date search


From: Sigurd Nes
Subject: [Fmsystem-commits] [12104] Property: fix date search
Date: Fri, 26 Sep 2014 11:02:11 +0000

Revision: 12104
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12104
Author:   sigurdne
Date:     2014-09-26 11:02:09 +0000 (Fri, 26 Sep 2014)
Log Message:
-----------
Property: fix date search

Modified Paths:
--------------
    trunk/property/inc/class.sotts.inc.php

Modified: trunk/property/inc/class.sotts.inc.php
===================================================================
--- trunk/property/inc/class.sotts.inc.php      2014-09-25 10:28:31 UTC (rev 
12103)
+++ trunk/property/inc/class.sotts.inc.php      2014-09-26 11:02:09 UTC (rev 
12104)
@@ -396,10 +396,6 @@
 
                        if ($start_date)
                        {
-                               $_end_date      = $end_date + 3600 * 16 + 
phpgwapi_datetime::user_timezone();
-                               $_start_date    = $start_date - 3600 * 8 + 
phpgwapi_datetime::user_timezone();
-                               $filtermethod .= " $where 
fm_tts_tickets.entry_date >= $_start_date AND fm_tts_tickets.entry_date <= 
$_end_date ";
-
                                $order_add      = 
$GLOBALS['phpgw']->acl->check('.ticket.order', PHPGW_ACL_ADD, 'property');
                                $order_edit = 
$GLOBALS['phpgw']->acl->check('.ticket.order', PHPGW_ACL_EDIT, 'property');
 
@@ -407,11 +403,16 @@
                                {
                                        $end_period     = date('Ym', $end_date);
                                        $start_period   = date('Ym', 
$start_date);
-               //                      $filtermethod .= " $where 
fm_tts_payments.period >= $start_period AND fm_tts_payments.period <= 
$end_period";
                                        $date_join = " LEFT OUTER JOIN 
fm_tts_payments ON ( fm_tts_tickets.id=fm_tts_payments.ticket_id AND 
fm_tts_payments.period >= $start_period AND fm_tts_payments.period <= 
$end_period )";
                                        $actual_cost_field = 
'SUM(fm_tts_payments.amount) AS actual_cost';
                                        $actual_cost_group_field = '';
                                }
+                               else
+                               {
+                                       $_end_date      = $end_date + 3600 * 16 
+ phpgwapi_datetime::user_timezone();
+                                       $_start_date    = $start_date - 3600 * 
8 + phpgwapi_datetime::user_timezone();
+                                       $filtermethod .= " $where 
fm_tts_tickets.entry_date >= $_start_date AND fm_tts_tickets.entry_date <= 
$_end_date ";
+                               }
 
                                $where= 'AND';
                        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]