[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.5.2
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.5.2.16,1.42.2.5.2.17 class.soprojects.inc.php,1.34.2.6.2.14,1.34.2.6.2.15 class.uiprojects.inc.php,1.47.2.7.2.15,1.47.2.7.2.16 |
Date: |
Sat, 14 Jun 2003 19:14:33 -0400 |
Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv28930/inc
Modified Files:
Tag: Version-0_9_16-branch
class.boprojects.inc.php class.soprojects.inc.php
class.uiprojects.inc.php
Log Message:
update
Index: class.boprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.42.2.5.2.16
retrieving revision 1.42.2.5.2.17
diff -C2 -r1.42.2.5.2.16 -r1.42.2.5.2.17
*** class.boprojects.inc.php 14 Jun 2003 21:36:16 -0000 1.42.2.5.2.16
--- class.boprojects.inc.php 14 Jun 2003 23:14:30 -0000 1.42.2.5.2.17
***************
*** 585,589 ****
if ((! $book_activities) && (! $bill_activities))
{
! $error[] = lang('please choose activities for
that project first');
}
--- 585,589 ----
if ((! $book_activities) && (! $bill_activities))
{
! $error[] = lang('please choose activities for
the project');
}
***************
*** 606,615 ****
if ($action == 'mains')
{
! if ((!$values['budget'] ||
floatval($values['budget']) == 0) && $values['pcosts'])
{
$error[] = lang('please specify the
budget');
}
! if (($values['budget'] &&
floatval($values['budget']) > 0) && ($values['pcosts'] &&
floatval($values['pcosts']) > 0))
{
if ($values['pcosts'] >
$values['budget'])
--- 606,615 ----
if ($action == 'mains')
{
! if ((!$values['budget'] || $values['budget'] ==
0) && $values['pcosts'])
{
$error[] = lang('please specify the
budget');
}
! if (($values['budget'] && $values['budget'] >
0) && ($values['pcosts'] && $values['pcosts'] > 0))
{
if ($values['pcosts'] >
$values['budget'])
***************
*** 740,753 ****
{
$values['access'] = 'public';
- }
-
- if (!$values['budget'])
- {
- $values['budget'] = 0;
- }
-
- if (!$values['pcosts'])
- {
- $values['pcosts'] = 0;
}
--- 740,743 ----
Index: class.soprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.34.2.6.2.14
retrieving revision 1.34.2.6.2.15
diff -C2 -r1.34.2.6.2.14 -r1.34.2.6.2.15
*** class.soprojects.inc.php 10 Jun 2003 21:26:19 -0000 1.34.2.6.2.14
--- class.soprojects.inc.php 14 Jun 2003 23:14:30 -0000 1.34.2.6.2.15
***************
*** 265,268 ****
--- 265,271 ----
$values['investment_nr'] =
$this->db->db_addslashes($values['investment_nr']);
+ $values['budget'] =
$values['budget'] + 0.0;
+ $values['pcosts'] =
$values['pcosts'] + 0.0;
+
$table = 'phpgw_p_projects';
$this->db->lock($table);
***************
*** 323,326 ****
--- 326,332 ----
$values['project_id'] =
intval($values['project_id']);
+ $values['budget'] =
$values['budget'] + 0.0;
+ $values['pcosts'] =
$values['pcosts'] + 0.0;
+
$this->db->query("UPDATE phpgw_p_projects set access='"
. $values['access'] . "', category=" . intval($values['cat']) . ", entry_date="
. time() . ",
start_date=" . intval($values['sdate']) . ", end_date=" .
intval($values['edate']) . ", coordinator="
***************
*** 900,903 ****
--- 906,911 ----
function delete_pa($action, $pa_id, $subs = False)
{
+ $pa_id = intval($pa_id);
+
switch ($action)
{
***************
*** 938,953 ****
}
! for ($i=0;$i<=count($del);$i++)
{
! $this->db->query('Delete from
phpgw_p_deliverypos where delivery_id=' . $del[$i]['id'],__LINE__,__FILE__);
}
- $this->db->query('DELETE from phpgw_p_delivery
where project_id=' . $pa_id,__LINE__,__FILE__);
-
$this->db->query('select id from
phpgw_p_invoice where project_id=' . $pa_id,__LINE__,__FILE__);
while ($this->db->next_record())
{
! $del[] = array
(
'id' => $this->db->f('id')
--- 946,963 ----
}
! if (is_array($del))
{
! for ($i=0;$i<=count($del);$i++)
! {
! $this->db->query('Delete from
phpgw_p_deliverypos where delivery_id=' .
intval($del[$i]['id']),__LINE__,__FILE__);
! }
! $this->db->query('DELETE from
phpgw_p_delivery where project_id=' . $pa_id,__LINE__,__FILE__);
}
$this->db->query('select id from
phpgw_p_invoice where project_id=' . $pa_id,__LINE__,__FILE__);
while ($this->db->next_record())
{
! $inv[] = array
(
'id' => $this->db->f('id')
***************
*** 955,964 ****
}
! for ($i=0;$i<=count($del);$i++)
{
! $this->db->query('Delete from
phpgw_p_invoicepos where invoice_id=' . $del[$i]['id'],__LINE__,__FILE__);
}
-
- $this->db->query('DELETE from phpgw_p_invoice
where project_id=' . $pa_id,__LINE__,__FILE__);
}
}
--- 965,976 ----
}
! if (is_array($inv))
{
! for ($i=0;$i<=count($inv);$i++)
! {
! $this->db->query('Delete from
phpgw_p_invoicepos where invoice_id=' .
intval($inv[$i]['id']),__LINE__,__FILE__);
! }
! $this->db->query('DELETE from
phpgw_p_invoice where project_id=' . $pa_id,__LINE__,__FILE__);
}
}
}
***************
*** 966,973 ****
function delete_account_project_data($account_id)
{
! if ($account_id && $account_id != 0)
{
! $this->db->query('delete from phpgw_p_hours
where employee=' . $account_id,__LINE__,__FILE__);
! $this->db->query('select id from
phpgw_p_projects where coordinator=' . $account_id,__LINE__,__FILE__);
while ($this->db->next_record())
--- 978,985 ----
function delete_account_project_data($account_id)
{
! if ($account_id && $account_id > 0)
{
! $this->db->query('delete from phpgw_p_hours
where employee=' . intval($account_id),__LINE__,__FILE__);
! $this->db->query('select id from
phpgw_p_projects where coordinator=' . intval($account_id),__LINE__,__FILE__);
while ($this->db->next_record())
***************
*** 997,1008 ****
}
! for ($i=0;$i<=count($del);$i++)
{
! $this->db->query("Delete from
phpgw_p_deliverypos where delivery_id='" . $del[$i]['id'] .
"'",__LINE__,__FILE__);
}
- $this->db->query("DELETE from
phpgw_p_delivery where project_id in (" . implode(',',$drop_list) .
")",__LINE__,__FILE__);
! $this->db->query("select id from
phpgw_p_invoice where project_id in (" . implode(',',$drop_list) .
")",__LINE__,__FILE__);
while ($this->db->next_record())
--- 1009,1024 ----
}
! if (is_array($del))
{
! for ($i=0;$i<=count($del);$i++)
! {
!
$this->db->query('Delete from phpgw_p_deliverypos where delivery_id=' .
intval($del[$i]['id']),__LINE__,__FILE__);
! }
!
! $this->db->query('DELETE from
phpgw_p_delivery where project_id in (' . implode(',',$drop_list) .
')',__LINE__,__FILE__);
}
! $this->db->query('select id from
phpgw_p_invoice where project_id in (' . implode(',',$drop_list) .
')',__LINE__,__FILE__);
while ($this->db->next_record())
***************
*** 1014,1023 ****
}
! for ($i=0;$i<=count($inv);$i++)
{
! $this->db->query('Delete from
phpgw_p_invoicepos where invoice_id=' . $inv[$i]['id'],__LINE__,__FILE__);
! }
! $this->db->query('DELETE from
phpgw_p_invoice where project_id in (' . implode(',',$drop_list) .
')',__LINE__,__FILE__);
}
}
--- 1030,1042 ----
}
! if (is_array($inv))
{
! for ($i=0;$i<=count($inv);$i++)
! {
!
$this->db->query('Delete from phpgw_p_invoicepos where invoice_id=' .
intval($inv[$i]['id']),__LINE__,__FILE__);
! }
! $this->db->query('DELETE from
phpgw_p_invoice where project_id in (' . implode(',',$drop_list) .
')',__LINE__,__FILE__);
! }
}
}
***************
*** 1026,1029 ****
--- 1045,1051 ----
function change_owner($old, $new)
{
+ $old = intval($old);
+ $new = intval($new);
+
$this->db->query('UPDATE phpgw_p_projects set
coordinator=' . $new . ' where coordinator=' . $old,__LINE__,__FILE__);
$this->db->query('UPDATE phpgw_p_hours set employee=' .
$new . ' where employee=' . $old,__LINE__,__FILE__);
Index: class.uiprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.47.2.7.2.15
retrieving revision 1.47.2.7.2.16
diff -C2 -r1.47.2.7.2.15 -r1.47.2.7.2.16
*** class.uiprojects.inc.php 14 Jun 2003 21:36:16 -0000 1.47.2.7.2.15
--- class.uiprojects.inc.php 14 Jun 2003 23:14:31 -0000 1.47.2.7.2.16
***************
*** 860,864 ****
);
! if ($_POST['confirm'])
{
$del = $pa_id;
--- 860,864 ----
);
! if ($_POST['yes'])
{
$del = $pa_id;
***************
*** 868,872 ****
$this->bo->delete_pa($action, $del,
True);
}
! else
{
$this->bo->delete_pa($action, $del,
False);
--- 868,872 ----
$this->bo->delete_pa($action, $del,
True);
}
! else
{
$this->bo->delete_pa($action, $del,
False);
***************
*** 875,878 ****
--- 875,883 ----
}
+ if ($_POST['no'])
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
+ }
+
$this->display_app_header();
$GLOBALS['phpgw']->template->set_file(array('pa_delete'
=> 'delete.tpl'));
***************
*** 881,886 ****
$GLOBALS['phpgw']->template->set_var('subs', '');
!
$GLOBALS['phpgw']->template->set_var('nolink',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
$GLOBALS['phpgw']->template->set_var('deleteheader',lang('Are you sure you want
to delete this entry ?'));
$GLOBALS['phpgw']->template->set_var('lang_no',lang('No'));
$GLOBALS['phpgw']->template->set_var('lang_yes',lang('Yes'));
--- 886,890 ----
$GLOBALS['phpgw']->template->set_var('subs', '');
!
$GLOBALS['phpgw']->template->set_var('deleteheader',lang('are you sure you want
to delete this entry'));
$GLOBALS['phpgw']->template->set_var('lang_no',lang('No'));
$GLOBALS['phpgw']->template->set_var('lang_yes',lang('Yes'));
***************
*** 898,902 ****
$link_data['menuaction'] =
'projects.uiprojects.delete_pa';
!
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
$GLOBALS['phpgw']->template->pfp('out','pa_delete');
--- 902,906 ----
$link_data['menuaction'] =
'projects.uiprojects.delete_pa';
!
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
$GLOBALS['phpgw']->template->pfp('out','pa_delete');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.42.2.5.2.16,1.42.2.5.2.17 class.soprojects.inc.php,1.34.2.6.2.14,1.34.2.6.2.15 class.uiprojects.inc.php,1.47.2.7.2.15,1.47.2.7.2.16,
Bettina Gille <address@hidden> <=