fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8523] property: rename view


From: Sigurd Nes
Subject: [Fmsystem-commits] [8523] property: rename view
Date: Sun, 08 Jan 2012 13:21:05 +0000

Revision: 8523
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8523
Author:   sigurdne
Date:     2012-01-08 13:21:05 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
property: rename view

Modified Paths:
--------------
    trunk/property/inc/class.soproject.inc.php
    trunk/property/setup/default_records.inc.php
    trunk/property/setup/tables_update.inc.php

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2012-01-07 15:27:10 UTC (rev 
8522)
+++ trunk/property/inc/class.soproject.inc.php  2012-01-08 13:21:05 UTC (rev 
8523)
@@ -1308,7 +1308,7 @@
                                case 'project':
                                        if($closed_orders)
                                        {
-                                               $filter .=  " AND 
fm_open_workorder.project_id IS NULL";
+                                               $filter .=  " AND 
fm_open_workorder_view.project_id IS NULL";
                                        }
 
                                        $table = 'fm_project';
@@ -1317,7 +1317,7 @@
                                        $this->_update_status_project($execute, 
$status_new, $ids);
                                        $sql = "SELECT DISTINCT {$table}.id, 
$status_table.descr as status ,{$title_field},{$table}.start_date, 
count(project_id) as num_open FROM {$table}"
                                        . " {$this->join} {$status_table} ON  
{$table}.status = {$status_table}.id "
-                                       . " {$this->left_join} 
fm_open_workorder ON {$table}.id = fm_open_workorder.project_id "
+                                       . " {$this->left_join} 
fm_open_workorder_view ON {$table}.id = fm_open_workorder_view.project_id "
                                        . " WHERE ({$table}.start_date > 
{$start_date} AND {$table}.start_date < {$end_date} {$filter})"
                                        . " GROUP BY {$table}.id, 
$status_table.descr ,{$table}.name, {$table}.start_date"
                                        . " ORDER BY {$table}.id DESC";

Modified: trunk/property/setup/default_records.inc.php
===================================================================
--- trunk/property/setup/default_records.inc.php        2012-01-07 15:27:10 UTC 
(rev 8522)
+++ trunk/property/setup/default_records.inc.php        2012-01-08 13:21:05 UTC 
(rev 8523)
@@ -876,3 +876,8 @@
                        )
                );
 
+               $sql = 'CREATE OR REPLACE VIEW fm_open_workorder_view AS' 
+                       . ' SELECT fm_workorder.id, fm_workorder.project_id, 
fm_workorder_status.descr FROM fm_workorder'
+                       . ' JOIN fm_workorder_status ON fm_workorder.status = 
fm_workorder_status.id WHERE fm_workorder_status.delivered IS NULL AND 
fm_workorder_status.closed IS NULL';
+
+               $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2012-01-07 15:27:10 UTC (rev 
8522)
+++ trunk/property/setup/tables_update.inc.php  2012-01-08 13:21:05 UTC (rev 
8523)
@@ -5765,7 +5765,7 @@
        function property_upgrade0_9_17_630()
        {
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
-               $sql = 'CREATE OR REPLACE VIEW fm_open_workorder AS' 
+               $sql = 'CREATE OR REPLACE VIEW fm_open_workorder_view AS' 
                        . ' SELECT fm_workorder.id, fm_workorder.project_id, 
fm_workorder_status.descr FROM fm_workorder'
                        . ' JOIN fm_workorder_status ON fm_workorder.status = 
fm_workorder_status.id WHERE fm_workorder_status.delivered IS NULL AND 
fm_workorder_status.closed IS NULL';
 




reply via email to

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