fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17144] Merge 17133:17143 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [17144] Merge 17133:17143 from trunk
Date: Mon, 9 Oct 2017 14:27:53 -0400 (EDT)

Revision: 17144
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17144
Author:   sigurdne
Date:     2017-10-09 14:27:53 -0400 (Mon, 09 Oct 2017)
Log Message:
-----------
Merge 17133:17143 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/booking/inc/class.uiorganization.inc.php
    branches/Version-2_0-branch/bookingfrontend/inc/class.uiorganization.inc.php
    branches/Version-2_0-branch/bookingfrontend/templates/base/organization.xsl
    branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php
    branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/class.asyncservice.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/class.custom_fields.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/class.db_pdo.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php
    branches/Version-2_0-branch/phpgwapi/templates/base/attributes_form.xsl
    branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
    branches/Version-2_0-branch/phpgwapi/templates/portico/head.inc.php
    branches/Version-2_0-branch/preferences/inc/hook_settings.inc.php
    branches/Version-2_0-branch/preferences/setup/phpgw_no.lang
    branches/Version-2_0-branch/property/inc/class.sotts.inc.php
    branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php
    branches/Version-2_0-branch/property/inc/class.uilocation.inc.php
    branches/Version-2_0-branch/property/inc/class.uiwo_hour.inc.php
    branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-2_0-branch/property/inc/cron/class.cron_parent.inc.php
    
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
    branches/Version-2_0-branch/property/js/portico/workorder.edit.js
    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/attributes_form.xsl
    branches/Version-2_0-branch/property/templates/base/workorder.xsl

Added Paths:
-----------
    branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId2.php

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

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch 2017-10-09 18:27:53 UTC (rev 17144)

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,17005-17018,17020-17023,17025-17026,17028-17033,17035,17037,17039-17040,17042-17050,17052-17053,17055,17057-17058,17060,17062-17064,17066,17068-17074,17076-17088,17090,17092,17094,17096,17098,17100-17101,17103-17104,17106-17108,17110-17121,17123-17124,17126-17132
\ 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,17020-17023,17025-17026,17028-17033,17035,17037,17039-17040,17042-17050,17052-17053,17055,17057-17058,17060,17062-17064,17066,17068-17074,17076-17088,17090,17092,17094,17096,17098,17100-17101,17103-17104,17106-17108,17110-17121,17123-17124,17126-17132,17134-17143
\ No newline at end of property
Index: branches/Version-2_0-branch/booking
===================================================================
--- branches/Version-2_0-branch/booking 2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/booking 2017-10-09 18:27:53 UTC (rev 17144)

Property changes on: branches/Version-2_0-branch/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /branches/dev-syncromind-2/booking:14933-16846
 /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
-/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305,16307-16314,16393-16395,16490-16497,16514-16517,16534,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16616-16618,16730,16734-16739,16748-16750,16769-16774,16785-16788,16796-16802,16835-16836,16846-16847,16883,16885,16908-16909,16939-16942,16944,16946,16948,17020-17023,17028-17033,17039-17040,17076-17088,17126-17132
\ No newline at end of property
+/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305,16307-16314,16393-16395,16490-16497,16514-16517,16534,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16616-16618,16730,16734-16739,16748-16750,16769-16774,16785-16788,16796-16802,16835-16836,16846-16847,16883,16885,16908-16909,16939-16942,16944,16946,16948,17020-17023,17028-17033,17039-17040,17076-17088,17126-17132,17134-17143
\ No newline at end of property
Modified: branches/Version-2_0-branch/booking/inc/class.uiorganization.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uiorganization.inc.php        
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/booking/inc/class.uiorganization.inc.php        
2017-10-09 18:27:53 UTC (rev 17144)
@@ -321,6 +321,8 @@
                        $organization['organizations_link'] = 
self::link(array('menuaction' => $this->module . '.uiorganization.index'));
                        $organization['edit_link'] = 
self::link(array('menuaction' => $this->module . '.uiorganization.edit',
                                        'id' => $organization['id']));
+                       $organization['new_group_link'] = 
self::link(array('menuaction' => $this->module . '.uigroup.edit',
+                                       'organization_id' => 
$organization['id']));
                        $organization['cancel_link'] = 
