fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8994] Merge 8984:8993 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [8994] Merge 8984:8993 from trunk
Date: Tue, 20 Mar 2012 12:10:43 +0000

Revision: 8994
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8994
Author:   sigurdne
Date:     2012-03-20 12:10:42 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
Merge 8984:8993 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php
    branches/Version-1_0-branch/activitycalendar/inc/class.uiarena.inc.php
    
branches/Version-1_0-branch/activitycalendar/inc/class.uiorganization.inc.php
    branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang
    branches/Version-1_0-branch/activitycalendar/templates/base/arena.php
    branches/Version-1_0-branch/activitycalendar/templates/base/group.php
    branches/Version-1_0-branch/activitycalendar/templates/base/organization.php
    branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang
    branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
    branches/Version-1_0-branch/property/inc/class.boproject.inc.php
    branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php
    branches/Version-1_0-branch/property/inc/class.soentity.inc.php
    branches/Version-1_0-branch/property/inc/class.soproject.inc.php
    branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
    branches/Version-1_0-branch/property/inc/class.uibudget.inc.php
    branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
    branches/Version-1_0-branch/property/inc/class.uitts.inc.php
    branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
    branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-1_0-branch/property/inc/export/default/Basware_X114
    branches/Version-1_0-branch/property/js/yahoo/budget.obligations.js
    branches/Version-1_0-branch/property/js/yahoo/project.index.js
    branches/Version-1_0-branch/property/js/yahoo/workorder.edit.js
    branches/Version-1_0-branch/property/js/yahoo/workorder.index.js
    branches/Version-1_0-branch/property/setup/phpgw_no.lang
    branches/Version-1_0-branch/property/setup/setup.inc.php
    branches/Version-1_0-branch/property/setup/tables_current.inc.php
    branches/Version-1_0-branch/property/setup/tables_update.inc.php
    branches/Version-1_0-branch/property/templates/base/project.xsl
    branches/Version-1_0-branch/property/templates/base/wo_hour.xsl
    branches/Version-1_0-branch/property/templates/base/workorder.xsl

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


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.uiactivities.inc.php 
2012-03-20 12:10:42 UTC (rev 8994)
@@ -422,11 +422,11 @@
                $office_name = 
activitycalendar_soactivity::get_instance()->get_office_name($activity->get_office());
                if($activity->get_state() == 2)
                {
-                       $body = lang('mail_body_update_frontend', 
$activity->get_id() . ', ' . $activity->get_title(), $link_text, $office_name);
+                       $body = lang('mail_body_update_frontend', 
$activity->get_title(), $link_text, $office_name);
                }
                else
                {
-                       $body = lang('mail_body_update', $activity->get_id() . 
', ' . $activity->get_title(), $link_text, $office_name);
+                       $body = lang('mail_body_update', 
$activity->get_title(), $link_text, $office_name);
                }
                
                //var_dump($subject);
@@ -459,7 +459,7 @@
                $subject = lang('mail_subject_update');
                $link_text = 
"http://www.bergen.kommune.no/aktivby/registreringsskjema/ny/?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}";
                $office_name = 
activitycalendar_soactivity::get_instance()->get_office_name($activity->get_office());
-               $body = lang('mail_body_update', $activity->get_id() . ', ' . 
$activity->get_title(), $link_text, $office_name);
+               $body = lang('mail_body_update', $activity->get_title(), 
$link_text, $office_name);
        }
        else
        {

Modified: branches/Version-1_0-branch/activitycalendar/inc/class.uiarena.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.uiarena.inc.php      
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.uiarena.inc.php      
2012-03-20 12:10:42 UTC (rev 8994)
@@ -71,6 +71,11 @@
                $arena = 
activitycalendar_soarena::get_instance()->get_single((int)phpgw::get_var('id'));
                $cancel_link = self::link(array('menuaction' => 
'activitycalendar.uiarena.index'));
                
+               if(isset($_POST['edit_arena'])) // The user has pressed the 
save button
+               {
+                       $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'activitycalendar.uiarena.edit','id' => 
phpgw::get_var('id')));
+               }
+               
                if($arena == null) // Not found
                {
                        $errorMsgs[] = lang('Could not find specified arena.');

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.uiorganization.inc.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendar/inc/class.uiorganization.inc.php   
    2012-03-20 05:51:15 UTC (rev 8993)
+++ 
branches/Version-1_0-branch/activitycalendar/inc/class.uiorganization.inc.php   
    2012-03-20 12:10:42 UTC (rev 8994)
@@ -77,6 +77,7 @@
                $GLOBALS['phpgw_info']['flags']['app_header'] .= 
'::'.lang('edit');
                $id = (int)phpgw::get_var('id');
                $type = phpgw::get_var('type');
+               $cancel_link = self::link(array('menuaction' => 
'activitycalendar.uiorganization.changed_organizations'));
                unset($org_info);
                unset($contact1);
                unset($contact2);
@@ -121,7 +122,7 @@
                                {
                                        $error = lang('messages_form_error');
                                }
-                               
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'activitycalendar.uiorganization.show', 'id' => 
$group->get_id(), 'type' => 'group', 'saved_ok' => 'yes'));
                        }
                        else if(isset($_POST['store_group'])) // The user has 
pressed the store button
                        {
@@ -179,11 +180,13 @@
                                        $group->set_change_type('added');
                                        $group->set_transferred(true);
                                        $sogroup->update_local($group);
+                                       $message = lang('messages_saved_form');
                                }
                                else
                                {
                                        $error = lang('messages_form_error');
                                }
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'activitycalendar.uiorganization.show', 'id' => 
$group->get_id(), 'type' => 'group', 'saved_ok' => 'yes'));
                        }
                        
                        $contact_persons = 
$socontact->get_local_contact_persons($group->get_id(), true);
@@ -196,10 +199,12 @@
                                'contactperson1' => $cp1,
                                'contactperson2' => $cp2,
                                'editable' => true,
+                               'cancel_link' => $cancel_link,
                                'errorMsgs' => $errorMsgs,
                                'infoMsgs' => $infoMsgs
                        );
                        return $this->render('group.php', $data);
+                       
                }
                else
                {
@@ -251,6 +256,7 @@
                                {
                                        $error = lang('messages_form_error');
                                }
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'activitycalendar.uiorganization.show', 'id' => 
$org->get_id(), 'saved_ok' => 'yes'));
                        }
                        else if(isset($_POST['store_organization'])) // The 
user has pressed the store button
                        {
@@ -334,7 +340,7 @@
                                {
                                        $error = lang('messages_form_error');
                                }
-                               
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'activitycalendar.uiorganization.show', 'id' => 
$org->get_id(), 'saved_ok' => 'yes'));
                        }
                        else if(isset($_POST['update_organization'])) // The 
user has pressed the store button
                        {
@@ -404,6 +410,8 @@
                                $org->set_change_type("added");
                                $org->set_transferred(true);
                                $so_org->update_local($org);
+                               
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'activitycalendar.uiorganization.show', 'id' => 
$org->get_id(), 'saved_ok' => 'yes'));
                        }
                        
                        $contact_persons = 
$so_contact->get_local_contact_persons($org->get_id());
@@ -416,6 +424,7 @@
                                'districts'     =>      $districts,
                                'contactperson1' => $cp1,
                                'contactperson2' => $cp2,
+                               'cancel_link' => $cancel_link,
                                'editable' => true,
                                'errorMsgs' => $errorMsgs,
                                'infoMsgs' => $infoMsgs
@@ -430,19 +439,33 @@
                $GLOBALS['phpgw_info']['flags']['app_header'] .= 
'::'.lang('view');
                $id = (int)phpgw::get_var('id');
                $type = phpgw::get_var('type');
+               $cancel_link = self::link(array('menuaction' => 
'activitycalendar.uiorganization.changed_organizations'));
                if($type)
                {
+                       if(isset($_POST['edit_group'])) // The user has pressed 
the save button
+                       {
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
(array('menuaction' => 'activitycalendar.uiorganization.edit', 'id' => 
phpgw::get_var('id'), 'type' => phpgw::get_var('type'))));
+                       }
+                       $saved_OK = phpgw::get_var('saved_ok');
+                       if($saved_OK)
+                       {
+                               $message = lang('group_saved_form');
+                       }
                        //var_dump($type);
+                       //$edit_link = self::link(array('menuaction' => 
'activitycalendar.uiorganization.changed_organizations', 'id' => $id, 'type' => 
$type));
                        $so = activitycalendar_sogroup::get_instance();
-                       $group_array = $so->get(null, null, null, null, null, 
null, array('id' => $id));
+                       $group_array = $so->get(null, null, null, null, null, 
null, array('id' => $id, 'changed_groups' => 'true'));
                        if(count($group_array) > 0){
                                $keys = array_keys($group_array);
                                $group = $group_array[$keys[0]];
+                               _debug_array($group);
                        }
                        
                        $data = array
                        (
                                'group'         => $group,
+                               'cancel_link' => $cancel_link,
+                               'message' => $message,
                                'errorMsgs' => $errorMsgs,
                                'infoMsgs' => $infoMsgs
                        );
