fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17019] Stable: Merge 17004:17018 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [17019] Stable: Merge 17004:17018 from trunk
Date: Thu, 31 Aug 2017 07:37:23 -0400 (EDT)

Revision: 17019
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17019
Author:   sigurdne
Date:     2017-08-31 07:37:22 -0400 (Thu, 31 Aug 2017)
Log Message:
-----------
Stable: Merge 17004:17018 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/class.historylog.inc.php
    branches/Version-2_0-branch/property/inc/class.bogeneric.inc.php
    branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
    branches/Version-2_0-branch/property/inc/class.menu.inc.php
    branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
    branches/Version-2_0-branch/property/inc/class.sogeneric_.inc.php
    branches/Version-2_0-branch/property/inc/class.solocation.inc.php
    branches/Version-2_0-branch/property/inc/class.sotts.inc.php
    branches/Version-2_0-branch/property/inc/class.uigeneric.inc.php
    branches/Version-2_0-branch/property/inc/class.uilocation.inc.php
    branches/Version-2_0-branch/property/inc/class.uitts.inc.php
    
branches/Version-2_0-branch/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
    branches/Version-2_0-branch/property/js/portico/project.edit.js
    branches/Version-2_0-branch/property/js/portico/tts.add.js
    branches/Version-2_0-branch/property/js/portico/tts.view.js
    branches/Version-2_0-branch/property/js/portico/workorder.edit.js
    branches/Version-2_0-branch/property/setup/default_records.inc.php
    branches/Version-2_0-branch/property/setup/phpgw_no.lang
    branches/Version-2_0-branch/property/setup/setup.inc.php
    branches/Version-2_0-branch/property/setup/tables_current.inc.php
    branches/Version-2_0-branch/property/setup/tables_update.inc.php
    branches/Version-2_0-branch/property/templates/base/generic.xsl
    branches/Version-2_0-branch/property/templates/base/tts.xsl
    branches/Version-2_0-branch/rental/inc/class.socontract.inc.php
    branches/Version-2_0-branch/rental/inc/class.soinvoice.inc.php
    branches/Version-2_0-branch/rental/inc/class.soparty.inc.php
    branches/Version-2_0-branch/rental/inc/class.uicontract.inc.php
    branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php
    branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php
    branches/Version-2_0-branch/rental/templates/base/party.xsl

Added Paths:
-----------
    
branches/Version-2_0-branch/property/js/portico/location_exception_category_text.edit.js

Property Changed:
----------------
    branches/Version-2_0-branch/

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch 2017-08-31 11:37:22 UTC (rev 17019)

Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
 /branches/dev-syncromind:13653
 /branches/dev-syncromind-2:14933-16846
 /branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977,16979-16982,16984,16986,16988-16999,17001,17003
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977,16979-16982,16984,16986,16988-16999,17001,17003,17005-17018
\ No newline at end of property
Modified: branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php        
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php        
2017-08-31 11:37:22 UTC (rev 17019)
@@ -1065,7 +1065,7 @@
                                $file = '/tmp/' . uniqid() . '.png';
                                if (file_put_contents($file, $data))
                                {
-                                       $to_file = 
"{$bofiles->fakebase}/{$id}/" .  str_replace(' ', '_', $_ticket['subject']) . 
'_' . ( (int)count($_ticket['files']) +1 ) . '.png';
+                                       $to_file = 
"{$bofiles->fakebase}/{$id}/" .  str_replace(array(' ', '/', '?'), array('_', 
'_', ''), $_ticket['subject']) . '_' . ( (int)count($_ticket['files']) +1 ) . 
'.png';
                                        $bofiles->create_document_dir("{$id}");
                                        $bofiles->vfs->override_acl = 1;
 
@@ -1280,7 +1280,7 @@
                                                $file = '/tmp/' . uniqid() . 
'.png';
                                                if (file_put_contents($file, 
$data))
                                                {
-                                                       $to_file = 
"{$bofiles->fakebase}/{$receipt['id']}/" .  str_replace(' ', '_', 
$values['subject']) . '.png';
+                                                       $to_file = 
"{$bofiles->fakebase}/{$receipt['id']}/" .  str_replace(array(' ', '/', '?'), 
array('_', '_', ''), $values['subject']) . '.png';
                                                        
$bofiles->create_document_dir("{$receipt['id']}");
                                                        
$bofiles->vfs->override_acl = 1;
 

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.historylog.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.historylog.inc.php   
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.historylog.inc.php   
2017-08-31 11:37:22 UTC (rev 17019)
@@ -46,7 +46,7 @@
                                . "location_id=" . $this->location_id 
,__LINE__,__FILE__);
                }
 
-               function add($status,$record_id,$new_value,$old_value)
+               function add($status,$record_id,$new_value,$old_value = '')
                {
                        if ($new_value != $old_value)
                        {

Modified: branches/Version-2_0-branch/property/inc/class.bogeneric.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bogeneric.inc.php    
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.bogeneric.inc.php    
2017-08-31 11:37:22 UTC (rev 17019)
@@ -135,7 +135,7 @@
 
                        $filter = array('list' => ''); // translates to "list 
IS NULL"
                        $system_location = 
$this->location_info['system_location'] ? 
$this->location_info['system_location'] : $this->location_info['acl_location'];
-                       
+
                        $columns = 
$this->custom->find($this->location_info['acl_app'], $system_location, 0, '', 
'', '', true, false, $filter);
                        $column_list = 
$this->bocommon->select_multi_list($selected, $columns);
 
@@ -151,6 +151,8 @@
                        }
                        $values = $this->so->read($data);
 
+                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+
                        foreach ($values as &$entry)
                        {
                                foreach ($this->location_info['fields'] as 
$field)
@@ -157,13 +159,17 @@
                                {
                                        if (isset($entry[$field['name']]) && 
$entry[$field['name']])
                                        {
-                                               if 
(isset($field['values_def']['get_single_value']) && 
$field['values_def']['get_single_value'] == 'get_user')
+                                               if($field['type'] == 'date')
                                                {
+                                                       $entry[$field['name']] 
= $GLOBALS['phpgw']->common->show_date($entry[$field['name']], $dateformat);
+                                               }
+                                               else if 
(isset($field['values_def']['get_single_value']) && 
$field['values_def']['get_single_value'] == 'get_user')
+                                               {
                                                        $entry[$field['name']] 
= $GLOBALS['phpgw']->accounts->get($entry[$field['name']])->__toString();
                                                }
-                                               else if (isset($field['role']) 
&& $field['role'] == 'parent')
+                                               else if (isset($field['role']) 
&& $field['role'] == 'parent' && 
!empty($field['values_def']['method_input']['type']))
                                                {
-                                                       $path = 
$this->so->get_path(array('type' => $this->type, 'id' => 
$entry[$field['name']]));
+                                                       $path = 
$this->so->get_path(array('type' => 
$field['values_def']['method_input']['type'], 'id' => $entry[$field['name']]));
                                                        $entry[$field['name']] 
= implode(' > ', $path);
                                                }
                                                else if 
(isset($field['values_def']['get_single_value']) && 
$field['values_def']['get_single_value'])

Modified: branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bolocation.inc.php   
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.bolocation.inc.php   
2017-08-31 11:37:22 UTC (rev 17019)
@@ -1178,4 +1178,9 @@
                        return $this->so->get_delivery_address($loc1);
                }
 
+               function get_location_exception($location_code = '' )
+               {
+                       return 
$this->so->get_location_exception($location_code, $alert_vendor = false);
+               }
+
        }
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/inc/class.menu.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.menu.inc.php 2017-08-31 
11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.menu.inc.php 2017-08-31 
11:37:22 UTC (rev 17019)
@@ -464,6 +464,30 @@
                                        );
                                }
 
+                               $location_exception_children = array
+                               (
+                                       'severity' => array
+                                               (
+                                               'text' => lang('severity'),
+                                               'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index',
+                                                       'type' => 
'location_exception_severity'))
+                                       ),
+                                       'category' => array
+                                               (
+                                               'text' => lang('category'),
+                                               'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index',
+                                                       'type' => 
'location_exception_category')),
+                                               'children' => array(
+                                                       'category_text' => array
+                                                       (
+                                                               'text' => 
lang('text'),
+                                                               'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index',
+                                                                       'type' 
=> 'location_exception_category_text'))
+                                                       )
+                                               )
+                                       )
+                               );
+
                                $admin_children_location = array
                                        (
                                        'street' => array
@@ -511,6 +535,14 @@
                                                'text' => lang('location 
contact'),
                                                'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index',
                                                        'type' => 
'location_contact'))
+                                       ),
+                                       'location_exception' => array
+                                               (
+                                               'text' => lang('location 
exception'),
+                                               'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index',
+                                                       'type' => 
'location_exception')),
+                                               'children' => 
$location_exception_children
+
                                        )
                                );
 
