fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8912] Merge 8902:8911 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [8912] Merge 8902:8911 from trunk
Date: Fri, 17 Feb 2012 09:58:39 +0000

Revision: 8912
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8912
Author:   sigurdne
Date:     2012-02-17 09:58:39 +0000 (Fri, 17 Feb 2012)
Log Message:
-----------
Merge 8902:8911 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php
    branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
    
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
    branches/Version-1_0-branch/property/inc/class.boproject.inc.php
    branches/Version-1_0-branch/property/inc/class.soinvoice.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.uiinvoice.inc.php
    branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
    branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-1_0-branch/property/js/yahoo/project.edit.js
    branches/Version-1_0-branch/property/templates/base/project.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
   + 
/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

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/activitycalendar/inc/class.soactivity.inc.php   
2012-02-17 09:58:39 UTC (rev 8912)
@@ -11,7 +11,17 @@
 class activitycalendar_soactivity extends activitycalendar_socommon
 {
        protected static $so;
+       protected $soap = false;
 
+       public $soap_functions = array
+               (
+                       'get_activities' => array
+                       (
+                               'in'  => array('array'),
+                               'out' => array('array')
+                       )
+               );
+
        public $xmlrpc_methods = array
        (
                array
@@ -644,6 +654,8 @@
        
        function get_activities($parameters = array())
        {
+               $soap = isset($parameters['soap']) && $parameters['soap'] ? 
true : false;
+               $this->soap = $soap;
                //fromdate -> innparam for uthenting av delta - timestamp
                $whereclause_date = "";
                if($parameters['fromdate'])
@@ -659,7 +671,7 @@
                        $activities[]= array
                        (
                                'id'                            => (int) 
$this->db->f('id'),
-                               'title'                         => 
utf8_decode($this->db->f('title',true)),
+                               'title'                         => $soap ? 
$this->db->f('title',true) : utf8_decode($this->db->f('title',true)),
                                'organization_id'       => 
$this->db->f('organization_id',true),
                                'group_id'                      => 
$this->db->f('group_id'),
                                'district'                      => 
$this->db->f('district',true),
@@ -667,7 +679,7 @@
                                'state'                         => 
$this->db->f('state',true),
                                'target'                        => 
$this->db->f('target'),
                                'arena'                         => 
$this->db->f('arena'),
-                               'time'                          => 
utf8_decode($this->db->f('time')),
+                               'time'                          => $soap ? 
$this->db->f('time') : utf8_decode($this->db->f('time')),
                                'contact_person_1'      => 
$this->db->f('contact_person_1'),
                                'contact_person_2'      => 
$this->db->f('contact_person_2'),
                                'special_adaptation'=> 
$this->db->f('special_adaptation'),
@@ -678,8 +690,8 @@
                {
                                //$activity['organization_info']        = 
$this->get_org_info($activity['organization_id']);
                                //$activity['group_info']                       
= $this->get_group_info($activity['group_id']);
-                               $activity['district_name']              = 
utf8_decode($this->get_district_name($activity['district']));
-                               $activity['category_name']              = 
utf8_decode($this->get_category_name($activity['category']));
+                               $activity['district_name']              = $soap 
? $this->get_district_name($activity['district']) : 
utf8_decode($this->get_district_name($activity['district']));
+                               $activity['category_name']              = $soap 
? $this->get_category_name($activity['category']) : 
utf8_decode($this->get_category_name($activity['category']));
                                $activity['description']                = 
$this->get_activity_description($activity['organization_id'],$activity['group_id']);
                                $activity['arena_info']                 = 
$this->get_arena_info($activity['arena']);
                                $activity['contact_person']             = 
$this->get_contact_person($activity['organization_id'],$activity['group_id'],$activity['contact_person_1']);
@@ -696,7 +708,7 @@
        //              $this->db->query("SELECT * FROM bb_group_contact WHERE 
id={$cont_pers}", __LINE__, __FILE__);
                        $this->db->query("SELECT * FROM bb_group_contact WHERE 
group_id={$group_id} LIMIT 1", __LINE__, __FILE__);
                        while($this->db->next_record()){
-                               $result = array('name' => 
utf8_decode($this->db->f('name')),'phone' => $this->db->f('phone'),'email' => 
$this->db->f('email'));
+                               $result = array('name' => $this->soap ? 
$this->db->f('name') : utf8_decode($this->db->f('name')),'phone' => 
$this->db->f('phone'),'email' => $this->db->f('email'));
                        }
                }
                else if($org_id)
@@ -704,7 +716,7 @@
                        $org_id = (int)$org_id;
                        $this->db->query("SELECT * FROM bb_organization_contact 
WHERE organization_id={$org_id} LIMIT 1", __LINE__, __FILE__);
                        while($this->db->next_record()){
-                               $result = array('name' => 
utf8_decode($this->db->f('name')),'phone' => $this->db->f('phone'),'email' => 
$this->db->f('email'));
+                               $result = array('name' => $this->soap ? 
$this->db->f('name') : utf8_decode($this->db->f('name')),'phone' => 
$this->db->f('phone'),'email' => $this->db->f('email'));
                        }
                }
                return $result;
@@ -717,7 +729,7 @@
                        $group_id = (int)$group_id;
                        $this->db->query("SELECT * FROM bb_group WHERE 
id={$group_id}", __LINE__, __FILE__);
                        while($this->db->next_record()){
-                               $result = 
utf8_decode($this->db->f('description'));
+                               $result = $this->soap ? 
$this->db->f('description') : utf8_decode($this->db->f('description'));
                        }
                }
                else if($org_id)
@@ -725,7 +737,7 @@
                        $org_id = (int)$org_id;
                        $this->db->query("SELECT * FROM bb_organization WHERE 
id={$org_id}", __LINE__, __FILE__);
                        while($this->db->next_record()){
-                               $result = 
utf8_decode($this->db->f('description'));
+                               $result = $this->soap ? 
$this->db->f('description') : utf8_decode($this->db->f('description'));
                        }
                }
                return $result;
@@ -847,8 +859,8 @@
                        $this->db->next_record();
                        $result = array
                        (
-                               'arena_name' => 
utf8_decode($this->db->f('arena_name')),
-                               'address' => 
utf8_decode($this->db->f('address'))
+                               'arena_name' => $this->soap ? 
$this->db->f('arena_name') : utf8_decode($this->db->f('arena_name')),
+                               'address' => $this->soap ? 
$this->db->f('address') : utf8_decode($this->db->f('address'))
                        );
                }
                return $result;

Modified: 
branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php     
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/controller/inc/class.socontrol_item.inc.php     
2012-02-17 09:58:39 UTC (rev 8912)
@@ -63,7 +63,8 @@
                                        'type',
                                        'what_to_do',
                                        'how_to_do',
-                                       'control_group_id'
+                                       'control_group_id',
+                                       'control_area_id'
                        );
 
                        $values = array(
@@ -72,7 +73,8 @@
                                $this->marshal($control_item->get_type(), 
'string'),
                                $this->marshal($control_item->get_what_to_do(), 
'string'),
                                $this->marshal($control_item->get_how_to_do(), 
'string'),
-                               
$this->marshal($control_item->get_control_group_id(), 'int')
+                               
$this->marshal($control_item->get_control_group_id(), 'int'),
+                               
$this->marshal($control_item->get_control_area_id(), 'int')
                        );
 
                        $result = $this->db->query('INSERT INTO 
controller_control_item (' . join(',', $cols) . ') VALUES (' . join(',', 
$values) . ')', __LINE__,__FILE__);
@@ -107,7 +109,8 @@
                                'type = ' . 
$this->marshal($control_item->get_type(), 'string'),
                                'what_to_do = ' . 
$this->marshal($control_item->get_what_to_do(), 'string'),
                                'how_to_do = ' . 
$this->marshal($control_item->get_how_to_do(), 'string'),
-                               'control_group_id = ' . 
$this->marshal($control_item->get_control_group_id(), 'int')
+                               'control_group_id = ' . 
$this->marshal($control_item->get_control_group_id(), 'int'),
+                               'control_area_id = ' . 
$this->marshal($control_item->get_control_area_id(), 'int')
                        );
 
                        //var_dump('UPDATE controller_control_item SET ' . 
join(',', $values) . " WHERE id=$id");
@@ -175,6 +178,7 @@
                                
$control_item->set_what_to_do($this->unmarshal($this->db->f('what_to_do', 
true), 'string'));
                                
$control_item->set_how_to_do($this->unmarshal($this->db->f('how_to_do', true), 
'string'));
                                
$control_item->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
 true), 'int'));