@@ -451,6 +474,16 @@
                else
                {
                        //var_dump('org');
+                       if(isset($_POST['edit_organization'])) // The user has 
pressed the save button
+                       {
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'activitycalendar.uiorganization.edit', 'id' => 
phpgw::get_var('id')));
+                       }
+                       $saved_OK = phpgw::get_var('saved_ok');
+                       if($saved_OK)
+                       {
+                               $message = lang('organization_saved_form');
+                       }
+                       //$edit_link = self::link(array('menuaction' => 
'activitycalendar.uiorganization.changed_organizations', 'id' => $id));
                        $so = activitycalendar_soorganization::get_instance();
                        $org_array = $so->get(null, null, null, null, null, 
null, array('id' => $id, 'changed_orgs' => 'true'));
                        if(count($org_array)>0){
@@ -463,6 +496,8 @@
                        $data = array
                        (
                                'organization'  => $org,
+                               'cancel_link' => $cancel_link,
+                               'message' => $message,
                                'errorMsgs' => $errorMsgs,
                                'infoMsgs' => $infoMsgs
                        );

Modified: branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang    
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/activitycalendar/setup/phpgw_no.lang    
2012-03-20 12:10:42 UTC (rev 8994)
@@ -377,12 +377,12 @@
 activity_import        activitycalendar        no      Importer aktiviteter
 office activitycalendar        no      Hovedansvarlig kulturkontor
 activity_helptext      activitycalendar        no      Aktivitetsoversikten 
henter kontaktinformasjon og beskrivelse fra bookingmodulen.<br/>Før ny 
aktivitet kan registreres må du sjekke at organisasjon/gruppe finnes og er 
oppdatert,<br/>og at arena finnes og er oppdatert. Feltet vis i portal skal 
være satt til JA, i organisasjonsregisteret og evt. lag/gruppe. For nye 
aktiviteter vil dette bli satt automatisk.
-mail_subject_update    activitycalendar        no      Melding fra AktivBy - 
aktivitetsoversikt
-mail_body_update       activitycalendar        no      Dette er en melding fra 
Bergen kommune/AktivBy.<br/>I aktivitetsoversikten som ligger i kommuneportalen 
på internett, står du registrert som kontaktperson for %1.<br/>Ber om at du 
kontrollerer at data er korrekt, og eventuelt endrer.<br/>%2<br/><br/><br/> Mvh 
%3 kulturkontor
-mail_body_update_frontend      activitycalendar        no      Dette er en 
melding fra Bergen kommune/AktivBy.<br/>I aktivitetsoversikten som ligger i 
kommuneportalen på internett, står du registrert som kontaktperson for 
%1.<br/>Det har kommet inn et endringsønske på denne aktiviteten. Bruk lenken 
under for å endre opplysningene om aktiviteten.<br/>%2<br/><br/><br/> Mvh %3 
kulturkontor
+mail_subject_update    activitycalendar        no      Melding fra AktivBy - 
Aktivitetsoversikt
+mail_body_update       activitycalendar        no      Dette er en melding fra 
Bergen kommune/AktivBy.<br/><br/>I aktivitetsoversikten som ligger i 
kommuneportalen på internett, står du registrert som kontaktperson for 
%1.<br/>Ber om at du kontrollerer at data er korrekt, og eventuelt 
endrer.<br/>%2<br/><br/><br/> Mvh %3 kulturkontor
+mail_body_update_frontend      activitycalendar        no      Dette er en 
melding fra Bergen kommune/AktivBy.<br/><br/>I aktivitetsoversikten som ligger 
i kommuneportalen på internett, står du registrert som kontaktperson for 
%1.<br/>Det har kommet inn et endringsønske på denne aktiviteten. Bruk lenken 
under for å endre opplysningene om aktiviteten.<br/>%2<br/><br/><br/> Mvh %3 
kulturkontor
 mail_body_state_3      activitycalendar        no      Informasjon om din 
aktivitet er registrert og vil bli publisert i kommuneportalen i løpet av 
dagen.<br/>De som er registrert som kontaktpersoner får endre informasjonen, 
dette gjøres via nettsiden: 
https://www.bergen.kommune.no/tjenestetilbud/aktivitetsoversikt/<br/><br/><br/> 
Mvh %1 kulturkontor
 mail_body_state_4      activitycalendar        no      Ditt tips er behandlet 
og publisert i kommuneportalen.<br/><br/>Mvh %1 kulturkontor
-mail_body_state_5      activitycalendar        no      Ditt tips er behandlet, 
men vil ikke bli publisert i kommuneportalen.<br/><br/>Mvh %1 kulturkontor
+mail_body_state_5      activitycalendar        no      Ditt forslag til 
aktivitet er behandlet, men vil ikke bli publisert i 
kommuneportalen.<br/><br/>Mvh %1 kulturkontor
 send_mail      activitycalendar        no      Send e-post
 marked_as      activitycalendar        no      Status
 address_number activitycalendar        no      Husnummer

Modified: branches/Version-1_0-branch/activitycalendar/templates/base/arena.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/templates/base/arena.php       
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/activitycalendar/templates/base/arena.php       
2012-03-20 12:10:42 UTC (rev 8994)
@@ -105,6 +105,7 @@
                                        }
                                        else
                                        {
+                                               echo '<input type="submit" 
name="edit_arena" value="' . lang('edit') . '"/>';
                                                echo '<a 
href="'.$cancel_link.'">' . lang('back') . '</a>';
                                        }
                                ?>

Modified: branches/Version-1_0-branch/activitycalendar/templates/base/group.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/templates/base/group.php       
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/activitycalendar/templates/base/group.php       
2012-03-20 12:10:42 UTC (rev 8994)
@@ -5,6 +5,8 @@
 <div class="identifier-header">
        <h1><img src="<?php echo ACTIVITYCALENDAR_IMAGE_PATH 
?>images/32x32/custom/contact.png" /><?php echo lang('group') ?></h1>
 </div>
+<?php echo activitycalendar_uicommon::get_page_message($message) ?>
+<?php echo activitycalendar_uicommon::get_page_error($error) ?>
 <div class="yui-content">
        <div id="details">
                <form action="#" method="post">
@@ -58,7 +60,16 @@
                                        if ($editable) {
                                                echo '<input type="submit" 
name="save_group" value="' . lang('save') . '"/>';
                                                echo '<input type="submit" 
name="store_group" value="' . lang('store') . '"/>';
+                                               echo '<a href="' . $cancel_link 
. '">' . lang('back_to_list') . '</a>';
                                        }
+                                       else
+                                       {
+                                               if(!$group->get_transferred())
+                                               {
+                                                       echo '<input 
type="submit" name="edit_group" value="' . lang('edit') . '"/>';
+                                               }
+                                               echo '<a href="' . $cancel_link 
. '">' . lang('back_to_list') . '</a>';
+                                       }
                                ?>
                        </div>
                </form>

Modified: 
branches/Version-1_0-branch/activitycalendar/templates/base/organization.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendar/templates/base/organization.php    
    2012-03-20 05:51:15 UTC (rev 8993)
+++ 
branches/Version-1_0-branch/activitycalendar/templates/base/organization.php    
    2012-03-20 12:10:42 UTC (rev 8994)
@@ -5,6 +5,8 @@
 <div class="identifier-header">
        <h1><img src="<?php echo ACTIVITYCALENDAR_IMAGE_PATH 
?>images/32x32/custom/contact.png" /><?php echo lang('organization') ?></h1>
 </div>
+<?php echo activitycalendar_uicommon::get_page_message($message) ?>
+<?php echo activitycalendar_uicommon::get_page_error($error) ?>
 <div class="yui-content">
        <div id="details">
                <form action="#" method="post">
@@ -136,7 +138,16 @@
                                                {
                                                        echo '<input 
type="submit" name="store_organization" value="' . lang('store') . '"/>';
                                                }
+                                               echo '<a href="' . $cancel_link 
. '">' . lang('back_to_list') . '</a>';
                                        }
+                                       else
+                                       {
+                                               
if(!$organization->get_transferred())
+                                               {
+                                                       echo '<input 
type="submit" name="edit_organization" value="' . lang('edit') . '"/>';
+                                               }
+                                               echo '<a href="' . $cancel_link 
. '">' . lang('back_to_list') . '</a>';
+                                       }
                                ?>
                        </div>
                </form>

Modified: 
branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang    
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/activitycalendarfrontend/setup/phpgw_no.lang    
2012-03-20 12:10:42 UTC (rev 8994)
@@ -93,5 +93,5 @@
 edit_organization      activitycalendarfrontend        no      Rediger 
organisasjonsinformasjon
 address        activitycalendarfrontend        no      Adresse
 activity_edit_helptext_step1   activitycalendarfrontend        no      Skal du 
endre opplysninger knyttet til en aktivitet må du være registrert som 
kontaktperson for organisasjonen.<br/>Du velger organisasjon og aktivitet i 
bildet under, og får en e-post i retur med en lenke til endringsskjema.
-mail_body_update_frontend      activitycalendarfrontend        no      Dette 
er en melding fra Bergen kommune/AktivBy.<br/>I aktivitetsoversikten som ligger 
i kommuneportalen på internett, står du registrert som kontaktperson for 
%1.<br/>Det har kommet inn et endringsønske på denne aktiviteten. Bruk lenken 
under for å endre opplysningene om aktiviteten.<br/>%2<br/><br/><br/> Mvh %3 
kulturkontor
-mail_subject_update    activitycalendar        no      Melding fra AktivBy - 
aktivitetsoversikt
\ No newline at end of file
+mail_body_update_frontend      activitycalendarfrontend        no      Dette 
er en melding fra Bergen kommune/AktivBy.<br/><br/>I aktivitetsoversikten som 
ligger i kommuneportalen på internett, står du registrert som kontaktperson for 
%1.<br/>Det har kommet inn et endringsønske på denne aktiviteten. Bruk lenken 
under for å endre opplysningene om aktiviteten.<br/>%2<br/><br/><br/> Mvh %3 
kulturkontor
+mail_subject_update    activitycalendar        no      Melding fra AktivBy - 
Aktivitetsoversikt
\ No newline at end of file

Modified: branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bocommon.inc.php     
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.bocommon.inc.php     
2012-03-20 12:10:42 UTC (rev 8994)
@@ -48,6 +48,7 @@
                var $public_functions = array
                        (
                                'confirm_session'       => true,
+                               'get_vendor_email'      => true
                        );
 
                function __construct()
@@ -2126,4 +2127,40 @@
                        }
                        return $ret;
                }
+
+               public function get_vendor_email($vendor_id = 0)
+               {
+                       if(!$vendor_id)
+                       {
+                               $vendor_id = phpgw::get_var('vendor_id', 'int', 
'GET', 0);
+                       }
+                       $vendor_email = 
execMethod('property.sowo_hour.get_email', $vendor_id);
+
+                       $content_email = array();
+                       $title =  lang('The address to which this order will be 
sendt');
+                       foreach($vendor_email as $_entry )
+                       {                               
+                               $content_email[] = array
+                                       (
+
+                                               'value_email'           => 
$_entry['email'],
+                                               'value_select'          => 
"<input type='checkbox' name='values[vendor_email][]' 
value='{$_entry['email']}' title='{$title}'>"
+                                       );
+                       }
+
+                       if( phpgw::get_var('phpgw_return_as') == 'json' )
+                       {
+
+                               if(count($content_email))
+                               {
+                                       return json_encode($content_email);
+                               }
+                               else
+                               {
+                                       return "";
+                               }
+                       }
+                       return $content_email;
+               }
+
        }