@@ -869,20 +901,16 @@
                                        'image' => array('property', 
'responsibility_role')
                                );
 
-                               /*                              if ( 
$acl->check('.location', 16, 'property') )
-                                 {
-                                 $children['type'] = array
-                                 (
-                                 'url' => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiadmin_location.index')),
-                                 'text'        => lang('Location type')
-                                 );
-                                 $children['config'] = array
-                                 (
-                                 'url' => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiadmin_location.config')),
-                                 'text'        => lang('Config')
-                                 );
-                                 }
-                                */
+                               $children['location_exception'] = array
+                                       (
+                                               'text' => lang('location 
exception'),
+                                               'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index',
+                                                       'type' => 
'location_exception',
+                                                       'menu_selection' => 
'property::location::location_exception')),
+
+                                       );
+
+
                                $menus['navigation']['location'] = array
                                        (
                                        'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uilocation.index',

Modified: branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php    
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php    
2017-08-31 11:37:22 UTC (rev 17019)
@@ -2446,6 +2446,227 @@
 
                                        break;
 
+                               case 'location_exception_severity':
+                                       $info = array
+                                               (
+                                               'table' => 
'fm_location_exception_severity',
+                                               'id' => array('name' => 'id', 
'type' => 'int', 'descr' => lang('id')),
+                                               'fields' => array
+                                                       (
+                                                       array
+                                                       (
+                                                               'name' => 
'name',
+                                                               'descr' => 
lang('name'),
+                                                               'type' => 
'varchar',
+                                                               'nullable' => 
false
+                                                       )
+                                               ),
+                                               'edit_msg' => lang('edit'),
+                                               'add_msg' => lang('add'),
+                                               'name' => lang('severity'),
+                                               'acl_app' => 'property',
+                                               'acl_location' => '.admin',
+                                               'menu_selection' => 
'admin::property::location::location_exception::severity'
+                                       );
+                                       break;
+                               case 'location_exception_category':
+                                       $info = array
+                                               (
+                                               'table' => 
'fm_location_exception_category',
+                                               'id' => array('name' => 'id', 
'type' => 'auto'),
+                                               'fields' => array
+                                               (
+                                                       array(
+                                                               'name' => 
'parent_id',
+                                                               'descr' => 
lang('parent'),
+                                                               'type' => 
'select',
+                                                               'sortable' => 
true,
+                                                               'nullable' => 
true,
+                                                               'filter' => 
false,
+                                                               'role' => 
'parent',
+                                                               'values_def' => 
array
+                                                               (
+                                                                       
'valueset' => false,
+                                                                       
'method' => 'property.bogeneric.get_list',
+                                                                       
'method_input' => array('type' => 'location_exception_category', 'role' => 
'parent', 'selected' => '##parent_id##')
+                                                               )
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'name',
+                                                               'descr' => 
lang('name'),
+                                                               'type' => 
'varchar',
+                                                               'nullable' => 
false
+                                                       )
+                                               ),
+                                               'edit_msg' => lang('edit'),
+                                               'add_msg' => lang('add'),
+                                               'name' => lang('severity 
category'),
+                                               'acl_app' => 'property',
+                                               'acl_location' => '.admin',
+                                               'menu_selection' => 
'admin::property::location::location_exception::category'
+                                       );
+                                       break;
+
+                               case 'location_exception_category_text':
+                                       $info = array
+                                               (
+                                               'table' => 
'fm_location_exception_category_text',
+                                               'id' => array('name' => 'id', 
'type' => 'auto'),
+                                               'fields' => array
+                                               (
+                                                       array
+                                                       (
+                                                               'name' => 
'content',
+                                                               'descr' => 
lang('content'),
+                                                               'type' => 
'varchar',
+                                                               'nullable' => 
false
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'category_id',
+                                                               'descr' => 
lang('category'),
+                                                               'type' => 
'select',
+                                                               'nullable' => 
false,
+                                                               'filter' => 
true,
+                                                               'sortable' => 
true,
+                                                               'values_def' => 
array
+                                                               (
+                                                                       
'valueset' => false,
+                                                                       
'method' => 'property.bogeneric.get_list',
+                                                                       
'get_single_value' => 'property.sogeneric.get_name',
+                                                                       
'method_input' => array('type' => 'location_exception_category', 'selected' => 
'##category_id##', 'role' => 'parent')
+                                                               )
+                                                       )
+                                               ),
+                                               'edit_msg' => lang('edit'),
+                                               'add_msg' => lang('add'),
+                                               'name' => lang('severity 
category text'),
+                                               'acl_app' => 'property',
+                                               'acl_location' => '.admin',
+                                               'menu_selection' => 
'admin::property::location::location_exception::category::category_text'
+                                       );
+                                       break;
+
+                               case 'location_exception':
+                                       $info = array
+                                               (
+                                               'table' => 
'fm_location_exception',
+                                               'id' => array('name' => 'id', 
'type' => 'auto'),
+                                               'fields' => array
+                                               (
+                                                       array
+                                                       (
+                                                               'name' => 
'location_code',
+                                                               'descr' => 
lang('location'),
+                                                               'type' => 
'location',
+                                                               'nullable' => 
false
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'descr',
+                                                               'descr' => 
lang('descr'),
+                                                               'type' => 
'text',
+                                                               'nullable' => 
true
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'start_date',
+                                                               'descr' => 
lang('start date'),
+                                                               'type' => 
'date',
+                                                               'nullable' => 
false
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'end_date',
+                                                               'descr' => 
lang('end date'),
+                                                               'type' => 
'date',
+                                                               'nullable' => 
true
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'reference',
+                                                               'descr' => 
lang('reference'),
+                                                               'type' => 
'text',
+                                                               'nullable' => 
true
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'severity_id',
+                                                               'descr' => 
lang('severity'),
+                                                               'type' => 
'select',
+                                                               'nullable' => 
false,
+                                                               'filter' => 
true,
+                                                               'sortable' => 
true,
+                                                               'values_def' => 
array
+                                                               (
+                                                                       
'valueset' => false,
+                                                                       
'method' => 'property.bogeneric.get_list',
+                                                                       
'get_single_value' => 'property.sogeneric.get_name',
+                                                                       
'method_input' => array('type' => 'location_exception_severity', 'selected' => 
'##severity_id##')
+                                                               )
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'category_id',
+                                                               'descr' => 
lang('category'),
+                                                               'type' => 
'select',
+                                                               'nullable' => 
false,
+                                                               'filter' => 
true,
+                                                               'sortable' => 
true,
+                                                               'role' => 
'parent',
+                                                               'values_def' => 
array
+                                                               (
+                                                                       
'valueset' => false,
+                                                                       
'method' => 'property.bogeneric.get_list',
+                                                                       
'get_single_value' => 'property.sogeneric.get_name',
+                                                                       
'method_input' => array('role' => 'parent', 'type' => 
'location_exception_category', 'selected' => '##category_id##')
+                                                               )
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'category_text_id',
+                                                               'descr' => 
lang('category content'),
+                                                               'type' => 
'select',
+                                                               'nullable' => 
true,
+                                                               'filter' => 
false,
+                                                               'sortable' => 
true,
+                                                               'js_file'       
=> 'location_exception_category_text.edit.js',
+                                                               'values_def' => 
array
+                                                               (
+                                                                       
'valueset' => false,
+                                                                       
'method' => 'property.bogeneric.get_list',
+                                                                       
'get_single_value' => 'property.sogeneric.get_name',
+                                                                       
'method_input' => array(
+                                                                               
'type' => 'location_exception_category_text',
+                                                                               
'selected' => '##category_text_id##',
+                                                                               
'mapping' => array('name' => 'content'),
+                                                                               
'filter'        => array('category_id' => '##category_id##'),
+                                                                               
)
+                                                               )
+                                                       ),
+                                                       array
+                                                               (
+                                                               'name' => 
'alert_vendor',
+                                                               'descr' => 
lang('alert vendor'),
+                                                               'type' => 
'checkbox'
+                                                       ),
+                                               ),
+                                               'edit_msg' => lang('edit'),
+                                               'add_msg' => lang('add'),
+                                               'name' => lang('severity 
category text'),
+                                               'acl_app' => 'property',
+                                               'acl_location' => '.location',
+                                               'menu_selection' => 
'admin::property::location::location_exception::category::category_text',
+                                               'default' => array
+                                               (
+                                                       'user_id' => 
array('add' => '$this->account'),
+                                                       'entry_date' => 
array('add' => 'time()'),
+                                                       'modified_date' => 
array('add' => 'time()', 'edit' => 'time()'),
+                                               ),
+                                       );
+                                       break;
+
 // START CONTROLLER TABLES
                                case 'controller_check_item_status':
                                        $info = array

Modified: branches/Version-2_0-branch/property/inc/class.sogeneric_.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sogeneric_.inc.php   
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.sogeneric_.inc.php   
2017-08-31 11:37:22 UTC (rev 17019)
@@ -68,6 +68,7 @@
                        $custom_filter = isset($data['custom_filter']) && 
$data['custom_filter'] ? $data['custom_filter'] : array();
                        $filter = isset($data['filter']) && $data['filter'] ? 
$data['filter'] : array();
                        $results = isset($data['results']) ? 
(int)$data['results'] : 0;
+                       $dry_run = isset($data['dry_run']) ? $data['dry_run'] : 
'';
 
                        $values = array();
                        if (!isset($this->location_info['table']) || !$table = 
$this->location_info['table'])
@@ -101,6 +102,25 @@
                                        {
                                                $_filter_array[] = 
"{$field['name']} {$this->_like} '%,{$filter[$field['name']]},%'";
                                        }
+                                       else if 
(!empty($filter[$field['name']]) && 
(isset($field['values_def']['method_input']['role']) && 
$field['values_def']['method_input']['role'] == 'parent'))
+                                       {
+
+                                               $field_object = clone($this);
+                                               
$field_object->get_location_info($field['values_def']['method_input']['type'], 
0);
+                                               $this->table = 
$field_object->location_info['table'];
+                                               $children = 
$this->get_children2(array(), $filter[$field['name']], 0, true );
+                                                       
+                                               $_children = 
array($filter[$field['name']]);
+                                               if($children)
+                                               {
+                                                       foreach ($children as 
$_child)
+                                                       {
+                                                               $_children[] = 
$_child['id'];
+                                                       }
+                                               }
+                                               $_filter_array[] = 
"{$field['name']} IN (" . implode(',', $_children ) . ')';
+
+                                       }
                                        else if (isset($filter[$field['name']]) 
&& $filter[$field['name']])
                                        {
                                                $_filter_array[] = 
"{$field['name']} = '{$filter[$field['name']]}'";
@@ -214,6 +234,11 @@
 
                        $this->uicols = $uicols;
 
+                       if($dry_run)
+                       {
+                               return array();
+                       }
+
                        if ($order)
                        {
                                $ordermethod = " ORDER BY {$table}.{$order} 
{$sort}";
@@ -267,7 +292,7 @@
 
                                foreach ($this->location_info['fields'] as 
$field)
                                {
-                                       if ($field['type'] == 'varchar')
+                                       if ($field['type'] == 'varchar' || 
$field['type'] == 'text' || $field['type'] == 'location')
                                        {
                                                $querymethod .= " OR 
{$table}.{$field['name']} $this->_like '%$query%'";
                                        }
@@ -353,12 +378,22 @@
 
                public function get_name( $data )
                {
-                       if (isset($data['type']) && $data['type'] && ! 
$this->location_info)
+                       $mapping = array();
+                       if (isset($data['mapping']) && $data['mapping'])
                        {
+                               $mapping = $data['mapping'];
+                       }
+                       else
+                       {
+                               $mapping = array('name' => 'name');
+                       }
+
+                       if (isset($data['type']) && $data['type'])
+                       {
                                $this->get_location_info($data['type']);
                        }
                        $values = $this->read_single($data);
-                       return isset($values['name']) ? $values['name'] : 
$values['descr'];
+                       return isset($values[$mapping['name']]) ? 
$values[$mapping['name']] : $values['descr'];
                }
 
                function read_single( $data, $values = array() )
@@ -472,12 +507,23 @@
 
                        $return_fields = isset($data['fields']) && 
$data['fields'] && is_array($data['fields']) ? $data['fields'] : array();
 
+
+                       $mapping = array();
+                       if (isset($data['mapping']) && $data['mapping'])
+                       {
+                               $mapping = $data['mapping'];
+                       }
+                       else
+                       {
+                               $mapping = array('name' => 'name');
+                       }
+
                        $i = 0;
                        while ($this->_db->next_record())
                        {
                                $_extra = $this->_db->f($id_in_name, true);
                                $id = $this->_db->f('id');
-                               if (!$name = $this->_db->f('name', true))
+                               if (!$name = $this->_db->f($mapping['name'], 
true))
                                {
                                        $name = $this->_db->f('descr', true);
                                }
@@ -1077,7 +1123,7 @@
                        {
                                return array();
                        }
-                       $this->table = $table;
+       //              $this->table = $table;
 
                        if (isset($this->location_info['mapping']) && 
$this->location_info['mapping'])
                        {

Modified: branches/Version-2_0-branch/property/inc/class.solocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.solocation.inc.php   
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.solocation.inc.php   
2017-08-31 11:37:22 UTC (rev 17019)
@@ -2189,7 +2189,7 @@
 
                        $sql = "SELECT fm_district.delivery_address FROM 
fm_location1 "
                                . " {$this->join} fm_part_of_town ON 
(fm_location1.part_of_town_id = fm_part_of_town.id)"
-                               . " {$this->join} fm_district ON 
(fm_part_of_town.district_id = fm_district.id)"                        
+                               . " {$this->join} fm_district ON 
(fm_part_of_town.district_id = fm_district.id)"
                                . " WHERE loc1 = '$loc1'";
                        $this->db->query($sql, __LINE__, __FILE__);
                        $this->db->next_record();
@@ -2198,4 +2198,55 @@
                        return $delivery_address;
 
                }
+
+               function get_location_exception($location_code = '', 
$alert_vendor = false)
+               {
+
+                       if(!$location_code)
+                       {
+                               return array();
+                       }
+
+                       $location_arr = explode('-', $location_code);
+                       $exceptions = array();
+                       $now = time();
+                       $_location_arr = array();
+                       foreach ($location_arr as $loc)
+                       {
+                               $_location_arr[] = 
$this->db->db_addslashes($loc);
+
+                               $_location_code = implode('-', $_location_arr);
+
+                               $sql = "SELECT DISTINCT 
fm_location_exception_severity.name AS severity,"
+                                       . " fm_location_exception_category.name 
AS category,"
+                                       . " content AS category_text, descr as 
location_descr, alert_vendor"
+                                       . " FROM fm_location_exception"
+                                       . " {$this->join} 
fm_location_exception_severity ON fm_location_exception.severity_id = 
fm_location_exception_severity.id"
+                                       . " {$this->join} 
fm_location_exception_category ON fm_location_exception.category_id = 
fm_location_exception_category.id"
+                                       . " {$this->left_join} 
fm_location_exception_category_text ON fm_location_exception.category_text_id = 
fm_location_exception_category_text.id"
+                                       . " WHERE location_code = 
'{$_location_code}'"
+                                       . " AND start_date < $now AND (end_date 
IS NULL  OR end_date = 0 OR end_date > $now)";
+
+
+                               if($alert_vendor)
+                               {
+                                       $sql .= ' AND alert_vendor = 1';
+                               }
+
+                               $this->db->query($sql, __LINE__, __FILE__);
+
+                               while($this->db->next_record())
+                               {
+                                       $exceptions[] = array(
+                                               'severity'                      
=> $this->db->f('severity', true),
+                                               'category'                      
=> $this->db->f('category', true),
+                                               'category_text'         => 
$this->db->f('category_text', true),
+                                               'location_descr'        => 
$this->db->f('location_descr', true),
+                                               'alert_vendor'          => 
$this->db->f('alert_vendor'),
+                                       );
+                               }
+                       }
+
+                       return $exceptions;
+               }
        }
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sotts.inc.php        
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.sotts.inc.php        
2017-08-31 11:37:22 UTC (rev 17019)
@@ -518,8 +518,9 @@
 
                                if (ctype_digit($query))
                                {
-                                       $querymethod .= " OR 
fm_tts_tickets.order_id =" . (int)$query
-                                               . " OR fm_tts_tickets.id =" . 
(int)$query . ')';
+                                       $querymethod .= " OR 
cast(fm_tts_tickets.order_id as text) {$this->like} '$query%'";
+                       //              $querymethod .= " OR 
fm_tts_tickets.order_id =" . (int)$query;
+                                       $querymethod .= " OR fm_tts_tickets.id 
=" . (int)$query . ')';
                                }
                                else
                                {

Modified: branches/Version-2_0-branch/property/inc/class.uigeneric.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uigeneric.inc.php    
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.uigeneric.inc.php    
2017-08-31 11:37:22 UTC (rev 17019)
@@ -57,7 +57,8 @@
                        'download' => true,
                        'columns' => true,
                        'attrib_history' => true,
-                       'edit_field' => true
+                       'edit_field' => true,
+                       'get_list'      => true
                );
 
                function __construct()
@@ -99,7 +100,26 @@
                                
$GLOBALS['phpgw_info']['flags']['menu_selection'] = str_replace('property', 
$appname, $GLOBALS['phpgw_info']['flags']['menu_selection']);
                                $this->appname = $appname;
                        }
+
+                       $_menu_selection = phpgw::get_var('menu_selection');
+                       //Override
+                       if($_menu_selection)
+                       {
+                               
$GLOBALS['phpgw_info']['flags']['menu_selection'] = $_menu_selection;
+                       }
                }
+
+               function get_list( )
+               {
+                       $params = array(
+                               'type'          => phpgw::get_var('type'),
+                               'selected'      =>  phpgw::get_var('selected'),
+                               'mapping'       =>  phpgw::get_var('mapping'),
+                               'filter'        =>  phpgw::get_var('filter'),
+                       );
+
+                       return $this->bo->get_list($params);
+               }
                /*
                 * Overrides with incoming data from POST
                 */
@@ -124,6 +144,9 @@
                                        case 'html':
                                                $value_type = 'html';
                                                break;
+                                       case 'date':
+                                               $value_type = 'date';
+                                               break;
                                        default:
                                                $value_type = 'string';
                                                break;
@@ -241,6 +264,7 @@
                                        }
                                        else if 
(isset($field['values_def']['method']))
                                        {
+                                               $method_input = array();
                                                foreach 
($field['values_def']['method_input'] as $_argument => $_argument_value)
                                                {
                                                        if (preg_match('/^##/', 
$_argument_value))
@@ -405,7 +429,7 @@
                                array_unshift($data['form']['toolbar']['item'], 
$filter);
                        }
 
-                       $this->bo->read();
+                       $this->bo->read(array('dry_run' => true));
                        $uicols = $this->bo->uicols;
 
                        $count_uicols_name = count($uicols['name']);
@@ -600,19 +624,22 @@
                        {
                                foreach ($this->location_info['fields'] as 
$field)
                                {
-                               switch ($field['type'])
-                               {
-                                       case 'integer':
-                                       case 'int':
-                                               $value_type = 'int';
-                                               break;
-                                       case 'html':
-                                               $value_type = 'html';
-                                               break;
-                                       default:
-                                               $value_type = 'string';
-                                               break;
-                               }
+                                       switch ($field['type'])
+                                       {
+                                               case 'integer':
+                                               case 'int':
+                                                       $value_type = 'int';
+                                                       break;
+                                               case 'html':
+                                                       $value_type = 'html';
+                                                       break;
+                                               case 'date':
+                                                       $value_type = 'date';
+                                                       break;
+                                               default:
+                                                       $value_type = 'string';
+                                                       break;
+                                       }
                                        $values[$field['name']] = 
phpgw::clean_value($_POST['values'][$field['name']],$value_type);
                                }
 
@@ -687,6 +714,18 @@
                                {
                                        self::rich_text_editor($field['name']);
                                }
+                               else if($field['type'] == 'date')
+                               {
+                                       
$GLOBALS['phpgw']->jqcal->add_listener($field['name']);
+                                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                                       $field['value'] = 
$GLOBALS['phpgw']->common->show_date($field['value'], $dateformat);
+                               }
+
+                               if(!empty($field['js_file']))
+                               {
+                                       self::add_javascript($this->appname, 
'portico', $field['js_file']);
+                               }
+
                                if (isset($field['values_def']))
                                {
                                        if ($field['values_def']['valueset'] && 
is_array($field['values_def']['valueset']))
@@ -699,7 +738,7 @@
                                        }
                                        else if 
(isset($field['values_def']['method']))
                                        {
-
+                                               $method_input = array();
                                                foreach 
($field['values_def']['method_input'] as $_argument => $_argument_value)
                                                {
                                                        if (preg_match('/^##/', 
$_argument_value))
@@ -707,6 +746,20 @@
                                                                
$_argument_value_name = trim($_argument_value, '#');
                                                                
$_argument_value = $values[$_argument_value_name];
                                                        }
+
+                                                       if($_argument == 
'filter' && is_array($_argument_value))
+                                                       {
+                                                               foreach 
($_argument_value as $key => &$value)
+                                                               {
+                                                                       if 
(preg_match('/^##/', $value))
+                                                                       {
+                                                                               
$_argument_value_name = trim($value, '#');
+                                                                               
$value = $values[$_argument_value_name] ? $values[$_argument_value_name] : -1;
+                                                                       }
+                                                               }
+
+                                                       }
+
                                                        if 
(preg_match('/^\$this->/', $_argument_value))
                                                        {
                                                                
$_argument_value_name = ltrim($_argument_value, '$this->');

Modified: branches/Version-2_0-branch/property/inc/class.uilocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uilocation.inc.php   
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.uilocation.inc.php   
2017-08-31 11:37:22 UTC (rev 17019)
@@ -69,7 +69,8 @@
                        'columns' => true,
                        'update_location' => true,
                        'responsiblility_role' => true,
-                       'get_delivery_address'  => true
+                       'get_delivery_address'  => true,
+                       'get_location_exception'=> true,
                );
 
                function __construct()
@@ -1009,7 +1010,7 @@
 
                                try
                                {
-                                       parent.on_loc1_updated();
+                                       
parent.on_location_updated(aData["location_code"]);
                                }
                                catch(err)
                                {}
@@ -2911,4 +2912,16 @@
                        );
 
                }
+
+               function get_location_exception( )
+               {
+                       $location_code = phpgw::get_var('location_code', 
'string');
+
+                       $location_exception = 
$this->bo->get_location_exception($location_code);
+
+                       return array(
+                               'location_exception' => $location_exception
+                       );
+
+               }
        }
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php        
2017-08-31 11:37:22 UTC (rev 17019)
@@ -3428,8 +3428,27 @@
                        $pdf->ezText($contact_phone, 14);
                        $pdf->ezSetDy(-20);
                        $pdf->ezText("Av hensyn til våre ansatte og leietakere 
ber vi om at kontakt på bygget blir kontaktet minst 1 dag i forkant av 
oppdrag.", 14);
+
+                       $location_exceptions = 
createObject('property.solocation')->get_location_exception($ticket['location_code'],
 $alert_vendor = true);
+
+                       if($location_exceptions)
+                       {
+                               $pdf->ezSetDy(-20);
+                               $pdf->selectFont(PHPGW_API_INC . 
'/pdf/fonts/Helvetica-Bold.afm');
+                               $pdf->ezText(lang('important information'), 14);
+                               $pdf->selectFont(PHPGW_API_INC . 
'/pdf/fonts/Helvetica.afm');
+                       }
+
+                       foreach ($location_exceptions as $location_exception)
+                       {
+                               
$pdf->ezText($location_exception['category_text'], 14);
+
+                               if($location_exception['location_descr'])
+                               {
+                                       
$pdf->ezText($location_exception['location_descr'], 14);
+                               }
+                       }
                        $pdf->ezSetDy(-20);
-
                        $pdf->selectFont(PHPGW_API_INC . 
'/pdf/fonts/Helvetica-Bold.afm');
                        $pdf->ezText("Faktura må merkes med ordrenummer: 
{$ticket['order_id']} og ressursnr.:{$ressursnr}", 14);
                        $pdf->selectFont(PHPGW_API_INC . 
'/pdf/fonts/Helvetica.afm');
@@ -3626,6 +3645,23 @@
                                '</b>'
                                        ), $order_email_template));
 
+                       $location_exceptions = 
createObject('property.solocation')->get_location_exception($ticket['location_code'],
 $alert_vendor = true);
+
+                       if($location_exceptions)
+                       {
+                               $body .= "<br/><br/><b>" . lang('important 
information') . '</b>';
+                       }
+                       foreach ($location_exceptions as $location_exception)
+                       {
+                               $body .= "<br/>" . 
$location_exception['category_text'] . '<br/>';
+
+                               if($location_exception['location_descr'])
+                               {
+                                       $body .= 
$location_exception['location_descr'] . '<br/>';
+                               }
+                       }
+
+
                        $html = "<html><head><meta http-equiv=\"Content-Type\" 
content=\"text/html; charset=utf-8\"><title>{$subject}</title></head>";
 
                        $body .='</br>';

Modified: 
branches/Version-2_0-branch/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
===================================================================
--- 
branches/Version-2_0-branch/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
     2017-08-31 11:35:57 UTC (rev 17018)
+++ 
branches/Version-2_0-branch/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
     2017-08-31 11:37:22 UTC (rev 17019)
@@ -58,7 +58,7 @@
                         * prosjekt
                         * tjeneste
                         */
-//                     $fellesdata->update_customer_id();
+                       $fellesdata->update_customer_id();
                        $fellesdata->update_vendor();
        //              $fellesdata->update_agresso_prosjekt(); //for mange 
treff
        //              $fellesdata->update_art();                              
//for mange treff
@@ -401,7 +401,7 @@
                                        $sql = "UPDATE rental_party"
                                                . " SET customer_id = 
{$customer_id}"
                                                . " WHERE id = " . 
(int)$party['id'];
-                                       _debug_array($sql);
+               //                      _debug_array($sql);
                                        $GLOBALS['phpgw']->db->query($sql, 
__LINE__, __FILE__);
                                }
                        }

Copied: 
branches/Version-2_0-branch/property/js/portico/location_exception_category_text.edit.js
 (from rev 17018, 
trunk/property/js/portico/location_exception_category_text.edit.js)
===================================================================
--- 
branches/Version-2_0-branch/property/js/portico/location_exception_category_text.edit.js
                            (rev 0)
+++ 
branches/Version-2_0-branch/property/js/portico/location_exception_category_text.edit.js
    2017-08-31 11:37:22 UTC (rev 17019)
@@ -0,0 +1,41 @@
+$(document).ready(function ()
+{
+
+       $("#category_id").change(function ()
+       {
+               var category_id = $(this).val() || -1;
+               var oArgs = {menuaction: 'property.uigeneric.get_list', type: 
'location_exception_category_text'};
+               var requestUrl = phpGWLink('index.php', oArgs, true);
+
+               $("#category_text_id").find("option:not(:first)").remove();
+
+               $.ajax({
+                       type: 'POST',
+                       dataType: 'json',
+                       url: requestUrl,
+                       data: {
+                               type: 'location_exception_category_text',
+                               filter: {category_id: category_id},
+                               selected: $("#category_text_id").val(),
+                               mapping: {name: 'content'},
+                       },
+                       success: function (data)
+                       {
+                               var selected;
+                               if (data != null)
+                               {
+                                       $.each(data, function (i, d)
+                                       {
+                                               selected = '';
+                                               if (d.selected == 1)
+                                               {
+                                                       selected = 
'selected="selected"';
+                                               }
+                                               
$('#category_text_id').append('<option value="' + d.id + '"' + selected + '>' + 
d.name + '</option>');
+                                       });
+                               }
+                       }
+               });
+       });
+
+});

Modified: branches/Version-2_0-branch/property/js/portico/project.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/project.edit.js     
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/js/portico/project.edit.js     
2017-08-31 11:37:22 UTC (rev 17019)
@@ -397,7 +397,7 @@
 JqueryPortico.autocompleteHelper(strURL, 'b_account_name', 'b_account_id', 
'b_account_container');
 
 
-on_loc1_updated = function ()
+on_location_updated = function ()
 {
        if(     $("#delivery_address").val() )
        {

Modified: branches/Version-2_0-branch/property/js/portico/tts.add.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/tts.add.js  2017-08-31 
11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/js/portico/tts.add.js  2017-08-31 
11:37:22 UTC (rev 17019)
@@ -77,3 +77,38 @@
        errorMessageKey: ''
 });
 
+on_location_updated = function (location_code)
+{
+       location_code = location_code || $("#loc1").val();
+
+       var oArgs = {menuaction: 'property.uilocation.get_location_exception', 
location_code: location_code};
+       var requestUrl = phpGWLink('index.php', oArgs, true);
+
+       $.ajax({
+               type: 'POST',
+               dataType: 'json',
+               url: requestUrl,
+               success: function (data)
+               {
+                       $("#message").html('');
+
+                       if (data != null)
+                       {
+                               var htmlString = '';
+                               var exceptions = data.location_exception;
+                               $.each(exceptions, function (k, v)
+                               {
+                                       htmlString += "<div 
class=\"msg_good\">";
+                                       htmlString += v.severity + ": " + 
v.category_text;
+                                       if(v.location_descr)
+                                       {
+                                               htmlString += "<br/>" + 
v.location_descr;
+                                       }
+                                       htmlString += '</div>';
+
+                               });
+                               $("#message").html(htmlString);
+                       }
+               }
+       });
+};

Modified: branches/Version-2_0-branch/property/js/portico/tts.view.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/tts.view.js 2017-08-31 
11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/js/portico/tts.view.js 2017-08-31 
11:37:22 UTC (rev 17019)
@@ -69,7 +69,7 @@
 
 this.confirm_session = function (action)
 {
-       if (action === 'save' || action === 'apply'  || action === 'send_order')
+       if (action === 'save' || action === 'apply' || action === 'send_order')
        {
                conf = {
                        modules: 'date, security, file',
@@ -243,7 +243,7 @@
                {
                        refresh_files()
                }
-       });     
+       });
 };
 
 this.refresh_files = function ()