self::link(array('menuaction' => $this->module . '.uiorganization.index'));
                        $organization['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
                        $this->install_customer_identifier_ui($organization);

Index: branches/Version-2_0-branch/bookingfrontend
===================================================================
--- branches/Version-2_0-branch/bookingfrontend 2017-10-06 17:09:08 UTC (rev 
17143)
+++ branches/Version-2_0-branch/bookingfrontend 2017-10-09 18:27:53 UTC (rev 
17144)

Property changes on: branches/Version-2_0-branch/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /branches/dev-syncromind-2/bookingfrontend:14933-16846
 /branches/stavangerkommune/bookingfrontend:9468-12740,12986
-/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630,15714-15764,15813-15814,15820-15849,15889-15900,15902-16046,16101-16130,16144-16212,16297-16305,16307-16314,16316-16318,16385,16387,16393-16395,16399-16402,16586-16588,16603-16608,16734-16739,16752-16755,16785-16788,16796-16802,16835-16836,16846-16847,16908-16909,16946,16948,16988-16999,17126-17132
\ No newline at end of property
+/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630,15714-15764,15813-15814,15820-15849,15889-15900,15902-16046,16101-16130,16144-16212,16297-16305,16307-16314,16316-16318,16385,16387,16393-16395,16399-16402,16586-16588,16603-16608,16734-16739,16752-16755,16785-16788,16796-16802,16835-16836,16846-16847,16908-16909,16946,16948,16988-16999,17126-17132,17134-17143
\ No newline at end of property
Modified: 
branches/Version-2_0-branch/bookingfrontend/inc/class.uiorganization.inc.php
===================================================================
--- 
branches/Version-2_0-branch/bookingfrontend/inc/class.uiorganization.inc.php    
    2017-10-06 17:09:08 UTC (rev 17143)
+++ 
branches/Version-2_0-branch/bookingfrontend/inc/class.uiorganization.inc.php    
    2017-10-09 18:27:53 UTC (rev 17144)
@@ -66,6 +66,8 @@
                        $bouser = CreateObject('bookingfrontend.bouser');
                        $organization['login_link'] = 'login.php' . 
$auth_forward;
                        $organization['logoff_link'] = 'logoff.php' . 
$auth_forward;
+                       $organization['new_group_link'] = 
self::link(array('menuaction' => $this->module . '.uigroup.edit',
+                                       'organization_id' => 
$organization['id']));
                        if ($bouser->is_organization_admin($organization['id']))
                                $organization['logged_on'] = true;
 

Copied: 
branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId2.php (from 
rev 17143, trunk/bookingfrontend/inc/custom/default/MinId2.php)
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId2.php   
                        (rev 0)
+++ branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId2.php   
2017-10-09 18:27:53 UTC (rev 17144)
@@ -0,0 +1,122 @@
+<?php
+       /**
+        * phpGroupWare
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2010 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package phpgroupware
+        * @subpackage communication
+        * @category core
+        * @version $Id: Altinn_Bergen_kommune.php 4887 2010-02-23 10:33:44Z 
sigurd $
+        */
+       /*
+         This program is free software: you can redistribute it and/or modify
+         it under the terms of the GNU General Public License as published by
+         the Free Software Foundation, either version 2 of the License, or
+         (at your option) any later version.
+
+         This program is distributed in the hope that it will be useful,
+         but WITHOUT ANY WARRANTY; without even the implied warranty of
+         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+         GNU General Public License for more details.
+
+         You should have received a copy of the GNU General Public License
+         along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+       /**
+        * Wrapper for custom methods
+        *
+        * @package phpgroupware
+        * @subpackage bookingfrontend
+        */
+
+       /**
+        * START WRAPPER
+        */
+       class bookingfrontend_external_user extends bookingfrontend_bouser
+       {
+
+               public function __construct()
+               {
+                       parent::__construct();
+               }
+
+               protected function get_user_org_id()
+               {
+                       $ipdp = sha1($_SERVER['HTTP_UID']);
+                       $bregorgs = $this->get_breg_orgs($ipdp);
+                       $myorgnr = array();
+                       if ($bregorgs == array())
+                       {
+                               $external_user = (object)'ciao';
+                               $external_user->login = '000000000';
+                       }
+                       else
+                       {
+                               foreach ($bregorgs as $org)
+                               {
+                                       $myorgnr[] = $org['orgnr'];
+                               }
+                               if (count($myorgnr) > 1)
+                               {
+                                       $external_user = (object)'ciao';
+                                       $external_user->login = $myorgnr[0];
+                                       $orgs = array();
+                                       foreach ($myorgnr as $org)
+                                       {
+                                               $orgs[] = array('orgnumber' => 
$org, 'orgname' => $this->get_orgname_from_db($org));
+                                       }
+                                       
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY, 
$orgs);
+                               }
+                               elseif (count($myorgnr) > 0)
+                               {
+                                       
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY, 
NULL);
+                                       $external_user = (object)'ciao';
+                                       $external_user->login = $myorgnr[0];
+                               }
+                       }
+
+
+                       if ($this->debug)
+                       {
+                               echo 'External user:<br>';
+                               _debug_array($external_user);
+                       }
+                       try
+                       {
+                               return 
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean($external_user->login);
+                       }
+                       catch (sfValidatorError $e)
+                       {
+                               if ($this->debug)
+                               {
+                                       echo $e->getMessage();
+                                       die();
+                               }
+                               return null;
+                       }
+               }
+
+               /**
+                * Henter organisasjonsnummer som personen har en rolle i
+                * @param type $fodselsnr
+                * @return array $results organisasjonsnr
+                */
+               private function get_breg_orgs( $fodselsnr )
+               {
+                       $results = array();
+
+                       if ($this->debug)
+                       {
+                               $results[] = array
+                               (
+                                       'orgnr' => 964965226
+                               );
+                       }
+
+                       return $results;
+               }
+       }
\ No newline at end of file

