fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [13603] Syncromind: Merge 13541:13602 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [13603] Syncromind: Merge 13541:13602 from trunk
Date: Thu, 09 Jul 2015 13:20:17 +0000

Revision: 13603
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13603
Author:   sigurdne
Date:     2015-07-09 13:20:15 +0000 (Thu, 09 Jul 2015)
Log Message:
-----------
Syncromind: Merge 13541:13602 from trunk

Modified Paths:
--------------
    
branches/dev-syncromind/catch/inc/custom/default/update_location_at_record.php
    branches/dev-syncromind/controller/inc/class.uicase.inc.php
    branches/dev-syncromind/controller/inc/class.uicontrol_item.inc.php
    branches/dev-syncromind/controller/js/controller/ajax.js
    branches/dev-syncromind/controller/templates/base/case/add_case.xsl
    branches/dev-syncromind/controller/templates/base/case/case_row.xsl
    branches/dev-syncromind/controller/templates/base/case/view_closed_cases.xsl
    branches/dev-syncromind/phpgwapi/inc/class.asyncservice.inc.php
    branches/dev-syncromind/phpgwapi/inc/pdf/extensions/CezTableImage.php
    branches/dev-syncromind/property/inc/class.hook_helper.inc.php
    branches/dev-syncromind/property/inc/class.soproject.inc.php
    branches/dev-syncromind/property/inc/class.sotts.inc.php
    branches/dev-syncromind/property/inc/class.soworkorder.inc.php
    branches/dev-syncromind/property/inc/class.uitts.inc.php
    branches/dev-syncromind/property/inc/class.uiwo_hour.inc.php
    
branches/dev-syncromind/property/inc/cron/default/Import_fra_agresso_X205.php
    
branches/dev-syncromind/property/inc/custom/default/EBF_update_ticket_on_project_change.php
    branches/dev-syncromind/property/inc/hook_settings.inc.php
    branches/dev-syncromind/rental/inc/class.socommon.inc.php
    branches/dev-syncromind/rental/inc/class.socontract.inc.php
    branches/dev-syncromind/rental/inc/class.socontract_price_item.inc.php

Property Changed:
----------------
    branches/dev-syncromind/


Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506
   + /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602

Modified: 
branches/dev-syncromind/catch/inc/custom/default/update_location_at_record.php
===================================================================
--- 
branches/dev-syncromind/catch/inc/custom/default/update_location_at_record.php  
    2015-07-09 09:31:00 UTC (rev 13602)
+++ 
branches/dev-syncromind/catch/inc/custom/default/update_location_at_record.php  
    2015-07-09 13:20:15 UTC (rev 13603)
@@ -50,7 +50,6 @@
                                        $origin_location_code           = 
$this->db2->f('location_code');
                                        $origin_address                         
= $this->db2->f('address');
                                        $value_set['location_code'] = 
$origin_location_code;
-                               //      $value_set['p_num']             = 
$target_id;
                                        $value_set['p_num']             = 
$this->db2->f('target_id');
                                        $value_set['p_entity_id']       = 
$p_entity_id;
                                        $value_set['p_cat_id']          = 
$p_cat_id;

Modified: branches/dev-syncromind/controller/inc/class.uicase.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicase.inc.php 2015-07-09 
09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/controller/inc/class.uicase.inc.php 2015-07-09 
13:20:15 UTC (rev 13603)
@@ -1046,24 +1046,29 @@
                                {
                                        $building['selected'] = $building['id'] 
== $case_location_code ? 1 : 0;
                                }
+                       }
 
 //---------
-                               foreach($closed_check_items_and_cases as $key 
=> $check_item)
+                       foreach($closed_check_items_and_cases as $key => 
$check_item)
+                       {
+               //              $control_item_with_options = 
$this->so_control_item->get_single_with_options( 
$check_item->get_control_item_id() );
+
+                               foreach($check_item->get_cases_array() as $case)
                                {
-                                       foreach($check_item->get_cases_array() 
as $case)
+                                       $component_location_id  = 
$case->get_component_location_id();
+                                       $component_id                   = 
$case->get_component_id();
+                                       if($component_id)
                                        {
-                                               $component_location_id  = 
$case->get_component_location_id();
-                                               $component_id                   
= $case->get_component_id();
-                                               if($component_id)
-                                               {
-                                                       $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$component_location_id, 'id' => $component_id));
-                                                       
$case->set_component_descr($short_desc);
-                                               }
+                                               $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$component_location_id, 'id' => $component_id));
+                                               
$case->set_component_descr($short_desc);
                                        }
                                }
+               //              
$check_item->get_control_item()->set_options_array( 
$control_item_with_options->get_options_array() );
+               //              $closed_check_items_and_cases[$key] = 
$check_item;
+                       }
 //-------
 
-                       }
+                       
 
                        $data = array
                        (

Modified: branches/dev-syncromind/controller/inc/class.uicontrol_item.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicontrol_item.inc.php 
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/controller/inc/class.uicontrol_item.inc.php 
2015-07-09 13:20:15 UTC (rev 13603)
@@ -256,17 +256,16 @@
                                $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'controller.uicontrol_item.index'));
                        }
 
-                       $control_item_id         = phpgw::get_var('id');
-                       $title                           = 
phpgw::get_var('title');
-                       $required                        = 
phpgw::get_var('required') == 'on' ? true : false;
-                       $type                            = 
phpgw::get_var('control_item_type');
-                       $control_group_id        = 
phpgw::get_var('control_group');
-                       $control_area_id         = 
phpgw::get_var('control_area');
-                       $type                            = 
phpgw::get_var('control_item_type');
-                       $what_to_do_txt          = phpgw::get_var('what_to_do', 
'html');
-                       $what_to_do_txt          = str_replace(" ", " ", 
$what_to_do_txt);
-                       $how_to_do_txt           = phpgw::get_var('how_to_do', 
'html');
-                       $how_to_do_txt           = str_replace(" ", " ", 
$how_to_do_txt);
+                       $control_item_id = phpgw::get_var('id');
+                       $title = phpgw::get_var('title');
+                       $required = phpgw::get_var('required') == 'on' ? true : 
false;
+                       $type = phpgw::get_var('control_item_type');
+                       $control_group_id = phpgw::get_var('control_group');
+                       $control_area_id = phpgw::get_var('control_area');
+                       $what_to_do_txt = phpgw::get_var('what_to_do','html');
+                       $what_to_do_txt = str_replace(" ", " ", 
$what_to_do_txt);
+                       $how_to_do_txt = phpgw::get_var('how_to_do','html');
+                       $how_to_do_txt = str_replace(" ", " ", 
$how_to_do_txt);
 
                        if($control_item_id > 0)
                        {
@@ -456,4 +455,4 @@
 
                        return $this->jquery_results($results);
                }
-       }
\ No newline at end of file
+       }

Modified: branches/dev-syncromind/controller/js/controller/ajax.js
===================================================================
--- branches/dev-syncromind/controller/js/controller/ajax.js    2015-07-09 
09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/controller/js/controller/ajax.js    2015-07-09 
13:20:15 UTC (rev 13603)
@@ -346,7 +346,7 @@
                $(".control_item_type").find(".btn").removeClass("active");
                
                // Makes button active and checkes underlying radiobutton