@@ -358,7 +358,7 @@
 
 var ecodimb_selection = "";
 
-$(window).on('load', function()
+$(window).on('load', function ()
 {
        ecodimb = $('#ecodimb').val();
        if (ecodimb)
@@ -490,7 +490,7 @@
                return;
        }
        //var width = 200;
-       var width =  $("#submitbox").width();
+       var width = $("#submitbox").width();
        $("#submitbox").css({
                position: 'absolute',
                right: '10px',
@@ -542,4 +542,45 @@
                        ;
                });
        }
+
+       on_location_updated = function (location_code)
+       {
+               location_code = location_code || $("#loc1").val();
+
+               var oArgs = {menuaction: 
'property.uilocation.get_location_exception', location_code: location_code};
+               var requestUrl = phpGWLink('index.php', oArgs, true);
+
+               $.ajax({
+                       type: 'POST',
+                       dataType: 'json',
+                       url: requestUrl,
+                       success: function (data)
+                       {
+                               $("#message").html('');
+
+                               if (data != null)
+                               {
+                                       var htmlString = '';
+                                       var exceptions = 
data.location_exception;
+                                       $.each(exceptions, function (k, v)
+                                       {
+                                               htmlString += "<div 
class=\"msg_good\">";
+                                               htmlString += v.severity + ": " 
+ v.category_text;
+                                               if (v.location_descr)
+                                               {
+                                                       htmlString += "<br/>" + 
v.location_descr;
+                                               }
+                                               htmlString += '</div>';
+
+                                       });
+                                       $("#message").html(htmlString);
+                               }
+                       }
+               });
+       };
+
+
+       on_location_updated(location_code);
+
 });