Modified: 
branches/Version-2_0-branch/bookingfrontend/templates/base/organization.xsl
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/templates/base/organization.xsl 
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/bookingfrontend/templates/base/organization.xsl 
2017-10-09 18:27:53 UTC (rev 17144)
@@ -94,6 +94,10 @@
                </h3>
                <div id="groups_container"/>
 
+               <a href="{organization/new_group_link}">
+                       <xsl:value-of select="php:function('lang', 'new 
group')" />
+               </a>
+
                <h3>
                        <xsl:value-of select="php:function('lang', 'Used 
buildings')" />
                </h3>

Modified: branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php        
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/helpdesk/inc/class.sotts.inc.php        
2017-10-09 18:27:53 UTC (rev 17144)
@@ -108,7 +108,8 @@
                {
                        $start                  = isset($data['start']) && 
$data['start'] ? $data['start']:0;
                        $status_id              = isset($data['status_id']) && 
$data['status_id'] ? $data['status_id']:'O'; //O='Open'
-                       $user_id                = isset($data['user_id']) && 
$data['user_id'] ? (int)$data['user_id']: 0;
+                       $user_id                = isset($data['user_id']) && 
$data['user_id'] ? $data['user_id']: 0;
+                       $reported_by    = isset($data['reported_by']) && 
$data['reported_by'] ? (int)$data['reported_by'] : 0;
                        $owner_id               = 
isset($data['owner_id'])?$data['owner_id']:'';
                        $query                  = 
isset($data['query'])?$data['query']:'';
                        $sort                   = isset($data['sort']) && 
$data['sort'] ? $data['sort']:'DESC';
@@ -296,15 +297,39 @@
                                $where = 'AND';
                        }
 
-                       if ($user_id > 0)
+                       if ($user_id)
                        {
-                               $filtermethod .= " {$where} 
(assignedto={$user_id}";
-                               $where = 'AND';
+                               if (is_array($user_id))
+                               {
+                                       foreach ($user_id as &$_user_id)
+                                       {
+                                               $_user_id = abs($_user_id);
+                                       }
+                                       $filtermethod .= " {$where} assignedto 
IN (" . implode(', ' ,$user_id) . ')';
+                                       $where = 'AND';
+                               }
+                               else if ($user_id > 0)
+                               {
+                                       $filtermethod .= " {$where} 
(assignedto={$user_id}";
+                                       $where = 'AND';
 
-                               $membership = 
$GLOBALS['phpgw']->accounts->membership($user_id);
-                               $filtermethod .= ' OR (assignedto IS NULL AND 
phpgw_helpdesk_tickets.group_id IN (' . implode(',',array_keys($membership)) . 
')))';
+                                       $membership = 
$GLOBALS['phpgw']->accounts->membership($user_id);
+                                       array_unshift($membership, array(-1));
+                                       $filtermethod .= ' OR (assignedto IS 
NULL AND phpgw_helpdesk_tickets.group_id IN (' . 
implode(',',array_keys($membership)) . ')))';
+                               }
+                               else if ($user_id < 0)
+                               {
+                                       $filtermethod .= " {$where} 
assignedto=" . (int)abs($user_id);
+                                       $where = 'AND';
+                               }
                        }
 
+                       if ($reported_by > 0)
+                       {
+                               $filtermethod .= " $where 
phpgw_helpdesk_tickets.user_id=" . (int)$reported_by;
+                               $where = 'AND';
+                       }
+
                        if ($owner_id > 0)
                        {
                                $filtermethod .= " $where 
phpgw_helpdesk_tickets.user_id=" . (int)$owner_id;

Modified: branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php        
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php        
2017-10-09 18:27:53 UTC (rev 17144)
@@ -738,8 +738,10 @@
                                        'name' => lang('my assigned tickets'),
                                        'selected'      => ((int)$this->user_id 
< 0  || (int)$filter_tts_assigned_to_me == 1) ? 1 : 0));
 
-                               array_unshift($values_combo_box[4], array('id' 
=> '', 'name' => lang('assigned to')));
-                               $combos[] = array('type' => 'filter',
+//                             array_unshift($values_combo_box[4], array('id' 
=> '', 'name' => lang('assigned to')));
+                               $combos[] = array(
+                                       'type' => 'filter',
+                                       'multiple'      => true,
                                        'name' => 'user_id',
                                        'extra' => '',
                                        'text' => lang('assigned to'),
@@ -819,6 +821,7 @@
                                        var api = oTable.api();
                                        api.ajax.reload();
                        }, {$refreshinterval} );
+//                     $("#user_id").material_select();
 JS;
 
                                $GLOBALS['phpgw']->js->add_code('', $js, true);
@@ -828,6 +831,7 @@
                        self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.jeditable.js');
                        self::add_javascript('phpgwapi', 'jquery', 
'editable/jquery.dataTables.editable.js');
                        self::add_javascript('helpdesk', 'portico', 
'tts.index.js');
+//                     self::add_javascript('phpgwapi', 'materialize', 
'js/materialize.min.js');
 
                        $start_date = urldecode($this->start_date);
                        $end_date = urldecode($this->end_date);

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.asyncservice.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.asyncservice.inc.php 
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.asyncservice.inc.php 
2017-10-09 18:27:53 UTC (rev 17144)
@@ -436,6 +436,7 @@
                                                                echo "--data: ";
                                                                
print_r($job['data']);
                                                                echo "\n";
+                                                               
$job['data']['cron'] = true;
                                                        }
                                                        
