[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property list_workorder.php,1.4,1.5 add_workorde
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property list_workorder.php,1.4,1.5 add_workorder.php,1.3,1.4 edit_workorder.php,1.3,1.4 list_power_meter.php,1.2,1.3 view_workorder.php,1.1.1.1,1.2 |
Date: |
Wed, 04 Sep 2002 13:56:11 -0400 |
Update of /cvsroot/phpgroupware/property
In directory subversions:/tmp/cvs-serv31437
Modified Files:
list_workorder.php add_workorder.php edit_workorder.php
list_power_meter.php view_workorder.php
Log Message:
no message
Index: list_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_workorder.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** list_workorder.php 3 Sep 2002 22:15:38 -0000 1.4
--- list_workorder.php 4 Sep 2002 17:56:09 -0000 1.5
***************
*** 23,30 ****
$GLOBALS['phpgw']->session->appsession('sub','property','p_workorder');
! $t->set_var('lang_action',lang('Workorders list'));
$t->set_var('add_url',$GLOBALS['phpgw']->link('/property/add_workorder.php'));
!
$t->set_var('search_url',$GLOBALS['phpgw']->link('/property/list_workorder.php'));
!
$t->set_var('cat_url',$GLOBALS['phpgw']->link('/property/list_workorder.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));//&coordinator_id=$coordinator_id"));
$c = CreateObject('phpgwapi.categories');
--- 23,37 ----
$GLOBALS['phpgw']->session->appsession('sub','property','p_workorder');
! if ($status=='Avsluttet')
! {
! $t->set_var('lang_action',lang('Archive list'));
! }
! else
! {
! $t->set_var('lang_action',lang('Workorders list'));
! }
$t->set_var('add_url',$GLOBALS['phpgw']->link('/property/add_workorder.php'));
!
$t->set_var('search_url',$GLOBALS['phpgw']->link('/property/list_workorder.php',"sort=$sort&order=$order&filter=$filter&start=$start&cat_id=$cat_id&status=$status&coordinator_id=$coordinator_id"));
!
$t->set_var('cat_url',$GLOBALS['phpgw']->link('/property/list_workorder.php',"sort=$sort&order=$order&filter=$filter&start=$start&query_location=$query_location&query_vendor=$query_vendor&status=$status&coordinator_id=$coordinator_id"));
$c = CreateObject('phpgwapi.categories');
***************
*** 39,43 ****
$t->set_var('lang_search_location',lang('Location'));
$t->set_var('lang_category',lang('Category'));
!
$t->set_var('coordinator_url',$GLOBALS['phpgw']->link('/property/list_workorder.php',"sort=$sort&order=$order&filter=$filter&start=$start&query=$query&cat_id=$cat_id"));//&coordinator_id=$coordinator_id"));
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort .
'">' . "\n"
--- 46,50 ----
$t->set_var('lang_search_location',lang('Location'));
$t->set_var('lang_category',lang('Category'));
!
$t->set_var('coordinator_url',$GLOBALS['phpgw']->link('/property/list_workorder.php',"sort=$sort&order=$order&filter=$filter&start=$start&query_location=$query_location&query_vendor=$query_vendor&cat_id=$cat_id&status=$status"));
$hidden_vars = '<input type="hidden" name="sort" value="' . $sort .
'">' . "\n"
***************
*** 48,52 ****
. '<input type="hidden" name="start" value="' .
$start . '">' . "\n"
. '<input type="hidden" name="cat_id" value="'
. $cat_id . '">' . "\n"
! . '<input type="hidden" name="coordinator_id"
value="' . $coordinator_id . '">' . "\n"
. '<input type="hidden" name="filter" value="'
. $filter . '">' . "\n";
--- 55,59 ----
. '<input type="hidden" name="start" value="' .
$start . '">' . "\n"
. '<input type="hidden" name="cat_id" value="'
. $cat_id . '">' . "\n"
! . '<input type="hidden" name="status" value="'
. $status . '">' . "\n"
. '<input type="hidden" name="filter" value="'
. $filter . '">' . "\n";
***************
*** 64,75 ****
$t->set_var('lang_coordinator',lang('Coordinator'));
!
//$query="&query_location=".$query_location."&query_vendor=".$query_vendor;
!
! $pro =
$fm_wrkorder->read_wrkorders($start,True,$query_location,$filter,$sort,$order,'active',$cat_id,$coordinator_id,$query_vendor);
//---------------------- nextmatch variable template-declarations
---------------------------
! $left =
$GLOBALS['phpgw']->nextmatchs->left('/property/list_workorder.php',$start,$fm_wrkorder->total_records,"&coordinator_id=$coordinator_id&query_location=$query_location&query_vendor=$query_vendor");
! $right =
$GLOBALS['phpgw']->nextmatchs->right('/property/list_workorder.php',$start,$fm_wrkorder->total_records,"&coordinator_id=$coordinator_id&query_location=$query_location&query_vendor=$query_vendor");
$t->set_var('left',$left);
$t->set_var('right',$right);
--- 71,84 ----
$t->set_var('lang_coordinator',lang('Coordinator'));
! if (!$status)
! {
! $status='active';
! }
! $pro =
$fm_wrkorder->read_wrkorders($start,True,$query_location,$filter,$sort,$order,$status,$cat_id,$coordinator_id,$query_vendor,$query_location);
//---------------------- nextmatch variable template-declarations
---------------------------
! $left =
$GLOBALS['phpgw']->nextmatchs->left('/property/list_workorder.php',$start,$fm_wrkorder->total_records,"&coordinator_id=$coordinator_id&query_location=$query_location&query_vendor=$query_vendor&status=$status");
! $right =
$GLOBALS['phpgw']->nextmatchs->right('/property/list_workorder.php',$start,$fm_wrkorder->total_records,"&coordinator_id=$coordinator_id&query_location=$query_location&query_vendor=$query_vendor&status=$status");
$t->set_var('left',$left);
$t->set_var('right',$right);
***************
*** 182,186 ****
// ------------------ template declaration for Add Form
---------------------------------------
- // ob_end_flush();
$t->set_var('lang_add',lang('Add'));
$t->parse('out','wrkorders_list_t',True);
--- 191,194 ----
Index: add_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/add_workorder.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** add_workorder.php 1 Sep 2002 22:10:44 -0000 1.3
--- add_workorder.php 4 Sep 2002 17:56:09 -0000 1.4
***************
*** 24,30 ****
$config = CreateObject('phpgwapi.config','property');
$config->read_repository();
- // $integration = $config->config_data['fmwrkorder_integration'];
- // echo 'integration: '.$integration .'<BR>';
-
$t->set_var('descr_orig','');
--- 24,27 ----
***************
*** 45,50 ****
$db2 = $GLOBALS['phpgw']->db;
-
-
$dateformat =
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
$sep = '/';
--- 42,45 ----
***************
*** 70,73 ****
--- 65,98 ----
$errorcount = 0;
+ if ($need_approval)
+ {
+
$coordinator_name=$GLOBALS['phpgw_info']['user']['fullname'];
+
$coordinator_email=$GLOBALS['phpgw_info']['user']['preferences']['email']['address'];
+ $headers = "Return-Path: <". $coordinator_email
.">\r\n";
+ $headers .= "From: " . $coordinator_name . "<" .
$coordinator_email .">\r\n";
+ $headers .= "Bcc: " . $coordinator_name . "<" .
$coordinator_email .">\r\n";
+ $headers .= "Content-type: text/plain;
charset=iso-8859-1\r\n";
+
+ $subject = lang(Approval).": ".$num;
+ $message = lang(Workorder) . " " .$num ." ".
lang(needs_approval);
+
+ $mail_method= $config->config_data['fmwrkorder_mail'];
+ if ($mail_method=='smtp'):
+ {
+ $bcc = $coordinator_email;
+ $send = CreateObject('phpgwapi.send');
+ $rcpt = $send->msg('email',
$to_approval_from_email, $subject, stripslashes($message), '', $cc, $bcc,
$coordinator_email, $coordinator_name, 'plain');
+ }
+ elseif ($mail_method=='sendmail'):
+ {
+
$rcpt=mail($to_approval_from_email,$subject,$message, $headers);
+ }
+ else:
+ {
+ $error[$errorcount++] = lang('Mailing method is
not chosen! ("admin" section)');
+ }
+ endif;
+ }
+
if (!$num)
{
***************
*** 446,456 ****
$t->set_var('lang_budget_account',lang('Budget account'));
-
//---------------- end budgetting accounts
-
-
-
-
if (! $submit)
{
--- 471,476 ----
***************
*** 468,471 ****
--- 488,520 ----
}
+
+
$approval_from_id=$GLOBALS['phpgw_info']['user']['preferences']['property']['workorder_approval_from'];
+ $workorder_approval = $config->config_data['workorder_approval'];
+
+ if ($approval_from_id && ($workorder_approval=='yes'))
+ {
+ $t->set_var('lang_need_approval',lang('Need Approval:'));
+ $approval_from_lid=
$GLOBALS['phpgw']->accounts->id2name($approval_from_id);
+
+ $prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences($approval_from_id);
+ $to_approval_from_email = $prefs['email']['address'];
+ $field_size= strlen($to_approval_from_email)+3;
+ $t->set_var('to_approval_from_email','<input type="text"
size="'. $field_size .'" name="coordinator_email" value="'
.$to_approval_from_email .'">');
+
+ // echo 'to: '.$to_approval_from_email .'<BR>';
+
+ if ($need_approval)
+ {
+ $checked_need_approval='checked';
+ }
+
+ $t->set_var('need_approval','<input type="checkbox"
name="need_approval" ' .$checked_need_approval .'>');
+ }
+ else
+ {
+ $t->set_var('need_approval','');
+ $t->set_var('to_approval_from_email','');
+ $t->set_var('lang_need_approval','');
+ }
if ($charge_tenant)
{
Index: edit_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/edit_workorder.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** edit_workorder.php 1 Sep 2002 22:10:44 -0000 1.3
--- edit_workorder.php 4 Sep 2002 17:56:09 -0000 1.4
***************
*** 584,587 ****
--- 584,591 ----
$t->set_var('account_id',$account_id);
+ $t->set_var('lang_need_approval','');
+ $t->set_var('need_approval','');
+ $t->set_var('to_approval_from_email','');
+
$charge_tenant =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('charge_tenant'));
***************
*** 651,655 ****
$t->set_var('delete',' ');
}
!
$other_branch =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('other_branch'));
--- 655,659 ----
$t->set_var('delete',' ');
}
! $t->set_var('lang_select_responsible',lang('Select Responsible'));
$other_branch =
$GLOBALS['phpgw']->strip_html($GLOBALS['phpgw']->db->f('other_branch'));
Index: list_power_meter.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/list_power_meter.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** list_power_meter.php 1 Sep 2002 19:43:49 -0000 1.2
--- list_power_meter.php 4 Sep 2002 17:56:09 -0000 1.3
***************
*** 73,77 ****
if ($query)
{
! $querymethod = " where (span_pmlocread.bms_sys_adr_code like
'%$query%' or address_1 like '%$query%' )";
}
--- 73,77 ----
if ($query)
{
! $querymethod = " where (span_pmlocread.bms_sys_adr_code like
'%$query%' or address_1 like '%$query%' or point_name like '%$query%' )";
}
***************
*** 155,160 ****
$t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
$t->set_var('currency',$currency);
!
$t->set_var('sort_installation_id',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'point_name',$order,'/property/list_power_meter.php',lang('Installation
ID')));
!
$t->set_var('sort_power_meter_id',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'span_pmlocread.bms_sys_adr_code',$order,'/property/list_power_meter.php',lang('Power_meter
ID')));
$t->set_var('sort_address',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'address_1',$order,'/property/list_power_meter.php',lang('Address')));
$t->set_var('sort_property',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'span_pmlocread.splocation_code',$order,'/property/list_power_meter.php',lang('Property')));
--- 155,160 ----
$t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
$t->set_var('currency',$currency);
!
$t->set_var('sort_installation_id',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'span_pmlocread.bms_sys_adr_code',$order,'/property/list_power_meter.php',lang('Installation
ID')));
!
$t->set_var('sort_power_meter_id',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'point_name',$order,'/property/list_power_meter.php',lang('Power_meter
ID')));
$t->set_var('sort_address',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'address_1',$order,'/property/list_power_meter.php',lang('Address')));
$t->set_var('sort_property',$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'span_pmlocread.splocation_code',$order,'/property/list_power_meter.php',lang('Property')));
Index: view_workorder.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/view_workorder.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** view_workorder.php 28 Aug 2002 16:43:15 -0000 1.1.1.1
--- view_workorder.php 4 Sep 2002 17:56:09 -0000 1.2
***************
*** 784,792 ****
// echo 'mail_method: '.$mail_method .'<BR>';
- {
-
- }
-
-
if ($mail_method=='smtp'):
{
--- 784,787 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property list_workorder.php,1.4,1.5 add_workorder.php,1.3,1.4 edit_workorder.php,1.3,1.4 list_power_meter.php,1.2,1.3 view_workorder.php,1.1.1.1,1.2,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/templates/default list_workorder.tpl,1.2,1.3 config.tpl,1.1.1.1,1.2 form_workorder.tpl,1.1.1.1,1.2
- Next by Date:
[Phpgroupware-cvs] CVS: sitemgr/templates/default confirmdelete.tpl,NONE,1.1
- Previous by thread:
[Phpgroupware-cvs] CVS: property/templates/default list_workorder.tpl,1.2,1.3 config.tpl,1.1.1.1,1.2 form_workorder.tpl,1.1.1.1,1.2
- Next by thread:
[Phpgroupware-cvs] CVS: sitemgr/templates/default confirmdelete.tpl,NONE,1.1
- Index(es):