fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17302] Stable: Merge 17289:17301 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [17302] Stable: Merge 17289:17301 from trunk
Date: Mon, 13 Nov 2017 08:17:29 -0500 (EST)

Revision: 17302
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17302
Author:   sigurdne
Date:     2017-11-13 08:17:29 -0500 (Mon, 13 Nov 2017)
Log Message:
-----------
Stable: Merge 17289:17301 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/admin/inc/class.bocategories.inc.php
    branches/Version-2_0-branch/controller/inc/class.uicheck_list.inc.php
    branches/Version-2_0-branch/controller/inc/class.uicomponent.inc.php
    
branches/Version-2_0-branch/controller/inc/component/class.check_list_status_info.inc.php
    
branches/Version-2_0-branch/controller/inc/component/class.check_list_status_manager.inc.php
    
branches/Version-2_0-branch/controller/inc/component/class.date_generator.inc.php
    
branches/Version-2_0-branch/controller/inc/component/class.year_calendar.inc.php
    branches/Version-2_0-branch/controller/inc/model/class.check_list.inc.php
    branches/Version-2_0-branch/controller/setup/phpgw_no.lang
    
branches/Version-2_0-branch/controller/templates/base/check_list/add_check_list.xsl
    
branches/Version-2_0-branch/controller/templates/base/check_list/edit_check_list.xsl
    branches/Version-2_0-branch/helpdesk/inc/class.menu.inc.php
    branches/Version-2_0-branch/helpdesk/inc/class.sogeneric.inc.php
    branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php
    branches/Version-2_0-branch/helpdesk/setup/default_records.inc.php
    branches/Version-2_0-branch/helpdesk/setup/setup.inc.php
    branches/Version-2_0-branch/helpdesk/setup/tables_update.inc.php
    branches/Version-2_0-branch/phpgwapi/inc/class.categories.inc.php
    branches/Version-2_0-branch/property/inc/class.sodocument.inc.php
    branches/Version-2_0-branch/property/js/portico/ajax_invoice.js

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

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch 2017-11-13 13:17:29 UTC (rev 17302)

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

Modified: branches/Version-2_0-branch/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.uicheck_list.inc.php       
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/controller/inc/class.uicheck_list.inc.php       
2017-11-13 13:17:29 UTC (rev 17302)
@@ -222,6 +222,7 @@
                                $original_deadline_date_ts = 
phpgw::get_var('deadline_ts');
                                $deadline_current = 
phpgw::get_var('deadline_current', 'bool');
                                $serie_id = phpgw::get_var('serie_id', 'int');
+                               $check_list_error_array = 
phpgw::get_var('check_list_errors');
 
                                if ($deadline_current)
                                {
@@ -247,6 +248,7 @@
                                $check_list->set_control_id($control_id);
                                $check_list->set_deadline($deadline_ts);
                                
$check_list->set_original_deadline($original_deadline_date_ts);
+                               
$check_list->set_error_msg_array($check_list_error_array);
                        }
                        else
                        {
@@ -433,7 +435,17 @@
                                $check_list_id = 
phpgw::get_var('check_list_id');
                                $check_list = 
$this->so->get_single($check_list_id);
                        }
-
+                       
+                       $current_time = time();
+                       $absolute_deadline = time() + (14 * 24 * 60 * 60);
+                       $check_list_locked = false;
+                       if($check_list->get_deadline() < $absolute_deadline)
+                       {
+                               //check list was due two weeks ago, and is 
locked
+                               $check_list_locked = true;
+                       }
+//                     echo 'tid: '.$current_time.'abs: '.$absolute_deadline;
+                       
                        $repeat_descr = '';
                        if ($serie = 
$this->so_control->get_serie($check_list->get_serie_id()))
                        {
@@ -550,6 +562,7 @@
                                'current_year' => $year,
                                'current_month_nr' => $month,
                                'current_month_name' => lang("month {$month} 
capitalized"),
+                               'check_list_locked' => $check_list_locked,
                                'building_location_code' => 
$building_location_code,
                                'location_level' => $level,
                                'required_actual_hours' => 
$required_actual_hours,
@@ -558,7 +571,6 @@
 
                        $GLOBALS['phpgw']->jqcal->add_listener('planned_date');
                        
$GLOBALS['phpgw']->jqcal->add_listener('completed_date');
-                       $GLOBALS['phpgw']->jqcal->add_listener('deadline_date');
 
                        self::add_javascript('controller', 'controller', 
'custom_ui.js');
                        self::add_javascript('controller', 'controller', 
'ajax.js');
@@ -957,6 +969,7 @@
                                                'type' => $type,
                                                'assigned_to' => $assigned_to,
                                                'status' => $status,
+                                               'check_list_errors' => 
$check_list->get_error_msg_array(),
                                                //      'billable_hours' => 
$billable_hours
                                        ));
                                }

