phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.soworkorder.inc.php class.ui...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.soworkorder.inc.php class.ui...
Date: Sun, 01 Oct 2006 20:10:04 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/10/01 20:10:04

Modified files:
        inc            : class.soworkorder.inc.php 
                         class.uiworkorder.inc.php 
                         class.bocommon.inc.php class.soproject.inc.php 
                         class.boproject.inc.php class.uiproject.inc.php 

Log message:
        no message

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soworkorder.inc.php?cvsroot=phpgroupware&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiworkorder.inc.php?cvsroot=phpgroupware&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.bocommon.inc.php?cvsroot=phpgroupware&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soproject.inc.php?cvsroot=phpgroupware&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boproject.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiproject.inc.php?cvsroot=phpgroupware&r1=1.39&r2=1.40

Patches:
Index: class.soworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- class.soworkorder.inc.php   9 Jul 2006 17:47:38 -0000       1.22
+++ class.soworkorder.inc.php   1 Oct 2006 20:10:04 -0000       1.23
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.soworkorder.inc.php,v 1.22 2006/07/09 17:47:38 
sigurdne Exp $
+       * @version $Id: class.soworkorder.inc.php,v 1.23 2006/10/01 20:10:04 
sigurdne Exp $
        */
 
        /**
@@ -106,7 +106,7 @@
                                $key_location_entries[$i]['name']               
        = stripslashes($this->db->f('descr'));
                                $i++;
                        }
-                       return $key_location_entries;
+                       return 
(isset($key_location_entries)?$key_location_entries:'');
                }
 
                function read($data)
@@ -270,6 +270,8 @@
 
                        $where= 'WHERE';
 
+                       $filtermethod = '';
+                       
                        if ($cat_id > 0)
                        {
                                $filtermethod .= " $where 
fm_project.category=$cat_id ";
@@ -282,6 +284,7 @@
                                $where= 'AND';
                        }
 
+                       $group_method = '';
                        if($wo_hour_cat_id)
                        {
                                $filtermethod .= " $where 
fm_wo_hours_category.id=$wo_hour_cat_id ";
@@ -289,7 +292,6 @@
                                $group_method = " group by 
fm_project.id,fm_project.location_code,fm_workorder.id,workorder_id,title,fm_workorder.status,fm_workorder.entry_date,user_lid,fm_workorder.vendor_id,project_owner,fm_project.address,fm_vendor.org_name";
                        }
 
-
                        if ($b_group)
                        {
                                $filtermethod .= " $where 
fm_b_account.category='$b_group' ";
@@ -329,6 +331,7 @@
                                $where= 'AND';
                        }
 
+                       $querymethod = '';
                        if($query)
                        {
                                $query = str_replace(",",'.',$query);
@@ -345,9 +348,9 @@
                                        $querymethod = " $where 
(fm_workorder.title $this->like '%$query%' or fm_workorder.descr $this->like 
'%$query%' or fm_project.address $this->like '%$query%' or 
fm_project.location_code $this->like '%$query%' or fm_workorder.id $this->like 
'%$query%')";
                                }
                                $where= 'AND';
-
                        }
 
+                       $querymethod_vendor = '';
                        if($search_vendor)
                        {
                                if((int)$search_vendor>0)
@@ -395,7 +398,7 @@
                                $j++;
                        }
 
-                       return $workorder_list;
+                       return (isset($workorder_list)?$workorder_list:array());
                }
 
                function read_single($workorder_id)

Index: class.uiworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- class.uiworkorder.inc.php   27 Sep 2006 12:31:51 -0000      1.30
+++ class.uiworkorder.inc.php   1 Oct 2006 20:10:04 -0000       1.31
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.uiworkorder.inc.php,v 1.30 2006/09/27 12:31:51 
sigurdne Exp $
+       * @version $Id: class.uiworkorder.inc.php,v 1.31 2006/10/01 20:10:04 
sigurdne Exp $
        */
 
        /**
@@ -497,7 +497,7 @@
 
                        $config->read_repository();
 
-                       if ($values['save'])
+                       if (isset($values['save']))
                        {
                                if(!$values['title'])
                                {
@@ -582,17 +582,22 @@
                                }
                        }
 
-                       if(!$receipt['error'])
+                       if($project_id && !isset($values['project_id']))
+                       {
+                               $values['project_id']=$project_id;
+                       }
+                       $project        = 
$boproject->read_single_mini($values['project_id']);
+
+                       if(!isset($receipt['error']))
                        {
                                if($id)
                                {
                                        $values         = 
$this->bo->read_single($id);
                                }
-                               if($project_id && !$values['project_id'])
+                               if($project_id && !isset($values['project_id']))
                                {
                                        $values['project_id']=$project_id;
                                }
-                               $project        = 
$boproject->read_single_mini($values['project_id']);
 
                                if 
(!$this->bocommon->check_perms($project['grants'],PHPGW_ACL_EDIT))
                                {
@@ -600,28 +605,21 @@
                                        
$GLOBALS['phpgw']->session->appsession('receipt',$this->currentapp,$receipt);
                                        
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
$this->currentapp.'.uiworkorder.view', 'id'=>$id));
                                }
-
-
-
                                        if (isset($receipt['notice_owner']) AND 
is_array($receipt['notice_owner']))
                                        {
                                                
if($this->account!=$project['coordinator'] && 
$config->config_data['workorder_approval'])
                                                {
                                                        $prefs_coordinator = 
$this->bocommon->create_preferences($this->currentapp,$project['coordinator']);
                                                        $to = 
$prefs_coordinator['email'];
-
                                                        
$from_name=$GLOBALS['phpgw_info']['user']['fullname'];
                                                        
$from_email=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['email'];
-
                                                        $body = '<a href 
="http://' . $GLOBALS['phpgw_info']['server']['hostname'] . 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
$this->currentapp.'.uiworkorder.edit','id'=> $id)).'">' . lang('workorder %1 
has been edited',$id) .'</a>' . "\n";
                                                        
foreach($receipt['notice_owner'] as $notice)
                                                        {
                                                                $body .= 
$notice . "\n";
                                                        }
-
                                                        $body .= lang('Altered 
by') . ': ' . $from_name . "\n";
                                                        $body .= lang('remark') 
. ': ' . $values['remark'] . "\n";
-
                                                        $body = nl2br($body);
 
                                                        if 
(!is_object($GLOBALS['phpgw']->send))
@@ -643,7 +641,6 @@
                                                }
                                        }
 
-
                                if( $project['key_fetch'] && 
!$values['key_fetch'])
                                {
                                        
$values['key_fetch']=$project['key_fetch'];
@@ -667,15 +664,15 @@
                                {
                                        
$values['end_date']=$project['end_date'];
                                }
-                               if( $project['name'] && !$values['title'])
+                               if( $project['name'] && 
!isset($values['title']))
                                {
                                        $values['title']=$project['name'];
                                }
-                               if( $project['descr'] && !$values['descr'])
+                               if( $project['descr'] && 
!isset($values['descr']))
                                {
                                        $values['descr']=$project['descr'];
                                }
-                               if( $project['status'] && !$values['status'])
+                               if( $project['status'] && 
!isset($values['status']))
                                {
                                        $values['status']=$project['status'];
                                }
@@ -685,6 +682,10 @@
                        {
                                $record_history = 
$this->bo->read_record_history($id);
                        }
+                       else
+                       {
+                               $record_history = '';
+                       }
 
 //_debug_array($hour_data);
                        $table_header_history[] = array
@@ -710,22 +711,22 @@
                                $function_msg = lang('Add workorder');
                        }
 
-                       if ($values['cat_id'])
+                       if (isset($values['cat_id']) && $values['cat_id'])
                        {
                                $this->cat_id = $values['cat_id'];
                        }
 
 
                        $location_data=$bolocation->initiate_ui_location(array(
-                                               'values'                => 
$project['location_data'],
-                                               'type_id'               => 
count(explode('-',$project['location_data']['location_code'])),
+                                               'values'                => 
(isset($project['location_data'])?$project['location_data']:''),
+                                               'type_id'               => 
(isset($project['location_data']['location_code'])?count(explode('-',$project['location_data']['location_code'])):''),
                                                'no_link'               => 
False, // disable lookup links for location type less than type_id
-                                               'tenant'                => 
$project['location_data']['tenant_id'],
+                                               'tenant'                => 
(isset($project['location_data']['tenant_id'])?$project['location_data']['tenant_id']:''),
                                                'lookup_type'           => 
'view'
                                                ));
 
 
-                       if($project['contact_phone'])
+                       if(isset($project['contact_phone']))
                        {
                                for 
($i=0;$i<count($location_data['location']);$i++)
                                {
@@ -762,17 +763,29 @@
                        $dateformat= (implode($sep,$dlarr));
 
 
-                       
$supervisor_id=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['approval_from'];
+                       if ( 
isset($GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['approval_from'])
+                               && 
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['approval_from']
 )
+                       {
+                               $supervisor_id = 
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['approval_from'];
+                       }
+                       else
+                       {
+                               $supervisor_id = '';
+                       }
 
-                       $need_approval = 
$config->config_data['workorder_approval'];
+                       $need_approval = 
(isset($config->config_data['workorder_approval'])?$config->config_data['workorder_approval']:'');
 
                        if ($supervisor_id && ($need_approval=='yes'))
                        {
                                $prefs = 
$this->bocommon->create_preferences($this->currentapp,$supervisor_id);
                                $supervisor_email = $prefs['email'];
                        }
+                       else
+                       {
+                               $supervisor_email = '';
+                       }
 
-                       
$project_status=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['project_status'];
+                       
$project_status=(isset($GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['project_status'])?$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['project_status']:'');
                        if(!$values['status'])
                        {
                                $values['status']=$project_status;
@@ -781,7 +794,14 @@
                        $cal_info       = $this->bocommon->jscalendar();
                        $jsDateFormat=$cal_info['jsDateFormat'];
 
+                       if( isset($receipt) && is_array($receipt))
+                       {
                        $msgbox_data = $this->bocommon->msgbox_data($receipt);
+                       }
+                       else
+                       {
+                               $msgbox_data = '';
+                       }
 
                        $data = array
                        (
@@ -822,33 +842,33 @@
                                'lang_copy_workorder_statustext'        => 
lang('Choose Copy Workorder to copy this workorder to a new workorder'),
 
                                'lang_contact_phone'                    => 
lang('Contact phone'),
-                               'contact_phone'                         => 
$project['contact_phone'],
+                               'contact_phone'                         => 
(isset($project['contact_phone'])?$project['contact_phone']:''),
 
                                'lang_charge_tenant'                    => 
lang('Charge tenant'),
                                'lang_charge_tenant_statustext'         => 
lang('Choose charge tenant if the tenant i to pay for this project'),
-                               'charge_tenant'                         => 
$values['charge_tenant'],
+                               'charge_tenant'                         => 
(isset($values['charge_tenant'])?$values['charge_tenant']:''),
 
                                'lang_power_meter'                      => 
lang('Power meter'),
                                'lang_power_meter_statustext'           => 
lang('Enter the power meter'),
-                               'value_power_meter'                     => 
$project['power_meter'],
+                               'value_power_meter'                     => 
(isset($project['power_meter'])?$project['power_meter']:''),
 
                                'lang_addition_rs'                      => 
lang('Rig addition'),
                                'lang_addition_rs_statustext'           => 
lang('Enter any round sum addition per order'),
-                               'value_addition_rs'                     => 
$values['addition_rs'],
+                               'value_addition_rs'                     => 
(isset($values['addition_rs'])?$values['addition_rs']:''),
 
                                'lang_addition_percentage'              => 
lang('Percentage addition'),
                                'lang_addition_percentage_statustext'   => 
lang('Enter any persentage addition per unit'),
-                               'value_addition_percentage'             => 
$values['addition_percentage'],
+                               'value_addition_percentage'             => 
(isset($values['addition_percentage'])?$values['addition_percentage']:''),
 
                                'lang_budget'                           => 
lang('Budget'),
-                               'value_budget'                          => 
$values['budget'],
+                               'value_budget'                          => 
(isset($values['budget'])?$values['budget']:''),
                                'lang_budget_statustext'                => 
lang('Enter the budget'),
 
                                'lang_incl_tax'                         => 
lang('incl tax'),
                                'lang_calculation'                      => 
lang('Calculation'),
-                               'value_calculation'                     => 
$values['calculation'],
+                               'value_calculation'                     => 
(isset($values['calculation'])?$values['calculation']:''),
 
-                               'actual_cost'                           => 
$values['actual_cost'],
+                               'actual_cost'                           => 
(isset($values['actual_cost'])?$values['actual_cost']:''),
                                'lang_actual_cost'                      => 
lang('Actual cost'),
 
                                'vendor_data'                           => 
$vendor_data,
@@ -863,19 +883,19 @@
                                'lang_title'                            => 
lang('Title'),
                                'value_title'                           => 
$values['title'],
                                'lang_project_name'                     => 
lang('Project name'),
-                               'value_project_name'                    => 
$project['name'],
+                               'value_project_name'                    => 
(isset($project['name'])?$project['name']:''),
 
                                'lang_project_id'                       => 
lang('Project ID'),
                                'value_project_id'                      => 
$values['project_id'],
 
                                'lang_workorder_id'                     => 
lang('Workorder ID'),
-                               'value_workorder_id'                    => 
$values['workorder_id'],
+                               'value_workorder_id'                    => 
(isset($values['workorder_id'])?$values['workorder_id']:''),
 
                                'lang_title_statustext'                 => 
lang('Enter Workorder title'),
 
                                'lang_other_branch'                     => 
lang('Other branch'),
                                'lang_other_branch_statustext'          => 
lang('Enter other branch if not found in the list'),
-                               'value_other_branch'                    => 
$project['other_branch'],
+                               'value_other_branch'                    => 
(isset($project['other_branch'])?$project['other_branch']:''),
 
                                'lang_descr_statustext'                 => 
lang('Enter a short description of the workorder'),
                                'lang_descr'                            => 
lang('Description'),
@@ -883,18 +903,18 @@
 
                                'lang_remark_statustext'                => 
lang('Enter a remark to add to the history of the order'),
                                'lang_remark'                           => 
lang('remark'),
-                               'value_remark'                          => 
$values['remark'],
+                               'value_remark'                          => 
(isset($values['remark'])?$values['remark']:''),
 
                                'lang_done_statustext'                  => 
lang('Back to the list'),
                                'lang_save_statustext'                  => 
lang('Save the workorder'),
                                'lang_no_cat'                           => 
lang('Select category'),
                                'lang_cat_statustext'                   => 
lang('Select the category the project belongs to. To do not use a category 
select NO CATEGORY'),
                                'select_name'                           => 
'values[cat_id]',
-                               'value_cat_id'                          => 
$values['cat_id'],
+                               'value_cat_id'                          => 
(isset($values['cat_id'])?$values['cat_id']:''),
                                'cat_list'                              => 
$this->bocommon->select_category_list(array('format'=>'select','selected' => 
$project['cat_id'],'type' =>'wo','order'=>'descr')),
 
-                               'sum_workorder_budget'                  => 
$values['sum_workorder_budget'],
-                               'workorder_budget'                      => 
$values['workorder_budget'],
+                               'sum_workorder_budget'                  => 
(isset($values['sum_workorder_budget'])?$values['sum_workorder_budget']:''),
+                               'workorder_budget'                      => 
(isset($values['workorder_budget'])?$values['workorder_budget']:''),
 
                                'lang_coordinator'                      => 
lang('Coordinator'),
                                'lang_sum'                              => 
lang('Sum'),
@@ -916,12 +936,12 @@
                                'key_responsible_list'                  => 
$boproject->select_branch_list($project['key_responsible']),
                                'lang_key_responsible'                  => 
lang('key responsible'),
 
-                               'key_fetch_list'                        => 
$this->bo->select_key_location_list($values['key_fetch']),
+                               'key_fetch_list'                        => 
$this->bo->select_key_location_list((isset($values['key_fetch'])?$values['key_fetch']:'')),
                                'lang_no_key_fetch'                     => 
lang('Where to fetch the key'),
                                'lang_key_fetch'                        => 
lang('key fetch location'),
                                'lang_key_fetch_statustext'             => 
lang('Select where to fetch the key'),
 
-                               'key_deliver_list'                      => 
$this->bo->select_key_location_list($values['key_deliver']),
+                               'key_deliver_list'                      => 
$this->bo->select_key_location_list((isset($values['key_deliver'])?$values['key_deliver']:'')),
                                'lang_no_key_deliver'                   => 
lang('Where to deliver the key'),
                                'lang_key_deliver'                      => 
lang('key deliver location'),
                                'lang_key_deliver_statustext'           => 
lang('Select where to deliver the key'),

Index: class.bocommon.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- class.bocommon.inc.php      27 Sep 2006 11:20:52 -0000      1.41
+++ class.bocommon.inc.php      1 Oct 2006 20:10:04 -0000       1.42
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage core
-       * @version $Id: class.bocommon.inc.php,v 1.41 2006/09/27 11:20:52 
sigurdne Exp $
+       * @version $Id: class.bocommon.inc.php,v 1.42 2006/10/01 20:10:04 
sigurdne Exp $
        */
 
        /**
@@ -286,23 +286,22 @@
                        {
                                foreach($input_list as $entry)
                                {
-                                       $sel_entry = '';
                                        if ($entry['id']==$selected)
                                        {
-                                               $sel_entry = 'selected';
-                                       }
                                        $entry_list[] = array
                                        (
                                                'id'            => $entry['id'],
                                                'name'          => 
$entry['name'],
-                                               'selected'      => $sel_entry
+                                                       'selected'      => 
'selected'
                                        );
                                }
-                               for ($i=0;$i<count($entry_list);$i++)
-                               {
-                                       if ($entry_list[$i]['selected'] != 
'selected')
+                                       else
                                        {
-                                               
unset($entry_list[$i]['selected']);
+                                               $entry_list[] = array
+                                               (
+                                                       'id'            => 
$entry['id'],
+                                                       'name'          => 
$entry['name'],
+                                               );                              
        
                                        }
                                }
                                return $entry_list;
@@ -342,7 +341,7 @@
                        $accounts       = CreateObject('phpgwapi.accounts');
                        $users = $accounts->get_list('accounts', $start, $sort, 
$order, $query,$offset);
                        unset($accounts);
-                       if (is_array($users_extra) && is_array($users))
+                       if (isset($users_extra) && is_array($users_extra) && 
is_array($users))
                        {
                                $users = $users_extra + $users;
                        }
@@ -533,7 +532,7 @@
                        $contacts       = 
CreateObject($this->currentapp.'.soactor');
                        $contacts->role='vendor';
 
-                       if($data['type']=='view')
+                       if( isset($data['type']) && $data['type']=='view')
                        {
                                
$GLOBALS['phpgw']->xslttpl->add_file(array('vendor_view'));
                        }
@@ -571,7 +570,6 @@
                        return $vendor;
                }
 
-
                function initiate_ui_tenant_lookup($data)
                {
                        if($data['type']=='view')
@@ -629,7 +627,7 @@
 
                function initiate_ui_budget_account_lookup($data)
                {
-                       if($data['type']=='view')
+                       if( isset($data['type']) && $data['type']=='view')
                        {
                                
$GLOBALS['phpgw']->xslttpl->add_file(array('b_account_view'));
                        }
@@ -1377,7 +1375,7 @@
                        }
                        endif;
 
-                       return $link;
+                       return (isset($link)?$link:'');
                }
 
                function new_db()

Index: class.soproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- class.soproject.inc.php     28 Sep 2006 13:43:28 -0000      1.33
+++ class.soproject.inc.php     1 Oct 2006 20:10:04 -0000       1.34
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.soproject.inc.php,v 1.33 2006/09/28 13:43:28 
sigurdne Exp $
+       * @version $Id: class.soproject.inc.php,v 1.34 2006/10/01 20:10:04 
sigurdne Exp $
        */
 
        /**
@@ -416,6 +416,7 @@
 
                function project_workorder_data($project_id = '')
                {
+                       $budget = array();
                        $this->db->query("SELECT act_mtrl_cost, 
act_vendor_cost, budget, id as workorder_id, vendor_id, 
calculation,rig_addition,addition,deviation,charge_tenant from fm_workorder 
where project_id='$project_id'");
                        while ($this->db->next_record())
                        {

Index: class.boproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boproject.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- class.boproject.inc.php     28 Sep 2006 12:07:43 -0000      1.18
+++ class.boproject.inc.php     1 Oct 2006 20:10:04 -0000       1.19
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.boproject.inc.php,v 1.18 2006/09/28 12:07:43 
sigurdne Exp $
+       * @version $Id: class.boproject.inc.php,v 1.19 2006/10/01 20:10:04 
sigurdne Exp $
        */
 
        /**
@@ -229,7 +229,7 @@
 
                        $config                         = 
CreateObject('phpgwapi.config');
                        $config->read_repository();
-                       $tax = 1+($config->config_data['fm_tax'])/100;
+                       $tax = 
1+(isset($config->config_data['fm_tax'])?$config->config_data['fm_tax']:0)/100;
 
                        $project                                = 
$this->so->read_single($project_id);
                        $dateformat                             = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];

Index: class.uiproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- class.uiproject.inc.php     28 Sep 2006 14:27:51 -0000      1.39
+++ class.uiproject.inc.php     1 Oct 2006 20:10:04 -0000       1.40
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.uiproject.inc.php,v 1.39 2006/09/28 14:27:51 
sigurdne Exp $
+       * @version $Id: class.uiproject.inc.php,v 1.40 2006/10/01 20:10:04 
sigurdne Exp $
        */
 
        /**
@@ -597,11 +597,12 @@
 
                        $config->read_repository();
 
+                       $save='';
                        if (isset($values['save']))
                        {
                                $save=true;
 
-                               if(!$values['location'])
+                               if(!isset($values['location']))
                                {
                                        
$receipt['error'][]=array('msg'=>lang('Please select a location !'));
                                        $error_id=true;
@@ -753,13 +754,13 @@
 
                                if($receipt['error'] && !isset($bypass_error))
                                {
-                                       if($values['location'])
+                                       if(isset($values['location']) && 
is_array($values['location']))
                                        {
                                                $location_code=implode("-", 
$values['location']);
                                                $values['location_data'] = 
$bolocation->read_single($location_code,$values['extra']);
                                        }
 
-                                       if($values['extra']['p_num'])
+                                       if(isset($values['extra']['p_num']))
                                        {
                                                
$values['p'][$values['extra']['p_entity_id']]['p_num']=$values['extra']['p_num'];
                                                
$values['p'][$values['extra']['p_entity_id']]['p_entity_id']=$values['extra']['p_entity_id'];
@@ -774,7 +775,12 @@
                        {
                                $values = $this->bo->read_single($id);
 
-                               if(!$values['workorder_budget'] && $save)
+                               if(!isset($values['origin']))
+                               {
+                                       $values['origin'] = '';
+                               }
+
+                               if(!isset($values['workorder_budget']) && $save)
                                {
                                        
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
$this->currentapp.'.uiworkorder.edit', 'project_id'=> $id));
                                }
@@ -791,7 +797,6 @@
                                }
                        }
 
-
                        $table_header_history[] = array
                        (
                                'lang_date'             => lang('Date'),




reply via email to

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