+

Modified: branches/Version-2_0-branch/property/js/portico/workorder.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/workorder.edit.js   
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/js/portico/workorder.edit.js   
2017-08-31 11:37:22 UTC (rev 17019)
@@ -660,7 +660,7 @@
        });
 }
 
-on_loc1_updated = function ()
+on_location_updated = function ()
 {
        if(     $("#delivery_address").val() )
        {

Modified: branches/Version-2_0-branch/property/setup/default_records.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/default_records.inc.php  
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/setup/default_records.inc.php  
2017-08-31 11:37:22 UTC (rev 17019)
@@ -90,6 +90,8 @@
 
        $GLOBALS['phpgw']->locations->add('.report', 'Generic report', 
'property', $allow_grant = true);
 
+       $GLOBALS['phpgw']->locations->add('.location.exception', 'location 
exception', 'property');
+
        $GLOBALS['phpgw_setup']->oProc->query("DELETE from phpgw_config WHERE 
config_app='property'");
        $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config 
(config_app, config_name, config_value) VALUES ('property','meter_table', 
'fm_entity_1_1')");
 

Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-08-31 
11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-08-31 
11:37:22 UTC (rev 17019)
@@ -2227,4 +2227,12 @@
 attribute groups       property        no      Attributtgrupper
 sms text       property        no      SMS-tekst
 character left property        no      Resterende tegn
-delivery address       property        no      Leveringsadresse
\ No newline at end of file
+delivery address       property        no      Leveringsadresse
+severity       property        no      Alvorlighetsgrad
+location exception     property        no      OBS varsel
+severity category      property        no      Kategori for alvorlighetsgrad
+severity category text property        no      Tekster for kategori for 
alvorlighetsgrad
+reference      property        no      Referanse
+alert vendor   property        no      Varsle leverandør
+important information  property        no      Viktig informasjon
+category content       property        no      Tekster for kategori
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/setup.inc.php    2017-08-31 
11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/setup/setup.inc.php    2017-08-31 
11:37:22 UTC (rev 17019)
@@ -11,7 +11,7 @@
         * @version $Id$
        */
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.714';
+       $setup_info['property']['version']              = '0.9.17.717';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';
@@ -92,6 +92,10 @@
                'fm_location_type',
                'fm_location_config',
                'fm_location_contact',
+               'fm_location_exception',
+               'fm_location_exception_severity',
+               'fm_location_exception_category',
+               'fm_location_exception_category_text',
                'fm_building_part',
                'fm_b_account',
                'fm_b_account_category',

Modified: branches/Version-2_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_current.inc.php   
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/setup/tables_current.inc.php   
2017-08-31 11:37:22 UTC (rev 17019)
@@ -2893,5 +2893,59 @@
                        'fk' => array('fm_view_dataset' => array('dataset_id' 
=> 'id')),
                        'ix' => array(),
                        'uc' => array()
+               ),
+               'fm_location_exception_severity' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'int', 'precision' => 
4, 'nullable' => False),
+                               'name' => array('type' => 'varchar', 
'precision' => 255, 'nullable' => False),
+                               ),
+                       'pk' => array('id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
+               'fm_location_exception_category' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'precision' => 
4, 'nullable' => False),
+                               'name' => array('type' => 'varchar', 
'precision' => 255, 'nullable' => False),
+                               'parent_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => true),
+                               ),
+                       'pk' => array('id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
+               'fm_location_exception_category_text' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'precision' => 
4, 'nullable' => False),
+                               'category_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => False),
+                               'content' => array('type' => 'text', 'nullable' 
=> True),
+                               ),
+                       'pk' => array('id'),
+                       'fk' => array('fm_location_exception_category' => 
array('category_id' => 'id')),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
+               'fm_location_exception' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'precision' => 
4, 'nullable' => False),
+                               'location_code' => array('type' => 'varchar', 
'precision' => 20, 'nullable' => False),
+                               'severity_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => False),
+                               'category_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => False),
+                               'category_text_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => true),
+                               'descr' => array('type' => 'text', 'nullable' 
=> True),
+                               'start_date' => array('type' => 'int', 
'precision' => 8, 'nullable' => False),
+                               'end_date' => array('type' => 'int', 
'precision' => 8, 'nullable' => true),
+                               'reference' => array('type' => 'text', 
'nullable' => True),
+                               'alert_vendor' => array('type' => 'int', 
'precision' => 2, 'nullable' => true),
+                               'user_id' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => False),
+                               'entry_date' => array('type' => 'int', 
'precision' => 4, 'nullable' => False),
+                               'modified_date' => array('type' => 'int', 
'precision' => 4, 'nullable' => False)
+                       ),
+                       'pk' => array('id'),
+                       'fk' => array('fm_location_exception_severity' => 
array('severity_id' => 'id'),
+                               'fm_location_exception_category' => 
array('category_id' => 'id')),
+                       'ix' => array(),
+                       'uc' => array()
                )
        );
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_update.inc.php    
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/setup/tables_update.inc.php    
2017-08-31 11:37:22 UTC (rev 17019)
@@ -9648,3 +9648,122 @@
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
+
+       /**
+       * Update property version from 0.9.17.714 to 0.9.17.715
+       *
+       */
+       $test[] = '0.9.17.714';
+
+       function property_upgrade0_9_17_714()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'fm_location_exception_severity',  array(
+                       'fd' => array(
+                               'id' => array('type' => 'int', 'precision' => 
4, 'nullable' => False),
+                               'name' => array('type' => 'varchar', 
'precision' => 255, 'nullable' => False),
+                               ),
+                       'pk' => array('id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ));
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+               'fm_location_exception_category',  array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'precision' => 
4, 'nullable' => False),
+                               'name' => array('type' => 'varchar', 
'precision' => 255, 'nullable' => False),
+                               'parent_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => true),
+                               ),
+                       'pk' => array('id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ));
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+               'fm_location_exception_category_text',  array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'precision' => 
4, 'nullable' => False),
+                               'category_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => False),
+                               'content' => array('type' => 'text', 'nullable' 
=> True),
+                               ),
+                       'pk' => array('id'),
+                       'fk' => array('fm_location_exception_category' => 
array('category_id' => 'id')),
+                       'ix' => array(),
+                       'uc' => array()
+               ));
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+               'fm_location_exception',  array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'precision' => 
4, 'nullable' => False),
+                               'location_code' => array('type' => 'varchar', 
'precision' => 20, 'nullable' => False),
+                               'severity_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => False),
+                               'category_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => False),
+                               'descr' => array('type' => 'text', 'nullable' 
=> True),
+                               'start_date' => array('type' => 'int', 
'precision' => 8, 'nullable' => False),
+                               'end_date' => array('type' => 'int', 
'precision' => 8, 'nullable' => true),
+                               'reference' => array('type' => 'text', 
'nullable' => True),
+                               'user_id' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => False),
+                               'entry_date' => array('type' => 'int', 
'precision' => 4, 'nullable' => False),
+                               'modified_date' => array('type' => 'int', 
'precision' => 4, 'nullable' => False)
+                       ),
+                       'pk' => array('id'),
+                       'fk' => array('fm_location_exception_severity' => 
array('severity_id' => 'id'),
+                               'fm_location_exception_category' => 
array('category_id' => 'id')),
+                       'ix' => array(),
+                       'uc' => array()
+               ));
+
+               $GLOBALS['phpgw']->locations->add('.location.exception', 
'location exception', 'property');
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.715';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+
+       /**
+       * Update property version from 0.9.17.715 to 0.9.17.716
+       *
+       */
+       $test[] = '0.9.17.715';
+
+       function property_upgrade0_9_17_715()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_location_exception', 
'alert_vendor', array(
+                       'type' => 'int', 'precision' => 2, 'nullable' => True));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.716';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+
+       /**
+       * Update property version from 0.9.17.716 to 0.9.17.717
+       *
+       */
+       $test[] = '0.9.17.716';
+
+       function property_upgrade0_9_17_716()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_location_exception', 
'category_text_id', array(
+                       'type' => 'int', 'precision' => 4, 'nullable' => true));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.717';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }

Modified: branches/Version-2_0-branch/property/templates/base/generic.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/generic.xsl     
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/templates/base/generic.xsl     
2017-08-31 11:37:22 UTC (rev 17019)
@@ -113,12 +113,12 @@
                                                                </label>
                                                                <xsl:choose>
                                                                        
<xsl:when test="type='text' or type='html'">
-                                                                               
<textarea cols="{//textareacols}" rows="{//textarearows}" name="values[{name}]" 
id="{name}">
+                                                                               
<textarea cols="{//textareacols}" rows="{//textarearows}" name="values[{name}]" 
id="{name}" class="pure-input-1-2" >
                                                                                
        <xsl:value-of select="value"/>
                                                                                
</textarea>
                                                                        
</xsl:when>
                                                                        
<xsl:when test="type='varchar'">
-                                                                               
<input type="text" name="values[{name}]" value="{value}" size="{size}">
+                                                                               
<input type="text" name="values[{name}]" value="{value}" size="{size}" 
class="pure-input-1-2" >
                                                                                
        <xsl:attribute name="title">
                                                                                
                <xsl:value-of select="$descr"/>
                                                                                
        </xsl:attribute>
@@ -131,8 +131,41 @@
                                                                                
        </xsl:choose>
                                                                                
</input>
                                                                        