Modified: branches/Version-2_0-branch/controller/inc/class.uicomponent.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.uicomponent.inc.php        
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/controller/inc/class.uicomponent.inc.php        
2017-11-13 13:17:29 UTC (rev 17302)
@@ -142,7 +142,7 @@
                        }
                }
 
-               private function get_location_filter()
+               private function get_location_filter($get_locations = false)
                {
                        $entity_group_id = phpgw::get_var('entity_group_id', 
'int');
                        $location_id = phpgw::get_var('location_id', 'int');
@@ -156,7 +156,7 @@
                        {
                                $location_filter = array();
 
-                               if ($this->is_location($location_id))
+                               if ($this->is_location($location_id) || 
$get_locations)
                                {
                                        $location_types = 
CreateObject('property.soadmin_location')->read(array('allrows' => true));
                                        foreach ($location_types as 
$location_type)
@@ -660,7 +660,7 @@
                        // Gets timestamp of first day in next year
                        $to_date_ts = 
execMethod('controller.uicalendar.get_end_date_year_ts', $year);
 
-                       $location_filter = $this->get_location_filter();
+                       $location_filter = 
$this->get_location_filter($get_locations);
 
                        foreach ($location_filter as $_location)
                        {

Modified: 
branches/Version-2_0-branch/controller/inc/component/class.check_list_status_info.inc.php
===================================================================
--- 
branches/Version-2_0-branch/controller/inc/component/class.check_list_status_info.inc.php
   2017-11-13 13:09:21 UTC (rev 17301)
+++ 
branches/Version-2_0-branch/controller/inc/component/class.check_list_status_info.inc.php
   2017-11-13 13:17:29 UTC (rev 17302)
@@ -37,6 +37,8 @@
                private $status_text;
                private $deadline_date_ts;
                private $deadline_date_txt;
+               private $planned_date_ts;
+               private $completed_date_ts;
                private $original_deadline_date_ts;
                private $info_text;
                private $location_code;
@@ -122,7 +124,27 @@
                {
                        return $this->deadline_date_txt;
                }
+               
+               public function set_planned_date_ts( $planned_date_ts )
+               {
+                       $this->planned_date_ts = $planned_date_ts;
+               }
 
+               public function get_planned_date_ts()
+               {
+                       return $this->planned_date_ts;
+               }
+               
+               public function set_completed_date_ts( $completed_date_ts )
+               {
+                       $this->completed_date_ts = $completed_date_ts;
+               }
+
+               public function get_completed_date_ts()
+               {
+                       return $this->completed_date_ts;
+               }
+
                public function set_info_text( $info_text )
                {
                        $this->info_text = $info_text;
@@ -223,6 +245,8 @@
                                'deadline_date_ts' => 
$this->get_deadline_date_ts(),
                                'deadline_date_txt' => 
$this->get_deadline_date_txt(),
                                'original_deadline_date_ts' => 
$this->get_original_deadline_date_ts(),
+                               'planned_date_ts' => 
$this->get_planned_date_ts(),
+                               'completed_date_ts' => 
$this->get_completed_date_ts(),
                                'info_text' => $this->get_info_text(),
                                'location_code' => $this->get_location_code(),
                                'location_id' => $this->get_location_id(),

Modified: 
branches/Version-2_0-branch/controller/inc/component/class.check_list_status_manager.inc.php
===================================================================
--- 
branches/Version-2_0-branch/controller/inc/component/class.check_list_status_manager.inc.php
        2017-11-13 13:09:21 UTC (rev 17301)
+++ 
branches/Version-2_0-branch/controller/inc/component/class.check_list_status_manager.inc.php
        2017-11-13 13:17:29 UTC (rev 17302)
@@ -103,6 +103,8 @@
                        
$check_list_status_info->set_control_id($this->check_list->get_control_id());
                        
$check_list_status_info->set_deadline_date_txt(date($dateformat, 
$this->check_list->get_deadline()));
                        
$check_list_status_info->set_deadline_date_ts($this->check_list->get_deadline());
+                       
$check_list_status_info->set_planned_date_ts($this->check_list->get_planned_date());
+                       
$check_list_status_info->set_completed_date_ts($this->check_list->get_completed_date());
                        
$check_list_status_info->set_original_deadline_date_ts($this->check_list->get_original_deadline());
                        $check_list_status_info->set_type($this->type);
 

Modified: 
branches/Version-2_0-branch/controller/inc/component/class.date_generator.inc.php
===================================================================
--- 
branches/Version-2_0-branch/controller/inc/component/class.date_generator.inc.php
   2017-11-13 13:09:21 UTC (rev 17301)
+++ 
branches/Version-2_0-branch/controller/inc/component/class.date_generator.inc.php
   2017-11-13 13:17:29 UTC (rev 17302)
@@ -143,10 +143,12 @@
                                }
                                else if ($this->repeat_type == 3)
                                {
-                                       $trail_period_start_date = mktime(0, 0, 
0, date("m", $trail_period_start_date), date("d", $trail_period_start_date), 
date("Y", $trail_period_start_date) + $this->repeat_interval);
+                                       //set end date on year-control to last 
day of the year -> 12/31/<year>
+//                                     $trail_period_start_date = mktime(0, 0, 
0, date("m", $trail_period_start_date), date("d", $trail_period_start_date), 
date("Y", $trail_period_start_date) + $this->repeat_interval);
+                                       $trail_period_start_date = mktime(0, 0, 
0, 12, 31, date("Y", $trail_period_start_date) + $this->repeat_interval);
                                }
                        }
-
+               
                        return $trail_period_start_date;
                }
 

Modified: 
branches/Version-2_0-branch/controller/inc/component/class.year_calendar.inc.php
===================================================================
--- 
branches/Version-2_0-branch/controller/inc/component/class.year_calendar.inc.php
    2017-11-13 13:09:21 UTC (rev 17301)
+++ 
branches/Version-2_0-branch/controller/inc/component/class.year_calendar.inc.php
    2017-11-13 13:17:29 UTC (rev 17302)
@@ -51,12 +51,10 @@
                        $period_end_date_ts = 
$this->get_start_date_year_ts($this->year + 1);
                        $repeat_type = $this->control->get_repeat_type();
                        $repeat_interval = 
$this->control->get_repeat_interval();
-                       //$has_check_lists = 
 
                        // Generates dates for time period with specified 
interval
                        $date_generator = new 
date_generator($ctr_start_date_ts, $ctr_end_date_ts, $period_start_date_ts, 
$period_end_date_ts, $repeat_type, $repeat_interval);
                        $dates_array = $date_generator->get_dates();
-//                     _debug_array($dates_array);
 
                        // Set status for control on each date to NOT DONE or 
REGISTERED
                        foreach ($dates_array as $date_ts)
@@ -97,6 +95,8 @@
                {
                        foreach ($check_lists_array as $check_list)
                        {
+                               $has_planned_date = false;
+                               $has_completed_date = false;
                                if (isset($this->control_relation['serie_id']) 
&& $check_list->get_serie_id() != $this->control_relation['serie_id'])
                                {
                                        continue;
@@ -106,16 +106,40 @@
                                $check_list_status_info = 
$check_list_status_manager->get_status_for_check_list();
 
                                $month_nr = date("n", 
$check_list_status_info->get_deadline_date_ts());
+                               
if($check_list_status_info->get_planned_date_ts() && 
$check_list_status_info->get_planned_date_ts() > 0)
+                               {
+                                       $month_nr_planned = date("n", 
$check_list_status_info->get_planned_date_ts());
+                                       $has_planned_date = true;
+                               }
+                               
+                               
if($check_list_status_info->get_completed_date_ts() && 
$check_list_status_info->get_completed_date_ts() > 0)
+                               {
+                                       $has_completed_date = true;
+                                       $month_nr_completed = date("n", 
$check_list_status_info->get_completed_date_ts());
+                               }
 
                                $repeat_type = $check_list->get_repeat_type();
                                //              if( 
!isset($this->calendar_array[ $month_nr ]) || $repeat_type > 
$this->calendar_array[ $month_nr ]['repeat_type'])
+                               if($has_completed_date)
                                {
+                                       
$this->calendar_array[$month_nr_completed]['repeat_type'] = $repeat_type;
+                                       
$this->calendar_array[$month_nr_completed]["status"] = 
$check_list_status_info->get_status();
+                                       
$this->calendar_array[$month_nr_completed]["info"] = 
$check_list_status_info->serialize();
+                               }
+                               else if($has_planned_date)
+                               {
+                                       
$this->calendar_array[$month_nr_planned]['repeat_type'] = $repeat_type;
+                                       
$this->calendar_array[$month_nr_planned]["status"] = 
$check_list_status_info->get_status();
+                                       
$this->calendar_array[$month_nr_planned]["info"] = 
$check_list_status_info->serialize();
+                               }
+                               else
+                               {
                                        
$this->calendar_array[$month_nr]['repeat_type'] = $repeat_type;
                                        
$this->calendar_array[$month_nr]["status"] = 
$check_list_status_info->get_status();
                                        
$this->calendar_array[$month_nr]["info"] = $check_list_status_info->serialize();
                                }
                        }
-                       //_debug_array($this->calendar_array);
+                       
                        /*Insert code to remove controls with changed due-date 
from array*/
                        $m_cnt = 0;
                        $not_done_due_date;
@@ -122,7 +146,8 @@
                        $new_calendar_array = array();
                        $new_calendar_array2 = array();
                        $found = false;
-                       $moved_control_dates = NULL;
+                       $moved_control_dates = array();
+                       $moved_control_month = array();
                        foreach ($this->calendar_array as $cal)
                        {
                                if(is_array($cal))
@@ -130,7 +155,8 @@
                                        
if(isset($cal['info']['original_deadline_date_ts']) && 
$cal['info']['original_deadline_date_ts'] > 0)
                                        {
                                                $found = true;
-                                               $moved_control_dates[] = 
$cal['info']['original_deadline_date_ts'];
+//                                             $moved_control_dates[] = 
$cal['info']['original_deadline_date_ts'];
+                                               $moved_control_month[] = 
date('n', $cal['info']['original_deadline_date_ts']);
                                        }
                                }
                        }
@@ -143,7 +169,8 @@
                                        {
                                                if($cal2['info']['status'] == 
'CONTROL_NOT_DONE' || $cal2['info']['status'] == 'CONTROL_REGISTERED')
                                                {
-                                                       
if(in_array($cal2['info']['deadline_date_ts'], $moved_control_dates))
+//                                                     
if(in_array($cal2['info']['deadline_date_ts'], $moved_control_dates))
+                                                       if(in_array($m_cnt, 
$moved_control_month))
                                                        {
                                                                
$new_calendar_array[$m_cnt] = NULL;
                                                        }

Modified: 
branches/Version-2_0-branch/controller/inc/model/class.check_list.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/model/class.check_list.inc.php   
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/controller/inc/model/class.check_list.inc.php   
2017-11-13 13:17:29 UTC (rev 17302)
@@ -398,7 +398,21 @@
                                $status = false;
                                $this->error_msg_array['deadline'] = 
"error_msg_1";
                        }
+                       
+                       //Validate PLANNED DATE against DEADLINE
+                       if ($this->planned_date > $this->deadline)
+                       {
+                               $status = false;
+                               $this->error_msg_array['planned_date'] = 
"error_msg_8";
+                       }
 
+                       //Validate COMPLETED DATE against DEADLINE
+                       if ($this->completed_date > $this->deadline)
+                       {
+                               $status = false;
+                               $this->error_msg_array['completed_date'] = 
"error_msg_9";
+                       }
+
                        // Validate connection to COMPONENT/LOCATION
                        if (empty($this->location_code) && 
empty($this->component_id))
                        {

Modified: branches/Version-2_0-branch/controller/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/controller/setup/phpgw_no.lang  2017-11-13 
13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/controller/setup/phpgw_no.lang  2017-11-13 
13:17:29 UTC (rev 17302)
@@ -374,8 +374,11 @@
 error_msg_5    controller      no      Vennligst angi når kontrollen ble utført
 error_msg_6    controller      no      Kontrollen må være knyttet mot en 
komponent/lokasjon
 error_msg_7    controller      no      Vennligst endre status for kontroll 
eller angi planlagtdato
+error_msg_8    controller      no      Planlagtdato kan ikke være etter 
fristdato
+error_msg_9    controller      no      Utførtdato kan ikke være etter fristdato
 error_msg_no_controls_in_period        controller      no      Ingen 
kontroller for bygg i denne perioden
 error_msg_no_controls_for_component    controller      no      Ingen 
kontroller for komponent i denne perioden
+error_msg_control_passed_due_date      controller      no      Sjekkliste kan 
ikke lagres da frist er overskredet
 role at location       controller      no      Tildeling av rolle
 Register new message   controller      no      Registrer ny melding
 Show message   controller      no      Vis melding

Modified: 
branches/Version-2_0-branch/controller/templates/base/check_list/add_check_list.xsl
===================================================================
--- 
branches/Version-2_0-branch/controller/templates/base/check_list/add_check_list.xsl
 2017-11-13 13:09:21 UTC (rev 17301)
+++ 
branches/Version-2_0-branch/controller/templates/base/check_list/add_check_list.xsl
 2017-11-13 13:17:29 UTC (rev 17302)
@@ -103,7 +103,8 @@
                                                        </div>
                                                </xsl:if>
                                                <label>Fristdato</label>
-                                               <input type="text" 
id="deadline_date" name="deadline_date" class="date" >
+                                               <xsl:value-of 
select="php:function('date', $date_format, number(check_list/deadline))"/>
+                                               <input type="hidden" 
id="deadline_date" name="deadline_date" >
                                                        <xsl:attribute 
name="value">
                                                                <xsl:value-of 
select="php:function('date', $date_format, number(check_list/deadline))"/>
                                                        </xsl:attribute>
@@ -116,6 +117,14 @@
                                        </div>
                                        <!-- PLANNED DATE -->
                                        <div class="row">
+                                               <xsl:if 
test="check_list/error_msg_array/planned_date != ''">
+                                                       <xsl:variable 
name="error_msg">
+                                                               <xsl:value-of 
select="check_list/error_msg_array/planned_date" />
+                                                       </xsl:variable>
+                                                       <div 
class='input_error_msg'>
+                                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                                       </div>
+                                               </xsl:if>
                                                <label>Planlagt dato</label>
                                                <input type="text" 
id="planned_date" name="planned_date" class="date" readonly="readonly">
                                                        <xsl:if 
test="check_list/planned_date != 0 and check_list/planned_date != ''">

Modified: 
branches/Version-2_0-branch/controller/templates/base/check_list/edit_check_list.xsl
===================================================================
--- 
branches/Version-2_0-branch/controller/templates/base/check_list/edit_check_list.xsl
        2017-11-13 13:09:21 UTC (rev 17301)
+++ 
branches/Version-2_0-branch/controller/templates/base/check_list/edit_check_list.xsl
        2017-11-13 13:17:29 UTC (rev 17302)
@@ -17,7 +17,11 @@
                        <form id="frm_update_check_list" action="{$action_url}" 
method="post">  
                        <xsl:variable name="check_list_id"><xsl:value-of 
select="check_list/id"/></xsl:variable>
                        <input id="check_list_id" type="hidden" 
name="check_list_id" value="{$check_list_id}" />
-                       
+                       <xsl:if test="check_list_locked">
+                               <div class='input_error_msg'>
+                                       <xsl:value-of 
select="php:function('lang', 'error_msg_control_passed_due_date')" />
+                               </div>
+                       </xsl:if>
                        <fieldset class="col_1">
                        <div class="row">
                                <label>Status</label>
@@ -49,10 +53,8 @@
                        </div>
                        <div class="row">
                                <label>Skal utføres innen</label>
-                               <input class="date" readonly="readonly">
-                             <xsl:attribute 
name="id">deadline_date</xsl:attribute>
-                             <xsl:attribute 
name="name">deadline_date</xsl:attribute>
-                             <xsl:attribute name="type">text</xsl:attribute>
+                               <xsl:value-of select="php:function('date', 
$date_format, number(check_list/deadline))"/>
+                               <input id="deadline_date" name="deadline_date" 
type="hidden">
                              <xsl:if test="check_list/deadline != 0 or 
check_list/deadline != ''">
                                <xsl:attribute name="value"><xsl:value-of 
select="php:function('date', $date_format, 
number(check_list/deadline))"/></xsl:attribute>
                                  </xsl:if>
@@ -64,6 +66,14 @@
                                </input>
                        </div>
                        <div class="row">
+                               <xsl:if 
test="check_list/error_msg_array/planned_date != ''">
+                                       <xsl:variable name="error_msg">
+                                               <xsl:value-of 
select="check_list/error_msg_array/planned_date" />
+                                       </xsl:variable>
+                                       <div class='input_error_msg'>
+                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                       </div>
+                               </xsl:if>
                                <label>Planlagt dato</label>
                                <input class="date" readonly="readonly">
                              <xsl:attribute 
name="id">planned_date</xsl:attribute>
@@ -75,6 +85,14 @@
                            </input>
                    </div>
                    <div class="row">
+                               <xsl:if 
test="check_list/error_msg_array/completed_date != ''">
+                                       <xsl:variable name="error_msg">
+                                               <xsl:value-of 
select="check_list/error_msg_array/completed_date" />
+                                       </xsl:variable>
+                                       <div class='input_error_msg'>
+                                               <xsl:value-of 
select="php:function('lang', $error_msg)" />
+                                       </div>
+                               </xsl:if>
                                <label>Utført dato</label>
                                <input class="date" >
                              <xsl:attribute 
name="id">completed_date</xsl:attribute>
@@ -130,10 +148,12 @@
                                </textarea>
                        </div>
                        
-                       <div class="form-buttons">
-                               <xsl:variable name="lang_save"><xsl:value-of 
select="php:function('lang', 'save_check_list')" /></xsl:variable>
-                               <input class="btn" type="submit" 
name="save_control" value="Lagre detaljer" />
-                       </div>
+                       <xsl:if test="check_list_locked = 'true'">
+                               <div class="form-buttons">
+                                       <xsl:variable 
name="lang_save"><xsl:value-of select="php:function('lang', 'save_check_list')" 
/></xsl:variable>
+                                       <input class="btn" type="submit" 
name="save_control" value="Lagre detaljer" />
+                               </div>
+                       </xsl:if>
                        </form>
                </div>
                <xsl:for-each select="integration">

Modified: branches/Version-2_0-branch/helpdesk/inc/class.menu.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.menu.inc.php 2017-11-13 
13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/helpdesk/inc/class.menu.inc.php 2017-11-13 
13:17:29 UTC (rev 17302)
@@ -193,7 +193,7 @@
 
 
 
-                       if ( $acl->check('.ticket',PHPGW_ACL_PRIVATE, 
'helpdesk') ) //manage
+                       if ( 
$acl->check('.ticket.response_template',PHPGW_ACL_READ, 'helpdesk') ) //manage
                        {
                                $menus['navigation']['response_template'] = 
array
                                        (
@@ -202,7 +202,10 @@
                                        'text' => lang('response template'),
                                        'image' => array('helpdesk', 'helpdesk')
                                );
+                       }
 
+                       if ( $acl->check('.email_out',PHPGW_ACL_READ, 
'helpdesk') ) //manage
+                       {
                                $menus['navigation']['email_out'] = array(
                                        'text' => lang('email out'),
                                        'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'helpdesk.uiemail_out.index')),

Modified: branches/Version-2_0-branch/helpdesk/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.sogeneric.inc.php    
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/helpdesk/inc/class.sogeneric.inc.php    
2017-11-13 13:17:29 UTC (rev 17302)
@@ -145,7 +145,7 @@
                                                'name' => lang('response 
template'),
                                                'acl_app' => 'helpdesk',
                                                'system_location' => 
'.ticket.response_template',
-                                               'acl_location' => '.ticket',
+                                               'acl_location' => 
'.ticket.response_template',
                                                'menu_selection' => 
'helpdesk::response_template',
                                                'default' => array
                                                        (

Modified: branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php        
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/helpdesk/inc/class.uitts.inc.php        
2017-11-13 13:17:29 UTC (rev 17302)
@@ -3,7 +3,7 @@
        * phpGroupWare - helpdesk: a Facilities Management System.
        *
        * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
+       * @copyright Copyright (C) 2003-2017 Free Software Foundation, Inc. 
http://www.fsf.org/
        * This file is part of phpGroupWare.
        *
        * phpGroupWare is free software; you can redistribute it and/or modify
@@ -724,12 +724,10 @@
                                        $_categories = array();
                                        foreach ($_cats as $_cat)
                                        {
-                                               if($_cat['parent'] == 
$this->parent_cat_id)
+                                               if ($_cat['active'] != 2)
                                                {
-                                                       if ($_cat['active'] != 
2)
-                                                       {
-                                                               $_categories[] 
= $_cat;
-                                                       }
+                                                       $_cat['name'] =  
str_repeat(' . ' , (int)($_cat['level'] -1) ) . 
$GLOBALS['phpgw']->strip_html($_cat['name']);
+                                                       $_categories[] = $_cat;
                                                }
                                        }
                                }
@@ -1454,13 +1452,16 @@
                                $_cats = $this->cats->return_sorted_array(0, 
false, '', '', '', false, $this->parent_cat_id);
                                foreach ($_cats as $_cat)
                                {
-                                       $cat_select['cat_list'][] = array
-                                       (
-                                               'cat_id'        => $_cat['id'],
-                                               'name'          => 
$_cat['name'],
-                                               'selected'      => $_cat['id'] 
== $this->cat_id ? 'selected' : '',
-                                               'description' => 
$_cat['description']
-                                       );
+                                       if ($_cat['active'] != 2)
+                                       {
+                                               $cat_select['cat_list'][] = 
array
+                                               (
+                                                       'cat_id'        => 
$_cat['id'],
+                                                       'name'          => 
str_repeat(' . ' , (int)($_cat['level'] -1) ) . 
$GLOBALS['phpgw']->strip_html($_cat['name']),
+                                                       'selected'      => 
$_cat['id'] == $this->cat_id ? 'selected' : '',
+                                                       'description' => 
$_cat['description']
+                                               );
+                                       }
                                }
                        }
 
@@ -2037,13 +2038,16 @@
                                $_cats = $this->cats->return_sorted_array(0, 
false, '', '', '', false, $this->parent_cat_id);
                                foreach ($_cats as $_cat)
                                {
-                                       $cat_select['cat_list'][] = array
-                                       (
-                                               'cat_id'        => $_cat['id'],
-                                               'name'          => 
$_cat['name'],
-                                               'selected'      => $_cat['id'] 
== $this->cat_id ? 'selected' : '',
-                                               'description' => 
$_cat['description']
-                                       );
+                                       if ($_cat['active'] != 2)
+                                       {
+                                               $cat_select['cat_list'][] = 
array
+                                               (
+                                                       'cat_id'        => 
$_cat['id'],
+                                                       'name'          => 
str_repeat(' . ' , (int)($_cat['level'] -1) ) . 
$GLOBALS['phpgw']->strip_html($_cat['name']),
+                                                       'selected'      => 
$_cat['id'] == $this->cat_id ? 'selected' : '',
+                                                       'description' => 
$_cat['description']
+                                               );
+                                       }
                                }
                        }
 

Modified: branches/Version-2_0-branch/helpdesk/setup/default_records.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/setup/default_records.inc.php  
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/helpdesk/setup/default_records.inc.php  
2017-11-13 13:17:29 UTC (rev 17302)
@@ -32,5 +32,7 @@
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr, allow_grant, allow_c_function, allow_c_attrib, c_attrib_table) 
VALUES ({$app_id}, '.ticket', 'Helpdesk', 1, 1, 1, 'phpgw_helpdesk_tickets')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr) VALUES ({$app_id}, '.ticket.order', 'Helpdesk ad hock order')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr) VALUES ({$app_id}, '.custom', 'Custom reports')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr) VALUES ({$app_id}, '.ticket.response_template', 'Ticket response 
template')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr) VALUES ({$app_id}, '.email_out', 'email out')");
 
 $GLOBALS['phpgw_setup']->oProc->query("DELETE from phpgw_config WHERE 
config_app='helpdesk'");

Modified: branches/Version-2_0-branch/helpdesk/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/setup/setup.inc.php    2017-11-13 
13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/helpdesk/setup/setup.inc.php    2017-11-13 
13:17:29 UTC (rev 17302)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['helpdesk']['name']                 = 'helpdesk';
-       $setup_info['helpdesk']['version']              = '0.9.18.005';
+       $setup_info['helpdesk']['version']              = '0.9.18.006';
        $setup_info['helpdesk']['app_order']    = 8;
        $setup_info['helpdesk']['enable']               = 1;
        $setup_info['helpdesk']['app_group']    = 'office';

Modified: branches/Version-2_0-branch/helpdesk/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/setup/tables_update.inc.php    
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/helpdesk/setup/tables_update.inc.php    
2017-11-13 13:17:29 UTC (rev 17302)
@@ -237,4 +237,21 @@
                        $GLOBALS['setup_info']['helpdesk']['currentver'] = 
'0.9.18.005';
                        return $GLOBALS['setup_info']['helpdesk']['currentver'];
                }
-       }
\ No newline at end of file
+       }
+
+       /**
+       * Update helpdesk version from 0.9.18.005 to 0.9.18.006
+       */
+       $test[] = '0.9.18.005';
+
+       function helpdesk_upgrade0_9_18_005()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               $GLOBALS['phpgw']->locations->add('.ticket.response_template', 
'email out', 'helpdesk');
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['helpdesk']['currentver'] = 
'0.9.18.006';
+                       return $GLOBALS['setup_info']['helpdesk']['currentver'];
+               }
+       }

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.categories.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.categories.inc.php   
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.categories.inc.php   
2017-11-13 13:17:29 UTC (rev 17302)
@@ -58,7 +58,7 @@
                * @param string $type Can be 'subs', 'mains', 'appandmains', 
