fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16831] propert: list project


From: sigurdne
Subject: [Fmsystem-commits] [16831] propert: list project
Date: Mon, 5 Jun 2017 11:23:33 -0400 (EDT)

Revision: 16831
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16831
Author:   sigurdne
Date:     2017-06-05 11:23:33 -0400 (Mon, 05 Jun 2017)
Log Message:
-----------
propert: list project

Modified Paths:
--------------
    trunk/property/inc/class.boproject.inc.php
    trunk/property/inc/class.soproject.inc.php

Modified: trunk/property/inc/class.boproject.inc.php
===================================================================
--- trunk/property/inc/class.boproject.inc.php  2017-06-05 13:38:09 UTC (rev 
16830)
+++ trunk/property/inc/class.boproject.inc.php  2017-06-05 15:23:33 UTC (rev 
16831)
@@ -394,9 +394,9 @@
                                (
                                'field' => 'fm_project.id',
                                'type' => 'int',
-                               'matchtype' => 'exact',
-                               'front' => '',
-                               'back' => ''
+                               'matchtype' => 'like',
+                               'front' => "'",
+                               'back' => "%'",
                        );
                        $criteria[3] = array
                                (

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2017-06-05 13:38:09 UTC (rev 
16830)
+++ trunk/property/inc/class.soproject.inc.php  2017-06-05 15:23:33 UTC (rev 
16831)
@@ -595,12 +595,12 @@
                                $where = 'AND';
                        }
 
-                       if ($filter_year && $filter_year != 'all')
-                       {
-                               $filter_year = (int)$filter_year;
-                               $filtermethod .= " $where 
(fm_project_budget.year={$filter_year} OR 
fm_project_buffer_budget.year={$filter_year})";
-                               $where = 'AND';
-                       }
+//                     if ($filter_year && $filter_year != 'all')
+//                     {
+//                             $filter_year = (int)$filter_year;
+//                             $filtermethod .= " $where 
(fm_project_budget.year={$filter_year} OR 
fm_project_buffer_budget.year={$filter_year})";
+//                             $where = 'AND';
+//                     }
 
                        $querymethod = '';
                        if ($query)
@@ -631,9 +631,18 @@
                                                $_querymethod = array();
                                                foreach ($criteria as 
$field_info)
                                                {
-                                                       if ($field_info['type'] 
== int)
+                                                       if ($field_info['type'] 
== 'int')
                                                        {
-                                                               $_query = 
(int)$query;
+                                                               
if($field_info['matchtype'] == 'like')
+                                                               {
+                                                                       $_query 
= $query;
+                                                                       
$_querymethod[] = " cast({$field_info['field']} as text) 
{$matchtypes[$field_info['matchtype']]} 
{$field_info['front']}{$_query}{$field_info['back']}";
+                                                                       
continue;
+                                                               }
+                                                               else
+                                                               {
+                                                                       $_query 
= (int)$query;
+                                                               }
                                                        }
                                                        else
                                                        {
@@ -802,7 +811,7 @@
                                                {
                                                        if ($year && 
$entry['year'] == $year)
                                                        {
-                                                               if 
($entry['active'])
+//                                                             if 
($entry['active'])
                                                                {
                                                                        
$project['combined_cost'] += $entry['sum_orders'];
                                                                        
$project['budget'] += $entry['budget'];
@@ -815,7 +824,7 @@
                                                        }
                                                        else if (!$year)
                                                        {
-                                                               if 
($entry['active'])
+//                                                             if 
($entry['active'])
                                                                {
                                                                        
$project['combined_cost'] += $entry['sum_orders'];
                                                                        
$project['budget'] += $entry['budget'];




reply via email to

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