+                               
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
 true), 'int'));
 
                                $results[] = $control_item;
                        }
@@ -339,6 +343,7 @@
                                
$control_item->set_what_to_do($this->unmarshal($this->db->f('what_to_do', 
true), 'string'));
                                
$control_item->set_how_to_do($this->unmarshal($this->db->f('how_to_do', true), 
'string'));
                                
$control_item->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
 true), 'int'));
+                               
$control_item->set_control_area_id($this->unmarshal($this->db->f('control_area_id',
 true), 'int'));
 
                                $results[] = $control_item;
                        }

Modified: branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-02-17 09:58:39 UTC (rev 8912)
@@ -269,13 +269,13 @@
                        foreach($locations_for_control_array as $location)
                        {
                                
$control->set_location_code($location["location_code"]);
-                               $controls_calendar_array = 
$this->calendar_builder->build_agg_calendar_array($controls_calendar_array, 
$control, $location["location_code"], $year);
+                               $controls_calendar_array = 
$this->calendar_builder->build_agg_calendar_array_2($controls_calendar_array, 
$control, $location["location_code"], $year);
                                //_debug_array($controls_calendar_array);
                                $control_check_list_array = 
$this->so->get_check_lists_for_location( $location["location_code"], 
$from_date_ts, $to_date_ts, $control->get_repeat_type(), $control->get_id() );
                                //_debug_array($controls_check_list_array);
                        }
                        
-                       $controls_calendar_array = 
$this->calendar_builder->build_calendar_array( $controls_calendar_array, 
$control_check_list_array, 12, "view_months" );
+                       $controls_calendar_array = 
$this->calendar_builder->build_calendar_array_2( $controls_calendar_array, 
$control_check_list_array, 12, "view_months" );
                        
                        //_debug_array($controls_calendar_array);
                        

Modified: 
branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php     
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php     
2012-02-17 09:58:39 UTC (rev 8912)
@@ -89,9 +89,6 @@
                                );              
                        }
                        // END categories
-                       self::add_javascript('controller', 'yahoo', 
'datatable.js');
-                       phpgwapi_yui::load_widget('datatable');
-                       phpgwapi_yui::load_widget('paginator');
 
                        $data = array(
                                'form' => array(
@@ -192,6 +189,10 @@
                                        )
                                ),
                        );