-               $(thisRadio).attr("checked", "checked");
+               $(thisRadio).prop("checked", true);
                $(thisBtn).addClass("active");
                
                var control_item_type = $(this).find("input[type=radio]").val();

Modified: branches/dev-syncromind/controller/templates/base/case/add_case.xsl
===================================================================
--- branches/dev-syncromind/controller/templates/base/case/add_case.xsl 
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/controller/templates/base/case/add_case.xsl 
2015-07-09 13:20:15 UTC (rev 13603)
@@ -90,7 +90,14 @@
                                                                                
        <xsl:when test="type = 'control_item_type_1'">
                                                                                
                        <input type="hidden" name="status" value="0" />
                                                                                
        <input type="hidden" name="type" value="control_item_type_1" />
-                                                                               
                    
+                                                                               
                        <div class="row">
+                                                                               
                                <label>Status</label>
+                                                                               
                                <select name="status">
+                                                                               
                                        <option value="0" 
SELECTED="SELECTED">Åpen</option>
+                                                                               
                                        <option value="1" >Lukket</option>
+                                                                               
                                        <option value="2" >Venter på 
tilbakemelding</option>
+                                                                               
                                </select>
+                                                                               
                   </div>
                                                                                
                        <div>
                                                                                
                    <label class="comment">Beskrivelse av sak</label>
                                                                                
                          <textarea name="case_descr" >

Modified: branches/dev-syncromind/controller/templates/base/case/case_row.xsl
===================================================================
--- branches/dev-syncromind/controller/templates/base/case/case_row.xsl 
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/controller/templates/base/case/case_row.xsl 
2015-07-09 13:20:15 UTC (rev 13603)
@@ -48,8 +48,7 @@
                     </xsl:choose>
 
                   <!-- STATUS -->
-                  <xsl:if test="$control_item_type = 'control_item_type_2' or 
$control_item_type = 'control_item_type_3' or $control_item_type = 
'control_item_type_4'">
-               
+               
                     <div class="row first">
                       <label>Status:</label>
                       <span class="case_status">
@@ -60,7 +59,9 @@
                         </xsl:choose>
                       </span>
                     </div>
-                    
+
+                                       <xsl:if test="$control_item_type = 
'control_item_type_2' or $control_item_type = 'control_item_type_3' or 
$control_item_type = 'control_item_type_4'">
+                 
                     <!--  MEASUREMENT -->
                     <div class="row">
                       <label>Måleverdi:</label> 
@@ -131,8 +132,7 @@
                    <xsl:attribute name="value"><xsl:value-of 
select="//control_item/type" /></xsl:attribute>
                        </input>
                        
-                  <xsl:if test="$control_item_type = 'control_item_type_2' or 
$control_item_type = 'control_item_type_3' or $control_item_type = 
'control_item_type_4'">
-                    <!--  STATUS -->
+                   <!--  STATUS -->
                     <div class="row first">
                       <label>Status:</label> 
                       <select name="case_status">
@@ -152,7 +152,8 @@
                         </xsl:choose>
                       </select>
                     </div>
-                    <xsl:choose>
+                  <xsl:if test="$control_item_type = 'control_item_type_2' or 
$control_item_type = 'control_item_type_3' or $control_item_type = 
'control_item_type_4'">
+                     <xsl:choose>
                       <xsl:when test="$control_item_type = 
'control_item_type_2'">
                         <!--  MEASUREMENT -->
                         <div class="row">

Modified: 
branches/dev-syncromind/controller/templates/base/case/view_closed_cases.xsl
===================================================================
--- 
branches/dev-syncromind/controller/templates/base/case/view_closed_cases.xsl    
    2015-07-09 09:31:00 UTC (rev 13602)
+++ 
branches/dev-syncromind/controller/templates/base/case/view_closed_cases.xsl    
    2015-07-09 13:20:15 UTC (rev 13603)
@@ -1,135 +1,157 @@
 <!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
-<xsl:variable name="session_url">&amp;<xsl:value-of 
select="php:function('get_phpgw_session_url')" /></xsl:variable>   
+       <xsl:variable name="session_url">&amp;
+               <xsl:value-of select="php:function('get_phpgw_session_url')" />
+       </xsl:variable>
 
-<div id="main_content" class="medium">
- <xsl:call-template name="check_list_top_section" />
+       <div id="main_content" class="medium">
+               <xsl:call-template name="check_list_top_section" />
 
-       <xsl:choose>
-               <xsl:when test="buildings_on_property/child::node()">
-                       <div id="choose-building-wrp">
-                               <xsl:call-template 
name="select_buildings_on_property" />
-                       </div>
-               </xsl:when>  
-  </xsl:choose>
+               <xsl:choose>
+                       <xsl:when test="buildings_on_property/child::node()">
+                               <div id="choose-building-wrp">
+                                       <xsl:call-template 
name="select_buildings_on_property" />
+                               </div>
+                       </xsl:when>
+               </xsl:choose>
 
  
-<div id="view_cases">
-       <xsl:call-template name="cases_tab_menu">
-               <xsl:with-param 
name="active_tab">view_closed_cases</xsl:with-param>
-       </xsl:call-template>    
+               <div id="view_cases">
+                       <xsl:call-template name="cases_tab_menu">
+                               <xsl:with-param 
name="active_tab">view_closed_cases</xsl:with-param>
+                       </xsl:call-template>
        
-       <div class="tab_item active">
-               <xsl:choose>
-                       <xsl:when 
test="closed_check_items_and_cases/child::node()">
-                       <ul class="check_items">
-                               <xsl:for-each 
select="closed_check_items_and_cases">
-                                       <xsl:choose>
-                                               <xsl:when 
test="cases_array/child::node()">
-                                                       <li 
class="check_item_case">
-                                                               
<h4><span><xsl:value-of select="control_item/title"/></span></h4>
-                                                               <ul>            
-                                                                       
<xsl:for-each select="cases_array">
-                                                                               
<xsl:variable name="cases_id"><xsl:value-of select="id"/></xsl:variable>
-                                                                               
<li>
-                                                                               
<!--  ==================== COL1: ORDERNR ===================== -->
-                                                                               
<div class="col_1">
-                                                                               
        <span class="order_nr"><xsl:number /></span>.
-                                                                               
</div>
+                       <div class="tab_item active">
+                               <xsl:choose>
+                                       <xsl:when 
test="closed_check_items_and_cases/child::node()">
+                                               <ul class="check_items">
+                                                       <xsl:for-each 
select="closed_check_items_and_cases">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="cases_array/child::node()">
+                                                                               
<li class="check_item_case">
+                                                                               
        <h4>
+                                                                               
                <span>
+                                                                               
                        <xsl:value-of select="control_item/title"/>
+                                                                               
                </span>
+                                                                               
        </h4>
+                                                                               
        <ul>
+                                                                               
                <xsl:for-each select="cases_array">
