fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16971] Stable: Merge 16964:16970 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [16971] Stable: Merge 16964:16970 from trunk
Date: Sat, 12 Aug 2017 13:32:07 -0400 (EDT)

Revision: 16971
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16971
Author:   sigurdne
Date:     2017-08-12 13:32:07 -0400 (Sat, 12 Aug 2017)
Log Message:
-----------
Stable: Merge 16964:16970 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/admin/inc/hook_after_navbar.inc.php
    branches/Version-2_0-branch/controller/inc/class.uiprocedure.inc.php
    branches/Version-2_0-branch/controller/setup/phpgw_no.lang
    branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
    branches/Version-2_0-branch/property/inc/class.sobudget.inc.php
    branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
    branches/Version-2_0-branch/property/inc/class.solocation.inc.php
    branches/Version-2_0-branch/property/inc/class.soproject.inc.php
    branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php
    branches/Version-2_0-branch/property/inc/class.uibudget.inc.php
    branches/Version-2_0-branch/property/inc/class.uilocation.inc.php
    branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
    branches/Version-2_0-branch/property/inc/class.uiwo_hour.inc.php
    branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-2_0-branch/property/js/portico/project.edit.js
    branches/Version-2_0-branch/property/js/portico/workorder.edit.js
    branches/Version-2_0-branch/property/setup/default_records.inc.php
    branches/Version-2_0-branch/property/setup/phpgw_no.lang
    branches/Version-2_0-branch/property/setup/setup.inc.php
    branches/Version-2_0-branch/property/setup/tables_current.inc.php
    branches/Version-2_0-branch/property/setup/tables_update.inc.php
    branches/Version-2_0-branch/property/templates/base/project.xsl
    branches/Version-2_0-branch/property/templates/base/workorder.xsl

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

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch 2017-08-12 17:32:07 UTC (rev 16971)

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

Modified: branches/Version-2_0-branch/controller/inc/class.uiprocedure.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.uiprocedure.inc.php        
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/controller/inc/class.uiprocedure.inc.php        
2017-08-12 17:32:07 UTC (rev 16971)
@@ -199,6 +199,12 @@
                                $procedure = new controller_procedure();
                        }
 
+                       if ($procedure->get_procedure_id())
+                       {
+                               phpgwapi_cache::message_set(lang('Do not edit 
archived version' ), 'error');
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'controller.uiprocedure.view',
+                                       'id' => $procedure_id));
+                       }
 
                        if (isset($_POST['save_procedure'])) // The user has 
pressed the save button
                        {
@@ -596,7 +602,10 @@
                                        'table_header' => $table_header,
                                );
 
-                               if ($procedure->get_end_date())
+                               /*
+                                * This is not the latest version
+                                */
+                               if ($procedure->get_procedure_id())
                                {
                                        $data['inactive'] = true;
                                }

Modified: branches/Version-2_0-branch/controller/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/controller/setup/phpgw_no.lang  2017-08-12 
16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/controller/setup/phpgw_no.lang  2017-08-12 
17:32:07 UTC (rev 16971)
@@ -393,4 +393,5 @@
 lang_control_mandatory_location        controller      no      PĂ„krevd 
lokasjonsvalg
 Control types  controller      no      Kontrolltyper
 location       controller      no      Lokasjon
-document types controller      no      Dokumenttyper
\ No newline at end of file
+document types controller      no      Dokumenttyper
+Do not edit archived version   controller      no      Du kan ikke endre 
arkiverte versjoner
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/inc/class.bolocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bolocation.inc.php   
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.bolocation.inc.php   
2017-08-12 17:32:07 UTC (rev 16971)
@@ -1172,4 +1172,10 @@
                        return array('ResultSet' => array('Result' => $values));
 
                }
+
+               function get_delivery_address($loc1 = '')
+               {
+                       return $this->so->get_delivery_address($loc1);
+               }
+
        }
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/inc/class.sobudget.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sobudget.inc.php     
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.sobudget.inc.php     
2017-08-12 17:32:07 UTC (rev 16971)
@@ -695,7 +695,7 @@
                        $sum_obligation_cost = 0;
                        $obligations = array();
                        $sum_hits = 0;
-
+                       $obligation_orders = array();//for testing
                        $sum_hits = count($_temp_paid_info);
                        $_periods = array();
                        foreach ($_temp_paid_info as $order_id => &$order_info)
@@ -716,6 +716,12 @@
                                                $_taxfactor = 1 + 
($_taxcode[(int)$order_info['mva']] / 100);
                                                $_actual_cost = 
round($budget['actual_cost'] / $_taxfactor);
 