+                       
+                       phpgwapi_yui::load_widget('datatable');
+                       phpgwapi_yui::load_widget('paginator');
+                       self::add_javascript('controller', 'yahoo', 
'datatable.js');
 //_debug_array($data);
 
                        self::render_template_xsl('datatable', $data);
@@ -268,8 +269,8 @@
                                        
$control_item->set_type(phpgw::get_var('measurement') == 'on' ? 
'control_item_type_2' : 'control_item_type_1');
                                        $control_item->set_what_to_do( 
phpgw::get_var('what_to_do','html') );
                                        $control_item->set_how_to_do( 
phpgw::get_var('how_to_do','html') );
-                                       $control_item->set_control_group_id( 
phpgw::get_var('control_group_id') );
-                                       $control_item->set_control_area_id( 
phpgw::get_var('control_area_id') );
+                                       $control_item->set_control_group_id( 
phpgw::get_var('control_group') );
+                                       $control_item->set_control_area_id( 
phpgw::get_var('control_area') );
 
                                        //$this->so->store($control_item);
 

Modified: 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
===================================================================
--- 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
 2012-02-17 09:55:16 UTC (rev 8911)
+++ 
branches/Version-1_0-branch/controller/inc/component/class.calendar_builder.inc.php
 2012-02-17 09:58:39 UTC (rev 8912)
@@ -96,4 +96,126 @@
 
                return $controls_calendar_array;
        }
+       
+       public function build_agg_calendar_array_2($controls_calendar_array, 
$control, $location_code, $year){
+                               
+               if( date("Y", $control->get_start_date()) == $year ){
+                       $from_month = date("n", $control->get_start_date());    
+               }else{
+                       $from_month = 1;
+               }
+               
+               if( date("Y", $control->get_end_date()) == $year ){
+                       $to_month = date("n", $control->get_end_date());
+               }else{
+                       $to_month = 12;
+               }
+               
+               /*
+               $todays_date_ts = mktime(0,0,0,date("m"), date("d"), date("Y"));
+               
+               $twelve_month_array = array();
+               
+               
+               for($i=1;$i<=12;$i++){
+                       $trail_date_ts = strtotime("$i/01/$year");
+
+                       if($trail_date_ts > $control->get_start_date() & 
$trail_date_ts < $todays_date_ts){
+                               $status = "controls_not_accomplished";
+                       }else if($trail_date_ts > $control->get_start_date() & 
$trail_date_ts > $todays_date_ts){
+                               $status = "controls_registered";
+                       }       
+
+                       $twelve_month_array[$i-1]["status"] = $status;
+               }
+               */
+               
+               for($from_month;$from_month<=$to_month;$from_month++){
+       
+                       $trail_from_date_ts = strtotime("$from_month/01/$year");
+                       
+                       $trail_to_date_ts = strtotime("$to_month/01/$year");
+                       $so_check_list = 
CreateObject('controller.socheck_list');
+                               
+                       $num_open_cases_for_control_array = array();
+                       $num_open_cases_for_control_array = 
$so_check_list->get_num_open_cases_for_control( $control->get_id(), 
$location_code, $trail_from_date_ts, $trail_to_date_ts );       
+       
+                       if( !empty($num_open_cases_for_control_array) ){
+                               $status = "controls_accomplished_with_errors";
+                               
+                               $twelve_month_array[$from_month-1]["status"] = 
$status;
+                               $twelve_month_array[$from_month-1]["info"] = 
$num_open_cases_for_control_array["count"];
+                       }else if( empty($num_open_cases_for_control_array) &  
$todays_date_ts > $trail_to_date_ts){
+                               $status = 
"controls_accomplished_without_errors";
+                               
+                               $twelve_month_array[$from_month-1]["status"] = 
$status;
+                       }
+               }
+       
+               $controls_calendar_array[] = array("control" => 
$control->toArray(), "calendar_array" => $twelve_month_array);
+                
+               return $controls_calendar_array;
+       }
+       
+       public function build_calendar_array_2( $controls_calendar_array, 
$control_array, $num, $period_type ){
+               
+               foreach($control_array as $control){
+
+                       $calendar_array = $this->init_calendar( $control, 
$calendar_array, $num, $period_type );
+
+                       foreach($control->get_check_lists_array() as 
$check_list){
+                               
+                               $check_list_status_info = new 
check_list_status_info();
+                               $check_list_status_info->set_check_list_id( 
$check_list->get_id() );
+               
+                               $todays_date_ts = mktime(0,0,0,date("m"), 
date("d"), date("Y"));
+
+                               if( $check_list->get_status() == 0 & 
$check_list->get_planned_date() > 0 & $check_list->get_deadline() > 
$todays_date_ts)
+                               {
+                                       $status = "control_planned";
+                               }
+                               else if( $check_list->get_status() == 0 & 
$check_list->get_planned_date() > 0 & $check_list->get_deadline() < 
$todays_date_ts )
+                               {
+                                       $status = 
"control_not_accomplished_with_info";
+                               }
+                               else if( $check_list->get_status() == 0 & 
$check_list->get_deadline() < $todays_date_ts )
+                               {
+                                       $status = "control_not_accomplished";
+                               }
+                               else if( $check_list->get_status() == 1 & 
$check_list->get_completed_date() > $check_list->get_deadline() & 
$check_list->get_num_open_cases() == 0)
+                               {
+                                       $status = 
"control_accomplished_over_time_without_errors";
+                               }
+                               else if( $check_list->get_status() == 1 & 
$check_list->get_completed_date() < $check_list->get_deadline() & 
$check_list->get_num_open_cases() == 0)
+                               {
+                                       $status = 
"control_accomplished_in_time_without_errors";
+                               }
+                               else if( $check_list->get_status() == 1 & 
$check_list->get_num_open_cases() > 0){
+                                       $status = 
"control_accomplished_with_errors";
+                                       
$check_list_status_info->set_num_open_cases($check_list->get_num_open_cases());
+                               }
+                               else if( $check_list->get_status() == 3 )
+                               {
+                                       $status = "control_canceled";
+                               }
+                               
+                               $check_list_status_info->set_deadline_date( 
date("d/m-Y", $check_list->get_deadline()) );
+                               
+                               if($period_type == "view_months")
+                               {
+                                       $calendar_array[ date("n", 
$check_list->get_deadline()) ]["status"] = $status;
+                                       $calendar_array[ date("n", 
$check_list->get_deadline()) ]["info"] = $check_list_status_info->serialize();  
     
+                               }
+                               else if( $period_type == "view_days" )
+                               {
+                                       $calendar_array[ date("j", 
$check_list->get_deadline()) ]["status"] = $status;
+                                       $calendar_array[ date("j", 
$check_list->get_deadline()) ]["info"] = $check_list_status_info->serialize();
+                               }
+                       }
+                       
+                       $controls_calendar_array[] = array("control" => 
$control->toArray(), "calendar_array" => $calendar_array);
+               }
+
+               return $controls_calendar_array;
+       }
 }
