[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6968] property: gabinfo
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6968] property: gabinfo |
Date: |
Thu, 10 Feb 2011 20:15:43 +0000 |
Revision: 6968
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6968
Author: sigurdne
Date: 2011-02-10 20:15:42 +0000 (Thu, 10 Feb 2011)
Log Message:
-----------
property: gabinfo
Modified Paths:
--------------
trunk/property/inc/class.uiwo_hour.inc.php
trunk/property/templates/base/wo_hour.xsl
Modified: trunk/property/inc/class.uiwo_hour.inc.php
===================================================================
--- trunk/property/inc/class.uiwo_hour.inc.php 2011-02-10 18:38:35 UTC (rev
6967)
+++ trunk/property/inc/class.uiwo_hour.inc.php 2011-02-10 20:15:42 UTC (rev
6968)
@@ -1338,8 +1338,39 @@
'type' => 'view'));
+ $location_code =
isset($common_data['workorder']['location_code']) &&
$common_data['workorder']['location_code'] ?
$common_data['workorder']['location_code'] : $project['location_code'];
+ $location_code = explode('-',$location_code);
+
+
+ $gab_insert_level =
isset($this->config->config_data['gab_insert_level']) &&
$this->config->config_data['gab_insert_level'] ?
$this->config->config_data['gab_insert_level'] : 3;
+ $i = 1;
+ foreach($location_code as $_loc)
+ {
+ $loc[] = $_loc;
+ if($i == $gab_insert_level)
+ {
+ break;
+ }
+ $i++;
+ }
+ $location_code = implode('-', $loc);
+
+ $gabinfos = execMethod('property.sogab.read',
array('location_code' => $location_code, 'allrows' => true));
+ if($gabinfos != null && is_array($gabinfos) &&
count($gabinfos) == 1)
+ {
+ $gabinfo = array_shift($gabinfos);
+ $gab_id = $gabinfo['gab_id'];
+ }
+
+ $formatted_gab_id = '';
+ if(isset($gab_id))
+ {
+ $formatted_gab_id = substr($gab_id,4,5).' /
'.substr($gab_id,9,4).' / '.substr($gab_id,13,4).' / '.substr($gab_id,17,3);
+ }
+
$email_data = array
(
+ 'formatted_gab_id'
=> $formatted_gab_id,
'org_name'
=> isset($this->config->config_data['org_name']) ?
"{$this->config->config_data['org_name']}::" : '',
'location_data'
=> $location_data,
'lang_workorder'
=> lang('Workorder ID'),
Modified: trunk/property/templates/base/wo_hour.xsl
===================================================================
--- trunk/property/templates/base/wo_hour.xsl 2011-02-10 18:38:35 UTC (rev
6967)
+++ trunk/property/templates/base/wo_hour.xsl 2011-02-10 20:15:42 UTC (rev
6968)
@@ -693,8 +693,20 @@
</xsl:when>
</xsl:choose>
<xsl:call-template
name="location_view"/>
-
+
<xsl:choose>
+ <xsl:when
test="formatted_gab_id !=''">
+ <tr>
+
<td class="th_text" align="left">
+
Gnr/Bnr/Feste/Seksjon
+
</td>
+
<td align="left" colspan="2">
+
<xsl:value-of select="formatted_gab_id"/>
+
</td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
<xsl:when
test="contact_phone !=''">
<tr>
<td class="th_text" align="left">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6968] property: gabinfo,
Sigurd Nes <=