</xsl:when>
+                                                                       
<xsl:when test="type='date'">
+                                                                               
<input type="text" id="{name}"  name="values[{name}]" value="{value}" size="12" 
maxlength="12" readonly="readonly">
+                                                                               
        <xsl:attribute name="title">
+                                                                               
                <xsl:value-of select="$descr"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="nullable!='1'">
+                                                                               
                        <xsl:attribute name="data-validation">
+                                                                               
                                <xsl:text>required</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                       
</xsl:when>
+
+                                                                       
<xsl:when test="type='location'">
+                                                                               
<input type="hidden" id="location_code" name="values[{name}]" value="{value}" />
+                                                                               
<input type="text"  id="location_name" name="location_name" value="{value}" 
class="pure-input-1-2" >
+                                                                               
        <xsl:attribute name="title">
+                                                                               
                <xsl:value-of select="$descr"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="nullable!='1'">
+                                                                               
                        <xsl:attribute name="data-validation">
+                                                                               
                                <xsl:text>required</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                               
<div id="location_container"/>
+                                                                       
</xsl:when>
+
+
                                                                        
<xsl:when test="type='integer' or type='int'">
-                                                                               
<input data-validation="number" type="text" name="values[{name}]" 
value="{value}" size="{size}">
+                                                                               
<input data-validation="number" type="text" id="{name}" name="values[{name}]" 
value="{value}" size="{size}">
                                                                                
        <xsl:attribute name="title">
                                                                                
                <xsl:value-of select="$descr"/>
                                                                                
        </xsl:attribute>
