[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10771] logistic: allokation
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10771] logistic: allokation |
Date: |
Thu, 07 Feb 2013 15:17:19 +0000 |
Revision: 10771
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10771
Author: sigurdne
Date: 2013-02-07 15:17:18 +0000 (Thu, 07 Feb 2013)
Log Message:
-----------
logistic: allokation
Modified Paths:
--------------
trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
trunk/logistic/inc/model/class.requirement_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 14:58:00 UTC (rev 10770)
+++ trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
2013-02-07 15:17:18 UTC (rev 10771)
@@ -51,7 +51,6 @@
(
'location_id' =>
$resource_alloc->get_location_id(),
'item_id' =>
$this->marshal($resource_alloc->get_resource_id(), 'int'),
- 'activity_id' =>
$this->marshal($resource_alloc->get_activity_id(), 'int'),
'allocation_id' => 0,//not known yet
'create_user' =>
$resource_alloc->get_create_user(),
'create_date' => time(),
@@ -225,10 +224,13 @@
{
return $values;
}
- $sql = "SELECT item_id, activity_id, allocation_id,
start_date, end_date FROM lg_calendar"
- . " WHERE location_id = {$location_id}"
- . " AND item_id IN (" . implode(',', $ids) . ')'
- . " AND end_date >= {$start_date} AND start_date <=
{$end_date}";
+ $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"
+ . " {$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)
. ')'
+ . " AND lg_calendar.end_date >= {$start_date} AND
lg_calendar.start_date <= {$end_date}";
$this->db->query($sql,__LINE__,__FILE__);
while ($this->db->next_record())
Modified: trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
===================================================================
--- trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
2013-02-07 14:58:00 UTC (rev 10770)
+++ trunk/logistic/inc/class.uirequirement_resource_allocation.inc.php
2013-02-07 15:17:18 UTC (rev 10771)
@@ -439,7 +439,6 @@
if( count($chosen_resources) <= $num_allowed_bookings)
{
-
foreach($chosen_resources as $resource_id)
{
$resource_alloc = new
logistic_requirement_resource_allocation();
@@ -449,13 +448,10 @@
$resource_alloc->set_create_user(
$user_id );
$resource_alloc->set_start_date(
$requirement->get_start_date() );
$resource_alloc->set_end_date(
$requirement->get_start_date() );
- $resource_alloc->set_activity_id(
$activity_id );
$resource_alloc_id = $this->so->store(
$resource_alloc );
}
-// $activity =
$this->so_activity->get_single($requirement->get_activity_id());
-
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'logistic.uiactivity.view_resource_allocation',
'activity_id' => $requirement->get_activity_id()));
}
else
Modified: trunk/logistic/inc/model/class.requirement_resource_allocation.inc.php
===================================================================
--- trunk/logistic/inc/model/class.requirement_resource_allocation.inc.php
2013-02-07 14:58:00 UTC (rev 10770)
+++ trunk/logistic/inc/model/class.requirement_resource_allocation.inc.php
2013-02-07 15:17:18 UTC (rev 10771)
@@ -45,7 +45,6 @@
protected $fm_bim_item_name;
protected $start_date;
protected $end_date;
- protected $activity_id;
/**
* Constructor. Takes an optional ID. If a contract is
created from outside
@@ -169,16 +168,6 @@
return $this->start_date;
}
- public function set_activity_id($activity_id)
- {
- $this->activity_id = $activity_id;
- }
-
- public function get_activity_id()
- {
- return $this->activity_id;
- }
-
/**
* Get a static reference to the storage object associated with
this model object
*
Modified: trunk/logistic/setup/tables_current.inc.php
===================================================================
--- trunk/logistic/setup/tables_current.inc.php 2013-02-07 14:58:00 UTC (rev
10770)
+++ trunk/logistic/setup/tables_current.inc.php 2013-02-07 15:17:18 UTC (rev
10771)
@@ -129,7 +129,6 @@
'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),
- 'activity_id' => array('type'
=> 'int', 'precision' => 4, 'nullable' => false),
'allocation_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),
Modified: trunk/logistic/setup/tables_update.inc.php
===================================================================
--- trunk/logistic/setup/tables_update.inc.php 2013-02-07 14:58:00 UTC (rev
10770)
+++ trunk/logistic/setup/tables_update.inc.php 2013-02-07 15:17:18 UTC (rev
10771)
@@ -149,11 +149,6 @@
'precision' => 8,
'nullable' => false
));
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('lg_calendar','activity_id',array(
- 'type' => 'int',
- 'precision' => 4,
- 'nullable' => true
- ));
$GLOBALS['phpgw_setup']->oProc->AddColumn('lg_calendar','allocation_id',array(
'type' => 'int',
'precision' => 4,
@@ -162,7 +157,7 @@
$GLOBALS['phpgw_setup']->oProc->AddColumn('lg_requirement_resource_allocation','calendar_id',array(
'type' => 'int',
'precision' => 4,
- 'nullable' => false,
+ 'nullable' => true,
'default' => 0//FIXME
));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10771] logistic: allokation,
Sigurd Nes <=