+                                                                               
                        <xsl:variable name="cases_id">
+                                                                               
                                <xsl:value-of select="id"/>
+                                                                               
                        </xsl:variable>
+                                                                               
                        <li>
+                                                                               
                                <!--  ==================== COL1: ORDERNR 
===================== -->
+                                                                               
                                <div class="col_1">
+                                                                               
                                        <span class="order_nr">
+                                                                               
                                                <xsl:number />
+                                                                               
                                        </span>.
+                                                                               
                                </div>
                                                                                
-                                                                               
<!--  ==================== COL2: CASE CONTENT ===================== -->
-                                                                               
<div class="col_2">
+                                                                               
                                <!--  ==================== COL2: CASE CONTENT 
===================== -->
+                                                                               
                                <div class="col_2">
                                                                                
-                                                                               
        <!--  =============== SHOW CASE INFO ============= -->
-                                                                               
        <div class="case_info">
+                                                                               
                                        <!--  =============== SHOW CASE INFO 
============= -->
+                                                                               
                                        <div class="case_info">
                                                                                
                                                                                
                                
-                                                                               
                 <xsl:choose>
-                                                                               
                          <xsl:when test="component_descr != ''">
-                                                                               
                                  <div class="row">
-                                                                               
                                        <label>
-                                                                               
                                                <xsl:value-of 
select="php:function('lang','component')" />
-                                                                               
                                        </label> 
-                                                                               
                                  </div>
-                                                                               
                                   <div class="component_descr">
-                                                                               
                                        <xsl:value-of select="component_descr"/>
-                                                                               
                                  </div>
-                                                                               
                         </xsl:when>
-                                                                               
                </xsl:choose>
+                                                                               
                                                <xsl:choose>
+                                                                               
                                                        <xsl:when 
test="component_descr != ''">
+                                                                               
                                                                <div 
class="row">
+                                                                               
                                                                        <label>
+                                                                               
                                                                                
<xsl:value-of select="php:function('lang','component')" />
+                                                                               
                                                                        </label>
+                                                                               
                                                                </div>
+                                                                               
                                                                <div 
class="component_descr">
+                                                                               
                                                                        
<xsl:value-of select="component_descr"/>
+                                                                               
                                                                </div>
+                                                                               
                                                        </xsl:when>
+                                                                               
                                                </xsl:choose>
 
-                                                                               
          <!--  DESCRIPTION -->
-                                                                               
          <div class="row">
-                                                                               
                <label>Beskrivelse:</label> 
-                                                                               
          </div>
+                                                                               
                                                <xsl:if test="measurement !=''">
+                                                                               
                                                        <!--  MEASUREMENT -->
+                                                                               
                                                        <div class="row">
+                                                                               
                                                                
<label>Måleverdi:</label>
+                                                                               
                                                                <span 
class="measurement">
+                                                                               
                                                                        
<xsl:value-of select="measurement"/>
+                                                                               
                                                                </span>
+                                                                               
                                                        </div>
+                                                                               
                                                </xsl:if>
 
-                                                                               
                <!--  DESCRIPTION -->
-                                                                               
                <div class="case_descr"><xsl:value-of select="descr"/></div>
-                                                                               
                <!-- === QUICK EDIT MENU === -->
-                                                                               
                <div class="quick_menu">
-                                                                               
                        <a class="open_case">
-                                                                               
                                <xsl:attribute name="href">
-                                                                               
                                        
<xsl:text>index.php?menuaction=controller.uicase.open_case</xsl:text>
-                                                                               
                                        <xsl:text>&amp;case_id=</xsl:text>
-                                                                               
                                        <xsl:value-of select="id"/>
-                                                                               
                                        <xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                                        <xsl:value-of select="//check_list/id"/>
-                                                                               
                                        
<xsl:text>&amp;phpgw_return_as=json</xsl:text>
-                                                                               
                                        <xsl:value-of select="$session_url"/>
-                                                                               
                                </xsl:attribute>
-                                                                               
                                åpne
-                                                                               
                        </a>
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="location_item_id = 0">
-                                                                               
                                        <a class="delete_case">
-                                                                               
                                                <xsl:attribute name="href">
-                                                                               
                                                        
<xsl:text>index.php?menuaction=controller.uicase.delete_case</xsl:text>
-                                                                               
                                                        
<xsl:text>&amp;case_id=</xsl:text>
-                                                                               
                                                        <xsl:value-of 
select="id"/>
-                                                                               
                                                        
<xsl:text>&amp;check_list_id=</xsl:text>
-                                                                               
                                                        <xsl:value-of 
select="//check_list/id"/>
-                                                                               
                                                        
<xsl:text>&amp;phpgw_return_as=json</xsl:text>
-                                                                               
                                                        <xsl:value-of 
select="$session_url"/>
-                                                                               
                                                </xsl:attribute>
-                                                                               
                                                slett
-                                                                               
                                        </a>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </div>
-                                                                               
        </div>
-                                                                               
</div>
-                                                                               
<!--  ==================== COL3: MESSAGE LINK ===================== -->
-                                                                               
<div class="col_3">
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="location_item_id > 0">
-                                                                               
                        <a target="_blank">
-                                                                               
                                        <xsl:attribute name="href">
-                                                                               
                                                
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
-                                                                               
                                                <xsl:text>&amp;id=</xsl:text>
-                                                                               
                                                <xsl:value-of 
select="location_item_id"/>
-                                                                               
                                                <xsl:value-of 
select="$session_url"/>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                        Vis melding
-                                                                               
                                </a>
-                                                                               
                </xsl:when>
-                                                                               
                <xsl:otherwise>
-                                                                               
                        <span class="message">Ingen melding</span>
-                                                                               
                </xsl:otherwise>
-                                                                               
        </xsl:choose>
-                                                                               
</div>  
+                                                                               
                                                <!--  DESCRIPTION -->
+                                                                               
                                                <div class="row">
+                                                                               
                                                        
<label>Beskrivelse:</label>
+                                                                               
                                                </div>
+
+                                                                               
                                                <!--  DESCRIPTION -->
+                                                                               
                                                <div class="case_descr">
+                                                                               
                                                        <xsl:value-of 
select="descr"/>
+                                                                               
                                                </div>
+                                                                               
                                                <!-- === QUICK EDIT MENU === -->
+                                                                               
                                                <div class="quick_menu">
+                                                                               
                                                        <a class="open_case">
+                                                                               
                                                                <xsl:attribute 
name="href">
+                                                                               
                                                                        
<xsl:text>index.php?menuaction=controller.uicase.open_case</xsl:text>
+                                                                               
                                                                        
<xsl:text>&amp;case_id=</xsl:text>
+                                                                               
                                                                        
<xsl:value-of select="id"/>
+                                                                               
                                                                        
<xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                                                                        
<xsl:value-of select="//check_list/id"/>
+                                                                               
                                                                        
<xsl:text>&amp;phpgw_return_as=json</xsl:text>
+                                                                               
                                                                        
<xsl:value-of select="$session_url"/>
+                                                                               
                                                                </xsl:attribute>