@@ -146,7 +179,7 @@
                                                                                
</input>
                                                                        
</xsl:when>
                                                                        
<xsl:when test="type='numeric'">
-                                                                               
<input data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="." type="text" name="values[{name}]" 
value="{value}" size="{size}">
+                                                                               
<input data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="." type="text" id="{name}" 
name="values[{name}]" value="{value}" size="{size}">
                                                                                
        <xsl:attribute name="title">
                                                                                
                <xsl:value-of select="$descr"/>
                                                                                
        </xsl:attribute>
@@ -162,7 +195,7 @@
                                                                        
<xsl:when test="type='checkbox'">
                                                                                
<xsl:choose>
                                                                                
        <xsl:when test="value = 1">
-                                                                               
                <input type="checkbox" name="values[{name}]" value="1" 
checked="checked">
+                                                                               
                <input type="checkbox" id="{name}" name="values[{name}]" 
value="1" checked="checked">
                                                                                
                        <xsl:attribute name="title">
                                                                                
                                <xsl:value-of select="$descr"/>
                                                                                
                        </xsl:attribute>
@@ -169,7 +202,7 @@
                                                                                
                </input>
                                                                                
        </xsl:when>
                                                                                
        <xsl:otherwise>
-                                                                               
                <input type="checkbox" name="values[{name}]" value="1">
+                                                                               
                <input type="checkbox" id="{name}" name="values[{name}]" 
value="1">
                                                                                
                        <xsl:attribute name="title">
                                                                                
                                <xsl:value-of select="$descr"/>
                                                                                
                        </xsl:attribute>
@@ -178,7 +211,7 @@
                                                                                
</xsl:choose>
                                                                        
</xsl:when>
                                                                        
<xsl:when test="type='select'">
-                                                                               
<select name="values[{name}]">
+                                                                               
<select id="{name}" name="values[{name}]" class="pure-input-1-2" >
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="nullable!='1'">
                                                                                
                        <xsl:attribute name="data-validation">
@@ -200,7 +233,7 @@
                                                                                
</select>
                                                                        
</xsl:when>
                                                                        
<xsl:when test="type='multiple_select'">
-                                                                               
<select name="values[{name}][]" multiple="multiple">
+                                                                               
<select id="{name}" name="values[{name}][]" multiple="multiple" 
class="pure-input-1-2" >
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="nullable!='1'">
                                                                                
                        <xsl:attribute name="data-validation">
@@ -219,7 +252,7 @@
                                                                                
</select>
                                                                        
</xsl:when>
                                                                        
<xsl:when test="type='link'">
-                                                                               
<input type="text" name="values[{name}]" value="{value}" size="30">
+                                                                               
<input type="text" name="values[{name}]" value="{value}" size="30" 
class="pure-input-1-2" >
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="disabled!=''">
                                                                                
                        <xsl:attribute name="disabled">
@@ -274,4 +307,10 @@
                <form name="cancel_form" id="cancel_form" 
action="{$cancel_url}" method="post">
                </form>
        </div>
+       <script type="text/javascript">
+               var oArgs = {menuaction: 'property.bolocation.get_locations'};
+               var strURL = phpGWLink('index.php', oArgs, true);
+               JqueryPortico.autocompleteHelper(strURL, 'location_name', 
'location_code', 'location_container');
+       </script>
+
 </xsl:template>

Modified: branches/Version-2_0-branch/property/templates/base/tts.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/tts.xsl 2017-08-31 
11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/property/templates/base/tts.xsl 2017-08-31 
11:37:22 UTC (rev 17019)
@@ -20,7 +20,6 @@
                var my_groups = <xsl:value-of select="my_groups"/>;
                var lang = <xsl:value-of select="php:function('js_lang', 
'Please select a person or a group to handle the ticket !')"/>;
        </script>
-
        <dl>
                <xsl:choose>
                        <xsl:when test="msgbox_data != ''">
@@ -36,6 +35,9 @@
        <form class="pure-form pure-form-aligned"  
ENCTYPE="multipart/form-data" id="form" name="form" method="post" 
action="{$form_action}">
                <div id="tab-content">
                        <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
+
+                       <div id="message" class='message'/>
+
                        <div id="add">
                                <fieldset>
                                        <xsl:for-each select="value_origin">
@@ -312,6 +314,7 @@
        <form class="pure-form pure-form-aligned" ENCTYPE="multipart/form-data" 
id="form" name="form" method="post" action="{$form_action}">
                <div id="tab-content">
                        <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
+                       <div id="message" class='message'/>
                        <div id="floating-box">
                                <div id="submitbox">
                                        <table width="200px">

Modified: branches/Version-2_0-branch/rental/inc/class.socontract.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.socontract.inc.php     
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/rental/inc/class.socontract.inc.php     
2017-08-31 11:37:22 UTC (rev 17019)
@@ -122,6 +122,9 @@
                                                $like_clauses[] = 
"party.last_name $this->like $like_pattern";
                                                $like_clauses[] = 
"party.company_name $this->like $like_pattern";
                                                break;
+                                       case "customer_id":
+                                               $like_clauses[] = 
"party.customer_id  = " . (int)$search_for;
+                                               break;
                                        case "composite":
                                                $like_clauses[] = 
"composite.name $this->like $like_pattern";
                                                break;
@@ -132,7 +135,6 @@
                                                $like_clauses[] = 
"r_u.location_code like '{$search_for}%'";
                                                break;
                                        case "all":
-
                                                $like_clauses[] = 
"contract.old_contract_id $this->like $like_pattern";
                                                $like_clauses[] = 
"contract.comment $this->like $like_pattern";
                                                $like_clauses[] = 
"party.first_name $this->like $like_pattern";
@@ -140,6 +142,7 @@
                                                $like_clauses[] = 
"party.company_name $this->like $like_pattern";
                                                $like_clauses[] = 
"composite.name $this->like $like_pattern";
                                                $like_clauses[] = 
"r_u.location_code $this->like $like_pattern";
+                                               $like_clauses[] = 
"party.customer_id  = " . (int)$search_for;
                                                break;
                                }
 