ExecMethod($job['method'],$job['data']);
 

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.custom_fields.inc.php        
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.custom_fields.inc.php        
2017-10-09 18:27:53 UTC (rev 17144)
@@ -489,6 +489,10 @@
                                                $attrib['value'] = 
$attrib['value'][0];
                                                break;
 
+                                       case 'I':
+                                               $attrib['value'] = 
(int)$attrib['value'];
+                                               break;
+
                                        case 'N':
                                                $attrib['value'] = 
str_replace(',', '.', $attrib['value']);
                                                break;

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.db_pdo.inc.php       
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.db_pdo.inc.php       
2017-10-09 18:27:53 UTC (rev 17144)
@@ -289,6 +289,7 @@
                                        break;
                                default:
                                        $type = $this->Type;
+                                       $port = $this->Port ? $this->Port : '';
                                        break;
                        }
 

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php      
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php      
2017-10-09 18:27:53 UTC (rev 17144)
@@ -380,7 +380,13 @@
                                        )),
                                ),
                                'lengthmenu' => array('_' => 
json_encode($lengthmenu)),
-                               'lengthmenu_allrows' => array('_' => 
json_encode(array(-1, lang('all'))))
+                               'lengthmenu_allrows' => array('_' => 
json_encode(array(-1, lang('all')))),
+                               'csv_download' => array('_' => 
json_encode(array(
+                                               'show_button' => 
!!$GLOBALS['phpgw_info']['user']['preferences']['common']['csv_download'],
+                                               'title'                 => 
lang('download visible data')
+                                               )
+                                       ))
+
                        );
 //                     _debug_array($data['jquery_phpgw_i18n']);die();
                }

Modified: 
branches/Version-2_0-branch/phpgwapi/templates/base/attributes_form.xsl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/base/attributes_form.xsl     
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/phpgwapi/templates/base/attributes_form.xsl     
2017-10-09 18:27:53 UTC (rev 17144)
@@ -675,7 +675,7 @@
                                                </xsl:choose>
                                        </xsl:when>
                                        <xsl:when test="datatype='I'">
-                                               <input data-validation="number" 
id="id_{name}" type="text" name="values_attribute[{id}][value]" value="{value}" 
size="30">
+                                               <input data-validation="number" 
data-validation-allowing="negative" id="id_{name}" type="text" 
name="values_attribute[{id}][value]" value="{value}" size="30">
                                                        <xsl:choose>
                                                                <xsl:when 
test="disabled!=''">
                                                                        
<xsl:attribute name="disabled">

Modified: 
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2017-10-09 18:27:53 UTC (rev 17144)
@@ -235,6 +235,11 @@
                                                                                
filter_selects['<xsl:value-of select="text"/>'] = '<xsl:value-of 
select="$name"/>';
                                                                        
</script>
                                                                        <select 
id="{$name}" name="{$name}" class="pure-u-24-24">
+                                                                               
<xsl:if test="multiple">
+                                                                               
        <xsl:attribute name="multiple">
+                                                                               
                <xsl:text>true</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</xsl:if>
                                                                                
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="phpgw:conditional(not(text), '', text)"/>
                                                                                
</xsl:attribute>
@@ -674,13 +679,16 @@
                                                });
                                        </xsl:when>
                                </xsl:choose>