+                                                                               
                                                                åpne
+                                                                               
                                                        </a>
+                                                                               
                                                        <xsl:choose>
+                                                                               
                                                                <xsl:when 
test="location_item_id = 0">
+                                                                               
                                                                        <a 
class="delete_case">
+                                                                               
                                                                                
<xsl:attribute name="href">
+                                                                               
                                                                                
        <xsl:text>index.php?menuaction=controller.uicase.delete_case</xsl:text>
+                                                                               
                                                                                
        <xsl:text>&amp;case_id=</xsl:text>
+                                                                               
                                                                                
        <xsl:value-of select="id"/>
+                                                                               
                                                                                
        <xsl:text>&amp;check_list_id=</xsl:text>
+                                                                               
                                                                                
        <xsl:value-of select="//check_list/id"/>
+                                                                               
                                                                                
        <xsl:text>&amp;phpgw_return_as=json</xsl:text>
+                                                                               
                                                                                
        <xsl:value-of select="$session_url"/>
+                                                                               
                                                                                
</xsl:attribute>
+                                                                               
                                                                                
slett
+                                                                               
                                                                        </a>
+                                                                               
                                                                </xsl:when>
+                                                                               
                                                        </xsl:choose>
+                                                                               
                                                </div>
+                                                                               
                                        </div>
+                                                                               
                                </div>
+                                                                               
                                <!--  ==================== COL3: MESSAGE LINK 
===================== -->
+                                                                               
                                <div class="col_3">
+                                                                               
                                        <xsl:choose>
+                                                                               
                                                <xsl:when 
test="location_item_id > 0">
+                                                                               
                                                        <a target="_blank">
+                                                                               
                                                                <xsl:attribute 
name="href">
+                                                                               
                                                                        
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
+                                                                               
                                                                        
<xsl:text>&amp;id=</xsl:text>
+                                                                               
                                                                        
<xsl:value-of select="location_item_id"/>
+                                                                               
                                                                        
<xsl:value-of select="$session_url"/>
+                                                                               
                                                                </xsl:attribute>
+                                                                               
                                                                Vis melding
+                                                                               
                                                        </a>
+                                                                               
                                                </xsl:when>
+                                                                               
                                                <xsl:otherwise>
+                                                                               
                                                        <span 
class="message">Ingen melding</span>
+                                                                               
                                                </xsl:otherwise>
+                                                                               
                                        </xsl:choose>
+                                                                               
                                </div>
                                                                                
+                                                                               
                        </li>
+                                                                               
                </xsl:for-each>
+                                                                               
        </ul>
                                                                                
</li>
-                                                                       
</xsl:for-each>
-                                                               </ul>
-                                                       </li>
-                                               </xsl:when>
-                                       </xsl:choose>
-                               </xsl:for-each>
-                       </ul>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <p>Ingen lukkede saker</p>
-                       </xsl:otherwise>
-               </xsl:choose>
+                                                                       
</xsl:when>
+                                                               </xsl:choose>
+                                                       </xsl:for-each>
+                                               </ul>
+                                       </xsl:when>
+                                       <xsl:otherwise>
+                                               <p>Ingen lukkede saker</p>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                       </div>
+               </div>
        </div>
-</div>
-</div>
 </xsl:template>

Modified: branches/dev-syncromind/phpgwapi/inc/class.asyncservice.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.asyncservice.inc.php     
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/phpgwapi/inc/class.asyncservice.inc.php     
2015-07-09 13:20:15 UTC (rev 13603)
@@ -39,7 +39,7 @@
                /**
                * Constructor
                */
