fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16835] Syncromind: Merge 16788:16834 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [16835] Syncromind: Merge 16788:16834 from trunk
Date: Tue, 6 Jun 2017 05:03:29 -0400 (EDT)

Revision: 16835
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16835
Author:   sigurdne
Date:     2017-06-06 05:03:29 -0400 (Tue, 06 Jun 2017)
Log Message:
-----------
Syncromind: Merge 16788:16834 from trunk

Modified Paths:
--------------
    branches/dev-syncromind-2/admin/inc/class.boaccounts.inc.php
    branches/dev-syncromind-2/booking/inc/class.boactivity.inc.php
    branches/dev-syncromind-2/booking/inc/class.soactivity.inc.php
    branches/dev-syncromind-2/bookingfrontend/inc/class.bosearch.inc.php
    branches/dev-syncromind-2/bookingfrontend/inc/class.uisearch.inc.php
    branches/dev-syncromind-2/bookingfrontend/templates/base/search.xsl
    branches/dev-syncromind-2/controller/inc/class.uicase.inc.php
    branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
    branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
    branches/dev-syncromind-2/frontend/inc/class.borental.inc.php
    branches/dev-syncromind-2/frontend/inc/class.uicontract.inc.php
    branches/dev-syncromind-2/frontend/inc/class.uicontract_documents.inc.php
    branches/dev-syncromind-2/phpgwapi/inc/class.cache.inc.php
    branches/dev-syncromind-2/phpgwapi/setup/setup.inc.php
    branches/dev-syncromind-2/phpgwapi/setup/tables_update.inc.php
    branches/dev-syncromind-2/property/inc/class.boproject.inc.php
    branches/dev-syncromind-2/property/inc/class.boworkorder.inc.php
    branches/dev-syncromind-2/property/inc/class.soproject.inc.php
    branches/dev-syncromind-2/property/inc/class.soworkorder.inc.php
    branches/dev-syncromind-2/property/inc/class.uiproject.inc.php
    branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
    
branches/dev-syncromind-2/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
    branches/dev-syncromind-2/property/inc/hook_settings.inc.php
    branches/dev-syncromind-2/property/templates/base/workorder.xsl

Added Paths:
-----------
    
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/themes/alesund_kommune.css

Property Changed:
----------------
    branches/dev-syncromind-2/
    branches/dev-syncromind-2/booking/
    branches/dev-syncromind-2/bookingfrontend/

Index: branches/dev-syncromind-2
===================================================================
--- branches/dev-syncromind-2   2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2   2017-06-06 09:03:29 UTC (rev 16835)

Property changes on: branches/dev-syncromind-2
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /branches/dev-syncromind:13653
 /branches/stavangerkommune:12743-12875,12986
-/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770,15772-15775,15777-15795,15797-15798,15800-15812,15814-15838,15840,15842-15888,15890,15892-15997,15999-16097,16103-16128,16131-16187,16190-16299,16301-16393,16396-16586,16589-16737,16740-16786
\ No newline at end of property
+/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770,15772-15775,15777-15795,15797-15798,15800-15812,15814-15838,15840,15842-15888,15890,15892-15997,15999-16097,16103-16128,16131-16187,16190-16299,16301-16393,16396-16586,16589-16737,16740-16786,16789-16834
\ No newline at end of property
Modified: branches/dev-syncromind-2/admin/inc/class.boaccounts.inc.php
===================================================================
--- branches/dev-syncromind-2/admin/inc/class.boaccounts.inc.php        
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/admin/inc/class.boaccounts.inc.php        
2017-06-06 09:03:29 UTC (rev 16835)
@@ -226,7 +226,7 @@
        
                        if ( $values['id'] )
                        {
-                               $user = 
$GLOBALS['phpgw']->accounts->get($values['id']);
+                               $user = 
$GLOBALS['phpgw']->accounts->get($values['id'], $use_cache = false);
                        }
                        else
                        {

Index: branches/dev-syncromind-2/booking
===================================================================
--- branches/dev-syncromind-2/booking   2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/booking   2017-06-06 09:03:29 UTC (rev 16835)

Property changes on: branches/dev-syncromind-2/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
 /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
-/trunk/booking:14937-15027,15165-15215,15253-15304,15306-15337,15341-15398,15476-15607,15613-15652,15654-15732,15814-15838,15892-15997,15999-16097,16131-16187,16301-16393,16396-16586,16589-16737,16740-16786
\ No newline at end of property
+/trunk/booking:14937-15027,15165-15215,15253-15304,15306-15337,15341-15398,15476-15607,15613-15652,15654-15732,15814-15838,15892-15997,15999-16097,16131-16187,16301-16393,16396-16586,16589-16737,16740-16786,16789-16834
\ No newline at end of property
Modified: branches/dev-syncromind-2/booking/inc/class.boactivity.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.boactivity.inc.php      
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/booking/inc/class.boactivity.inc.php      
2017-06-06 09:03:29 UTC (rev 16835)
@@ -72,7 +72,7 @@
                        $values = $this->so->get_top_level();
                        if ($selected)
                        {
-                               foreach ($values as $entry)
+                               foreach ($values as &$entry)
                                {
                                        $entry['selected'] = $entry['id'] == 
$selected ? 1 : 0;
                                }

Modified: branches/dev-syncromind-2/booking/inc/class.soactivity.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.soactivity.inc.php      
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/booking/inc/class.soactivity.inc.php      
2017-06-06 09:03:29 UTC (rev 16835)
@@ -61,7 +61,7 @@
                public function get_top_level()
                {
 
-                       $sql = "SELECT name, id FROM bb_activity WHERE 
parent_id = 0 OR parent_id IS NULL";
+                       $sql = "SELECT name, id, active FROM bb_activity WHERE 
parent_id = 0 OR parent_id IS NULL";
 
                        $this->db->query($sql, __LINE__, __FILE__);
                        $values = array();
@@ -71,6 +71,7 @@
                                $values[] = array(
                                        'id' => $this->db->f('id'),
                                        'name' => $this->db->f('name', true),
+                                       'active' => $this->db->f('active'),
                                );
                        }
                        return $values;

Index: branches/dev-syncromind-2/bookingfrontend
===================================================================
--- branches/dev-syncromind-2/bookingfrontend   2017-06-06 07:55:25 UTC (rev 
16834)
+++ branches/dev-syncromind-2/bookingfrontend   2017-06-06 09:03:29 UTC (rev 
16835)

Property changes on: branches/dev-syncromind-2/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
 /branches/stavangerkommune/bookingfrontend:9468-12740,12986
-/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652,15814-15838,15892-15997,16131-16187,16190-16299,16301-16393,16396-16586,16589-16737,16740-16786
\ No newline at end of property
+/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652,15814-15838,15892-15997,16131-16187,16190-16299,16301-16393,16396-16586,16589-16737,16740-16786,16789-16834
\ No newline at end of property
Modified: branches/dev-syncromind-2/bookingfrontend/inc/class.bosearch.inc.php
===================================================================
--- branches/dev-syncromind-2/bookingfrontend/inc/class.bosearch.inc.php        
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/bookingfrontend/inc/class.bosearch.inc.php        
2017-06-06 09:03:29 UTC (rev 16835)
@@ -228,9 +228,9 @@
                                        $event['name'] = 
$event['building_name'] . ' / ' . $event['description'];
                                        $event['type'] = "Event";
                                        $date = date('Y-m-d', 
strtotime($event['from_']));
-                                       $event_res = 
$this->soresource->read(array('filters' => array('id' => 
$event['resources'][0])));
+               //                      $event_res = 
$this->soresource->read(array('filters' => array('id' => 
$event['resources'][0])));
                                        $event['link'] = 
$GLOBALS['phpgw']->link('/bookingfrontend/', array('menuaction' => 
'bookingfrontend.uibuilding.schedule',
-                                               'id' => 
$event_res['results'][0]['building_id'], 'date' => $date));
+                                               'id' => $event['building_id'], 
'date' => $date));
                                }
                        }
 