\ No newline at end of file

Modified: branches/Version-1_0-branch/property/inc/class.boproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boproject.inc.php    
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/inc/class.boproject.inc.php    
2012-02-17 09:58:39 UTC (rev 8912)
@@ -160,6 +160,7 @@
                function get_column_list()
                {
                        $columns = array();
+/*
                        $columns['planned_cost'] = array
                                (
                                        'id'            => 'planned_cost',
@@ -168,6 +169,7 @@
                                        'formatter'     => 'myFormatCount2',
                                        'classname'     => 'rightClasss'
                                );
+*/
                        $columns['ecodimb'] = array
                                (
                                        'id'            => 'ecodimb',
@@ -509,13 +511,13 @@
                                
$values['workorder_budget'][$i]['title']=$workorder_data[$i]['title'];
                                
$values['workorder_budget'][$i]['workorder_id']=$workorder_data[$i]['workorder_id'];
                                
$values['workorder_budget'][$i]['contract_sum']=number_format($workorder_data[$i]['contract_sum'],
 2, ',', '');
-                               
$values['workorder_budget'][$i]['budget']=number_format($workorder_data[$i]['budget'],
 2, ',', '');
+                               $values['workorder_budget'][$i]['budget']= 
$workorder_data[$i]['budget'];
                                
$values['workorder_budget'][$i]['calculation']=number_format($workorder_data[$i]['calculation']*$tax,
 2, ',', '');
                                
$values['workorder_budget'][$i]['charge_tenant'] = 
$workorder_data[$i]['charge_tenant'];
                                $values['workorder_budget'][$i]['status'] = 
$workorder_data[$i]['status'];
                                $values['workorder_budget'][$i]['actual_cost'] 
= $workorder_data[$i]['act_mtrl_cost']+$workorder_data[$i]['act_vendor_cost'];
                                $values['workorder_budget'][$i]['b_account_id'] 
= $workorder_data[$i]['b_account_id'];
-                               $values['workorder_budget'][$i]['paid_percent'] 
= (int)$workorder_data[$i]['paid_percent'];
+//                             $values['workorder_budget'][$i]['paid_percent'] 
= (int)$workorder_data[$i]['paid_percent'];
 
                                if(isset($workorder_data[$i]['vendor_id']) && 
$workorder_data[$i]['vendor_id'])
                                {

Modified: branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/inc/class.soinvoice.inc.php    
2012-02-17 09:58:39 UTC (rev 8912)
@@ -395,7 +395,7 @@
                        }
 
                        $sql = "SELECT 
$table.*,fm_workorder.status,fm_workorder.charge_tenant,org_name,"
-                               . "fm_workorder.claim_issued, 
fm_workorder.paid_percent FROM $table"
+                               . "fm_workorder.claim_issued FROM $table"
                                . " {$this->left_join} fm_workorder ON 
fm_workorder.id = $table.pmwrkord_code"
                                . " {$this->left_join} fm_project ON 
fm_workorder.project_id = fm_project.id"
                                . " {$this->join} fm_vendor ON 
$table.spvend_code = fm_vendor.id $filtermethod";
@@ -431,7 +431,7 @@
                                                'approved_amount'               
=> $this->db->f('godkjentbelop'),
                                                'charge_tenant'                 
=> $this->db->f('charge_tenant'),
                                                'vendor'                        
        => $this->db->f('org_name'),
-                                               'paid_percent'                  
=> $this->db->f('paid_percent'),
+                       //                      'paid_percent'                  
=> $this->db->f('paid_percent'),
                                                'project_group'                 
=> $this->db->f('project_id'),
                                                'external_ref'                  
=> $this->db->f('external_ref'),
                                                'currency'                      
        => $this->db->f('currency'),
@@ -789,11 +789,12 @@
                                                
$update_status[$workorder_id]='R';
                                        }
 
+/*
                                        if(isset($values['paid_percent'][$n]) 
&& $values['paid_percent'][$n])
                                        {
                                                
$update_paid_percent[$workorder_id] = $values['paid_percent'][$n];
                                        }
-
+*/
                                        $GLOBALS['phpgw']->db->query("UPDATE 
fm_ecobilag SET $dima_field ,$kostra_field,{$dimd_field}, mvakode = 
{$tax_code},spbudact_code = '{$budget_account}',dimb = $dimb,godkjentbelop = 
$approved_amount WHERE id='$id'");
 
                                        $receipt['message'][] = 
array('msg'=>lang('Voucher is updated '));
@@ -824,6 +825,7 @@
                                }
                        }
 