+                                               //for testing
+                                               if($budget['sum_oblications'])
+                                               {
+                                                       $obligation_orders[] = 
$order_id;
+                                               }
+
                                                $sum_actual_cost += 
$_actual_cost;
                                                if 
((int)$budget['actual_period'] == (int)$filter_period)
                                                {
@@ -740,7 +746,7 @@
                                        }
                                }
                        }
-
+//_debug_array(array_unique($obligation_orders));
 //_debug_array($_periods);
 //                     _debug_array($obligations);
                        //----------- ad hoc order

Modified: branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php    
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php    
2017-08-12 17:32:07 UTC (rev 16971)
@@ -64,10 +64,8 @@
                                                (
                                                'table' => 'fm_part_of_town',
                                                'id' => array('name' => 'id', 
'type' => 'int', 'descr' => lang('id')),
-                                               'fields' => array
-                                                       (
-                                                       array
-                                                               (
+                                               'fields' => array(
+                                                       array(
                                                                'name' => 
'name',
                                                                'descr' => 
lang('name'),
                                                                'type' => 
'varchar',
@@ -74,8 +72,12 @@
                                                                'nullable' => 
false,
                                                                'size' => 20
                                                        ),
-                                                       array
-                                                               (
+                                                       array(
+                                                               'name' => 
'delivery_address',
+                                                               'descr' => 
lang('delivery address'),
+                                                               'type' => 'text'
+                                                       ),
+                                                       array(
                                                                'name' => 
'district_id',
                                                                'descr' => 
lang('district'),
                                                                'type' => 
'select',
@@ -574,13 +576,16 @@
                                                (
                                                'table' => 'fm_district',
                                                'id' => array('name' => 'id', 
'type' => 'int'),
-                                               'fields' => array
-                                                       (
-                                                       array
-                                                               (
+                                               'fields' => array(
+                                                       array(
                                                                'name' => 
'descr',
                                                                'descr' => 
lang('descr'),
                                                                'type' => 
'varchar'
+                                                       ),
+                                                       array(
+                                                               'name' => 
'delivery_address',
+                                                               'descr' => 
lang('delivery address'),
+                                                               'type' => 'text'
                                                        )
                                                ),
                                                'edit_msg' => lang('edit'),

Modified: branches/Version-2_0-branch/property/inc/class.solocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.solocation.inc.php   
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.solocation.inc.php   
2017-08-12 17:32:07 UTC (rev 16971)
@@ -2162,4 +2162,40 @@
                        return $values;
                }
 
+               function get_delivery_address($loc1 = '')
+               {
+                       $loc1 = $this->db->db_addslashes($loc1);
+                       $sql = "SELECT delivery_address FROM fm_location1 WHERE 
loc1 = '$loc1'";
+                       $this->db->query($sql, __LINE__, __FILE__);
+                       $this->db->next_record();
+                       $delivery_address = $this->db->f('delivery_address', 
true);
+
+                       if($delivery_address)
+                       {
+                               return $delivery_address;
+                       }
+
+                       $sql = "SELECT fm_part_of_town.delivery_address FROM 
fm_location1"
+                               . " {$this->join} fm_part_of_town ON 
(fm_location1.part_of_town_id = fm_part_of_town.id)"
+                               . "WHERE loc1 = '$loc1'";
+                       $this->db->query($sql, __LINE__, __FILE__);
+                       $this->db->next_record();
+                       $delivery_address = $this->db->f('delivery_address', 
true);
+
+                       if($delivery_address)
+                       {
+                               return $delivery_address;
+                       }
+
+                       $sql = "SELECT fm_district.delivery_address FROM 
fm_location1 "
+                               . " {$this->join} fm_part_of_town ON 
(fm_location1.part_of_town_id = fm_part_of_town.id)"
+                               . " {$this->join} fm_district ON 
(fm_part_of_town.district_id = fm_district.id)"                        
+                               . " WHERE loc1 = '$loc1'";
+                       $this->db->query($sql, __LINE__, __FILE__);
+                       $this->db->next_record();
+                       $delivery_address = $this->db->f('delivery_address', 
true);
+
+                       return $delivery_address;
+
+               }
        }
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soproject.inc.php    
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.soproject.inc.php    
2017-08-12 17:32:07 UTC (rev 16971)
@@ -889,8 +889,7 @@
                        $project = array();
                        if ($this->db->next_record())
                        {
-                               $project = array
-                                       (
+                               $project = array(
                                        'id' => $project_id,
                                        'project_id' => 
$this->db->f('id'),//consider this one
                                        'project_type_id' => 
$this->db->f('project_type_id'),
@@ -924,7 +923,8 @@
                                        'b_account_id' => 
$this->db->f('b_account_id'),
                                        'contact_id' => 
$this->db->f('contact_id'),
                                        'inherit_location' => 
$this->db->f('inherit_location'),
-                                       'periodization_id' => 
$this->db->f('periodization_id')
+                                       'periodization_id' => 
$this->db->f('periodization_id'),
+                                       'delivery_address' => 
$this->db->f('delivery_address', true),
                                );
 
                                if (isset($values['attributes']) && 
is_array($values['attributes']))
@@ -1044,7 +1044,7 @@
                        {
                                $query_order_id = (int) $query;
                                $query = $this->db->db_addslashes($query);
-                               
+
                                $filtermethod .= " AND (fm_workorder.id = 
'{$query_order_id}' OR fm_vendor.org_name {$this->like} '%$query%')";
                        }
 
@@ -1068,7 +1068,7 @@
                                . " {$this->join} fm_workorder_budget ON 
fm_workorder.id = fm_workorder_budget.order_id"
                                . " {$this->left_join} fm_vendor ON 
fm_vendor.id = fm_workorder.vendor_id"
                                . " WHERE project_id={$project_id} 
{$filter_year}{$filtermethod}", __LINE__, __FILE__);
-                               
+
                        $this->db->next_record();
                        $this->total_records = (int)$this->db->f('cnt');
 
@@ -1158,7 +1158,7 @@
                                else
                                {
                                        $_diff_start = abs($entry['budget']) > 
0 ? $entry['budget'] : $entry['combined_cost'];
-                                       $entry['diff'] = $_diff_start - 
$entry['obligation'] - $entry['actual_cost'];                           
+                                       $entry['diff'] = $_diff_start - 
$entry['obligation'] - $entry['actual_cost'];
                                }
                        }
 
@@ -1285,12 +1285,13 @@
                                $project['contact_id'],
                                $project['inherit_location'],
                                $project['budget_periodization'],
+                               $project['delivery_address'],
                        );
 
                        $values = $this->db->validate_insert($values);
 
                        $this->db->query("INSERT INTO fm_project 
(id,project_type_id,external_project_id,name,access,category,entry_date,start_date,end_date,coordinator,status,"
-                               . 
"descr,budget,reserve,location_code,address,key_deliver,key_fetch,other_branch,key_responsible,user_id,ecodimb,account_group,b_account_id,contact_id,inherit_location,periodization_id
 $cols) "
+                               . 
"descr,budget,reserve,location_code,address,key_deliver,key_fetch,other_branch,key_responsible,user_id,ecodimb,account_group,b_account_id,contact_id,inherit_location,periodization_id,delivery_address
 $cols) "
                                . "VALUES ($values $vals )", __LINE__, 
__FILE__);
 
                        /**
@@ -1472,6 +1473,7 @@
                                'b_account_id' => $project['b_account_id'],
                                'contact_id' => $project['contact_id'],
                                'inherit_location' => 
$project['inherit_location'],
+                               'delivery_address' => 
$project['delivery_address'],
                        );
 
                        if (isset($project['budget_periodization']) && 
$project['budget_periodization'])

Modified: branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php  
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.soworkorder.inc.php  
2017-08-12 17:32:07 UTC (rev 16971)
@@ -1009,7 +1009,8 @@
                                        'order_dim1' => 
$this->db->f('order_dim1'),
                                        'order_sent' => 
$this->db->f('order_sent'),
                                        'order_received' => 
$this->db->f('order_received'),
-                                       'order_received_amount' => 
$this->db->f('order_received_amount')
+                                       'order_received_amount' => 
$this->db->f('order_received_amount'),
+                                       'delivery_address' => 
$this->db->f('delivery_address', true),
                                        );
 
                                $sql = "SELECT periodization_id,"
@@ -1318,7 +1319,8 @@
                                $workorder['service_id'],
                                $workorder['building_part'],
                                $workorder['order_dim1'],
-                               isset($workorder['vendor_email']) && 
is_array($workorder['vendor_email']) ? implode(',', $workorder['vendor_email']) 
: ''
+                               isset($workorder['vendor_email']) && 
is_array($workorder['vendor_email']) ? implode(',', $workorder['vendor_email']) 
: '',
+                               $workorder['delivery_address']
                        );
 
                        $values = $this->db->validate_insert($values);
@@ -1327,7 +1329,7 @@
                                . 
"tender_received,inspection_on_completion,status,"
                                . 
"descr,budget,combined_cost,account_id,rig_addition,addition,key_deliver,key_fetch,vendor_id,charge_tenant,"
                                . 
"user_id,ecodimb,category,billable_hours,contract_sum,approved,continuous,fictive_periodization,"
-                               . "contract_id, tax_code, unspsc_code, 
service_id,building_part, order_dim1, mail_recipients  $cols) "
+                               . "contract_id, tax_code, unspsc_code, 
service_id,building_part, order_dim1, mail_recipients, delivery_address $cols) "
                                . "VALUES ( {$values} {$vals})", __LINE__, 
__FILE__);
 
                        $this->db->query("INSERT INTO fm_orders (id,type) 
VALUES ({$id},'workorder')");
@@ -1488,6 +1490,7 @@
                                'building_part' => $workorder['building_part'],
                                'order_dim1' => $workorder['order_dim1'],
                                'mail_recipients' => 
isset($workorder['vendor_email']) && is_array($workorder['vendor_email']) ? 
implode(',', $workorder['vendor_email']) : '',
+                               'delivery_address'      => 
$this->db->db_addslashes($workorder['delivery_address'])
                        );
 
                        
if(isset($config->config_data['enable_order_service_id']) && 
$config->config_data['enable_order_service_id'])

Modified: branches/Version-2_0-branch/property/inc/class.uibudget.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uibudget.inc.php     
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.uibudget.inc.php     
2017-08-12 17:32:07 UTC (rev 16971)
@@ -952,10 +952,10 @@
                                                'obligation_ex' => 
$entry['obligation'],
                                                'obligation' => 
number_format($entry['obligation'], 0, ',', ' '),
                                                'link_obligation' => 
urldecode($GLOBALS['phpgw']->link('/index.php', array(
-                                                               'menuaction' => 
'property.uiworkorder.index', 'filter' => 'all', 'paid' => 1,
+                                                               'menuaction' => 
'property.uiworkorder.index', 'filter' => 'all',// 'paid' => 1,
                                                                'district_id' 
=> $entry['district_id'], 'b_group' => $entry['grouping'],
                                                                'b_account' => 
$entry['b_account'],
-                                                               'start_date' => 
$start_date, 'end_date' => $end_date, 'ecodimb' => $entry['ecodimb'],
+                                                               
'filter_start_date' => $start_date, 'filter_end_date' => $end_date, 'ecodimb' 
=> $entry['ecodimb'],
                                                                'status_id' => 
'all', 'obligation' => true))),
                                                'actual_cost_ex' => 
$entry['actual_cost'],
                                                'actual_cost_period' => 
number_format($entry['actual_cost_period'], 0, ',', ' '),

Modified: branches/Version-2_0-branch/property/inc/class.uilocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uilocation.inc.php   
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.uilocation.inc.php   
2017-08-12 17:32:07 UTC (rev 16971)
@@ -68,7 +68,8 @@
                        'summary' => true,
                        'columns' => true,
                        'update_location' => true,
-                       'responsiblility_role' => true
+                       'responsiblility_role' => true,
+                       'get_delivery_address'  => true
                );
 
                function __construct()
@@ -1006,6 +1007,13 @@
 
                                parent.JqueryPortico.onPopupClose("close");
 
+                               try
+                               {
+                                       parent.on_loc1_updated();
+                               }
+                               catch(err)
+                               {}
+
                        });
 
        });
@@ -2891,4 +2899,16 @@
                        //print_r($data); die;
                        self::render_template_xsl('datatable_jquery', $data);
                }
+
+               function get_delivery_address()
+               {
+                       $loc1 = phpgw::get_var('loc1');
+
+                       $delivery_address = 
$this->bo->get_delivery_address($loc1);
+                       
+                       return array(
+                               'delivery_address' => $delivery_address
+                       );
+
+               }
        }
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiproject.inc.php    
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.uiproject.inc.php    
2017-08-12 17:32:07 UTC (rev 16971)
@@ -2047,6 +2047,13 @@
                        $project_type_id = isset($values['project_type_id']) && 
$values['project_type_id'] ? $values['project_type_id'] : 
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_project_type'];
                        $active_tab = phpgw::get_var('active_tab', 'string', 
'REQUEST', 'general');
 
+                       $delivery_address = $values['delivery_address'];
+
+                       if(!$delivery_address && 
!empty($values['location_data']['loc1']))
+                       {
+                               $delivery_address = 
CreateObject('property.solocation')->get_delivery_address($values['location_data']['loc1']);
+                       }
+
                        $data = array
                                (
                                'datatable_def' => $datatable_def,
@@ -2139,6 +2146,7 @@
                                'lang_remark_statustext' => lang('Enter a 
remark to add to the history of the project'),
                                'lang_remark' => lang('remark'),
                                'value_remark' => isset($values['remark']) ? 
$values['remark'] : '',
+                               'value_delivery_address' => $delivery_address,
                                'lang_done_statustext' => lang('Back to the 
list'),
                                'lang_save_statustext' => lang('Save the 
project'),
                                'lang_no_cat' => lang('Select category'),

Modified: branches/Version-2_0-branch/property/inc/class.uiwo_hour.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiwo_hour.inc.php    
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.uiwo_hour.inc.php    
2017-08-12 17:32:07 UTC (rev 16971)
@@ -2002,8 +2002,13 @@
                        $location_code = 
isset($common_data['workorder']['location_code']) && 
$common_data['workorder']['location_code'] ? 
$common_data['workorder']['location_code'] : $project['location_code'];
 
                        $delivery_address = lang('delivery address') . ':';
-                       if 
(isset($this->config->config_data['delivery_address']) && 
$this->config->config_data['delivery_address'])
+
+                       if($common_data['workorder']['delivery_address'])
                        {
+                               $delivery_address .= 
"\n{$common_data['workorder']['delivery_address']}";
+                       }
+                       else if 
(isset($this->config->config_data['delivery_address']) && 
$this->config->config_data['delivery_address'])
+                       {
                                $delivery_address .= 
"\n{$this->config->config_data['delivery_address']}";
                        }
                        else

Modified: branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php  
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php  
2017-08-12 17:32:07 UTC (rev 16971)
@@ -426,10 +426,17 @@
                                                'b_group' => $this->b_group,
                                                'paid' => $this->paid,
                                                'obligation' => 
$this->obligation,
+                                               'ecodimb'       => 
$this->ecodimb,
                                                'phpgw_return_as' => 'json'
                                        )),
                                        'download' => self::link(array(
                                                'menuaction' => 
'property.uiworkorder.download',
+                                               'start_date' => $start_date,
+                                               'end_date' => $end_date,
+                                               'b_group' => $this->b_group,
+                                               'paid' => $this->paid,
+                                               'obligation' => 
$this->obligation,
+                                               'ecodimb'       => 
$this->ecodimb,
                                                'export' => true,
                                                'allrows' => true
                                        )),
@@ -1621,8 +1628,9 @@
                        else
                        {
                                $location_template_type = 'view';
+                               $_location_data = 
!empty($project['location_data']) ? $project['location_data'] : '';
                                $location_data = 
$bolocation->initiate_ui_location(array(
-                                       'values' => 
(isset($project['location_data']) ? $project['location_data'] : ''),
+                                       'values' => $_location_data,
                                        'type_id' => 
(isset($project['location_data']['location_code']) ? count(explode('-', 
$project['location_data']['location_code'])) : ''),
                                        'no_link' => false, // disable lookup 
links for location type less than type_id
                                        'tenant' => 
(isset($project['location_data']['tenant_id']) ? 
$project['location_data']['tenant_id'] : ''),
@@ -2483,7 +2491,13 @@
                                )
                        );
 
+                       $delivery_address       = $values['delivery_address'] ? 
$values['delivery_address'] : $project['delivery_address'];
 
+                       if(!$delivery_address && 
!empty($_location_data['loc1']))
+                       {
+                               $delivery_address = 
CreateObject('property.solocation')->get_delivery_address($_location_data['loc1']);
+                       }
+
                        $data = array(
                                'datatable_def' => $datatable_def,
                                'periodization_data' => $periodization_data,
@@ -2657,7 +2671,8 @@
                                'order_dim1_list' => $order_dim1_list,
                                'value_order_sent'      => 
!!$values['order_sent'],
                                'value_order_received'  => 
$values['order_received'] ? 
$GLOBALS['phpgw']->common->show_date($values['order_received']) : '[ DD/MM/YYYY 
- H:i ]',
-                               'value_order_received_amount' => (int) 
$values['order_received_amount']
+                               'value_order_received_amount' => (int) 
$values['order_received_amount'],
+                               'value_delivery_address'        => 
$delivery_address
                        );
 
                        $appname = lang('Workorder');

Modified: branches/Version-2_0-branch/property/js/portico/project.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/project.edit.js     
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/js/portico/project.edit.js     
2017-08-12 17:32:07 UTC (rev 16971)
@@ -132,7 +132,7 @@
                validatorFunction: function (value, $el, config, languaje, 
$form)
                {
                        var validatet_category = $('#validatet_category').val();
-                       if(validatet_category ==1)
+                       if (validatet_category == 1)
                        {
                                return true;
                        }
@@ -247,7 +247,6 @@
                });
        }
 
-
 });
 
 function addSubEntry()
@@ -291,11 +290,11 @@
 this.validate_form = function ()
 {
        conf = {
-       //      modules: 'date, security, file',
+               //      modules: 'date, security, file',
                validateOnBlur: false,
                scrollToTopOnError: true,
                errorMessagePosition: 'top'
-       //      language: validateLanguage
+                       //      language: validateLanguage
        };
 
        return $('form').isValid(false, conf);
@@ -397,3 +396,30 @@
 strURL = phpGWLink('index.php', oArgs, true);
 JqueryPortico.autocompleteHelper(strURL, 'b_account_name', 'b_account_id', 
'b_account_container');
 
+
+on_loc1_updated = function ()
+{
+       if(     $("#delivery_address").val() )
+       {
+               return;
+       }
+
+       var loc1 = $("#loc1").val();
+
+       var oArgs = {menuaction: 'property.uilocation.get_delivery_address', 
loc1: loc1};
+       var requestUrl = phpGWLink('index.php', oArgs, true);
+
+       $.ajax({
+               type: 'POST',
+               dataType: 'json',
+               url: requestUrl,
+               success: function (data)
+               {
+                       if (data != null)
+                       {
+                               
$("#delivery_address").val(data.delivery_address);
+
+                       }
+               }
+       });
+};

Modified: branches/Version-2_0-branch/property/js/portico/workorder.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/workorder.edit.js   
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/js/portico/workorder.edit.js   
2017-08-12 17:32:07 UTC (rev 16971)
@@ -659,3 +659,30 @@
                }
        });
 }
+
+on_loc1_updated = function ()
+{
+       if(     $("#delivery_address").val() )
+       {
+               return;
+       }
+
+       var loc1 = $("#loc1").val();
+
+       var oArgs = {menuaction: 'property.uilocation.get_delivery_address', 
loc1: loc1};
+       var requestUrl = phpGWLink('index.php', oArgs, true);
+
+       $.ajax({
+               type: 'POST',
+               dataType: 'json',
+               url: requestUrl,
+               success: function (data)
+               {
+                       if (data != null)
+                       {
+                               
$("#delivery_address").val(data.delivery_address);
+
+                       }
+               }
+       });
+};

Modified: branches/Version-2_0-branch/property/setup/default_records.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/default_records.inc.php  
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/setup/default_records.inc.php  
2017-08-12 17:32:07 UTC (rev 16971)
@@ -661,9 +661,10 @@
        $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 15, 'owner_id', 'owner_id', 'owner_id', 'I', NULL, NULL, NULL, 
4, NULL, NULL, 'True', NULL)");
        $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 16, 'change_type', 'change_type', 'change_type', 'I', NULL, 
NULL, NULL, 4, NULL, NULL, 'True', NULL)");
        $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 17, 'rental_area', 'Rental area', 'Rental area', 'N', NULL, 5, 
20, 2, NULL, 'True', 1)");
-       $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 18, 'area_gross', 'Gross area', 'Sum of the areas included 
within the outside face of the exterior walls of a building.', 'N', NULL, 5, 
20, 2, NULL, 'True', 1)");
-       $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 19, 'area_net', 'Net area', 'The wall-to-wall floor area of a 
room.', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
-       $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 20, 'area_usable', 'Usable area', 'generally measured from paint 
to paint inside the permanent walls and to the middle of partitions separating 
rooms', 'N', NULL, 5, 20, 2, NULL, 'True', 1)");
+       $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 18, 'area_gross', 'Gross area', 'Sum of the areas included 
within the outside face of the exterior walls of a building.', 'N', NULL, 6, 
20, 2, NULL, 'True', 1)");
+       $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 19, 'area_net', 'Net area', 'The wall-to-wall floor area of a 
room.', 'N', NULL, 7, 20, 2, NULL, 'True', 1)");
+       $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 20, 'area_usable', 'Usable area', 'generally measured from paint 
to paint inside the permanent walls and to the middle of partitions separating 
rooms', 'N', NULL, 8, 20, 2, NULL, 'True', 1)");
+       $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_attribute 
(location_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, precision_, scale, default_value, nullable,custom) VALUES 
($location_id, 21, 'delivery_address', 'Delivery address', 'Delivery address', 
'T', NULL, 9, NULL, NULL, NULL, 'True', 1)");
 
        $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice 
(location_id, attrib_id, id, value) VALUES ($location_id, 10, 1, 'OK')");
        $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_cust_choice 
(location_id, attrib_id, id, value) VALUES ($location_id, 10, 2, 'Not OK')");

Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-08-12 
16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-08-12 
17:32:07 UTC (rev 16971)
@@ -2226,4 +2226,5 @@
 select parent  property        no      Velg forelder
 attribute groups       property        no      Attributtgrupper
 sms text       property        no      SMS-tekst
-character left property        no      Resterende tegn
\ No newline at end of file
+character left property        no      Resterende tegn
+delivery address       property        no      Leveringsadresse
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/setup.inc.php    2017-08-12 
16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/setup/setup.inc.php    2017-08-12 
17:32:07 UTC (rev 16971)
@@ -11,7 +11,7 @@
         * @version $Id$
        */
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.713';
+       $setup_info['property']['version']              = '0.9.17.714';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: branches/Version-2_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_current.inc.php   
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/setup/tables_current.inc.php   
2017-08-12 17:32:07 UTC (rev 16971)
@@ -14,7 +14,8 @@
                'fm_district' => array(
                        'fd' => array(
                                'id' => array('type' => 'int', 'precision' => 
'2', 'nullable' => False),
-                               'descr' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True)
+                               'descr' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True),
+                               'delivery_address' => array('type' => 'text', 
'nullable' => True),
                        ),
                        'pk' => array('id'),
                        'fk' => array(),
@@ -25,7 +26,8 @@
                        'fd' => array(
                                'id' => array('type' => 'auto', 'precision' => 
'2', 'nullable' => False),
                                'name' => array('type' => 'varchar', 
'precision' => '150', 'nullable' => false),
-                               'district_id' => array('type' => 'int', 
'precision' => '2', 'nullable' => false)
+                               'district_id' => array('type' => 'int', 
'precision' => '2', 'nullable' => false),
+                               'delivery_address' => array('type' => 'text', 
'nullable' => True),
                        ),
                        'pk' => array('id'),
                        'fk' => array('fm_district' => array('district_id' => 
'id')),
@@ -199,6 +201,7 @@
                                        'nullable' => True, 'default' => 
'0.00'),
                                'area_usable' => array('type' => 'decimal', 
'precision' => '20', 'scale' => '2',
                                        'nullable' => True, 'default' => 
'0.00'),
+                               'delivery_address' => array('type' => 'text', 
'nullable' => True),
                                'modified_by' => array('type' => 'int', 
'precision' => 4, 'nullable' => true),
                                'modified_on' => array('type' => 'timestamp', 
'nullable' => True, 'default' => 'current_timestamp')
                        ),
@@ -231,6 +234,7 @@
                                        'nullable' => True, 'default' => 
'0.00'),
                                'area_usable' => array('type' => 'decimal', 
'precision' => '20', 'scale' => '2',
                                        'nullable' => True, 'default' => 
'0.00'),
+                               'delivery_address' => array('type' => 'text', 
'nullable' => True),
                                'exp_date' => array('type' => 'timestamp', 
'nullable' => True, 'default' => 'current_timestamp'),
                                'modified_by' => array('type' => 'int', 
'precision' => 4, 'nullable' => true),
                                'modified_on' => array('type' => 'timestamp', 
'nullable' => True, 'default' => 'current_timestamp')
@@ -607,6 +611,7 @@
                                'order_sent' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
                                'order_received' => array('type' => 'int', 
'precision' => 8, 'nullable' => True),
                                'order_received_amount' => array('type' => 
'decimal', 'precision' => '20', 'scale' => '2', 'nullable' => True, 'default' 
=> '0.00'),
+                               'delivery_address' => array('type' => 'text', 
'nullable' => True),
                        ),
                        'pk' => array('id'),
                        'fk' => array(),