-               function asyncservice()
+               function __construct()
                {
                        $this->db =& $GLOBALS['phpgw']->db;
                        $this->cronline = PHPGW_SERVER_ROOT . 
'/phpgwapi/cron/asyncservices.php '.$GLOBALS['phpgw_info']['user']['domain'];
@@ -384,6 +384,7 @@
                */
                function check_run($run_by='')
                {
+                       @set_time_limit(0);             // dont stop for an 
execution-time-limit
                        flush();
                        $error = false;
 

Modified: branches/dev-syncromind/phpgwapi/inc/pdf/extensions/CezTableImage.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/pdf/extensions/CezTableImage.php       
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/phpgwapi/inc/pdf/extensions/CezTableImage.php       
2015-07-09 13:20:15 UTC (rev 13603)
@@ -1,27 +1,27 @@
 <?php
 /**
  * syntax for the image tag:
- *
+ * 
  * <C:showimage:<filename> <opt. width> <opt. height>>
- *
+ * 
  * it is possible to specify the image width without specifying the image 
height (the image will
  * be scaled to the appropriate height).
- *
+ * 
  * supported filename in the image tag:
  * '<C:showimage:'.urlencode('http://myserver.mytld/myimage.png').'>'
  * '<C:showimage:'.urlencode('/home/my home/my image.png').'>'
  * the url encoding is required for:
  *  - files from remote servers (first entry from above)
  *  - local files with whitespaces in the directory or file names
- *
- * local files without whitespaces in their filename can be specified without
+ * 
+ * local files without whitespaces in their filename can be specified without 
  * url encoding:
- *
+ * 
  * '<C:showimage:/home/myhome/myimage.png>'
+ * 
+ * the php gd2 extension must be enabled for remote files and local gif files. 
+ * local png- and jpeg-files are supported without the gd2 extension. 
  *
- * the php gd2 extension must be enabled for remote files and local gif files.
- * local png- and jpeg-files are supported without the gd2 extension.
- *
  * @author Kristian Herpel <address@hidden>
  * @author Ole K <address@hidden>
  * @version 1.11 fix for problems with big pictures (pictures with width > 
2000px were not shown in the table)
@@ -44,12 +44,12 @@
                parent::__construct($p, $o,$t,$op);
         $this->allowedTags .= '|showimage:.*?';
        }
-
+       
        /**
         * Modification to this function from Cezpdf
-        * line 447-447: added parseImages function
-        * line 470-477: added some condition to calculate cell height
-        * line 481    : modified to set the new cell height
+        * line 495-495: added parseImages function
+        * line 518-524: added some condition to calculate cell height
+        * line 528-528: modified to set the new cell height
         */
     public function ezTable(&$data,$cols='',$title='',$options=''){
         if (!is_array($data)){
@@ -667,10 +667,10 @@
         $this->y=$y;
         return $y;
     }
-
+       
        /**
-        * parses and returns all image tags from the given text
-        *
+        * parses and returns all image tags from the given text 
+        * 
         * @param String $text input text
         * @return array found image tags
         * @access public
@@ -682,11 +682,11 @@
 
        /**
         * calculate the total height for all images in text
-        *
+        * 
         * @param String $text input text
         * @return float total height of all images in the text
         * @access public
-        */
+        */ 
        function checkForImage($text) {
                $height = 0;
                $matches = $this->getImagesFromText($text);
@@ -701,10 +701,10 @@
                }
                return $height;
        }
-
+       
        /**
         * add a given image to the document
-        *
+        * 
         * @param CezShowimageParameter $params image parameter
         * @param float $x horizontal position
         * @param float $y vertical position
@@ -715,9 +715,9 @@
         */
        function addImage(& $params, $x = 0, $y = 0, $w=0,$h=0,$quality=75) {
                if ($params->isUrl()) {
-                       if (function_exists('imagecreatefrompng')) {
+                       if (function_exists('imagecreatefrompng')) { 
                                switch($params->getImageType()) {
-
+                                       
                                        case 3: // png
                                                $image = 
imagecreatefrompng($params->getFilename());
                                        break;
@@ -731,7 +731,7 @@
                                parent::addImage($image, $x, $y, 
$params->getWidth(), $params->getHeight());
                        }
                } else {
-                       // check for image type, currently only png and jpeg 
supported
+                       // check for image type, currently only png and jpeg 
supported  
                        switch($params->getImageType()) {
                                case 3: // png
                                        
parent::addPngFromFile($params->getFilename(), $x, $y, $params->getWidth(), 
$params->getHeight());
@@ -744,16 +744,16 @@
                                break;
                        }
                }
-       }
-
+       } 
+       
        /**
         * callback method for adding an image to the document
-        *
+        * 
         * note: this method is called by the pdf generator class callback 
method <code>showImage($info)</code>
-        *
+        * 
         * @param Cezpdf $ezpdf current cezpdf object
         * @param array $info callback data array (see the callback function 
part in the R&amp;OS pdf documentation)
-        * @access public
+        * @access public 
         */
        function showimage($info) {
                if ($info['status']=='start') {
@@ -765,19 +765,19 @@
                        }
                }
        }
-
+       
        /**
         * searches for <C:showimage:...> and replaces all occurences with 
extended tag information
-        *
+        * 
         * the extended informations contains the vertical position and the 
(calculated) image
         * dimensions
-        *
+        * 
         * @param String $text text to parse
         * @param int $maxwidth optional maximal width for the image
         * @param int $maxheight optional maximal height for the image
         * @param int $currenty current vertical (y) position on the pdf page
         * @access public
-        */
+        */             
        function parseImages(&$text, $maxwidth = 0, $maxheight = 0, $currenty = 
0) {
                $matches = $this->getImagesFromText($text);
                for ($key=0; $key<count($matches[0]); $key++) {
@@ -811,14 +811,14 @@
                        $text = str_replace($matches[0][$key],$imagetag,$text);
                }
        }
-
+       
        /**
         * check for images an calculate their maximum width
-        *
-        * note: the image tags will be removed from the input text, this 
method is required due to further
+        * 
+        * note: the image tags will be removed from the input text, this 
method is required due to further 
         * calculation in the original pdf class
-        *
-        * @param String $text input text
+        * 
+        * @param String $text input text 
         * @return float calculated maximum height
         * @access public
         */
@@ -842,14 +842,14 @@
 }
 
 /**
- * parameter object
+ * parameter object 
  */
 class CezShowimageParameter {
-
+       
        var $filename = '';
        var $width = 0;
        var $height = 0;
-
+       
        var $imageType = 0;
        var $imageHeight = 0;
        var $imageWidth = 0;
@@ -857,131 +857,131 @@
        var $IMAGETYPE_GIF = 1;
        var $IMAGETYPE_JPG = 2;
        var $IMAGETYPE_PNG = 3;
-
+       
        var $fileIsUrl = false;
        var $fileIsReadable = false;
-
+       
        var $positionX = 0;
        var $positionY = 0;
 
        function CezShowimageParameter() {
-
+               
        }
-
+       
        /**
         * gets the image width
-        *
+        * 
         * @return int image width
         * @access public
         */
        function getWidth() {
                return $this->width;
        }
-
+       
        /**
-        * gets the image height
-        *
+        * gets the image height 
+        * 
         * @return int image height
         * @access public
         */
        function getHeight() {
                return $this->height;
        }
-
+       
        /**
         * gets the filename
-        *
+        * 
         * @return String filename
         * @access public
         */
        function getFilename() {
                return $this->filename;
        }
-
+       
        function getImagetype() {
                return $this->imageType;
        }
-
+       
        function getOriginalHeight() {
                return $this->imageHeight;
        }
-
+       
        function getOriginalWidth() {
                return $this->imageWidth;
        }
-
+       
        function isUrl() {
                return $this->fileIsUrl;
        }
-
+       
        function isReadable() {
                return $this->fileIsReadable;
        }
-
+       
        function getPositionX() {
                return $this->positionX;
        }
-
+       
        function getPositionY() {
                return $this->positionY;
        }
-
+       
        /**
         * @access protected
         */
        function _parse($param = '') {
                $params = explode(" ", $param);
-
+               
                $this->filename = urldecode($params[0]);
-
+               
                if (substr($this->filename,0,5)=='http:' || 
substr($this->filename,0,6)=='https:') {
                        $this->fileIsUrl = true;
                        $fd = fopen($this->filename, "r");
                        $this->fileIsReadable = ($fd!==false) ? true : false;
-                       fclose($fd);
+                       fclose($fd); 
                } else {
                        $this->fileIsUrl = false;
                        $this->fileIsReadable = is_readable($this->filename);
                }
-
+               
                if (isset($params[2]) && $params[2]>0) {
-                       $this->height = $params[2];
+                       $this->height = $params[2];     
                }
-
+               
                if (isset($params[1]) && $params[1]>0) {
                        $this->width = $params[1];
                }
-
+               
                if (isset($params[3]) && $params[3]>0) {
                        $this->positionY = $params[3];
                }
-
+               
                $_imagesize = getImagesize($this->filename);
-
+               
                if (is_array($_imagesize)) {
-
+                       
                        $this->imageType = $_imagesize[2];
-
-                       $this->imageWidth = $_imagesize[0];
+                       
+                       $this->imageWidth = $_imagesize[0]; 
                        $this->imageHeight = $_imagesize[1];
 
                }
-
+               
        }
-
+               
        /**
         * creates the parameter object from the given parameter list
-        *
+        * 
         * @param String $param parameter list as string
         * @return CezShowimageParameter parameter object
         * @access public
         */
        function  create($param = '') {
-
+               
                $obj = new CezShowimageParameter();
                $obj->_parse($param);
                return $obj;
-
+               
        }
-
+       
 }
\ No newline at end of file

Modified: branches/dev-syncromind/property/inc/class.hook_helper.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.hook_helper.inc.php      
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/property/inc/class.hook_helper.inc.php      
2015-07-09 13:20:15 UTC (rev 13603)
@@ -1085,8 +1085,11 @@
                                unset($pending_approvals);
                        }
 
-                       if ( 
isset($prefs['property']['mainscreen_showvendor_reminder'])
-                       && $prefs['property']['mainscreen_showvendor_reminder'] 
 == 'yes' )
+                       //Sigurd: Consider remove
+
+//                     if ( 
isset($prefs['property']['mainscreen_showvendor_reminder'])
+//                     && $prefs['property']['mainscreen_showvendor_reminder'] 
 == 'yes' )
