[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.boworkorder.inc.php,1.8,1.9 c
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.boworkorder.inc.php,1.8,1.9 class.soproperty.inc.php,1.10,1.11 class.uiinvoice.inc.php,1.14,1.15 class.uiwo_hour.inc.php,1.8,1.9 |
Date: |
Thu, 03 Apr 2003 14:12:47 -0500 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv822/inc
Modified Files:
class.boworkorder.inc.php class.soproperty.inc.php
class.uiinvoice.inc.php class.uiwo_hour.inc.php
Log Message:
no message
Index: class.boworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boworkorder.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.boworkorder.inc.php 2 Apr 2003 19:25:01 -0000 1.8
--- class.boworkorder.inc.php 3 Apr 2003 19:12:44 -0000 1.9
***************
*** 306,309 ****
--- 306,310 ----
case 'A': $type = lang('Re-assigned');
break;
case 'P': $type = lang('Priority
changed'); break;
+ case 'M': $type = lang('Sendt by email
to'); break;
case 'B': $type = lang('Budget
changed'); break;
case 'CO': $type = lang('Initial
Coordinator'); break;
Index: class.soproperty.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproperty.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.soproperty.inc.php 2 Apr 2003 19:25:01 -0000 1.10
--- class.soproperty.inc.php 3 Apr 2003 19:12:45 -0000 1.11
***************
*** 36,42 ****
function get_district($property_id)
{
! $this->db->query("select district_id from
fm_part_of_town $this->join fm_property as o on b.bydel_id=o.bydel_id where
o.property_id ='$property'");
$this->db->next_record();
! $omraade_id = $this->db->f('omraade_id');
}
--- 36,42 ----
function get_district($property_id)
{
! $this->db->query("select district_id from
fm_part_of_town $this->join fm_property on
fm_part_of_town.id=fm_property.part_of_town_id where fm_property.property_id
='$property_id'");
$this->db->next_record();
! return $this->db->f('district_id');
}
Index: class.uiinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.uiinvoice.inc.php 8 Mar 2003 22:23:15 -0000 1.14
--- class.uiinvoice.inc.php 3 Apr 2003 19:12:45 -0000 1.15
***************
*** 362,366 ****
$content[$i]['link_remark']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.remark');
$content[$i]['lang_remark_help']
= lang('Klick this link to view the remark');
! $content[$i]['link_workorder']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.view');
$i++;
}
--- 362,366 ----
$content[$i]['link_remark']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiinvoice.remark');
$content[$i]['lang_remark_help']
= lang('Klick this link to view the remark');
! $content[$i]['link_workorder']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&no_email=true&show_cost=true');
$i++;
}
Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.uiwo_hour.inc.php 2 Apr 2003 19:25:01 -0000 1.8
--- class.uiwo_hour.inc.php 3 Apr 2003 19:12:45 -0000 1.9
***************
*** 40,43 ****
--- 40,44 ----
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
+ $this->create_html =
CreateObject('phpgwapi.xslttemplates');
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
***************
*** 48,52 ****
$this->boproject =
CreateObject($this->currentapp.'.boproject',True);
$this->bopricebook =
CreateObject($this->currentapp.'.bopricebook',True);
!
$this->pdf =
CreateObject($this->currentapp.'.pdf');
--- 49,54 ----
$this->boproject =
CreateObject($this->currentapp.'.boproject',True);
$this->bopricebook =
CreateObject($this->currentapp.'.bopricebook',True);
! $this->soproperty =
CreateObject($this->currentapp.'.soproperty',True);
! $this->historylog =
CreateObject($this->currentapp.'.historylog','workorder');
$this->pdf =
CreateObject($this->currentapp.'.pdf');
***************
*** 180,184 ****
);
-
$workorder_data = array(
'link_workorder'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit&id='
. $workorder_id),
--- 182,185 ----
***************
*** 352,360 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
'menu',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header'));
! $show_cost = get_var('show_cost',array('POST','GET'));
! $workorder_id =
get_var('workorder_id',array('POST','GET'));
$workorder =
$this->boworkorder->read_single($workorder_id);
$common_data =
$this->common_data($workorder_id);
--- 353,378 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
'menu',
+
'headonly',
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP .
'app_header'));
! $show_cost =
get_var('show_cost',array('POST','GET'));
! $workorder_id =
get_var('workorder_id',array('POST','GET'));
! $to_email =
get_var('to_email',array('POST','GET'));
! $update_email =
get_var('update_email',array('POST','GET'));
! $send_order =
get_var('send_order',array('POST','GET'));
! $no_email =
get_var('no_email',array('POST','GET'));
!
!
$workorder =
$this->boworkorder->read_single($workorder_id);
+ $workorder_history =
$this->boworkorder->read_record_history($workorder_id);
+
+ $table_header_history[] = array
+ (
+ 'lang_date' => lang('Date'),
+ 'lang_user' => lang('User'),
+ 'lang_action' => lang('Action'),
+ 'lang_new_value' => lang('New value')
+ );
+
$common_data =
$this->common_data($workorder_id);
***************
*** 362,366 ****
$project =
$this->boproject->read_single($common_data['workorder']['project_id']);
- _debug_array($project);
if(!$show_cost)
--- 380,383 ----
***************
*** 370,373 ****
--- 387,391 ----
unset($values_hour[$i]['cost']);
unset($values_hour[$i]['billperae']);
+
unset($common_data['table_sum'][0]['value_total_sum']);
}
}
***************
*** 388,393 ****
(
'lang_send_order'
=> lang('Send Order'),
! 'lang_send_order_statustext' => lang('Send
this order by email'),
! 'send_order_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&send=true&workorder_id='
. $workorder_id)
);
--- 406,410 ----
(
'lang_send_order'
=> lang('Send Order'),
! 'lang_send_order_statustext' => lang('Send
this order by email')
);
***************
*** 405,412 ****
$tenant_name= $tenant_data['last_name'] . ', ' .
$tenant_data['first_name'];
! $data = array
(
! 'error'
=> $receipt['error'],
! 'message'
=> $receipt['message'],
'lang_date'
=> lang('Date'),
--- 422,433 ----
$tenant_name= $tenant_data['last_name'] . ', ' .
$tenant_data['first_name'];
! $from_name =
$GLOBALS['phpgw_info']['user']['fullname'];
! $from_email =
$GLOBALS['phpgw_info']['user']['preferences']['email']['address'];
!
!
! $email_data = array
(
! 'lang_workorder'
=> lang('Workorder ID'),
! 'workorder_id'
=> $workorder_id,
'lang_date'
=> lang('Date'),
***************
*** 420,439 ****
'lang_from'
=> lang('From'),
! 'from_name'
=> $GLOBALS['phpgw_info']['user']['fullname'],
'from_phone'
=>
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['cellphone'],
'lang_to'
=> lang('To'),
'to_name'
=> $workorder['vendor_name'],
- 'to_email'
=> $workorder['vendor_email'],
! 'lang_property'
=> lang('property'),
! 'property'
=> $project['property_id'],
! 'lang_building'
=> lang('building'),
! 'building'
=> $project['building_id'],
'lang_floor'
=> lang('Floor'),
'floor'
=> $project['floor'],
'lang_address'
=> lang('Address'),
'address'
=> $project['street_name'] . ' ' . $project['street_number'],
--- 441,471 ----
'lang_from'
=> lang('From'),
! 'from_name'
=> $from_name,
! 'from_email'
=> $from_email,
'from_phone'
=>
$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['cellphone'],
+ 'lang_district'
=> lang('District'),
+ 'district'
=> $this->soproperty->get_district($project['property_id']),
'lang_to'
=> lang('To'),
'to_name'
=> $workorder['vendor_name'],
! 'lang_property'
=> lang('Property'),
! 'property_id'
=> $project['property_id'],
!
! 'lang_building'
=> lang('Building'),
! 'building_id'
=> $project['building_id'],
!
! 'lang_building'
=> lang('Building'),
! 'building_id'
=> $project['building_id'],
! 'lang_entrance'
=> lang('Entrance'),
! 'entrance_id'
=> $project['entrance_id'],
'lang_floor'
=> lang('Floor'),
'floor'
=> $project['floor'],
+ 'lang_apartment'
=> lang('Apartment'),
+ 'apartment_id'
=> $project['apartment_id'],
+
'lang_address'
=> lang('Address'),
'address'
=> $project['street_name'] . ' ' . $project['street_number'],
***************
*** 442,445 ****
--- 474,480 ----
'tenant_name'
=> $tenant_name,
+ 'lang_contact_phone' =>
lang('Contact Phone'),
+ 'contact_phone'
=> $project['contact_phone'],
+
'lang_title'
=> lang('Title'),
'title'
=> $workorder['title'],
***************
*** 449,459 ****
'descr'
=> $workorder['descr'],
! 'lang_sum_calculation' =>
lang('Sum of calculation'),
! 'sum_calculation'
=> $common_data['table_sum']['value_total_sum'],
! 'lang_mail'
=> lang('E-Mail'),
- 'lang_workorder_id'
=> lang('Workorder ID'),
- 'workorder_id'
=> $workorder_id,
// 'lang_vendor'
=> lang('vendor'),
--- 484,493 ----
'descr'
=> $workorder['descr'],
! 'lang_budget_account' =>
lang('Budget account'),
! 'budget_account'
=> $workorder['b_account_id'],
! 'lang_sum_calculation' =>
lang('Sum of calculation'),
! 'sum_calculation'
=> $common_data['table_sum'][0]['value_total_sum'],
// 'lang_vendor'
=> lang('vendor'),
***************
*** 463,499 ****
'other_branch'
=> $project['other_branch'],
! 'key_responsible_list' =>
$this->bo->select_branch_list($project['key_responsible']),
'lang_key_responsible' =>
lang('key responsible'),
! 'key_fetch_list'
=> $this->bo->select_key_location_list($workorder['key_fetch']),
! 'lang_key_fetch_location' =>
lang('Where to pick up the key'),
! 'key_deliver_list'
=> $this->bo->select_key_location_list($workorder['key_deliver']),
! 'lang_key_deliver_location' =>
lang('Where to deliver the key'),
! 'currency'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['currency']
!
! 'lang_budget_account' =>
lang('Budget account'),
! 'lang_district'
=> lang('District'),
!
! 'lang_contact_phone' =>
lang('Contact Phone'),
! 'contact_phone'
=> $project['contact_phone'],
'lang_cost_tax'
=> lang('Cost (incl tax):'),
'lang_materials'
=> lang('Materials:__________'),
'lang_work'
=> lang('work:____________'),
- 'coordinator_email'
=> $GLOBALS['phpgw_info']['user']['preferences']['email']['address'],
- 'coordinator_phone'
=> $GLOBALS['phpgw_info']['user']['preferences']['property']['cellphone'],
! 'function'
=> 'view',
! 'links'
=> $links,
! 'num_records'
=> count($hours_list),
! 'total_hours_records' =>
$common_data['total_hours_records'],
! 'appname'
=> lang($this->currentapp),
! 'function_msg'
=> lang('Send order'),
! 'table_header_view_order' =>
$table_header,
! 'values_view_order'
=> $values_hour,
'table_send'
=> $table_send,
'table_done'
=> $table_done
--- 497,589 ----
'other_branch'
=> $project['other_branch'],
! 'key_responsible_list' =>
$this->boproject->select_branch_list($project['key_responsible']),
'lang_key_responsible' =>
lang('key responsible'),
! 'key_fetch_list'
=> $this->boproject->select_key_location_list($workorder['key_fetch']),
! 'lang_key_fetch'
=> lang('Where to pick up the key'),
! 'key_deliver_list'
=> $this->boproject->select_key_location_list($workorder['key_deliver']),
! 'lang_key_deliver'
=> lang('Where to deliver the key'),
! 'currency'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['currency'],
'lang_cost_tax'
=> lang('Cost (incl tax):'),
'lang_materials'
=> lang('Materials:__________'),
'lang_work'
=> lang('work:____________'),
+ 'table_header_view_order' =>
$table_header,
+ 'values_view_order'
=> $values_hour
+ );
! if($to_email)
! {
!
$this->create_html->add_file(array(PHPGW_SERVER_ROOT . SEP . $this->currentapp
. SEP . 'templates' . SEP . 'default' . SEP . 'wo_hour'));
!
!
$this->create_html->set_var('phpgw',array('email_data' => $email_data));
! $html = $this->create_html->parse();
! // print $html;
!
! $headers = "Return-Path: <". $from_email
.">\r\n";
! $headers .= "From: " . $from_name . "<" .
$from_email .">\r\n";
! $headers .= "Bcc: " . $from_name . "<" .
$from_email .">\r\n";
! $headers .= "Content-type: text/html;
charset=iso-8859-1\r\n";
! $headers .= "MIME-Version: 1.0\r\n";
! $subject = lang('Workorder').": ".$workorder_id;
!
! $this->config->read_repository();
!
! $mail_method=
$this->config->config_data['fmwrkorder_mail'];
! echo 'mail_method: '.$mail_method .'<BR>';
!
! if ($mail_method=='smtp'):
! {
! $bcc = $from_email;
! $send = CreateObject('phpgwapi.send');
! // $rcpt = $send->msg('email', $to_email,
$subject, stripslashes($message), '', $cc, $bcc, $from_email, $from_name,
'html');
! }
! elseif ($mail_method=='sendmail'):
! {
! // $rcpt=mail($to_email,$subject,$message,
$headers);
! }
! else:
! {
!
$receipt['error'][]=array('msg'=>lang('Mailing method is not chosen! ("admin"
section)'));
!
! }
! endif;
!
! if ($rcpt)
! {
!
$this->historylog->add('M',$workorder_id,$to_email);
!
$receipt['message'][]=array('msg'=>lang('Workorder is sent by email!'));
! }
! else
! {
!
$receipt['error'][]=array('msg'=>lang('The recipient did not get the email:'));
!
$receipt['error'][]=array('msg'=>lang('From') . ' ' . $from_email);
!
$receipt['error'][]=array('msg'=>lang('To') . ' ' . $to_email);
! }
! }
!
! $data = array
! (
! 'error'
=> $receipt['error'],
! 'message'
=> $receipt['message'],
! 'appname'
=> lang(Workorder),
! 'function_msg'
=> lang('Send order'),
! 'lang_mail'
=> lang('E-Mail'),
! 'lang_update_email'
=> lang('Update email'),
! 'lang_update_email_statustext' =>
lang('Check to update the email-address for this vendor'),
! 'lang_to_email_address_statustext' =>
lang('The address to which this order will be sendt'),
! 'to_email'
=> $workorder['vendor_email'],
!
! 'send_order_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&send=true&workorder_id='
. $workorder_id),
!
! 'lang_no_history'
=> lang('No history'),
! 'lang_history'
=> lang('History'),
! 'workorder_history'
=> $workorder_history,
! 'table_header_history' =>
$table_header_history,
! 'email_data'
=> $email_data,
'table_send'
=> $table_send,
'table_done'
=> $table_done
***************
*** 502,506 ****
//_debug_array($data);
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
$this->save_sessiondata();
}
--- 592,605 ----
//_debug_array($data);
!
! if($no_email)
! {
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('email_data' => $email_data));
! }
! else
! {
!
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
! }
!
$this->save_sessiondata();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.boworkorder.inc.php,1.8,1.9 class.soproperty.inc.php,1.10,1.11 class.uiinvoice.inc.php,1.14,1.15 class.uiwo_hour.inc.php,1.8,1.9,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.55,1.56
- Next by Date:
[Phpgroupware-cvs] CVS: property/templates/default invoice.xsl,1.19,1.20 project.xsl,1.3,1.4 wo_hour.xsl,1.7,1.8 workorder.xsl,1.9,1.10
- Previous by thread:
[Phpgroupware-cvs] CVS: property/setup tables_current.inc.php,1.55,1.56
- Next by thread:
[Phpgroupware-cvs] CVS: property/templates/default invoice.xsl,1.19,1.20 project.xsl,1.3,1.4 wo_hour.xsl,1.7,1.8 workorder.xsl,1.9,1.10
- Index(es):