+/*
                        if (isset($update_paid_percent) AND 
is_array($update_paid_percent))
                        {
                                $workorder = 
CreateObject('property.soworkorder');
@@ -845,7 +847,7 @@
                                        }
                                }
                        }
-
+*/
                        $GLOBALS['phpgw']->db->transaction_commit();
 
                        return $receipt;

Modified: branches/Version-1_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soproject.inc.php    
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/inc/class.soproject.inc.php    
2012-02-17 09:58:39 UTC (rev 8912)
@@ -266,8 +266,8 @@
                                $uicols['classname'][]          = 'rightClasss';
                                $uicols['sortable'][]           = '';
 
-                               $cols .= ',planned_cost';
-                               $cols_return[] = 'planned_cost';
+//                             $cols .= ',planned_cost';
+//                             $cols_return[] = 'planned_cost';
 /*
                                $uicols['input_type'][]         = 'text';
                                $uicols['name'][]                       = 
'planned_cost';
@@ -619,7 +619,7 @@
                                $project['actual_cost']         = 0;
                                $project['billable_hours']      = 0;
 
-                               $sql_workder  = 'SELECT 
paid_percent,contract_sum, calculation, budget,'
+                               $sql_workder  = 'SELECT contract_sum, 
calculation, budget,'
                                . ' (fm_workorder.act_mtrl_cost + 
fm_workorder.act_vendor_cost) as actual_cost,'
                                . ' billable_hours,closed'
                                . " FROM fm_workorder {$this->join} 
fm_workorder_status ON fm_workorder.status  = fm_workorder_status.id"
@@ -628,8 +628,6 @@
                                $this->db->query($sql_workder);
                                while ($this->db->next_record())
                                {
-                                       $paid_percent = 
(int)$this->db->f('paid_percent');
-
                                        if($this->db->f('closed'))
                                        {
                                                $_sum = 0;
@@ -651,10 +649,9 @@
                                                $_sum = 0;
                                        }
 
-                                       $_sum = $_sum * (100 - 
$paid_percent)/100;
-
-                                       $project['combined_cost']       += 
$_sum;
-                                       $project['actual_cost']         += 
(int)$this->db->f('actual_cost');
+                                       $_actual_cost = 
(int)$this->db->f('actual_cost');
+                                       $project['combined_cost']       += 
($_sum - $_actual_cost);
+                                       $project['actual_cost']         += 
$_actual_cost;
                                        $project['billable_hours']      += 
(int)$this->db->f('billable_hours');
                                }
                        }
@@ -691,7 +688,7 @@
                                                'descr'                         
        => $this->db->f('descr', true),
                                                'status'                        
        => $this->db->f('status'),
                                                'budget'                        
        => (int)$this->db->f('budget'),
-                                               'planned_cost'                  
=> (int)$this->db->f('planned_cost'),
+                       //                      'planned_cost'                  
=> (int)$this->db->f('planned_cost'),
                                                'reserve'                       
        => (int)$this->db->f('reserve'),
                                                'tenant_id'                     
        => $this->db->f('tenant_id'),
                                                'user_id'                       
        => $this->db->f('user_id'),
@@ -746,7 +743,7 @@
                        $project_id = (int) $project_id;
                        $budget = array();
                        $this->db->query("SELECT fm_workorder.title, 
act_mtrl_cost, act_vendor_cost, budget, fm_workorder.id as 
workorder_id,contract_sum,"
-                               ." vendor_id, 
calculation,rig_addition,addition,deviation,charge_tenant,fm_workorder_status.descr
 as status, fm_workorder.account_id as b_account_id,paid_percent"
+                               ." vendor_id, 
calculation,rig_addition,addition,deviation,charge_tenant,fm_workorder_status.descr
 as status, fm_workorder.account_id as b_account_id"
                                ." FROM fm_workorder {$this->join} 
fm_workorder_status ON fm_workorder.status = fm_workorder_status.id WHERE 
project_id={$project_id}");
                        while ($this->db->next_record())
                        {
@@ -762,8 +759,7 @@
                                        'charge_tenant'         => 
$this->db->f('charge_tenant'),
                                        'status'                        => 
$this->db->f('status'),
                                        'b_account_id'          => 
$this->db->f('b_account_id'),
-                                       'contract_sum'          => 
(int)$this->db->f('contract_sum'),
-                                       'paid_percent'          => 
(int)$this->db->f('paid_percent')
+                                       'contract_sum'          => 
(int)$this->db->f('contract_sum')
                                );
                        }
                        return $budget;
@@ -1262,7 +1258,7 @@
                                
$historylog->add('RM',$project['id'],$project['remark']);
                        }
 
-                       execMethod('property.soworkorder.update_planned_cost', 
$project['id']);
+//                     execMethod('property.soworkorder.update_planned_cost', 
$project['id']);
 
                        $receipt['id'] = $project['id'];
                        $receipt['message'][] = array('msg'=>lang('project %1 
has been edited', $project['id']));
@@ -1350,41 +1346,55 @@
                        $config->read();
                        $tax = 1+(($config->config_data['fm_tax'])/100);
 
-                       $sql = "SELECT EXTRACT(YEAR from 
to_timestamp(start_date) ) as year, sum(calculation) as calculation, 
sum(budget) as budget,"
-                       . " sum(contract_sum) as contract_sum ,paid_percent"
+                       $sql = "SELECT fm_workorder.id, EXTRACT(YEAR from 
to_timestamp(start_date) ) as year, calculation, budget, contract_sum"
                        . " FROM fm_workorder"
                        . " {$this->join} fm_workorder_status ON 
fm_workorder.status  = fm_workorder_status.id"
                        . " WHERE project_id = {$project_id} AND 
(fm_workorder_status.closed IS NULL OR fm_workorder_status.closed != 1)"
-                       . " GROUP BY fm_workorder.id, paid_percent, 
fm_workorder.start_date ORDER BY start_date ASC";
+                       . " GROUP BY fm_workorder.id, fm_workorder.start_date 
ORDER BY start_date ASC";
                        $this->db->query($sql,__LINE__,__FILE__);
 
 
+                       $orders = array();
                        while ($this->db->next_record())
                        {
-                               $paid_percent = 
(int)$this->db->f('paid_percent');
                                $year = $this->db->f('year');
 
                                if($this->db->f('contract_sum') > 0)
                                {
-                                       $_sum = $this->db->f('contract_sum');
+                                       $_amount = $this->db->f('contract_sum');
                                }
                                else if($this->db->f('calculation') > 0)
                                {
-                                       $_sum = $this->db->f('calculation') * 
$tax;
+                                       $_amount = $this->db->f('calculation') 
* $tax;
                                }
                                else if($this->db->f('budget') > 0)
                                {
-                                       $_sum = $this->db->f('budget');
+                                       $_amount = $this->db->f('budget');
                                }
                                else
                                {
-                                       $_sum = 0;
+                                       $_amount = 0;
                                }
 
-                               $_sum = $_sum * (100 - $paid_percent)/100;
-                               $cost_info[$year]['sum_orders'] += $_sum;
+                               $orders[] = array
+                               (
+                                       'order_id'      => $this->db->f('id'),
+                                       'year'          => $year,
+                                       'amount'        => $_amount
+                               );
                        }
 
+                       foreach ($orders as $order)
+                       {
+                               $cost_info[$year]['sum_orders'] += 
$order['amount'];
+                               $sql = "SELECT godkjentbelop as amount FROM 
fm_ecobilagoverf WHERE pmwrkord_code = '{$order['order_id']}'";
+                               $this->db->query($sql,__LINE__,__FILE__);
+                               while ($this->db->next_record())
+                               {
+                                       $cost_info[$year]['sum_orders'] -= 
$this->db->f('amount');
+                               }
+                       }
+
                        $sort_year = array();
                        $values = array();
 

Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2012-02-17 09:58:39 UTC (rev 8912)
@@ -1150,7 +1150,7 @@
                                $this->db->query("UPDATE fm_project set 
charge_tenant = 1 WHERE id =" . $workorder['project_id']);
                        }
  */