+                       if(false)
                        {
                                $total_records = 0;
                                $title = 'dummy';

Modified: branches/dev-syncromind/property/inc/class.soproject.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.soproject.inc.php        
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/property/inc/class.soproject.inc.php        
2015-07-09 13:20:15 UTC (rev 13603)
@@ -1657,32 +1657,6 @@
                                        }
                                        $receipt['notice_owner'][] = 
lang('Status confirmed') . ': ' . $project['status'];
                                }
-
-                               /*
-                                 // Handled in _update_status_workorder();
-                                 if($close_pending_action)
-                                 {
-                                 $action_params = array
-                                 (
-                                 'appname'                     => 'property',
-                                 'location'                    => 
'.project.workorder',
-                                 'id'                          => 0,
-                                 'responsible'         => $this->account,
-                                 'responsible_type'  => 'user',
-                                 'action'                      => 'approval',
-                                 'remark'                      => '',
-                                 'deadline'                    => ''
-                                 );
-
-
-                                 foreach($workorders as $workorder_id)
-                                 {
-                                 $action_params['id'] =  $workorder_id;
-                                 
execMethod('property.sopending_action.close_pending_action', $action_params);
-                                 }
-                                 unset($action_params);
-                                 }
-                                */
                        }
 
                        if(isset($project['project_group']) && 
$project['project_group'])
@@ -2943,6 +2917,10 @@
                                        'deadline'                       => ''
                                );
 
+                               /*
+                                * Sigurd: Consider remove
+                               */
+/*
                                $action_params_progress = array
                                (
                                        'appname'                        => 
'property',
@@ -2954,7 +2932,7 @@
                                        'remark'                         => '',
                                        'deadline'                       => ''
                                );
-
+ */
                                $this->db->query("SELECT * FROM 
fm_workorder_status WHERE id = '{$status_new}'");
                                $this->db->next_record();
                                if($this->db->f('approved'))
@@ -2963,12 +2941,12 @@
                                }
                                if($this->db->f('in_progress'))
                                {
-                                       
execMethod('property.sopending_action.close_pending_action', 
$action_params_progress);
+//                                     
execMethod('property.sopending_action.close_pending_action', 
$action_params_progress);
                                }
                                if($this->db->f('delivered') || 
$this->db->f('closed'))
                                {
                                        
execMethod('property.sopending_action.close_pending_action', 
$action_params_approved);
-                                       
execMethod('property.sopending_action.close_pending_action', 
$action_params_progress);
+//                                     
execMethod('property.sopending_action.close_pending_action', 
$action_params_progress);
                                }
                        }
 

Modified: branches/dev-syncromind/property/inc/class.sotts.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.sotts.inc.php    2015-07-09 
09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/property/inc/class.sotts.inc.php    2015-07-09 
13:20:15 UTC (rev 13603)
@@ -1573,6 +1573,10 @@
                                
execMethod('property.sopending_action.close_pending_action', $action_params);
                                unset($action_params);
                        }
+                       /*
+                        * Sigurd: Consider remove
+                        */
+               /*
                        if ($this->db->f('in_progress') )
                        {
                                $action_params = array
@@ -1590,6 +1594,7 @@
                                
execMethod('property.sopending_action.close_pending_action', $action_params);
                                unset($action_params);
                        }
+               */
 
                        if ($this->db->f('delivered') )
                        {

Modified: branches/dev-syncromind/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.soworkorder.inc.php      
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/property/inc/class.soworkorder.inc.php      
2015-07-09 13:20:15 UTC (rev 13603)
@@ -1562,6 +1562,8 @@
                                        
execMethod('property.sopending_action.close_pending_action', $action_params);
                                        unset($action_params);
                                }
+                               //Sigurd: Consider remove
+                               /*
                                if($this->db->f('in_progress'))
                                {
                                        $action_params = array
@@ -1578,7 +1580,8 @@
 
                                        
execMethod('property.sopending_action.close_pending_action', $action_params);
                                        unset($action_params);
-                               }
+                               }*/
+                               
                                if($this->db->f('delivered') || 
$this->db->f('closed'))
                                {
                                        $action_params = array
@@ -2953,6 +2956,8 @@
                                        
execMethod('property.sopending_action.close_pending_action', $action_params);
                                        unset($action_params);
                                }
+                               //Sigurd: Consider remove
+                               /*
                                if($this->db->f('in_progress'))
                                {
                                        $action_params = array
@@ -2969,7 +2974,7 @@
 
                                        
execMethod('property.sopending_action.close_pending_action', $action_params);
                                        unset($action_params);
-                               }
+                               }*/
                                if($this->db->f('delivered') || 
$this->db->f('closed'))
                                {
                                        $action_params = array

Modified: branches/dev-syncromind/property/inc/class.uitts.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uitts.inc.php    2015-07-09 
09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/property/inc/class.uitts.inc.php    2015-07-09 
13:20:15 UTC (rev 13603)
@@ -2081,6 +2081,8 @@
                                                
$receipt['message'][]=array('msg'=>lang('%1 is notified',$_address));
                                                
$historylog->add('M',$id,"{$_to}{$attachment_log}");
                                                
$receipt['message'][]=array('msg'=>lang('Workorder is sent by email!'));
+                                       //Sigurd: Consider remove
+                                       /*
                                                $action_params = array
                                                        (
                                                                'appname'       
                => 'property',
@@ -2094,6 +2096,7 @@
                                                        );
 
                                                $reminds = 
execMethod('property.sopending_action.set_pending_action', $action_params);
+                                        */
                                        }
                                }
                                else

Modified: branches/dev-syncromind/property/inc/class.uiwo_hour.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiwo_hour.inc.php        
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/property/inc/class.uiwo_hour.inc.php        
2015-07-09 13:20:15 UTC (rev 13603)
@@ -1199,7 +1199,8 @@
                                QRcode::png($code_text,$filename);
                                $sms_data['encoded_text'] = 
'data:image/png;base64,' . base64_encode(file_get_contents($filename));
                        }
-
+                       $lang_reminder = '';
+/*
                        $action_params = array
                                (
                                        'appname'                       => 
'property',
@@ -1213,8 +1214,6 @@
                                );
 
 
-                       $lang_reminder = '';
-/*
                        $pending_action = 
execMethod('property.sopending_action.get_pending_action', $action_params);
 
                        $lang_reminder = '';
@@ -1515,7 +1514,8 @@
                                                
$sms->websend2pv($this->account,$to_sms_phone,str_replace(array('__order_id__'),
 array($workorder_id), $this->config->config_data['sms_client_order_notice']));
                                                
$historylog->add('MS',$workorder_id,$to_sms_phone);
                                        }
-                                       
+                               //Sigurd: Consider remove
+                               /*
                                        if( 
$this->boworkorder->order_sent_adress )
                                        {
                                                $action_params = array
@@ -1532,6 +1532,7 @@
 
                                                $reminds = 
execMethod('property.sopending_action.set_pending_action', $action_params);
                                        }
+                        */
                                }
                                else
                                {

Modified: 
branches/dev-syncromind/property/inc/cron/default/Import_fra_agresso_X205.php
===================================================================
--- 
branches/dev-syncromind/property/inc/cron/default/Import_fra_agresso_X205.php   
    2015-07-09 09:31:00 UTC (rev 13602)
+++ 
branches/dev-syncromind/property/inc/cron/default/Import_fra_agresso_X205.php   
    2015-07-09 13:20:15 UTC (rev 13603)
@@ -74,7 +74,7 @@
                        $now = time() + (int) 
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] * 3600;
 
                        $now_hour = date('G',$now );