Modified: branches/Version-1_0-branch/property/inc/class.boproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boproject.inc.php    
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.boproject.inc.php    
2012-03-20 12:10:42 UTC (rev 8994)
@@ -591,10 +591,12 @@
 
                function read_single_mini($project_id)
                {
-                       $project                                                
= $this->so->read_single($project_id);
-                       $dateformat                                             
= $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-                       $project['start_date']                  = 
$GLOBALS['phpgw']->common->show_date($project['start_date'],$dateformat);
-                       $project['end_date']                    = 
isset($project['end_date']) && $project['end_date'] ? 
$GLOBALS['phpgw']->common->show_date($project['end_date'],$dateformat) : '';
+                       if($project     = $this->so->read_single($project_id))
+                       {
+                               $dateformat                                     
        = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                               $project['start_date']                  = 
$GLOBALS['phpgw']->common->show_date($project['start_date'],$dateformat);
+                               $project['end_date']                    = 
isset($project['end_date']) && $project['end_date'] ? 
$GLOBALS['phpgw']->common->show_date($project['end_date'],$dateformat) : '';
+                       }
 
                        if($project['location_code'])
                        {

Modified: branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php  
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php  
2012-03-20 12:10:42 UTC (rev 8994)
@@ -598,33 +598,36 @@
 
                                switch ($value['status'])
                                {
-                               case 'R': $type = lang('Re-opened'); break;
-                               case 'RM': $type = lang('remark'); break;
-                               case 'X': $type = lang('Closed');    break;
-                               case 'O': $type = lang('Opened');    break;
-                               case 'A': $type = lang('Re-assigned'); break;
-                               case 'P': $type = lang('Priority changed'); 
break;
-                               case 'M':
-                                       $type = lang('Sent by email to');
-                                       $_order_sent_adress = 
explode('::',$value['new_value']);
-                                       $this->order_sent_adress = 
$_order_sent_adress[0]; // in case we want to resend the order as an reminder
-                                       unset($_order_sent_adress);
-                                       break;
-                               case 'MS':
-                                       $type = lang('Sent by sms');
-                                       break;
-                               case 'B': $type = lang('Budget changed'); break;
-                               case 'CO': $type = lang('Initial Coordinator'); 
break;
-                               case 'C': $type = lang('Coordinator changed'); 
break;
-                               case 'TO': $type = lang('Initial Category'); 
break;
-                               case 'T': $type = lang('Category changed'); 
break;
-                               case 'SO': $type = lang('Initial Status'); 
break;
-                               case 'S': $type = lang('Status changed'); break;
-                               case 'SC': $type = lang('Status confirmed'); 
break;
-                               case 'AP': $type = lang('Ask for approval'); 
break;
-                               case 'ON': $type = lang('Owner notified'); 
break;
-                               case 'H': $type = lang('Billable hours 
changed'); break;
-                               default: break;
+                                       case 'R': $type = lang('Re-opened'); 
break;
+                                       case 'RM': $type = lang('remark'); 
break;
+                                       case 'X': $type = lang('Closed');    
break;
+                                       case 'O': $type = lang('Opened');    
break;
+                                       case 'A': $type = lang('Re-assigned'); 
break;
+                                       case 'P': $type = lang('Priority 
changed'); break;
+                                       case 'M':
+                                               $type = lang('Sent by email 
to');
+                                               $_order_sent_adress = 
explode('::',$value['new_value']);
+                                               $this->order_sent_adress = 
$_order_sent_adress[0]; // in case we want to resend the order as an reminder
+                                               unset($_order_sent_adress);
+                                               break;
+                                       case 'MS':
+                                               $type = lang('Sent by sms');
+                                               break;
+                                       case 'B': $type = lang('Budget 
changed'); break;
+                                       case 'CO': $type = lang('Initial 
Coordinator'); break;
+                                       case 'C': $type = lang('Coordinator 
changed'); break;
+                                       case 'TO': $type = lang('Initial 
Category'); break;
+                                               case 'T': $type = 
lang('Category changed'); break;
+                                       case 'SO': $type = lang('Initial 
Status'); break;
+                                       case 'S': $type = lang('Status 
changed'); break;
+                                       case 'SC': $type = lang('Status 
confirmed'); break;
+                                       case 'AP': $type = lang('Ask for 
approval'); break;
+                                       case 'ON': $type = lang('Owner 
notified'); break;
+                                       case 'H': $type = lang('Billable hours 
changed'); break;
+                                       case 'NP': $type = lang('moved to 
another project'); break;
+                                       case 'OA': $type = lang('order 
approved'); break;
+                                       case 'OB': $type = lang('order approval 
revoked'); break;
+                                       default:
                                }
 
                                
if($value['new_value']=='O'){$value['new_value']=lang('Opened');}

Modified: branches/Version-1_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2012-03-20 12:10:42 UTC (rev 8994)
@@ -295,7 +295,7 @@
                                $uicols['datatype'][]           = '';
                                $uicols['sortable'][]           = true;
                                $uicols['exchange'][]           = false;
-                               $uicols['formatter'][]          = '';
+                               $uicols['formatter'][]          = $lookup ? '' 
: 'linktToEntity';
                                $uicols['classname'][]          = '';
 
                                $cols_return[]                          = 'id';
@@ -930,7 +930,7 @@
                                $uicols['datatype'][]           = '';
                                $uicols['sortable'][]           = true;
                                $uicols['exchange'][]           = false;
-                               $uicols['formatter'][]          = 
'linktToEntity';
+                               $uicols['formatter'][]          = $lookup ? '' 
: 'linktToEntity';
                                $uicols['classname'][]          = '';
 
                                $cols_return[]                          = 'id';

Modified: branches/Version-1_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soproject.inc.php    
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.soproject.inc.php    
2012-03-20 12:10:42 UTC (rev 8994)
@@ -735,6 +735,7 @@
                function read_single($project_id, $values = array())
                {
                        $project_id = (int) $project_id;
+                       $project = array();
                        $sql = "SELECT * from fm_project WHERE 
id={$project_id}";
 
                        $this->db->query($sql,__LINE__,__FILE__);
@@ -1160,9 +1161,13 @@
 
                        if($project['budget'])
                        {
-                               $new_budget = 
$this->updat_budget($project['id'], $project['budget_year'], 
$project['budget']);
+                               $this->updat_budget($project['id'], 
$project['budget_year'], $project['budget']);
                        }
 
+                       $this->db->query("SELECT sum(budget) AS sum_budget FROM 
fm_project_budget WHERE project_id = " . (int)$project['id'],__LINE__,__FILE__);
+                       $this->db->next_record();
+                       $new_budget =(int)$this->db->f('sum_budget');
+
                        if($project['extra']['contact_phone'] && 
$project['extra']['tenant_id'])
                        {
                                $this->db->query("UPDATE fm_tenant SET 
contact_phone='". $project['extra']['contact_phone']. "' WHERE id='". 
$project['extra']['tenant_id']. "'",__LINE__,__FILE__);
@@ -1190,13 +1195,18 @@
                        }
 
                        
$this->update_request_status($project['id'],$project['status'],$project['cat_id'],$project['coordinator']);
-                       $this->db->query("SELECT id from fm_workorder WHERE 
project_id=" .  (int)$project['id'] ,__LINE__,__FILE__);
+                       $this->db->query("SELECT id FROM fm_workorder WHERE 
project_id=" .  (int)$project['id'] ,__LINE__,__FILE__);
                        $workorders = array();
                        while ($this->db->next_record())
                        {
                                $workorders[] = $this->db->f('id');
                        }
 
+                       if ($workorders)
+                       {
+                               $historylog_workorder   = 
CreateObject('property.historylog','workorder');
+                       }
+
                        if (($old_status != $project['status']) || 
$project['confirm_status'])
                        {
                                $close_pending_action = false;
@@ -1229,10 +1239,6 @@
                                        unset($action_params);
                                }
 
-                               if ($workorders)
-                               {
-                                       $historylog_workorder   = 
CreateObject('property.historylog','workorder');
-                               }
 
                                if($old_status != $project['status'])
                                {
@@ -1326,6 +1332,88 @@
 
 //                     execMethod('property.soworkorder.update_planned_cost', 
$project['id']);
 
+                       if (isset($project['new_project_id']) && 
$project['new_project_id'] && ($project['new_project_id'] != $project['id']))
+                       {
+                               $new_project_id = (int) 
$project['new_project_id'];
+                               reset($workorders);
+                               foreach($workorders as $workorder_id)
+                               {
+                                       
$historylog_workorder->add('NP',$workorder_id,$new_project_id, $project['id']);
+                               }
+
+                               $sql = "SELECT sum(budget) AS sum_budget FROM 
fm_project_budget WHERE project_id = {$new_project_id}";
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               $this->db->next_record();
+                               $old_budget_new_project = 
(int)$this->db->f('sum_budget');
+
+                               $sql = "SELECT * FROM fm_project_budget WHERE 
project_id = " . (int)$project['id'];
+                               $this->db->query($sql,__LINE__,__FILE__);
+
+                               $budget = array();
+                               while ($this->db->next_record())
+                               {
+                                       $budget[] = array
+                                       (
+                                               'project_id'            => 
(int)$project['id'],
+                                               'year'                          
=> $this->db->f('year'),
+                                               'budget'                        
=> (int)$this->db->f('budget'),
+                                               'user_id'                       
=> $this->db->f('user_id'),
+                                               'entry_date'            => 
$this->db->f('entry_date'),
+                                               'modified_date'         => 
$this->db->f('modified_date')
+                                       );
+                               }
+                               
+                               foreach($budget as $entry)
+                               {
+                                       $sql = "SELECT * FROM fm_project_budget 
WHERE project_id = {$new_project_id} AND year = {$entry['year']}";
+                                       
$this->db->query($sql,__LINE__,__FILE__);
+                                       if($this->db->next_record())
+                                       {
+                                               $sql = "UPDATE 
fm_project_budget SET budget = budget + {$entry['budget']} WHERE project_id = 
{$new_project_id} AND year = {$entry['year']}";
+                                       }
+                                       else
+                                       {
+                                               $value_set = array
+                                               (
+                                                       'project_id'            
=> $new_project_id,
+                                                       'year'                  
        => $entry['year'],
+                                                       'budget'                
        => $entry['budget'],
+                                                       'user_id'               
        => $entry['user_id'],
+                                                       'entry_date'            
=> $entry['entry_date'],
+                                                       'modified_date'         
=> $entry['modified_date']
+                                               );
+                                               $cols = implode(',', 
array_keys($value_set));
+                                               $values = 
$this->db->validate_insert(array_values($value_set));
+                                               $this->db->query("INSERT INTO 
fm_project_budget ({$cols}) VALUES ({$values})",__LINE__,__FILE__);
+                                       }
+                               }
+
+                               if ($old_budget)
+                               {
+                                       $historylog->add('B',$project['id'],0, 
$old_budget);
+                               }
+
+                               $sql = "SELECT sum(budget) AS sum_budget FROM 
fm_project_budget WHERE project_id = {$new_project_id}";
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               $this->db->next_record();
+                               $new_budget_new_project = 
(int)$this->db->f('sum_budget');
+
+                               $sql = "SELECT reserve FROM fm_project WHERE id 
= " . (int)$project['id'];
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               $this->db->next_record();
+                               $reserve_old_project    = 
(int)$this->db->f('reserve');
+
+                               if ($new_budget_new_project != 
$old_budget_new_project)
+                               {
+                                       $historylog->add('B',$new_project_id, 
$new_budget_new_project, $old_budget_new_project);
+                               }
+                               $this->db->query("UPDATE fm_workorder SET 
project_id = {$new_project_id} WHERE project_id = 
{$project['id']}",__LINE__,__FILE__);
+                               $this->db->query("UPDATE fm_project SET reserve 
= 0 WHERE reserve IS NULL AND id = {$new_project_id}" ,__LINE__,__FILE__);
+                               $this->db->query("UPDATE fm_project SET budget 
= {$new_budget_new_project}, reserve = reserve + {$reserve_old_project} WHERE 
id = {$new_project_id}" ,__LINE__,__FILE__);
+                               $this->db->query("UPDATE fm_project SET budget 
= 0, reserve = 0 WHERE id =  " . (int)$project['id'] ,__LINE__,__FILE__);
+                               $this->db->query("DELETE FROM fm_project_budget 
WHERE project_id =  " . (int)$project['id'] ,__LINE__,__FILE__);
+                       }
+
                        $receipt['id'] = $project['id'];
                        $receipt['message'][] = array('msg'=>lang('project %1 
has been edited', $project['id']));
 

Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2012-03-20 12:10:42 UTC (rev 8994)
@@ -752,6 +752,8 @@
                                                'grants'                        
        => (int)$this->grants[$this->db->f('user_id')],
                                                'billable_hours'                
=> $this->db->f('billable_hours'),
                                                'contract_sum'                  
=> $this->db->f('contract_sum'),
+                                               'approved'                      
        => $this->db->f('approved'),
+                                               'mail_recipients'               
=> explode(',', $this->db->f('mail_recipients')),
                                        );
                        }
 
@@ -1009,17 +1011,19 @@
                                        $workorder['key_fetch'],
                                        $workorder['vendor_id'],
                                        $workorder['charge_tenant'],
-                                       $this->account,
+                                       $workorder['user_id'] ? 
$workorder['user_id'] : $this->account,
                                        $workorder['ecodimb'],
                                        $workorder['cat_id'],
                                        $workorder['billable_hours'],
-                                       $workorder['contract_sum']
+                                       $workorder['contract_sum'],
+                                       $workorder['approved'],
+                                       isset($workorder['vendor_email']) && 
is_array($workorder['vendor_email']) ? implode(',', $workorder['vendor_email']) 
: ''
                                );
 
                        $values = $this->bocommon->validate_db_insert($values);
 
                        $this->db->query("INSERT INTO fm_workorder 
(id,num,project_id,title,access,entry_date,start_date,end_date,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
 $cols) "
+                               . 
"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,'mail_recipients
  $cols) "
                                . "VALUES ( $values $vals)",__LINE__,__FILE__);
 
                        $this->db->query("INSERT INTO fm_orders (id,type) 
VALUES ({$id},'workorder')");
@@ -1075,12 +1079,13 @@
                        $workorder['title'] = 
$this->db->db_addslashes($workorder['title']);
                        $workorder['billable_hours'] = 
(float)str_replace(',','.', $workorder['billable_hours']);
 
-                       $this->db->query("SELECT 
status,budget,calculation,billable_hours FROM fm_workorder WHERE id = 
{$workorder['id']}",__LINE__,__FILE__);
+                       $this->db->query("SELECT 
status,budget,calculation,billable_hours,approved FROM fm_workorder WHERE id = 
{$workorder['id']}",__LINE__,__FILE__);
                        $this->db->next_record();
 
                        $old_status                     = 
$this->db->f('status');
                        $old_budget                     = 
$this->db->f('budget');
                        $old_billable_hours     = 
$this->db->f('billable_hours');
+                       $old_approved           = $this->db->f('approved');
 
                        if ($this->db->f('calculation') > 0)
                        {
@@ -1119,24 +1124,27 @@
 
                        $value_set = array
                                (
-                                       'title'                 => 
$workorder['title'],
-                                       'status'                => 
$workorder['status'],
-                                       'start_date'    => 
$workorder['start_date'],
-                                       'end_date'              => 
$workorder['end_date'],
-                                       'descr'                 => 
$workorder['descr'],
-                                       'budget'                => 
(int)$workorder['budget'],
-                                       'combined_cost' => $combined_cost,
-                                       'key_deliver'   => 
$workorder['key_deliver'],
-                                       'key_fetch'             => 
$workorder['key_fetch'],
-                                       'account_id'    => 
$workorder['b_account_id'],
-                                       'rig_addition'  => 
$workorder['addition_rs'],
-                                       'addition'              => 
$workorder['addition_percentage'],
-                                       'charge_tenant' => 
$workorder['charge_tenant'],
-                                       'vendor_id'             => 
$workorder['vendor_id'],
-                                       'ecodimb'               => 
$workorder['ecodimb'],
-                                       'category'              => 
$workorder['cat_id'],
-                                       'billable_hours'=> 
$workorder['billable_hours'],
-                                       'contract_sum'  => 
$workorder['contract_sum'],
+                                       'title'                         => 
$workorder['title'],
+                                       'status'                        => 
$workorder['status'],
+                                       'start_date'            => 
$workorder['start_date'],
+                                       'end_date'                      => 
$workorder['end_date'],
+                                       'descr'                         => 
$workorder['descr'],
+                                       'budget'                        => 
(int)$workorder['budget'],
+                                       'combined_cost'         => 
$combined_cost,
+                                       'key_deliver'           => 
$workorder['key_deliver'],
+                                       'key_fetch'                     => 
$workorder['key_fetch'],
+                                       'account_id'            => 
$workorder['b_account_id'],
+                                       'rig_addition'          => 
$workorder['addition_rs'],
+                                       'addition'                      => 
$workorder['addition_percentage'],
+                                       'charge_tenant'         => 
$workorder['charge_tenant'],
+                                       'vendor_id'                     => 
$workorder['vendor_id'],
+                                       'user_id'                       => 
$workorder['user_id'],
+                                       'ecodimb'                       => 
$workorder['ecodimb'],
+                                       'category'                      => 
$workorder['cat_id'],
+                                       'billable_hours'        => 
$workorder['billable_hours'],
+                                       'contract_sum'          => 
$workorder['contract_sum'],
+                                       'approved'                      => 
$workorder['approved'],
+                                       'mail_recipients'       => 
isset($workorder['vendor_email']) && is_array($workorder['vendor_email']) ? 
implode(',', $workorder['vendor_email']) : '',
                                );
 
                        if($workorder['status'] == 'closed')
@@ -1185,6 +1193,20 @@
  */
 //                     $this->update_planned_cost($workorder['project_id']); 
// at project
 
+
+                       if ($old_approved != $workorder['approved'])
+                       {
+                               if($workorder['approved'])
+                               {
+                                       
$historylog->add('OA',$workorder['id'],$workorder['approved'], $old_approved);
+                               }
+                               else//revoked
+                               {
+                                       
$historylog->add('OB',$workorder['id'],$workorder['approved'], $old_approved);  
                        
+                               }
+                               $check_pending_action = true;
+                       }
+
                        $check_pending_action = false;
                        if ((float)$old_billable_hours != 
(float)$workorder['billable_hours'])
                        {
@@ -1210,7 +1232,7 @@
                        {
                                $this->db->query("SELECT * FROM 
fm_workorder_status WHERE id = '{$workorder['status']}'");
                                $this->db->next_record();
-                               if ($this->db->f('approved') )
+                               if ($this->db->f('approved') || 
$workorder['approved'] )
                                {
                                        $action_params = array
                                                (
@@ -1256,6 +1278,13 @@
                                $historylog->add('B', $workorder['id'], 
$workorder['budget'], $old_budget);
                        }
 
+                       if (isset($workorder['new_project_id']) && 
$workorder['new_project_id'] && ($workorder['new_project_id'] != 
$workorder['project_id']))
+                       {
+                               $new_project_id = (int) 
$workorder['new_project_id'];
+                               $this->db->query("UPDATE fm_workorder SET 
project_id = {$new_project_id} WHERE id= {$workorder['id']}" 
,__LINE__,__FILE__);
+                               
$historylog->add('NP',$workorder['id'],$new_project_id, 
$workorder['project_id']);
+                       }
+
                        if ($workorder['remark'])
                        {
                                $historylog->add('RM', $workorder['id'], 
$workorder['remark']);

Modified: branches/Version-1_0-branch/property/inc/class.uibudget.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uibudget.inc.php     
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.uibudget.inc.php     
2012-03-20 12:10:42 UTC (rev 8994)
@@ -1032,10 +1032,17 @@
                                array_unshift 
($values_combo_box[1],$default_value);
 
                                $cat_filter =  
$this->cats->formatted_xslt_list(array('select_name' => 'cat_id','selected' => 
$this->cat_id,'globals' => True,'link_data' => $link_data));
-                               $values_combo_box[2] =  $cat_filter[cat_list];
+                               $values_combo_box[2] =  $cat_filter['cat_list'];
                                $default_value = array 
('cat_id'=>'','name'=>lang('no category'));
                                array_unshift 
($values_combo_box[2],$default_value);
+                               
+                               foreach($values_combo_box[2] as &$entry)
+                               {
+                                       $entry['id'] = $entry['cat_id'];
+                               }
 
+//_debug_array($values_combo_box[2]);die();
+
                                $values_combo_box[3] =  
$this->bo->get_b_group_list($this->grouping);
                                $default_value = array 
('id'=>'','name'=>lang('no grouping'));
                                array_unshift 
($values_combo_box[3],$default_value);
@@ -1080,7 +1087,7 @@
                                                                        'style' 
        => 'filter',
                                                                        
'tab_index' => 2
                                                                ),
-                                                               array
+/*                                                             array
                                                                ( //boton       
CATEGORY
                                                                        'id'    
        => 'btn_cat_id',
                                                                        'name'  
        => 'cat_id',
@@ -1106,8 +1113,45 @@
                                                                        'type'  
        => 'button',
                                                                        'style' 
        => 'filter',
                                                                        
'tab_index' => 5
+                                                               ),*/
+                                                               array
+                                                               ( //boton       
USER
+                                                                       //      
'id' => 'btn_user_id',
+                                                                       'id' => 
'sel_cat_id',
+                                                                       'name' 
=> 'cat_id',
+                                                                       'value' 
=> lang('Category'),
+                                                                       'type' 
=> 'select',
+                                                                       'style' 
=> 'filter',
+                                                                       
'values' => $values_combo_box[2],
+                                                                       
'onchange'=> 'onChangeSelect("cat_id");',
+                                                                       
'tab_index' => 3
                                                                ),
                                                                array
+                                                               ( //boton       
USER
+                                                                       //      
'id' => 'btn_user_id',
+                                                                       'id' => 
'sel_grouping',
+                                                                       'name' 
=> 'grouping',
+                                                                       'value' 
=> lang('grouping'),
+                                                                       'type' 
=> 'select',
+                                                                       'style' 
=> 'filter',
+                                                                       
'values' => $values_combo_box[3],
+                                                                       
'onchange'=> 'onChangeSelect("grouping");',
+                                                                       
'tab_index' => 4
+                                                               ),
+                                                               array
+                                                               ( //boton       
USER
+                                                                       //      
'id' => 'btn_user_id',
+                                                                       'id' => 
'sel_dimb_id',
+                                                                       'name' 
=> 'dimb_id',
+                                                                       'value' 
=> lang('dimb'),
+                                                                       'type' 
=> 'select',
+                                                                       'style' 
=> 'filter',
+                                                                       
'values' => $values_combo_box[4],
+                                                                       
'onchange'=> 'onChangeSelect("dimb_id");',
+                                                                       
'tab_index' => 5
+                                                               ),
+
+                                                               array
                                                                (
                                                                        'type'  
=> 'button',
                                                                        'id'    
=> 'btn_export',
@@ -1144,7 +1188,7 @@
                                                                ( //div values  
combo_box_1
                                                                        'id' => 
'values_combo_box_1',
                                                                        'value' 
=> $this->bocommon->select2String($values_combo_box[1])
-                                                               ),
+                                                               )/*,
                                                                array
                                                                ( //div values  
combo_box_2
                                                                        'id' => 
'values_combo_box_2',
@@ -1159,7 +1203,7 @@
                                                                ( //div values  
combo_box_4
                                                                        'id' => 
'values_combo_box_4',
                                                                        'value' 
=> $this->bocommon->select2String($values_combo_box[4])
-                                                               )
+                                                               )*/
 
                                                        )
                                                )

Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-03-20 12:10:42 UTC (rev 8994)
@@ -263,15 +263,16 @@
                                $default_value = array 
('id'=>'','name'=>lang('no hour category'));
                                array_unshift 
($values_combo_box[3],$default_value);
 
-                               $values_combo_box[4]  = 
$this->bo->get_user_list();
-                               array_unshift 
($values_combo_box[4],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 projects')));
-                               $default_value = array 
('id'=>'','name'=>lang('no user'));
+                               $values_combo_box[4]  = 
$this->bo->get_criteria_list($this->criteria_id);
+                               $default_value = array 
('id'=>'','name'=>lang('no criteria'));
                                array_unshift 
($values_combo_box[4],$default_value);
 
-                               $values_combo_box[5]  = 
$this->bo->get_criteria_list($this->criteria_id);
-                               $default_value = array 
('id'=>'','name'=>lang('no criteria'));
+                               $values_combo_box[5]  = 
$this->bo->get_user_list();
+                               array_unshift 
($values_combo_box[5],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 projects')));
+                               $default_value = array 
('id'=>'','name'=>lang('no user'));
                                array_unshift 
($values_combo_box[5],$default_value);
 
+
                                $datatable['actions']['form'] = array
                                        (
                                                array
@@ -327,6 +328,15 @@
                                                                        
'tab_index' => 4
                                                                ),
                                                                array
+                                                               ( //boton       
search criteria
+                                                                       'id' => 
'btn_criteria_id',
+                                                                       'name' 
=> 'criteria_id',
+                                                                       'value' 
=> lang('search criteria'),
+                                                                       'type' 
=> 'button',
+                                                                       'style' 
=> 'filter',
+                                                                       
'tab_index' => 5
+                                                               ),/*
+                                                               array
                                                                ( //boton       
USER
                                                                        'id' => 
'btn_user_id',
                                                                        'name' 
=> 'user_id',
@@ -334,16 +344,19 @@
                                                                        'type' 
=> 'button',
                                                                        'style' 
=> 'filter',
                                                                        
'tab_index' => 5
-                                                               ),
-                                                               array
-                                                               ( //boton       
search criteria
-                                                                       'id' => 
'btn_criteria_id',
-                                                                       'name' 
=> 'criteria_id',
-                                                                       'value' 
=> lang('search criteria'),
-                                                                       'type' 
=> 'button',
-                                                                       'style' 
=> 'filter',
-                                                                       
'tab_index' => 6
-                                                               ),
+                                                               ),*/
+                                                                       array
+                                                                       ( 
//boton       USER
+                                                                               
//      'id' => 'btn_user_id',
+                                                                               
'id' => 'sel_filter', // testing traditional listbox for long list
+                                                                               
'name' => 'filter',
+                                                                               
'value' => lang('User'),
+                                                                               
'type' => 'select',
+                                                                               
'style' => 'filter',
+                                                                               
'values' => $values_combo_box[5],
+                                                                               
'onchange'=> 'onChangeSelect("filter");',
+                                                                               
'tab_index' => 6
+                                                                       ),
                                                                //for link 
"columns", next to Export button
                                                                array
                                                                (
@@ -455,12 +468,12 @@
                                                                ( //div values  
combo_box_4
                                                                        'id' => 
'values_combo_box_4',
                                                                        'value' 
=> $this->bocommon->select2String($values_combo_box[4])
-                                                               ),
+                                                               )/*,
                                                                array
                                                                ( //div values  
combo_box_5
                                                                        'id' => 
'values_combo_box_5',
                                                                        'value' 
=> $this->bocommon->select2String($values_combo_box[5])
-                                                               )
+                                                               )*/
                                                        )
                                                )
                                        )
@@ -1118,6 +1131,16 @@
                                                }
                                        }
 
+                                       if(isset($values['new_project_id']) && 
$values['new_project_id'] && 
!$this->bo->read_single_mini($values['new_project_id']))
+                                       {
+                                               
$receipt['error'][]=array('msg'=>lang('the project %1 does not exist', 
$values['new_project_id']));
+                                       }
+
+                                       if(isset($values['new_project_id']) && 
$values['new_project_id'] && $values['new_project_id'] == $id)
+                                       {
+                                               
unset($values['new_project_id']);
+                                       }
+
                                        if(!isset($values['end_date']) || 
!$values['end_date'])
                                        {
                                                
$receipt['error'][]=array('msg'=>lang('Please select an end date!'));

Modified: branches/Version-1_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uitts.inc.php        
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.uitts.inc.php        
2012-03-20 12:10:42 UTC (rev 8994)
@@ -2222,7 +2222,7 @@
                        switch($action)
                        {
                                case 'get_vendor':
-                                       return $this->get_vendor_email();
+                                       return 
$this->bocommon->get_vendor_email();
                                        break;
                                case 'get_files':
                                        return $this->get_files();
@@ -2279,40 +2279,7 @@
                }
 
 
-               function get_vendor_email($vendor_id = 0)
-               {
-                       if(!$vendor_id)
-                       {
-                               $vendor_id = phpgw::get_var('vendor_id', 'int', 
'GET', 0);
-                       }
-                       $vendor_email = 
execMethod('property.sowo_hour.get_email', $vendor_id);
 
-                       $content_email = array();
-                       foreach($vendor_email as $_entry )
-                       {                               
-                               $content_email[] = array
-                                       (
-
-                                               'value_email'           => 
$_entry['email'],
-                                               'value_select'          => 
'<input type="checkbox" name="values[vendor_email][]" 
value="'.$_entry['email'].'" title="'.lang('The address to which this order 
will be sendt').'">'
-                                       );
-                       }
-
-                       if( phpgw::get_var('phpgw_return_as') == 'json' )
-                       {
-
-                               if(count($content_email))
-                               {
-                                       return json_encode($content_email);
-                               }
-                               else
-                               {
-                                       return "";
-                               }
-                       }
-                       return $content_email;
-               }
-
                function view()
                {
                        if(!$this->acl_read)
@@ -3075,7 +3042,7 @@
                                );      
 
 
-                       $content_email = 
$this->get_vendor_email(isset($ticket['vendor_id'])?$ticket['vendor_id']:0);
+                       $content_email = 
$this->bocommon->get_vendor_email(isset($ticket['vendor_id'])?$ticket['vendor_id']:0);
 
                        $datavalues[3] = array
                                (

Modified: branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php    
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.uiwo_hour.inc.php    
2012-03-20 12:10:42 UTC (rev 8994)
@@ -1200,12 +1200,12 @@
                        $send_as_pdf    = phpgw::get_var('send_as_pdf', 'bool');
                        $email_receipt  = phpgw::get_var('email_receipt', 
'bool');
                        
-
+/*
                        if($update_email)
                        {
                                
$this->bo->update_email($to_email,$workorder_id);
                        }
-
+*/
                        $workorder = 
$this->boworkorder->read_single($workorder_id);
                        $workorder_history = 
$this->boworkorder->read_record_history($workorder_id);
 
@@ -1288,9 +1288,12 @@
                        $dateformat                             = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
                        $date                                   = 
$GLOBALS['phpgw']->common->show_date(time(),$dateformat);
 
-                       $from_name =    
$GLOBALS['phpgw_info']['user']['fullname'];
-                       $from_email =   
"{$from_name}<{$GLOBALS['phpgw_info']['user']['preferences']['property']['email']}>";
 
+                       
$GLOBALS['phpgw']->preferences->set_account_id($workorder['user_id'], true);
+
+                       $from_name =    
$GLOBALS['phpgw']->accounts->get($workorder['user_id'])->__toString();
+                       $from_email =   
"{$from_name}<{$GLOBALS['phpgw']->preferences->data['property']['email']}>";
+
                        if($this->config->config_data['wo_status_sms'])
                        {
                                $sms_location_id = 
$GLOBALS['phpgw']->locations->get_id('sms', 'run');
@@ -1381,10 +1384,10 @@
                                        'lang_from'                             
                => lang('From'),
                                        'from_name'                             
                => $from_name,
                                        'from_email'                            
        => $from_email,
-                                       'from_phone'                            
        => 
$GLOBALS['phpgw_info']['user']['preferences']['property']['cellphone'],
+                                       'from_phone'                            
        => $GLOBALS['phpgw']->preferences->data['property']['cellphone'],
                                        'lang_district'                         
        => lang('District'),
                                        'district'                              
                => $project['location_data']['district_id'],
-                                       'ressursnr'                             
                => 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['ressursnr']) ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']['ressursnr'] : '',
+                                       'ressursnr'                             
                => 
isset($GLOBALS['phpgw']->preferences->data['property']['ressursnr']) ? 
$GLOBALS['phpgw']->preferences->data['property']['ressursnr'] : '',
 
                                        'lang_to'                               
                => lang('To'),
                                        'to_name'                               
                => $workorder['vendor_name'],
@@ -1432,13 +1435,15 @@
                                        'order_footer'                          
        => $this->config->config_data['order_footer']
                                );
 
-                       if($send_order && !$to_email)
+                       if($send_order && !$to_email && 
!$workorder['mail_recipients'])
                        {
                                $receipt['error'][]=array('msg'=>lang('No 
mailaddress is selected'));
                        }
 
-                       if($to_email || $print)
+                       if($to_email || $print || 
($workorder['mail_recipients'] && $_POST['send_order']))
                        {
+                               $_to = $workorder['mail_recipients'] ? 
implode(';', $workorder['mail_recipients']) : $to_email;
+                               
                                $email_data['use_yui_table'] = false;
 
                                
$this->create_html->add_file(array(PHPGW_SERVER_ROOT . 
'/property/templates/base/wo_hour'));
@@ -1494,7 +1499,7 @@
                                        exit;
                                }
 
-                               
if($GLOBALS['phpgw_info']['user']['preferences']['property']['order_email_rcpt']==1)
+                               
if($GLOBALS['phpgw']->preferences->data['property']['order_email_rcpt']==1)
                                {
                                        $bcc = $from_email;
                                }
@@ -1547,7 +1552,7 @@
                                        {
                                                $GLOBALS['phpgw']->send = 
CreateObject('phpgwapi.send');
                                        }
-                                       $rcpt = 
$GLOBALS['phpgw']->send->msg('email', $to_email, $subject, $body, '', $cc, 
$bcc, $from_email, $from_name, 'html', '', $attachments, $email_receipt);
+                                       $rcpt = 
$GLOBALS['phpgw']->send->msg('email', $_to, $subject, $body, '', $cc, $bcc, 
$from_email, $from_name, 'html', '', $attachments, $email_receipt);
                                }
                                else
                                {
@@ -1558,7 +1563,7 @@
                                {
                                        $_attachment_log = $attachment_log ? 
"::$attachment_log" : '';
                                        $historylog     = 
CreateObject('property.historylog','workorder');
-                                       
$historylog->add('M',$workorder_id,"{$to_email}{$_attachment_log}");
+                                       
$historylog->add('M',$workorder_id,"{$_to}{$_attachment_log}");
                                        
$receipt['message'][]=array('msg'=>lang('Workorder is sent by email!'));
                                        if($attachment_log)
                                        {
@@ -1602,7 +1607,7 @@
                                {
                                        
$receipt['error'][]=array('msg'=>lang('The recipient did not get the email:'));
                                        
$receipt['error'][]=array('msg'=>lang('From') . ' ' . $from_email);
-                                       
$receipt['error'][]=array('msg'=>lang('To') . ' ' . $to_email);
+                                       
$receipt['error'][]=array('msg'=>lang('To') . ' ' . $_to);
                                }
                        }
 
@@ -1701,7 +1706,7 @@
                                        'lang_to_email_address_statustext'      
=> lang('The address to which this order will be sendt'),
                                        'to_email'                              
                        => $to_email,
                                        'email_list'                            
                => $email_list,
-                                       'requst_email_receipt'                  
        => 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['request_order_email_rcpt'])
 && 
$GLOBALS['phpgw_info']['user']['preferences']['property']['request_order_email_rcpt']==1
 ? 1 : 0,
+                                       'requst_email_receipt'                  
        => 
isset($GLOBALS['phpgw']->preferences->data['request_order_email_rcpt']) && 
$GLOBALS['phpgw']->preferences->data['property']['request_order_email_rcpt']==1 
? 1 : 0,
                                        'lang_select_email'                     
                => lang('Select email'),
                                        'send_order_action'                     
                => $GLOBALS['phpgw']->link('/index.php',array(
                                                                                
                                                'menuaction'    => 
'property.uiwo_hour.view',
@@ -1745,7 +1750,8 @@
                                                                                
                                                        'show_cost'             
=> $show_cost,
                                                                                
                                                        'show_details'  => 
$show_details,
                                                                                
                                                        'preview'               
=> true,
-                                                                               
                                                        )) . "','100','100')"
+                                                                               
                                                        )) . "','100','100')",
+                                       'mail_recipients'                       
                => isset($workorder['mail_recipients']) && 
is_array($workorder['mail_recipients']) ? implode(';', 
$workorder['mail_recipients']) : ''
                                );
 
 
@@ -1772,9 +1778,6 @@
                        $function_msg   = $this->boworkorder->order_sent_adress 
? lang('ReSend order') :lang('Send order');
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . $appname . ': ' . $function_msg;
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
-                       //$GLOBALS['phpgw']->xslttpl->pp();
-                       //$this->save_sessiondata();
-
                }
 
 

Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2012-03-20 12:10:42 UTC (rev 8994)
@@ -270,15 +270,16 @@
                                $default_value = array ('id'=>'','name'=> 
lang('no hour category'));
                                array_unshift 
($values_combo_box[3],$default_value);
 
-                               $values_combo_box[4]  = 
$this->bo->get_user_list();
-                               array_unshift 
($values_combo_box[4],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 orders')));
-                               $default_value = array 
('id'=>'','name'=>lang('no user'));
+                               $values_combo_box[4]  = 
$this->bo->get_criteria_list($this->criteria_id);
+                               $default_value = array 
('id'=>'','name'=>lang('no criteria'));
                                array_unshift 
($values_combo_box[4],$default_value);
 
-                               $values_combo_box[5]  = 
$this->bo->get_criteria_list($this->criteria_id);
-                               $default_value = array 
('id'=>'','name'=>lang('no criteria'));
+                               $values_combo_box[5]  = 
$this->bo->get_user_list();
+                               array_unshift 
($values_combo_box[5],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 orders')));
+                               $default_value = array 
('id'=>'','name'=>lang('no user'));
                                array_unshift 
($values_combo_box[5],$default_value);
 
+
                                $datatable['actions']['form'] = array
                                        (
                                                array
@@ -340,6 +341,15 @@
                                                                        
'tab_index' => 4
                                                                ),
                                                                array
+                                                               ( //boton       
search criteria
+                                                                       'id' => 
'btn_criteria_id',
+                                                                       'name' 
=> 'criteria_id',
+                                                                       'value' 
=> lang('search criteria'),
+                                                                       'type' 
=> 'button',
+                                                                       'style' 
=> 'filter',
+                                                                       
'tab_index' => 5
+                                                               ),
+                                                       /*      array
                                                                ( //boton       
USER
                                                                        'id' => 
'btn_user_id',
                                                                        'name' 
=> 'filter',
@@ -348,15 +358,19 @@
                                                                        'style' 
=> 'filter',
                                                                        
'tab_index' => 5
                                                                ),
-                                                               array
-                                                               ( //boton       
search criteria
-                                                                       'id' => 
'btn_criteria_id',
-                                                                       'name' 
=> 'criteria_id',
-                                                                       'value' 
=> lang('search criteria'),
-                                                                       'type' 
=> 'button',
-                                                                       'style' 
=> 'filter',
-                                                                       
'tab_index' => 6
-                                                               ),
+                                                       */
+                                                                       array
+                                                                       ( 
//boton       USER
+                                                                               
//      'id' => 'btn_user_id',
+                                                                               
'id' => 'sel_filter', // testing traditional listbox for long list
+                                                                               
'name' => 'filter',
+                                                                               
'value' => lang('User'),
+                                                                               
'type' => 'select',
+                                                                               
'style' => 'filter',
+                                                                               
'values' => $values_combo_box[5],
+                                                                               
'onchange'=> 'onChangeSelect("filter");',
+                                                                               
'tab_index' => 6
+                                                                       ),
                                                                //for link 
"columns", next to Export button
                                                                array
                                                                (
@@ -457,12 +471,12 @@
                                                                ( //div values  
combo_box_4
                                                                        'id' => 
'values_combo_box_4',
                                                                        'value' 
=> $this->bocommon->select2String($values_combo_box[4])
-                                                               ),
+                                                               )/*,
                                                                array
                                                                ( //div values  
combo_box_5
                                                                        'id' => 
'values_combo_box_5',
                                                                        'value' 
=> $this->bocommon->select2String($values_combo_box[5])
-                                                               )
+                                                               )*/
 
                                                        )
                                                )
@@ -945,6 +959,16 @@
                                        $values = 
$this->bocommon->collect_locationdata($values,$insert_record);
                                }
 
+                               if(isset($values['new_project_id']) && 
$values['new_project_id'] && 
!$boproject->read_single_mini($values['new_project_id']))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('the project %1 does not exist', 
$values['new_project_id']));
+                               }
+
+                               if(isset($values['new_project_id']) && 
$values['new_project_id'] && $values['new_project_id'] == $values['project_id'])
+                               {
+                                       unset($values['new_project_id']);
+                               }
+
                                if(!$values['title'])
                                {
                                        
$receipt['error'][]=array('msg'=>lang('Please enter a workorder title !'));
@@ -1592,6 +1616,44 @@
                                $myButtons[]    = $notify_info['buttons'];
                        }
 
+
+
+                       $myColumnDefs[] = array
+                               (
+                                       'name'          => "4",
+                                       'values'        =>      
json_encode(array(      array('key' => 'value_email',   'label'=>lang('email'), 
'sortable'=>true,'resizeable'=>true),
+                                                                               
                                array('key' => 
'value_select','label'=>lang('select'),'sortable'=>false,'resizeable'=>true)))
+                               );      
+
+
+                       $content_email =  
execMethod('property.bocommon.get_vendor_email', isset($values['vendor_id']) ? 
$values['vendor_id'] : 0 );
+                       
+                       if(isset($values['mail_recipients']) && 
is_array($values['mail_recipients']))
+                       {
+                               $_recipients_found = array();
+                               foreach($content_email as &$vendor_email)
+                               {
+                                       
if(in_array($vendor_email['value_email'], $values['mail_recipients']))
+                                       {
+                                                $vendor_email['value_select'] 
= str_replace("type='checkbox'", "type='checkbox' checked='checked'", 
$vendor_email['value_select']);
+                                                $_recipients_found[] = 
$vendor_email['value_email'];
+                                       }
+                               }
+                               $value_extra_mail_address = implode(',', 
array_diff($values['mail_recipients'], $_recipients_found));
+                       }
+
+                       $datavalues[] = array
+                               (
+                                       'name'                                  
=> "4",
+                                       'values'                                
=> json_encode($content_email),
+                                       'total_records'                 => 
count($content_email),
+                                       'permission'                    => "''",
+                                       'is_paginator'                  => 0,
+                                       'edit_action'                   => "''",
+                                       'footer'                                
=> 0
+                               );
+
+
                        $link_claim = '';
                        
if(isset($values['charge_tenant'])?$values['charge_tenant']:'')
                        {
@@ -1612,12 +1674,18 @@
                        $cat_sub = array_merge($catetory,$cat_sub);
 
                        $suppresscoordination                   = 
isset($config->config_data['project_suppresscoordination']) && 
$config->config_data['project_suppresscoordination'] ? 1 : '';
+                       $user_list = $this->bocommon->get_user_list('select', 
isset($values['user_id']) && $values['user_id'] ? $values['user_id'] : 
$this->account ,false,false,-1,false,false,'',-1);
+                       foreach ($user_list as &$user)
+                       {
+                               $user['id'] = $user['user_id'];
+                       }
+                       
+                       $value_coordinator = isset($project['coordinator']) ? 
$GLOBALS['phpgw']->accounts->get($project['coordinator'])->__toString() : 
$GLOBALS['phpgw']->accounts->get($this->account)->__toString();
 
-                       $value_user = isset($values['user_id']) ? 
$GLOBALS['phpgw']->accounts->get($values['user_id'])->__toString() : 
$GLOBALS['phpgw']->accounts->get($this->account)->__toString();
                        $data = array
                                (
                                        'mode'                                  
                                => $mode,
-                                       'value_user'                            
                        => $value_user,
+                                       'value_coordinator'                     
                        => $value_coordinator,
                                        'event_data'                            
                        => $event_data,
                                        'link_claim'                            
                        => $link_claim,
                                        'lang_claim'                            
                        => lang('claim'),
@@ -1744,8 +1812,7 @@
                                        'lang_coordinator'                      
                        => lang('Coordinator'),
                                        'lang_sum'                              
                                => lang('Sum'),
                                        'select_user_name'                      
                        => 'values[coordinator]',
-                                       'user_list'                             
                                => 
$this->bocommon->get_user_list('select',$project['coordinator'],$extra=false,$default=false,$start=-1,$sort=false,$order=false,$query='',$offset=-1),
-
+                                       'user_list'                             
                                => array('options' => $user_list),
                                        'status_list'                           
                        => 
$this->bo->select_status_list('select',$values['status']),
                                        'status_name'                           
                        => 'values[status]',
                                        'lang_no_status'                        
                        => lang('Select status'),
@@ -1771,6 +1838,7 @@
                                        'lang_key_deliver'                      
                        => lang('key deliver location'),
                                        'lang_key_deliver_statustext'           
        => lang('Select where to deliver the key'),
 
+                                       'value_approved'                        
                        => isset($values['approved']) ? $values['approved'] : 
'',
                                        'need_approval'                         
                        => $need_approval,
                                        'lang_ask_approval'                     
                        => lang('Ask for approval'),
                                        'lang_ask_approval_statustext'          
        => lang('Check this to send a mail to your supervisor for approval'),
@@ -1787,10 +1855,12 @@
                                        'lang_upload_file'                      
                        => lang('Upload file'),
                                        'lang_file_statustext'                  
                => lang('Select file to upload'),
                                        'value_billable_hours'                  
                => $values['billable_hours'],
-                                       'base_java_notify_url'                  
                                => 
"{menuaction:'property.notify.update_data',location_id:{$location_id},location_item_id:'{$id}'}",
+                                       'base_java_url'                         
                        => 
"{menuaction:'property.bocommon.get_vendor_email',phpgw_return_as:'json'}",
+                                       'base_java_notify_url'                  
                => 
"{menuaction:'property.notify.update_data',location_id:{$location_id},location_item_id:'{$id}'}",
                                        'edit_action'                           
                        => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction' => 
'property.uiworkorder.edit', 'id' => $id)),
                                        'lang_edit_statustext'                  
                => lang('Edit this entry '),
                                        'lang_edit'                             
                                => lang('Edit'),
+                                       'value_extra_mail_address'              
                => $value_extra_mail_address
                                );
 
                        $appname                                                
= lang('Workorder');

Modified: branches/Version-1_0-branch/property/inc/export/default/Basware_X114
===================================================================
--- branches/Version-1_0-branch/property/inc/export/default/Basware_X114        
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/inc/export/default/Basware_X114        
2012-03-20 12:10:42 UTC (rev 8994)
@@ -263,7 +263,7 @@
                                        'spbudact_code'                 => 
$this->db->f('spbudact_code'),
                                        'regtid'                                
=> $this->db->f('regtid'),
                                        'artid'                                 
=> $this->db->f('artid'),
-                                       'godkjentbelop'                 => 
$this->db->f('godkjentbelop'),
+                                       'godkjentbelop'                 => 
(int) $this->db->f('godkjentbelop') == 0 ? $this->db->f('belop') :  
$this->db->f('godkjentbelop'),//restore original amount
                                        'spvend_code'                   => 
$this->db->f('spvend_code'),
                                        'dima'                                  
=> $this->db->f('dima'),
                                        'loc1'                                  
=> $this->db->f('loc1'),
@@ -638,11 +638,11 @@
 
                        $accountline = array();
 
-                       if($oRsBilag[0]['periode'])
+                       if ( $oRsBilag[0]['periode'] )
                        {
                                $periode = $oRsBilag[0]['periode'];
                        }
-                       else if 
(isset($this->config->config_data['export']['dato_aarsavslutning']) && time() < 
$this->config->config_data['export']['dato_aarsavslutning'])
+                       else if 
(isset($this->config->config_data['export']['dato_aarsavslutning']) && time() < 
$this->config->config_data['export']['dato_aarsavslutning'] )
                        {
                                if(date('Y',time()) == date('Y', 
$this->config->config_data['export']['dato_aarsavslutning']))
                                {
@@ -655,7 +655,14 @@
                        }
                        else
                        {
-                               $periode = date('Ym',time());
+                               $time = time();
+
+                               if ( date('j',$time) < 7 ) //Day of the month 
without leading zeros
+                               {
+                                       $time = $time - (7 * 24 * 3600);
+                               }
+                               
+                               $periode = date('Ym',$time);
                        }
 
                        $comment = array();

Modified: branches/Version-1_0-branch/property/js/yahoo/budget.obligations.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/budget.obligations.js 
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/js/yahoo/budget.obligations.js 
2012-03-20 12:10:42 UTC (rev 8994)
@@ -3,13 +3,13 @@
 //--------------------------------------------------------
 
                //define SelectButton
-               var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4;
+               var oMenuButton_0, oMenuButton_1;//, oMenuButton_2, 
oMenuButton_3, oMenuButton_4;
                var selectsButtons = [
                {order:0, var_URL:'year',               name:'btn_year',        
        style:'',dependiente:[]},
-               {order:1, var_URL:'district_id',name:'btn_district_id', 
style:'',dependiente:[]},
-               {order:2, var_URL:'cat_id',             name:'btn_cat_id',      
        style:'',dependiente:[]},
-               {order:3, var_URL:'grouping',   name:'btn_grouping',    
style:'',dependiente:[]},
-               {order:4, var_URL:'dimb_id',    name:'btn_dimb_id',             
style:'',dependiente:[]}
+               {order:1, var_URL:'district_id',name:'btn_district_id', 
style:'',dependiente:[]}
+//             {order:2, var_URL:'cat_id',             name:'btn_cat_id',      
        style:'',dependiente:[]},
+//             {order:3, var_URL:'grouping',   name:'btn_grouping',    
style:'',dependiente:[]},
+//             {order:4, var_URL:'dimb_id',    name:'btn_dimb_id',             
style:'',dependiente:[]}
                ]
 
                // define buttons
@@ -39,6 +39,21 @@
 
                var tableYUI;
        
/********************************************************************************/
              
+
+               this.onChangeSelect = function(type)
+               {
+                       var myselect=document.getElementById("sel_"+ type);
+                       for (var i=0; i<myselect.options.length; i++)
+                       {
+                               if (myselect.options[i].selected==true)
+                               {
+                                       break;
+                               }
+                       }
+                       eval("path_values." +type 
+"='"+myselect.options[i].value+"'");
+                       execute_ds();
+               }
+
                this.filter_grouping = function(year,district_id,param,details)
                {
                        if(details)
@@ -103,14 +118,15 @@
                                        oMenuButton_0.set("label", ("<em>" + 
array_options[0][index][1] + "</em>"));
                                }
                                //dimb
+/*
                                index = 
locate_in_array_options(4,"value",path_values.dimb_id);
                                if(index)
                                {
                                        oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                                }
+*/
 
 
-
                                //locate (asign ID) to datatable
                                tableYUI = 
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[0].parentNode;
                                tableYUI.setAttribute("id","tableYUI");

Modified: branches/Version-1_0-branch/property/js/yahoo/project.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/project.index.js      
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/js/yahoo/project.index.js      
2012-03-20 12:10:42 UTC (rev 8994)
@@ -2,14 +2,14 @@
 // Declaration of location.index vars
 //--------------------------------------------------------
        //define SelectButton
-       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4, oMenuButton_5;
+       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4;
        var selectsButtons = [
        {order:0, 
var_URL:'district_id',name:'btn_district_id',style:'districtbutton',dependiente:''},
        {order:1, 
var_URL:'cat_id',name:'btn_cat_id',style:'categorybutton',dependiente:''},
        {order:2, 
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
        {order:3, 
var_URL:'wo_hour_cat_id',name:'btn_hour_category_id',style:'partOFTownbutton',dependiente:''},
-       {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
-       {order:5, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
+//     {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
+       {order:4, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
        ];
 
        // define buttons
@@ -43,6 +43,20 @@
                date_search : 1 //if search has link "Data search"
        }
 
+       this.onChangeSelect = function(type)
+       {
+               var myselect=document.getElementById("sel_"+ type);
+               for (var i=0; i<myselect.options.length; i++)
+               {
+                       if (myselect.options[i].selected==true)
+                       {
+                               break;
+                       }
+               }
+               eval("path_values." +type +"='"+myselect.options[i].value+"'");
+               execute_ds();
+       }
+
        var oArgs_project = {menuaction:'property.uiproject.edit'};
        var sUrl_project = phpGWLink('index.php', oArgs_project);
        
@@ -95,19 +109,21 @@
                                oMenuButton_3.set("label", ("<em>" + 
array_options[3][index][1] + "</em>"));
                        }
 
-                       //user
-                       index = 
locate_in_array_options(4,"value",path_values.user_id);
+                       //criteria
+                       index = 
locate_in_array_options(4,"value",path_values.criteria_id);
                        if(index)
                        {
                                oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                        }
 
-                       //criteria
-                       index = 
locate_in_array_options(5,"value",path_values.criteria_id);
+/*
+                       //user
+                       index = 
locate_in_array_options(4,"value",path_values.user_id);
                        if(index)
                        {
-                               oMenuButton_5.set("label", ("<em>" + 
array_options[5][index][1] + "</em>"));
+                               oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                        }
+*/
 
                        //focus initial
                        //--focus for txt_query---

Modified: branches/Version-1_0-branch/property/js/yahoo/workorder.edit.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/workorder.edit.js     
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/js/yahoo/workorder.edit.js     
2012-03-20 12:10:42 UTC (rev 8994)
@@ -1,7 +1,9 @@
 var  myPaginator_0, myDataTable_0
 var  myPaginator_1, myDataTable_1;
 var  myPaginator_2, myDataTable_2;
+var  myPaginator_3, myDataTable_3;
 var lightbox;
+var vendor_id;
 
        YAHOO.widget.DataTable.formatLink = function(elCell, oRecord, oColumn, 
oData)
        {
@@ -72,7 +74,7 @@
 
                if(typeof(tableYUI)=='undefined')
                {
-                       tableYUI = 
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[0].parentNode;
+                       tableYUI = 
YAHOO.util.Dom.getElementsByClassName("yui-dt-data","tbody")[1].parentNode;
                        tableYUI.setAttribute("id","tableYUI");
                }
                else
@@ -105,6 +107,35 @@
 
/********************************************************************************/
     
 
 
+       this.fetch_vendor_email=function()
+       {
+//             formObject = document.body.getElementsByTagName('form');
+//             YAHOO.util.Connect.setForm(formObject[0]);//First form
+               if(document.getElementById('vendor_id').value)
+               {
+                       base_java_url['vendor_id'] = 
document.getElementById('vendor_id').value;
+               }
+
+               if(document.getElementById('vendor_id').value != vendor_id)
+               {
+                       execute_async(myDataTable_4);
+                       vendor_id = document.getElementById('vendor_id').value;
+               }
+       }
+
+
+       this.onDOMAttrModified = function(e)
+       {
+               var attr = e.attrName || e.propertyName
+               var target = e.target || e.srcElement;
+               if (attr.toLowerCase() == 'vendor_id')
+               {
+                       fetch_vendor_email();
+               }
+       }
+
+
+
 YAHOO.util.Event.addListener(window, "load", function()
 {
        loader = new YAHOO.util.YUILoader();
@@ -118,3 +149,19 @@
     loader.insert();
 });
 
+YAHOO.util.Event.addListener(window, "load", function()
+{
+       d = document.getElementById('vendor_id');
+       if(d)
+       {
+               if (d.attachEvent)
+               {
+                       d.attachEvent('onpropertychange', onDOMAttrModified, 
false);
+               }
+               else
+               {
+                       d.addEventListener('DOMAttrModified', 
onDOMAttrModified, false);
+               }
+       }
+});
+

Modified: branches/Version-1_0-branch/property/js/yahoo/workorder.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/workorder.index.js    
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/js/yahoo/workorder.index.js    
2012-03-20 12:10:42 UTC (rev 8994)
@@ -2,14 +2,14 @@
 // Declaration of workorder.index vars
 //--------------------------------------------------------
        //define SelectButton
-       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4, oMenuButton_5;
+       var oMenuButton_0, oMenuButton_1, oMenuButton_2, oMenuButton_3, 
oMenuButton_4;
        var selectsButtons = [
        {order:0, 
var_URL:'district_id',name:'btn_district_id',style:'districtbutton',dependiente:''},
        {order:1, 
var_URL:'cat_id',name:'btn_cat_id',style:'categorybutton',dependiente:''},
        {order:2, 
var_URL:'status_id',name:'btn_status_id',style:'districtbutton',dependiente:''},
        {order:3, 
var_URL:'wo_hour_cat_id',name:'btn_wo_hour_cat_id',style:'partOFTownbutton',dependiente:''},
-       {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
-       {order:5, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
+//     {order:4, var_URL:'filter', 
name:'btn_user_id',style:'ownerIdbutton',dependiente:''},
+       {order:4, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
        ]
 
        // define buttons
@@ -42,6 +42,20 @@
         date_search : 1 //if search has link "Data search"
        };
 
+       this.onChangeSelect = function(type)
+       {
+               var myselect=document.getElementById("sel_"+ type);
+               for (var i=0; i<myselect.options.length; i++)
+               {
+                       if (myselect.options[i].selected==true)
+                       {
+                               break;
+                       }
+               }
+               eval("path_values." +type +"='"+myselect.options[i].value+"'");
+               execute_ds();
+       }
+
        var oArgs_project = {menuaction:'property.uiproject.edit'};
        var sUrl_project = phpGWLink('index.php', oArgs_project);
        
@@ -102,19 +116,20 @@
                                oMenuButton_3.set("label", ("<em>" + 
array_options[3][index][1] + "</em>"));
                        }
 
-                       //user
-                       index = 
locate_in_array_options(4,"value",path_values.filter);
+                       //criteria
+                       index = 
locate_in_array_options(4,"value",path_values.criteria_id);
                        if(index)
                        {
                                oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
                        }
-
-                       //criteria
-                       index = 
locate_in_array_options(5,"value",path_values.criteria_id);
+/*
+                       //user
+                       index = 
locate_in_array_options(5,"value",path_values.filter);
                        if(index)
                        {
                                oMenuButton_5.set("label", ("<em>" + 
array_options[5][index][1] + "</em>"));
                        }
+*/
 
                        //focus initial
                        //--focus for txt_query---

Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang    2012-03-20 
05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang    2012-03-20 
12:10:42 UTC (rev 8994)
@@ -881,6 +881,7 @@
 input type     property        no      input type
 input name     property        no      input navn
 select value   property        no      Angi verdi
+selected mail addresses        property        no      Valgte adresser
 insert the date for the acquisition    property        no      angi dato for 
anskaffelsen
 insert the date for the initial value  property        no      angi dato for 
initiell verdi
 insert the value at the start-date as a positive amount        property        
no      angi verdie ved startdatoen som en positiv verdi
@@ -1050,6 +1051,10 @@
 month  property        no      Måned
 Monthly (by day)       property        no      Månedlig (dag)
 Monthly (by date)      property        no      Månedlig (dato)
+move   property        no      Flytt
+move budget and orders to another project      property        no      Flytt 
budsjett og bestillinger til et annet prosjekt
+move to another project        property        no      Flytt til et annet 
prosjekt
+moved to another project       property        no      Flyttet til et annet 
prosjekt
 muliple checkbox       property        no      Flervalgs avkrysningsknapp
 muliple radio  property        no      Flervalgs radioknapp
 multiple checkbox      property        no      Flervalgs avkrysningsknapp
@@ -1139,6 +1144,8 @@
 open JasperReport %1 in new window     property        no      Åpne 
JasperReport %1 i nytt vindu
 open view in new window        property        no      Åpne visning i nytt 
vindu
 order  property        no      Bestilling
+order approval revoked property        no      Bestillingsgodkjenning opphevet
+order approved property        no      Bestilling godkjent
 order_dim1     property        no      Aktivitet
 order id       property        no      BestillingsNr
 order_id       property        no      BestillingsNr
@@ -1694,6 +1701,7 @@
 the mail server returned       property        no      E-post serveren 
returnerte
 the number of %1 hour is added!        property        no      %1 poster er 
lagt til
 The order will also be sent to this one        property        no      
Bestillinga blir også sendt til denne
+the project %1 does not exist  property        no      Prosjekt %1 finnes ikke
 the project has not been saved property        no      Prosjektet er ikke 
lagret
 the property is private. if the property should be public, uncheck this box    
property        no      Eiendommen er merket privat. Dersom den skulle være 
public - fjern krysset i denne boksen
 the property is public. if the property should be private, check this box      
property        no      Eiendommen er merket public. Dersom den skulle være 
privat - kryss av denne boksen

Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php    2012-03-20 
05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php    2012-03-20 
12:10:42 UTC (rev 8994)
@@ -3,7 +3,7 @@
        * phpGroupWare - property: a Facilities Management System.
        *
        * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2003-2009 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @copyright Copyright (C) 2003-2012 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.636';
+       $setup_info['property']['version']              = '0.9.17.637';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: branches/Version-1_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_current.inc.php   
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/setup/tables_current.inc.php   
2012-03-20 12:10:42 UTC (rev 8994)
@@ -526,6 +526,8 @@
                                'event_id' => array('type' => 'int','precision' 
=> 4,'nullable' => True),
                                'billable_hours' => array('type' => 
'decimal','precision' => '20','scale' => '2','nullable' => True),
                                'contract_sum' => array('type' => 
'decimal','precision' => '20','scale' => '2','nullable' => True,'default' => 
'0.00'),
+                               'approved'      => array('type' => 
'int','precision' => 2, 'nullable' => True),
+                               'mail_recipients' => array('type' => 
'varchar','precision' => 255, 'nullable' => True)
                        ),
                        'pk' => array('id'),
                        'fk' => array(),

Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2012-03-20 12:10:42 UTC (rev 8994)
@@ -6023,7 +6023,30 @@
        }
 
 
+
        /**
+       * Update property version from 0.9.17.635 to 0.9.17.636
+       * Add percent value to tax-code
+       * 
+       */
+       $test[] = '0.9.17.636';
+       function property_upgrade0_9_17_636()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder','approved',array('type'
 => 'int','precision' => 2, 'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder','mail_recipients',array('type'
 => 'varchar','precision' => 255, 'nullable' => True));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.637';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }
+
+
+
+       /**
        * Update property version from 0.9.17.607 to 0.9.17.608
        * Add more room for address at tickets
        * 

Modified: branches/Version-1_0-branch/property/templates/base/project.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/project.xsl     
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/templates/base/project.xsl     
2012-03-20 12:10:42 UTC (rev 8994)
@@ -356,6 +356,23 @@
                                                                        
</xsl:choose>
                                                                </xsl:when>
                                                        </xsl:choose>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="value_project_id!='' and mode='edit'">
+                                                                       <tr>
+                                                                               
<td valign="top">
+                                                                               
        <xsl:value-of select="php:function('lang', 'move')"/>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <input type="text" name="values[new_project_id]" value="">
+                                                                               
                <xsl:attribute name="title">
+                                                                               
                        <xsl:value-of select="php:function('lang', 'move budget 
and orders to another project')"/>
+                                                                               
                </xsl:attribute>
+                                                                               
        </input>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+
                                                        <tr>
                                                                <td 
valign="top">
                                                                        
<xsl:value-of select="php:function('lang', 'budget')"/>

Modified: branches/Version-1_0-branch/property/templates/base/wo_hour.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/wo_hour.xsl     
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/templates/base/wo_hour.xsl     
2012-03-20 12:10:42 UTC (rev 8994)
@@ -428,21 +428,13 @@
                                                                                
</xsl:when>
                                                                        
</xsl:choose>
                                                                        
<xsl:choose>
-                                                                               
<xsl:when test="email_list !=''">
+                                                                               
<xsl:when test="mail_recipients !=''">
                                                                                
        <tr>
                                                                                
                <td class="th_text" align="left">
                                                                                
                        <xsl:value-of select="lang_mail"/>
                                                                                
                </td>
                                                                                
                <td align="left">
-                                                                               
                        <xsl:variable name="lang_to_email_address_statustext">
-                                                                               
                                <xsl:value-of 
select="lang_to_email_address_statustext"/>
-                                                                               
                        </xsl:variable>
-                                                                               
                        <select name="to_email" class="forms" 
title="{$lang_to_email_address_statustext}">
-                                                                               
                                <option value="">
-                                                                               
                                        <xsl:value-of 
select="lang_select_email"/>
-                                                                               
                                </option>
-                                                                               
                                <xsl:apply-templates select="email_list"/>
-                                                                               
                        </select>
+                                                                               
                        <xsl:value-of select="mail_recipients"/>
                                                                                
                </td>
                                                                                
        </tr>
                                                                                
</xsl:when>
@@ -459,18 +451,6 @@
                                                                                
                        </input>
                                                                                
                </td>
                                                                                
        </tr>
-                                                                               
        <tr>
-                                                                               
                <td class="th_text" align="left">
-                                                                               
                        <xsl:value-of select="lang_update_email"/>
-                                                                               
                </td>
-                                                                               
                <td align="left">
-                                                                               
                        <input type="checkbox" name="update_email" value="true" 
onMouseout="window.status='';return true;">
-                                                                               
                                <xsl:attribute name="title">
-                                                                               
                                        <xsl:value-of 
select="lang_update_email_statustext"/>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
-                                                                               
                </td>
-                                                                               
        </tr>
                                                                                
</xsl:otherwise>
                                                                        
</xsl:choose>
                                                                        <tr>

Modified: branches/Version-1_0-branch/property/templates/base/workorder.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/workorder.xsl   
2012-03-20 05:51:15 UTC (rev 8993)
+++ branches/Version-1_0-branch/property/templates/base/workorder.xsl   
2012-03-20 12:10:42 UTC (rev 8994)
@@ -166,6 +166,22 @@
                                                                </td>
                                                        </tr>
                                                        <xsl:choose>
+                                                               <xsl:when 
test="value_workorder_id!='' and mode='edit'">
+                                                                       <tr>
+                                                                               
<td valign="top">
+                                                                               
        <xsl:value-of select="php:function('lang', 'move to another project')"/>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <input type="text" name="values[new_project_id]" value="">
+                                                                               
                <xsl:attribute name="title">
+                                                                               
                        <xsl:value-of select="php:function('lang', 'move to 
another project')"/>
+                                                                               
                </xsl:attribute>
+                                                                               
        </input>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                                       <xsl:choose>
                                                                <xsl:when 
test="location_template_type='form'">
                                                                        
<xsl:call-template name="location_form"/>
                                                                </xsl:when>
@@ -201,22 +217,24 @@
                                                                <td>
                                                                        
<xsl:value-of select="lang_coordinator"/>
                                                                </td>
-                                                               <xsl:for-each 
select="user_list">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="selected">
-                                                                               
        <td>
-                                                                               
                <xsl:value-of select="name"/>
-                                                                               
        </td>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </xsl:for-each>
-                                                       </tr>
+                                                               <td>
+                                                                       
<xsl:value-of select="value_coordinator"/>
+                                                               </td>
+                                                               </tr>
                                                        <tr>
                                                                <td>
                                                                        
<xsl:value-of select="php:function('lang', 'janitor')"/>
                                                                </td>
                                                                <td>
-                                                                       
<xsl:value-of select="value_user"/>
+                                                                       <select 
name="values[user_id]" class="forms" >
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'janitor')"/>
+                                                                               
</xsl:attribute>
+                                                                               
<option value="">
+                                                                               
        <xsl:value-of select="php:function('lang', 'select')"/>
+                                                                               
</option>
+                                                                               
<xsl:apply-templates select="user_list/options"/>
+                                                                       
</select>
                                                                </td>
                                                        </tr>
                                                        <tr>
@@ -294,7 +312,7 @@
                                                                <td>
                                                                        <input 
type="hidden" name="values[origin]" value="{value_origin_type}"/>
                                                                        <input 
type="hidden" name="values[origin_id]" value="{value_origin_id}"/>
-                                                                       <input 
type="text" name="values[title]" value="{value_title}" 
onMouseout="window.status='';return true;">
+                                                                       <input 
type="text" name="values[title]" value="{value_title}" size="60">
                                                                                
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="lang_title_statustext"/>
                                                                                
</xsl:attribute>
@@ -323,22 +341,6 @@
                                                                </td>
                                                        </tr>
                                                        <xsl:choose>
-                                                               <xsl:when 
test="value_workorder_id!='' and mode='edit'">
-                                                                       <tr>
-                                                                               
<td>
-                                                                               
        <xsl:value-of select="lang_confirm_status"/>
-                                                                               
</td>
-                                                                               
<td>
-                                                                               
        <input type="checkbox" name="values[confirm_status]" value="True" 
onMouseout="window.status='';return true;">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="lang_confirm_statustext"/>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
-                                                                               
</td>
-                                                                       </tr>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
                                                                <xsl:when 
test="need_approval='1' and mode='edit'">
                                                                        <tr>
                                                                                
<td valign="top">
@@ -369,6 +371,32 @@
                                                                        </tr>
                                                                </xsl:when>
                                                        </xsl:choose>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="value_workorder_id!=''">
+                                                                       <tr>
+                                                                               
<td>
+                                                                               
        <xsl:value-of select="php:function('lang', 'approved')"/>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <input type="checkbox" name="values[approved]" value="1">
+                                                                               
                <xsl:attribute name="title">
+                                                                               
                        <xsl:value-of select="php:function('lang', 
'approved')"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                <xsl:if test="value_approved = '1'">
+                                                                               
                        <xsl:attribute name="checked">
+                                                                               
                                <xsl:text>checked</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:if>
+                                                                               
                <xsl:if test="mode != 'edit'">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text>disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:if>
+                                                                               
        </input>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </xsl:when>
+                                                       </xsl:choose>
                                                        <tr>
                                                                <td 
valign="top">
                                                                        
<xsl:value-of select="lang_remark"/>
@@ -417,6 +445,35 @@
                                                                <xsl:when 
test="mode='edit'">
                                                                        
<xsl:call-template name="event_form"/>
                                                                        
<xsl:call-template name="vendor_form"/>
+                                                                       <tr>
+                                                                               
<td valign="top">
+                                                                               
        <xsl:value-of select="php:function('lang', 'send order')"/>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <div id="paging_4"/>
+                                                                               
        <div id="datatable-container_4"/>
+                                                                               
</td>
+                                                                               
<tr>
+                                                                               
        <td valign="top">
+                                                                               
                <xsl:value-of select="php:function('lang', 'extra mail 
address')"/>
+                                                                               
        </td>
+                                                                               
        <td>
+                                                                               
                <input type="text" name="values[vendor_email][]" 
value="{value_extra_mail_address}">
+                                                                               
                        <xsl:attribute name="title">
+                                                                               
                                <xsl:value-of select="php:function('lang', 'The 
order will also be sent to this one')"/>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </td>
+                                                                               
</tr>
+                                                                               
<tr>
+                                                                               
        <td valign="top">
+                                                                               
                <xsl:value-of select="php:function('lang', 'selected mail 
addresses')"/>
+                                                                               
        </td>
+                                                                               
        <td>
+                                                                               
                <xsl:value-of select="mail_recipients"/>
+                                                                               
        </td>
+                                                                               
</tr>
+                                                                       </tr>
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                        
<xsl:call-template name="event_view"/>
@@ -696,6 +753,7 @@
                                        </xsl:choose>
                                        <script type="text/javascript">
                                                var property_js = <xsl:value-of 
select="property_js"/>;
+                                               var base_java_url = 
<xsl:value-of select="base_java_url"/>;
                                                var base_java_notify_url = 
<xsl:value-of select="base_java_notify_url"/>;
                                                var datatable = new Array();
                                                var myColumnDefs = new Array();




reply via email to

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