-                       $this->update_planned_cost($workorder['project_id']); 
// at project
+//                     $this->update_planned_cost($workorder['project_id']); 
// at project
 
                        $check_pending_action = false;
                        if ((float)$old_billable_hours != 
(float)$workorder['billable_hours'])
@@ -1309,7 +1309,7 @@
                                                        
$this->db->query("SELECT project_id FROM fm_workorder WHERE 
id='{$id}'",__LINE__,__FILE__);
                                                        
$this->db->next_record();
                                                        $project_id = 
$this->db->f('project_id');
-                                                       
$this->update_planned_cost($project_id);
+                               //                      
$this->update_planned_cost($project_id);
                                                        break;
                                        }
                                }

Modified: branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php    
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/inc/class.uiinvoice.inc.php    
2012-02-17 09:58:39 UTC (rev 8912)
@@ -1665,8 +1665,6 @@
                                array(
                                        'col_name'=>'close_order',      
'label'=>lang('Close order'),   'className'=>'centerClasss', 'sortable'=>false, 
'sort_field'=>'',                               'visible'=>true),
                                array(
-                                       'col_name'=>'paid_percent',     
'label'=>lang('paid percent'),  'className'=>'centerClasss', 'sortable'=>false, 
'sort_field'=>'',                               'visible'=>true),
-                               array(
                                        'col_name'=>'change_tenant',    
'label'=>lang('Charge tenant'), 'className'=>'centerClasss', 'sortable'=>false, 
'sort_field'=>'',                               'visible'=>true),
                                array(
                                        'col_name'=>'invoice_id',               
'label'=>lang('Invoice Id'),    'className'=>'centerClasss', 'sortable'=>false, 
'sort_field'=>'',                               'visible'=>true),
@@ -1756,21 +1754,6 @@
                                                }
                                                else if(($i == 3))
                                                {
-                                                       
if($invoices['workorder_id'] == "")
-                                                       {
-                                                               //nothing
-                                                       }
-                                                       else 
if(!array_key_exists($invoices['workorder_id'], $workorders))
-                                                       {
-                                                               
if(!$invoices['paid_percent'])
-                                                               {
-                                                                       
$invoices['paid_percent'] = 100;
-                                                               }
-                                                               
$json_row[$uicols[$i]['col_name']]  .= " <input 
name='values[paid_percent][".$j."]' id='values[paid_percent][".$j."]'  
class='myValuesForPHP'  type='text' size='3' maxlength='3' 
value='".$invoices['paid_percent']."'/>";
-                                                       }
-                                               }
-                                               else if(($i == 4))
-                                               {
                                                        
if($invoices['charge_tenant'] == 1)
                                                        {
                                                                
if($invoices['claim_issued'] == '')
@@ -1790,12 +1773,12 @@
                                                        }
 
                                                }