'appandsubs', 'noglobal' or 'noglobalapp'
                * @return string|boolean Part of SQL where clause or false
                */
-               function filter($type)
+               function filter($type, $cat_parent = 0)
                {
                        
                        $filter_location = '';
@@ -79,7 +79,14 @@
                                        $s = " AND 
cat_appname='{$this->app_name}' {$filter_location} AND cat_parent = 0";
                                         break;
                                case 'appandsubs':
-                                       $s = " AND 
cat_appname='{$this->app_name}' {$filter_location} AND cat_parent <> 0";
+                                       if($cat_parent)
+                                       {
+                                               $s = " AND 
cat_appname='{$this->app_name}' {$filter_location} AND cat_parent = " . (int) 
$cat_parent;
+                                       }
+                                       else
+                                       {
+                                               $s = " AND 
cat_appname='{$this->app_name}' {$filter_location} AND cat_parent <> 0";
+                                       }
                                        break;
                                case 'noglobal':
                                        $s = " AND cat_appname != 
'{$this->app_name}' {$filter_location}";
@@ -1018,12 +1025,13 @@
                * @param $cat_id Category ID
                * @return boolean True when the category exists otherwise false
                */
-               function exists($type, $cat_name = '', $cat_id = 0 )
+               function exists($type, $cat_name = '', $cat_id = 0, $cat_parent 
= 0 )
                {
                        if ( is_array($type) )
                        {
                                $real_type = $type['type'];
                                $cat_id = $type['cat_id'];
+                               $cat_parent = $type['cat_parent'];
                                $cat_name = $type['cat_name'];
                                $type = $real_type;
                                unset($real_type);
@@ -1030,7 +1038,7 @@
                        }
                        
                        $cat_id = (int) $cat_id;
-                       $filter = $this->filter($type);
+                       $filter = $this->filter($type, $cat_parent);
 
                        if ($cat_name)
                        {

Modified: branches/Version-2_0-branch/property/inc/class.sodocument.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sodocument.inc.php   
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/property/inc/class.sodocument.inc.php   
2017-11-13 13:17:29 UTC (rev 17302)
@@ -149,8 +149,8 @@
 
                                $cols = $document_table . '.location_code';
                                $cols_return[] = 'location_code';
-                               $cols .= ", {$document_table}.category AS 
doc_type";
-                               $cols_return[] = 'doc_type';
+                               $cols .= ", count(*) AS hits";
+                               $cols_return[] = 'hits';
 
                                $uicols['input_type'][] = 'text';
                                $uicols['name'][] = 'location_code';
@@ -192,7 +192,7 @@
                                        'query' => $query,
                                        'location_level' => 2,
                                        'force_location' => true,
-                                       'no_address' => false,
+                                       'no_address' => true,
                                ));
 
 
@@ -201,9 +201,9 @@
                                $this->uicols = $this->bocommon->uicols;
 
                                $this->uicols['input_type'][] = 'text';
-                               $this->uicols['name'][] = 'doc_type';
-                               $this->uicols['descr'][] = lang('category');
-                               $this->uicols['statustext'][] = 
lang('category');
+                               $this->uicols['name'][] = 'hits';
+                               $this->uicols['descr'][] = lang('hits');
+                               $this->uicols['statustext'][] = lang('hits');
 
                                $cols_return = $this->bocommon->cols_return;
                                $type_id = $this->bocommon->type_id;
@@ -221,17 +221,39 @@
                                $type_id = 
$this->bocommon->fm_cache('type_id_document_' . $entity_id);
                                $this->cols_extra = 
$this->bocommon->fm_cache('cols_extra_document_' . $entity_id);
                        }