- /*              button_def.push({
-                                       extend:    'csvHtml5',
-                                       titleAttr: "<xsl:value-of 
select="php:function('lang', 'download visible data')"/>",
-                                       fieldSeparator: ';',
-                                       bom:true
-                               });
-*/
+                               var csv_download = 
JqueryPortico.i18n.csv_download();
+                               if(csv_download.show_button == 1)
+                               {
+                                       button_def.push({
+                                         extend:    'csvHtml5',
+                                         titleAttr: csv_download.title,
+                                         fieldSeparator: ';',
+                                         bom:true
+                                 });
+                               }
                                <xsl:choose>
                                        <xsl:when test="download">
                                                button_def.push({
@@ -1071,7 +1079,7 @@
                                        var temp = {};
                                        temp[menuaction] = {}
                                        oControls.each(function() {
-                                               if ( $(this).attr('name') && 
$(this).val() != null)
+                                               if ( $(this).attr('name') && 
$(this).val() != null && $(this).val().constructor != Array)
                                                {
                                                        sValue[ 
$(this).attr('name') ] = $(this).val().replace('"', '"');
                                                        temp[ 
$(this).attr('name') ] = $(this).val().replace('"', '"');
@@ -1148,8 +1156,10 @@
 //                                     console.log(oControls);
                                        oControls.each(function()
                                        {
-//                                             if ( $(this).attr('name') )
-                                               if ( $(this).attr('name') && 
$(this).val() != null)
+                                               var test = $(this).val();
+                                               console.log(test);
+                                               console.log(test.constructor);
+                                               if ( $(this).attr('name') && 
test != null && test.constructor !== Array)
                                                {
                                                        value = 
$(this).val().replace('"', '"');
                                                        aoData[ 
$(this).attr('name') ] = value;
@@ -1300,11 +1310,26 @@
 
                <xsl:for-each select="//form/toolbar/item">
                        <xsl:if test="type = 'filter'">
-                               $('select#<xsl:value-of 
select="name"/>').change( function()
-                               {
-                               <xsl:value-of select="extra"/>
-                               filterData('<xsl:value-of select="name"/>', 
$(this).val());
-                               });
+                               <xsl:choose>
+                                       <xsl:when test="multiple">
+                                               $('select#<xsl:value-of 
select="name"/>').change( function()
+                                               {
+                                                       var search = [];
+                                                       
$.each($('select#<xsl:value-of select="name"/> option:selected'), function(){
+                                                                 
search.push($(this).val());
+                                                       });
+                                                       <xsl:value-of 
select="extra"/>
+                                                       
filterData('<xsl:value-of select="name"/>', search);
+                                               });
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               $('select#<xsl:value-of 
select="name"/>').change( function()
+                                               {
+                                               <xsl:value-of select="extra"/>
+                                               filterData('<xsl:value-of 
select="name"/>', $(this).val());
+                                               });
+                                       </xsl:otherwise>
+                               </xsl:choose>
                        </xsl:if>
                        <xsl:if test="type = 'date-picker'">
                                var previous_<xsl:value-of select="id"/>;

Modified: branches/Version-2_0-branch/phpgwapi/templates/portico/head.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/portico/head.inc.php 
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/phpgwapi/templates/portico/head.inc.php 
2017-10-09 18:27:53 UTC (rev 17144)
@@ -45,6 +45,7 @@
 
 
        $stylesheets = array();
+//     $stylesheets[] = "/phpgwapi/js/materialize/css/materialize.min.css";
        $stylesheets[] = "/phpgwapi/templates/pure/css/global.css";
 //     $stylesheets[] = "/phpgwapi/templates/pure/css/demo_mmenu.css";
        $stylesheets[] = "/phpgwapi/templates/pure/css/pure-min.css";

Modified: branches/Version-2_0-branch/preferences/inc/hook_settings.inc.php
===================================================================
--- branches/Version-2_0-branch/preferences/inc/hook_settings.inc.php   
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/preferences/inc/hook_settings.inc.php   
2017-10-09 18:27:53 UTC (rev 17144)
@@ -158,6 +158,9 @@
        create_select_box('Rich text (WYSIWYG) editor', 'rteditor', $rteditors,
                'Which editor would you like to use for editing html and other 
rich content?');
 
+       create_check_box('CSV download button','csv_download',
+               'Do you want av CSV download button for main tables?');
+
        create_check_box('Show helpmessages by default','show_help',
                'Should this help messages shown up always, when you enter the 
preferences or only on request.');
 

Modified: branches/Version-2_0-branch/preferences/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/preferences/setup/phpgw_no.lang 2017-10-06 
17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/preferences/setup/phpgw_no.lang 2017-10-09 
18:27:53 UTC (rev 17144)
@@ -185,4 +185,6 @@
 as in "." or ","       preferences     no      Velg "." eller ","
 number of planned controls on home page        preferences     no      Antall 
planlagte kontroller på hjemmeskjerm
 number of assigned controls on home page       preferences     no      Antall 
tildelte kontroller på hjemmeskjerm
-filter tickets on assigned to me       preferences     no      Filtrer 
meldinger på tildelt til meg.
\ No newline at end of file
+filter tickets on assigned to me       preferences     no      Filtrer 
meldinger på tildelt til meg.
+Do you want av CSV download button for main tables?    preferences     no      
Ønsker du en CSV nedlastingsknapp for hovedtabeller?
+CSV download button    preferences     no      CSV nedlastingsknapp
\ 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-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/inc/class.sotts.inc.php        
2017-10-09 18:27:53 UTC (rev 17144)
@@ -1782,7 +1782,6 @@
                                if(isset($ticket['file_attach']) && 
is_array($ticket['file_attach']))
                                {
                                        $file_attachments = array();
-                                       $validator = 
CreateObject('phpgwapi.EmailAddressValidator');
                                        foreach ($ticket['file_attach'] as 
$_temp)
                                        {
                                                $file_attachments[] = 
(int)$_temp;

Modified: branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php  
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php  
2017-10-09 18:27:53 UTC (rev 17144)
@@ -1013,6 +1013,9 @@
                                        'delivery_address' => 
$this->db->f('delivery_address', true),
                                        );
 
+                               $file_attachments = 
trim($this->db->f('file_attachments'), ',');
+                               $workorder['file_attachments'] = $workorder ? 
explode(',', $file_attachments) : array();
+
                                $sql = "SELECT periodization_id,"
                                        . " sum(fm_workorder_budget.budget) AS 
budget, sum(fm_workorder_budget.combined_cost) AS combined_cost,"
                                        . " 
sum(fm_workorder_budget.contract_sum) AS contract_sum"
@@ -1537,6 +1540,16 @@
                                $value_set['address'] = $address;
                        }
 
+                       if(isset($workorder['file_attach']) && 
is_array($workorder['file_attach']))
+                       {
+                               $file_attachments = array();
+                               foreach ($workorder['file_attach'] as $_temp)
+                               {
+                                       $file_attachments[] = (int)$_temp;
+                               }
+                               $value_set['file_attachments'] = implode(',', 
$file_attachments);
+                       }
+
                        $value_set = $this->db->validate_update($value_set);
 
                        $this->db->transaction_begin();

Modified: branches/Version-2_0-branch/property/inc/class.uilocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uilocation.inc.php   
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/inc/class.uilocation.inc.php   
2017-10-09 18:27:53 UTC (rev 17144)
@@ -753,7 +753,7 @@
                                                $this->receipt['error'][] = 
array('msg' => lang('Please enter value for attribute %1', 
$attribute['input_text']));
                                        }
 
-                                       if ($attribute['datatype'] == 'I' && 
isset($attribute['value']) && $attribute['value'] && 
!ctype_digit($attribute['value']))
+                                       if ($attribute['datatype'] == 'I' && 
isset($attribute['value']) && $attribute['value'] && 
!is_int((int)($attribute['value'])))
                                        {
                                                $this->receipt['error'][] = 
array('msg' => lang('Please enter integer for attribute %1', 
$attribute['input_text']));
                                        }

Modified: branches/Version-2_0-branch/property/inc/class.uiwo_hour.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiwo_hour.inc.php    
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/inc/class.uiwo_hour.inc.php    
2017-10-09 18:27:53 UTC (rev 17144)
@@ -3468,6 +3468,16 @@
 
                        $dir = 
"{$GLOBALS['phpgw_info']['server']['temp_dir']}/pdf_files";
                        $attachments = array();
+                       if (isset($workorder['file_attachments']) && 
is_array($workorder['file_attachments']))
+                       {
+                               $attachments = 
CreateObject('property.bofiles')->get_attachments($workorder['file_attachments']);
+                               $_attachment_log = array();
+                               foreach ($attachments as $_attachment)
+                               {
+                                       $_attachment_log[] = 
$_attachment['name'];
+                               }
+                               $attachment_log = ' ' . lang('attachments') . ' 
: ' . implode(', ', $_attachment_log);
+                       }
 
                        //save the file
                        if (!file_exists($dir))

Modified: branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php  
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php  
2017-10-09 18:27:53 UTC (rev 17144)
@@ -1819,8 +1819,9 @@
                                        'key' => 'delete_file',
                                        'label' => lang('Delete file'),
                                        'sortable' => false,
-                                       'resizeable' => true)
-                       );
+                                       'resizeable' => true,
+                                       'formatter' => 
'JqueryPortico.FormatterCenter'
+                       ));
 
                        $datatable_def[] = array
                                (
@@ -2493,6 +2494,79 @@
                                )
                        );
 
+                       $attach_file_def = array
+                               (
+                               array(
+                                       'key' => 'file_name',
+                                       'label' => lang('Filename'),
+                                       'sortable' => false,
+                                       'resizeable' => true
+                                       ),
+                               array(
+                                       'key' => 'attach_file',
+                                       'label' => lang('attach file'),
+                                       'sortable' => false,
+                                       'resizeable' => true,
+                                       'formatter' => 
'JqueryPortico.FormatterCenter')
+                       );
+                       $file_attachments = isset($values['file_attachments']) 
&& is_array($values['file_attachments']) ? $values['file_attachments'] : 
array();
+
+                       $content_attachments = array();
+                       $link_view_file = $GLOBALS['phpgw']->link('/index.php', 
$link_file_data);
+                       $lang_view_file = lang('click to view file');
+                       $lang_select_file = lang('Check to attach file');
+                       $lang_workorder = lang('workorder');
+                       foreach ($values['files'] as $_entry)
+                       {
+                               $_checked = '';
+                               if (in_array($_entry['file_id'], 
$file_attachments))
+                               {
+                                       $_checked = 'checked="checked"';
+                               }
+
+                               $content_attachments[] = array(
+                                       'file_name' => "<a 
href='{$link_view_file}&amp;file_id={$_entry['file_id']}' target='_blank' 
title='{$lang_view_file}'>{$lang_workorder}::${_entry['name']}</a>",
+                                       'attach_file' => "<input 
type='checkbox' $_checked  name='values[file_attach][]' 
value='{$_entry['file_id']}' title='{$lang_select_file}'>"
+                               );
+                       }
+                       unset($_entry);
+
+                       $project_link_file_data = array
+                               (
+                               'menuaction' => 'property.uiproject.view_file',
+                               'id' => $project['project_id']
+                       );
+                       $link_view_file = $GLOBALS['phpgw']->link('/index.php', 
$project_link_file_data);
+
+                       $files = $boproject->get_files($project['project_id']);
+                       $lang_project = lang('project');
+
+                       foreach ($files as $_entry)
+                       {
+
+                               $_checked = '';
+                               if (in_array($_entry['file_id'], 
$file_attachments))
+                               {
+                                       $_checked = 'checked="checked"';
+                               }
+                               $content_attachments[] = array(
+                                       'file_name' => "<a 
href='{$link_view_file}&amp;file_id={$_entry['file_id']}' target='_blank' 
title='{$lang_view_file}'>{$lang_project}::${_entry['name']}</a>",
+                                       'attach_file' => "<input 
type='checkbox' $_checked  name='values[file_attach][]' 
value='{$_entry['file_id']}' title='{$lang_select_file}'>"
+                               );
+                       }
+                       
+                       $datatable_def[] = array
+                               (
+                               'container' => 'datatable-container_8',
+                               'requestUrl' => "''",
+                               'ColumnDefs' => $attach_file_def,
+                               'data' => json_encode($content_attachments),
+                               'config' => array(
+                                       array('disableFilter' => true),
+                                       array('disablePagination' => true)
+                               )
+                       );
+
                        $delivery_address       = $values['delivery_address'] ? 
$values['delivery_address'] : $project['delivery_address'];
 
                        if(!$delivery_address && 
!empty($_location_data['loc1']))
@@ -3142,9 +3216,19 @@
                                'delete' => $data));
                }
 
-               public function get_vendor_contract($vendor_id = 0, $selected = 
'')
+               public function get_vendor_contract($vendor_id = 0, $selected = 
0)
                {
-                       return $this->bocommon->get_vendor_contract($vendor_id, 
$selected);
+                       $contract_list = 
$this->bocommon->get_vendor_contract($vendor_id, $selected);
+
+                       array_unshift($contract_list, array('id' => -1, 'name' 
=> lang('outside contract')));
+                       if($selected)
+                       {
+                               foreach ($contract_list as &$contract)
+                               {
+                                       $contract['selected'] = $selected == 
$contract['id'] ? 1 : 0;
+                               }
+                       }
+                       return $contract_list;
                }
 
                /**

Modified: 
branches/Version-2_0-branch/property/inc/cron/class.cron_parent.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/cron/class.cron_parent.inc.php     
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/inc/cron/class.cron_parent.inc.php     
2017-10-09 18:27:53 UTC (rev 17144)
@@ -51,6 +51,7 @@
 
                function pre_run( $data = array() )
                {
+                       $this->cron = !empty($data['cron']) ? true : false;
                        if (isset($data['enabled']) && $data['enabled'] == 1)
                        {
                                $confirm = true;
@@ -82,7 +83,7 @@
                                        $this->confirm($execute = false);
                                }
                        }
-                       else
+                       else if (!$this->cron)
                        {
                                $this->confirm($execute = false);
                        }

Modified: 
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
===================================================================
--- 
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    2017-10-06 17:09:08 UTC (rev 17143)
+++ 
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
    2017-10-09 18:27:53 UTC (rev 17144)
@@ -187,7 +187,7 @@
                                'dim1' => $_ticket['ecodimb'],                  
        // Ansvar
                                'dim2' => $_ticket['service_id'] ? 
$_ticket['service_id'] : 9, // Tjeneste liste 30 stk, default 9
                                'dim3' => $dim3,                                
                        // Objekt: eiendom + bygg: 6 siffer
-                               'dim4' => $_ticket['contract_id'],              
        // Kontrakt - frivillig / 9, 7 tegn - alfanumerisk
+                               'dim4' => $_ticket['contract_id'] == '-1' ? '' 
: $_ticket['contract_id'], // Kontrakt - frivillig / 9, 7 tegn - alfanumerisk
                                'dim5' => $_ticket['external_project_id'],      
// Prosjekt
                                'dim6' => $dim6,                                
                        // Aktivitet - frivillig: bygningsdel, 3 siffer + 
bokstavkode
                                'vendor_id' => $_ticket['vendor_id'],

Modified: 
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
===================================================================
--- 
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
  2017-10-06 17:09:08 UTC (rev 17143)
+++ 
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
  2017-10-09 18:27:53 UTC (rev 17144)
@@ -291,7 +291,7 @@
                                        'dim1' => $dim1, // Ansvar
                                        'dim2' => $tjeneste, // Tjeneste liste 
30 stk, default 9
                                        'dim3' => $dim3, // Objekt: eiendom + 
bygg: 6 siffer
-                                       'dim4' => $workorder['contract_id'], // 
Kontrakt - frivillig / 9, 7 tegn - alfanumerisk
+                                       'dim4' => $workorder['contract_id'] == 
'-1' ? '' : $workorder['contract_id'], // Kontrakt - frivillig / 9, 7 tegn - 
alfanumerisk
                                        'dim5' => 
$project['external_project_id'], // Prosjekt
                                        'dim6' => $dim6, // Aktivitet - 
frivillig: bygningsdel, 3 siffer + bokstavkode
                                        'vendor_id' => $workorder['vendor_id'],

Modified: branches/Version-2_0-branch/property/js/portico/workorder.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/workorder.edit.js   
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/js/portico/workorder.edit.js   
2017-10-09 18:27:53 UTC (rev 17144)
@@ -211,7 +211,10 @@
                                                return;
                                        }
 
-                                       htmlString = "<option value=''>" + 
data.length + " kontrakter funnet</option>"
+                                       
$("#vendor_contract_id").attr("data-validation", "required");
+
+                                       htmlString = "<option value=''>" + 
data.length + " kontrakter funnet</option>";
+                                       htmlString += "<option 
value='-1'>Utenfor rammeavtale</option>";
                                        var obj = data;
 
                                        $.each(obj, function (i)

Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-10-06 
17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-10-09 
18:27:53 UTC (rev 17144)
@@ -2240,4 +2240,5 @@
 please update <a href="%1">your email address here</a> property        no      
Venligst oppdatert din <a href="%1">epost-adresse her</a>
 clear contact  property        no      Fjern kontakperson
 deadline for start     property        no      Frist for oppstart
-deadline for execution property        no      Frist for ferdigstillelse
\ No newline at end of file
+deadline for execution property        no      Frist for ferdigstillelse
+outside contract       property        no      Utenfor rammeavtale
\ 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-10-06 
17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/setup/setup.inc.php    2017-10-09 
18:27:53 UTC (rev 17144)
@@ -11,7 +11,7 @@
         * @version $Id$
        */
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.722';
+       $setup_info['property']['version']              = '0.9.17.723';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: branches/Version-2_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_current.inc.php   
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/setup/tables_current.inc.php   
2017-10-09 18:27:53 UTC (rev 17144)
@@ -612,6 +612,7 @@
                                'order_received' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
                                'order_received_amount' => array('type' => 
'decimal', 'precision' => '20', 'scale' => '2', 'nullable' => True, 'default' 
=> '0.00'),
                                'delivery_address' => array('type' => 'text', 
'nullable' => True),
+                               'file_attachments' => array('type' => 
'varchar', 'precision' => 255, 'nullable' => True),
                        ),
                        'pk' => array('id'),
                        'fk' => array(),

Modified: branches/Version-2_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_update.inc.php    
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/setup/tables_update.inc.php    
2017-10-09 18:27:53 UTC (rev 17144)
@@ -9897,4 +9897,28 @@
                }
        }
 