-                       $now_day = date('N',$now );             
+                       $now_day = date('N',$now );
 
                        if(($now_hour < 6 || $now_hour > 17) || $now_day > 5)
                        {
@@ -94,14 +94,14 @@
                        $this->get_files();
                        $dirname = 
$this->config->config_data['import']['local_path'];
                        // prevent path traversal
-                       if ( preg_match('/\./', $dirname) 
+                       if ( preg_match('/\./', $dirname)
                         || !is_dir($dirname) )
                        {
                                return array();
                        }
 
                        $file_list = array();
-                       $dir = new DirectoryIterator($dirname); 
+                       $dir = new DirectoryIterator($dirname);
                        if ( is_object($dir) )
                        {
                                foreach ( $dir as $file )
@@ -173,7 +173,7 @@
                {
                        $dirname = 
$this->config->config_data['import']['local_path'];
 
-                       if ( preg_match('/\./', $dirname) 
+                       if ( preg_match('/\./', $dirname)
                         || !is_dir($dirname) )
                        {
                                return array();
@@ -181,7 +181,7 @@
 
                        $archive = "{$dirname}/archive";
                        $file_list = array();
-                       $dir = new DirectoryIterator($archive); 
+                       $dir = new DirectoryIterator($archive);
                        if ( is_object($dir) )
                        {
                                foreach ( $dir as $file )
@@ -362,7 +362,7 @@
                                                        if( stripos( 
$file_name, 'Px205' ) === 0)
                                                        {
                                                //              
_debug_array($file_name);
-                                                               $file_remote = 
"{$directory_remote}/{$file_name}";         
+                                                               $file_remote = 
"{$directory_remote}/{$file_name}";
                                                                $file_local = 
"{$directory_local}/{$file_name}";
 
                                                                $stream = 
fopen("ssh2.sftp://$sftp$file_remote";, 'r');
@@ -574,13 +574,8 @@
                                $sql = 'SELECT id FROM fm_vendor WHERE id = ' . 
(int) $vendor_id;
                                $this->db->query($sql,__LINE__,__FILE__);
 
-                               if(!abs($belop) > 0)
+                               if(!$_data['SUPPLIER.CODE'])
                                {
-                                       $this->receipt['error'][] = array('msg' 
=> "Importeres ikke: Beløpet er 0 for Skanningreferanse: 
{$_data['SCANNINGNO']}, FakturaNr: {$fakturanr}, fil: {$file}");
-                                       $this->skip_import = true;              
                
-                               }
-                               else if(!$_data['SUPPLIER.CODE'])
-                               {
                                        $this->receipt['error'][] = array('msg' 
=> "LeverandørId ikke angitt for faktura: {$_data['SCANNINGNO']}");
                                        $this->skip_import = true;
                                }
@@ -656,7 +651,7 @@
                        {
                                _debug_array("Skip import - file: {$file}");
                        }
-                       
+
                        if($this->skip_import)
                        {
                                $this->skip_import = false;
@@ -746,7 +741,7 @@
                                $order_info['order_exist'] = true;
                        }
                        if ($this->db->f('location_code'))
-                       { 
+                       {
                                $parts = 
explode('-',$this->db->f('location_code'));
                                $order_info['dima'] = implode('', $parts);
                                $order_info['loc1'] = $parts[0];
@@ -756,7 +751,7 @@
                        $order_info['spbudact_code']            = 
$this->db->f('account_id');
                        $order_info['dimb']                                     
= $this->db->f('ecodimb');
                        $order_info['dime']                                     
= $this->db->f('category');
-                       $order_info['title']                            = 
$this->db->f('title',true);                   
+                       $order_info['title']                            = 
$this->db->f('title',true);
 
                        $janitor_user_id                                        
= $this->db->f('user_id');
                        $order_info['janitor']                          = 
$GLOBALS['phpgw']->accounts->get($janitor_user_id)->lid;
@@ -799,4 +794,4 @@
                        }
                        return false;
                }
-       }
+       }
\ No newline at end of file

Modified: 
branches/dev-syncromind/property/inc/custom/default/EBF_update_ticket_on_project_change.php
===================================================================
--- 
branches/dev-syncromind/property/inc/custom/default/EBF_update_ticket_on_project_change.php
 2015-07-09 09:31:00 UTC (rev 13602)
+++ 
branches/dev-syncromind/property/inc/custom/default/EBF_update_ticket_on_project_change.php
 2015-07-09 13:20:15 UTC (rev 13603)
@@ -25,7 +25,18 @@
 
                public function check_values($project, $values_attribute)
                {
-                       $origin = $this->interlink->get_relation('property', 
'.project', $project['id'], 'origin');
+                       if(isset($project['id']) && $project['id'])
+                       {
+                               $origin = 
$this->interlink->get_relation('property', '.project', $project['id'], 
'origin');
+                       }
+                       else if (isset($project['origin']) && 
is_array($project['origin']))
+                       {
+                               $origin = $project['origin'];
+                       }
+                       else
+                       {
+                               $origin = array();
+                       }
                        $ids = array();
                        foreach($origin as $_origin)
                        {
@@ -38,6 +49,7 @@
                                }
                        }
 
+
                        foreach($ids as $id)
                        {
                                $this->update_ticket($id, $project, 
$values_attribute);
@@ -46,12 +58,30 @@
 
                private function update_ticket($id, $project, $values_attribute)
                {
-                       $finnish_date   = (int)$project['end_date'];
-                       if(!$finnish_date)
+                       $_finnish_date  = (int)$project['end_date'];
+                       if(!$_finnish_date)
                        {
                                return;
                        }
 
+                       $finnish_date = $_finnish_date;
+                       $note = 'FerdigDato er automatisk til prosjekt 
sluttDato';
+
+                       if($project['b_account_id'] == 48) // klargjøring
+                       {
+                               //search for 2 working day delay
+                               for ( $i=2; $i<10; $i++ )
+                               {
+                                       $finnish_date = $_finnish_date + (86400 
* $i);
+                                       $working_days = 
phpgwapi_datetime::get_working_days($_finnish_date, $finnish_date);
+                                       if($working_days == 2)
+                                       {
+                                               $note = 'FerdigDato er 
automatisk oppdatert til 2 virkedager etter prosjekt sluttDato';
+                                               break;
+                                       }
+                               }
+                       }
+
                        $this->db->query("SELECT finnish_date, finnish_date2 
FROM fm_tts_tickets WHERE id='$id'",__LINE__,__FILE__);
                        $this->db->next_record();
 
@@ -77,6 +107,7 @@
                        {
                                $fields_updated = array('finnish_date');
                                
$this->historylog->add('F',$id,$finnish_date,$old_value);
+                               $this->historylog->add('C',$id, $note);
                                $this->botts->mail_ticket($id, $fields_updated, 
$receipt=array(),$project['location_code'], false, true);
                                phpgwapi_cache::message_set(lang('finnish date 
changed'), 'message');
                        }

Modified: branches/dev-syncromind/property/inc/hook_settings.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/hook_settings.inc.php  2015-07-09 
09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/property/inc/hook_settings.inc.php  2015-07-09 
13:20:15 UTC (rev 13603)
@@ -92,8 +92,8 @@
        create_select_box('Default ticket status 
4','tts_status_4',$_status_tts,'The default status when entering the helpdesk 
and mainscreen');
        create_input_box('Custom title on main screen 
tickets','mainscreen_tts_title_4');
 
-       create_select_box('show pending vendor reminders on main 
screen','mainscreen_showvendor_reminder',$yes_and_no,'Reminder issued to 
vendors');
-       create_input_box('Custom title on pending vendor 
reminders','mainscreen_showvendor_reminder_title');
+//     create_select_box('show pending vendor reminders on main 
screen','mainscreen_showvendor_reminder',$yes_and_no,'Reminder issued to 
vendors');
+//     create_input_box('Custom title on pending vendor 
reminders','mainscreen_showvendor_reminder_title');
 
        create_select_box('show your pending request for approvals on main 
screen','mainscreen_showapprovals_request',$yes_and_no,'Your requests for 
Approvals waiting decisions');
        create_input_box('Custom title on pending request for 
approvals','mainscreen_showapprovals_request_title');

Modified: branches/dev-syncromind/rental/inc/class.socommon.inc.php
===================================================================
--- branches/dev-syncromind/rental/inc/class.socommon.inc.php   2015-07-09 
09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/rental/inc/class.socommon.inc.php   2015-07-09 
13:20:15 UTC (rev 13603)
@@ -5,6 +5,7 @@
        protected $like;
        protected $join;
        protected $left_join;
+       protected $sort_field;
        
        public function __construct()
        {
@@ -12,6 +13,7 @@
                $this->like                     = & $this->db->like;
                $this->join                     = & $this->db->join;
                $this->left_join        = & $this->db->left_join;
+               $this->sort_field       = null;
        }
        
                /**
@@ -218,15 +220,16 @@
                 * Sigurd: try to limit the candidates to a minimum
                 */
                $bypass_offset_check = false;
-               if($num_of_objects && isset($id_field_name_info['translated']))
+               if($num_of_objects && is_array($id_field_name_info) && 
$id_field_name_info['translated'])
                {
                        $bypass_offset_check = true;
-                       $sql_parts_filter = explode('FROM',$sql);
+                       $sql_parts_filter = explode('FROM',$sql, 2);
 
                        $sql_filter = "SELECT DISTINCT 
{$id_field_name_info['table']}.{$id_field_name_info['field']} AS 
{$id_field_name_info['translated']}";
-                       if($sort_field && $sort_field != 
$id_field_name_info['translated'])
+                       $_sort_field = $this->sort_field ? $this->sort_field : 
$sort_field;
+                       if($_sort_field && $_sort_field != 
$id_field_name_info['translated'])
                        {
-                               $sql_filter .= ",{$sort_field}";
+                               $sql_filter .= ",{$_sort_field}";
                        }
 
                        $sql_filter .= " FROM {$sql_parts_filter[1]}";
@@ -237,9 +240,12 @@
                        {
                                $ids[] = 
$this->db->f($id_field_name_info['translated']);
                        }
-                       $id_filter = 
"{$id_field_name_info['table']}.{$id_field_name_info['field']} IN(" . 
implode(',', $ids) . ') ';
 
-                       $sql = str_replace('1=1', $id_filter, $sql);
+                       if($ids)
+                       {
+                               $id_filter = 
"{$id_field_name_info['table']}.{$id_field_name_info['field']} IN(" . 
implode(',', $ids) . ') ';
+                               $sql = str_replace('1=1', $id_filter, $sql);
+                       }
                }
 
                $this->db->query($sql,__LINE__, __FILE__, false, true);

Modified: branches/dev-syncromind/rental/inc/class.socontract.inc.php
===================================================================
--- branches/dev-syncromind/rental/inc/class.socontract.inc.php 2015-07-09 
09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/rental/inc/class.socontract.inc.php 2015-07-09 
13:20:15 UTC (rev 13603)
@@ -87,8 +87,8 @@
                else if($sort_field == 'term_label'){
                        $sort_field = 'contract.term_id';
                }
+               $this->sort_field = str_ireplace(" {$dir}", '', $sort_field);
 
-
                //Contracts for billing should always be sorted on biling start
                if(isset($filters['contracts_for_billing']))
                {
@@ -277,10 +277,12 @@
                                case 'closing_due_date':
                                        $filter_clauses[] = "contract.due_date 
>= {$ts_query} AND (contract.due_date - (type.notify_before_due_date * (24 * 60 
* 60)))  <= {$ts_query}";
                                        $order = "ORDER BY contract.due_date 
ASC";
+                                       $this->sort_field = 'contract.due_date';
                                        break;
                                case 'terminated_contracts':
                                        $filter_clauses[] = "contract.date_end 
>= ({$ts_query} - (type.notify_after_termination_date * (24 * 60 * 60))) AND 
contract.date_end < {$ts_query}";
                                        $order = "ORDER BY contract.date_end 
DESC";
+                                       $this->sort_field = 'contract.date_end';
                                        break;
                                case 'ended':
                                        $filter_clauses[] = "contract.date_end 
< {$ts_query}" ;

Modified: branches/dev-syncromind/rental/inc/class.socontract_price_item.inc.php
===================================================================
--- branches/dev-syncromind/rental/inc/class.socontract_price_item.inc.php      
2015-07-09 09:31:00 UTC (rev 13602)
+++ branches/dev-syncromind/rental/inc/class.socontract_price_item.inc.php      
2015-07-09 13:20:15 UTC (rev 13603)
@@ -31,13 +31,13 @@
                $columns = array();
                
                $dir = $ascending ? 'ASC' : 'DESC';
-               $order = $sort_field ? "ORDER BY $sort_field $dir": 'ORDER BY 
agresso_id ASC, title ASC';
+               $order = $sort_field ? "ORDER BY 
rental_contract_price_item.{$sort_field} $dir": 'ORDER BY agresso_id ASC, title 
ASC';
                
                $filter_clauses = array();
                
                if(isset($filters[$this->get_id_field_name()])){
                        $id = 
$this->marshal($filters[$this->get_id_field_name()],'int');
-                       $filter_clauses[] = "{$this->get_id_field_name()} = 
{$id}";
+                       $filter_clauses[] = 
"rental_contract_price_item.{$this->get_id_field_name()} = {$id}";
                }
                if(isset($filters['contract_id'])){
                        $id = $this->marshal($filters['contract_id'],'int');




reply via email to

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