-                                               else if(($i == 5))
+                                               else if(($i == 4))
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  .= $invoices['invoice_id'];
                                                }
 
-                                               else if(($i == 6))
+                                               else if(($i == 5))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1807,12 +1790,12 @@
                                                        }
                                                }
 
-                                               else if(($i == 7))
+                                               else if(($i == 6))
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  .= $invoices['amount'];
                                                }
 
-                                               else if(($i == 8))
+                                               else if(($i == 7))
                                                {
 
                                                        if($invoices['paid'] == 
true)
@@ -1827,12 +1810,12 @@
 
                                                }
 
-                                               else if(($i == 9))
+                                               else if(($i == 8))
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  .= $invoices['currency'];
                                                }
 
-                                               else if(($i == 10))
+                                               else if(($i == 9))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1843,7 +1826,7 @@
                                                                
$json_row[$uicols[$i]['col_name']]  .= " <input name='values[dima][".$j."]' 
id='values[dima][".$j."]'  class='myValuesForPHP'  type='text' size='7' 
value='".$invoices['dima']."'/>";
                                                        }
                                                }
-                                               else if(($i == 11))
+                                               else if(($i == 10))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1870,7 +1853,7 @@
 
                                                        }
                                                }
-                                               else if(($i == 12))
+                                               else if(($i == 11))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1881,7 +1864,7 @@
                                                                
$json_row[$uicols[$i]['col_name']]  .= " <input name='values[dimd][".$j."]' 
id='values[dimd][".$j."]'  class='myValuesForPHP'  type='text' size='4' 
value='".$invoices['dimd']."'/>";
                                                        }
                                                }
-                                               else if(($i == 13))
+                                               else if(($i == 12))
                                                {
                                                        if($invoices['paid'] == 
true)
                                                        {
@@ -1908,7 +1891,7 @@
 
                                                        }
                                                }
-                                               else if(($i == 14))
+                                               else if(($i == 13))
                                                {
                                                        if($invoices['remark'] 
== true)
                                                        {
@@ -1924,7 +1907,7 @@
                                                                
$json_row[$uicols[$i]['col_name']]  .= "<b>-</b>";
                                                        }
                                                }
-                                               else if(($i == 15))
+                                               else if(($i == 14))
                                                {
                                                        
if(isset($invoices['external_ref']) && $invoices['external_ref'])
                                                        {
@@ -1936,15 +1919,15 @@
                                                                
$json_row[$uicols[$i]['col_name']]  .= "<b>-</b>";
                                                        }
                                                }
-                                               else if($i == 16)
+                                               else if($i == 15)
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  = $invoices['counter'];
                                                }
-                                               else if($i == 17)
+                                               else if($i == 16)
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  = $invoices['id'];
                                                }
-                                               else if($i == 18)
+                                               else if($i == 17)
                                                {
                                                        
$json_row[$uicols[$i]['col_name']]  = $invoices['external_ref'];
                                                }

Modified: branches/Version-1_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/inc/class.uiproject.inc.php    
2012-02-17 09:58:39 UTC (rev 8912)
@@ -1570,7 +1570,7 @@
                        }
                        $values['sum']  = number_format($values['sum'], 0, ',', 
' ');
                        $value_remainder = number_format($value_remainder, 0, 
',', ' ');
-                       $values['planned_cost']  = 
number_format($values['planned_cost'], 0, ',', ' ');
+//                     $values['planned_cost']  = 
number_format($values['planned_cost'], 0, ',', ' ');
 
                        $jscal = CreateObject('phpgwapi.jscalendar');
                        $jscal->add_listener('values_start_date');
@@ -1626,18 +1626,16 @@
                                        'footer'                                
=> 0
                                );
 