Modified: branches/dev-syncromind-2/bookingfrontend/inc/class.uisearch.inc.php
===================================================================
--- branches/dev-syncromind-2/bookingfrontend/inc/class.uisearch.inc.php        
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/bookingfrontend/inc/class.uisearch.inc.php        
2017-06-06 09:03:29 UTC (rev 16835)
@@ -67,6 +67,10 @@
                        $filter_tree = array();
                        foreach ($activities as $activity)
                        {
+                               if(!$activity['active'])
+                               {
+                                       continue;
+                               }
                                $top_levels[] = array(
                                        'id' => $activity['id'],
                                        'location' => 
"resource_{$activity['id']}",
@@ -185,7 +189,7 @@
 //                     _debug_array($activity_criteria);
 //                     _debug_array($criteria);
 //                     die();
-                       if ($searchterm || $building_id || $activity_criteria 
|| $filter_part_of_town || phpgw::get_var('filter_top_level', 'string') || 
phpgw::get_var('filter_search_type'))
+                       if ($searchterm || $building_id || $activity_criteria 
|| $filter_part_of_town || phpgw::get_var('filter_top_level', 'string') || 
(phpgw::get_var('filter_search_type') && $searchterm))
                        {
                                $data = array(
                                        'results' => 
$this->bo->search($searchterm, $building_id, $filter_part_of_town, 
$filter_top_level, $activity_criteria)

Modified: branches/dev-syncromind-2/bookingfrontend/templates/base/search.xsl
===================================================================
--- branches/dev-syncromind-2/bookingfrontend/templates/base/search.xsl 
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/bookingfrontend/templates/base/search.xsl 
2017-06-06 09:03:29 UTC (rev 16835)
@@ -174,7 +174,7 @@
                                                                <xsl:value-of 
select="php:function('lang', 'resource')" />
                                                        </label>
                                                </li>
-                                               <!--li>
+                                               <li>
                                                        <label>
                                                                <input 
type="checkbox" name="search_type[]" value="organization"/>
                                                                <xsl:value-of 
select="php:function('lang', 'organization')" />
@@ -185,7 +185,7 @@
                                                                <input 
type="checkbox" name="search_type[]" value="event"/>
                                                                <xsl:value-of 
select="php:function('lang', 'event')" />
                                                        </label>
-                                               </li-->
+                                               </li>
                                        </ul>
                                </div>
                                

Modified: branches/dev-syncromind-2/controller/inc/class.uicase.inc.php
===================================================================
--- branches/dev-syncromind-2/controller/inc/class.uicase.inc.php       
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/controller/inc/class.uicase.inc.php       
2017-06-06 09:03:29 UTC (rev 16835)
@@ -655,9 +655,7 @@
                        $location_id = 
$GLOBALS['phpgw']->locations->get_id("controller", ".checklist");
 
                        $ticket = array
-                               (
-                               'origin_id' => $location_id,
-                               'origin_item_id' => $check_list_id,
+                       (
                                'location_code' => $location_code,
                                'cat_id' => $message_cat_id,
                                'priority' => $priority, //valgfri (1-3)
@@ -669,14 +667,24 @@
                        $botts = CreateObject('property.botts', true);
                        $message_ticket_id = $botts->add_ticket($ticket);
                        $location_id_ticket = 
$GLOBALS['phpgw']->locations->get_id('property', '.ticket');
+                       $user_id = $GLOBALS['phpgw_info']['user']['id'];
 
+                       $interlink_data = array
+                               (
+                               'location1_id' => $location_id,
+                               'location1_item_id' => $check_list_id,
+                               'location2_id' => $location_id_ticket,
+                               'location2_item_id' => $message_ticket_id,
+                               'account_id' => $user_id
+                       );
 
+                       execMethod('property.interlink.add', $interlink_data);
+
 //---Sigurd: start register component to ticket
                        $component_id = $check_list->get_component_id();
 
                        if ($component_id > 0)
                        {
-                               $user_id = $GLOBALS['phpgw_info']['user']['id'];
                                $component_location_id = 
$check_list->get_location_id();
                                $component_id = $check_list->get_component_id();
 

Modified: branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php  
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php  
2017-06-06 09:03:29 UTC (rev 16835)
@@ -273,10 +273,10 @@
                         * Vendor
                         */
                        $cc = $customer_contact_email;
-                       $bcc = '';
+                       $bcc = !empty($config['receipt_blind_copy']) ? 
$config['receipt_blind_copy'] : '';
                        $to_email = $vendor_contact_email;
-                       $from_email = $customer_contact_email;
-                       $from_name = $customer_contact_name;
+                       $from_email = !empty($config['receipt_blind_copy']) ? 
$config['receipt_blind_copy'] : $customer_contact_email;
+                       $from_name = !empty($config['receipt_blind_copy']) ? 
$config['receipt_blind_copy'] : $customer_contact_name;
 
                        try
                        {

Modified: branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/config.tpl    
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/eventplanner/templates/base/config.tpl    
2017-06-06 09:03:29 UTC (rev 16835)
@@ -21,6 +21,12 @@
                        </td>
                </tr>
                <tr>
+                       <td>{lang_receipt_blind_copy}:</td>
+                       <td>
+                               <input type="text" 
name="newsettings[receipt_blind_copy]" value="{value_receipt_blind_copy}">
+                       </td>
+               </tr>
+               <tr>
                        <td>{lang_receipt_subject}:</td>
                        <td>
                                <input type="text" 
name="newsettings[receipt_subject]" value="{value_receipt_subject}">

Modified: branches/dev-syncromind-2/frontend/inc/class.borental.inc.php
===================================================================
--- branches/dev-syncromind-2/frontend/inc/class.borental.inc.php       
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/frontend/inc/class.borental.inc.php       
2017-06-06 09:03:29 UTC (rev 16835)
@@ -124,7 +124,7 @@
                                }
                                else
                                {
-                                       $parties = 
rental_soparty::get_instance()->get(null, null, null, null, null, null, array(
+                                       $parties = 
rental_soparty::get_instance()->get(0, 0, '', false, '', '', array(
                                                'email' => $row));
                                        $parties = array_keys($parties);
                                }

Modified: branches/dev-syncromind-2/frontend/inc/class.uicontract.inc.php
===================================================================
--- branches/dev-syncromind-2/frontend/inc/class.uicontract.inc.php     
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/frontend/inc/class.uicontract.inc.php     
2017-06-06 09:03:29 UTC (rev 16835)
@@ -126,7 +126,7 @@
                                                
phpgwapi_cache::session_set('frontend', $this->contract_state_identifier, 
$this->contract_state);
                                                $change_contract = false;
                                                //Get more details on contract 
parties
-                                               $parties = 
rental_soparty::get_instance()->get(null, null, null, null, null, null, array(
+                                               $parties = 
rental_soparty::get_instance()->get(0, 0, '', false, '', '', array(
                                                        'contract_id' => 
$this->contract_state['contract']->get_id()));
                                                $party_array = array();
                                                foreach ($parties as $party)
@@ -134,7 +134,7 @@
                                                        $party_array[] = 
$party->serialize();
                                                }
 
-                                               $composites = 
rental_socomposite::get_instance()->get(null, null, null, null, null, null, 
array(
+                                               $composites = 
rental_socomposite::get_instance()->get(0, 0, '', false, '', '', array(
                                                        'contract_id' => 
$this->contract_state['contract']->get_id()));
                                                $composite_array = array();
                                                foreach ($composites as 
$composite)
@@ -150,7 +150,7 @@
 
                        if (!isset($party_array) && 
isset($this->contract_state['contract']))
                        {
-                               $parties = 
rental_soparty::get_instance()->get(null, null, null, null, null, null, array(
+                               $parties = 
rental_soparty::get_instance()->get(0, 0, '', false, '', '', array(
                                        'contract_id' => 
$this->contract_state['contract']->get_id()));
                                $party_array = array();
                                foreach ($parties as $party)
@@ -161,7 +161,7 @@
 
                        if (!isset($composite_array) && 
isset($this->contract_state['contract']))
                        {
-                               $composites = 
rental_socomposite::get_instance()->get(null, null, null, null, null, null, 
array(
+                               $composites = 
rental_socomposite::get_instance()->get(0, 0, '', false, '', '', array(
                                        'contract_id' => 
$this->contract_state['contract']->get_id()));
                                $composite_array = array();
                                foreach ($composites as $composite)
@@ -217,7 +217,7 @@
                                return $values[$org_unit];
                        }
 
-                       $parties = rental_soparty::get_instance()->get(null, 
null, null, null, null, null, array(
+                       $parties = rental_soparty::get_instance()->get(0, 0, 
'', false, '', '', array(
                                'org_unit_id' => $org_unit));
 
                        $types = 
rental_socontract::get_instance()->get_fields_of_responsibility();
@@ -233,13 +233,13 @@
                        foreach ($parties as $party)
                        {
                                //... get the contracts
-                               $contracts = 
rental_socontract::get_instance()->get(null, null, null, null, null, null, 
array(
+                               $contracts = 
rental_socontract::get_instance()->get(0, 0, '', false, '', '', array(
                                        'party_id' => $party->get_id()));
                                //... and for each contract connected to this 
contract part
                                foreach ($contracts as $id => $contract)
                                {
                                        //... get the composites
-                                       $composites = 
rental_socomposite::get_instance()->get(null, null, null, null, null, null, 
array(
+                                       $composites = 
rental_socomposite::get_instance()->get(0, 0, '', false, '', '', array(
                                                'contract_id' => 
$contracts[$id]->get_id()));
 
                                        //...and for each composite in the 
contract in which this contract part is connected

Modified: 
branches/dev-syncromind-2/frontend/inc/class.uicontract_documents.inc.php
===================================================================
--- branches/dev-syncromind-2/frontend/inc/class.uicontract_documents.inc.php   
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/frontend/inc/class.uicontract_documents.inc.php   
2017-06-06 09:03:29 UTC (rev 16835)
@@ -123,7 +123,7 @@
 
                        $config = CreateObject('phpgwapi.config', 'frontend');
                        $config->read();
-                       //$doc_types = 
isset($config->config_data['document_frontend_cat']) && 
$config->config_data['document_frontend_cat'] ? 
$config->config_data['document_frontend_cat'] : array(); 
+                       //$doc_types = 
isset($config->config_data['document_frontend_cat']) && 
$config->config_data['document_frontend_cat'] ? 
$config->config_data['document_frontend_cat'] : array();
                        $doc_types = array('type' => 1);
 
                        $allrows = true;
@@ -137,11 +137,10 @@
                                {
                                        if ($doc_type)
                                        {
-                                               $document_list = 
array_merge($document_list, $sodocument->get($start_index, $num_of_objects, 
'id', true, $search_for, $search_type, $filters));
+                                               $document_list = 
array_merge($document_list, $sodocument->get(0, 0, 'id', true, '', '', 
$filters));
                                        }
 
-                                       $total_records = $total_records + 
$sodocument->get_count($search_for, $search_type, $filters);
-                                       ;
+                                       $total_records = $total_records + 
$sodocument->get_count('', '', $filters);
                                }
                        }
 

Modified: branches/dev-syncromind-2/phpgwapi/inc/class.cache.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/inc/class.cache.inc.php  2017-06-06 
07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/phpgwapi/inc/class.cache.inc.php  2017-06-06 
09:03:29 UTC (rev 16835)
@@ -38,6 +38,22 @@
        class phpgwapi_cache
        {
                /**
+                * Decide whether to use database for caching - or not
+                *
+                * @param string $module the module name the data belongs to
+                * @param string $id the internal module id for the data
+                * @return bool use database
+                */
+               protected static function _use_database($module, $id)
+               {
+                       $use_database = array(
+                               'controller' => array('location_bookmark' => 
true),
+                               'phpgwapi' => array('bookmark_menu' => true)
+                               );
+                       return !!$use_database[$module][$id];
+               }
+
+               /**
                 * Clear stored data from shared memory
                 *
                 * @param string $key the data identifier
@@ -312,7 +328,7 @@
                 */
                public static function user_clear($module, $id, $uid)
                {
-                       $db = false;
+                       $db = self::_use_database($module, $id);
                        if($db)
                        {
                                return self::_user_clear_db($module, $id, $uid);
@@ -333,7 +349,7 @@
                 */
                public static function user_get($module, $id, $uid, $bypass = 
true, $compress = false)
                {
-                       $db = false;
+                       $db = self::_use_database($module, $id);
                        if($db)
                        {
                                return self::_user_get_db($module, $id, $uid, 
$bypass, $compress);
@@ -355,7 +371,7 @@
                 */
                public static function user_set($module, $id, $value, $uid, 
$bypass = true, $compress = false)
                {
-                       $db = false;
+                       $db = self::_use_database($module, $id);
                        if($db)
                        {
                                return self::_user_set_db($module, $id, $value, 
$uid, $bypass, $compress);
@@ -498,7 +514,7 @@
                 * @param int $uid the user id to the data is stored for
                 * @return mixed the data from user cache
                 */
-               protected static function _user_get($module, $id, $uid, $bypass 
= true, $compress = false)
+               static function _user_get($module, $id, $uid, $bypass = true, 
$compress = false)
                {
                        $uid = (int) $uid;
                        $module = $module . '_' . $uid;

Modified: branches/dev-syncromind-2/phpgwapi/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/setup/setup.inc.php      2017-06-06 
07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/phpgwapi/setup/setup.inc.php      2017-06-06 
09:03:29 UTC (rev 16835)
@@ -12,7 +12,7 @@
        // Basic information about this app
        $setup_info['phpgwapi']['name']      = 'phpgwapi';
        $setup_info['phpgwapi']['title']     = 'phpgwapi';
-       $setup_info['phpgwapi']['version']   = '0.9.17.555';
+       $setup_info['phpgwapi']['version']   = '0.9.17.556';
        $setup_info['phpgwapi']['versions']['current_header'] = '1.31';
        $setup_info['phpgwapi']['versions']['system'] = '2.0';
        $setup_info['phpgwapi']['enable']    = 3;

Modified: branches/dev-syncromind-2/phpgwapi/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind-2/phpgwapi/setup/tables_update.inc.php      
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/phpgwapi/setup/tables_update.inc.php      
2017-06-06 09:03:29 UTC (rev 16835)
@@ -3520,3 +3520,55 @@
                        return $GLOBALS['setup_info']['phpgwapi']['currentver'];
                }
        }
+
+
+       /**
+       * Use database for user cache
+       * @return string the new version number
+       */
+
+       $test[] = '0.9.17.555';
+       function phpgwapi_upgrade0_9_17_555()
+       {
+               phpgw::import_class('phpgwapi.cache');
+               $GLOBALS['phpgw']->db = & $GLOBALS['phpgw_setup']->oProc->m_odb;
+
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->query("SELECT config_value FROM 
phpgw_config WHERE config_app = 'phpgwapi' AND config_name = 'temp_dir'");
+               $GLOBALS['phpgw_setup']->oProc->next_record();
+               $GLOBALS['phpgw_info']['server']['temp_dir'] = 
$GLOBALS['phpgw_setup']->oProc->f('config_value');
+               $GLOBALS['phpgw_setup']->oProc->query("SELECT config_value FROM 
phpgw_config WHERE config_app = 'phpgwapi' AND config_name = 'install_id'");
+               $GLOBALS['phpgw_setup']->oProc->next_record();
+               $GLOBALS['phpgw_info']['server']['install_id'] = 
$GLOBALS['phpgw_setup']->oProc->f('config_value');
+               $GLOBALS['phpgw_setup']->oProc->query("SELECT account_id FROM 
phpgw_accounts WHERE account_type = 'u' AND account_status = 'A'");
+
+               $users = array();
+               while ($GLOBALS['phpgw_setup']->oProc->next_record())
+               {
+                       $users[] = 
$GLOBALS['phpgw_setup']->oProc->f('account_id');
+               }
+
+               foreach ($users as $user_id)
+               {
+                       //from file
+                       if($bookmarks = phpgwapi_cache::_user_get('controller', 
"location_bookmark", $user_id))
+                       {
+                               //to database
+                               phpgwapi_cache::user_set('controller', 
"location_bookmark", $bookmarks, $user_id);
+                       }
+
+                       //from file
+                       if($bookmarks = phpgwapi_cache::_user_get('phpgwapi', 
"bookmark_menu", $user_id))
+                       {
+                               //to database
+                               phpgwapi_cache::user_set('phpgwapi', 
"bookmark_menu", $bookmarks, $user_id);
+                       }
+               }
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['phpgwapi']['currentver'] = 
'0.9.17.556';
+                       return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+               }
+       }

Copied: 
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/themes/alesund_kommune.css
 (from rev 16834, 
trunk/phpgwapi/templates/bookingfrontend/themes/alesund_kommune.css)
===================================================================
--- 
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/themes/alesund_kommune.css
                             (rev 0)
+++ 
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/themes/alesund_kommune.css
     2017-06-06 09:03:29 UTC (rev 16835)
@@ -0,0 +1,218 @@
+/*
+ *
+ * Theme
+ */
+/*
+Font
+-Settes til Calibri eller PT Sans
+-Blå titler ha fargekode #2d6d8f
+-Linker skal ha fargekode #2d6d8f. De skal også (helst) være underlinjert. De 
må endres ved mouseover – farge endres til fargekoden #00acb8 (og evt. at 
underline kommer først ved mouseover).
+*/
+
+body {
+       font-family: Calibri,Candara,Segoe,Segoe UI,Optima,Arial,sans-serif;
+}
+
+.home-menu {
+       background: rgb(231, 239,241);
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6
+{
+    color: #2d6d8f;
+       letter-spacing: 0.1em;
+    font-weight: normal;
+   /* text-transform: uppercase;*/
+}
+
+.pure-g [class*="pure-u"] {
+       font-family: Calibri,Candara,Segoe,Segoe UI,Optima,Arial,sans-serif;
+}
+
+.l-box-lrg {
+    padding: 2em;
+    border-bottom: 1px solid rgba(0,0,0,0.1);
+}
+
+.is-center {
+    text-align: center;
+}
+
+.footer {
+       background: #383838;
+}
+
+.home-menu .pure-menu-heading {
+    color: #2d6d8f;
+    font-weight: 400;
+    font-size: 120%;
+}
+
+.home-menu .pure-menu-selected a {
+    color: #2d6d8f;
+}
+
+.home-menu a {
+    color: #2d6d8f;
+}
+.home-menu li a:hover,
+.home-menu li a:focus {
+    background: none;
+  /*  border: none;*/
+    color: #00acb8;
+}
+
+a {
+    color: #2d6d8f;
+    text-decoration: none;
+    cursor: pointer;
+    background: transparent none repeat scroll 0 0;
+}
+a:hover{
+    text-decoration: underline;
+
+}
+
+.custom-menu .pure-menu-link,
+.custom-menu .pure-menu-heading {
+    color: #2d6d8f;
+}
+
+.custom-menu .pure-menu-link:hover,
+.custom-menu .pure-menu-heading:hover {
+    background-color: transparent;
+}
+
+.custom-menu-top {
+    position: relative;
+    padding-top: .5em;
+    padding-bottom: .5em;
+}
+
+.custom-menu-brand {
+    display: block;
+    text-align: left;
+    position: relative;
+}
+
+.custom-menu-toggle {
+    width: 44px;
+    height: 44px;
+    display: block;
+    position: absolute;
+    top: 3px;
+    right: 0;
+    display: none;
+}
+
+
+.custom-menu-toggle .bar {
+    background-color: #2d6d8f;
+    display: block;
+    width: 20px;
+    height: 2px;
+    border-radius: 100px;
+    position: absolute;
+    top: 22px;
+    right: 12px;
+    -webkit-transition: all 0.5s;
+    -moz-transition: all 0.5s;
+    -ms-transition: all 0.5s;
+    transition: all 0.5s;
+}
+
+.custom-menu-toggle .bar:first-child {
+    -webkit-transform: translateY(-6px);
+    -moz-transform: translateY(-6px);
+    -ms-transform: translateY(-6px);
+    transform: translateY(-6px);
+}
+
+.custom-menu-toggle.x .bar {
+    -webkit-transform: rotate(45deg);
+    -moz-transform: rotate(45deg);
+    -ms-transform: rotate(45deg);
+    transform: rotate(45deg);
+}
+
+.custom-menu-toggle.x .bar:first-child {
+    -webkit-transform: rotate(-45deg);
+    -moz-transform: rotate(-45deg);
+    -ms-transform: rotate(-45deg);
+    transform: rotate(-45deg);
+}
+
+.custom-menu-screen {
+   /* background-color: rgba(0, 0, 0, 0.5);*/
+       background-color: rgb(231, 239,241);
+    -webkit-transition: all 0.5s;
+    -moz-transition: all 0.5s;
+    -ms-transition: all 0.5s;
+    transition: all 0.5s;
+    height: 3em;
+    width: 70em;
+    position: absolute;
+    top: 0;
+    z-index: -1;
+}
+
+.custom-menu-tucked .custom-menu-screen {
+    -webkit-transform: translateY(-44px);
+    -moz-transform: translateY(-44px);
+    -ms-transform: translateY(-44px);
+    transform: translateY(-44px);
+}
+
address@hidden (max-width: 62em) {
+
+    .custom-menu {
+        display: block;
+    }
+
+    .custom-menu-toggle {
+        display: block;
+        display: none\9;
+    }
+
+    .custom-menu-bottom {
+        position: absolute;
+        width: 100%;
+        border-top: 1px solid #eee;
+        background-color: #2d3e50\9;
+        z-index: 100;
+    }
+
+    .custom-menu-bottom .pure-menu-link {
+        opacity: 1;
+        -webkit-transform: translateX(0);
+        -moz-transform: translateX(0);
+        -ms-transform: translateX(0);
+        transform: translateX(0);
+        -webkit-transition: all 0.5s;
+        -moz-transition: all 0.5s;
+        -ms-transition: all 0.5s;
+        transition: all 0.5s;
+    }
+
+    .custom-menu-bottom.custom-menu-tucked .pure-menu-link {
+        -webkit-transform: translateX(-140px);
+        -moz-transform: translateX(-140px);
+        -ms-transform: translateX(-140px);
+        transform: translateX(-140px);
+        opacity: 0;
+        opacity: 1\9;
+    }
+
+    .pure-menu-horizontal.custom-menu-tucked {
+        z-index: -1;
+        top: 45px;
+        position: absolute;
+        overflow: hidden;
+    }
+
+}
\ No newline at end of file

Modified: branches/dev-syncromind-2/property/inc/class.boproject.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.boproject.inc.php      
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/property/inc/class.boproject.inc.php      
2017-06-06 09:03:29 UTC (rev 16835)
@@ -394,9 +394,9 @@
                                (
                                'field' => 'fm_project.id',
                                'type' => 'int',
-                               'matchtype' => 'exact',
-                               'front' => '',
-                               'back' => ''
+                               'matchtype' => 'like',
+                               'front' => "'",
+                               'back' => "%'",
                        );
                        $criteria[3] = array
                                (
@@ -868,6 +868,7 @@
                                        $record_history[$i]['value_new_value'] 
= '';
                                }
 
+                               $record_history[$i]['#'] = $i +1;
                                $i++;
                        }
 

Modified: branches/dev-syncromind-2/property/inc/class.boworkorder.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.boworkorder.inc.php    
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/property/inc/class.boworkorder.inc.php    
2017-06-06 09:03:29 UTC (rev 16835)
@@ -760,7 +760,7 @@
                                {
                                        $record_history[$i]['value_new_value'] 
= '';
                                }
-
+                               $record_history[$i]['#'] = $i +1;
                                $i++;
                        }
 

Modified: branches/dev-syncromind-2/property/inc/class.soproject.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.soproject.inc.php      
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/property/inc/class.soproject.inc.php      
2017-06-06 09:03:29 UTC (rev 16835)
@@ -38,6 +38,7 @@
                var $total_records = 0;
                private $global_lock = false;
                private $vendor_list = array();
+               protected $historylog;
 
                function __construct()
                {
@@ -57,6 +58,8 @@
                        $this->grants = $this->acl->get_grants2('property', 
'.project');
                        $this->config = CreateObject('phpgwapi.config', 
'property');
                        $this->config->read();
+                       $this->historylog = CreateObject('property.historylog', 
'project');
+
                }
 
                function select_status_list()
@@ -592,12 +595,12 @@
                                $where = 'AND';
                        }
 
-                       if ($filter_year && $filter_year != 'all')
-                       {
-                               $filter_year = (int)$filter_year;
-                               $filtermethod .= " $where 
(fm_project_budget.year={$filter_year} OR 
fm_project_buffer_budget.year={$filter_year})";
-                               $where = 'AND';
-                       }
+//                     if ($filter_year && $filter_year != 'all')
+//                     {
+//                             $filter_year = (int)$filter_year;
+//                             $filtermethod .= " $where 
(fm_project_budget.year={$filter_year} OR 
fm_project_buffer_budget.year={$filter_year})";
+//                             $where = 'AND';
+//                     }
 
                        $querymethod = '';
                        if ($query)
@@ -628,9 +631,18 @@
                                                $_querymethod = array();
                                                foreach ($criteria as 
$field_info)
                                                {
-                                                       if ($field_info['type'] 
== int)
+                                                       if ($field_info['type'] 
== 'int')
                                                        {
-                                                               $_query = 
(int)$query;
+                                                               
if($field_info['matchtype'] == 'like')
+                                                               {
+                                                                       $_query 
= $query;
+                                                                       
$_querymethod[] = " cast({$field_info['field']} as text) 
{$matchtypes[$field_info['matchtype']]} 
{$field_info['front']}{$_query}{$field_info['back']}";
+                                                                       
continue;
+                                                               }
+                                                               else
+                                                               {
+                                                                       $_query 
= (int)$query;
+                                                               }
                                                        }
                                                        else
                                                        {
@@ -799,7 +811,7 @@
                                                {
                                                        if ($year && 
$entry['year'] == $year)
                                                        {
-                                                               if 
($entry['active'])
+//                                                             if 
($entry['active'])
                                                                {
                                                                        
$project['combined_cost'] += $entry['sum_orders'];
                                                                        
$project['budget'] += $entry['budget'];
@@ -812,7 +824,7 @@
                                                        }
                                                        else if (!$year)
                                                        {
-                                                               if 
($entry['active'])
+//                                                             if 
($entry['active'])
                                                                {
                                                                        
$project['combined_cost'] += $entry['sum_orders'];
                                                                        
$project['budget'] += $entry['budget'];
@@ -2694,6 +2706,9 @@
 
                private function transfer_budget( $id, $budget, $year )
                {
+
+                       $historylog = & $this->historylog;
+
                        $this->db->transaction_begin();
 
                        $id = (int)$id;
@@ -2762,6 +2777,8 @@
                                }
 
                                $this->update_budget($id, $year, 
$periodization_id, $new_budget, true, 'update', true);
+                               $historylog->add('B', $id, $new_budget);
+                               $historylog->add('RM', $id, 'Budsjett oppdatert 
via masseoppdatering');
                        }
                        else if ($project_type_id == 1 || $project_type_id == 
4)//operation or maintenance
                        {
@@ -2769,6 +2786,10 @@
                                {
                                        $this->db->query("UPDATE 
fm_project_budget SET active = 0 WHERE project_id = {$id}", __LINE__, 
__FILE__); // previous
                                        $this->update_budget($id, $year, 
$periodization_id, (int)$budget['budget_amount'], true, 'update', true);
+
+                                       $historylog->add('B', $id, 
(int)$budget['budget_amount']);
+                                       $historylog->add('RM', $id, 'Budsjett 
oppdatert via masseoppdatering');
+
                                }
                        }
 

Modified: branches/dev-syncromind-2/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.soworkorder.inc.php    
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/property/inc/class.soworkorder.inc.php    
2017-06-06 09:03:29 UTC (rev 16835)
@@ -37,8 +37,8 @@
 
                var $total_records = 0;
                protected $global_lock = false;
-
-               function __construct()
+               protected $historylog;
+                                       function __construct()
                {
                        $this->account = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bocommon = CreateObject('property.bocommon');
@@ -51,6 +51,7 @@
                        $this->acl = & $GLOBALS['phpgw']->acl;
                        $this->acl->set_account_id($this->account);
                        $this->grants = $this->acl->get_grants2('property', 
'.project');
+                       $this->historylog = CreateObject('property.historylog', 
'workorder');
                }
 
                function next_id()
@@ -1203,7 +1204,7 @@
                function add( $workorder )
                {
                        $receipt = array();
-                       $historylog = CreateObject('property.historylog', 
'workorder');
+                       $historylog = & $this->historylog;
                        $workorder['descr'] = 
$this->db->db_addslashes($workorder['descr']);
                        $workorder['title'] = 
$this->db->db_addslashes($workorder['title']);
                        $workorder['billable_hours'] = (float)str_replace(',', 
'.', $workorder['billable_hours']);
@@ -1404,7 +1405,7 @@
                {
                        $config = CreateObject('phpgwapi.config','property');
                        $config->read_repository();
-                       $historylog = CreateObject('property.historylog', 
'workorder');
+                       $historylog = & $this->historylog;
                        $workorder['descr'] = 
$this->db->db_addslashes($workorder['descr']);
                        $workorder['title'] = 
$this->db->db_addslashes($workorder['title']);
                        $workorder['billable_hours'] = (float)str_replace(',', 
'.', $workorder['billable_hours']);
@@ -1859,7 +1860,7 @@
                        if ($orders && is_array($orders))
                        {
                                $lang_closed = lang('closed');
-                               $historylog_workorder = 
CreateObject('property.historylog', 'workorder');
+                               $historylog_workorder = & $this->historylog;
 
                                foreach ($orders as $id)
                                {
@@ -1907,7 +1908,7 @@
 
                        $lang_reopen = lang('Re-opened');
 
-                       $historylog_workorder = 
CreateObject('property.historylog', 'workorder');
+                       $historylog_workorder = & $this->historylog;
 
                        foreach ($orders as $id)
                        {
@@ -2700,6 +2701,8 @@
                 * */
                public function transfer_budget( $id, $budget, $year )
                {
+                       $historylog = & $this->historylog;
+
                        if ($this->db->get_transaction())
                        {
                                $this->global_lock = true;
@@ -2731,6 +2734,7 @@
 
                        phpgwapi_cache::system_clear('property', 
"budget_order_{$id}");
 
+                       $updated_budget = false;
                        if ($continuous)
                        {
                                $this->db->query("UPDATE fm_workorder_budget 
SET active = 0 WHERE order_id = {$id} AND year = {$latest_year}", __LINE__, 
__FILE__);
@@ -2737,6 +2741,8 @@
                                if ($budget['budget_amount'])
                                {
                                        $this->_update_order_budget($id, $year, 
$periodization_id, (int)$budget['budget_amount'], 
(int)$budget['budget_amount'], (int)$budget['budget_amount'], $action = 
'update', true);
+                                       $historylog->add('B', $id, 
(int)$budget['budget_amount']);
+                                       $updated_budget = true;
                                }
                        }
                        else if ($project_type_id == 1)//operation
@@ -2756,6 +2762,8 @@
                                $transferred = $this->_update_order_budget($id, 
$latest_year, $periodization_id, $paid_last_year, $paid_last_year, 
$paid_last_year, $action = 'update', $activate = 0);
 
                                $this->_update_order_budget($id, $year, 
$periodization_id, (int)$budget['budget_amount'], 
(int)$budget['budget_amount'], (int)$budget['budget_amount'], $action = 
'update', true);
+                               $historylog->add('B', $id, 
(int)$budget['budget_amount']);
+                               $updated_budget = true;
 
                                $this->db->query("UPDATE fm_workorder_budget 
SET active = 0 WHERE order_id = {$id} AND year = {$latest_year}", __LINE__, 
__FILE__);
 
@@ -2819,8 +2827,15 @@
                                }
 
                                $this->_update_order_budget($id, $year, 
$periodization_id, $new_budget, $new_budget, $new_budget, $action = 'update', 
true);
+                               $historylog->add('B', $id, (int)$new_budget);
+                               $updated_budget = true;
                        }
 //die();
+                       if($updated_budget)
+                       {
+                               $historylog->add('RM', $id, 'Budsjett oppdatert 
via masseoppdatering');
+                       }
+
                        if (!$this->global_lock)
                        {
                                $this->db->transaction_commit();
@@ -3021,7 +3036,7 @@
                        $order_id = $data['order_id'];
                        $status = $data['status'];
 
-                       $historylog = CreateObject('property.historylog', 
'workorder');
+                       $historylog = & $this->historylog;
 
                        $this->db->query("SELECT status FROM fm_workorder WHERE 
id = {$order_id}", __LINE__, __FILE__);
                        $this->db->next_record();

Modified: branches/dev-syncromind-2/property/inc/class.uiproject.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uiproject.inc.php      
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/property/inc/class.uiproject.inc.php      
2017-06-06 09:03:29 UTC (rev 16835)
@@ -1883,11 +1883,12 @@
 
                        $history_def = array
                                (
-                               array('key' => 'value_date', 'label' => 
lang('Date'), 'sortable' => true),
-                               array('key' => 'value_user', 'label' => 
lang('User'), 'Action' => true),
-                               array('key' => 'value_action', 'label' => 
lang('action'), 'sortable' => true),
-                               array('key' => 'value_old_value', 'label' => 
lang('old value'), 'sortable' => true),
-                               array('key' => 'value_new_value', 'label' => 
lang('new value'), 'sortable' => true)
+                               array('key' => '#',     'label' => '#', 
'sortable' =>true),
+                               array('key' => 'value_date', 'label' => 
lang('Date'), 'sortable' => false),
+                               array('key' => 'value_user', 'label' => 
lang('User'), 'sortable' => false),
+                               array('key' => 'value_action', 'label' => 
lang('action'), 'sortable' => false),
+                               array('key' => 'value_old_value', 'label' => 
lang('old value'), 'sortable' => false),
+                               array('key' => 'value_new_value', 'label' => 
lang('new value'), 'sortable' => false)
                        );
 
                        $datatable_def[] = array

Modified: branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php    
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php    
2017-06-06 09:03:29 UTC (rev 16835)
@@ -1647,6 +1647,15 @@
                                'required' => true
                        ));
 
+                       $b_account_list = 
execMethod('property.bogeneric.get_list', array(
+                                               'type' => 'budget_account', 
'selected' => $values['b_account_id'] ? $values['b_account_id'] : 
$project['b_account_id'], 'add_empty' => true, 'filter' => array('active' => 
1)));
+
+                       foreach ($b_account_list as &$entry)
+                       {
+                               $entry['name'] = "{$entry['id']} 
{$entry['name']}";
+                       }
+                       unset($entry);
+
                        $ecodimb_data = 
$this->bocommon->initiate_ecodimb_lookup(array
                                (
                                'ecodimb' => $project['ecodimb'] ? 
$project['ecodimb'] : $values['ecodimb'],
@@ -1718,14 +1727,19 @@
                        $history_def = array
                                (
                                array(
+                                       'key' => '#',
+                                       'label' => '#',
+                                       'sortable' =>true,
+                                       'resizeable' => true),
+                               array(
                                        'key' => 'value_date',
                                        'label' => lang('Date'),
-                                       'sortable' => true,
+                                       'sortable' =>false,
                                        'resizeable' => true),
                                array(
                                        'key' => 'value_user',
                                        'label' => lang('User'),
-                                       'Action' => true,
+                                       'sortable' =>false,
                                        'resizeable' => true),
                                array(
                                        'key' => 'value_action',
@@ -1735,12 +1749,12 @@
                                array(
                                        'key' => 'value_old_value',
                                        'label' => lang('old value'),
-                                       'sortable' => true,
+                                       'sortable' => false,
                                        'resizeable' => true),
                                array(
                                        'key' => 'value_new_value',
                                        'label' => lang('New Value'),
-                                       'sortable' => true,
+                                       'sortable' => false,
                                        'resizeable' => true)
                        );
 
@@ -2486,6 +2500,8 @@
                                        'menuaction' => 
'property.uiproject.edit')),
                                'b_group_data' => $b_group_data,
                                'b_account_data' => $b_account_data,
+                               'b_account_as_listbox' => 
$GLOBALS['phpgw_info']['user']['preferences']['property']['b_account_as_listbox'],
+                               'b_account_list'        => array('options' => 
$b_account_list),
                                'value_start_date' => $values['start_date'],
                                'value_end_date' => $values['end_date'],
                                'value_tender_deadline' => 
$values['tender_deadline'],

Modified: 
branches/dev-syncromind-2/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
===================================================================
--- 
branches/dev-syncromind-2/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
    2017-06-06 07:55:25 UTC (rev 16834)
+++ 
branches/dev-syncromind-2/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
    2017-06-06 09:03:29 UTC (rev 16835)
@@ -144,8 +144,8 @@
                        $server = $this->config->config_data['common']['host'];
                        $user = $this->config->config_data['common']['user'];
                        $password = 
$this->config->config_data['common']['password'];
-                       $directory_remote = 
rtrim($this->config->config_data['import']['remote_basedir'], '/');
-                       $directory_local = 
rtrim($this->config->config_data['import']['local_path'], '/');
+                       $directory_remote = 
rtrim($this->config->config_data['import']['remote_basedir_project'], '/');
+                       $directory_local = 
rtrim($this->config->config_data['import']['local_path_project'], '/');
 
                        try
                        {

Modified: branches/dev-syncromind-2/property/inc/hook_settings.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/hook_settings.inc.php        
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/property/inc/hook_settings.inc.php        
2017-06-06 09:03:29 UTC (rev 16835)
@@ -260,6 +260,8 @@
 
        create_select_box('Default project status', 'project_status', 
$_status_project, 'The default status for your projects');
        create_select_box('Default workorder status', 'workorder_status', 
$_status_workorder, 'The default status for your workorders');
+       create_select_box('Budget account as listbox', 'b_account_as_listbox', 
$yes_and_no, 'The input type for budget account');
+
        create_select_box('Default project categories', 'project_category', 
$_categories_project, 'The default category for your projects and workorders');
        create_select_box('Default district-filter', 'default_district', 
$_districts, 'Your default district-filter ');
 

Modified: branches/dev-syncromind-2/property/templates/base/workorder.xsl
===================================================================
--- branches/dev-syncromind-2/property/templates/base/workorder.xsl     
2017-06-06 07:55:25 UTC (rev 16834)
+++ branches/dev-syncromind-2/property/templates/base/workorder.xsl     
2017-06-06 09:03:29 UTC (rev 16835)
@@ -699,25 +699,52 @@
                                                <label>
                                                        <xsl:value-of 
select="$lang_budget_account"/>
                                                </label>
-                                               <input type="hidden" 
id="b_account_id" name="values[b_account_id]"  
value="{b_account_data/value_b_account_id}"/>
-                                               <input type="text" 
id="b_account_name" name="values[b_account_name]" 
value="{b_account_data/value_b_account_id} 
{b_account_data/value_b_account_name}" class="pure-input-1-2">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="mode='edit'">
-                                                                       
<xsl:attribute name="data-validation">
-                                                                               
<xsl:text>required</xsl:text>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:attribute name="data-validation-error-msg">
+                                               <xsl:choose>
+                                                       <xsl:when 
test="b_account_as_listbox = 1">
+                                                               <select 
name="values[b_account_id]" class="pure-input-1-2">
+                                                                       
<xsl:attribute name="title">
                                                                                
<xsl:value-of select="$lang_budget_account"/>
                                                                        
</xsl:attribute>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       
<xsl:attribute name="disabled">
-                                                                               
<xsl:text>disabled</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </input>
-                                               <div id="b_account_container"/>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="mode='edit'">
+                                                                               
        <xsl:attribute name="data-validation">
+                                                                               
                <xsl:text>required</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="data-validation-error-msg">
+                                                                               
                <xsl:value-of select="$lang_budget_account"/>
+                                                                               
        </xsl:attribute>
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        <xsl:attribute name="disabled">
+                                                                               
                <xsl:text>disabled</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                                       
<xsl:apply-templates select="b_account_list/options"/>
+                                                               </select>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <input 
type="hidden" id="b_account_id" name="values[b_account_id]"  
value="{b_account_data/value_b_account_id}"/>
+                                                               <input 
type="text" id="b_account_name" name="values[b_account_name]" 
value="{b_account_data/value_b_account_id} 
{b_account_data/value_b_account_name}" class="pure-input-1-2">
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="mode='edit'">
+                                                                               
        <xsl:attribute name="data-validation">
+                                                                               
                <xsl:text>required</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:attribute name="data-validation-error-msg">
+                                                                               
                <xsl:value-of select="$lang_budget_account"/>
+                                                                               
        </xsl:attribute>
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        <xsl:attribute name="disabled">
+                                                                               
                <xsl:text>disabled</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                               </input>
+                                                               <div 
id="b_account_container"/>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
                                        </div>
                                        <xsl:if test="enable_unspsc = 1">
                                                <div class="pure-control-group">




reply via email to

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