-//_debug_array($this->uicols);
-                       $groupmethod = " GROUP BY fm_document.location_code, 
fm_location1.loc1_name, fm_location1.category";
+//                     $groupmethod = " GROUP BY fm_document.location_code, 
fm_location1.loc1_name, fm_location1.category";
+//
+//                     if ($entity_id)
+//                     {
+//
+//                             $groupmethod.= " 
,fm_document.p_entity_id,fm_entity_category.name,fm_document.p_num,fm_document.p_cat_id";
+//                     }
 
-                       if ($entity_id)
+                       //FIXME
+                       $cols_group = array();
+                       foreach ($cols_return as $col_return)
                        {
+                               switch ($col_return)
+                               {
+                                       case 'street_name':
+                                       case 'hits':
+                                               break;
+                                       case 'location_code':
+                                       case 'loc1':
+                                       case 'loc2':
+                                               $cols_group[]= 
"fm_document.{$col_return}";
+                                               break;
+                                       case 'category';
+                                               $cols_group[]= 
"fm_entity_category.name";
+                                               break;
+                                       default:
+                                               $cols_group[]= $col_return;
+                                               break;
+                               }
 
-                               $groupmethod.= " 
,fm_document.p_entity_id,fm_entity_category.name,fm_document.p_num,fm_document.p_cat_id";
                        }
 
