[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12786] Syncromind: Merge 12752:12785 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12786] Syncromind: Merge 12752:12785 from trunk |
Date: |
Tue, 24 Feb 2015 11:51:14 +0000 |
Revision: 12786
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12786
Author: sigurdne
Date: 2015-02-24 11:51:13 +0000 (Tue, 24 Feb 2015)
Log Message:
-----------
Syncromind: Merge 12752:12785 from trunk
Modified Paths:
--------------
branches/dev-syncromind/catch/inc/custom/default/notify_by_email_18_1.php
branches/dev-syncromind/controller/inc/class.socontrol.inc.php
branches/dev-syncromind/controller/inc/class.uicalendar.inc.php
branches/dev-syncromind/controller/setup/setup.inc.php
branches/dev-syncromind/controller/setup/tables_current.inc.php
branches/dev-syncromind/controller/setup/tables_update.inc.php
branches/dev-syncromind/phpgwapi/inc/class.xslttemplates.inc.php
branches/dev-syncromind/property/inc/custom/default/hent_maaler_nr_til_besikt_rapport.php
branches/dev-syncromind/property/inc/export/default/Agresso_X114
Added Paths:
-----------
branches/dev-syncromind/controller/inc/class.uilookup.inc.php
Property Changed:
----------------
branches/dev-syncromind/
Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750
+
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785
Modified:
branches/dev-syncromind/catch/inc/custom/default/notify_by_email_18_1.php
===================================================================
--- branches/dev-syncromind/catch/inc/custom/default/notify_by_email_18_1.php
2015-02-24 11:48:32 UTC (rev 12785)
+++ branches/dev-syncromind/catch/inc/custom/default/notify_by_email_18_1.php
2015-02-24 11:51:13 UTC (rev 12786)
@@ -137,7 +137,7 @@
$_utflyttingsdato =
$this->db->f('leie_opphore_fra_dato');
if($_utflyttingsdato)
{
- $this->db->query("SELECT id, num, utflyttingsdato FROM
fm_catch_3_1 WHERE kontraktsnummer = '{$_kontraktsnummer}'", __LINE__,
__FILE__);
+ $this->db->query("SELECT id, num, utflyttingsdato FROM
fm_catch_3_1 WHERE kontraktsnummer ilike '{$_kontraktsnummer}'", __LINE__,
__FILE__);
if($this->db->next_record())
{
$_num_3_1 =
$this->db->f('num');
@@ -150,7 +150,7 @@
}
else
{
- $body .= "</br></br>Fant ikke inneflyttemelding
for kontraktsnummer {$_kontraktsnummer}";
+ $body .= "</br></br>Fant ikke innflyttemelding
for kontraktsnummer {$_kontraktsnummer}";
}
}
else
Modified: branches/dev-syncromind/controller/inc/class.socontrol.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.socontrol.inc.php
2015-02-24 11:48:32 UTC (rev 12785)
+++ branches/dev-syncromind/controller/inc/class.socontrol.inc.php
2015-02-24 11:51:13 UTC (rev 12786)
@@ -132,12 +132,12 @@
$check_list_array = array();
$sql = "SELECT DISTINCT
controller_check_list.location_code, controller_check_list.control_id,
controller_check_list.id AS check_list_id,"
- . "
procedure_id,requirement_id,costresponsibility_id,description, start_date,
end_date,deadline,planned_date, completed_date,"
+ . "
procedure_id,requirement_id,costresponsibility_id,description,
controller_control.start_date, end_date,deadline,planned_date, completed_date,"
. " control_area_id,
repeat_type,repeat_interval, title"
. " FROM controller_check_list"
. " {$this->join} controller_control ON
controller_check_list.control_id = controller_control.id"
. " {$this->join}
controller_control_location_list ON controller_control_location_list.control_id
= controller_control.id"
- . " WHERE assigned_to = {$user_id} AND status =
0";
+ . " WHERE controller_check_list.assigned_to =
{$user_id} AND status = 0";
//_debug_array($sql);
if( $repeat_type )
@@ -211,7 +211,7 @@
$sql = "SELECT DISTINCT
controller_check_list.location_code, controller_check_list.control_id,
controller_check_list.id AS check_list_id,"
- . " controller_control.description, start_date,
end_date, deadline,planned_date, completed_date,"
+ . " controller_control.description,
controller_control.start_date, end_date, deadline,planned_date, completed_date,"
. "
control_area_id,controller_check_list.location_id,title,controller_check_list.component_id"
. " FROM controller_check_list"
. " {$this->join} controller_control ON
controller_check_list.control_id = controller_control.id"
@@ -219,7 +219,7 @@
. " ON
(controller_control_component_list.control_id =
controller_check_list.control_id"
. " AND
controller_control_component_list.location_id =
controller_check_list.location_id"
. " AND
controller_control_component_list.component_id =
controller_check_list.component_id)"
- . " WHERE assigned_to = {$user_id} AND status =
0";
+ . " WHERE controller_check_list.assigned_to =
{$user_id} AND status = 0";
if( $repeat_type )
{
@@ -827,6 +827,8 @@
*/
function register_control_to_component($data)
{
+ $assigned_to = isset($data['assigned_to']) &&
$data['assigned_to'] ? $data['assigned_to'] : null;
+ $start_date =
isset($data['start_date']) && $data['start_date'] ? $data['start_date'] : null;
$delete_component = array();
$add_component = array();
@@ -861,10 +863,17 @@
if(!$this->db->next_record())
{
- $sql = "INSERT INTO
controller_control_component_list (control_id, location_id, component_id) ";
- $sql .= "VALUES (
{$control_id}, {$location_id}, {$component_id})";
-
- $this->db->query($sql);
+ $values_insert = array
+ (
+ 'control_id'
=> $control_id,
+ 'location_id'
=> $location_id,
+ 'component_id'
=> $component_id,
+ 'assigned_to'
=> $assigned_to,
+ 'start_date'
=> $start_date
+ );
+
+ $this->db->query("INSERT INTO
controller_control_component_list (" . implode(',',array_keys($values_insert))
. ') VALUES ('
+ .
$this->db->validate_insert(array_values($values_insert)) .
')',__LINE__,__FILE__);
}
}
}
@@ -904,6 +913,64 @@
$this->db->query($sql);
}
+ /**
+ * Get all controls assosiated with a component
+ *
+ * @param array $data location_id and component_id
+ * @return array controls assosiated with a component
+ * @throws Exception if missing valid input
+ */
+ function get_controls_at_component($data)
+ {
+ if(!isset($data['location_id']) ||
!$data['location_id'])
+ {
+ throw new
Exception("controller_socontrol::get_controls_at_component - Missing
location_id in input");
+ }
+ if(!isset($data['component_id']) ||
!$data['component_id'])
+ {
+ throw new
Exception("controller_socontrol::get_controls_at_component - Missing
component_id in input");
+ }
+
+ static $users = array(); // cache result
+
+ $location_id = (int)$data['location_id'];
+ $component_id = (int)$data['component_id'];
+
+ $sql = "SELECT controller_control_component_list.* ,
controller_control.title, repeat_type, repeat_interval, enabled"
+ . " FROM controller_control_component_list"
+ . " {$this->db->join} controller_control ON
controller_control.id = controller_control_component_list.control_id WHERE
location_id = {$location_id} AND component_id = {$component_id}";
+ $this->db->query($sql,__LINE__,__FILE__);
+ $controls = array();
+
+ while ($this->db->next_record())
+ {
+ $controls[] = array
+ (
+ 'id' =>
$this->db->f('id'),
+ 'control_id' =>
$this->db->f('control_id'),
+ 'title' =>
$this->db->f('title',true),
+ 'location_id' =>
$this->db->f('location_id'),
+ 'component_id' =>
$this->db->f('component_id'),
+ 'assigned_to' =>
$this->db->f('assigned_to'),
+ 'start_date' =>
$this->db->f('start_date'),
+ 'repeat_type' =>
$this->db->f('repeat_type'),
+ 'repeat_interval' =>
$this->db->f('repeat_interval'),
+ 'enabled' =>
$this->db->f('enabled'),
+ );
+ }
+
+ foreach($controls as &$entry)
+ {
+ if(!isset($users[$entry['assigned_to']]))
+ {
+ $users[$entry['assigned_to']] =
$GLOBALS['phpgw']->accounts->get($entry['assigned_to'])->__toString();
+ }
+ $entry['assigned_to_name'] =
$users[$entry['assigned_to']];
+ }
+ return $controls;
+
+ }
+
function get_id_field_name($extended_info = false)
{
if(!$extended_info)
Modified: branches/dev-syncromind/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicalendar.inc.php
2015-02-24 11:48:32 UTC (rev 12785)
+++ branches/dev-syncromind/controller/inc/class.uicalendar.inc.php
2015-02-24 11:51:13 UTC (rev 12786)
@@ -682,8 +682,14 @@
static $_location_name = array();
$control_id = phpgw::get_var('control_id');
$control = $this->so_control->get_single($control_id);
- $year = intval(phpgw::get_var('year'));
- $month = intval(phpgw::get_var('month'));
+ if(!$year = intval(phpgw::get_var('year')))
+ {
+ $year = date('Y');
+ }
+ if(!$month = intval(phpgw::get_var('month')))
+ {
+ $month = date('m');
+ }
$user_id = $GLOBALS['phpgw_info']['user']['account_id'];
Copied: branches/dev-syncromind/controller/inc/class.uilookup.inc.php (from rev
12785, trunk/controller/inc/class.uilookup.inc.php)
===================================================================
--- branches/dev-syncromind/controller/inc/class.uilookup.inc.php
(rev 0)
+++ branches/dev-syncromind/controller/inc/class.uilookup.inc.php
2015-02-24 11:51:13 UTC (rev 12786)
@@ -0,0 +1,301 @@
+<?php
+ /**
+ * phpGroupWare - property: a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software
Foundation, Inc. http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package property
+ * @subpackage core
+ * @version $Id: class.uilookup.inc.php 11909 2014-04-13 16:49:53Z
sigurdne $
+ */
+
+ /**
+ * Description
+ * @package property
+ */
+ phpgw::import_class('phpgwapi.yui');
+
+ class controller_uilookup
+ {
+ var $cat_id;
+ var $start;
+ var $query;
+ var $sort;
+ var $order;
+ var $filter;
+
+ var $public_functions = array
+ (
+ 'control' => true
+ );
+
+ function __construct()
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework'] = true;
+ $GLOBALS['phpgw_info']['flags']['headonly']=true;
+ $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
+
+ $this->start =
$this->bo->start;
+ $this->query =
$this->bo->query;
+ $this->sort =
$this->bo->sort;
+ $this->order =
$this->bo->order;
+ $this->filter =
$this->bo->filter;
+ $this->cat_id =
$this->bo->cat_id;
+ phpgwapi_yui::load_widget('tabview');
+ phpgwapi_yui::load_widget('dragdrop');
+ phpgwapi_yui::load_widget('datatable');
+ phpgwapi_yui::load_widget('menu');
+ phpgwapi_yui::load_widget('connection');
+ phpgwapi_yui::load_widget('loader');
+ phpgwapi_yui::load_widget('tabview');
+ phpgwapi_yui::load_widget('paginator');
+ phpgwapi_yui::load_widget('animation');
+
+ if ( !isset($GLOBALS['phpgw']->css) ||
!is_object($GLOBALS['phpgw']->css) )
+ {
+ $GLOBALS['phpgw']->css =
createObject('phpgwapi.css');
+ }
+ // Prepare CSS Style
+ $GLOBALS['phpgw']->css->validate_file('datatable');
+ $GLOBALS['phpgw']->css->validate_file('property');
+
$GLOBALS['phpgw']->css->add_external_file('property/templates/base/css/property.css');
+
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/datatable/assets/skins/sam/datatable.css');
+
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/container/assets/skins/sam/container.css');
+
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/paginator/assets/skins/sam/paginator.css');
+
+ }
+
+ function control()
+ {
+ if( phpgw::get_var('phpgw_return_as') != 'json' )
+ {
+
+ $datatable['config']['base_url'] =
$GLOBALS['phpgw']->link('/index.php', array
+ (
+ 'menuaction'
=> 'controller.uilookup.control',
+ 'second_display' => true,
+ 'cat_id'
=> $this->cat_id,
+ 'query'
=> $this->query,
+ 'filter'
=> $this->filter,
+ ));
+
+ $datatable['config']['allow_allrows'] = true;
+
+ $datatable['config']['base_java_url'] =
"menuaction:'controller.uilookup.control',"
+ ."second_display:true,"
+ ."cat_id:'{$this->cat_id}',"
+ ."query:'{$this->query}',"
+ ."filter:'{$this->filter}'";
+
+ $datatable['actions']['form'] = array
+ (
+ array
+ (
+ 'action' =>
$GLOBALS['phpgw']->link('/index.php',
+ array
+ (
+ 'menuaction'
=> 'controller.uilookup.control',
+
'second_display' => true,
+ 'cat_id'
=> $this->cat_id,
+ 'query'
=> $this->query,
+ 'filter'
=> $this->filter
+ )
+ ),
+ 'fields' => array
+ (
+ 'field' => array
+ (
+ array
+ ( //boton
SEARCH
+ 'id' =>
'btn_search',
+ 'name'
=> 'search',
+ 'value'
=> lang('search'),
+ 'type'
=> 'button',
+
'tab_index' => 2
+ ),
+ array
+ ( // TEXT IMPUT
+ 'name'
=> 'query',
+ 'id'
=> 'txt_query',
+ 'value'
=> '',//'',//$query,
+ 'type'
=> 'text',
+ 'size'
=> 28,
+
'onkeypress' => 'return pulsar(event)',
+
'tab_index' => 1
+ )
+ ),
+ 'hidden_value' => array
+ (
+ )
+ )
+ )
+ );
+ }
+
+ $uicols = array (
+ 'input_type' => array('text','text',),
+ 'name' =>
array('id','title'),
+ 'sort_field' => array('id','title'),
+ 'formatter' => array('',''),
+ 'descr' =>
array(lang('ID'),lang('title'))
+ );
+
+ $values = array();
+ $uicontrol = CreateObject('controller.uicontrol');
+
+ $_GET['startIndex'] = phpgw::get_var('start');
+ $_REQUEST['startIndex'] = phpgw::get_var('start');
+ $_GET['dir'] = phpgw::get_var('sort', 'string', 'GET',
'ASC');
+ $_REQUEST['dir'] = phpgw::get_var('sort', 'string',
'GET', 'ASC');
+ $_GET['sort'] = phpgw::get_var('order', 'string',
'GET', 'id');
+ $_REQUEST['sort'] = phpgw::get_var('order', 'string',
'GET', 'id');
+
+
+ $values = $uicontrol->query();
+
+ $json = array
+ (
+ 'recordsReturned' =>
$values['ResultSet']['recordsReturned'],
+ 'totalRecords' =>
$values['ResultSet']['totalRecords'],
+ 'startIndex' =>
$values['ResultSet']['startIndex'],
+ // 'pageSize' =>
$values['ResultSet']['pageSize'],
+ 'sort' =>
$values['ResultSet']['sortKey'],
+ 'dir' =>
$values['ResultSet']['sortDir'],
+ 'records' =>
$values['ResultSet']['Result'],
+ );
+
+ if( phpgw::get_var('phpgw_return_as') == 'json' )
+ {
+ return $json;
+ }
+
+
+ $uicols_count = count($uicols['descr']);
+ $datatable['rowactions']['action'] = array();
+ for ($i=0;$i<$uicols_count;$i++)
+ {
+ //all colums should be have formatter
+
$datatable['headers']['header'][$i]['formatter'] =
($uicols['formatter'][$i]==''? '""' : $uicols['formatter'][$i]);
+ if($uicols['input_type'][$i]!='hidden')
+ {
+
$datatable['headers']['header'][$i]['name'] =
$uicols['name'][$i];
+
$datatable['headers']['header'][$i]['text'] =
$uicols['descr'][$i];
+
$datatable['headers']['header'][$i]['visible'] = true;
+
$datatable['headers']['header'][$i]['sortable'] = true;
+
$datatable['headers']['header'][$i]['sort_field'] =
$uicols['sort_field'][$i];
+ }
+ else
+ {
+
$datatable['headers']['header'][$i]['name'] =
$uicols['name'][$i];
+
$datatable['headers']['header'][$i]['text'] =
$uicols['descr'][$i];
+
$datatable['headers']['header'][$i]['visible'] = false;
+
$datatable['headers']['header'][$i]['sortable'] = false;
+
$datatable['headers']['header'][$i]['format'] = 'hidden';
+ }
+ }
+
+ $function_exchange_values = '';
+
+ $function_exchange_values .=
'opener.document.getElementById("control_id").value = "";' ."\r\n";
+ $function_exchange_values .=
'opener.document.getElementById("control_name").value = "";' ."\r\n";
+
+ $function_exchange_values .=
'opener.document.getElementById("control_id").value = data.getData("id");'
."\r\n";
+ $function_exchange_values .=
'opener.document.getElementById("control_name").value = data.getData("title");'
."\r\n";
+
+ $function_exchange_values .= 'window.close()';
+
+ $datatable['exchange_values'] =
$function_exchange_values;
+ $datatable['valida'] = '';
+
+ // path for property.js
+ $property_js = "/property/js/yahoo/property.js";
+
+ if
(!isset($GLOBALS['phpgw_info']['server']['no_jscombine']) ||
!$GLOBALS['phpgw_info']['server']['no_jscombine'])
+ {
+ $cachedir =
urlencode($GLOBALS['phpgw_info']['server']['temp_dir']);
+ $property_js =
"/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files=" .
str_replace('/', '--', ltrim($property_js,'/'));
+ }
+
+ $datatable['property_js'] =
$GLOBALS['phpgw_info']['server']['webserver_url'] . $property_js;
+
+ // Pagination and sort values
+ $datatable['pagination']['records_start'] =
(int)phpgw::get_var('start');
+ $datatable['pagination']['records_limit'] =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+ $datatable['pagination']['records_returned']=
$values['ResultSet']['recordsReturned'];
+ $datatable['pagination']['records_total'] =
$values['ResultSet']['totalRecords'];
+
+ if ( (phpgw::get_var("start")== "") &&
(phpgw::get_var("order",'string')== ""))
+ {
+ $datatable['sorting']['order']
= 'id'; // name key Column in myColumnDef
+ $datatable['sorting']['sort']
= 'asc'; // ASC / DESC
+ }
+ else
+ {
+ $datatable['sorting']['order']
= phpgw::get_var('sort', 'string'); // name of column of Database
+ $datatable['sorting']['sort']
= phpgw::get_var('dir', 'string'); // ASC / DESC
+ }
+
+ $appname
= lang('controller');
+ $function_msg = '';
+
+
+ //-- BEGIN----------------------------- JSON CODE
------------------------------
+
+ //values for Pagination
+ $json = array
+ (
+ 'recordsReturned' =>
$datatable['pagination']['records_returned'],
+ 'totalRecords' =>
(int)$datatable['pagination']['records_total'],
+ 'startIndex' =>
$datatable['pagination']['records_start'],
+ 'sort' =>
$datatable['sorting']['order'],
+ 'dir' =>
$datatable['sorting']['sort'],
+ 'records' =>
array()
+ );
+
+
+ // right in datatable
+ if(isset($datatable['rowactions']['action']) &&
is_array($datatable['rowactions']['action']))
+ {
+ $json ['rights'] =
$datatable['rowactions']['action'];
+ }
+
+ if( phpgw::get_var('phpgw_return_as') == 'json' )
+ {
+ return $json;
+ }
+
+
+ $datatable['json_data'] = json_encode($json);
+ //-------------------- JSON CODE ----------------------
+
+ // Prepare template variables and process XSLT
+ $template_vars = array();
+ $template_vars['datatable'] = $datatable;
+
$GLOBALS['phpgw']->xslttpl->add_file(array('datatable'));
+ $GLOBALS['phpgw']->xslttpl->set_var('phpgw',
$template_vars);
+
+ //Title of Page
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('controller') . ' - ' . $appname . ': ' . $function_msg;
+
+ // Prepare generic YUI Library for old style lookup
+ $GLOBALS['phpgw']->js->validate_file( 'yahoo',
'lookup.tenant.index', 'property' );
+ }
+ }
Modified: branches/dev-syncromind/controller/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind/controller/setup/setup.inc.php 2015-02-24
11:48:32 UTC (rev 12785)
+++ branches/dev-syncromind/controller/setup/setup.inc.php 2015-02-24
11:51:13 UTC (rev 12786)
@@ -1,6 +1,6 @@
<?php
$setup_info['controller']['name'] = 'controller';
- $setup_info['controller']['version'] = '0.1.48';
+ $setup_info['controller']['version'] = '0.1.49';
$setup_info['controller']['app_order'] = 100;
$setup_info['controller']['enable'] = 1;
$setup_info['controller']['app_group'] = 'office';
Modified: branches/dev-syncromind/controller/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind/controller/setup/tables_current.inc.php
2015-02-24 11:48:32 UTC (rev 12785)
+++ branches/dev-syncromind/controller/setup/tables_current.inc.php
2015-02-24 11:51:13 UTC (rev 12786)
@@ -143,10 +143,12 @@
),
'controller_control_component_list' => array(
'fd' => array(
- 'id'
=> array('type' => 'auto', 'nullable' => false),
+ 'id' =>
array('type' => 'auto', 'nullable' => false),
'control_id' => array('type'
=> 'int', 'precision' => '4', 'nullable' => false),
- 'location_id' => array('type' =>
'int', 'precision' => '4', 'nullable' => false),
- 'component_id' => array('type' =>
'int', 'precision' => '4', 'nullable' => false)
+ 'location_id' => array('type'
=> 'int', 'precision' => '4', 'nullable' => false),
+ 'component_id' => array('type'
=> 'int', 'precision' => '4', 'nullable' => false),
+ 'assigned_to' => array('type'
=> 'int', 'precision' => '4', 'nullable' => true),
+ 'start_date' => array('type'
=> 'int', 'precision' => '4', 'nullable' => true),
),
'pk' => array('id'),
'fk' => array(),
Modified: branches/dev-syncromind/controller/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind/controller/setup/tables_update.inc.php
2015-02-24 11:48:32 UTC (rev 12785)
+++ branches/dev-syncromind/controller/setup/tables_update.inc.php
2015-02-24 11:51:13 UTC (rev 12786)
@@ -965,3 +965,29 @@
}
}
+ /**
+ * Assign responsible user to control at componant from date.
+ **/
+ $test[] = '0.1.48';
+ function controller_upgrade0_1_48()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('controller_control_component_list','assigned_to',array(
+ 'type' => 'int',
+ 'precision' => '4',
+ 'nullable' => true
+ ));
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('controller_control_component_list','start_date',array(
+ 'type' => 'int',
+ 'precision' => '8',
+ 'nullable' => true
+ ));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['controller']['currentver'] =
'0.1.49';
+ return
$GLOBALS['setup_info']['controller']['currentver'];
+ }
+ }
Modified: branches/dev-syncromind/phpgwapi/inc/class.xslttemplates.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.xslttemplates.inc.php
2015-02-24 11:48:32 UTC (rev 12785)
+++ branches/dev-syncromind/phpgwapi/inc/class.xslttemplates.inc.php
2015-02-24 11:51:13 UTC (rev 12786)
@@ -395,6 +395,7 @@
$xsl->loadXML($this->xsldata);
// Configure the transformer
+ libxml_use_internal_errors(true);
$proc = new XSLTProcessor;
$proc->registerPHPFunctions();
$proc->importStyleSheet($xsl); // attach the xsl rules
@@ -416,7 +417,10 @@
echo '<div class="error">';
echo $message;
echo '</div>';
- _debug_array(libxml_get_last_error());
+ $errors = libxml_get_errors();
+ _debug_array($errors);
+ libxml_clear_errors();
+
echo "<h2>xml-data</h2>";
$this->list_lineno($this->xmldata,
true);
Modified:
branches/dev-syncromind/property/inc/custom/default/hent_maaler_nr_til_besikt_rapport.php
===================================================================
---
branches/dev-syncromind/property/inc/custom/default/hent_maaler_nr_til_besikt_rapport.php
2015-02-24 11:48:32 UTC (rev 12785)
+++
branches/dev-syncromind/property/inc/custom/default/hent_maaler_nr_til_besikt_rapport.php
2015-02-24 11:51:13 UTC (rev 12786)
@@ -139,6 +139,40 @@
}
}
break;
+ case 'br_slokk_app_skiftet':
+ if($entry['value'])
+ {
+ $new_value =
$entry['value'];
+
$this->db->query("SELECT skiftet, id FROM fm_entity_1_10 WHERE location_code
='{$values['location_code']}'",__LINE__,__FILE__);
+
$this->db->next_record();
+ $old_value =
$this->db->f('skiftet');
+ $id =
$this->db->f('id');
+ if($id)
+ {
+
$attrib_id = 2;
+
if(strtotime($new_value) != strtotime($old_value))
+ {
+
$historylog = CreateObject('property.historylog','entity_1_10');
+
$historylog->add('SO', $id, $new_value, false, $attrib_id, $besiktet_dato);
+
$this->db->query("UPDATE fm_entity_1_10 SET skiftet = '{$new_value}' WHERE
location_code ='{$values['location_code']}'",__LINE__,__FILE__);
+ }
+ }
+ else
+ {
+ if
($values['street_name'])
+ {
+
$address = $this->db->db_addslashes($values['street_name'] . ' '
.$values['street_number']);
+ }
+ else
+ {
+
$address = $this->db->db_addslashes($values['location_name']);
+ }
+
+
$this->br_slokk_app($new_value, $values['location_code'], $address);
+ }
+ }
+ break;
+ default:
}
}
}
@@ -168,13 +202,45 @@
$value_set['location_code'] = $location_code;
$value_set['entry_date'] = time();
$value_set['user_id'] = $this->account;
-
+
$cols = implode(',', array_keys($value_set));
$values =
$this->db->validate_insert(array_values($value_set));
$this->db->query("INSERT INTO $table ({$cols}) VALUES
({$values})",__LINE__,__FILE__);
$historylog =
CreateObject('property.historylog','entity_1_14');
$historylog->add('SO', $value_set['id'], $beskrivelse,
false, $attrib_id = 1, time());
}
+
+ private function br_slokk_app($date,$location_code,$address)
+ {
+ $table = 'fm_entity_1_10';
+ $location=explode('-',$location_code);
+ $value_set = array();
+
+ $i=1;
+ if (isset($location) AND is_array($location))
+ {
+ foreach($location as $location_entry)
+ {
+ $value_set["loc{$i}"] = $location_entry;
+
+ $i++;
+ }
+ }
+
+ $value_set['id'] = $this->bocommon->next_id($table);
+ $value_set['num'] = $value_set['id'];
+ $value_set['address'] = $address;
+ $value_set['skiftet'] = $date;
+ $value_set['location_code'] = $location_code;
+ $value_set['entry_date'] = time();
+ $value_set['user_id'] = $this->account;
+
+ $cols = implode(',', array_keys($value_set));
+ $values =
$this->db->validate_insert(array_values($value_set));
+ $this->db->query("INSERT INTO $table ({$cols}) VALUES
({$values})",__LINE__,__FILE__);
+ $historylog =
CreateObject('property.historylog','entity_1_10');
+ $historylog->add('SO', $value_set['id'], $date, false,
$attrib_id = 2, time());
+ }
}
$data_sync = new entity_data_sync();
Modified: branches/dev-syncromind/property/inc/export/default/Agresso_X114
===================================================================
--- branches/dev-syncromind/property/inc/export/default/Agresso_X114
2015-02-24 11:48:32 UTC (rev 12785)
+++ branches/dev-syncromind/property/inc/export/default/Agresso_X114
2015-02-24 11:51:13 UTC (rev 12786)
@@ -151,7 +151,8 @@
}
else
{
- $sql= "SELECT DISTINCT fm_ecobilag.bilagsnr
FROM fm_ecobilag {$this->join} fm_ecobilag_sum_view ON fm_ecobilag.bilagsnr =
fm_ecobilag_sum_view.bilagsnr WHERE approved_amount = '0.00' OR (
budsjettsigndato IS NOT NULL AND (saksigndato IS NOT NULL OR oppsynsigndato IS
NOT NULL) ) ORDER BY bilagsnr ASC";
+ $sql= "SELECT DISTINCT fm_ecobilag.bilagsnr
FROM fm_ecobilag {$this->join} fm_ecobilag_sum_view ON fm_ecobilag.bilagsnr =
fm_ecobilag_sum_view.bilagsnr"
+ . " WHERE approved_amount = '0.00' OR
( budsjettsigndato IS NOT NULL AND saksigndato IS NOT NULL) ORDER BY bilagsnr
ASC";
}
$this->db->query($sql,__LINE__,__FILE__);
$vouchers_step1 = array();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12786] Syncromind: Merge 12752:12785 from trunk,
Sigurd Nes <=