@@ -1173,6 +1178,7 @@
                                'order_received_amount' => array('type' => 
'decimal', 'precision' => '20', 'scale' => '2', 'nullable' => True, 'default' 
=> '0.00'),
                                'mail_recipients' => array('type' => 'varchar', 
'precision' => 255, 'nullable' => True),
                                'file_attachments' => array('type' => 
'varchar', 'precision' => 255, 'nullable' => True),
+                               'delivery_address' => array('type' => 'text', 
'nullable' => True)
                        ),
                        'pk' => array('id'),
                        'ix' => array(),
@@ -1768,7 +1774,8 @@
                                'b_account_id' => array('type' => 'varchar', 
'precision' => '20', 'nullable' => True),
                                'inherit_location' => array('type' => 'int', 
'precision' => 2, 'nullable' => True,
                                        'default' => 1),
-                               'periodization_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => true)
+                               'periodization_id' => array('type' => 'int', 
'precision' => 4, 'nullable' => true),
+                               'delivery_address' => array('type' => 'text', 
'nullable' => True)
                        ),
                        'pk' => array('id'),
                        'fk' => array(),
@@ -2887,4 +2894,4 @@
                        'ix' => array(),
                        'uc' => array()
                )
-       );
+       );
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_update.inc.php    
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/setup/tables_update.inc.php    
2017-08-12 17:32:07 UTC (rev 16971)
@@ -9564,3 +9564,87 @@
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
+       /**
+       * Update property version from 0.9.17.713 to 0.9.17.714
+       *
+       */
+       $test[] = '0.9.17.713';
+
+       function property_upgrade0_9_17_713()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->query('DELETE FROM fm_cache');
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_district', 
'delivery_address', array(
+                       'type' => 'text', 'nullable' => True));
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_part_of_town', 
'delivery_address', array(
+                       'type' => 'text', 'nullable' => True));
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_location1', 
'delivery_address', array(
+                       'type' => 'text', 'nullable' => True));
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_location1_history', 
'delivery_address', array(
+                       'type' => 'text', 'nullable' => True));
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_project', 
'delivery_address', array(
+                       'type' => 'text', 'nullable' => True));
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder', 
'delivery_address', array(
+                       'type' => 'text', 'nullable' => True));
+
+
+               $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_tts_tickets', 
'delivery_address', array(
+                       'type' => 'text', 'nullable' => True));
+
+
+               $cust = array
+               (
+                       'datatype'              => 'T',
+                       'precision_'    => '',
+                       'scale'                 => '',
+                       'default_value' => '',
+                       'nullable'              => 'True',
+                       'custom'                => 1
+               );
+
+               $cust_fields = array();
+
+               $cust_fields[] = array
+               (
+                       'name' => 'delivery_address',
+                       'descr' => 'delivery address',
+                       'statustext' => 'delivery address',
+                       'cust'  => $cust
+               );
+
+               $db = & $GLOBALS['phpgw_setup']->oProc->m_odb;
+
+               foreach($cust_fields as & $field)
+               {
+
+                       $field['cust']['location_id'] = 
$GLOBALS['phpgw']->locations->get_id('property', ".location.1");
+                       $db->query("SELECT max(id) as id FROM 
phpgw_cust_attribute WHERE location_id = {$field['cust']['location_id']}");
+                       $db->next_record();
+                       $id = (int)$db->f('id');
+                       $db->query("SELECT max(attrib_sort) as attrib_sort FROM 
phpgw_cust_attribute WHERE group_id = 0 AND location_id = 
{$field['cust']['location_id']}");
+                       $db->next_record();
+
+                       $field['cust']['id']                    = $id + 1;
+                       $field['cust']['attrib_sort']   = 
(int)$db->f('attrib_sort') + 1;
+                       $field['cust']['column_name']   = $field['name'];
+                       $field['cust']['input_text']    = $field['descr'];
+                       $field['cust']['statustext']    = $field['statustext'];
+
+                       $sql = 'INSERT INTO phpgw_cust_attribute(' . 
implode(',', array_keys($field['cust'])) . ') '
+                                . ' VALUES (' . 
$db->validate_insert($field['cust']) . ')';
+                       $db->query($sql, __LINE__, __FILE__);
+               }
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.714';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }

Modified: branches/Version-2_0-branch/property/templates/base/project.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/project.xsl     
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/templates/base/project.xsl     
2017-08-12 17:32:07 UTC (rev 16971)
@@ -350,6 +350,17 @@
                                                        </div>
                                                </xsl:when>
                                        </xsl:choose>
+                                       <div class="pure-control-group">
+                                               <label for="delivery_address">
+                                                       <xsl:value-of 
select="php:function('lang', 'delivery address')"/>
+                                               </label>
+                                               <textarea  
class="pure-input-1-2" rows="6" id="delivery_address" 
name="values[delivery_address]">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'delivery address')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_delivery_address"/>
+                                               </textarea>
+                                       </div>
                                </fieldset>
                        </div>
 

Modified: branches/Version-2_0-branch/property/templates/base/workorder.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/workorder.xsl   
2017-08-12 16:54:38 UTC (rev 16970)
+++ branches/Version-2_0-branch/property/templates/base/workorder.xsl   
2017-08-12 17:32:07 UTC (rev 16971)
@@ -311,6 +311,18 @@
                                                </xsl:when>
                                        </xsl:choose>
                                        <div class="pure-control-group">
+                                               <label for="delivery_address">
+                                                       <xsl:value-of 
select="php:function('lang', 'delivery address')"/>
+                                               </label>
+                                               <textarea  
class="pure-input-1-2" rows="6" id="delivery_address" 
name="values[delivery_address]">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'delivery address')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_delivery_address"/>
+                                               </textarea>
+                                       </div>
+
+                                       <div class="pure-control-group">
                                                <label for="name">
                                                        <xsl:value-of 
select="lang_coordinator"/>
                                                </label>




reply via email to

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