-                       //FIXME
-                       $groupmethod = '';
+                       $groupmethod = "GROUP BY " . implode(', ', $cols_group);
 
                        if (!$ordermethod && $order)
                        {
@@ -287,7 +309,7 @@
 
                        $sql .= " $filtermethod $querymethod $groupmethod";
 
-                       //echo $sql;
+       //              echo $sql;die();
 
                        $this->db->query($sql, __LINE__, __FILE__);
                        $this->total_records = $this->db->num_rows();

Modified: branches/Version-2_0-branch/property/js/portico/ajax_invoice.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/ajax_invoice.js     
2017-11-13 13:09:21 UTC (rev 17301)
+++ branches/Version-2_0-branch/property/js/portico/ajax_invoice.js     
2017-11-13 13:17:29 UTC (rev 17302)
@@ -152,6 +152,11 @@
                var order_id = document.getElementById("order_id").value;
                var order_id_orig = 
document.getElementById("order_id_orig").value;
 
+               if (!dim_b)
+               {
+                       alert('Du må velge Ansvarssted');
+                       return;
+               }
 
                if (order_id_orig == order_id)
                {
@@ -167,12 +172,6 @@
                                return;
                        }
 
-                       if (!dim_b)
-                       {
-                               alert('Du må velge Ansvarssted');
-                               return;
-                       }
-
                        if (!dim_a)
                        {
                                alert('Du må angi Dim A');




reply via email to

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