[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.41,1.42
From: |
Bettina gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.41,1.42 class.soprojecthours.inc.php,1.7,1.8 class.soprojects.inc.php,1.33,1.34 class.uiprojects.inc.php,1.46,1.47 hook_admin.inc.php,1.5,1.6 |
Date: |
Tue, 08 Jan 2002 20:06:56 -0500 |
Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv9942/inc
Modified Files:
class.boprojects.inc.php class.soprojecthours.inc.php
class.soprojects.inc.php class.uiprojects.inc.php
hook_admin.inc.php
Log Message:
update prefs
Index: class.boprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** class.boprojects.inc.php 7 Jan 2002 10:50:42 -0000 1.41
--- class.boprojects.inc.php 9 Jan 2002 01:06:53 -0000 1.42
***************
*** 205,208 ****
--- 205,219 ----
$GLOBALS['phpgw']->preferences->change('projects','allsize',$prefs['allsize']);
$GLOBALS['phpgw']->preferences->save_repository(True);
+ // _debug_array($prefs);
+ // exit;
+ }
+
+ if ($prefs['oldbill'] == 'h' && $prefs['bill'] == 'wu')
+ {
+ return True;
+ }
+ else
+ {
+ return False;
}
}
***************
*** 603,606 ****
--- 614,623 ----
{
$this->soprojects->edit_activity($values);
+
+ if ($values['minperae'])
+ {
+ $this->soprojecthours =
CreateObject('projects.soprojecthours');
+
$this->soprojecthours->update_hours_act($values['activity_id'],$values['minperae']);
+ }
}
}
Index: class.soprojecthours.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojecthours.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.soprojecthours.inc.php 7 Jan 2002 10:50:42 -0000 1.7
--- class.soprojecthours.inc.php 9 Jan 2002 01:06:53 -0000 1.8
***************
*** 140,143 ****
--- 140,164 ----
$this->db->query("Delete from phpgw_p_hours where id =
'$hours_id'",__LINE__,__FILE__);
}
+
+ function update_hours_act($activity_id, $minperae)
+ {
+ $this->db->query("SELECT id,minperae from phpgw_p_hours
where activity_id='" . $activity_id . "'",__LINE__,__FILE__);
+
+ while ($this->db->next_record())
+ {
+ if ($this->db->f('minperae') == 0)
+ {
+ $hours[] = $this->db->f('id');
+ }
+ }
+
+ if (is_array($hours))
+ {
+ for ($i=0;$i<=count($hours);$i++)
+ {
+ $this->db->query("UPDATE phpgw_p_hours
set minperae='" . $minperae . "' WHERE id='" . $hours[$i] .
"'",__LINE__,__FILE__);
+ }
+ }
+ }
}
?>
Index: class.soprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** class.soprojects.inc.php 7 Jan 2002 10:50:42 -0000 1.33
--- class.soprojects.inc.php 9 Jan 2002 01:06:53 -0000 1.34
***************
*** 57,61 ****
case 'wu': $l = lang('per workunit');
break;
case 'h': $l = lang('per hour'); break;
! default : $l = lang('per hour');
}
return $l;
--- 57,61 ----
case 'wu': $l = lang('per workunit');
break;
case 'h': $l = lang('per hour'); break;
! default : $l = lang('per hour/workunit');
}
return $l;
Index: class.uiprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** class.uiprojects.inc.php 7 Jan 2002 10:50:42 -0000 1.46
--- class.uiprojects.inc.php 9 Jan 2002 01:06:53 -0000 1.47
***************
*** 1304,1314 ****
$this->t->set_block('admin_list_t','admin_list','list');
if ($action == 'pad')
{
! $this->t->set_var('lang_action',lang('Project
administration'));
}
else
{
! $this->t->set_var('lang_action',lang('Project
bookkeeping'));
}
--- 1304,1316 ----
$this->t->set_block('admin_list_t','admin_list','list');
+ $this->t->set_var('lang_action',lang('Projects'));
+
if ($action == 'pad')
{
!
$this->t->set_var('lang_admin',lang('administration'));
}
else
{
!
$this->t->set_var('lang_admin',lang('accountancy'));
}
***************
*** 1521,1532 ****
function preferences()
{
! global $submit, $prefs, $abid;
if ($submit)
{
! $prefs['abid'] = $abid;
! $this->boprojects->save_prefs($prefs);
! Header('Location: ' .
$GLOBALS['phpgw']->link('/preferences/index.php'));
! $GLOBALS['phpgw']->common->phpgw_exit();
}
--- 1523,1539 ----
function preferences()
{
! global $submit, $prefs, $abid, $oldbill;
if ($submit)
{
! $prefs['abid'] = $abid;
! $prefs['oldbill'] = $oldbill;
! $obill = $this->boprojects->save_prefs($prefs);
!
! if ($obill == False)
! {
! Header('Location: ' .
$GLOBALS['phpgw']->link('/preferences/index.php'));
! $GLOBALS['phpgw']->common->phpgw_exit();
! }
}
***************
*** 1544,1560 ****
$this->t->set_var('lang_action',lang('Project
preferences'));
$this->t->set_var('lang_layout',lang('Invoice
layout'));
$this->t->set_var('lang_select_font',lang('Select font'));
$this->t->set_var('lang_select_mysize',lang('Select font size for own
address'));
$this->t->set_var('lang_select_allsize',lang('Select font size for customer
address'));
!
!
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.preferences'));
!
$this->t->set_var('addressbook_link',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.abook'));
!
$this->t->set_var('lang_select_tax',lang('Select tax for workhours'));
$this->t->set_var('lang_address',lang('Select
your address'));
-
$this->t->set_var('lang_bill',lang('Invoicing'));
$prefs = $this->boprojects->read_prefs();
$this->t->set_var('tax',$prefs['tax']);
--- 1551,1574 ----
$this->t->set_var('lang_action',lang('Project
preferences'));
+ if ($obill == True)
+ {
+
$this->t->set_var('bill_message',lang('Please set the minutes per workunit for
each activity now !'));
+ }
+
$this->t->set_var('lang_layout',lang('Invoice
layout'));
$this->t->set_var('lang_select_font',lang('Select font'));
$this->t->set_var('lang_select_mysize',lang('Select font size for own
address'));
$this->t->set_var('lang_select_allsize',lang('Select font size for customer
address'));
!
$this->t->set_var('lang_bill',lang('Invoicing'));
$this->t->set_var('lang_select_tax',lang('Select tax for workhours'));
$this->t->set_var('lang_address',lang('Select
your address'));
$prefs = $this->boprojects->read_prefs();
+
+ $oldbill = $prefs['bill'];
+
+
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.preferences&oldbill='
. $oldbill));
+
$this->t->set_var('doneurl',$GLOBALS['phpgw']->link('/preferences/index.php'));
+
$this->t->set_var('addressbook_link',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.abook'));
$this->t->set_var('tax',$prefs['tax']);
Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/hook_admin.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** hook_admin.inc.php 3 Jan 2002 21:55:45 -0000 1.5
--- hook_admin.inc.php 9 Jan 2002 01:06:53 -0000 1.6
***************
*** 16,21 ****
$file = Array
(
! 'Project administration' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pad'),
! 'Project bookkeeping' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pbo')
);
//Do not modify below this line
--- 16,21 ----
$file = Array
(
! 'Administration' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pad'),
! 'Accountancy' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pbo')
);
//Do not modify below this line
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: projects/inc class.boprojects.inc.php,1.41,1.42 class.soprojecthours.inc.php,1.7,1.8 class.soprojects.inc.php,1.33,1.34 class.uiprojects.inc.php,1.46,1.47 hook_admin.inc.php,1.5,1.6,
Bettina gille <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: projects/setup phpgw_de.lang,1.16,1.17 phpgw_en.lang,1.24,1.25
- Next by Date:
[Phpgroupware-cvs] CVS: phpgroupware/doc cvs_full_checkout.php,1.6,1.7 cvs_full_checkout.pl,1.2,1.3
- Previous by thread:
[Phpgroupware-cvs] CVS: projects/setup phpgw_de.lang,1.16,1.17 phpgw_en.lang,1.24,1.25
- Next by thread:
[Phpgroupware-cvs] CVS: phpgroupware/doc cvs_full_checkout.php,1.6,1.7 cvs_full_checkout.pl,1.2,1.3
- Index(es):