fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10772] logistic: allokation


From: Sigurd Nes
Subject: [Fmsystem-commits] [10772] logistic: allokation
Date: Fri, 08 Feb 2013 12:30:35 +0000

Revision: 10772
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10772
Author:   sigurdne
Date:     2013-02-08 12:30:34 +0000 (Fri, 08 Feb 2013)
Log Message:
-----------
logistic: allokation

Modified Paths:
--------------
    trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
    trunk/logistic/setup/tables_current.inc.php
    trunk/logistic/setup/tables_update.inc.php

Modified: trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
===================================================================
--- trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php  
2013-02-07 15:17:18 UTC (rev 10771)
+++ trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php  
2013-02-08 12:30:34 UTC (rev 10772)
@@ -224,9 +224,10 @@
                        {
                                return $values;
                        }
-                       $sql = "SELECT lg_calendar.item_id, 
lg_requirement.activity_id, lg_calendar.allocation_id, lg_calendar.start_date, 
lg_calendar.end_date"
-                       . " FROM lg_calendar"
-                       . " {$this->join} lg_requirement_resource_allocation ON 
lg_requirement_resource_allocation.id = lg_calendar.allocation_id"
+                       $sql = "SELECT lg_calendar.item_id, 
lg_requirement.activity_id,"
+                       . " lg_calendar.start_date, lg_calendar.end_date"
+                       . " FROM lg_requirement_resource_allocation"
+                       . " {$this->join} lg_calendar ON 
lg_requirement_resource_allocation.calendar_id = lg_calendar.id"
                        . " {$this->join} lg_requirement ON 
lg_requirement_resource_allocation.requirement_id = lg_requirement.id"
                        . " WHERE lg_calendar.location_id = {$location_id}"
                        . " AND lg_calendar.item_id IN (" . implode(',', $ids) 
. ')'
@@ -242,7 +243,6 @@
                                        'start_date'    => 
$this->db->f('start_date'),
                                        'end_date'              => 
$this->db->f('end_date'),
                                        'activity_id'   => 
$this->db->f('activity_id'),
-                                       'allocation_id' => 
$this->db->f('allocation_id'),
                                        'item_id'               => $item_id
                                );
                        }

Modified: trunk/logistic/setup/tables_current.inc.php
===================================================================
--- trunk/logistic/setup/tables_current.inc.php 2013-02-07 15:17:18 UTC (rev 
10771)
+++ trunk/logistic/setup/tables_current.inc.php 2013-02-08 12:30:34 UTC (rev 
10772)
@@ -129,7 +129,7 @@
                                                'id' => array('type' => 'auto', 
'precision' => 4, 'nullable' => false),
                                                'location_id' => array('type' 
=> 'int', 'precision' => 4, 'nullable' => false),
                                                'item_id' => array('type' => 
'int', 'precision' => 4, 'nullable' => false),
-                                               'allocation_id' => array('type' 
=> 'int', 'precision' => 4, 'nullable' => false),
+                                               'item_inventory_id' => 
array('type' => 'int', 'precision' => 4, 'nullable' => false),
                                                'create_user' => array('type' 
=> 'int', 'precision' => 4, 'nullable' => false),
                                                'create_date' => array('type' 
=> 'int', 'precision' => 8, 'nullable' => false),
                                                'start_date' => array('type' => 
'int', 'precision' => 8, 'nullable' => false),

Modified: trunk/logistic/setup/tables_update.inc.php
===================================================================
--- trunk/logistic/setup/tables_update.inc.php  2013-02-07 15:17:18 UTC (rev 
10771)
+++ trunk/logistic/setup/tables_update.inc.php  2013-02-08 12:30:34 UTC (rev 
10772)
@@ -167,4 +167,25 @@
                        return $GLOBALS['setup_info']['logistic']['currentver'];
                }
        }
-       
+
+       $test[] = '0.0.5';
+       function logistic_upgrade0_0_5()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
+               $GLOBALS['phpgw_setup']->oProc->DropColumn('lg_calendar', 
array(), 'allocation_id');
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('lg_calendar','item_inventory_id',array(
+                       'type' => 'int',
+                       'precision' => 4,
+                       'nullable' => true
+               ));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['logistic']['currentver'] = 
'0.0.6';
+                       return $GLOBALS['setup_info']['logistic']['currentver'];
+               }
+       }
+




reply via email to

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