-       
\ No newline at end of file
+       /**
+       * Update property version from 0.9.17.722 to 0.9.17.723
+       *
+       */
+       $test[] = '0.9.17.722';
+
+       function property_upgrade0_9_17_722()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder', 
'file_attachments', array(
+                       'type' => 'varchar',
+                       'precision' => 255,
+                       'nullable' => True
+                       )
+               );
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.723';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+
+

Modified: 
branches/Version-2_0-branch/property/templates/base/attributes_form.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/attributes_form.xsl     
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/templates/base/attributes_form.xsl     
2017-10-09 18:27:53 UTC (rev 17144)
@@ -663,7 +663,7 @@
                                                </xsl:choose>
                                        </xsl:when>
                                        <xsl:when test="datatype='I'">
-                                               <input data-validation="number" 
id="id_{name}" type="text" name="values_attribute[{id}][value]" value="{value}" 
size="30">
+                                               <input data-validation="number" 
data-validation-allowing="negative" id="id_{name}" type="text" 
name="values_attribute[{id}][value]" value="{value}" size="30">
                                                        <xsl:choose>
                                                                <xsl:when 
test="disabled!=''">
                                                                        
<xsl:attribute name="disabled">

Modified: branches/Version-2_0-branch/property/templates/base/workorder.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/workorder.xsl   
2017-10-06 17:09:08 UTC (rev 17143)
+++ branches/Version-2_0-branch/property/templates/base/workorder.xsl   
2017-10-09 18:27:53 UTC (rev 17144)
@@ -1273,6 +1273,25 @@
                                                                </div>
                                                        </div>
                                                        <xsl:call-template 
name="file_upload"/>
+                                                       <div 
class="pure-control-group">
+                                                               <label 
for="name">
+                                                                       
<xsl:value-of select="php:function('lang', 'attachments')"/>
+                                                               </label>
+                                                               <div 
class="pure-custom pure-input-1-2">
+                                                                       
<xsl:for-each select="datatable_def">
+                                                                               
<xsl:if test="container = 'datatable-container_8'">
+                                                                               
        <xsl:call-template name="table_setup">
+                                                                               
                <xsl:with-param name="container" select ='container'/>
+                                                                               
                <xsl:with-param name="requestUrl" select ='requestUrl' />
+                                                                               
                <xsl:with-param name="ColumnDefs" select ='ColumnDefs' />
+                                                                               
                <xsl:with-param name="tabletools" select ='tabletools' />
+                                                                               
                <xsl:with-param name="data" select ='data' />
+                                                                               
                <xsl:with-param name="config" select ='config' />
+                                                                               
        </xsl:call-template>
+                                                                               
</xsl:if>
+                                                                       
</xsl:for-each>
+                                                               </div>
+                                                       </div>
                                                </fieldset>
                                        </div>
                                        <div id="history">




reply via email to

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