Modified: branches/Version-2_0-branch/rental/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.soinvoice.inc.php      
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/rental/inc/class.soinvoice.inc.php      
2017-08-31 11:37:22 UTC (rev 17019)
@@ -62,7 +62,24 @@
                        }
                        else
                        {
-                               $cols = 'rental_invoice.id, 
rental_invoice.contract_id, rental_invoice.billing_id, rental_invoice.party_id, 
timestamp_created, rental_invoice.timestamp_start, timestamp_end, 
rental_invoice.total_sum, total_area, header, rental_invoice.account_in, 
rental_invoice.account_out, rental_invoice.service_id, 
rental_invoice.responsibility_id, rental_invoice.project_id, 
rental_invoice.serial_number, rental_composite.name AS composite_name, 
party.identifier AS party_identifier, party.first_name AS party_first_name, 
party.last_name AS party_last_name, party.title AS party_title, 
party.company_name AS party_company_name, party.department AS party_department, 
party.address_1 AS party_address_1, party.address_2 AS party_address_2, 
party.postal_code AS party_postal_code, party.place AS party_place, party.phone 
AS party_phone, party.mobile_phone AS party_mobile_phone, party.fax AS 
party_fax, party.email AS party_email, party.url AS party_url, 
party.account_number AS party_account_number, party.reskontro AS 
party_reskontro, party.location_id AS party_location_id, party.is_inactive as 
party_in_active, contract.old_contract_id, rental_billing.title as 
billing_title, rental_billing_info.term_id, rental_billing_info.month, 
contract.reference, contract.customer_order_id';
+                               $cols = 'rental_invoice.id, 
rental_invoice.contract_id, rental_invoice.billing_id,'
+                                       . ' rental_invoice.party_id, 
timestamp_created, rental_invoice.timestamp_start,'
+                                       . ' timestamp_end, 
rental_invoice.total_sum, total_area, header,'
+                                       . ' rental_invoice.account_in, 
rental_invoice.account_out, rental_invoice.service_id,'
+                                       . ' rental_invoice.responsibility_id, 
rental_invoice.project_id,'
+                                       . ' rental_invoice.serial_number, 
rental_composite.name AS composite_name,'
+                                       . ' party.identifier AS 
party_identifier, party.first_name AS party_first_name,'
+                                       . ' party.last_name AS party_last_name, 
party.title AS party_title,'
+                                       . ' party.company_name AS 
party_company_name, party.department AS party_department,'
+                                       . ' party.address_1 AS party_address_1, 
party.address_2 AS party_address_2,'
+                                       . ' party.postal_code AS 
party_postal_code, party.place AS party_place,'
+                                       . ' party.phone AS party_phone, 
party.mobile_phone AS party_mobile_phone,'
+                                       . ' party.fax AS party_fax, party.email 
AS party_email, party.url AS party_url,'
+                                       . ' party.account_number AS 
party_account_number, party.reskontro AS party_reskontro,'
+                                       . ' party.location_id AS 
party_location_id, party.is_inactive as party_in_active, party.customer_id,'
+                                       . ' contract.old_contract_id, 
rental_billing.title as billing_title,'
+                                       . ' rental_billing_info.term_id, 
rental_billing_info.month, contract.reference,'
+                                       . ' contract.customer_order_id';
                                $dir = $ascending ? 'ASC' : 'DESC';
                                if ($sort_field == null || $sort_field == '') 
// Sort field not set
                                {
@@ -110,6 +127,7 @@
                                
$party->set_last_name($this->unmarshal($this->db->f('party_last_name'), 
'string'));
                                
$party->set_location_id($this->unmarshal($this->db->f('party_org_location_id'), 
'int'));
                                
$party->set_identifier($this->unmarshal($this->db->f('party_identifier'), 
'string'));
+                               
$party->set_customer_id($this->unmarshal($this->db->f('customer_id'), 'int'));
                                
$party->set_mobile_phone($this->unmarshal($this->db->f('party_mobile_phone'), 
'string'));
                                
$party->set_place($this->unmarshal($this->db->f('party_place'), 'string'));
                                
$party->set_postal_code($this->unmarshal($this->db->f('party_postal_code'), 
'string'));

Modified: branches/Version-2_0-branch/rental/inc/class.soparty.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.soparty.inc.php        
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/rental/inc/class.soparty.inc.php        
2017-08-31 11:37:22 UTC (rev 17019)
@@ -120,6 +120,9 @@
                                        case "result_unit_number":
                                                $like_clauses[] = 
"party.result_unit_number $this->like $like_pattern";
                                                break;
+                                       case "customer_id":
+                                               $like_clauses[] = 
"party.customer_id  = " . (int)$search_for;
+                                               break;
                                        case "all":
                                                $like_clauses[] = 
"party.first_name $this->like $like_pattern";
                                                $like_clauses[] = 
"party.last_name $this->like $like_pattern";
@@ -131,6 +134,7 @@
                                                $like_clauses[] = 
"party.identifier $this->like $like_pattern";
                                                $like_clauses[] = 
"party.comment $this->like $like_pattern";
                                                $like_clauses[] = 
"party.reskontro $this->like $like_pattern";
+                                               $like_clauses[] = 
"party.customer_id  = " . (int)$search_for;
                                                break;
                                }
 

Modified: branches/Version-2_0-branch/rental/inc/class.uicontract.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uicontract.inc.php     
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/rental/inc/class.uicontract.inc.php     
2017-08-31 11:37:22 UTC (rev 17019)
@@ -109,6 +109,7 @@
                                array('id' => 'all', 'name' => lang('all')),
                                array('id' => 'id', 'name' => 
lang('contract_id')),
                                array('id' => 'party_name', 'name' => 
lang('party_name')),
+                               array('id' => 'customer_id', 'name' => 
lang('customer id') . ' (Agresso)'),
                                array('id' => 'composite', 'name' => 
lang('composite_name')),
                                array('id' => 'composite_address', 'name' => 
lang('composite_address')),
                                array('id' => 'location_code', 'name' => 
lang('object_number'))

Modified: branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php        
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/rental/inc/class.uiparty.inc.php        
2017-08-31 11:37:22 UTC (rev 17019)
@@ -49,6 +49,7 @@
                                array('id' => 'name', 'name' => lang('name')),
                                array('id' => 'address', 'name' => 
lang('address')),
                                array('id' => 'identifier', 'name' => 
lang('identifier')),
+                               array('id' => 'customer_id', 'name' => 
lang('customer id') . ' (Agresso)'),
                                array('id' => 'reskontro', 'name' => 
lang('reskontro')),
                                array('id' => 'result_unit_number', 'name' => 
lang('result_unit_number')),
                        );
@@ -494,6 +495,13 @@
                                                        'hidden' => false
                                                ),
                                                array(
+                                                       'key' => 'customer_id',
+                                                       'label' => 
lang('customer id') . ' (Agresso)',
+                                                       'className' => '',
+                                                       'sortable' => true,
+                                                       'hidden' => false
+                                               ),
+                                               array(
                                                        'key' => 'name',
                                                        'label' => lang('name'),
                                                        'className' => '',

Modified: 
branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php     
2017-08-31 11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php     
2017-08-31 11:37:22 UTC (rev 17019)
@@ -295,7 +295,8 @@
                                                
$invoice->get_responsibility_id(), //ny
                                                $contract_type_label, //ny
                                                $contract_id, //ny
-                                               
$invoice->get_customer_order_id()
+                                               
$invoice->get_customer_order_id(),
+                                               $serialized_party['customer_id']
                                        );
                                        $price_item_counter++;
                                }
@@ -490,7 +491,7 @@
                 * 
                 */
                protected function get_order_excel_bk(
-               $start_date, $end_date, $billing_start_date, $billing_end_date, 
$header, $party_id, $party_name, $party_address, $party_full_name, $order_id, 
$bill_year, $bill_month, $account, $product_item, $responsibility, $service, 
$building, $project, $text, $client_ref, $counter, $account_in, 
$responsibility_id, $contract_type_label, $contract_id, $customer_order_id )
+               $start_date, $end_date, $billing_start_date, $billing_end_date, 
$header, $party_id, $party_name, $party_address, $party_full_name, $order_id, 
$bill_year, $bill_month, $account, $product_item, $responsibility, $service, 
$building, $project, $text, $client_ref, $counter, $account_in, 
$responsibility_id, $contract_type_label, $contract_id, $customer_order_id, 
$customer_id )
                {
 
                        //$order_id = $order_id + 39500000;
@@ -501,6 +502,7 @@
                        $order = array(
                                'contract_id' => $contract_id,
                                'account' => $account,
+                               'customer id' => $customer_id,
                                'client_ref' => $client_ref,
                                'customer order id' => $customer_order_id,
                                'header' => utf8_decode($header),
@@ -532,7 +534,7 @@
                }
 
                protected function get_order_excel_nlsh(
-               $start_date, $end_date, $billing_start_date, $billing_end_date, 
$header, $party_id, $party_name, $party_address, $party_full_name, $order_id, 
$bill_year, $bill_month, $account_out, $product_item, $responsibility, 
$service, $building, $project, $text, $client_ref, $counter, $account_in, 
$responsibility_id, $contract_type_label, $contract_id, $customer_order_id )
+               $start_date, $end_date, $billing_start_date, $billing_end_date, 
$header, $party_id, $party_name, $party_address, $party_full_name, $order_id, 
$bill_year, $bill_month, $account_out, $product_item, $responsibility, 
$service, $building, $project, $text, $client_ref, $counter, $account_in, 
$responsibility_id, $contract_type_label, $contract_id, $customer_order_id, 
$customer_id )
                {
                
                        $article_price = 
$this->prizebook[$product_item['article_code']];

Modified: branches/Version-2_0-branch/rental/templates/base/party.xsl
===================================================================
--- branches/Version-2_0-branch/rental/templates/base/party.xsl 2017-08-31 
11:35:57 UTC (rev 17018)
+++ branches/Version-2_0-branch/rental/templates/base/party.xsl 2017-08-31 
11:37:22 UTC (rev 17019)
@@ -374,6 +374,13 @@
                                                </div>
                                                <div class="pure-control-group">
                                                        <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'customer id')"/>
+                                                       </label>
+                                                       <xsl:value-of 
select="value_customer_id"/>
+                                               </div>
+
+                                               <div class="pure-control-group">
+                                                       <label>
                                                                <xsl:value-of 
select="php:function('lang', 'firstname')"/>
                                                        </label>
                                                        <xsl:value-of 
select="value_firstname"/>




reply via email to

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