-
                        $myColumnDefs[1] = array
                                (
                                        'name'          => "1",
                                        'values'        =>      
json_encode(array(      array('key' => 
'workorder_id','label'=>lang('Workorder'),'sortable'=>true,'resizeable'=>true,'formatter'=>'YAHOO.widget.DataTable.formatLink'),
                                                                                
                                array('key' => 
'title','label'=>lang('title'),'sortable'=>true,'resizeable'=>true),
                                                                                
                                array('key' => 
'b_account_id','label'=>lang('Budget 
account'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
-                                                                               
                                array('key' => 
'contract_sum','label'=>lang('contract 
sum'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
-                                                                               
                                array('key' => 
'budget','label'=>lang('Budget'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
+                                                                               
                                array('key' => 
'budget','label'=>lang('Budget'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterAmount0'),
                                                                                
                                array('key' => 
'calculation','label'=>lang('Calculation'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
-                                                                               
                                array('key' => 
'actual_cost','label'=>lang('actual 
cost'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
-                                                                               
                                array('key' => 
'paid_percent','label'=>lang('paid 
percent'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterRight'),
+                                                                               
                                array('key' => 
'contract_sum','label'=>lang('contract 
sum'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterRight'),
+                                                                               
                                array('key' => 
'actual_cost','label'=>lang('actual 
cost'),'sortable'=>true,'resizeable'=>true,'formatter'=>'FormatterAmount2'),
                                                                                
                //              array('key' => 
'charge_tenant','label'=>lang('charge 
tenant'),'sortable'=>true,'resizeable'=>true),
                                                                                
                                array('key' => 
'vendor_name','label'=>lang('Vendor'),'sortable'=>true,'resizeable'=>true),
                                                                                
                                array('key' => 
'status','label'=>lang('Status'),'sortable'=>true,'resizeable'=>true)))
@@ -1669,7 +1667,6 @@
                                        'amount'                                
=> $entry['amount'],
                                        'approved_amount'               => 
$entry['approved_amount'],
                                        'vendor'                                
=> $entry['vendor'],
-                                       'paid_percent'                  => 
$entry['paid_percent'],
                                        'project_group'                 => 
$entry['project_id'],
                                        'currency'                              
=> $entry['currency'],
                                        'budget_responsible'    => 
$entry['budget_responsible'],
@@ -1828,8 +1825,8 @@
                                        'lang_reserve_remainder'                
        => lang('reserve remainder'),
                                        'value_reserve_remainder'               
        => isset($reserve_remainder)?$reserve_remainder:'',
                                        'value_reserve_remainder_percent'       
=> isset($remainder_percent)?$remainder_percent:'',
-                                       'lang_planned_cost'                     
                => lang('planned cost'),
-                                       'value_planned_cost'                    
        => $values['planned_cost'],
+//                                     'lang_planned_cost'                     
                => lang('planned cost'),
+//                                     'value_planned_cost'                    
        => $values['planned_cost'],
                                        'location_data'                         
                => $location_data,
                                        'location_type'                         
                => 'form',
                                        'form_action'                           
                => $GLOBALS['phpgw']->link('/index.php',$link_data),
@@ -2259,7 +2256,6 @@
                                        'amount'                                
=> $entry['amount'],
                                        'approved_amount'               => 
$entry['approved_amount'],
                                        'vendor'                                
=> $entry['vendor'],
-                                       'paid_percent'                  => 
$entry['paid_percent'],
                                        'project_group'                 => 
$entry['project_id'],
                                        'currency'                              
=> $entry['currency'],
                                        'budget_responsible'    => 
$entry['budget_responsible'],
@@ -2323,7 +2319,7 @@
                                'value_sum'                                     
                => isset($values['sum'])?$values['sum']:'',
                                'value_reserve_remainder'                       
=> isset($reserve_remainder)?$reserve_remainder:'',
                                'value_reserve_remainder_percent'       => 
isset($remainder_percent)?$remainder_percent:'',
-                               'value_planned_cost'                            
=> $values['planned_cost'],
+//                             'value_planned_cost'                            
=> $values['planned_cost'],
                                'form_action'                                   
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
                                'done_action'                                   
        => $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiproject.index')),
                                'project_group_data'                            
=> $project_group_data,

Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2012-02-17 09:58:39 UTC (rev 8912)
@@ -1537,7 +1537,7 @@
                                        'amount'                                
=> $entry['amount'],
                                        'approved_amount'               => 
$entry['approved_amount'],
                                        'vendor'                                
=> $entry['vendor'],
-                                       'paid_percent'                  => 
$entry['paid_percent'],
+               //                      'paid_percent'                  => 
$entry['paid_percent'],
                                        'project_group'                 => 
$entry['project_id'],
                                        'currency'                              
=> $entry['currency'],
                                        'budget_responsible'    => 
$entry['budget_responsible'],

Modified: branches/Version-1_0-branch/property/js/yahoo/project.edit.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/project.edit.js       
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/js/yahoo/project.edit.js       
2012-02-17 09:58:39 UTC (rev 8912)
@@ -102,8 +102,8 @@
                //call getTotalSum(name of column) in property.js
                tmp_sum1 = getTotalSum('budget',0,paginator,datatable);
                tmp_sum2 = getTotalSum('calculation',2,paginator,datatable);
-               tmp_sum3 = getTotalSum('actual_cost',2,paginator,datatable);
-               tmp_sum4 = getTotalSum('contract_sum',2,paginator,datatable);
+               tmp_sum3 = getTotalSum('contract_sum',2,paginator,datatable);
+               tmp_sum4 = getTotalSum('actual_cost',2,paginator,datatable);
 
                if(typeof(tableYUI1)=='undefined')
                {
@@ -120,10 +120,10 @@
 
                td_sum('Sum');
                td_empty(2);
-               td_sum(tmp_sum4);
                td_sum(tmp_sum1);
                td_sum(tmp_sum2);
                td_sum(tmp_sum3);
+               td_sum(tmp_sum4);
                td_empty(5);
 
                myfoot = tableYUI1.createTFoot();

Modified: branches/Version-1_0-branch/property/templates/base/project.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/project.xsl     
2012-02-17 09:55:16 UTC (rev 8911)
+++ branches/Version-1_0-branch/property/templates/base/project.xsl     
2012-02-17 09:58:39 UTC (rev 8912)
@@ -426,6 +426,7 @@
                                                                        
<xsl:text> % )</xsl:text>
                                                                </td>
                                                        </tr>
+<!--
                                                        <tr>
                                                                <td 
valign="top">
                                                                        
<xsl:value-of select="lang_planned_cost"/>
@@ -434,6 +435,7 @@
                                                                        
<xsl:value-of select="value_planned_cost"/><xsl:text> </xsl:text> [ 
<xsl:value-of select="currency"/> ]
                                                                </td>
                                                        </tr>
+-->
                                                        <tr>
                                                                <td 
class="th_text" valign="top">
                                                                        
<xsl:value-of select="lang_workorder_id"/>




reply via email to

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