[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11262] logisitc: list correct values / fix add non-b
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11262] logisitc: list correct values / fix add non-bulk entries |
Date: |
Sun, 11 Aug 2013 13:24:14 +0000 |
Revision: 11262
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11262
Author: sigurdne
Date: 2013-08-11 13:24:14 +0000 (Sun, 11 Aug 2013)
Log Message:
-----------
logisitc: list correct values / fix add non-bulk entries
Modified Paths:
--------------
trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
trunk/logistic/inc/class.uiactivity.inc.php
trunk/logistic/inc/class.uirequirement.inc.php
trunk/logistic/templates/base/activity/activity_tabs.xsl
Modified: trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
===================================================================
--- trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
2013-08-11 13:21:17 UTC (rev 11261)
+++ trunk/logistic/inc/class.sorequirement_resource_allocation.inc.php
2013-08-11 13:24:14 UTC (rev 11262)
@@ -58,7 +58,7 @@
(
'location_id' =>
$resource_alloc->get_location_id(),
'item_id' =>
$this->marshal($resource_alloc->get_resource_id(), 'int'),
- 'item_inventory_id' =>
$this->marshal($resource_alloc->get_inventory_id(), 'int'),
+ 'item_inventory_id' =>
(int)$resource_alloc->get_inventory_id(),
'item_inventory_amount' =>
$this->marshal($resource_alloc->get_allocated_amount(), 'int'),
// 'allocation_id' => 0,//not
known yet
'create_user' =>
$resource_alloc->get_create_user(),
@@ -111,15 +111,15 @@
protected function update($resource_alloc)
{
- $id = intval($resource_alloc->get_id());
+ $id = (int)$resource_alloc->get_id();
$values = array(
- 'requirement_id=' .
$this->marshal($resource_alloc->get_requirement_id(), 'string'),
- 'resource_id=' .
$this->marshal($resource_alloc->get_resource_id(), 'string'),
+ 'requirement_id=' .
$this->marshal($resource_alloc->get_requirement_id(), 'int'),
+ 'resource_id=' .
$this->marshal($resource_alloc->get_resource_id(), 'int'),
'location_id=' .
$this->marshal($resource_alloc->get_location_id(), 'int')
);
- $result = $this->db->query('UPDATE
lg_requirement_resource_allocation SET ' . join(',', $values) . " WHERE
id=$id", __LINE__,__FILE__);
+ $result = $this->db->query('UPDATE
lg_requirement_resource_allocation SET ' . join(',', $values) . " WHERE
id={$id}", __LINE__,__FILE__);
$item_inventory_amount =
(int)$resource_alloc->get_allocated_amount();
Modified: trunk/logistic/inc/class.uiactivity.inc.php
===================================================================
--- trunk/logistic/inc/class.uiactivity.inc.php 2013-08-11 13:21:17 UTC (rev
11261)
+++ trunk/logistic/inc/class.uiactivity.inc.php 2013-08-11 13:24:14 UTC (rev
11262)
@@ -343,7 +343,7 @@
if (isset($activity))
{
$filters = array('activity' =>
$activity->get_id());
- $requirements_for_activity =
$this->so_requirement->get($start_index, $num_of_objects, $sort_field,
$sort_ascending, $search_for, $search_type, $filters);
+ $requirements_for_activity =
$this->so_requirement->get(0, null, null, null, null, null, $filters);
if( count( $requirements_for_activity )
> 0 )
{
@@ -353,7 +353,7 @@
foreach($requirements_for_activity as $requirement)
{
$filters =
array('requirement_id' => $requirement->get_id());
- $num_allocated =
$this->so_resource_allocation->get_count($search_for, $search_type, $filters);
+ $num_allocated =
$this->so_resource_allocation->get_count(null, null, $filters);
$num_required =
$requirement->get_no_of_items();
Modified: trunk/logistic/inc/class.uirequirement.inc.php
===================================================================
--- trunk/logistic/inc/class.uirequirement.inc.php 2013-08-11 13:21:17 UTC
(rev 11261)
+++ trunk/logistic/inc/class.uirequirement.inc.php 2013-08-11 13:24:14 UTC
(rev 11262)
@@ -273,8 +273,7 @@
if (!$export)
{
//Add action column to each row in result table
- array_walk(
-
$result_data['results'], array($this, '_add_links'),
"logistic.uirequirement.view");
+ array_walk($result_data['results'],
array($this, '_add_links'), "logistic.uirequirement.view");
}
return $this->yui_results($result_data);
}
Modified: trunk/logistic/templates/base/activity/activity_tabs.xsl
===================================================================
--- trunk/logistic/templates/base/activity/activity_tabs.xsl 2013-08-11
13:21:17 UTC (rev 11261)
+++ trunk/logistic/templates/base/activity/activity_tabs.xsl 2013-08-11
13:24:14 UTC (rev 11262)
@@ -3,10 +3,9 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<div class="yui-navset yui-navset-top" id="activity-tabview">
-
+ <xsl:call-template name="yui_phpgw_i18n"/>
<xsl:choose>
<xsl:when test="view = 'activity_details'">
- <xsl:call-template name="yui_phpgw_i18n"/>
<!-- =========== HEADING ============== -->
<xsl:choose>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11262] logisitc: list correct values / fix add non-bulk entries,
Sigurd Nes <=